mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
use spaces instead of tabs for identing
This commit is contained in:
parent
c73cc4bc39
commit
82debeeffe
1 changed files with 17 additions and 17 deletions
|
|
@ -203,25 +203,25 @@ local function spring<T>(source: () -> T, period: number?, damping_ratio: number
|
|||
|
||||
return function(...)
|
||||
if select("#", ...) == 0 then -- no args were given
|
||||
push_child_to_scope(output)
|
||||
return output.cache
|
||||
end
|
||||
push_child_to_scope(output)
|
||||
return output.cache
|
||||
end
|
||||
|
||||
-- set current position to value
|
||||
local v = ... :: T
|
||||
data.x0_123, data.x0_456 = type_to_vec6[typeof(v)](v)
|
||||
|
||||
-- reset velocity
|
||||
data.v_123 = ZERO
|
||||
data.v_456 = ZERO
|
||||
|
||||
-- schedule spring
|
||||
springs[data] = output
|
||||
-- set current position to value
|
||||
local v = ... :: T
|
||||
data.x0_123, data.x0_456 = type_to_vec6[typeof(v)](v)
|
||||
|
||||
-- set output to value
|
||||
output.cache = v
|
||||
|
||||
return v
|
||||
-- reset velocity
|
||||
data.v_123 = ZERO
|
||||
data.v_456 = ZERO
|
||||
|
||||
-- schedule spring
|
||||
springs[data] = output
|
||||
|
||||
-- set output to value
|
||||
output.cache = v
|
||||
|
||||
return v
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue