mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
This commit is contained in:
parent
d8a627c58a
commit
3eb4eb3009
2 changed files with 10 additions and 6 deletions
|
|
@ -200,7 +200,7 @@ local function spring<T>(source: () -> T, period: number?, damping_ratio: number
|
|||
return function()
|
||||
track(output)
|
||||
return output.cache
|
||||
end
|
||||
end, data
|
||||
end
|
||||
|
||||
local function step_springs(dt: number)
|
||||
|
|
@ -224,6 +224,9 @@ local function step_springs(dt: number)
|
|||
local ff_123 = u_123*-c
|
||||
local ff_456 = u_456*-c
|
||||
|
||||
|
||||
--assert(math.abs(fs_123.X) >= (math.abs(ff_123.X)), "damping exceeds restoring")
|
||||
|
||||
-- calculate acceleration step
|
||||
local dv_123 = (fs_123 + ff_123)*dt
|
||||
local dv_456 = (fs_456 + ff_456)*dt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue