Beispiel #1
0
        /// <summary>Runs the current frame.</summary>
        private void Run()
        {
            // Get the frame:
            KeyframesKeyframe frame = RawAnimation.GetFrame(CurrentFrame);

            float duration;

            if (Backwards)
            {
                duration = Duration * frame.AfterDelay;
            }
            else
            {
                duration = Duration * frame.BeforeDelay;
            }

            // The function to use:
            Blaze.VectorPath path = null;

            if (TimingFunction != null)
            {
                // Get the defined vector path:
                path = TimingFunction.GetPath(
                    Style.RenderData,
                    Css.Properties.AnimationTimingFunction.GlobalProperty
                    );
            }

            if (path == null)
            {
                // Use ease:
                path = Css.Keywords.Ease.SharedPath;
            }

            // Create the UI animation:
            Animation = new UIAnimation(Style.Element, frame.Style, duration, path);

            // Add ondone callback:
            Animation.OnDone(Advance);
        }