Use when building or debugging interactive 3D scenes on the web with Three.js (scene/camera/renderer, lights/materials, GLTF loading, controls, performance). Helpful for designers shipping 3D UI moments.
75
93%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Scene (root graph)Camera (Perspective/Orthographic)Renderer (WebGLRenderer)Mesh = Geometry + MaterialrequestAnimationFrame(animate)renderer.render(scene, camera)const renderer = new THREE.WebGLRenderer({ canvas, antialias, alpha })renderer.setSize(width, height, false)renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2))camera.aspect = width / height; camera.updateProjectionMatrix()scene.add(object) / object.position/rotation/scaleGLTFLoader (models), TextureLoader (images), DRACOLoader (compressed glTF)OrbitControls (debug/product), PointerLockControls (FPS), custom pointer handlersgeometry.dispose(), material.dispose(), texture.dispose(), renderer.dispose()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 geom = new THREE.BoxGeometry(1, 1, 1);
const mat = new THREE.MeshStandardMaterial({ color: 0x7c3aed });
const mesh = new THREE.Mesh(geom, mat);
scene.add(mesh);
scene.add(new THREE.AmbientLight(0xffffff, 0.8));
const dir = new THREE.DirectionalLight(0xffffff, 0.8);
dir.position.set(2, 2, 2);
scene.add(dir);
function resize() {
const w = canvas.clientWidth;
const h = canvas.clientHeight;
renderer.setSize(w, h, false);
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
camera.aspect = w / h;
camera.updateProjectionMatrix();
}
window.addEventListener("resize", resize);
resize();
function animate(t) {
mesh.rotation.y = t * 0.0006;
renderer.render(scene, camera);
requestAnimationFrame(animate);
}
requestAnimationFrame(animate);prefers-reduced-motion: reduce, render a still frame (no RAF) or slow updates.4c716b5
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.