Fusion
Fusion copied to clipboard
Add support for Bezier curves.
These are super flexible (probably more so than springs) which is why they should be added.
I assume you're talking about cubic Bezier curves, similar to how they might be implemented in CSS?
I think it'd be good to include some hypothetical usage, so here's how I think an API like this could work:
local position = UDim2.fromScale(0.25, 0.25)
local smoothPosition = Bezier(position, Vector2.new(0.17, 0), Vector2.new(0.02, 0.97))
-- 2 control points for cubic Bezier easing curve - starts at (0, 0) and ends at (1, 1)
-- could be replaced by state objects containing Vector2s!
-- X coordinates are clamped between 0 and 1 to ensure one Y solution for every X between 0 and 1
That's exactly what I'd want. I'd do it how it was done in BoatTween (although there is an error on it) instead of Vector2s though.
Blocked by #87
Merging with #87