MotionLang

Spring · The feel of a bounce

Velocity速度继承

The new animation continues from the speed the element actually has right now instead of starting over, so the motion looks continuous.

Open this entry in the tool

When to use it

Use it when the user interrupts an animation in flight; if new animations only start after the previous one finishes, it is unnecessary.

Parameters

read current velocity · pass as spring initial velocity · do not reset to 0

Recipe

  1. Velocity → read current velocity · pass as spring initial velocity · do not reset to 0

One sentence for your AI

Make this animation interruptible: on interruption, read the current velocity and position and feed them in as the initial velocity of a new spring with stiffness 300 and damping 30, instead of restarting from zero.

More in this category