threejs-fundamentals

Configure Three.js scenes, cameras, renderers, and Object3D hierarchies.

Updated May 18, 2026
One-click install
npx skills add https://github.com/yogaprasetya22/mmorpg --skill threejs-fundamentals-yogaprasetya22
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-fundamentals
Source: https://github.com/yogaprasetya22/mmorpg/tree/main/frontend/.agents/skills/threejs-fundamentals
Command: npx skills add https://github.com/yogaprasetya22/mmorpg --skill threejs-fundamentals-yogaprasetya22

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Three.js projects often stall because developers need a reliable starting point for scenes, cameras, renderers, and object transforms in the correct hierarchy and coordinate system.

Core Features & Use Cases

  • Scene & Rendering Setup: Establish a Three.js Scene with appropriate background/environment/fog and initialize a WebGLRenderer for consistent visual output.
  • Camera Configuration: Choose and configure PerspectiveCamera, OrthographicCamera, and advanced camera approaches like ArrayCamera and CubeCamera for reflections.
  • Object3D Hierarchies & Transforms: Build and manage Object3D hierarchies (e.g., Group, Mesh) while controlling local vs world transforms using vectors/quaternions/matrices.

Quick Start

Use the threejs-fundamentals skill to create a basic scene with a PerspectiveCamera, a WebGLRenderer attached to the DOM, a lit cube mesh, and a resize-aware animation loop.

Frequently Asked Questions about threejs-fundamentals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a Three.js scene with a camera and WebGL renderer?

You can establish a Three.js Scene with background and fog, configure a PerspectiveCamera or OrthographicCamera, and initialize a WebGLRenderer attached to the DOM for consistent visual output in browser-based 3D applications.

What is the correct way to manage Object3D hierarchies and transforms in Three.js?

Object3D hierarchies in Three.js are managed by grouping Mesh objects and controlling local versus world transforms using vectors, quaternions, and matrices for accurate scene positioning.

Why does my Three.js camera projection break during responsive resizing?

Responsive resizing in Three.js requires updating the camera aspect ratio and calling updateProjectionMatrix, alongside adjusting the WebGLRenderer size to maintain correct camera projection in real-time rendering loops.

When do I need a CubeCamera or ArrayCamera in Three.js?

Advanced camera approaches like CubeCamera are needed for rendering real-time reflections, while ArrayCamera allows rendering a scene from multiple viewpoints simultaneously within your Three.js 3D application.

Does Three.js use a specific coordinate system for object placement?

Three.js requires right-handed coordinate-system awareness for accurate object placement, ensuring that transform queries and Object3D hierarchy configurations align correctly within the 3D rendering space.

What are the limitations of using basic Three.js scene setup for complex applications?

Basic Three.js scene setup is suitable for level prototyping and editor-style tooling, but complex applications require manual render loop orchestration, proper cleanup practices, and precise world transform queries to avoid performance bottlenecks.