Lerp() public method

public Lerp ( double startFrame, double duration, double currentFrame ) : AnimationFrame
startFrame double
duration double
currentFrame double
return AnimationFrame
Esempio n. 1
0
        void AddSorted(AnimationEntry entry, double startFrame, double duration, double frame)
        {
            var frameAmount = (float)((frame - startFrame) / duration);
            var node        = entry.Frames.Nodes().LastOrDefault(_ => _.Value.FrameAmount > frameAmount) ?? entry.Frames.Last;

            entry.Frames.AddBefore(node, new AnimationFrame(frameAmount, entry.Lerp(startFrame, duration, frame).Value));
        }
        void AddSorted(AnimationEntry entry, double startFrame, double duration, double frame)
        {
            var frameAmount = (float)((frame - startFrame) / duration);
            var node = entry.Frames.Nodes().LastOrDefault(_ => _.Value.FrameAmount > frameAmount) ?? entry.Frames.Last;

            entry.Frames.AddBefore(node, new AnimationFrame(frameAmount, entry.Lerp(startFrame, duration, frame).Value));
        }