Constructs a Spring behaviour instance.
X axis spring
Y axis spring
Z axis spring
Spring factor
Spring friction
Optionallife: number
The life of the behaviour
Optionaleasing: EasingFunction
The easing equation to use for transforms
Determines if the behaviour will be applied or not
Gets the behaviour's life.
Ensures that life is infinity if an invalid value is supplied.
AbstractdestroyDestroy this behaviour.
Compares the age of the behaviour vs integration time and determines if the behaviour should be set to dead or not.
Optionalindex: numberAbstractfromReturns a new instance of the behaviour from the JSON object passed.
AbstractinitializeApplies the behaviour to the particle. Mutates the particle's velocity according to this.pos and this.spring.
the particle to apply the behaviour to
engine time
Optionalindex: number
the particle index
Normalize a value by 1:100.
Resets the behaviour properties.
X axis spring
Y axis spring
Z axis spring
Spring factor
Spring friction
StaticfromReturns a new instance of the behaviour from the JSON object passed.
JSON object containing the required constructor properties
Behaviour that causes particles to spring.