| 1 |
--- |
| 2 |
title: "split out `bevy_curve` from `bevy_math`" |
| 3 |
pull_requests: [25380] |
| 4 |
--- |
| 5 |
|
| 6 |
`bevy_curve` is a new crate providing the data structures and traits to create |
| 7 |
and sample mathematical curves. This functionality is nothing new and was |
| 8 |
originally included in `bevy_math`. In an effort to clean up `bevy_math` it was |
| 9 |
split out in its own crate. |
| 10 |
|
| 11 |
The new crate means two things: |
| 12 |
|
| 13 |
- the `curve` feature in `bevy_math` (which was default-enabled) is gone now |
| 14 |
- imports have to be adjusted |
| 15 |
- from `bevy_math::curve::*` -> `bevy_curve::*` |
| 16 |
- from `bevy_math::cubic_splines::*` -> `bevy_curve::cubic_splines::*` |
| 17 |
- `bevy_math::Curve` was a top-level export, which is gone now and also just |
| 18 |
`bevy_curve::Curve` now. |
| 19 |
|
| 20 |
The crate is in the `bevy` default feature set, so if you use this, nothing |
| 21 |
should change. All the imports should be exported via `bevy::prelude::*` in |
| 22 |
that case. |
| 23 |
|
| 24 |
If you disable the default features, you have to enable `bevy/bevy_curve` now |
| 25 |
instead of `bevy_math/curve`. |