Build a ParticleComponent
Optionalangle?: numberThe direction (radians) particles are emitted toward, relative to the anchor's own rotation. Default 0 ("forward").
Optionalcolors?: (string | number)[]Colors to choose from, per-particle (hex numbers or CSS strings)
Optionalfade?: booleanShould particles fade out over their lifetime? (default true)
Optionalimg?: stringOptional image to use for each particle (defaults to a plain dot, tinted per-particle)
Optionallifetime?: { max: number; min: number }Range (seconds) of how long a particle lives before disappearing
Optionaloffset?: JLOffsetAn offset between the emission point and the RigidBody's center
Optionalsize?: { max: number; min: number }Range (meters) of how big a particle is
Optionalspeed?: { max: number; min: number }Range (meters/second) of how fast a particle moves outward
Optionalspread?: numberThe total angle (radians) of spread around
angle. Default 2*PI (all directions).
Optionalz?: 0 | 1 | 2 | 4 | -4 | 3 | -3 | -2 | -1An optional z index in the range [-4,4]
OptionalactorThe Actor to which this ParticleComponent is attached
Height is a dummy value. We can't know how big the system gets, but AppearanceComponent needs a height, so we just use twice the max size as an estimate
An offset between the emission point and the RigidBody's center
Width is a dummy value. We can't know how big the system gets, but AppearanceComponent needs a width, so we just use twice the max size as an estimate
Z index of the whole particle system: Must be in the range [-4, 4]
Emit count particles all at once, e.g. for an impact or a collection effect
Start continuously emitting particles, e.g. for a torch or a thruster
Stop continuously emitting particles. Already-alive particles finish out their lifetimes normally.
ParticleComponent is an AppearanceComponent that draws a batch of small, short-lived "particles" (for things like impact bursts or torch/thruster effects), all emanating from its Actor's RigidBody.