Size of one noise cell per axis, in the simulation space.
How many layers of noise are summed; more is finer and dearer.
Push per axis, in units per second squared.
How fast the field drifts per axis, in noise time per second.
Optionalseed: number
The seed the field is built from; 0 by default.
ReadonlyinitialHow many layers of noise are summed; more is finer and dearer.
The seed the field is built from; 0 by default.
Where in time the field is sampled now; starts at initialOffset and drifts by timeScale.
The name the behavior is registered under in BehaviorTypes.
Size of one noise cell per axis, in the simulation space.
Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.
Size of one noise cell per axis, in the simulation space.
Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.
How fast the field drifts per axis, in noise time per second.
Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.
How fast the field drifts per axis, in noise time per second.
Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.
Push per axis, in units per second squared.
Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.
Push per axis, in units per second squared.
Set it from any Vector3Like, such as a Babylon Vector3; the value is copied.
A copy with the same settings that shares nothing mutable with this one.
Called once per step before this behavior updates the particles, with the step's length in seconds.
Called once per particle when it is emitted; see the interface's description for when.
Rewinds the field's drift to where it started, so a restarted system swirls the same way.
The behavior's settings as plain data, with its type; see the interface's description.
Called once per live particle per step, with the step's length in seconds.
Optional bulk form of update, applied to particles[0..count).
The per-particle update is reached through one call site shared by every
behavior type, which leaves it megamorphic: V8 can neither inline it nor
specialise the generator calls inside. A behavior that implements this
instead gets one call per frame and a loop it owns, where those calls are
monomorphic. Implementations must skip dead particles (age >= life)
exactly as the per-particle path does, and must produce identical results.
Behaviors that do not implement it keep working unchanged. A subclass that overrides
update but not updateAll has its update called, not the inherited updateAll.
StaticfromReads TurbulenceField.toJSON output; a field the JSON leaves out takes its default.
Push particles around with a turbulent vector field sampled at their position (Unity's Noise module in its Position mode, Niagara's Curl Noise Force): nearby particles are pushed alike, so the system swirls instead of jittering.
The field is three channels of four-dimensional simplex noise,
octaveslayers deep, each layer twice as fine and half as strong as the one before.scaleis the size of one noise cell per axis in the simulation space (a zero component gives no variation along that axis),velocityMultiplierthe push per axis in units per second squared, andtimeScalehow fast the field drifts per axis. The field is built fromseed, so the same settings give the same field on every run and a clone or a saved copy swirls identically; give each system its own seed for different fields. Applies in every render mode.For each particle wobbling on its own curve instead, or for noise in the rotation, use
Noise.