What it does
The pack registers twelve named effects with the 3D particle system. game.particles3d.effect(name, opts) spawns one;
a one-shot removes itself when its last particle dies, and a loop plays until you kill it.
A bolt is a dense chain of camera-facing soft dots along a jagged 3D channel: a white-hot core inside a wider blue
glow, flickering as real strikes do and writhing a little while it lives. A strike adds the cloud lighting up, a
landing flash, a pool of light on the ground and sparks crawling out. The channels are authored, so you vary a strike
by turning it with a random yaw; the loops fire several channels on their own beats and never settle into one shape.
Directional effects are aimed with yaw and sized with scale, so chain lightning reaches exactly to its target.
Features
- Strikes —
lightning, a bolt 20 units tall that flickers three times;forked, which lands in three places; andgroundCharge, which crackles on the ground for a second before the strike comes down. - Weapon and spell hits —
chainZap, cyan lightning hopping three targets, andzap, a tiny pop of light and jagged rays. - Standing hazards —
arcbetween two glowing terminals,teslaCoilthrowing violet arcs, andstaticfizzing over the ground. - Floating and worn —
balllightning hovering and lighting the ground under it, andelectricAura, cyan energy crawling over a character it follows. - The sky —
sheetFlash, a cloud lighting up from inside, andthunderstorm, a distant cloud deck with bolts every second or so.
Good for
- Storms and weather — a thunderstorm on the horizon, sheet lightning, a strike on the hill.
- Spells and electric weapons — chain lightning, a shock, a stun, a zap on every hit.
- Hazards and sci-fi sets — a broken cable, a tesla coil, an electrified floor.
- Boss fights — a telegraphed strike that warns the player where it will land.
Make it yours
Every effect takes a position or an object to follow, scale, and yaw, pitch and roll in degrees. A random
yaw makes every strike in a storm different; a scale worked out from the distance between caster and target makes
chainZap reach exactly that far; static tipped with pitch crackles up a wall instead of across a floor. Every
definition is plain data, so a recoloured bolt is a copy from game.particles3d.defs registered under a new name with
registerVfx3d(game.kernel, def).
A quick look
A strike with a random turn, and an aura that rides on a character:
game.particles3d.effect('lightning', { x: 4, y: 0, z: -2, yaw: Math.random() * 360 });
const aura = game.particles3d.effect('electricAura', { follow: hero });
aura.kill(); // a loop plays until it is killed
Works with
particles-3dandparticle-textures— required: the runtime and the particle frames;core-3dincludes both.lighting-3dandaudio— a point light for the light a strike throws, and the thunder.vfx3d-sparks— hot metal and electrical sparks for a short circuit or a weld.vfx-lightning— the same twelve names in 2D.
Good to know
- The channels are drawn, not solved: a strike does not seek a target, and the same spot and
yawgive the same bolt. - The strikes are the heaviest effects, under 3,000 live particles at their peak; the loops stay under 1,200.
- The effects light nothing and cast no shadows: pair a strike with a point light.






