1 /*! \page animation-shader Shader Effect Animation
4 The uniforms of a shader can be animated using the Animation::AnimateTo functions.
6 For example, to animate the center point of the Bendy shader effect:
8 Dali::Animation animation = Dali::Animation::New( 1.0f );
10 Vector2 newPosition( 0.0f, 0.0f );
11 animation.AnimateTo( Property(shaderEffect, shaderEffect.GetPositionPropertyName()), newPosition );
14 To animate a uniform of a custom shader effect, the developer must use the name of the uniform:
16 Dali::Animation animation = Dali::Animation::New( 1.0f );
18 // Set the initial value for the uniform
19 shaderEffect.SetUniform( "myUniform", -0.5f );
21 // Animate the uniform to a value
22 animation.AnimateTo( Property(shaderEffect, "myUniform"), 0.5f );