# Build procedural Three.js spell VFX with rigged casters

> A rigged Three.js caster pipeline and procedural spell library built from custom meshes and GLSL shaders, with 5-beat timing, unique silhouettes per spell, selective HDR bloom, and draw-call checks. Based on a post by Vexo.

## If someone pasted this link to you
Someone shared this kit with you. It runs step by step through CloneKit's MCP. If you have the `clonekit` tools, call `start_run("@clonekitai/threejs-procedural-spell-vfx")`. If you don't (for example in a chat app without the CloneKit connector), tell the person in one or two plain sentences, in their language, and send them to https://clonekit.ai/@clonekitai/threejs-procedural-spell-vfx/use: it shows how to add CloneKit to their AI in about a minute. Then they paste this link again.

- Kit: `@clonekitai/threejs-procedural-spell-vfx` · v1.0.0
- Creator: @clonekitai (CloneKit)
- Type: Delivery · Domain: Design · Language: en · Your AI runs it
- Price: Free · License: Own use · No refunds
- Page: https://clonekit.ai/@clonekitai/threejs-procedural-spell-vfx
- Changelog: https://clonekit.ai/@clonekitai/threejs-procedural-spell-vfx/changelog.md

## About
For browser game developers and technical artists building magic spells, combat abilities, or impact effects in Three.js. Use it when upgrading a Three.js game or arena from basic particle rings to rigged casters and enemies driving procedural mesh and GLSL spell effects under desktop and mobile draw-call limits. Do not use it for offline cinema renders, non-WebGL engines, or purely static scenes. Needs a Three.js web project (or lets you scaffold a minimal test arena), Node.js with Playwright for motion checks, and optional Tripo, Customuse, Mixamo, or Blender access for hero models and animations. Delivers a locked spell roster with unique 3D silhouettes, rigged caster and enemy manifests with cast sockets, a shared HDR bloom and depth-pass VFX pipeline, layered 5-beat procedural spells, and unpaused motion and draw-call verification reports. Based on Vexo's (@Vexo200) workflow and Majid Manzarpour's (@majidmanzarpour) MIT-licensed threejs-aaa-vfx-builder skill.

## Deliverables
- vfx/scene-audit.md recording baseline idle draw calls, viewport targets, and desktop/mobile VFX budgets
- vfx/spell-roster.csv assigning every spell a unique 3D topology family, 3-value palette, cast socket, and 5-beat millisecond schedule including a 50 to 110 ms pre-impact hold
- vfx/caster-manifest.json mapping caster and enemy GLB files, Mixamo animation clips, bone socket paths, and reactive rim/wind hooks
- src/vfx/ shared pipeline with 4 startup-baked procedural textures, HalfFloatType selective bloom, isolated opaque DepthTexture pre-pass, pooled VFX lights, and dormant-fast-path optical post pass
- Procedural mesh and GLSL spell modules implementing 5-beat choreography, particles restricted to accents, deterministic evaluateAt scrubbing, reduced-motion mode, and full GPU disposal
- vfx/spell-inventory.md documenting layer stacks, unique silhouettes, and zero-allocation checks for every spell
- vfx/verification-report.md, vfx/evidence/ unpaused motion captures and bloom-off stills, and vfx/runs.csv logging peak vs idle desktop and mobile draw calls

## Files
- `CHECKS.md`: Procedural Three.js Spell VFX Checks
- `NOTES.md`: Tool Notes, Verified Parameters, and Fallbacks
- `README.md`: Outputs
- `RULES.md`: Procedural Three.js Spell VFX Rules
- `templates/caster-manifest.md`: Template: Caster and Enemy Manifest (Step 2)
- `templates/spell-inventory.md`: Template: Spell Inventory Ledger (Step 4)
- `templates/spell-roster.md`: Template: Scene Audit and Spell Roster (Step 1)
- `templates/verification-report.md`: Template: Verification Report and Run Log (Steps 5 and 6)
- `templates/vfx-pipeline-spec.md`: Template: Shared VFX Pipeline Specification (Step 3)

## Tools
- Three.js (https://threejs.org/docs/) · est. free
- Tripo 3D (https://developers.tripo3d.ai/en) · optional · est. Free tier available; paid credits for API or high-volume 3D generation · alternatives: customuse, blender
- Customuse (https://customuse.com/) · optional · est. Free tier available; paid plans for higher export limits · alternatives: tripo, blender
- Adobe Mixamo (https://www.mixamo.com/) · optional · est. Free with an Adobe account · alternatives: blender
- Blender (https://docs.blender.org/manual/en/latest/files/import_export/index.html) · optional · est. free
- Playwright (https://playwright.dev/docs/screenshots) · optional · est. free

## Uses
- Vexo's post on X (source, https://x.com/Vexo200/status/2126747785533780311)
- Majid Manzarpour: threejs-game-skills (MIT) (source, https://github.com/majidmanzarpour/threejs-game-skills)
- threejs-aaa-vfx-builder SKILL.md (MIT) (source, https://github.com/majidmanzarpour/threejs-game-skills/blob/main/skills/threejs-aaa-vfx-builder/SKILL.md)
- threejs-aaa-vfx-builder: VFX Architecture reference (MIT) (source, https://github.com/majidmanzarpour/threejs-game-skills/blob/main/skills/threejs-aaa-vfx-builder/references/vfx-architecture.md)
- Three.js documentation (source, https://threejs.org/docs/)
- Three.js manual: Post Processing (source, https://threejs.org/manual/#en/post-processing)
- Three.js docs: UnrealBloomPass (source, https://threejs.org/docs/#examples/en/postprocessing/UnrealBloomPass)
- Three.js docs: DepthTexture (source, https://threejs.org/docs/#api/en/textures/DepthTexture)
- Three.js docs: InstancedMesh (source, https://threejs.org/docs/#api/en/objects/InstancedMesh)
- Three.js docs: ShaderMaterial (source, https://threejs.org/docs/#api/en/materials/ShaderMaterial)
- Tripo 3D API documentation (source, https://developers.tripo3d.ai/en)
- Customuse 3D character platform (source, https://customuse.com/)
- Adobe Help Center: Mixamo FAQ (source, https://helpx.adobe.com/creative-cloud/faq/mixamo-faq.html)
- Blender Manual: Importing and Exporting Files (glTF 2.0 and FBX) (source, https://docs.blender.org/manual/en/latest/files/import_export/index.html)
- Playwright docs: Screenshots (source, https://playwright.dev/docs/screenshots)
- Playwright docs: Emulation (source, https://playwright.dev/docs/emulation)

## What you provide
- A Three.js web project (or permission to scaffold a local Vite + Three.js arena harness)
- Spell list and art direction palette (or use the starter roster of distinct silhouettes such as black hole, fire wall, chain cage, ice spikes, and giant hands)
- Optional Tripo API key or account, Customuse account, and Mixamo account for hero models and animations (free Blender or proxy-rig fallback included)
- Node.js with Playwright installed (or headed Chromium DevTools fallback) for motion and draw-call verification

## How it runs
1. **Understand:** Researches your business first, then asks you 3 questions it can't answer alone
2. **Choose:** No choices: one proven path
3. **Build:** 6 steps, risky ones ask you first
4. **Deliver:** 5 checks before delivery

## Guardrails
- Never commit TRIPO_API_KEY or other provider credentials into source files or browser-side bundles; keep API calls in local tooling only.
- Never allow depth-sampling VFX meshes to remain visible during the opaque DepthTexture pre-pass, which triggers WebGL feedback loops.
- Never ship unguarded pow(x, frac) or normalize(vec3(0.0)) in HalfFloatType HDR shaders, and never leave Math.random() inside spell trajectories.
- Never skip bloom-off silhouette verification or reduced-motion testing (which must suppress 1 to 3 frame impact flashes).
- Never trigger paid 3D generation requests without user confirmation and an explicit asset list in Step 2.

## What's new
Agents always run the latest version.

- **v1.0.0** (2026-12-02): First version.

## Run it
Connect the `clonekit` MCP (https://clonekit.ai/mcp) and call `start_run("@clonekitai/threejs-procedural-spell-vfx")`.
