Commit 5c9555a60b04f325838d9263eb7c981906503b33

Authored by Heeyong Song
1 parent 1d5b074a

Remove non-public APIs of Animation

Change-Id: Idc8fc2369f01eb7cb96635d15c1600fa3c368934
demo/dali-table-view.cpp
... ... @@ -502,8 +502,8 @@ void DaliTableView::Rotate( unsigned int degrees )
502 502 }
503 503  
504 504 mRotateAnimation = Animation::New( ROTATE_ANIMATION_TIME );
505   - mRotateAnimation.RotateTo( mRootActor, Degree( 360 - degrees ), Vector3::ZAXIS, AlphaFunctions::EaseOut );
506   - mRotateAnimation.Resize( mRootActor, targetSize, AlphaFunctions::EaseOut );
  505 + mRotateAnimation.AnimateTo( Property( mRootActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( 360 - degrees ) ), Vector3::ZAXIS ), AlphaFunctions::EaseOut );
  506 + mRotateAnimation.AnimateTo( Property( mRootActor, Actor::Property::SIZE ), targetSize, AlphaFunctions::EaseOut );
507 507 mRotateAnimation.Play();
508 508 }
509 509  
... ... @@ -622,10 +622,10 @@ bool DaliTableView::OnTilePressed( Actor actor, const TouchEvent& event )
622 622  
623 623 // scale the content actor within the Tile, as to not affect the placement within the Table.
624 624 Actor content = actor.GetChildAt(0);
625   - mPressedAnimation.ScaleTo( content, Vector3( 0.9f, 0.9f, 1.0f ), AlphaFunctions::EaseInOut, 0.0f,
626   - BUTTON_PRESS_ANIMATION_TIME * 0.5f );
627   - mPressedAnimation.ScaleTo( content, Vector3::ONE, AlphaFunctions::EaseInOut, BUTTON_PRESS_ANIMATION_TIME * 0.5f,
628   - BUTTON_PRESS_ANIMATION_TIME * 0.5f );
  625 + mPressedAnimation.AnimateTo( Property( content, Actor::Property::SCALE ), Vector3( 0.9f, 0.9f, 1.0f ), AlphaFunctions::EaseInOut,
  626 + TimePeriod( 0.0f, BUTTON_PRESS_ANIMATION_TIME * 0.5f ) );
  627 + mPressedAnimation.AnimateTo( Property( content, Actor::Property::SCALE ), Vector3::ONE, AlphaFunctions::EaseInOut,
  628 + TimePeriod( BUTTON_PRESS_ANIMATION_TIME * 0.5f, BUTTON_PRESS_ANIMATION_TIME * 0.5f ) );
629 629 mPressedAnimation.Play();
630 630 mPressedAnimation.FinishedSignal().Connect( this, &DaliTableView::OnPressedAnimationFinished );
631 631 }
... ... @@ -791,7 +791,7 @@ void DaliTableView::InitialiseBackgroundActors( Actor actor )
791 791  
792 792 // Kickoff animation
793 793 Animation animation = Animation::New( Random::Range( 40.0f, 80.0f ) );
794   - animation.MoveBy( child, Vector3( 0.0f, -1.0f, 0.0f ), AlphaFunctions::Linear );
  794 + animation.AnimateBy( Property( child, Actor::Property::POSITION ), Vector3( 0.0f, -1.0f, 0.0f ), AlphaFunctions::Linear );
795 795 animation.SetLooping( true );
796 796 animation.Play();
797 797 mBackgroundAnimations.push_back( animation );
... ...
examples/animated-shapes/animated-shapes-example.cpp
... ... @@ -162,7 +162,7 @@ public:
162 162 k0.Add( 1.0f, Vector3( -radius, 0.0f, 0.0f) );
163 163 animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(10)),k0,AlphaFunctions::EaseInOutSine );
164 164  
165   - animation.RotateBy(meshActor,Degree(90.0f), Vector3::ZAXIS );
  165 + animation.AnimateBy( Property( meshActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(90.0f) ), Vector3::ZAXIS ) );
166 166 animation.SetLooping( true );
167 167 animation.Play();
168 168 }
... ... @@ -343,7 +343,7 @@ public:
343 343 k0.Add( 1.0f, Vector3( -radius*2.0, 0.0f, 0.0f) );
344 344 animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(10)),k0,AlphaFunctions::EaseInOutSine );
345 345  
346   - animation.RotateBy(meshActor,Degree(-90.0f), Vector3::ZAXIS );
  346 + animation.AnimateBy( Property( meshActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(-90.0f) ), Vector3::ZAXIS ) );
347 347 animation.SetLooping( true );
348 348 animation.Play();
349 349 }
... ...
examples/dissolve-effect/dissolve-effect-example.cpp
... ... @@ -303,7 +303,7 @@ void DissolveEffectApp::StartTransition(Vector2 position, Vector2 displacement)
303 303 mAnimation.AnimateTo( Property(mCurrentImageEffect, mCurrentImageEffect.GetDistortionPropertyName()), 1.0f, AlphaFunctions::Linear );
304 304  
305 305 mNextImage.SetOpacity(0.0f);
306   - mAnimation.OpacityTo( mNextImage, 1.0, AlphaFunctions::Linear );
  306 + mAnimation.AnimateTo( Property( mNextImage, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::Linear );
307 307  
308 308 if(mUseHighPrecision)
309 309 {
... ... @@ -314,7 +314,7 @@ void DissolveEffectApp::StartTransition(Vector2 position, Vector2 displacement)
314 314 }
315 315 else
316 316 {
317   - mAnimation.MoveTo(mNextImage, Vector3(0.0f, 0.0f, 0.0f), AlphaFunctions::Linear);
  317 + mAnimation.AnimateTo( Property( mNextImage, Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), AlphaFunctions::Linear );
318 318 }
319 319  
320 320 mAnimation.FinishedSignal().Connect( this, &DissolveEffectApp::OnTransitionCompleted );
... ...
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
... ... @@ -468,7 +468,7 @@ public:
468 468 {
469 469 // Spin the image a few times:
470 470 Animation animation = Animation::New(SPIN_DURATION);
471   - animation.RotateBy( actor, Degree(360.0f * SPIN_DURATION), Vector3::XAXIS, AlphaFunctions::EaseOut);
  471 + animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f * SPIN_DURATION) ), Vector3::XAXIS ), AlphaFunctions::EaseOut );
472 472 animation.Play();
473 473  
474 474 // Change the scaling mode:
... ...
examples/motion-blur/motion-blur-example.cpp
... ... @@ -326,8 +326,9 @@ public:
326 326 {
327 327 // has parent so we expect it to be on stage, start animation
328 328 mRotateAnimation = Animation::New( ORIENTATION_DURATION );
329   - mRotateAnimation.RotateTo( mView, Degree( -orientation ), Vector3::ZAXIS, AlphaFunctions::EaseOut );
330   - mRotateAnimation.Resize( mView, targetSize.width, targetSize.height );
  329 + mRotateAnimation.AnimateTo( Property( mView, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( -orientation ) ), Vector3::ZAXIS ), AlphaFunctions::EaseOut );
  330 + mRotateAnimation.AnimateTo( Property( mView, Actor::Property::SIZE_WIDTH ), targetSize.width );
  331 + mRotateAnimation.AnimateTo( Property( mView, Actor::Property::SIZE_HEIGHT ), targetSize.height );
331 332 mRotateAnimation.Play();
332 333 }
333 334 else
... ... @@ -386,7 +387,7 @@ public:
386 387 {
387 388 float animDuration = 1.0f;
388 389 mActorAnimation = Animation::New(animDuration);
389   - mActorAnimation.RotateBy(mMotionBlurImageActor, Degree(720), Vector3::YAXIS, AlphaFunctions::EaseInOut);
  390 + mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunctions::EaseInOut );
390 391 mActorAnimation.SetEndAction( Animation::Bake );
391 392 mActorAnimation.Play();
392 393 }
... ... @@ -397,7 +398,7 @@ public:
397 398 {
398 399 float animDuration = 1.0f;
399 400 mActorAnimation = Animation::New(animDuration);
400   - mActorAnimation.RotateBy(mMotionBlurImageActor, Degree(720), Vector3::ZAXIS, AlphaFunctions::EaseInOut);
  401 + mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunctions::EaseInOut );
401 402 mActorAnimation.SetEndAction( Animation::Bake );
402 403 mActorAnimation.Play();
403 404 }
... ... @@ -408,8 +409,8 @@ public:
408 409 {
409 410 float animDuration = 1.0f;
410 411 mActorAnimation = Animation::New(animDuration);
411   - mActorAnimation.RotateBy(mMotionBlurImageActor, Degree(360), Vector3::YAXIS, AlphaFunctions::EaseInOut);
412   - mActorAnimation.RotateBy(mMotionBlurImageActor, Degree(360), Vector3::ZAXIS, AlphaFunctions::EaseInOut);
  412 + mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunctions::EaseInOut );
  413 + mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunctions::EaseInOut );
413 414 mActorAnimation.SetEndAction( Animation::Bake );
414 415 mActorAnimation.Play();
415 416 }
... ... @@ -420,7 +421,7 @@ public:
420 421 {
421 422 float animDuration = 1.0f;
422 423 mActorAnimation = Animation::New(animDuration);
423   - mActorAnimation.ScaleBy(mMotionBlurImageActor, Vector3(2.0f, 2.0f, 2.0f), AlphaFunctions::Bounce, 0.0f, 1.0f);
  424 + mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::SCALE ), Vector3(2.0f, 2.0f, 2.0f), AlphaFunctions::Bounce, TimePeriod( 0.0f, 1.0f ) );
424 425 mActorAnimation.SetEndAction( Animation::Bake );
425 426 mActorAnimation.Play();
426 427 }
... ...
examples/motion-stretch/motion-stretch-example.cpp
... ... @@ -218,8 +218,9 @@ public:
218 218 {
219 219 // has parent so we expect it to be on stage, start animation
220 220 mRotateAnimation = Animation::New( ORIENTATION_DURATION );
221   - mRotateAnimation.RotateTo( mView, Degree( -orientation ), Vector3::ZAXIS, AlphaFunctions::EaseOut );
222   - mRotateAnimation.Resize( mView, targetSize.width, targetSize.height );
  221 + mRotateAnimation.AnimateTo( Property( mView, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( -orientation ) ), Vector3::ZAXIS ), AlphaFunctions::EaseOut );
  222 + mRotateAnimation.AnimateTo( Property( mView, Actor::Property::SIZE_WIDTH ), targetSize.width );
  223 + mRotateAnimation.AnimateTo( Property( mView, Actor::Property::SIZE_HEIGHT ), targetSize.height );
223 224 mRotateAnimation.Play();
224 225 }
225 226 else
... ... @@ -277,7 +278,7 @@ public:
277 278 {
278 279 float animDuration = 1.0f;
279 280 mActorAnimation = Animation::New(animDuration);
280   - mActorAnimation.RotateBy(mMotionStretchImageActor, Degree(720), Vector3::YAXIS, AlphaFunctions::EaseInOut);
  281 + mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunctions::EaseInOut );
281 282 mActorAnimation.SetEndAction( Animation::Bake );
282 283 mActorAnimation.Play();
283 284 }
... ... @@ -288,7 +289,7 @@ public:
288 289 {
289 290 float animDuration = 1.0f;
290 291 mActorAnimation = Animation::New(animDuration);
291   - mActorAnimation.RotateBy(mMotionStretchImageActor, Degree(720), Vector3::ZAXIS, AlphaFunctions::EaseInOut);
  292 + mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunctions::EaseInOut );
292 293 mActorAnimation.SetEndAction( Animation::Bake );
293 294 mActorAnimation.Play();
294 295 }
... ... @@ -299,8 +300,8 @@ public:
299 300 {
300 301 float animDuration = 1.0f;
301 302 mActorAnimation = Animation::New(animDuration);
302   - mActorAnimation.RotateBy(mMotionStretchImageActor, Degree(360), Vector3::YAXIS, AlphaFunctions::EaseInOut);
303   - mActorAnimation.RotateBy(mMotionStretchImageActor, Degree(360), Vector3::ZAXIS, AlphaFunctions::EaseInOut);
  303 + mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunctions::EaseInOut );
  304 + mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunctions::EaseInOut );
304 305 mActorAnimation.SetEndAction( Animation::Bake );
305 306 mActorAnimation.Play();
306 307 }
... ... @@ -311,7 +312,7 @@ public:
311 312 {
312 313 float animDuration = 1.0f;
313 314 mActorAnimation = Animation::New(animDuration);
314   - mActorAnimation.ScaleBy(mMotionStretchImageActor, Vector3(2.0f, 2.0f, 2.0f), AlphaFunctions::Bounce, 0.0f, 1.0f);
  315 + mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::SCALE ), Vector3(2.0f, 2.0f, 2.0f), AlphaFunctions::Bounce, TimePeriod( 0.0f, 1.0f ) );
315 316 mActorAnimation.SetEndAction( Animation::Bake );
316 317 mActorAnimation.Play();
317 318 }
... ...
examples/radial-menu/radial-menu-example.cpp
... ... @@ -189,8 +189,8 @@ void RadialMenuExample::StartAnimation()
189 189 mRadialSweepView1.Activate(mAnimation, 0.0f, 3.0f);
190 190 mRadialSweepView2.Activate(mAnimation, 1.5f, 3.0f);
191 191 mRadialSweepView3.Activate(mAnimation, 3.0f, 3.0f);
192   - mAnimation.OpacityTo(mDialActor, 1.0f, AlphaFunctions::EaseIn, 0.0f, 0.8f);
193   - mAnimation.OpacityTo(mRadialSweepView1, 1.0f, AlphaFunctions::EaseIn, 0.0f, 0.5f);
  192 + mAnimation.AnimateTo( Property( mDialActor, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn, TimePeriod( 0.0f, 0.8f ) );
  193 + mAnimation.AnimateTo( Property( mRadialSweepView1, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn, TimePeriod( 0.0f, 0.5f ) );
194 194 mAnimation.FinishedSignal().Connect( this, &RadialMenuExample::OnAnimationFinished );
195 195  
196 196 mAnimationState = PLAYING;
... ...
examples/radial-menu/radial-sweep-view-impl.cpp
... ... @@ -280,13 +280,13 @@ void RadialSweepViewImpl::Activate( Animation anim, float offsetTime, float dura
280 280 Actor actor = mLayer.GetChildAt(i);
281 281 if( actor != mStencilActor )
282 282 {
283   - anim.RotateTo( actor, mInitialActorAngle, Vector3::ZAXIS );
  283 + anim.AnimateTo( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( mInitialActorAngle ) ), Vector3::ZAXIS ) );
284 284 }
285 285 }
286 286 }
287 287  
288   - anim.AnimateTo( Property( mStencilActor, mRotationAngleIndex ), static_cast<float>(mFinalSector), mEasingFunction, TimePeriod( offsetTime, duration) );
289   - anim.RotateTo( mStencilActor, mFinalAngle, Vector3::ZAXIS, mEasingFunction, offsetTime, duration );
  288 + anim.AnimateTo( Property( mStencilActor, mRotationAngleIndex ), static_cast<float>(mFinalSector), mEasingFunction, TimePeriod( offsetTime, duration ) );
  289 + anim.AnimateTo( Property( mStencilActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( mFinalAngle ) ), Vector3::ZAXIS ), mEasingFunction, TimePeriod( offsetTime, duration ) );
290 290  
291 291 if( mRotateActorsWithStencil )
292 292 {
... ... @@ -295,7 +295,7 @@ void RadialSweepViewImpl::Activate( Animation anim, float offsetTime, float dura
295 295 Actor actor = mLayer.GetChildAt(i);
296 296 if( actor != mStencilActor )
297 297 {
298   - anim.RotateTo( actor, Degree(mFinalAngle - mInitialAngle), Vector3::ZAXIS, mEasingFunction, offsetTime, duration );
  298 + anim.AnimateTo( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( mFinalAngle - mInitialAngle ) ), Vector3::ZAXIS ), mEasingFunction, TimePeriod( offsetTime, duration ) );
299 299 }
300 300 }
301 301 }
... ... @@ -306,7 +306,7 @@ void RadialSweepViewImpl::Activate( Animation anim, float offsetTime, float dura
306 306 Actor actor = mLayer.GetChildAt(i);
307 307 if( actor != mStencilActor )
308 308 {
309   - anim.RotateTo( actor, mFinalActorAngle, Vector3::ZAXIS, mEasingFunction, offsetTime, duration );
  309 + anim.AnimateTo( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( mFinalActorAngle ) ), Vector3::ZAXIS ), mEasingFunction, TimePeriod( offsetTime, duration ) );
310 310 }
311 311 }
312 312 }
... ...
examples/scroll-view/scroll-view-example.cpp
... ... @@ -141,7 +141,7 @@ const Vector3 ANCHOR_3DEFFECT_STYLE1(65.0f, -70.0f, -300.0f); ///&lt; Rotation Anch
141 141 const unsigned int IMAGE_THUMBNAIL_WIDTH = 256; ///< Width of Thumbnail Image in texels
142 142 const unsigned int IMAGE_THUMBNAIL_HEIGHT = 256; ///< Height of Thumbnail Image in texels
143 143  
144   -const float SPIN_DURATION = 5.0f; ///< Times to spin an Image by upon touching, each spin taking a second.
  144 +const float SPIN_DURATION = 1.0f; ///< Times to spin an Image by upon touching, each spin taking a second.
145 145  
146 146 const float EFFECT_SNAP_DURATION(0.66f); ///< Scroll Snap Duration for Effects
147 147 const float EFFECT_FLICK_DURATION(0.5f); ///< Scroll Flick Duration for Effects
... ... @@ -613,7 +613,7 @@ private:
613 613 {
614 614 // Spin the Image a few times.
615 615 Animation animation = Animation::New(SPIN_DURATION);
616   - animation.RotateBy( actor, Degree(360.0f * SPIN_DURATION), Vector3::XAXIS, AlphaFunctions::EaseOut);
  616 + animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f * SPIN_DURATION) ), Vector3::XAXIS ), AlphaFunctions::EaseOut );
617 617 animation.Play();
618 618 }
619 619 }
... ...