Constructs a Vortex behaviour instance.
A point on the swirl axis
The axis particles swirl around (normalised internally)
Tangential force scalar (orbit speed)
Radial force scalar: inward (+) / outward (−)
Radial falloff exponent; force scales by 1 / dist^falloff
The life of the behaviour
The behaviour's decaying trend
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.
AbstractinitializeMutates the particle's velocity, swirling it around the axis.
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.
Optionallife: numberOptionaleasing: EasingFunctionStaticfromCreates a Vortex behaviour from JSON.
The JSON to construct the instance from.
Behaviour that swirls particles around an axis — a coherent tangential flow field, with an optional inward/outward pull, for vortices, spell charge-ups, tornados and orbiting motes.
Unlike the radial point forces (
Attraction/Repulsion), the swirl direction is the tangent around the axis (axis × radial), so particles orbit rather than converge. The force is applied to the particle's velocity (not acceleration), so it is not subject to theForce1:100 (MEASURE) scaling — magnitudes are intuitive (tuneswirl/pullin the hundreds). Deterministic by construction (no randomness).