More
Changelog
Every release of naturegl-magic. The package follows semantic versioning.
#1.0.0
2026-09-24 The first packaged release: a port of the single-file magicpro.html (three r160) to a library plus demo (three r186).
#Added
- The
MagicSystemfacade:create,update,render,composite(color, depth),resize,loadPreset,setParams,getParams,setQualityLevel,clearanddispose. See the API reference. - Composable effects through
addEffect(type, options):portal,genieLamp,ink,spellOrb,vortexRing,dragonBreathandforceField, plus a genericemitter(addEmitter) and the one-shotimpulse(). Handles supportmove,retarget,setColor,setIntensity,set,removeandtoJSON. See Effects and handles. - Seven presets, one file each, matching the page's examples.
getParams()round-trips them. See Presets. - The glow light (
glow.light), driven by an async GPU reduction. Spell orbs carry their own point lights. patchReflectiveFloor(), so any standard material can reflect the volume.- The demo, with the page's courtyard, UI, drag interactions and adaptive quality, plus a Copy preset JSON button and the
window.__procontract. examples/basic(Vite alias) andexamples/cdn(import map againstbuild/).scripts/smoke.mjs(a headless GPU test of every preset),scripts/examples.mjsandscripts/shoot.mjs.
#Improved over the page
- MacCormack advection (limited) for dye and state, with optional velocity MacCormack and a per-preset strength.
- Vortex rings: a local vorticity-confinement boost around the core, a thinner and crisper analytic torus with rolling ring-local noise, a 4.5 s life, and a fade-out at the domain faces instead of clipping.
- Temporal accumulation of the volume buffer (MRT depth reprojection plus variance clipping) and golden-ratio step jitter.
- A soft density fade at the open domain faces, so the simulation box never shows.
- Bloom with a soft knee and a Karis-weighted first downsample. Hue-preserving ACES on bright emissive colours. Saturation, contrast and vignette controls.
- Up to 8 emitters, 4 impulses, 4 rings, 2 swirls and 4 spark spawners with their own colours per frame.
THREE.Clock→THREE.Timer,PCFSoftShadowMap→PCFShadowMap, and no deprecation warnings on r186.