To test animation modes, a block of code commented out with #if false has been left at the bottom of PreviewForm, which enables keys to change modes and times.
Fix FixConnections always ignoring cached connections because of && false left in during testing.
FixConnections now always creates a cache for an attached index, even if an attachable index wasn't found. This way we don't need to waste time looking for connections that don't exist every call.
Added GeomUtils.PositiveModulus, for getting the non-negative modulus of a value.
Added GeomUtils.InterpolateBezierCurve and GeomUtils.InterpolateBSpline, needed for HMD animations.
HMD animations now support Bezier and BSpline interpolation types.
Rewrote most of the handling for building HMD animation sequences. This helps support curves and fixes a lot of issues with looping and stuttering with the PsyQ models, while somehow managing to not break anything else. By pure luck, the rewrite made the code a lot simplier too.
TODParser now explicitly assigns AnimationType.Common, rather than letting it default to that because the value is 0.
All animation builders in parsers now use TryGetValue, rather than ContainsKey and indexers.
All animation builders now assign FrameDuration = 1 by default.
Added Animation.AssignChildren, which replaces the duplicate code used in all animation builders to assign object children and calculate animation frame count.
Animation.FPS now has a default value of 1f.
AnimationObject now has its own FrameCount property, and a Speed property. This allows objects with different time scales to animate and loop at their own pace.
AnimationBatch now handles all timing (except incrementing the timer). This includes support for new looping modes, reverse modes, and an optional pause time to wait between the end of one loop and the start of the next.
AnimationBatch tracks if an object has finished animating when LoopMode is a Once type.
AnimationBatch timers use doubles rather than floats to avoid issues with float precession.
The rewrite for AnimationBatch handling time is a bit complex and convoluted, but that's mostly due to supporting LoopDelayTime, objects with their own frame counts/speeds, and Mirrored loop modes.
Added Refresh when changing Playing state so that Play/Stop is always the correct text on the button.
"Animation-Object #" text is now 0-indexed to match Sub-Models.
Renamed UpdateAnimationFPS to UpdateAnimationTimerSpeed, so that it's clearer.
Renamed UpdateFrameLabel to UpdateAnimationProgressLabel, so that it's clearer, and tells that it relates to animations.
Made the distinction between the Models and Animations tab clearer. Animations should stop and reset the model when leaving the animation tab. The player should also stop too.
To test animation modes, a block of code commented out with
#if false
has been left at the bottom of PreviewForm, which enables keys to change modes and times.&& false
left in during testing.1f
.