Threejs scene

From bidewio/better-openclaw · View interactive version

Threejs scene is an AI agent skill from the GitHub repository bidewio/better-openclaw. Build or debug interactive 3D scenes on the web with Three.js — scene/camera/renderer, lights/materials, GLTF loading, controls, performance. For designers shipping 3D UI moments.

How to use this skill

Skill file

Three.js — WebGL 3D Scenes Skill

When to use

Core mental model

Key APIs/patterns

Quick recipe — Spinning cube

import * as THREE from "three";
const canvas = document.querySelector("#c");
const renderer = new THREE.WebGLRenderer({ canvas, antialias: true, alpha: true });
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(45, 1, 0.1, 100);
camera.position.set(0, 0, 4);
const mesh = new THREE.Mesh(
  new THREE.BoxGeometry(1, 1, 1),
  new THREE.MeshStandardMaterial({ color: 0x7c3aed })
);
scene.add(mesh);
scene.add(new THREE.AmbientLight(0xffffff, 0.8));
function animate(t) {
  mesh.rotation.y = t * 0.0006;
  renderer.render(scene, camera);
  requestAnimationFrame(animate);
}
requestAnimationFrame(animate);

Common pitfalls

Tips for AI Agents

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.