mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Add check for unstable spring parameters
This commit is contained in:
parent
a543a24865
commit
835f4d429b
2 changed files with 8 additions and 3 deletions
|
|
@ -48,14 +48,14 @@ local function main()
|
|||
local reset = "\27[H\27[2J" -- ANSI clear terminal
|
||||
local offset = string.rep("\n", MAX - fv + OFFSET)
|
||||
local bar = testkit.color.gray(remainder_to_block(v - fv) .. "\n" .. string.rep(BLOCK .. "\n", fv))
|
||||
print(reset .. offset .. bar)
|
||||
print(reset .. offset .. bar .. "\n" .. v)
|
||||
end)
|
||||
|
||||
local elapsed = 0
|
||||
local T = 3
|
||||
local elapsed = T/1.2
|
||||
repeat local dt = step()
|
||||
vide.step(dt)
|
||||
|
||||
local T = 3
|
||||
elapsed += dt
|
||||
while elapsed >= T do
|
||||
elapsed -= T
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue