threejs-agents-scene-builder

Compose complete Three.js scenes using decision trees for lighting, materials, cameras, and post-processing.

1|Updated Aug 20, 2023
One-click install
npx skills add https://github.com/imanlangaran/mini-projects --skill threejs-agents-scene-builder-imanlangaran
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-agents-scene-builder
Source: https://github.com/imanlangaran/mini-projects/tree/main/react/three-gsap/.claude/skills/threejs-agents-scene-builder
Command: npx skills add https://github.com/imanlangaran/mini-projects --skill threejs-agents-scene-builder-imanlangaran

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a Three.js scene from scratch requires dozens of interdependent decisions about lighting, materials, cameras, controls, environments, and post-processing, and wrong choices cause visual artifacts, poor performance, or broken rendering. This Skill provides structured decision trees and ready-made scene recipes that map each use case to the correct configuration. ## Core Features & Use Cases - Master Decision Trees: Maps use cases (product viewer, architectural walkthrough, game level, data visualization, portfolio, CAD/BIM viewer, AR/XR) to complete scene recipes covering lighting, materials, camera, controls, and post-processing. - Configuration References: Provides physically correct light intensities, material selection matrices, camera FOV settings, OrbitControls defaults, and post-processing pipeline ordering for Three.js r160+. - Anti-Pattern Catalog: Documents common mistakes such as missing OutputPass, zero near-plane, undisposed materials, and PointLight shadow overuse, with concrete fixes. - Use Case: When asked to build a product configurator, the Skill directs you to a PerspectiveCamera with fov 40, a three-point studio lighting setup, an HDR studio environment, ContactShadows, and constrained OrbitControls, in either imperative Three.js or React Three Fiber. ## Quick Start Ask the AI to create a Three.js product viewer scene and it will select the appropriate recipe, lighting setup, camera, and controls for you.

Frequently Asked Questions about threejs-agents-scene-builder

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

FAQPage Schema
How do I set up a Three.js scene from scratch?

Follow the scene composition checklist: create a WebGLRenderer with antialias, set up the scene with background and environment, choose a camera per the decision tree, add lighting within the platform budget, load content, configure controls, enable shadows, and handle window resize. The Skill maps each use case to a complete recipe.

Should I use React Three Fiber or imperative Three.js?

Use React Three Fiber when the project already uses React or when rapid prototyping with reusable components matters. Use imperative Three.js for Vue, Svelte, vanilla JS projects, or when you need maximum control over the render loop.

Which Three.js material should I use for realistic rendering?

MeshStandardMaterial is the default choice for realistic PBR rendering. Only upgrade to MeshPhysicalMaterial when you need clearcoat, transmission, sheen, or iridescence, since it is significantly more expensive to render.

Why does my Three.js scene have z-fighting artifacts?

Z-fighting occurs when the near plane is set to zero or the near/far ratio is too large, exhausting depth buffer precision. Keep the ratio under 1:10000, and enable logarithmicDepthBuffer for CAD or BIM scenes with extreme depth ranges.

How many shadow-casting lights can Three.js handle on mobile?

Mobile platforms support only one shadow-casting light, which should be a DirectionalLight. Never use PointLight shadows on mobile because each one costs six shadow map renders per frame.

Can I use EffectComposer post-processing in WebXR scenes?

No, standard EffectComposer breaks the XR rendering pipeline by redirecting to its own framebuffers. Skip post-processing in XR or use XR-compatible effects, and always maintain 72-90 FPS to prevent motion sickness.