Skip to content

v0.5.0: Luau migration, quaternion CFrame springs, declarative hooks#17

Merged
OutOfBears merged 6 commits into
mainfrom
release/v0.5.0
Jun 10, 2026
Merged

v0.5.0: Luau migration, quaternion CFrame springs, declarative hooks#17
OutOfBears merged 6 commits into
mainfrom
release/v0.5.0

Conversation

@OutOfBears

@OutOfBears OutOfBears commented Jun 9, 2026

Copy link
Copy Markdown
Owner
  • Luau migration — renamed every .lua file to .luau and switched the toolchain from aftman.toml to rokit.toml, with a .luaurc for the new Luau-native config.
  • String require paths — converted every internal require(script.Parent.Foo) to string-based requires (e.g. require("@self/Hooks/useFoo")), matching the modern Luau / Lune workflow.
  • Quaternion-based CFrame interpolation — new Utility/Quaternion module (fromMatrix + canonicalize) drives CFrame lerping in LinearValue, so spring/tween CFrame animations now follow the shortest-arc rotation instead of interpolating raw rotation-matrix entries. Added test/CFrameValues.story.luau exercising under/critically/overdamped CFrame springs alongside a LinearValue CFrame lerp.
  • useSpringValue / useTweenValue hooks — declarative counterparts to useSpring and useTween (closes Addition of a declarative API alongside the currently imperative one #14). Pass target (and speed/damper) directly in the hook props and the animation re-targets on prop change — no update({ target = … }) calls needed. The imperative hooks are unchanged; pick whichever fits the callsite. start is mount-only so re-renders smoothly retarget from the current value instead of snapping back.
  • useTransparencyModifier hook — new hook for composing transparency values (numbers, NumberSequences, and bindings) through a multiplier, with epsilon clamping at the 0/1 endpoints.
  • Shared PooledConnection utility — extracted the RenderStepped pooling logic previously duplicated in SpringValue and Tween into Utility/PooledConnection, keyed by source signal so multiple consumers share a single connection. Fixes the multi-instance render loop leak (closes [BUG] RenderStep name collision #16): the pooled connection now correctly disconnects when its callback set drains, so running multiple react-flow instances (or repeatedly mounting/unmounting) no longer leaves orphaned render-step subscribers running in the background.
  • Centralized Types module — moved shared type definitions (LinearValueType, SpringProperties, TweenProperties, Binding, TransparencyValue, etc.) into src/Types.luau so animations, utilities, and hooks all reference the same source of truth.
  • camelCase API — animation and value objects (LinearValue, SpringValue, Spring, Tween, BaseAnimation) moved from PascalCase metatable methods to camelCase methods on plain tables (Play/Stop/SetGoalplay/stop/setGoal, etc.). Hooks updated to match. Note: this is a breaking change for callers using the value/animation classes directly.
  • LinearValueType trimmed — dropped Rect, Ray, Region3, and Region3int16; the new constructor/deconstructor table only covers types we actually interpolate.
  • Version bump — bumped wally.toml to 0.5.0.

…tions

- Added TransitionFragment component for managing child transitions.
- Implemented useAnimation hook for handling animations.
- Created useBindings hook for subscribing to binding updates.
- Developed useGroupAnimation and useSequenceAnimation hooks for grouped and sequenced animations.
- Introduced useSpring and useTween hooks for spring and tween animations.
- Added useTransparencyModifier hook for dynamic transparency adjustments.
- Created LinearValue utility for handling various value types in animations.
- Implemented SpringValue utility for managing spring physics in animations.
- Updated init files to reflect new structure and imports.
- Added comprehensive tests for animation hooks and components.
- Bumped version to 0.5.0 in wally.toml.
@OutOfBears OutOfBears changed the title v0.5.0: Luau migration, string requires, and multi-instance render fix v0.5.0: Luau migration, declarative spring/tween hooks, and multi-instance render fix Jun 9, 2026
@OutOfBears OutOfBears linked an issue Jun 9, 2026 that may be closed by this pull request
- Add Utility/Quaternion with fromMatrix + canonicalize helpers, and
  switch LinearValue's CFrame path to lerp via quaternion components
  instead of raw rotation matrix entries. This produces correct
  shortest-arc rotation interpolation for spring/tween CFrame values.
- Extract the RenderStepped pooling logic shared by SpringValue and
  Tween into Utility/PooledConnection, keyed by the source signal so
  multiple consumers share a single connection.
- Introduce src/Types.luau as the single source of truth for shared
  types (LinearValueType, SpringProperties, TweenProperties, Binding,
  TransparencyValue, etc.) and update call sites to import from it.
- Convert the public surface from PascalCase methods + metatables to
  camelCase methods on plain tables (Play/Stop/SetGoal → play/stop/
  setGoal, etc.) across LinearValue, SpringValue, Base/Spring/Tween
  animations, and the hooks that drive them.
- Drop Rect, Ray, Region3, and Region3int16 from LinearValueType — the
  new constructor/deconstructor table only covers types we actually
  interpolate.
- Add test/CFrameValues.story.luau exercising under/critically/
  overdamped springs plus a LinearValue lerp on CFrames.
@OutOfBears OutOfBears changed the title v0.5.0: Luau migration, declarative spring/tween hooks, and multi-instance render fix v0.5.0: Luau migration, quaternion CFrame springs, declarative hooks Jun 10, 2026
@OutOfBears
OutOfBears merged commit a7975e9 into main Jun 10, 2026

@MagikManz MagikManz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] RenderStep name collision Addition of a declarative API alongside the currently imperative one [BUG] Wrong type for useTween subProps

2 participants