Eight agent skills for 3D and animated websites: three.js scenes from code, scroll films, transparent video, cursor rigs, exploded views, AI motion assets, browser checks and 60 fps recording. Claude Code, Codex, Cursor, Gemini CLI.
Performance
Measure first
site-check reports milliseconds per frame over 60 real frames and, when the page exposes window.__app.renderer, draw calls and triangles for a whole frame (all passes). Headless Chromium on a real GPU (Metal on macOS) gives repeatable numbers; compare runs against each other, not against a phone. If the reported renderer is SwiftShader or llvmpipe, the numbers are software rendering and meaningless.
In the browser, renderer.info after one frame with info.autoReset = false gives the same counts.
Budget (laptop GPU, 1440x900, high tier)
| Target | |
|---|---|
| Frame time | under 10 ms (leaves headroom for 60 fps on weaker machines) |
| Draw calls | under 300 |
| Triangles | under 2 million |
| Shader programs | under 40 (each new material variant compiles one, and compiling stalls) |
| Textures | under 100 MB of GPU memory |
Fixes, biggest first
- Instance repeated parts. One
InstancedMeshper part type. This is usually a 10x win on architecture, forests, crowds, traffic. - Merge static meshes that share a material and never move (
mergeGeometries). - Quality tiers. Device pixel ratio is the largest single cost:
highcaps it at 2,balancedat 1.5,fastat 1. GTAO costs about as much as the rest of the frame; drop it inbalancedorfastif needed. Shadow maps go from 4096 to 2048 infast. - Shadows. Only things that cast visible shadows get
castShadow: not small props, not distant buildings, not flat ground decals. Point-light shadows render six times (a cube); give at most one or two lights shadows. - Hide dark lights. A light at intensity 0 still renders its shadow map.
- Do not render idle frames. When nothing animates and the camera is still, skip
composer.render(). On a laptop this is the difference between a fan and silence. - Pre-compile with
renderer.compile(scene, camera)behind the loader, so the first orbit does not stutter while shaders compile. - Textures: power-of-two canvas textures with mipmaps; 512 or 1024 is enough for tiling materials. Use KTX2 for large photographic textures if you have any.
Auto tiering
The starter averages frame time over three-second windows and drops one tier when the average exceeds 25 ms. It never raises the tier again in a session (oscillating quality is worse than slightly low quality), never acts during a recording, and ignores frames longer than 250 ms (tab switches).
Phones
- Expect a third of laptop throughput. Start phones on
balanced. - Touch:
OrbitControlshandles one-finger orbit and pinch; settouch-action: noneon the canvas so the page does not scroll instead. - Safe areas: keep UI above
env(safe-area-inset-bottom).