| 49 | }; |
| 50 | |
| 51 | void DragTweenApp::setup() |
| 52 | { |
| 53 | // setup the initial animation |
| 54 | const size_t numCircles = 35; |
| 55 | for( size_t c = 0; c < numCircles; ++c ) { |
| 56 | float angle = c / (float)numCircles * 4 * M_PI; |
| 57 | vec2 pos = getWindowCenter() + ( 50 + c / (float)numCircles * 200 ) * vec2( cos( angle ), sin( angle ) ); |
| 58 | mCircles.push_back( Circle( Color( CM_HSV, c / (float)numCircles, 1, 1 ), 0, getWindowCenter(), pos ) ); |
| 59 | timeline().apply( &mCircles.back().mPos, pos, 0.5f, EaseOutAtan( 10 ) ).timelineEnd( -0.45f ); |
| 60 | timeline().apply( &mCircles.back().mRadius, 30.0f, 0.5f, EaseOutAtan( 10 ) ).timelineEnd( -0.5f ); |
| 61 | } |
| 62 | |
| 63 | mCurrentDragCircle = 0; |
| 64 | } |
| 65 | |
| 66 | void DragTweenApp::mouseDown( MouseEvent event ) |
| 67 | { |
nothing calls this directly
no test coverage detected