scrollSpring(strength, spring_acc, spring_vdamp) scrollSpring.messages =  scrollSpring.events = 
Causes the element to 'spring' (shake) in 2D space around its position when the browser's viewport moves.
This controller does not use the physics engine,
and so it doesn't need a
slow() controller -
it has its own velocity damping regulated via parameter
Visit page Controller # Common Parameters for documentation on the parameters, common to all controllers:
- The 'spring' is pulled with an amount proportional to the window's scrolling step multiplied by this parameter. Larger values result is bigger amplitude of movement. Negative values result in 'pulling' in the opposite direction. Default value: 1
This parameter regulates how fast the spring moves.
A larger value results in faster movement.
Note that setting too high of a value will cause a self-amplifying spring movement.
What is the highest value before the positive feedback kicks in depends on the value of
spring_vdamp, but values up to
2are always safe. Default value: 0.1
Every frame the current speed of the spring is multiplied by this parameter, effectively slowing the movement.
1are reasonable, where smaller values result in faster dying of the movement and a value of
1means absolute elasticity of the spring. Default value: 0.8
Visit page Controller # Common Messages for documentation on the messages, accepted by all controllers:
Messages specific to
Visit page Controller # Common Events for documentation on the events, generated by all controllers:
Events specific to
Interaction with DOM
- Transforms: Applies one
- CSS: Works with any styling. Does not set any style properties.
- Events: Does not set event listeners.
- Controller introduced in v.0.80