mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Improve docs
This commit is contained in:
parent
0e6e8300fb
commit
04e28f390d
13 changed files with 186 additions and 116 deletions
|
|
@ -97,6 +97,10 @@ local springs: { [SpringData<any>]: Node<any> } = {}
|
|||
setmetatable(springs, { __mode = "vs" })
|
||||
|
||||
local function spring<T>(target: () -> T, period: number?, damping_ratio: number?): () -> T
|
||||
if damping_ratio and damping_ratio > 1 then
|
||||
throw "damping ratio cannot be greater than 1"
|
||||
end
|
||||
|
||||
local inputs, initial_position = capture(target)
|
||||
|
||||
local output, output_get = create(initial_position)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue