Skip to content

v0.11.0 - Look Around

Choose a tag to compare

@kvvasuu kvvasuu released this 23 Sep 21:26
· 216 commits to main since this release

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. InputSystem collects raw pointer/wheel/touch/Pointer Lock deltas per element; InputAxis shapes 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/range limits, and idle recentering back to center.
  • maxSpeed on every damping prop (Body/Aim/Extension) and on BlendDefinition's damping blend - caps how fast damping can close a gap, independent of the time constant itself.

⚠️ Breaking Changes

  • useVirtualCameraSlots()/useVirtualCameraState() merged into one useVirtualCamera() - returns { controller, state, initialState } instead of two separate hooks. controller replaces the old VirtualCameraSlots return value; initialState (the raw prop, not the already-seeded CameraState) is newly reachable this way.
  • useKlippCore() replaced by useKlipp() - returns { core, registerUpdate, initialCameraState } instead of just the core directly; grab it via useKlipp().core.

🐛 Bug Fixes

  • Follow/PositionComposer/RotationComposer/RotateWithFollowTarget now actually respect initialState - 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-staged pre-commit hook + a prettier --check step in CI.
  • Hooks/contexts split out of VirtualCamera.tsx/Klipp.tsx/InputController.tsx into their own files, for React Fast Refresh compliance.
  • VirtualCameraEventsProps/KlippEventsProps deduplicated 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