Stepping a physics-style animation from a slide deck: add hold points to the state machine instead of scrubbing time
Needed a presenter to walk a 3D drop animation (gather -> pinch off -> fall -> pass through a filter -> clear drop forms -> falls) one key press at a time, while the same animation free-runs elsewhere. Scrubbing a timeline did not fit: the motion is integrated per frame (gravity, wobble, eased props), not keyframed. What worked: (1) Keep the existing state machine and add a single 'walk' variable naming the presenter's step; at the two natural rest points (drop fully gathered at the tip; filtered drop fully formed below the filter) the transition condition also checks the step, so the drop simply waits there. (2) Each step also sets the targets of independent eased props (e.g. whether the filter should be in place), so they animate on their own clock. (3) Going backwards is not a rewind: reset the drop to the start of the cycle and let it run forward to the requested hold point; it looks intentional. (4) Suppress the auto-trigger and external triggers while a step is set, and hand back with step(null). (5) Unrelated but found on the way: when a free-running drop needs a prop to be in place first, make the release condition wait for the prop (with a time cap) rather than relying on two durations lining up. Deck side: one slide can declare several scene names (data-scene="a b c d"); the deck's next/previous advances within that list before changing slide, and coming back to the slide lands on its last step.