What it does
Each effect layers several emitters: a glow or a pool of light, a body of soft additive light, sparks or stars, and in the curse dark smoke. Colours cool and size and alpha fade over each particle's life, while curl noise, vortices, orbits, drag and gravity move them.
Spawn one with game.particles.effect(name, opts). Effects a character wears are built up from its feet, so spawn
them there or follow the character with an offset of half its height; the shield, portal, summoning circle and
sparkle are centred on their origin. Loops stay until kill(), while teleport, buff and levelUp play once and
remove themselves. scale sizes everything, and none of them needs aiming.
Features
- Worn states — an
aura, a glassyshieldbubble, a sinkingcurseand a risingheal. - Big moments — a
teleport, abuff, and alevelUpcolumn topped by a burst of stars. - Places — a swirling
portal, asummonCirclewith rune strokes wheeling between two rings, andholyLight. - Pickups and trails — a twinkling
sparkle, andswoosh, a star-shedding streak behind a wand or a blade. - Light on particles — none holds more than about 260 live particles at once, so several run together.
- Data you can copy — a red rage aura or a longer level-up is a copied definition.
Good for
- RPGs — heals, buffs, curses and level-ups on the party and its enemies.
- Action adventures and dungeon crawlers — portals, teleports, and summoning circles under bosses.
- Platformers — sparkles on pickups and a shield while the player is invulnerable.
- Card and battle games — status effects on a character.
Make it yours
scale fits an effect to your world or to a bigger bearer, such as a summoning circle three times the size under a
boss. A side-on platformer has the hero wear shield while invulnerable and plays levelUp at each new level; a
top-down dungeon marks places on the floor with portal and summonCircle and shows an enraged enemy with a recoloured
copy of aura.
A quick look
A portal, an aura worn at the hero's feet, a wand trail and a level-up:
const portal = game.particles.effect('portal', { x: 320, y: 180, layer: 'fx' });
const aura = game.particles.effect('aura', { follow: hero, offset: { y: 16 } });
const wake = game.particles.effect('swoosh', { follow: wandTip });
const onLevelUp = () => game.particles.effect('levelUp', { follow: hero, offset: { y: 16 } });
Works with
particles-2dandparticle-textures— required;core-2dincludes both.lighting-2d— for the light a spell throws on the scene.audio— for the chime.vfx3d-magic— the same set in 3D.
Good to know
- Rings and pools on the ground are squashed for a side or three-quarter view; the summoning circle, portal and shield are full circles.
- Additive light washes out on a white background, and no light is cast on the scene.
angledoes not turn gravity, so a rising effect turned upside down still drifts up; copy it and negate its gravity instead.






