MCPcopy Create free account
hub / github.com/cinder/Cinder / setup

Method setup

samples/_timeline/DragTween/src/DragTweenApp.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49};
50
51void 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
66void DragTweenApp::mouseDown( MouseEvent event )
67{

Callers

nothing calls this directly

Calls 10

getWindowCenterFunction · 0.85
cosFunction · 0.85
sinFunction · 0.85
EaseOutAtanClass · 0.85
timelineEndMethod · 0.80
backMethod · 0.80
CircleClass · 0.70
ColorFunction · 0.50
push_backMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected