From 5837082a44bac4e2e0c24e6ac9c3131a0909eb5f Mon Sep 17 00:00:00 2001 From: mramirez Date: Sat, 8 Jan 2022 18:16:07 -0500 Subject: [PATCH 1/3] Add vector and standardmaterial changes to migration guide --- .../book/migration-guides/0.5-0.6/_index.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/content/learn/book/migration-guides/0.5-0.6/_index.md b/content/learn/book/migration-guides/0.5-0.6/_index.md index 480a6745ae..a2f871c75a 100644 --- a/content/learn/book/migration-guides/0.5-0.6/_index.md +++ b/content/learn/book/migration-guides/0.5-0.6/_index.md @@ -237,3 +237,21 @@ The {{rust_type(type="struct" crate="bevy_ecs" mod="system" version="0.5.0" name 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. + +### Vector casting functions are now named to match return type +The casting functions for {{rust_type(type="struct" crate="bevy" mod="math" version="0.5.0" name="IVec2" no_mod=true)}}, {{rust_type(type="struct" crate="bevy" mod="math" version="0.5.0" name="DVec2" no_mod=true)}}, {{rust_type(type="struct" crate="bevy" mod="math" version="0.5.0" name="UVec2" no_mod=true)}}, {{rust_type(type="struct" crate="bevy" mod="math" version="0.5.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)}}). + +```rust +// 0.5 +let xyz: Vec3 = Vec3::new(0.0, 0.0, 0.0); +let xyz: IVec3 = xyz.as_i32(); + +// 0.6 +let xyz: Vec3 = Vec3::new(0.0, 0.0, 0.0); +let xyz: IVec3 = xyz.as_ivec3(); +``` + +### StandardMaterial's "roughness" is renamed to "perceptual_roughness" +The {{rust_type(type="struct" crate="bevy_pbr" mod="" version="0.5.0" name="StandardMaterial" no_mod=true)}} field `roughness` was renamed to `perceptual_roughness`. + + From 720c33688d2f3d9aec3e8934ed7a12f15eac6054 Mon Sep 17 00:00:00 2001 From: mike Date: Sat, 8 Jan 2022 18:48:00 -0500 Subject: [PATCH 2/3] 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 --- content/learn/book/migration-guides/0.5-0.6/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/learn/book/migration-guides/0.5-0.6/_index.md b/content/learn/book/migration-guides/0.5-0.6/_index.md index a2f871c75a..a097bc8912 100644 --- a/content/learn/book/migration-guides/0.5-0.6/_index.md +++ b/content/learn/book/migration-guides/0.5-0.6/_index.md @@ -239,7 +239,7 @@ This was done to accommodate the new {{rust_type(type="struct" crate="bevy_ecs" ### Vector casting functions are now named to match return type -The casting functions for {{rust_type(type="struct" crate="bevy" mod="math" version="0.5.0" name="IVec2" no_mod=true)}}, {{rust_type(type="struct" crate="bevy" mod="math" version="0.5.0" name="DVec2" no_mod=true)}}, {{rust_type(type="struct" crate="bevy" mod="math" version="0.5.0" name="UVec2" no_mod=true)}}, {{rust_type(type="struct" crate="bevy" mod="math" version="0.5.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)}}). +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)}}). ```rust // 0.5 From d71b6790fb9778332a3dd7a752ec95b0b28610f2 Mon Sep 17 00:00:00 2001 From: mike Date: Sat, 8 Jan 2022 18:48:13 -0500 Subject: [PATCH 3/3] 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 --- content/learn/book/migration-guides/0.5-0.6/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/learn/book/migration-guides/0.5-0.6/_index.md b/content/learn/book/migration-guides/0.5-0.6/_index.md index a097bc8912..9d969319fe 100644 --- a/content/learn/book/migration-guides/0.5-0.6/_index.md +++ b/content/learn/book/migration-guides/0.5-0.6/_index.md @@ -252,6 +252,6 @@ let xyz: IVec3 = xyz.as_ivec3(); ``` ### StandardMaterial's "roughness" is renamed to "perceptual_roughness" -The {{rust_type(type="struct" crate="bevy_pbr" mod="" version="0.5.0" name="StandardMaterial" no_mod=true)}} field `roughness` was renamed to `perceptual_roughness`. +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`.