Particles. Particle

Particle Object - Created automatically by Particle Emitters

Constructor

new Particle(emitter, pos, angle, colorStart, colorEnd, lifeTime, sizeStart, sizeEnd, velocityopt, angleVelocityopt)

Create a particle with the passed in settings Typically this is created automatically by a ParticleEmitter

Parameters:
NameTypeAttributesDefaultDescription
emitterParticleEmitter

The emitter that created this particle

posVector2

World or local space position

anglenumber

Angle of the particle

colorStartColor

Color at start of life

colorEndColor

Color at end of life

lifeTimenumber

How long to live for

sizeStartnumber

Size at start of life

sizeEndnumber

Size at end of life

velocityVector2<optional>

Velocity of the particle

angleVelocitynumber<optional>
0

Angular speed of the particle

Members

angle

Properties
TypeDescription
number

angleVelocity

Properties
TypeDescription
number

color

Properties
TypeDescription
Color

colorEnd

Properties
TypeDescription
Color

colorStart

Properties
TypeDescription
Color

destroyed

Properties
TypeDescription
boolean

emitter

Properties
TypeDescription
ParticleEmitter

groundObject

Properties
TypeDescription
EngineObject

lifeTime

Properties
TypeDescription
number

mirror

Properties
TypeDescription
boolean

pos

Properties
TypeDescription
Vector2

size

Properties
TypeDescription
Vector2

sizeEnd

Properties
TypeDescription
number

sizeStart

Properties
TypeDescription
number

spawnTime

Properties
TypeDescription
number

tileInfo

Properties
TypeDescription
TileInfo

velocity

Properties
TypeDescription
Vector2

Methods

destroy()

Destroy this particle

render()

Render the particle, automatically called each frame

update()

Update the particle