dot big bang

Developer API
Menu

Class ParticleSystemComponent

All
  • Public
  • Public/Protected
  • All

Hierarchy

Index

Constructors

constructor

Properties

castShadow

castShadow: boolean

Whether the system casts shadows

drag

drag: number

dragEnabled

dragEnabled: boolean

emitterDistribution

emitterShape

Readonly emitterSize

emitterSize: Vector3

Readonly endColor

endColor: Color

endOpacity

endOpacity: number

endSize

endSize: number

faceCamera

faceCamera: boolean
deprecated

faceCamera is deprecated. Please use particleShape instead

gravityEnabled

gravityEnabled: boolean

Readonly gravityVelocity

gravityVelocity: Vector3

Readonly id

id: string

The 36-character identifier string of the Component. The id is unique within the Entity is belongs to. Currently, the same id may be used by another Component on a different Entity.

ignoreFog

ignoreFog: boolean

Whether particles are hidden when inside fog See this.game.renderer.fog for more info on fog

Readonly initialDirection

initialDirection: Euler

initialVelocity

initialVelocity: number

Readonly initialVelocitySpread

initialVelocitySpread: Euler

lifetime

lifetime: number

lifetimeVariation

lifetimeVariation: number

loop

loop: boolean

numParticles

numParticles: number

offset

offset: Vector3

The offset from the Entity origin where the particle system should be rendered. The value of the offset is expressed in the local Entity's space unit.

particleShape

The shape of the particle to be rendered

play

play: boolean

Whether time is automatically progressed by delta time each frame

randomSeed

randomSeed: string

The seed used for any randomness in the system

spawnRate

spawnRate: number
deprecated

spawnRate is deprecated. Please use systemLifetime, numParticles, and startNumParticles instead

Readonly startColor

startColor: Color

startNumParticles

startNumParticles: number

The number of particles spawned when time is 0

startOpacity

startOpacity: number

startSize

startSize: number

systemLifetime

systemLifetime: number

The length of time in seconds it takes the particle count to go from startNumParticles to numParticles

systemType

time

time: number

The time offset of the system in seconds. This affects both systemLifetime and lifetime

Readonly type

The type of the Component.

visible

visible: boolean

Whether the particle system should be rendered or not.

visibleInDepthPass

visibleInDepthPass: boolean

Accessors

entity

  • Gets the Entity the Component is part of. This throws an exception if the Component is not in an Entity. Use the isInEntity property to test for that.

    Returns Entity

game

  • Gets the Game the Component is part of (via the Entity it belongs to). This throws an exception if the Component is not in the game. Use the isInGame property to test for that.

    Returns Game<{ saveData: SaveData<any, any> }>

isInEntity

  • get isInEntity(): boolean
  • Returns true if the Component is part of an Entity.

    Returns boolean

isInGame

  • get isInGame(): boolean
  • Returns true if the Component is part of the Game (via the Entity it belongs to).

    Returns boolean