Repository navigation
v0.12.0 - Under the Hood
v0.12.0 - Under the Hood
A rewrite of the engine. The core now runs on math as plain data and functions, with no three.js or React. The React components and their props work as before.
✨ New Features
- Framework-agnostic core -
@kvvasuu/klipphas no dependencies beyondmath. Every Body, Aim, Extension and Noise is also available as a function (updateFollow,updateHardLookAt, ...), so klipp works with any engine, an ECS or your own loop. - One entry point per layer -
@kvvasuu/klipp(core),/three,/reactand/dom.threeis now an optional peer dependency too, needed only by/threeand/react. - Each target is read once per frame, however many cameras and pieces use it.
DebugOverlayin/domdraws composer and framing zones without React.- Runs in Node without a bundler - the build is now valid ESM.
⚠️ Breaking Changes
- three.js classes moved to
@kvvasuu/klipp/three-FollowBody,HardLookAtAimand the other Bodies/Aims,applyCameraState,copyCameraStateFromCamera,resolveTarget*,Vector3DamperandQuaternionDamper.@kvvasuu/klipp/camera-controlsis now@kvvasuu/klipp/three/camera-controls. - Vectors are arrays -
CameraStateand class fields likeoffsetuse[x, y, z]and[x, y, z, w]instead ofVector3andQuaternion. Props still accept both. BlendCurves.hardIn/hardOutrenamed tocubicIn/cubicOut, matchingmath.
🔄 Behavior Changes
- Damping uses
math's exact spring. Motion is slightly different from 0.11 (about 1% of a typical move), most noticeably after large jumps.
🐛 Bug Fixes
ImpulseFieldno longer grows without bound - expired impulses are now also dropped ongenerate, not only while a listener samples the field.
🔧 Internal Changes
- No per-frame allocations in the camera loop.
- Simpler docs and example scenes; the examples cap the canvas DPR at 1.5.
- Layer boundaries enforced by lint.
- Golden trajectory tests guard camera motion frame by frame.
- TypeScript 7, Vitest 5, three 0.186.
What's Changed
- Docs/rewrite by @kvvasuu in #56
- Chore/examples cleanup by @kvvasuu in #57
- Perf/allocation audit by @kvvasuu in #58
- Chore/migration safety net by @kvvasuu in #59
- Revert "Chore/migration safety net" by @kvvasuu in #60
- Refactor/layers by @kvvasuu in #72
- Refactor/body modules by @kvvasuu in #73
- refactor: RotateWithFollowTarget and PanTilt on math-only core functions by @kvvasuu in #74
- refactor: RotationComposer on math-only core functions by @kvvasuu in #76
- refactor: Lens and GroupFraming on math-only core functions by @kvvasuu in #77
- Refactor/noise modules by @kvvasuu in #79
- Refactor/aim modules by @kvvasuu in #80
- refactor: camera arbitration and blending as state plus functions by @kvvasuu in #81
- refactor: camera groups as state plus functions by @kvvasuu in #82
- refactor: input axes and input mapping as data plus functions by @kvvasuu in #84
- Chore/math canary by @kvvasuu in #85
- Refactor/math damping by @kvvasuu in #86
- Refactor/blend curves math by @kvvasuu in #87
- Chore/migration docs by @kvvasuu in #88
- Chore/bump dev deps by @kvvasuu in #89
Full Changelog: v0.11.0...v0.12.0