solidjs-motion

createVelocity / createTime

Frame-driver + velocity reader — oscillator that tilts in its direction of motion.

Top: createTime() drives a sine-wave x position;createVelocity() on that x rotates the box — tilting in the direction of motion.
Bottom: click Jump to displace the target. The spring glides to it; the live velocity readout shows the derivative.

time + velocity → oscillator with motion-direction tilt

t (ms): 0
x: 0.0
velocity: 0

spring + velocity readout

target: 0
smooth: 0.0
velocity: 0