Module: particle_system

Particle physics support for velocity, acceleration, and collision of particles with RigidShapes

Found in Chapter 10, page 648 of the textbook

Examples: 10.1 Particles, 10.2 Particles Colliding with Rigid Shapes, 10.3 Particle Emitters
Source:

Methods

(static) getSystemAcceleration() → {vec2}

Returns the acceleration vector for the system
Source:
Returns:
the system acceleration
Type
vec2

(static) init()

Initialize the Transform, RigidCircle, and CollisionInfo for the particle system
Source:

(static) resolveRigidShapeCollision(obj, pSet) → {boolean}

Resolve collisions between a GameObject and each Particle within a ParticleSet
Parameters:
Name Type Description
obj GameObject the GameObject to collide against
pSet ParticleSet the ParticleSet to collide with
Source:
Returns:
true if a collision occured for
Type
boolean

(static) resolveRigidShapeSetCollision(objSet, pSet) → {boolean}

Resolve collisions between each GameObject in a GameObjectSet and each Particle within a ParticleSet
Parameters:
Name Type Description
objSet GameObjectSet the GameObjectSet to collide against
pSet ParticleSet the ParticleSet to collide with
Source:
Returns:
true if a collision occured
Type
boolean

(static) setSystemAcceleration(x, y)

Set the particle system acceleration
Parameters:
Name Type Description
x float the acceleration in the x direction
y float the acceleration in the y direction
Source: