Renderer · type

ParticleMaterial

Which particle material a caller wants, by name rather than by source.

Explained in Hello world.

type ParticleMaterial = 'smoke' | 'spark' | 'mote' | 'sprite'
import type { ParticleMaterial } from '@driftengine/core';

In depth

The same change PlumeMaterial documents, for the same reason. ParticleBatchOptions.fragmentSource was a GLSL string, and a caller-supplied GLSL string is a capability that can only ever exist on WebGL2 — WebGPU has no runtime compiler and this package must never ship one. Naming the material lets each backend resolve what it can compile.

The three are not interchangeable and never were, which is why the names read as materials rather than as shaders: erosion is ignored by the spark and the mote, coreGain by the smoke and the mote, and fog by the spark and the smoke — and the options already document that. Naming them makes the pairing explicit instead of leaving it to a caller to match a source with the constants that suit it.