BezierUtils
Make interpolation curves like CSS
- A good place to generate and test these out: http://cubic-bezier.com/
- Based upon https://gist.github.com/gre/1926947#file-keyspline-js
local ease = BezierUtils.createBezierFactory(0.25, 0.1, 0.25, 1)
for i = 0, 1.05, 0.05 do
print(i, ":", ease(i))
end
Functions
createBezierFactory
BezierUtils.
createBezierFactory
(
p1x:
number
,
p1y:
number
,
p2x:
number
,
p2y:
number
) →
(
aX:
number
)
→
number
Creates a new bezier factory which can smoothly translate between 0 to 1.