Author: Matthew (Creaco)
License: License.luau
Version: 1.0.0
Last Updated: 2025-07-16
Springs are a powerful tool for creating smooth and responsive animations.
Type T
must support the following operations:
-
Addition (
+
)
→add(T, T): T
-
Subtraction (
-
)
→sub(T, T): T
-
Multiplication (
×
)
→mul(T, number): T
-
Division (
÷
)
→div(T, number): T
Note: This is achievable using metamethods
__add
,__sub
,__mul
, and__div
for custom types.
- Render loop handling is your responsibility:
- You may keep a spring connected at all times, but this may lead to heavier computation.
- Consider creating a
SpringHandler
module to manage active spring connections. - Disconnect unused springs to reduce unnecessary performance costs.