Three.js Scene Setup
Gets a three.js 3D scene running in the browser with a smooth render loop, resizing and a quick health check.
Claude's review
8/10 Current three.js setup with Timer over Clock, the negative-delta trap, pixel ratio budget, WebGPU caveats and a smoke test that also checks context loss.
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
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.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: threejs-scene-setup
description: >
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.
---
# three.js scene setup
Builds the base every three.js game needs: module loading, the scene, camera and renderer,
one render loop, resize handling, and a resolution budget. Patterns target **r187**. Read
the installed `three` version first; addons, defaults and deprecations move every release.
## When to use
- Bootstrapping a three.js scene, fixing a black or blank canvas, making the canvas
responsive, setting up the loop, adding `OrbitControls`, or choosing between
`WebGLRenderer` and `WebGPURenderer`.
- `package.json` depends on `three`, or code does `import * as THREE from 'three'`.
- Not for models and animation (`threejs-gltf-loading`), surface look, lights and shadows
(`threejs-materials-lighting`), or React Three Fiber (`@react-three/fiber`) components,
whose `<Canvas>` owns the renderer and loop. For 2D, use `pixijs-rendering` or Phaser.
## Workflow
1. **Read `three` from `package.json` or the import map.** An existing project keeps its
release unless the user asks to upgrade.
2. **Resolve `three` and `three/addons/`** with a bundler or an import map; addons live under
`three/addons/...`.
3. **Create the scene, camera and renderer**, with the camera moved back from the origin and
the pixel ratio capped (Pattern 2).
4. **Prove the pipeline with an unlit mesh first** (`MeshNormalMaterial`). Only then switch
to lit materials and add lights.
5. **Drive everything from `renderer.setAnimationLoop`** with a `Timer` and a clamped delta.
Keep game state in plain objects and copy it onto meshes each frame. Meshes then stay a
view, and state can be saved and tested without a GPU.
6. **Handle resize** (aspect, projection matrix, renderer size) and add `OrbitControls`
while developing.
...From gamedev-skills's repository, Apache-2.0 licence.
Related skills
-
Checked
TinyBase app builder
Scaffolds and extends local first JavaScript apps with TinyBase, including schemas, persistence and sync.
7/101 credit -
Checked
ComfyUI custom node UI
Adds widgets, sidebar tabs, commands and dialogs to ComfyUI custom nodes, so your node feels built in.
8/101 credit -
Checked
Scrolling menu upgrade
Finds outdated react-horizontal-scrolling-menu code and rewrites it for version 8 so the menu works again.
7/101 credit -
Checked
Scroll Menu Testing and SSR
Gets react-horizontal-scrolling-menu working in Next.js and tested in Jest and Playwright without flicker.
7/101 credit -
Checked
Screenshot to React code
Rebuilds a screenshot or mockup as React, TypeScript and Tailwind code that closely matches the design.
7/101 credit -
Checked
Map location picker
Adds a map pin picker to a web form, so users can choose and submit one exact spot like a delivery address.
7/101 credit