Ultra Elements: 39 Open-Source three.js Spell Effects, Built by AI Agents One Element at a Time

Introduction
Ultra Elements is a free, MIT-licensed lab of 39 real-time spell effects for three.js, and it was planned and built with AI agents, one agent per element. Ian (
) on October 31 at about 05:59 MYT as the follow-up to his Ultra Water release, adding that it "should be easy enough to get an LLM to extend" if you want a specific spell. The code is on GitHub at Humpalumps/ultra-elements, and you can run it in a browser today withnpm install and npm run dev.That makes it two things at once: a ready-to-borrow pack of fireballs, ice walls, lightning and portals for web games, and a public record of how an agent-built VFX project was planned, split up and benchmarked.
What shipped
- Tool: Ultra Elements v0.1.0
- Creator: Ian (, GitHub Humpalumps), sibling to Ultra Water
- Modality: real-time game VFX: GPU particles, FLIP fluid, raymarched volumes and lightning in WebGL2
- Open vs API: open source, MIT. Runs entirely in the browser with no model and no texture assets
- Where to run it today: clone the repo and start the Vite dev server
- Concrete fact: 39 spells across ten elements and three hybrids, with 34 of the 39 staying under a 3 ms whole-frame budget on an RTX 3060 at 3.3 megapixels
The spells
The lab is a small arena with a reflecting pool and three training dummies. The spellbook covers:
- Lightning: Thunderstrike, Chain Arc, Ball Lightning, Thunderstorm
- Fire: Fireball, Inferno, Phoenix, Ember Swarm
- Water: Tidal Lance, Geyser, Tsunami
- Ice: Glacial Spike, Ice Wall, Absolute Zero, Blizzard
- Earth: Upheaval, Meteor, Fissure, Lava Geyser
- Wind, Void, Light, Acid and Arcane: from Cyclone and Singularity to Supernova, Plague Swarm and Starfall
- Hybrids: Frozen Lightning, Fire Tornado and Black Flame
Every spell has its own panel of sliders, colours and presets that change it live, and a copy link button saves the whole state in the URL. Spells also leave marks: a 40 × 40 m floor field tracks heat, char, wetness, frost, cracks and acid, so frost followed by fire makes steam and lightning on a soaked pool behaves differently, without scripting each combo.
How the agents built it
The repo's PLAN.md is the interesting part for anyone building games with AI. Two plans were written separately from the same brief, one by the main session and one by "a separate Opus 5.5 planner," then merged with every disagreement settled in a table. The build itself was split so agents could work in parallel:
- The foundation and the first two elements, Lightning and Fire, were built in one thread to lock down every interface a spell touches
- After that, the interfaces froze and the remaining elements ran as parallel agents, one per element, each touching only its own spell file and shader chunk
- Each agent had to run a per-spell benchmark and a set of deterministic test frames and report its numbers before a spell counted as done
- Any change to shared engine code went back to the main thread, so no two agents edited the same file
That structure is also why it's easy to extend. Each spell is one module with plain params, ranges, kinds and a create(fx) function, and CONTRIBUTING.md walks through adding one from src/spells/_template.js. It's a clean target to hand an agent with a prompt like "add a sandstorm spell under Wind, follow CONTRIBUTING.md, and keep it under the 3 ms budget."
Performance
The README publishes a per-spell benchmark measured by timing every frame to GPU completion. On an RTX 3060 at High quality, the idle arena costs 1.37 ms, and the heaviest spells (Thunderstorm, Meteor, Geyser, Fireball and Dust Devils) peak between 3.07 and 3.34 ms. On a OnePlus Nord 4 phone at the Low tier, every spell's worst quarter-second sits between 5.6 and 8.7 ms, inside a 60 fps frame. There's also an accessibility setting that limits flashes and camera shake, following prefers-reduced-motion.
Try it
git clone https://github.com/Humpalumps/ultra-elements.git
cd ultra-elements
npm install
npm run devOpen the local URL, pick an element with 1 to 0 (or H for hybrids), step through spells with Q and E, and cast with Space or by clicking a dummy. Add ?reel for a roughly three-minute showreel of every spell, or ?mobile to test the phone profile.
What to watch
- The first load is slow, about 24 seconds on the RTX 3060, because every spell's shaders compile at start-up; repeat visits take about 9 seconds
- The README lists known rough edges, including Tsunami's surface up close and Glacial Spike passing through the Aegis shield
- It's a lab, not an engine plugin, so dropping spells into your own three.js game means pulling in the shared
vfx/andengine/modules the package exports - There's no hosted demo link yet, so you'll need to run it locally
—Titus
