Commit 5c9555a60b04f325838d9263eb7c981906503b33
1 parent
1d5b074a
Remove non-public APIs of Animation
Change-Id: Idc8fc2369f01eb7cb96635d15c1600fa3c368934
Showing
9 changed files
with
37 additions
and
35 deletions
demo/dali-table-view.cpp
| @@ -502,8 +502,8 @@ void DaliTableView::Rotate( unsigned int degrees ) | @@ -502,8 +502,8 @@ void DaliTableView::Rotate( unsigned int degrees ) | ||
| 502 | } | 502 | } |
| 503 | 503 | ||
| 504 | mRotateAnimation = Animation::New( ROTATE_ANIMATION_TIME ); | 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 | mRotateAnimation.Play(); | 507 | mRotateAnimation.Play(); |
| 508 | } | 508 | } |
| 509 | 509 | ||
| @@ -622,10 +622,10 @@ bool DaliTableView::OnTilePressed( Actor actor, const TouchEvent& event ) | @@ -622,10 +622,10 @@ bool DaliTableView::OnTilePressed( Actor actor, const TouchEvent& event ) | ||
| 622 | 622 | ||
| 623 | // scale the content actor within the Tile, as to not affect the placement within the Table. | 623 | // scale the content actor within the Tile, as to not affect the placement within the Table. |
| 624 | Actor content = actor.GetChildAt(0); | 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 | mPressedAnimation.Play(); | 629 | mPressedAnimation.Play(); |
| 630 | mPressedAnimation.FinishedSignal().Connect( this, &DaliTableView::OnPressedAnimationFinished ); | 630 | mPressedAnimation.FinishedSignal().Connect( this, &DaliTableView::OnPressedAnimationFinished ); |
| 631 | } | 631 | } |
| @@ -791,7 +791,7 @@ void DaliTableView::InitialiseBackgroundActors( Actor actor ) | @@ -791,7 +791,7 @@ void DaliTableView::InitialiseBackgroundActors( Actor actor ) | ||
| 791 | 791 | ||
| 792 | // Kickoff animation | 792 | // Kickoff animation |
| 793 | Animation animation = Animation::New( Random::Range( 40.0f, 80.0f ) ); | 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 | animation.SetLooping( true ); | 795 | animation.SetLooping( true ); |
| 796 | animation.Play(); | 796 | animation.Play(); |
| 797 | mBackgroundAnimations.push_back( animation ); | 797 | mBackgroundAnimations.push_back( animation ); |
examples/animated-shapes/animated-shapes-example.cpp
| @@ -162,7 +162,7 @@ public: | @@ -162,7 +162,7 @@ public: | ||
| 162 | k0.Add( 1.0f, Vector3( -radius, 0.0f, 0.0f) ); | 162 | k0.Add( 1.0f, Vector3( -radius, 0.0f, 0.0f) ); |
| 163 | animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(10)),k0,AlphaFunctions::EaseInOutSine ); | 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 | animation.SetLooping( true ); | 166 | animation.SetLooping( true ); |
| 167 | animation.Play(); | 167 | animation.Play(); |
| 168 | } | 168 | } |
| @@ -343,7 +343,7 @@ public: | @@ -343,7 +343,7 @@ public: | ||
| 343 | k0.Add( 1.0f, Vector3( -radius*2.0, 0.0f, 0.0f) ); | 343 | k0.Add( 1.0f, Vector3( -radius*2.0, 0.0f, 0.0f) ); |
| 344 | animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(10)),k0,AlphaFunctions::EaseInOutSine ); | 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 | animation.SetLooping( true ); | 347 | animation.SetLooping( true ); |
| 348 | animation.Play(); | 348 | animation.Play(); |
| 349 | } | 349 | } |
examples/dissolve-effect/dissolve-effect-example.cpp
| @@ -303,7 +303,7 @@ void DissolveEffectApp::StartTransition(Vector2 position, Vector2 displacement) | @@ -303,7 +303,7 @@ void DissolveEffectApp::StartTransition(Vector2 position, Vector2 displacement) | ||
| 303 | mAnimation.AnimateTo( Property(mCurrentImageEffect, mCurrentImageEffect.GetDistortionPropertyName()), 1.0f, AlphaFunctions::Linear ); | 303 | mAnimation.AnimateTo( Property(mCurrentImageEffect, mCurrentImageEffect.GetDistortionPropertyName()), 1.0f, AlphaFunctions::Linear ); |
| 304 | 304 | ||
| 305 | mNextImage.SetOpacity(0.0f); | 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 | if(mUseHighPrecision) | 308 | if(mUseHighPrecision) |
| 309 | { | 309 | { |
| @@ -314,7 +314,7 @@ void DissolveEffectApp::StartTransition(Vector2 position, Vector2 displacement) | @@ -314,7 +314,7 @@ void DissolveEffectApp::StartTransition(Vector2 position, Vector2 displacement) | ||
| 314 | } | 314 | } |
| 315 | else | 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 | mAnimation.FinishedSignal().Connect( this, &DissolveEffectApp::OnTransitionCompleted ); | 320 | mAnimation.FinishedSignal().Connect( this, &DissolveEffectApp::OnTransitionCompleted ); |
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
| @@ -468,7 +468,7 @@ public: | @@ -468,7 +468,7 @@ public: | ||
| 468 | { | 468 | { |
| 469 | // Spin the image a few times: | 469 | // Spin the image a few times: |
| 470 | Animation animation = Animation::New(SPIN_DURATION); | 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 | animation.Play(); | 472 | animation.Play(); |
| 473 | 473 | ||
| 474 | // Change the scaling mode: | 474 | // Change the scaling mode: |
examples/motion-blur/motion-blur-example.cpp
| @@ -326,8 +326,9 @@ public: | @@ -326,8 +326,9 @@ public: | ||
| 326 | { | 326 | { |
| 327 | // has parent so we expect it to be on stage, start animation | 327 | // has parent so we expect it to be on stage, start animation |
| 328 | mRotateAnimation = Animation::New( ORIENTATION_DURATION ); | 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 | mRotateAnimation.Play(); | 332 | mRotateAnimation.Play(); |
| 332 | } | 333 | } |
| 333 | else | 334 | else |
| @@ -386,7 +387,7 @@ public: | @@ -386,7 +387,7 @@ public: | ||
| 386 | { | 387 | { |
| 387 | float animDuration = 1.0f; | 388 | float animDuration = 1.0f; |
| 388 | mActorAnimation = Animation::New(animDuration); | 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 | mActorAnimation.SetEndAction( Animation::Bake ); | 391 | mActorAnimation.SetEndAction( Animation::Bake ); |
| 391 | mActorAnimation.Play(); | 392 | mActorAnimation.Play(); |
| 392 | } | 393 | } |
| @@ -397,7 +398,7 @@ public: | @@ -397,7 +398,7 @@ public: | ||
| 397 | { | 398 | { |
| 398 | float animDuration = 1.0f; | 399 | float animDuration = 1.0f; |
| 399 | mActorAnimation = Animation::New(animDuration); | 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 | mActorAnimation.SetEndAction( Animation::Bake ); | 402 | mActorAnimation.SetEndAction( Animation::Bake ); |
| 402 | mActorAnimation.Play(); | 403 | mActorAnimation.Play(); |
| 403 | } | 404 | } |
| @@ -408,8 +409,8 @@ public: | @@ -408,8 +409,8 @@ public: | ||
| 408 | { | 409 | { |
| 409 | float animDuration = 1.0f; | 410 | float animDuration = 1.0f; |
| 410 | mActorAnimation = Animation::New(animDuration); | 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 | mActorAnimation.SetEndAction( Animation::Bake ); | 414 | mActorAnimation.SetEndAction( Animation::Bake ); |
| 414 | mActorAnimation.Play(); | 415 | mActorAnimation.Play(); |
| 415 | } | 416 | } |
| @@ -420,7 +421,7 @@ public: | @@ -420,7 +421,7 @@ public: | ||
| 420 | { | 421 | { |
| 421 | float animDuration = 1.0f; | 422 | float animDuration = 1.0f; |
| 422 | mActorAnimation = Animation::New(animDuration); | 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 | mActorAnimation.SetEndAction( Animation::Bake ); | 425 | mActorAnimation.SetEndAction( Animation::Bake ); |
| 425 | mActorAnimation.Play(); | 426 | mActorAnimation.Play(); |
| 426 | } | 427 | } |
examples/motion-stretch/motion-stretch-example.cpp
| @@ -218,8 +218,9 @@ public: | @@ -218,8 +218,9 @@ public: | ||
| 218 | { | 218 | { |
| 219 | // has parent so we expect it to be on stage, start animation | 219 | // has parent so we expect it to be on stage, start animation |
| 220 | mRotateAnimation = Animation::New( ORIENTATION_DURATION ); | 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 | mRotateAnimation.Play(); | 224 | mRotateAnimation.Play(); |
| 224 | } | 225 | } |
| 225 | else | 226 | else |
| @@ -277,7 +278,7 @@ public: | @@ -277,7 +278,7 @@ public: | ||
| 277 | { | 278 | { |
| 278 | float animDuration = 1.0f; | 279 | float animDuration = 1.0f; |
| 279 | mActorAnimation = Animation::New(animDuration); | 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 | mActorAnimation.SetEndAction( Animation::Bake ); | 282 | mActorAnimation.SetEndAction( Animation::Bake ); |
| 282 | mActorAnimation.Play(); | 283 | mActorAnimation.Play(); |
| 283 | } | 284 | } |
| @@ -288,7 +289,7 @@ public: | @@ -288,7 +289,7 @@ public: | ||
| 288 | { | 289 | { |
| 289 | float animDuration = 1.0f; | 290 | float animDuration = 1.0f; |
| 290 | mActorAnimation = Animation::New(animDuration); | 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 | mActorAnimation.SetEndAction( Animation::Bake ); | 293 | mActorAnimation.SetEndAction( Animation::Bake ); |
| 293 | mActorAnimation.Play(); | 294 | mActorAnimation.Play(); |
| 294 | } | 295 | } |
| @@ -299,8 +300,8 @@ public: | @@ -299,8 +300,8 @@ public: | ||
| 299 | { | 300 | { |
| 300 | float animDuration = 1.0f; | 301 | float animDuration = 1.0f; |
| 301 | mActorAnimation = Animation::New(animDuration); | 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 | mActorAnimation.SetEndAction( Animation::Bake ); | 305 | mActorAnimation.SetEndAction( Animation::Bake ); |
| 305 | mActorAnimation.Play(); | 306 | mActorAnimation.Play(); |
| 306 | } | 307 | } |
| @@ -311,7 +312,7 @@ public: | @@ -311,7 +312,7 @@ public: | ||
| 311 | { | 312 | { |
| 312 | float animDuration = 1.0f; | 313 | float animDuration = 1.0f; |
| 313 | mActorAnimation = Animation::New(animDuration); | 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 | mActorAnimation.SetEndAction( Animation::Bake ); | 316 | mActorAnimation.SetEndAction( Animation::Bake ); |
| 316 | mActorAnimation.Play(); | 317 | mActorAnimation.Play(); |
| 317 | } | 318 | } |
examples/radial-menu/radial-menu-example.cpp
| @@ -189,8 +189,8 @@ void RadialMenuExample::StartAnimation() | @@ -189,8 +189,8 @@ void RadialMenuExample::StartAnimation() | ||
| 189 | mRadialSweepView1.Activate(mAnimation, 0.0f, 3.0f); | 189 | mRadialSweepView1.Activate(mAnimation, 0.0f, 3.0f); |
| 190 | mRadialSweepView2.Activate(mAnimation, 1.5f, 3.0f); | 190 | mRadialSweepView2.Activate(mAnimation, 1.5f, 3.0f); |
| 191 | mRadialSweepView3.Activate(mAnimation, 3.0f, 3.0f); | 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 | mAnimation.FinishedSignal().Connect( this, &RadialMenuExample::OnAnimationFinished ); | 194 | mAnimation.FinishedSignal().Connect( this, &RadialMenuExample::OnAnimationFinished ); |
| 195 | 195 | ||
| 196 | mAnimationState = PLAYING; | 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,13 +280,13 @@ void RadialSweepViewImpl::Activate( Animation anim, float offsetTime, float dura | ||
| 280 | Actor actor = mLayer.GetChildAt(i); | 280 | Actor actor = mLayer.GetChildAt(i); |
| 281 | if( actor != mStencilActor ) | 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 | if( mRotateActorsWithStencil ) | 291 | if( mRotateActorsWithStencil ) |
| 292 | { | 292 | { |
| @@ -295,7 +295,7 @@ void RadialSweepViewImpl::Activate( Animation anim, float offsetTime, float dura | @@ -295,7 +295,7 @@ void RadialSweepViewImpl::Activate( Animation anim, float offsetTime, float dura | ||
| 295 | Actor actor = mLayer.GetChildAt(i); | 295 | Actor actor = mLayer.GetChildAt(i); |
| 296 | if( actor != mStencilActor ) | 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,7 +306,7 @@ void RadialSweepViewImpl::Activate( Animation anim, float offsetTime, float dura | ||
| 306 | Actor actor = mLayer.GetChildAt(i); | 306 | Actor actor = mLayer.GetChildAt(i); |
| 307 | if( actor != mStencilActor ) | 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); ///< Rotation Anch | @@ -141,7 +141,7 @@ const Vector3 ANCHOR_3DEFFECT_STYLE1(65.0f, -70.0f, -300.0f); ///< Rotation Anch | ||
| 141 | const unsigned int IMAGE_THUMBNAIL_WIDTH = 256; ///< Width of Thumbnail Image in texels | 141 | const unsigned int IMAGE_THUMBNAIL_WIDTH = 256; ///< Width of Thumbnail Image in texels |
| 142 | const unsigned int IMAGE_THUMBNAIL_HEIGHT = 256; ///< Height of Thumbnail Image in texels | 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 | const float EFFECT_SNAP_DURATION(0.66f); ///< Scroll Snap Duration for Effects | 146 | const float EFFECT_SNAP_DURATION(0.66f); ///< Scroll Snap Duration for Effects |
| 147 | const float EFFECT_FLICK_DURATION(0.5f); ///< Scroll Flick Duration for Effects | 147 | const float EFFECT_FLICK_DURATION(0.5f); ///< Scroll Flick Duration for Effects |
| @@ -613,7 +613,7 @@ private: | @@ -613,7 +613,7 @@ private: | ||
| 613 | { | 613 | { |
| 614 | // Spin the Image a few times. | 614 | // Spin the Image a few times. |
| 615 | Animation animation = Animation::New(SPIN_DURATION); | 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 | animation.Play(); | 617 | animation.Play(); |
| 618 | } | 618 | } |
| 619 | } | 619 | } |