Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Particle

An abstract class representing a rendered particle.

export
abstract
class

Particle

Hierarchy

Index

Properties

engineParticle

engineParticle: EngineParticle | undefined

The underlying EngineParticle.

type

{(EngineParticle | undefined)}

memberof

Particle

id

id: number = getId()

The unique id of the Particle.

memberof

Particle

individualHeight

individualHeight: number = 0

individualWidth

individualWidth: number = 0

parent

parent: ParticleGroup | undefined

The parent ParticleGroup.

type

{(ParticleGroup | undefined)}

memberof

Particle

Accessors

height

  • get height(): number
  • The height of the Particle.

    readonly
    memberof

    Particle

    Returns number

width

  • get width(): number
  • The width of the Particle.

    readonly
    memberof

    Particle

    Returns number

Methods

draw

  • draw(): void
  • Draws the Particle and subsequently calls drawCore passing in the coordinates.

    memberof

    Particle

    Returns void

Abstract drawCore

  • drawCore(x1: number, y1: number, x2: number, y2: number): void
  • An abstract method that must be implemented to perform the actual drawing of the Particle.

    abstract
    memberof

    Particle

    Parameters

    • x1: number
    • y1: number
    • x2: number
    • y2: number

    Returns void

remove

  • remove(): void
  • Removes this Particle from its parent ParticleGroup.

    memberof

    Particle

    Returns void

Generated using TypeDoc