Skip to content

v0.10.0 - Recoil

Choose a tag to compare

@kvvasuu kvvasuu released this 16 Sep 18:25
· 277 commits to main since this release

v0.10.0 - Recoil

⚠️ Breaking Changes

  • ImpulseManager renamed to ImpulseField - same registry of world-space impulse events, new name.
  • Noise.ImpulseListener is now just ImpulseListener, imported directly - it's still mechanically a Noise-slot filler, but no longer presented as a Noise variant, since it's its own concept.
  • attackTime/sustainTime/decayTime replaced by shape + duration - generate() now takes a shape: ImpulseShape ((t) => number) instead of three separate linear-ramp times. Named presets live on ImpulseShapes.recoil/bump/explosion/rumble, or pass your own function.
  • ImpulseField.sampleAt() takes gain as a parameter and returns the felt strength, not a Vector3

✨ New Features

  • ImpulseListener gains shake - an optional secondary rattle, position and rotation, composing a BasicMultiChannelPerlinNoise whose amplitudeGain automatically follows the impulse's current strength every frame. The kick itself stays position-only; shake is how an explosion or rumble also pitches the camera.
  • ImpulseListener gains cameraSpace - rotates the sampled kick by the camera's current orientation, so the same direction always kicks the same way relative to where the camera is looking (weapon recoil, a landing thump), instead of a fixed world-space vector.

🔧 Internal Changes

  • New performance benchmarks for ImpulseField.sampleAt (1/10/50 concurrent events) and ImpulseListenerNoise.update (kick alone vs. with shake/cameraSpace, isolated).
  • docs/impulse/ is now its own top-level docs category instead of nested under docs/noise/.

What's Changed

Full Changelog: v0.9.0...v0.10.0