Skip to main content

GpuParticleRenderer

Container for the GPU Particle State contains the internal state needed for the GPU to render particles and maintain state.

Index

Constructors

constructor

Properties

emitRate

emitRate: number = 1

emitter

particle

staticreadonlyGPU_MAX_PARTICLES

GPU_MAX_PARTICLES: number = 100_000

Accessors

publicisInitialized

  • get isInitialized(): boolean
  • Returns boolean

publicmaxParticles

  • get maxParticles(): number
  • Returns number

Methods

draw

  • draw(gl: WebGL2RenderingContext): void
  • Parameters

    • gl: WebGL2RenderingContext

    Returns void

emitParticles

  • emitParticles(particleCount: number): void
  • Parameters

    • particleCount: number

    Returns void

initialize

update

  • update(elapsedMs: number): void
  • Parameters

    • elapsedMs: number

    Returns void