Skip to content

RyoYumo/ofxTweeny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ofxTweeny

Description

ofxTweeny is a wrapper of Tweeny for openFrameworks.

Install

git clone --recursive https://github.com/RyoYumo/ofxTweeny.git

How to use

!!! You must call ofxTweeny::Tweener::update() in ofApp::update() !!!

void ofApp::update() {
    ofxTweeny::Tweener::update();
}

Example

Simple example

float value = 0.0;
void ofApp::keyPressed(int key) {
    float from = value;
    float to = ofRandomf();
    int duration = 1000; // ms
    ofxTweeny::Tweener::add(&value, from, to, duration);
}

Customize animation curve

float value = 0.0;
void ofApp::keyPressed(int key) {
    float from = value;
    float to = ofRandomf();
    int duration = 1000; // ms
    ofxTweeny::Tweener::add(&value, from, to, duration, ofxTweeny::easeOutCirc);
}

Ease functions

Releases

No releases published

Packages

No packages published