File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
release-content/migration-guides Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : " Some bevy_camera primitives moved to bevy_math"
3+ pull_requests : []
4+ ---
5+
6+ ` bevy_camera::primitives::HalfSpace ` has moved to ` bevy_math::primitives::HalfSpace ` .
7+ Some parts of ` bevy_camera::primitives::Frustum ` has moved to ` bevy_math::primitives::ViewFrustum ` .
8+
9+ ` bevy_camera ` has some rendering primitives that can be extracted to be more generally useful.
10+ To expose them for others to use, some of these primitives and/or functionality have moved to ` bevy_math ` .
11+
12+ ``` rust
13+ // 0.18
14+ use bevy_camera :: primitives :: {Frustum , HalfSpace }
15+ let half_spaces: [HalfSpace ; 6 ] = ... ;
16+ let frustum_one : Frustum = Frustum {
17+ half_spaces
18+ };
19+ let frustum_two : Frustum = Frustum :: from_clip_from_world (... );
20+
21+ // 0.19
22+ use bevy_math :: primitives :: {HalfSpace , ViewFrustum }
23+ use bevy_camera :: primitives :: Frustum
24+ let half_spaces: [HalfSpace ; 6 ] = ... ;
25+ let frustum_one : Frustum = Frustum (
26+ ViewFrustum {
27+ half_spaces
28+ });
29+ let frustum_two : Frustum = Frustum (ViewFrustum :: from_clip_from_world (... ));
30+ ```
You can’t perform that action at this time.
0 commit comments