diff options
| author | Comment <tim@gray.(none)> | 2013-06-24 23:18:03 +0100 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-06-24 23:18:03 +0100 |
| commit | 11229ede83c48fab01e6e566155536b5e7e9d762 (patch) | |
| tree | dcd2671c419bdbddde9191712dc3cf5ab2a98f04 /06_performance/src/testApp.cpp | |
| parent | ff979a86dc8f031c823cd8806324b0e8c4ca069b (diff) | |
yay
Diffstat (limited to '06_performance/src/testApp.cpp')
| -rw-r--r-- | 06_performance/src/testApp.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/06_performance/src/testApp.cpp b/06_performance/src/testApp.cpp index 57749b0..746d52f 100644 --- a/06_performance/src/testApp.cpp +++ b/06_performance/src/testApp.cpp @@ -168,7 +168,10 @@ void testApp::setup(){ else printf("no video clips found!\n"); } } -} + + xOffs=startX=yOffs=startY=0; +}; + @@ -242,6 +245,9 @@ void testApp::update(){ for (int i=0;i<videoclips.size();i++) videoclips[i].update(); narrator.update(); + + xOffs*=.95; + yOffs*=.95; } //-------------------------------------------------------------- @@ -319,8 +325,8 @@ void testApp::draw(){ } F_xRotation+=(F_xRotate*interval); - F_yRotation+=(F_yRotate*interval); - F_zRotation+=(F_zRotate*interval); + F_yRotation+=((F_yRotate+xOffs)*interval); + F_zRotation+=((F_zRotate+yOffs)*interval); F_drawFrames=max(1.99f,min(F_drawFrames+(F_drawStep*interval),(float)BUFFER_FRAMES)); ofPushMatrix(); @@ -588,17 +594,18 @@ void testApp::mouseMoved(int x, int y ){ //-------------------------------------------------------------- void testApp::mouseDragged(int x, int y, int button){ - + xOffs=x-startX; + yOffs=y-startY; } //-------------------------------------------------------------- void testApp::mousePressed(int x, int y, int button){ - + startX=x; + startY=y; } //-------------------------------------------------------------- void testApp::mouseReleased(){ - } |
