You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from one of the Maps episodes, i made a function fnl that would 'funnel' a continuous change by turning it into discrete steps & calling a function at each point.
it is primarily focused at ii devices where you may want to step a parameter in a smooth way, but only have a discretely stepped function call available. thus the function could be ii.funnel or ii.fnl. special care should be paid to interaction with timeline.
it is somewhere between ASL and timeline, and i wonder if there is a way to unify it into the timeline module?
-- call a function repetitively in time-- the arg to the function is interpolated fps times per second-- dest_ms is a table of `to()` calls for ASL-like sequencesfunctionfnl(fn, origin, dest_ms, fps)
returnclock.run(function()
fps=fpsor15-- defaultlocalspf=1/fps-- seconds per framefn(origin)
for_,vinipairs(dest_ms) dolocalcount=math.floor(v[3] *fps) -- number of iterationslocalstepsize= (v[2]-origin) /count-- how much to increment by each iterationwhilecount>0doclock.sleep(spf)
origin=origin+stepsize-- move toward destinationcount=count-1-- count iterationfn(origin)
endendend)
end
The text was updated successfully, but these errors were encountered:
from one of the Maps episodes, i made a function
fnl
that would 'funnel' a continuous change by turning it into discrete steps & calling a function at each point.it is primarily focused at
ii
devices where you may want to step a parameter in a smooth way, but only have a discretely stepped function call available. thus the function could beii.funnel
orii.fnl
. special care should be paid to interaction withtimeline
.it is somewhere between ASL and timeline, and i wonder if there is a way to unify it into the
timeline
module?from here:
The text was updated successfully, but these errors were encountered: