
Threejs scene setup
Sets up and debugs a plain three.js r187 scene with camera, renderer and render loop
Threejs scene setup is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 38
- Last commit
- License
- Apache-2.0
- Listing updated
Similar skills
About Threejs scene setup
This skill walks an agent through building the base of a plain three.js project: resolving the library through an import map or bundler, creating the scene, perspective camera and WebGL renderer, and running one animation loop driven by a timer with a clamped delta. It also covers resize handling, adding OrbitControls during development, and a pixel-ratio budget for high-DPI screens. The guidance favours an unlit test mesh first, with game state kept in plain objects that meshes only display.
For verification it includes a headless browser smoke test built on Playwright. The script fails on page errors, checks that draw calls are issued and the canvas has a size, and tests recovery after a forced WebGL context loss. A troubleshooting section covers common failures such as unresolved module specifiers, black canvases, stretched views after resize, and deprecated Clock or examples/js usage.
The skill expects a project that uses three.js r187 or an existing version the user keeps, with npm and a browser available for the optional smoke test. WebGPURenderer is covered as an opt-in path for TSL node materials and compute shaders, with its own init step and limits on custom GLSL.
When your agent uses it
Sets up and debugs a plain three.js r187 game or 3D scene: import maps, Scene, PerspectiveCamera and WebGLRenderer, setAnimationLoop with Timer, resize, OrbitControls and WebGPURenderer. Use on "Failed to resolve module specifier three", a black canvas or nothing animating. Not for GLB loading (`threejs-gltf-loading`), materials (`threejs-materials-lighting`) or React Three Fiber.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (17 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the raea plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add shinyobjectz/raea-skills
/plugin install raea@raeaOr copy only this skill to ~/.claude/skills/threejs-scene-setup:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/threejs-scene-setup &&
cp -R "$tmp/skills/threejs/pack/threejs-scene-setup" ~/.claude/skills/threejs-scene-setup &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/threejs-scene-setup inside it instead.
Copy the skill folder to ~/.agents/skills/threejs-scene-setup to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/threejs-scene-setup &&
cp -R "$tmp/skills/threejs/pack/threejs-scene-setup" ~/.agents/skills/threejs-scene-setup &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/threejs-scene-setup inside it instead.
Copy the skill folder to ~/.cursor/skills/threejs-scene-setup to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/threejs-scene-setup &&
cp -R "$tmp/skills/threejs/pack/threejs-scene-setup" ~/.cursor/skills/threejs-scene-setup &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/threejs-scene-setup inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/shinyobjectz/raea-skills.git --path skills/threejs/pack/threejs-scene-setupOr copy the folder to ~/.gemini/skills/threejs-scene-setup yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/threejs-scene-setup:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/threejs-scene-setup &&
cp -R "$tmp/skills/threejs/pack/threejs-scene-setup" ~/.copilot/skills/threejs-scene-setup &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/threejs-scene-setup inside it instead.
Get the folder:
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.gitThen copy raea-skills/skills/threejs/pack/threejs-scene-setup into your agent's skills folder as threejs-scene-setup. Agents that support SKILL.md read one folder per skill.
What it does
- Import map setup
- Shows how to resolve the three module and its addons with an import map or a bundler.
- Scene and renderer bootstrap
- Creates a scene, perspective camera and WebGL renderer with a capped pixel ratio.
- Timer-driven render loop
- Runs frame updates through setAnimationLoop with a clamped, frame-rate independent delta.
- Resize handling
- Updates camera aspect, projection matrix and renderer size when the window changes.
- Headless smoke test
- A Playwright script that checks for page errors, draw calls and recovery after context loss.
- Common error fixes
- Troubleshooting notes for module resolution errors, black canvases and deprecated APIs.
Good for
- Set up a new three.js scene without a bundler
- Fix a black canvas or a page that renders nothing
- Make a three.js canvas resize correctly with the window
- Add orbit camera controls to a 3D preview
- Migrate an old three.js page from Clock to Timer and modules
Threejs scene setup FAQ
Which three.js version does Threejs scene setup target?
It targets three.js r187 and notes that the user's installed version should be read first, keeping an existing project's release unless an upgrade is requested.
Does Threejs scene setup cover loading 3D models or materials?
No. Model loading, materials and lighting are handled by other skills, and React Three Fiber components are excluded because their Canvas owns the renderer and loop.
Does the smoke test need extra software?
It needs npm, the playwright package and a Chromium install, plus a dev server exposing window.renderer. Without browser automation the skill asks the user to check the page manually.
When should WebGPURenderer be used instead of WebGLRenderer?
The skill recommends staying on WebGLRenderer by default and switching only when the project needs TSL node materials or compute shaders.
How do I install Threejs scene setup in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/threejs-scene-setup to use it in all your projects, or to .claude/skills/threejs-scene-setup in one project. Or install the raea plugin, which includes it: /plugin marketplace add shinyobjectz/raea-skills, then /plugin install raea@raea.
Does Threejs scene setup run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Threejs scene setup?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Threejs scene setup?
The closest alternatives to Threejs scene setup are Threejs, Threejs gltf loading, Threejs materials lighting, Game engine and Vue.
Where this comes from
- Description: from the skill's own SKILL.md.
More from shinyobjectz/raea-skills

Check and consult a project's generated vocabulary before naming anything
- Open source
- 38 GitHub stars
- Knowledge and memory

Blank template for authoring new raea skills with a standard section layout
- Open source
- 38 GitHub stars
- Developer tools

Lets an agent write and render video, motion graphics and 3D scenes as React code
- Open source
- 38 GitHub stars
- Design and media

Routes Bevy 0.20 tasks to the right sibling skill and pins the engine version
- Open source
- 38 GitHub stars
- Developer tools

Guides an agent through accessibility design and audits for Bevy 0.20 games
- Open source
- 38 GitHub stars
- Developer tools

Guides an agent through Bevy 0.20 animation: graphs, blending, events and easing
- Open source
- 38 GitHub stars
- Developer tools


