threejs-interaction

Implement raycasting and input handling for interactive Three.js scenes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you add reliable user interaction to Three.js scenes without reinventing the same input, selection, and camera-control logic for every project.

Core Features & Use Cases

  • Raycasting and Selection: Detect clicks, hover states, and object hits with mouse or touch input.
  • Camera and Navigation Controls: Configure OrbitControls, FlyControls, PointerLockControls, and other movement patterns for different 3D experiences.
  • Transform and Drag Workflows: Attach gizmos, drag objects, and manage selection state in editors, demos, and interactive product visualizations.
  • Use Case: A developer building a portfolio scene can use this Skill to make 3D objects clickable, highlight hovered meshes, and let visitors orbit around the scene smoothly.

Quick Start

Use the threejs-interaction skill to add raycast-based object selection and OrbitControls to your current Three.js scene.

Frequently Asked Questions about threejs-interaction

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

FAQPage Schema
How do I add raycasting and object selection to a Three.js scene?

Raycasting and object selection in a Three.js scene are implemented by detecting pointer hits against meshes, enabling click selection, hover feedback, and interactive state changes. This handles input event normalization and hit detection automatically.

What's the best way to configure OrbitControls for Three.js camera movement?

Configuring OrbitControls for Three.js involves attaching the control module to the camera and DOM element to manage rotation, zoom, and pan interactions. This Skill configures OrbitControls and normalizes pointer and touch events for responsive camera movement.

Does Three.js support touch input for 3D object interaction?

Three.js supports touch input for 3D object interaction through normalized pointer events that map touch coordinates to 3D raycasts. This Skill provides touch event normalization, enabling reliable tap selection and drag workflows on mobile devices.

How do I handle drag and transform workflows for selected meshes in Three.js?

Drag and transform workflows for selected meshes in Three.js require managing selection state and attaching gizmos to targeted objects. This Skill manages selection state and provides coordinate conversion utilities for transforming objects in editors and visualizations.

Can I use Three.js raycasting with both mouse and keyboard movement controls?

Three.js raycasting works simultaneously with keyboard movement controls by separating pointer hit detection from camera navigation logic. This Skill supports click selection, hover feedback, and keyboard movement patterns within the same interactive scene.