GPU compute node for WebGPU dispatch. Call renderer.compute(computeNode) before renderer.render(). Null when CPU simulation.
Disposes of the particle system, cleaning up resources to free memory.
The underlying Three.js Points or Mesh object used for particle rendering.
Pauses the particle emitter, stopping any new particles from being emitted.
Resumes the particle emitter, allowing particles to be emitted again.
Updates the particle system configuration at runtime without recreating the system.
System-level properties (gravity, force fields, noise, emission rates, color/size/opacity over lifetime curves) take effect immediately for all particles. Per-particle spawn properties (startColor, startSize, startSpeed, startLifetime, etc.) only affect newly emitted particles — already-alive particles retain their original values.
A partial configuration object. Only the provided properties will be updated; all other settings remain unchanged.
Structural properties that are set at creation time cannot be changed at runtime:
maxParticles, renderer.rendererType, shape, and map (texture).
Passing these will update the internal config but have no visible effect since the
geometry and material are pre-allocated.
const system = createParticleSystem(config);
// Change wind direction in real time
system.updateConfig({
forceFields: [{ type: ForceFieldType.DIRECTIONAL, direction: { x: 1, y: 0, z: 0 }, strength: 5 }],
});
// Gradually change color of new particles
system.updateConfig({
startColor: { min: { r: 1, g: 0, b: 0 }, max: { r: 1, g: 0.5, b: 0 } },
});
Represents a particle system instance, providing methods to control and manage its lifecycle.
Example