threejs-interaction

Add raycasting, camera controls, and object manipulation to Three.js scenes.

2.9k|336|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/CloudAI-X/threejs-skills --skill threejs-interaction-cloudai-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-interaction
Source: https://github.com/CloudAI-X/threejs-skills/tree/main/skills/threejs-interaction
Command: npx skills add https://github.com/CloudAI-X/threejs-skills --skill threejs-interaction-cloudai-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables users to add interactive elements to their Three.js scenes, allowing for user input and dynamic scene manipulation.

Core Features & Use Cases

  • User Input Handling: Detects mouse clicks, touch events, and keyboard inputs.
  • Object Selection & Manipulation: Implements raycasting for object picking, selection boxes, and transform gizmos (translate, rotate, scale).
  • Camera Controls: Provides various camera control schemes like Orbit, Fly, FirstPerson, and PointerLock.
  • Use Case: Create a 3D product configurator where users can click on different parts to change their color or texture, and use mouse controls to view the product from all angles.

Quick Start

Use the threejs-interaction skill to add OrbitControls to your scene and enable raycasting for object selection.

Frequently Asked Questions about threejs-interaction

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

FAQPage Schema
How do I make 3D objects in a Three.js scene clickable for user interaction?

You can make 3D objects clickable by implementing raycasting to detect mouse clicks and touch events. This enables object picking and selection within your Three.js scene, allowing users to interact directly with specific meshes.

What camera controls can I use for navigating a Three.js 3D scene?

You can use various camera controls including Orbit, Fly, FirstPerson, and PointerLock modules. These schemes allow users to navigate and manipulate the camera view dynamically within Three.js applications.

How do I add transform gizmos to manipulate 3D objects in Three.js?

You can add transform gizmos to translate, rotate, and scale 3D objects by integrating specialized control modules. These gizmos enable direct manipulation of selected objects within your Three.js scene.

Can I detect user input like keyboard and touch events in Three.js applications?

Yes, you can detect user input by attaching event listeners for mouse clicks, touch events, and keyboard inputs. This functionality integrates with existing Three.js scenes to provide dynamic user experiences.

What's the best way to build a 3D product configurator with Three.js?

Building a 3D product configurator involves combining raycasting for object selection with camera controls like OrbitControls. This lets users click parts to change color or texture and view the product from all angles.

Why do I need raycasting for object selection in Three.js?

Raycasting is needed for object selection because it calculates intersections between a projected line from the camera and 3D meshes. This mechanism accurately identifies which object a user clicked in the Three.js scene.