Skip to content

Commit b34bb28

Browse files
committed
docs: adds migration guide for refactoring changes
1 parent 7008a0e commit b34bb28

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: "Some bevy_camera primitives moved to bevy_math"
3+
pull_requests: [22684]
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+
```

0 commit comments

Comments
 (0)