What problem does it solve?
Three.js hero sections often feel static, but adding OrbitControls turns them into product viewers that fight the page layout. This Skill shows how to add restrained, cinematic pointer-driven depth that enhances a composition without breaking it.
Core Features & Use Cases
- Damped Pointer Orbit: Records one normalized pointer target and damps it with a refresh-rate-independent 0.055-per-frame lerp, then splits it across camera translation, a 42% carried look-at, and unequal near/far object rotations.
- Performance & Lifecycle Guardrails: Caches layout via ResizeObserver, rounds settled values to skip redundant writes, caps DPR at 2, clamps dt to 1/30 s, and pauses when hidden or offscreen.
- Accessibility Support: Ignores touch pointers, returns smoothly to center on pointer leave, provides keyboard-operable X/Y range controls, and renders a designed still under prefers-reduced-motion.
- Use Case: A landing page hero with a procedural 3D model needs subtle depth as the mouse moves, while the headline, cards, and pinned landmarks stay composed at every breakpoint from 390px to 1440px.
Quick Start
Ask your agent to use the add-mouse-driven-orbit skill to add restrained pointer-driven depth to your Three.js hero without OrbitControls.