Class ParticleSystem

ParticleSystem represents a system that generates and controls particles with similar attributes.

Implements

Constructors

Properties

_renderer?: BatchedRenderer
autoDestroy: boolean

Determines whether the ParticleSystem should be automatically disposed when it finishes emitting particles.

duration: number

The duration of the ParticleSystem in seconds.

emissionBursts: BurstParameters[]

An array of burst parameters for the ParticleSystem.

emissionOverDistance: ValueGenerator | FunctionValueGenerator

The value generator or function value generator for the emission rate of particles over distance.

The value generator or function value generator for the emission rate of particles over time.

emissionState: EmissionState
emitter: ParticleEmitter<Object3DEventMap>

the emitter object that should be added in the scene.

emitterShape: EmitterShape

the shape of the emitter.

looping: boolean

Determines whether the ParticleSystem should loop, i.e., restart emitting particles after the duration of the particle system is expired.

neededToUpdateRender: boolean

whether needs to update renderer settings for the batch renderer

onlyUsedByOther: boolean

Determines whether the ParticleSystem is only used by other ParticleSystems.

particleNum: number

The number of particles in the ParticleSystem.

particles: Particle[]

All the particles in the ParticleSystem.

paused: boolean

Determines whether the ParticleSystem is paused.

prewarm: boolean

Determines whether a looping ParticleSystem should prewarm, i.e., the Particle System looks like it has already simulated for one loop when first becoming visible.

rendererEmitterSettings: RendererEmitterSettings

The renderer emitter settings for the ParticleSystem.

rendererSettings: VFXBatchSettings

the VFX renderer settings for the batch renderer

signal: {
    onEnd: Signal;
    onPause: Signal;
    onPlay: Signal;
    onRestart: Signal;
} = ...

Type declaration

simulations: Simulation[]

a list of particle simulations in the particle system

The color generator or function color generator for the starting color of particles.

The value generator or function value generator for the starting life of particles.

The value generator or function value generator or rotation generator for the starting rotation of particles.

The value generator or function value generator for the starting size of particles.

The value generator or function value generator for the starting speed of particles.

startTileIndex: ValueGenerator

The value generator for the starting tile index of particles.

worldSpace: boolean

Determines whether the ParticleSystem is in world space or local space.

Accessors

  • get blendTiles(): boolean
  • Returns boolean

  • set blendTiles(v): void
  • Parameters

    • v: boolean

    Returns void

  • get blending(): Blending
  • Returns Blending

  • set blending(blending): void
  • Parameters

    • blending: Blending

    Returns void

  • get layers(): Layers
  • Returns Layers

  • get material(): Material
  • Returns Material

  • set material(material): void
  • Parameters

    • material: Material

    Returns void

  • get renderOrder(): number
  • Returns number

  • set renderOrder(renderOrder): void
  • Parameters

    • renderOrder: number

    Returns void

  • get softFarFade(): number
  • Returns number

  • set softFarFade(v): void
  • Parameters

    • v: number

    Returns void

  • get softNearFade(): number
  • Returns number

  • set softNearFade(v): void
  • Parameters

    • v: number

    Returns void

  • get softParticles(): boolean
  • Returns boolean

  • set softParticles(v): void
  • Parameters

    • v: boolean

    Returns void

  • get texture(): Texture
  • Returns Texture

  • set texture(texture): void
  • Parameters

    • texture: Texture

    Returns void

  • get time(): number
  • Returns number

  • set time(time): void
  • Parameters

    • time: number

    Returns void

  • get uTileCount(): number
  • Returns number

  • set uTileCount(u): void
  • Parameters

    • u: number

    Returns void

  • get vTileCount(): number
  • Returns number

  • set vTileCount(v): void
  • Parameters

    • v: number

    Returns void

Methods

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Returns void

  • Parameters

    • json: ParticleSystemJSONParameters
    • meta: {
          geometries: {
              [uuid: string]: BufferGeometry;
          };
          materials: {
              [uuoid: string]: Material;
          };
          textures: {
              [uuid: string]: Texture;
          };
      }
      • geometries: {
            [uuid: string]: BufferGeometry;
        }
        • [uuid: string]: BufferGeometry
      • materials: {
            [uuoid: string]: Material;
        }
        • [uuoid: string]: Material
      • textures: {
            [uuid: string]: Texture;
        }
        • [uuid: string]: Texture
    • dependencies: {
          [uuid: string]: Simulation;
      }

    Returns ParticleSystem