add-3d-assets
Replace primitive 3D shapes with real GLB models — animated characters, world props, buildings, and scenery for Three.js games.…
Build 3D browser games with Three.js using event-driven modular architecture. Use when creating a new 3D game, adding 3D game features, setting up Three.js scenes, or working on any Three.js game project.
Claude Code
$ npx -y skills add playableintelligence/game-creator --skill threejs-game --agent claude-code
Codex
$ npx skills add playableintelligence/game-creator --skill threejs-game -a codex -y
Cursor
$ npx skills add playableintelligence/game-creator --skill threejs-game -a cursor -y
Gemini CLI
$ npx skills add playableintelligence/game-creator --skill threejs-game -a gemini-cli -y
GitHub Copilot
$ npx skills add playableintelligence/game-creator --skill threejs-game -a github-copilot -y
OpenCode
$ npx skills add playableintelligence/game-creator --skill threejs-game -a opencode -y
Windsurf
$ npx skills add playableintelligence/game-creator --skill threejs-game -a windsurf -y
name: threejs-game description: Build 3D browser games with Three.js using event-driven modular architecture. Use when creating a new 3D game, adding 3D game features, setting up Three.js scenes, or working on any Three.js game project. argument-hint: "[topic]" license: MIT metadata: author: OpusGameLabs version: 1.3.0 tags: [game, 3d, threejs, webgl, event-driven, modular]
You are an expert Three.js game developer. Follow these opinionated patterns when building 3D browser games.
> **Reference**: See `reference/llms.txt` (quick guide) and `reference/llms-full.txt` (full API + TSL) for official Three.js LLM documentation. Prefer patterns from those files when they conflict with this skill.
For detailed reference, see companion files in this directory:
For performance optimization patterns with measured before/after evidence, see the **threejs-perf** skill (`skills/threejs-perf/SKILL.md`).
When scaffolding a new Three.js game:
mkdir <game-name> && cd <game-name> npm init -y npm install three@^0.183.0 npm install -D vite
Create `vite.config.js`:
import { defineConfig } from 'vite';
export default defineConfig({
root: '.',
publicDir: 'public',
server: { port: 3000, open: true },
build: { outDir: 'dist' },
});Add to `package.json` scripts:
{
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
}
}import * as THREE from 'three';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/three@0.183.0/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.183.0/examples/jsm/"
}
}
</script>
<script type="module">
import * as THREE from 'three';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
</script>Use import maps when shipping a single HTML file with no build tooling. Pin the version in the import map URL.
Every Three.js game MUST use this directory structure:
src/ ├── core/ │ ├── Game.js # Main orchestrator - init systems, render loop │ ├── EventBus.js # Singleton pub/sub for all module communication │ ├── GameState.js # Centralized state singleton │ └── Constants.js # ALL config values, balance numbers, asset paths ├── systems/ # Low-level engine systems │ ├── InputSystem.js # Keyboard/mouse/gamepad input │ ├── PhysicsSystem.js # Collision detection │ └── ... # Audio, particles, etc. ├── gameplay/ # Game mechanics │ └── ... # Player, enemies, weapons, etc. ├── level/ # Level/world building │ ├── LevelBuilder.js # Constructs the game world │ └── AssetLoader.js # Loads models, textures, audio ├── ui/ # User interface │ └── ... # Game over, overlays └── main.js # Entry point - creates Game instance
1. **Core loop first** — Implement one camera, one scene, one gameplay loop. Add player input and a terminal condition (win/lose) **before** adding visual polish. Keep initial scope small: 1 mechanic, 1 fail condition, 1 scoring system. 2. **Gameplay clarity > visual complexity** — Treat 3D as a style choice, not a complexity mandate. A readable game with simple materials beats a visually complex but confusing one. 3. **Restart-safe** — Gameplay must be fully restart-safe. `GameState.reset()` must restore a clean slate. Dispose geometries/materials/textures on cleanup. No stale references or leaked listeners across restarts.
Every Three.js game requires these four core modules. Full implementation code is in `core-patterns.md`.
ALL inter-module communication goes through an EventBus (`core/EventBus.js`). Modules never import each other directly for communication. Provides `on`, `once`, `off`, `emit`, and `clear` methods. Events use `domain:action` naming (e.g., `player:hit`, `game:over`). See `core-patterns.md` for the full implementation.
One singleton (`core/GameState.js`) holds ALL game state. Systems read from it, events update it. Must include a `reset()` method that restores a clean slate for restarts. See `core-patterns.md` for the full implementation.
Every magic number, balance value, asset path, and configuration goes in `core/Constants.js`. Never hardcode values in game logic. Organize by domain: `PLAYER_CONFIG`, `ENEMY_CONFIG`, `WORLD`, `CAMERA`, `COLORS`, `ASSET_PATHS`. See `core-patterns.md` for the full implementation.
The Game class (`core/Game.js`) initializes everything and runs the render loop. Uses `renderer.setAnimationLoop()` -- the official Three.js pattern (handles WebGPU async corre
Go from game idea to deployed, monetized browser game in minutes — not hours. Tell your AI coding agent "make a space invaders game" and get a fully playable 2D or 3D browser game with pixel art, procedural audio, and automated QA. Deploy instantly to the web.
Replace primitive 3D shapes with real GLB models — animated characters, world props, buildings, and scenery for Three.js games.…
Replace geometric shapes with pixel art sprites — recognizable characters, enemies, and items with optional animation. Use when…
Add music and sound effects to a game using the Web Audio API — background music, gameplay themes, and SFX. Zero dependencies.…
Add a new gameplay feature to an existing browser game following its architecture patterns. Use when the user says "add a…
Add real-time or turn-based multiplayer to an existing browser game using PartyKit (Cloudflare Durable Objects). Scaffolds a…
Audit and improve the visual design, polish, and player experience of an existing game. Use when the user says "make my game look…
四柱八字命理分析。通过交互式步骤收集出生信息(姓名、曾用名、阳历/农历生日、时辰、性别、出生地), 排出四柱八字,参照经典命理典籍(穷通宝典、三命通会、滴天髓、渊海子平、子平真诠等)进行专业分析。 Use this skill whenever the…
Generate, texture, rig, animate, stylize, convert, and download 3D assets for Three.js games via the Tripo API. Use for…
Use this skill when authoring or extending an Unreal Engine toolset, a class of static, AI-callable functions registered with…
Code-drawn stills, films, 3D motion graphics, explainers and web animations in 32 styles, with scores, narration and subtitles.…