Options
All
  • Public
  • Public/Protected
  • All
Menu

The core particle emitter component. Adding this component to an entity turns the entity into an emitter with the specified characteristics. You can add other components (for example, EmitterInitialScale, EmitterConeSource, and so on) to the same entity after the initial emission to further control how particles are emitted.

Hierarchy

Index

Constructors

constructor

  • new ParticleEmitter(particle?: Entity, maxParticles?: number, emitRate?: number, lifetime?: Range, attachToEmitter?: boolean): ParticleEmitter
  • Parameters

    • Optional particle: Entity
    • Optional maxParticles: number
    • Optional emitRate: number
    • Optional lifetime: Range
    • Optional attachToEmitter: boolean

    Returns ParticleEmitter

Properties

attachToEmitter

attachToEmitter: boolean

Specifies whether the Transform of the emitted particles is a child of this emitter.

If true, the emission position is set to the entity's local position, and the particle is added as a child transform.

If false, the emitter's world position is added to the emission position, and that result set as the local position.

emitRate

emitRate: number

Number of particles per second to emit.

lifetime

lifetime: Range

Lifetime of each particle, in seconds.

maxParticles

maxParticles: number

Maximum number of particles to emit.

particle

particle: Entity

Static _isSharedComp

_isSharedComp: boolean

Static _size

_size: number

Static _view

_view: any

Static attachToEmitter

attachToEmitter: ComponentFieldDesc

Static cid

cid: number

Static emitRate

Static lifetime

Static particle

particle: EntityComponentFieldDesc

Methods

Static _dtorFn

  • Parameters

    Returns void

Static _fromPtr

Static _tempHeapPtr

  • Parameters

    Returns number

Static _toPtr

  • Parameters

    Returns void

Generated using TypeDoc