Constructs an Repulsion behaviour instance.
The position the particles will be repelled from
The repulsion force scalar multiplier
The repulsion radius
Optionallife: number
The life of the particle
Optionaleasing: EasingFunction
The behaviour's decaying trend
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.
AbstractinitializeMutates particle acceleration.
the particle to apply the behaviour to
particle engine time
Optionalindex: number
the particle index
Normalize a value by 1:100.
Resets the behaviour properties.
the position the particles will be attracted to
the attraction force multiplier
the attraction radius
Optionallife: number
the life of the particle
Optionaleasing: EasingFunction
The behaviour's decaying trend
StaticfromCreates a Body initializer from JSON.
The JSON to construct the instance from.
Behaviour that causes particles to be repelled from a target position.