From 2518e292ed653dc9284b3b42a6d0cce31ee06451 Mon Sep 17 00:00:00 2001 From: centauri <83140718+centau@users.noreply.github.com> Date: Mon, 23 Jun 2025 21:58:54 +0100 Subject: [PATCH] Update spring docs --- docs/api/animation.md | 4 ++-- src/spring.luau | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/animation.md b/docs/api/animation.md index 8719753..9b5baf4 100644 --- a/docs/api/animation.md +++ b/docs/api/animation.md @@ -11,11 +11,11 @@ Returns a new source with a value always moving torwards the input source value. source: () -> T & Animatable, period: number = 1, damping_ratio: number = 1 - ): (() -> T, Setter) + ): (() -> T, SpringConfig) type Animatable = number | CFrame | Color3 | UDim | UDim2 | Vector2 | Vector3 | Rect - type Setter = ({ + type SpringConfig = ({ position: T?, velocity: T?, impulse: T? diff --git a/src/spring.luau b/src/spring.luau index 3f2975a..6e1ce1e 100644 --- a/src/spring.luau +++ b/src/spring.luau @@ -186,7 +186,7 @@ local function spring(source: () -> T, period: number?, damping_ratio: number -- set output to goal output.cache = data.source_value - local setter = function(p) + local config = function(p) local x = p.position local v = p.velocity local dv = p.impulse @@ -229,7 +229,7 @@ local function spring(source: () -> T, period: number?, damping_ratio: number output.cache = v return v - end, setter + end, config end local function step_springs(dt: number)