Closed cart closed 1 week ago
I don't feel particularly strongly about this either way, but some notes here about why these are this way:
Curve
API was first conceived, most of the curve return types of adaptor methods were erased. I moved away from that later for various reasons, but this is sort of a vestige of that.EasingCurve
/FunctionCurve
/ConstantCurve
namespaces are effectively otherwise useless.
Objective
We currently use special "floating" constructors for
EasingCurve
,FunctionCurve
, andConstantCurve
(ex:easing_curve
). This erases the type being created (and in general "what is happening" structurally), for very minimal ergonomics improvements. With rare exceptions, we prefer normalX::new()
constructors over floatingx()
constructors in Bevy. I don't think this use case merits special casing here.Solution
Add
EasingCurve::new()
, use normal constructors everywhere, and remove the floating constructors.I think this should land in 0.15 in the interest of not breaking people later.