-
-
Save sukesh-ak/e26e89e14d82816fd97b2a1afe14bb54 to your computer and use it in GitHub Desktop.
Visual Layer - KeyFrame Animations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region KeyFrame Animations | |
ScalarKeyFrameAnimation keyframeAnimation = _compositor.CreateScalarKeyFrameAnimation(); | |
keyframeAnimation.InsertKeyFrame(0.0f, 0.0f); // Optional | |
keyframeAnimation.InsertKeyFrame(1.0f, 360.0f, _compositor.CreateLinearEasingFunction()); | |
keyframeAnimation.Duration = TimeSpan.FromSeconds(3); | |
keyframeAnimation.IterationBehavior = AnimationIterationBehavior.Forever; | |
foreground.CenterPoint = new Vector3(150.0f, 150.0f, 0.0f); | |
foreground.StartAnimation("RotationAngleInDegrees", keyframeAnimation); | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment