What it does
The pack registers twelve presets with particles-gpu-3d, the GPU particle runtime. game.gpuParticles.preset(name)
starts one, and it runs until you kill() it. Each wraps its particles into a box around the camera: a raindrop that
leaves one side comes back in at the other, so a bounded pool reads as rain everywhere the player looks.
The fields are tuned to read as what they are. Petals and leaves flutter and tumble; rain, sand and warp streaks
stretch along their flight; snow wanders on curl noise; bubbles rise and wobble; and the space fields launch outward
from the eye, so flying through them reads as depth. A preset is only a starting point: preset(name, overrides) takes
any field config key.
Features
- Weather —
blossom,leavesin red, orange and gold,rainat 120,000 streaks,snow, and asandstormstreaking sideways low over the ground. - Atmosphere —
ashlifting and settling,firefliesin a warm night,dustmotes in a shaft of light, andbubblesrising through water. - Deep space — a
starfieldstreaming past the ship,warpstretching stars into streaks, and anebulato sit a starfield inside. - A fixed cost — pools from 9,000 to 120,000 particles, set when the field starts, however far the camera goes.
- Overrides on every key — a new palette, a lower count, rain that lands on the scene, leaves that come to rest.
Good for
- Open-world games — rain, snow or a sandstorm over terrain with no edge.
- Seasonal and mood scenes — spring blossom, autumn leaves, dust in a tomb, fireflies over a meadow.
- Underwater levels — bubbles rising round the diver.
- Space shooters and flight games — a starfield to fly through, the jump to warp and a nebula around it.
Make it yours
Re-skinning is a single call: green summer leaves are leaves with a new palette and a lower count, and rain that
lands on roofs and is reborn at the top is rain with collide: 'respawn'. A preset can be re-purposed too: bubbles
with follow: false, a disc spawn, wrap: false and a rate becomes a column rising from a vent on the sea bed.
Fields combine, so a space level runs nebula and starfield together, and a field of your own is a copied definition
registered with registerGpuField3d from particles-gpu-3d.
A quick look
Rain around the camera, a re-skinned field, and the rain stopped:
const rain = game.gpuParticles.preset('rain');
game.gpuParticles.preset('leaves', { count: 4_000, palette: ['#4a7a2a', '#6a9a34', '#8ab040', '#3a5a20'] });
rain.kill();
Works with
particles-gpu-3dandparticle-textures— required: the GPU runtime and the particle frames.underwater-3d— the underwater scene the bubbles belong in.vfx3d-weather— weather on the CPU: a few thousand particles, but deterministic and running headless.vfx3d-*packs — effects at a place, with a beginning and an end.vfx-weather— the 2D counterpart.
Good to know
- GPU only: a headless game creates the field, but nothing moves or draws.
- Without fog, the far wall of the box shows as a plane where the particles stop.
- Rain, snow and leaves pass through roofs and floors until you override
collide. - The space fields launch outward from the eye, so a ship that banks hard does not see its streaks bank with it.






