Repository navigation
v0.11.0 - Look Around
v0.11.0 - Look Around
Introducing the Input System and the first element based on it - the PanTilt aim.
✨ New Features
InputSystem/InputAxis/InputAxisController/<InputController>- a full input layer for building your own drag/scroll/touch-driven camera controls.InputSystemcollects raw pointer/wheel/touch/Pointer Lock deltas per element;InputAxisshapes a single value (gain, clamp, wrap, damping, idle recentering);InputAxisController/<InputController>map mouse buttons and touch counts onto named axes on any Body/Aim/Extension that exposes them.Aim.PanTilt- mouse/touch look-around (yaw/pitch) built on the new input layer, with an optional rotating reference frame,wrap/rangelimits, and idle recentering back to center.maxSpeedon everydampingprop (Body/Aim/Extension) and onBlendDefinition's damping blend - caps how fast damping can close a gap, independent of the time constant itself.
⚠️ Breaking Changes
useVirtualCameraSlots()/useVirtualCameraState()merged into oneuseVirtualCamera()- returns{ controller, state, initialState }instead of two separate hooks.controllerreplaces the oldVirtualCameraSlotsreturn value;initialState(the raw prop, not the already-seededCameraState) is newly reachable this way.useKlippCore()replaced byuseKlipp()- returns{ core, registerUpdate, initialCameraState }instead of just the core directly; grab it viauseKlipp().core.
🐛 Bug Fixes
Follow/PositionComposer/RotationComposer/RotateWithFollowTargetnow actually respectinitialState- their dampers used to snap straight to the first real target on activation, silently discarding the seeded starting pose. They now ease from it instead.
🔧 Internal Changes
- Prettier + a
lint-stagedpre-commit hook + aprettier --checkstep in CI. - Hooks/contexts split out of
VirtualCamera.tsx/Klipp.tsx/InputController.tsxinto their own files, for React Fast Refresh compliance. VirtualCameraEventsProps/KlippEventsPropsdeduplicated into one shared type.- Public docs stripped of leftover internal implementation detail.
- Simplified and cleaned comments.
What's Changed
- feat: add BlendCurves example scene by @kvvasuu in #44
- feat: add BlendHints example scene by @kvvasuu in #45
- Feat/examples blend damping custom by @kvvasuu in #46
- Feat/max speed by @kvvasuu in #47
- fix: PanTilt seeds pan/tilt from initialState.quaternion via new useVirtualCamera hook by @kvvasuu in #48
- fix: InputAxis recentering waits for release, not just no-delta, and fixes wait: 0 by @kvvasuu in #49
- Feat/pan tilt by @kvvasuu in #50
- Feat/input system by @kvvasuu in #51
- fix: Follow/PositionComposer/RotationComposer/RotateWithFollowTarget prime their dampers from initialState by @kvvasuu in #52
- Chore/prettier lint staged ci by @kvvasuu in #53
- Chore/public api and docs cleanup by @kvvasuu in #54
- Chore/comments cleanup by @kvvasuu in #55
Full Changelog: v0.10.0...v0.11.0