The single particle object

Hierarchy

  • Particle

Implements

Constructors

Properties

#engine: Engine

Gets the particle containing engine instance

backColor?: IHsl

Particles back color

Gets particles bubble data

close: boolean

Checks if the particle shape needs a closed path

Gets the particle color options

container: Container
destroyed: boolean

Checks if the particle is destroyed

direction: number

Gets particle direction, the value is an angle in rad

fill: boolean

Checks if the particle shape needs to be filled with a color

group?: string
id: number
ignoresResizeRatio: boolean

When this is enabled, the particle won't resize when the canvas resize event is fired

initialPosition: Vector

Gets particle initial position

initialVelocity: Vector

Gets particle initial velocity

interactivity: Interactivity
lastPathTime: number

Last path timestamp

misplaced: boolean

Check if the particle needs a fix on the position

moveCenter: ICoordinates & { radius: number }
moveDecay: number

Gets particle movement speed decay

offset: Vector

Gets particle offset position, used for parallax interaction

Gets the particle opacity options

Gets the particle options

pathDelay: number

Gets the delay for every path step

pathGenerator?: IMovePathGenerator

Gets the particle's path generator

position: Vector3d

Gets particle current position

randomIndexData?: number

The random index used by the particle

Gets the particle retina values

Gets the particle roll options

rotation: number

Gets the particle rotation angle

shadowColor: undefined | IRgb

Gets particle shadow color

shape: string

Gets particle shape type

shapeData?: IShapeValues

Gets particle shape options

sides: number

Gets the particle side count

Gets particle size options

spawning: boolean

Check if the particle is spawning, and can't be touched

splitCount: number

Sets the count of particles created when destroyed with split mode

stroke?: Stroke

Gets the particle stroke options

strokeColor?: IParticleHslAnimation

Sets the particle stroke color

strokeWidth?: number

Sets the particle stroke width

unbreakable: boolean

Checks if the particle is unbreakable, if true the particle won't destroy on collisions

velocity: Vector

Gets particle current velocity

Gets the particle wobble options

zIndexFactor: number

Gets the particle Z-Index factor

Methods

  • Parameters

    Returns boolean

  • Parameters

    • Optional override: boolean

    Returns void

  • Parameters

    Returns void

  • Parameters

    • shapeOptions: IShape
    • reduceDuplicates: boolean

    Returns undefined | IShapeValues

  • This method is used when the particle has lost a life and needs some value resets

    Returns void

  • Returns void