PixiJS Particle Emitter - Rotation
Rotation behavior controls a particle’s starting rotation, rotation speed, and
rotational acceleration.
Parameters
- minStart: number - minimum starting rotation. Think of this as the
emitters rotation. Assuming the particle has an emission speed, the particle
emits in a direction between minStart and maxStart. 0 to to the right,
90 is down, 180 is left, 270 is up.
- maxStart: number - maximum starting rotation.
- minSpeed: number - minimum rotation speed. Rotation speed of the particle
itself, think of it as a frisbee after it is thrown. It starts facing, and
in the direction a person (the emitter) is facing. It then rotates on it’s own
axis according to the spin on launch. The spin is defined by minSpeed
and maxSpeed.
- maxSpeed: number - maximum rotation speed.
- accel: number - constant rotation acceleration applied to the particle.
Makes it spin quicker over it’s lifetime. Can be set to a negative to reverse
initial spin direction.
Rotation Behavior Example:
Rotation Behavior Configuration:
– other configuration excluded for brevity
{
type: "rotation",
config: {
"minStart": 0,
"maxStart": 180,
"minSpeed": 1,
"maxSpeed": 5,
"accel": 10
}
}
PixiJS Particle Emitter: The Unauthorized Manual