threejs-skills

Create interactive 3D scenes, animations, and WebGL visualizations using Three.js.

1|Updated Aug 17, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/mdconverter --skill threejs-skills-ratnesh-maurya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-skills
Source: https://github.com/ratnesh-maurya/mdconverter/tree/main/.claude/skills/threejs-skills
Command: npx skills add https://github.com/ratnesh-maurya/mdconverter --skill threejs-skills-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building 3D graphics in the browser requires coordinating scenes, cameras, renderers, lighting, and animation loops, and small mistakes like incompatible CDN versions or missing lights cause blank screens and broken experiences. ## Core Features & Use Cases - Scene Setup Patterns: Provides correct Three.js r128 CDN imports, scene/camera/renderer initialization, and animation loop templates. - Interaction & Effects: Includes raycasting for object selection, custom camera controls, particle systems, shadows, fog, and texture loading. - Pitfall Avoidance: Documents r128 incompatibilities such as OrbitControls and CapsuleGeometry, plus troubleshooting for black screens and performance issues. - Use Case: When a user asks for an interactive rotating 3D product viewer or a particle-based data visualization, this Skill guides the AI to produce working, responsive Three.js code on the first attempt. ## Quick Start Create an interactive 3D sphere that rotates and responds to mouse movement using Three.js.

Frequently Asked Questions about threejs-skills

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

FAQPage Schema
How do I create a 3D scene with Three.js in the browser?

Create a THREE.Scene, a PerspectiveCamera, and a WebGLRenderer, then add meshes built from geometry and materials. Run a requestAnimationFrame loop that calls renderer.render(scene, camera) each frame to display the scene.

How to detect clicks on 3D objects in Three.js?

Use THREE.Raycaster with a normalized mouse Vector2, call raycaster.setFromCamera(mouse, camera), then intersectObjects on your clickable meshes. The first intersected object is the one the user clicked.

Why is OrbitControls not working with the Three.js CDN?

THREE.OrbitControls is an example module not included in the r128 CDN build, so importing it fails. Implement custom drag-and-scroll camera controls with mouse event listeners instead.

Why does my Three.js scene show a black screen?

A black screen usually means objects were not added to the scene, the camera is inside the geometry, lit materials have no lights, or renderer.render() is never called. Check each of these in order.

Can I use CapsuleGeometry with Three.js r128?

No, CapsuleGeometry was introduced in r142 and is unavailable in r128. Combine a CylinderGeometry with two SphereGeometry caps, or build custom BufferGeometry vertices as an alternative.

How do I improve Three.js rendering performance?

Reuse geometries and materials across meshes, limit particle counts to a few thousand, lower geometry segment counts, and dispose of unused geometry, materials, and textures. For many identical objects, use InstancedMesh.