Skip to content

Commit 3b3a0a2

Browse files
Add vector and standardmaterial changes to migration guide (#248)
* Add vector and standardmaterial changes to migration guide * Update content/learn/book/migration-guides/0.5-0.6/_index.md Changed 0.5 doc links to 0.6 Co-authored-by: Rob Parrett <[email protected]> * Update content/learn/book/migration-guides/0.5-0.6/_index.md Changed 0.5 doc links to 0.6 Co-authored-by: Rob Parrett <[email protected]> Co-authored-by: Rob Parrett <[email protected]>
1 parent 4f7819a commit 3b3a0a2

File tree

1 file changed

+18
-0
lines changed
  • content/learn/book/migration-guides/0.5-0.6

1 file changed

+18
-0
lines changed

content/learn/book/migration-guides/0.5-0.6/_index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,21 @@ The {{rust_type(type="struct" crate="bevy_ecs" mod="system" version="0.5.0" name
255255

256256
This was done to accommodate the new {{rust_type(type="struct" crate="bevy_ecs" mod="system" version="0.6.0" name="SystemState" no_mod=true)}} which allows easier cached access to {{rust_type(type="trait" crate="bevy_ecs" mod="system" version="0.6.0" name="SystemParam" no_mod=true plural=true)}} outside of a regular System.
257257
<!-- TODO: Link to entry for SystemState in the release blog post. -->
258+
259+
### Vector casting functions are now named to match return type
260+
The casting functions for {{rust_type(type="struct" crate="bevy" mod="math" version="0.6.0" name="IVec2" no_mod=true)}}, {{rust_type(type="struct" crate="bevy" mod="math" version="0.6.0" name="DVec2" no_mod=true)}}, {{rust_type(type="struct" crate="bevy" mod="math" version="0.6.0" name="UVec2" no_mod=true)}}, {{rust_type(type="struct" crate="bevy" mod="math" version="0.6.0" name="Vec2" no_mod=true)}} have all been changed from being named after their inner elements' cast target to what the entire "Vec" is being casted into. This affects all the different dimensions of the math vectors (i.e., {{rust_type(type="struct" crate="bevy" mod="math" version="0.6.0" name="Vec2" no_mod=true)}}, {{rust_type(type="struct" crate="bevy" mod="math" version="0.6.0" name="Vec3" no_mod=true)}} and {{rust_type(type="struct" crate="bevy" mod="math" version="0.6.0" name="Vec4" no_mod=true)}}).
261+
262+
```rust
263+
// 0.5
264+
let xyz: Vec3 = Vec3::new(0.0, 0.0, 0.0);
265+
let xyz: IVec3 = xyz.as_i32();
266+
267+
// 0.6
268+
let xyz: Vec3 = Vec3::new(0.0, 0.0, 0.0);
269+
let xyz: IVec3 = xyz.as_ivec3();
270+
```
271+
272+
### StandardMaterial's "roughness" is renamed to "perceptual_roughness"
273+
The {{rust_type(type="struct" crate="bevy_pbr" mod="" version="0.6.0" name="StandardMaterial" no_mod=true)}} field `roughness` was renamed to `perceptual_roughness`.
274+
275+

0 commit comments

Comments
 (0)