What it does
The pack registers twelve named effects with the 3D particle system. game.particles3d.effect(name, opts) spawns one
at a point or following an object; it plays once and removes itself, so there is nothing to track or tidy away.
The classic explosion shows the recipe: a white flash gone in a tenth of a second, a fireball of additive puffs that
expand and cool to ember, a shockwave ring widening flat across the floor, sparks stretched into streaks, debris that
tumbles and lands, and a smoke pall that outlives the rest. The other eleven are variations on it: smaller, bigger,
fireless or in another colour. Every effect but the muzzle flash treats its point as the ground, so you spawn it at
the foot of whatever blew up, and one scale grows every size, speed and distance together.
Features
- The classic and its sizes —
explosion, the smallerblastandgrenade, andbigBoom, a mushroom cloud about nine units tall with a condensation ring, a dust skirt and embers. - The parts alone —
shockwave, the ground ring for a landing or a stomp, anddebris, chunks thrown up for a wall coming down. - Fireless impacts —
dustImpact, a dust ring and pebbles for a heavy hit, andsmokeBomb, a cloud that hangs for seconds, for cover or a vanishing. - Other styles —
plasmaBlastin white-cyan with crackling arcs,iceShatterwith spinning shards and a frost ring, andimplosion, violet streaks sucked into a point before a flash. - A muzzle flash —
muzzleFlash, a white-hot star with a forward tongue, aimed withyawandpitchand carried by the gun withfollow. - Few particles — at scale 1 the busiest,
bigBoom, peaks under 400 live particles and the rest under 150.
Good for
- Shooters and vehicle combat — tanks and turrets going up, and a flash at every muzzle.
- Action games — grenades, mines and a boss's reactor going up in a mushroom cloud.
- Sci-fi and fantasy — plasma blasts, implosions for a teleport out, something frozen shattering.
- Destruction — debris and dust for walls, crates and buildings coming down.
Make it yours
Each spawn takes a point or an object to follow, scale, yaw, pitch and roll in degrees, a layer and a
timeScale. A grenade at the foot of every mine is one use; a bigBoom sixty units away at three times the size, a
reactor going up on the horizon, is another. Every effect is also a plain Vfx3dDef: copy one from
game.particles3d.defs and register it under a new name with registerVfx3d, for a red plasma blast or a slower
mushroom cloud.
A quick look
An explosion at a tank's base, a distant giant and a muzzle flash aimed along a gun:
game.particles3d.effect('explosion', { x: tank.x, y: 0, z: tank.z });
game.particles3d.effect('bigBoom', { x: 0, y: 0, z: -60, scale: 3 }); // far off and huge
game.particles3d.effect('muzzleFlash', { x: muzzle.x, y: muzzle.y, z: muzzle.z, yaw: gun.yawDeg, pitch: -gun.elevationDeg });
Works with
particles-3dandparticle-textures— required: the runtime and the particle frames;core-3dincludes both.feelandpost-bloom— a camera shake for weight, and bloom to make the additive layers glow.vfx3d-fireandvfx3d-smoke— flames that keep burning and smoke that keeps rising after the bang.vfx-explosion— the 2D effects of the same names.
Good to know
- One-shots only: nothing here loops. A standing fire is
vfx3d-fire, a smoke trail behind a missiletrails-3d. - The falling pieces are removed below world y = 0 wherever the effect was spawned, so on a raised floor they fall through it.
- None of the effects casts a shadow.






