feat(viewer): walk a foldable's hinge to a preset instead of jumping it - #76
Merged
Merged
Conversation
A preset sent the hinge straight to its angle, so the model snapped and the guest saw one jump. The hinge is now walked there over 0.35 to 1 second by distance with a quintic ease, one clock driving the guest and the model, as Siniulator does; a pinch or another preset takes over from the visible pose, and reduce motion still jumps.
A move to a preset drew at about 24 frames a second with hitches: every pose re-measured the framing with probe renders, and in a live window a player churn, a transaction commit, a flush or a world transform read each waited most of a frame behind the render thread. The model now keeps a twin only the probe renders, poses both by hand from the clip's keyframes, measures a move's framing at its two ends and walks the camera between them, reads the camera as placed for hit testing, renders at 60 from construction, and leaves the mid move panel switch and the hidden flat view alone.
The eased move read the Mac's Reduce Motion setting straight from NSWorkspace, and a headless runner reports it on, so CI saw a jump where the tests expected a run. The setting is now a closure the tests pin, with a test for the jump as well.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Choosing cover, half open or fully open walks the hinge to that angle over a moment instead of sending it straight there. The move takes between 0.35 and 1 second by the distance, follows a quintic ease in and out, and one clock drives both the guest's hinge and the model, so the window draws the fold the guest is given. A pinch or another preset takes over from wherever the fold visibly is, reduce motion still jumps, and while a move runs the hinge stream, which only echoes what was just sent, is left alone. The timing and ease are Siniulator's and are credited in the notices.
Closes #69.
Follow-ups: None.