From 6cf770df4e4742cb606635d406098337ae7c3b80 Mon Sep 17 00:00:00 2001 From: aaron <83140718+centau@users.noreply.github.com> Date: Thu, 27 Mar 2025 23:41:01 +0000 Subject: [PATCH] Add spring support for array of numbers --- src/spring.luau | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/spring.luau b/src/spring.luau index 988bc00..3f2975a 100644 --- a/src/spring.luau +++ b/src/spring.luau @@ -74,7 +74,11 @@ local type_to_vec6 = { Rect = function(v) return vector.create(v.Min.X, v.Min.Y, v.Max.X), vector.create(v.Max.Y, 0, 0) - end :: TypeToVec6 + end :: TypeToVec6, + + table = function(v) + return vector.create(v[1] or 0, v[2] or 0, v[3] or 0), vector.create(v[4] or 0, 0, 0) + end :: TypeToVec6<{ number }> } local vec6_to_type = { @@ -108,7 +112,11 @@ local vec6_to_type = { Rect = function(a, b) return Rect.new(a.X, a.Y, a.Z, b.X) - end :: Vec6ToType + end :: Vec6ToType, + + table = function(a, b) + return { a.X, a.Y, a.Z, b.X } + end :: Vec6ToType<{ number }> } local invalid_type = {