threejs-interaction

Implement raycasting, camera controls, and mouse/touch input in Three.js scenes.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/hanzoai/video --skill threejs-interaction-hanzoai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-interaction
Source: https://github.com/hanzoai/video/tree/main/.agents/skills/threejs-interaction
Command: npx skills add https://github.com/hanzoai/video --skill threejs-interaction-hanzoai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Three.js interaction - raycasting, controls, mouse/touch input, object selection. Use when handling user input, implementing click detection, adding camera controls, or creating interactive 3D experiences.

Core Features & Use Cases

  • Raycasting for click detection
  • Camera controls (OrbitControls, etc.)
  • Input handling for mouse and touch
  • Object selection and interaction in 3D scenes

Quick Start

Create a basic Three.js scene and hook a Raycaster to click events to select objects.

Frequently Asked Questions about threejs-interaction

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

FAQPage Schema
How do I add mouse click detection to a Three.js scene using raycasting?

To add mouse click detection in a Three.js scene, you hook a Raycaster to pointer click events and evaluate intersections against scene objects. This enables interactive object selection directly from user mouse input.

Can I use OrbitControls to handle camera movement and touch input simultaneously?

Yes, you can use OrbitControls to handle camera movement and touch input simultaneously. The module maps touch and mouse input events to camera rotation, zoom, and pan controls, enabling real-time interactive 3D navigation.

What is the best way to implement 3D object selection in Three.js?

The best way to implement 3D object selection in Three.js is by utilizing Raycaster. It tracks mouse and touch input coordinates to intersect scene geometry, accurately registering which specific 3D object the user interacted with.

Do I need to manually manage touch input events for interactive 3D applications?

You do not need to manually manage touch input events entirely from scratch. This skill handles input event mapping for both mouse and touch, standardizing interaction logic so you can drive interactive 3D experiences efficiently.

Why does my Three.js raycasting return no intersections on object click?

Raycasting returns no intersections on object click when input coordinates are not properly normalized to the canvas or the target objects are excluded from the Raycaster evaluation. Accurate camera and input event mapping are required.