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(...)
|
return function(...)
|
||||||
if select("#", ...) == 0 then -- no args were given
|
if select("#", ...) == 0 then -- no args were given
|
||||||
push_child_to_scope(output)
|
push_child_to_scope(output)
|
||||||
return output.cache
|
return output.cache
|
||||||
end
|
end
|
||||||
|
|
||||||
-- set current position to value
|
-- set current position to value
|
||||||
local v = ... :: T
|
local v = ... :: T
|
||||||
data.x0_123, data.x0_456 = type_to_vec6[typeof(v)](v)
|
data.x0_123, data.x0_456 = type_to_vec6[typeof(v)](v)
|
||||||
|
|
||||||
-- reset velocity
|
-- reset velocity
|
||||||
data.v_123 = ZERO
|
data.v_123 = ZERO
|
||||||
data.v_456 = ZERO
|
data.v_456 = ZERO
|
||||||
|
|
||||||
-- schedule spring
|
-- schedule spring
|
||||||
springs[data] = output
|
springs[data] = output
|
||||||
|
|
||||||
-- set output to value
|
-- set output to value
|
||||||
output.cache = v
|
output.cache = v
|
||||||
|
|
||||||
return v
|
return v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue