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 GetValueSet(AnimationEntryControl control, AnimationEntry entry) { var pair = entry.GetBeginEndFramePair(this.Caption.StartFrame, this.Caption.DurationFrame, this.CurrentFrame); var valueSet = new[] { pair.First().Value, pair.Last().Value }; if (control.BeginValue != valueSet[0]) { control.BeginValue = valueSet[0]; } if (control.EndValue != valueSet[1]) { control.EndValue = valueSet[1]; } if (entry.Mode != control.Mode) { control.Mode = entry.Mode; } if (entry.EaseIn != control.EaseIn) { control.EaseIn = entry.EaseIn; } if (entry.EaseOut != control.EaseOut) { control.EaseOut = entry.EaseOut; } if (entry.IterationDuration != control.IterationDuration) { control.IterationDuration = entry.IterationDuration; } }
public AnimationData() { this.X = new AnimationEntry(); this.Y = new AnimationEntry(); this.Alpha = new AnimationEntry(); this.Rotation = new AnimationEntry(); this.FontSize = new AnimationEntry(); this.LineSpacing = new AnimationEntry(); this.LetterSpacing = new AnimationEntry(); this.ShadowDistance = new AnimationEntry(); }
public static AnimationData Parse(byte version, BinaryReader br) { return(new AnimationData { Id = br.ReadInt32(), X = AnimationEntry.Parse(version, br), Y = AnimationEntry.Parse(version, br), Alpha = AnimationEntry.Parse(version, br), Rotation = AnimationEntry.Parse(version, br), FontSize = AnimationEntry.Parse(version, br), LineSpacing = AnimationEntry.Parse(version, br), LetterSpacing = AnimationEntry.Parse(version, br), ShadowDistance = AnimationEntry.Parse(version, br), }); }
void SetValueSet(AnimationEntryControl control, AnimationEntry entry) { if (entry.Mode != control.Mode) { entry.Mode = control.Mode; } if (entry.EaseIn != control.EaseIn) { entry.EaseIn = control.EaseIn; } if (entry.EaseOut != control.EaseOut) { entry.EaseOut = control.EaseOut; } if (entry.IterationDuration != control.IterationDuration) { entry.IterationDuration = control.IterationDuration; } entry.SetBeginEndFramePair(this.Caption.StartFrame, this.Caption.DurationFrame, this.CurrentFrame, new[] { control.BeginValue, entry.Mode == AnimationMode.None ? control.BeginValue : control.EndValue }); }
void SetValueSet(AnimationEntryControl control, AnimationEntry entry) { if (entry.Mode != control.Mode) entry.Mode = control.Mode; if (entry.EaseIn != control.EaseIn) entry.EaseIn = control.EaseIn; if (entry.EaseOut != control.EaseOut) entry.EaseOut = control.EaseOut; if (entry.IterationDuration != control.IterationDuration) entry.IterationDuration = control.IterationDuration; entry.SetBeginEndFramePair(this.Caption.StartFrame, this.Caption.DurationFrame, this.CurrentFrame, new[] { control.BeginValue, entry.Mode == AnimationMode.None ? control.BeginValue : control.EndValue }); }
void GetValueSet(AnimationEntryControl control, AnimationEntry entry) { var pair = entry.GetBeginEndFramePair(this.Caption.StartFrame, this.Caption.DurationFrame, this.CurrentFrame); var valueSet = new[] { pair.First().Value, pair.Last().Value }; if (control.BeginValue != valueSet[0]) control.BeginValue = valueSet[0]; if (control.EndValue != valueSet[1]) control.EndValue = valueSet[1]; if (entry.Mode != control.Mode) control.Mode = entry.Mode; if (entry.EaseIn != control.EaseIn) control.EaseIn = entry.EaseIn; if (entry.EaseOut != control.EaseOut) control.EaseOut = entry.EaseOut; if (entry.IterationDuration != control.IterationDuration) control.IterationDuration = entry.IterationDuration; }