Poly Forest
A particle engine for
THREE.js. An effect is a
JSON document describing emitters, textures, zones, and
timelines. Load one, add it to your scene as a
Group, and call update() once per
frame.
npm install three-particles
Both render paths, running the same flame emitter: sprite points on the left, instanced meshes on the right.
Open the full demo for orbit controls, shadows, and an effect authored in the editor.
three
>=0.186.1 <0.187.0 as a peer
dependency:
npm install three-particles
import { ParticleEffect, ParticleEffectLoader } from 'three-particles'
const model = await new ParticleEffectLoader().loadAsync('./fire.json')
const effect = new ParticleEffect(model)
scene.add(effect)
// Once per frame, with the frame delta in seconds:
effect.update(delta)
The full effect JSON format (emitters, timelines, zones, eases, materials) is documented in the usage guide.
The particle editor edits effects in the browser and exports the same JSON the runtime loads, so what you design there drops straight into your scene. The tornado in the demo was made with it.