
Threejs Fundamentals
Core scene setup for three.js: scenes, cameras, the renderer, the animation loop, and object transforms.
- skills.sh installs
- 24.2K
- GitHub stars
- 4.3K
- last updated
- Aug 21, 2026
What it does
- Covers scene and fog setup, four camera types, WebGLRenderer configuration, and Object3D hierarchies and transforms
- Includes import-map setups for both WebGLRenderer and WebGPURenderer with TSL, targeting three.js r186
- Enforces
updateProjectionMatrix()after changing camera fov, aspect, near, or far values - Designed for developers creating a three.js scene from scratch, configuring cameras or renderers, or arranging objects
Install
$ npx -y skills add cloudai-x/threejs-skills --skill threejs-fundamentals -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Three.js Fundamentals
Targets three.js r186. Examples use WebGLRenderer; the WebGPU and TSL section uses WebGPURenderer.
Quick Start
import * as THREE from "three";
const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x111318);
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.set(0, 1.5, 5);
const cube = new THREE.Mesh(
new THREE.BoxGeometry(1, 1, 1),
new THREE.MeshStandardMaterial({ color: 0x3a86ff }),
);
scene.add(cube);
const light = new THREE.DirectionalLight(0xffffff, 2);
light.position.set(3, 4, 5); // shines from its position toward the origin
scene.add(light);
scene.add(new THREE.AmbientLight(0xffffff, 0.4));
const timer = new THREE.Timer();
timer.connect(document); // freezes the delta while the tab is hidden
Details
- Repository
- github.com/cloudai-x/threejs-skills
- Categories
- 3D, CAD & Modeling, Frontend & UI Code
More from cloudai-x/threejs-skills
All 10Similar to Threejs Fundamentals
More 3D, CAD & Modeling
threejs-webglfreshtechbro/claudedesignskills5.3K installsComprehensive Three.js guide for building WebGL and WebGPU scenes with cameras, lights, materials, and loaders.
threejs-skillssickn33/agentic-awesome-skills684 installsCreate interactive 3D scenes and WebGL visuals with Three.js, from geometry and lighting to animation.
threejs-3d-graphicsomer-metin/skills-for-antigravity477 installsReference-grounded Three.js and WebGL guidance covering scene setup, custom shaders, performance, and asset loading.
threejssecondsky/claude-skills489 installsComprehensive Three.js knowledge base covering scene setup, geometry, materials, lighting, shaders, loaders, and interaction.
babylonjs-enginefreshtechbro/claudedesignskills2.8K installsComprehensive Babylon.js 3D engine guide covering scenes, cameras, lighting, meshes, and materials for real-time web rendering.
threejs-lightingcloudai-x/threejs-skills19.6K installsLighting reference for three.js covering light types, shadow maps, environment lighting, and performance tuning.