bevy/crates/bevy_gizmos
Carter Anderson 1bd1053b7d Use normal constructors for EasingCurve, FunctionCurve, ConstantCurve (#16367)
We currently use special "floating" constructors for `EasingCurve`,
`FunctionCurve`, and `ConstantCurve` (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 normal `X::new()` constructors over floating `x()`
constructors in Bevy. I don't think this use case merits special casing
here.

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.
2024-11-16 15:30:10 +01:00
..
macros Release 0.15.0-rc.3 2024-11-05 23:26:31 +01:00
src Use normal constructors for EasingCurve, FunctionCurve, ConstantCurve (#16367) 2024-11-16 15:30:10 +01:00
Cargo.toml Don't reëxport bevy_image from bevy_render (#16163) 2024-11-11 22:16:38 +01:00
README.md

Bevy Gizmos

License Crates.io Downloads Docs Discord