Function createSpringSignal

  • Creates a signal whose value is updated by a spring simulations. The simulation is run on every frame until the spring comes to a rest. You can set the target value to reach at any time, when the spring is moving or at rest. This allows for the creation of natural motion when interrupting an animation.

    Parameters

    Returns readonly [value: Accessor<number>, set_value: Setter<number>, velocity: Accessor<number>]