game-threejs-development
Installation
SKILL.md
Three.js Game Development
Core Workflow
- Identify the game genre, target browsers/devices, input methods, camera style, asset format, physics needs, and publishing target.
- Structure the app around a clear game loop: input sampling, fixed or semi-fixed simulation, animation mixers, world update, camera update, render, and cleanup.
- Keep Three.js scene concerns separate from gameplay state where practical. Avoid hiding game rules inside mesh traversal or material callbacks.
- Use the scene graph deliberately: name important objects, group related transforms, avoid excessive per-frame searches, and dispose geometries/materials/textures when removed.
- Load assets through explicit loaders and loading states. Prefer GLB/GLTF for 3D assets, texture compression where appropriate, and predictable relative paths for HTML5 hosting.
- Verify with browser screenshots and canvas checks across desktop and mobile viewports. Confirm the canvas is nonblank, framed correctly, interactive, and performant.