Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Particle

Particle is used in a ParticleEmitter

Hierarchy

  • ParticleImpl
    • Particle

Index

Constructors

constructor

Properties

acceleration

acceleration: Vector = new Vector(0, 0)

beginColor

beginColor: Color = Color.White.clone()

currentRotation

currentRotation: number = 0

elapsedMultiplier

elapsedMultiplier: number = 0

emitter

emitter: ParticleEmitter = null

endColor

endColor: Color = Color.White.clone()

endSize

endSize: number

fadeFlag

fadeFlag: boolean = false

focus

focus: Vector = null

focusAccel

focusAccel: number = 0

life

life: number = 300

opacity

opacity: number = 1

particleRotationalVelocity

particleRotationalVelocity: number = 0

particleSize

particleSize: number = 5

particleSprite

particleSprite: Sprite = null

position

position: Vector = new Vector(0, 0)

sizeRate

sizeRate: number = 0

startSize

startSize: number

velocity

velocity: Vector = new Vector(0, 0)

Methods

draw

  • draw(ctx: CanvasRenderingContext2D): void
  • Parameters

    • ctx: CanvasRenderingContext2D

    Returns void

kill

  • kill(): void

update

  • update(delta: number): void
  • Parameters

    • delta: number

    Returns void