Last active
August 29, 2020 16:06
-
-
Save dupuyjs/6f00e63fff5468ba1b04 to your computer and use it in GitHub Desktop.
Visual Layer - KeyFrame Animations
This file contains hidden or 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