threejs-skills

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

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/Aadi-110i/PEP-PROJECT --skill threejs-skills-aadi-110i
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-skills
Source: https://github.com/Aadi-110i/PEP-PROJECT/tree/main/skills/threejs-skills
Command: npx skills add https://github.com/Aadi-110i/PEP-PROJECT --skill threejs-skills-aadi-110i

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires three, gsap.

What problem does it solve? Building 3D graphics in the browser requires coordinating scenes, cameras, renderers, lighting, and animation loops, and small mistakes like missing lights or unhandled resize events produce blank screens or broken experiences. ## Core Features & Use Cases - Scene Setup Patterns: Provides canonical initialization code for scene, camera, renderer, import maps, and animation loops using modern Three.js r183 practices. - Interaction & Effects: Covers OrbitControls, raycasting for object selection, particle systems, mouse-driven camera movement, shadows, fog, and tone mapping. - Performance & Production Guidance: Includes instanced meshes, level of detail, GSAP animation integration, scroll-based interactions, and WebGPU renderer options. - Use Case: A user asks for an interactive rotating product viewer on a webpage; the Skill supplies the full setup with OrbitControls, lighting, resize handling, and a smooth animation loop. ## 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?

Create a THREE.Scene, a PerspectiveCamera, and a WebGLRenderer, then add meshes built from geometry and material to the scene. Render continuously inside renderer.setAnimationLoop and handle window resize to keep the camera aspect ratio correct.

How to add mouse interaction to Three.js objects?

Use THREE.Raycaster with a normalized mouse Vector2 to detect clicks and hovers on meshes. Call raycaster.setFromCamera with the camera, then intersectObjects against your clickable meshes to find the targeted object.

Why is my Three.js scene showing a black screen?

A black screen usually means objects were not added to the scene, the camera is inside the geometry, renderer.render is never called, or lit materials like MeshStandardMaterial are used without any lights. Check each of these in order.

Should I use THREE.Clock or THREE.Timer for animations?

THREE.Timer is recommended over THREE.Clock as of Three.js r183. Timer pauses when the tab is hidden, has a cleaner API, and integrates better with setAnimationLoop for frame-delta-based animation.

Can I use Three.js without a build tool like Vite?

Yes, use an HTML import map pointing to the three module and three/addons on a CDN such as jsDelivr, then write module scripts directly in the page. This suits prototypes and demos, while production apps benefit from npm with Vite or webpack.

How do I improve Three.js rendering performance?

Reuse geometries and materials, use InstancedMesh for many identical objects, apply THREE.LOD for distance-based detail, and keep particle counts moderate. Dispose of geometries, materials, and textures when removing objects.