API

Particles

Particles

Babylon.js supports three types of particles. These are based on sprites, meshes, and points.

The particle system uses small 2D sprites, which may be animated and always face the camera, to simulate effects such as smoke. The clouds of particles produced can be controlled with a wide range of properties. This differs from the other two systems, as it has parameters to control its behavior while the others require their behavior to be coded. From Babylon.js v3.2, where the browser supports WebGL2, GPU particles are available. These make full use of the GPU, though there are some restrictions on their use. When WebGL2 is not available, the GPUParticleSystem will fall back to the ParticleSystem automatically.

Starting from Babylon.js v8.14, the Node Particle Editor (NPE) provides a visual, graph-based way to design particle systems. Rather than setting properties in code, you wire together blocks that define creation, update, and rendering logic. NPE produces a NodeParticleSystemSet that can be loaded and started with just a few lines of code.

The solid particle system (SPS) combines one or more base meshes into a single mesh, requiring a single draw call per frame. There are many features available that allow you to control the behavior of the individual mesh particles.

A points cloud particle system (PCS) is a single updatable mesh and uses a material property to display its vertices as pixel squares of a size you set. The points cloud system provides some methods to manage the individual particles.

Also, as of version 5.X.Y, a new fluid rendering component has been added to the Scene class that allows you to render a particle system (ParticleSystem, GPUParticleSystem, or some custom vertex buffers) as a fluid.

Coming next

Particle System
Learn all about the particle system in Babylon.js.
Particle System
Solid Particle System
Learn all about the solid particle system in Babylon.js.
Solid Particle System
Point Cloud System
Learn all about the point cloud system in Babylon.js.
Point Cloud System
Fluid Renderer
Learn all about the fluid renderer component in Babylon.js.
Fluid Renderer