What problem does it solve?
It solves the challenge of turning a Three.js 3D scene into an interactive UI by mapping mouse/touch input to objects, camera controls, and selectable/hoverable elements.
Core Features & Use Cases
- Raycasting-based object picking: Detect which 3D object the user points at to support click selection, hover feedback, and interaction routing.
- Camera controls integration: Add common control schemes like OrbitControls, FlyControls, FirstPersonControls, PointerLockControls, MapControls, and more to enable navigation.
- Coordinate conversion utilities: Convert between world and screen coordinates to position HTML overlays or translate user input into 3D positions.
- Selection and input event patterns: Implement practical event handling for click/hover selection, box selection, and keyboard state updates for interaction-driven gameplay.
Quick Start
Build object selection by creating a Raycaster, converting pointer coordinates to normalized device coordinates, raycasting from the camera, and handling the first intersection from your scene.