From 724ba70005abb40c6dfbf2d9a0761840aad07f74 Mon Sep 17 00:00:00 2001 From: makspll Date: Wed, 6 Mar 2024 13:09:59 +0000 Subject: [PATCH] make bevy 0.13 compile --- Cargo.toml | 4 +- api_gen_config.toml | 677 +++++++-------- bevy_api_gen/Cargo.toml | 2 +- bevy_api_gen/src/main.rs | 2 +- bevy_event_priority/Cargo.toml | 2 +- bevy_mod_scripting_core/Cargo.toml | 2 +- bevy_mod_scripting_core/src/systems.rs | 2 +- bevy_script_api/Cargo.toml | 2 +- bevy_script_api/src/common/bevy/mod.rs | 27 +- bevy_script_api/src/generated.rs | 835 ++++++++++++++----- bevy_script_api/src/lua/util.rs | 3 - examples/lua/bevy_api.rs | 2 +- examples/rhai/bevy_api.rs | 2 +- examples/rhai/multiple_events_rhai.rs | 2 +- examples/wrappers.rs | 2 +- languages/bevy_mod_scripting_lua/Cargo.toml | 2 +- languages/bevy_mod_scripting_rhai/Cargo.toml | 2 +- languages/bevy_mod_scripting_rune/Cargo.toml | 2 +- makefile | 38 +- 19 files changed, 1034 insertions(+), 576 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6b876edf..efa60ebb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,7 @@ rhai_script_api = ["bevy_script_api/rhai"] rune = ["bevy_mod_scripting_rune"] [dependencies] -bevy = { version = "0.12", default-features = false } +bevy = { version = "0.13", default-features = false } bevy_mod_scripting_core = { path = "bevy_mod_scripting_core", version = "0.4.0" } bevy_mod_scripting_lua = { path = "languages/bevy_mod_scripting_lua", version = "0.4.0", optional = true } bevy_mod_scripting_rhai = { path = "languages/bevy_mod_scripting_rhai", version = "0.4.0", optional = true } @@ -70,7 +70,7 @@ bevy_script_api = { path = "bevy_script_api", version = "0.4.0", optional = true [dev-dependencies] -bevy = { version = "0.12" } +bevy = { version = "0.13" } clap = { version = "4.1", features = ["derive"] } rand = "0.8.5" bevy_console = "0.10.1" diff --git a/api_gen_config.toml b/api_gen_config.toml index 502f32f9..54439127 100644 --- a/api_gen_config.toml +++ b/api_gen_config.toml @@ -59,175 +59,192 @@ fn setup_script_runtime( } """ -primitives = ["usize","isize","f32","f64","u128","u64","u32","u16","u8","i128","i64","i32","i16","i8","String","bool"] +primitives = [ + "usize", + "isize", + "f32", + "f64", + "u128", + "u64", + "u32", + "u16", + "u8", + "i128", + "i64", + "i32", + "i16", + "i8", + "String", + "bool", +] [[manual_lua_types]] -name="ReflectedValue" +name = "ReflectedValue" [[manual_lua_types]] -name="crate::lua::bevy::LuaWorld" -proxy_name="world" -include_global_proxy=true -use_dummy_proxy=true +name = "crate::lua::bevy::LuaWorld" +proxy_name = "world" +include_global_proxy = true +use_dummy_proxy = true [[manual_lua_types]] -name="crate::lua::bevy::LuaScriptData" -proxy_name="script" -include_global_proxy=true -use_dummy_proxy=true +name = "crate::lua::bevy::LuaScriptData" +proxy_name = "script" +include_global_proxy = true +use_dummy_proxy = true [[manual_lua_types]] -name="crate::lua::bevy::LuaEntity" -proxy_name="entity" -include_global_proxy=true -use_dummy_proxy=true -dont_process=true +name = "crate::lua::bevy::LuaEntity" +proxy_name = "entity" +include_global_proxy = true +use_dummy_proxy = true +dont_process = true [[manual_lua_types]] -name="crate::lua::bevy::LuaTypeRegistration" +name = "crate::lua::bevy::LuaTypeRegistration" [[manual_lua_types]] -name="crate::lua::std::LuaVec" +name = "crate::lua::std::LuaVec" ## BEVY_UI [[types]] -type="AlignContent" -source="bevy_ui" +type = "AlignContent" +source = "bevy_ui" [[types]] -type="AlignItems" -source="bevy_ui" +type = "AlignItems" +source = "bevy_ui" [[types]] -type="AlignSelf" -source="bevy_ui" +type = "AlignSelf" +source = "bevy_ui" [[types]] -type="Direction" -source="bevy_ui" +type = "Direction" +source = "bevy_ui" [[types]] -type="FlexDirection" -source="bevy_ui" +type = "FlexDirection" +source = "bevy_ui" [[types]] -type="FlexWrap" -source="bevy_ui" +type = "FlexWrap" +source = "bevy_ui" [[types]] -type="FocusPolicy" -source="bevy_ui" +type = "FocusPolicy" +source = "bevy_ui" [[types]] -type="Interaction" -source="bevy_ui" +type = "Interaction" +source = "bevy_ui" [[types]] -type="JustifyContent" -source="bevy_ui" +type = "JustifyContent" +source = "bevy_ui" [[types]] -type="Overflow" -source="bevy_ui" +type = "Overflow" +source = "bevy_ui" [[types]] -type="PositionType" -source="bevy_ui" +type = "PositionType" +source = "bevy_ui" [[types]] -type="Val" -source="bevy_ui" +type = "Val" +source = "bevy_ui" [[types]] -type="CalculatedClip" -source="bevy_ui" +type = "CalculatedClip" +source = "bevy_ui" [[types]] -type="Node" -source="bevy_ui" +type = "Node" +source = "bevy_ui" [[types]] -type="Style" -source="bevy_ui" +type = "Style" +source = "bevy_ui" [[types]] -type="UiImage" -source="bevy_ui" +type = "UiImage" +source = "bevy_ui" [[types]] -type="Button" -source="bevy_ui" +type = "Button" +source = "bevy_ui" [[types]] -type="Display" -source="bevy_ui" +type = "Display" +source = "bevy_ui" ## BEVY_ANIMATION [[types]] -type="AnimationPlayer" -source="bevy_animation" +type = "AnimationPlayer" +source = "bevy_animation" ## BEVY_CORE [[types]] -type="Name" -source="bevy_core" +type = "Name" +source = "bevy_core" # ## BEVY_GLTF [[types]] -type="GltfExtras" -source="bevy_gltf" +type = "GltfExtras" +source = "bevy_gltf" ## BEVY_HIERARCHY [[types]] -type="Children" -source="bevy_hierarchy" +type = "Children" +source = "bevy_hierarchy" [[types]] -type="Parent" -source="bevy_hierarchy" +type = "Parent" +source = "bevy_hierarchy" ## BEVY_TEXT [[types]] -type="Text2dBounds" -source="bevy_text" +type = "Text2dBounds" +source = "bevy_text" [[types]] -type="Text" -source="bevy_text" +type = "Text" +source = "bevy_text" [[types]] -type="TextAlignment" -source="bevy_text" +type = "JustifyText" +source = "bevy_text" [[types]] -type="TextSection" -source="bevy_text" +type = "TextSection" +source = "bevy_text" [[types]] -type="TextStyle" -source="bevy_text" +type = "TextStyle" +source = "bevy_text" ## BEVY_TIME [[types]] -type="Stopwatch" -source="bevy_time" +type = "Stopwatch" +source = "bevy_time" [[types]] -type="Timer" -source="bevy_time" +type = "Timer" +source = "bevy_time" ## BEVY_UTILS @@ -237,7 +254,6 @@ source="bevy_time" # source="bevy_utils" - # ## BEVY_REFLECT # [[types]] @@ -265,203 +281,198 @@ source="bevy_time" # source="bevy_reflect" - - - - ## BEVY_ECS [[types]] -type="Entity" -source="bevy_ecs" +type = "Entity" +source = "bevy_ecs" ## BEVY_TRANSFORM [[types]] -type="Transform" -source="bevy_transform" +type = "Transform" +source = "bevy_transform" [[types]] -type="GlobalTransform" -source="bevy_transform" +type = "GlobalTransform" +source = "bevy_transform" ## BEVY_PBR [[types]] -type="AmbientLight" -source="bevy_pbr" +type = "AmbientLight" +source = "bevy_pbr" [[types]] -type="CubemapVisibleEntities" -source="bevy_pbr" +type = "CubemapVisibleEntities" +source = "bevy_pbr" [[types]] -type="DirectionalLight" -source="bevy_pbr" +type = "DirectionalLight" +source = "bevy_pbr" [[types]] -type="DirectionalLightShadowMap" -source="bevy_pbr" +type = "DirectionalLightShadowMap" +source = "bevy_pbr" [[types]] -type="NotShadowCaster" -source="bevy_pbr" +type = "NotShadowCaster" +source = "bevy_pbr" [[types]] -type="NotShadowReceiver" -source="bevy_pbr" +type = "NotShadowReceiver" +source = "bevy_pbr" [[types]] -type="PointLight" -source="bevy_pbr" +type = "PointLight" +source = "bevy_pbr" [[types]] -type="PointLightShadowMap" -source="bevy_pbr" +type = "PointLightShadowMap" +source = "bevy_pbr" [[types]] -type="AlphaMode" -source="bevy_pbr" +type = "AlphaMode" +source = "bevy_pbr" [[types]] -type="Wireframe" -source="bevy_pbr" +type = "Wireframe" +source = "bevy_pbr" [[types]] -type="WireframeConfig" -source="bevy_pbr" +type = "WireframeConfig" +source = "bevy_pbr" ## BEVY_CORE_PIPELINE [[types]] -type="Camera3dDepthLoadOp" -source="bevy_core_pipeline" +type = "Camera3dDepthLoadOp" +source = "bevy_core_pipeline" [[types]] -type="ClearColor" -source="bevy_core_pipeline" +type = "ClearColor" +source = "bevy_render" [[types]] -type="ClearColorConfig" -source="bevy_core_pipeline" +type = "ClearColorConfig" +source = "bevy_render" [[types]] -type="Camera2d" -source="bevy_core_pipeline" +type = "Camera2d" +source = "bevy_core_pipeline" [[types]] -type="Camera3d" -source="bevy_core_pipeline" +type = "Camera3d" +source = "bevy_core_pipeline" ## BEVY_SPRITE [[types]] -type="Anchor" -source="bevy_sprite" +type = "Anchor" +source = "bevy_sprite" [[types]] -type="Mesh2dHandle" -source="bevy_sprite" +type = "Mesh2dHandle" +source = "bevy_sprite" [[types]] -type="TextureAtlasSprite" -source="bevy_sprite" +type = "TextureAtlas" +source = "bevy_sprite" [[types]] -type="Sprite" -source="bevy_sprite" - +type = "Sprite" +source = "bevy_sprite" ## BEVY_RENDER [[types]] -type="RenderLayers" -source="bevy_render" +type = "RenderLayers" +source = "bevy_render" [[types]] -type="Visibility" -source="bevy_render" +type = "Visibility" +source = "bevy_render" [[types]] -type="VisibleEntities" -source="bevy_render" +type = "VisibleEntities" +source = "bevy_render" [[types]] -type="InheritedVisibility" -source="bevy_render" +type = "InheritedVisibility" +source = "bevy_render" [[types]] -type="ViewVisibility" -source="bevy_render" +type = "ViewVisibility" +source = "bevy_render" [[types]] -type="SkinnedMesh" -source="bevy_render" +type = "SkinnedMesh" +source = "bevy_render" [[types]] -type="ScalingMode" -source="bevy_render" +type = "ScalingMode" +source = "bevy_render" [[types]] -type="Color" -source="bevy_render" +type = "Color" +source = "bevy_render" [[types]] -type="Aabb" -source="bevy_render" +type = "Aabb" +source = "bevy_render" [[types]] -type="CubemapFrusta" -source="bevy_render" +type = "CubemapFrusta" +source = "bevy_render" [[types]] -type="Frustum" -source="bevy_render" +type = "Frustum" +source = "bevy_render" [[types]] -type="Msaa" -source="bevy_render" +type = "Msaa" +source = "bevy_render" [[types]] -type="Camera" -source="bevy_render" +type = "Camera" +source = "bevy_render" [[types]] -type="RenderTarget" -source="bevy_render" +type = "RenderTarget" +source = "bevy_render" [[types]] -type="Viewport" -source="bevy_render" +type = "Viewport" +source = "bevy_render" [[types]] -type="Projection" -source="bevy_render" -traits=[ - {name="CameraProjection", import_path="bevy::render::camera::CameraProjection"} +type = "Projection" +source = "bevy_render" +traits = [ + { name = "CameraProjection", import_path = "bevy::render::camera::CameraProjection" }, ] [[types]] -type="OrthographicProjection" -source="bevy_render" -traits=[ - {name="CameraProjection", import_path="bevy::render::camera::CameraProjection"} +type = "OrthographicProjection" +source = "bevy_render" +traits = [ + { name = "CameraProjection", import_path = "bevy::render::camera::CameraProjection" }, ] [[types]] -type="PerspectiveProjection" -source="bevy_render" -traits=[ - {name="CameraProjection", import_path="bevy::render::camera::CameraProjection"} +type = "PerspectiveProjection" +source = "bevy_render" +traits = [ + { name = "CameraProjection", import_path = "bevy::render::camera::CameraProjection" }, ] [[types]] -type="CameraRenderGraph" -source="bevy_render" +type = "CameraRenderGraph" +source = "bevy_render" ## BEVY_UTILS @@ -473,8 +484,8 @@ source="bevy_render" ## BEVY_ASSET [[types]] -type="AssetIndex" -source="bevy_asset" +type = "AssetIndex" +source = "bevy_asset" #Needs manual implementation? it's generic. #[[types]] @@ -496,153 +507,153 @@ source="bevy_asset" ## BEVY_MATH [[types]] -type="Vec2" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f32)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "Vec2" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f32)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::f32::Vec2" +import_path = "glam::f32::Vec2" [[types]] -type="Vec3" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f32)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "Vec3" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f32)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::f32::Vec3" +import_path = "glam::f32::Vec3" [[types]] -type="Vec3A" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f32)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "Vec3A" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f32)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::f32::Vec3A" +import_path = "glam::f32::Vec3A" [[types]] -type="Vec4" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f32)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "Vec4" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f32)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::f32::Vec4" +import_path = "glam::f32::Vec4" [[types]] -type="BVec2" -source="bevy_math" -import_path="glam::bool::BVec2" +type = "BVec2" +source = "bevy_math" +import_path = "glam::bool::BVec2" [[types]] -type="BVec3" -source="bevy_math" -import_path="glam::bool::BVec3" +type = "BVec3" +source = "bevy_math" +import_path = "glam::bool::BVec3" [[types]] -type="BVec4" -source="bevy_math" -import_path="glam::bool::BVec4" +type = "BVec4" +source = "bevy_math" +import_path = "glam::bool::BVec4" [[types]] -type="BVec3A" -source="bevy_math" -import_path="glam::bool::BVec3A" +type = "BVec3A" +source = "bevy_math" +import_path = "glam::bool::BVec3A" [[types]] -type="BVec4A" -source="bevy_math" -import_path="glam::bool::BVec4A" +type = "BVec4A" +source = "bevy_math" +import_path = "glam::bool::BVec4A" [[types]] -type="DVec2" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f64)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "DVec2" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f64)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::f64::DVec2" +import_path = "glam::f64::DVec2" [[types]] -type="DVec3" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f64)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "DVec3" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f64)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::f64::DVec3" +import_path = "glam::f64::DVec3" [[types]] -type="DVec4" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f64)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "DVec4" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,f64)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::f64::DVec4" +import_path = "glam::f64::DVec4" [[types]] -type="IVec2" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,i32)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "IVec2" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,i32)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::i32::IVec2" +import_path = "glam::i32::IVec2" [[types]] -type="IVec3" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,i32)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "IVec3" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,i32)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::i32::IVec3" +import_path = "glam::i32::IVec3" [[types]] -type="IVec4" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,i32)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "IVec4" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,i32)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::i32::IVec4" +import_path = "glam::i32::IVec4" [[types]] -type="UVec2" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,u32)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "UVec2" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,u32)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::u32::UVec2" +import_path = "glam::u32::UVec2" [[types]] -type="UVec3" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,u32)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "UVec3" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,u32)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::u32::UVec3" +import_path = "glam::u32::UVec3" [[types]] -type="UVec4" -source="bevy_math" -lua_methods=[ - "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", - "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,u32)| {s.val_mut(|s| Ok(s[*idx] = val))?}" +type = "UVec4" +source = "bevy_math" +lua_methods = [ + "(MetaMethod::Index) => |_,s,idx: LuaIndex| {Ok(s.inner()?[*idx])}", + "mut (MetaMethod::NewIndex) => |_,s,(idx,val): (LuaIndex,u32)| {s.val_mut(|s| Ok(s[*idx] = val))?}", ] -import_path="glam::u32::UVec4" +import_path = "glam::u32::UVec4" [[types]] -type="Mat3" -source="bevy_math" -lua_methods=[ -""" +type = "Mat3" +source = "bevy_math" +lua_methods = [ + """ mut (MetaMethod::Index) => |ctx,s,idx : LuaIndex| { Ok(LuaVec3::new_ref( s.script_ref(ctx.get_world()?).sub_ref(ReflectPathElem::SubReflectionIndexed{ @@ -665,15 +676,15 @@ lua_methods=[ ) ) } -""" +""", ] -import_path="glam::f32::Mat3" +import_path = "glam::f32::Mat3" [[types]] -type="Mat2" -source="bevy_math" -lua_methods=[ -""" +type = "Mat2" +source = "bevy_math" +lua_methods = [ + """ mut (MetaMethod::Index) => |ctx,s,idx : LuaIndex| { Ok(LuaVec2::new_ref( s.script_ref(ctx.get_world()?).sub_ref(ReflectPathElem::SubReflectionIndexed{ @@ -696,16 +707,16 @@ lua_methods=[ ) ) } -""" +""", ] -import_path="glam::f32::Mat2" +import_path = "glam::f32::Mat2" [[types]] -type="Mat3A" -source="bevy_math" -lua_methods=[ -""" +type = "Mat3A" +source = "bevy_math" +lua_methods = [ + """ mut (MetaMethod::Index) => |ctx,s,idx : LuaIndex| { Ok(LuaVec3A::new_ref( s.script_ref(ctx.get_world()?).sub_ref(ReflectPathElem::SubReflectionIndexed{ @@ -728,15 +739,15 @@ lua_methods=[ ) ) } -""" +""", ] -import_path="glam::f32::Mat3A" +import_path = "glam::f32::Mat3A" [[types]] -type="Mat4" -source="bevy_math" -lua_methods=[ -""" +type = "Mat4" +source = "bevy_math" +lua_methods = [ + """ mut (MetaMethod::Index) => |ctx,s,idx : LuaIndex| { Ok(LuaVec4::new_ref( s.script_ref(ctx.get_world()?).sub_ref(ReflectPathElem::SubReflectionIndexed{ @@ -759,16 +770,16 @@ lua_methods=[ ) ) } -""" +""", ] -import_path="glam::f32::Mat4" +import_path = "glam::f32::Mat4" [[types]] -type="DMat2" -source="bevy_math" -lua_methods=[ -""" +type = "DMat2" +source = "bevy_math" +lua_methods = [ + """ mut (MetaMethod::Index) => |ctx,s,idx : LuaIndex| { Ok(LuaDVec2::new_ref( s.script_ref(ctx.get_world()?).sub_ref(ReflectPathElem::SubReflectionIndexed{ @@ -791,15 +802,15 @@ lua_methods=[ ) ) } -""" +""", ] -import_path="glam::f64::DMat2" +import_path = "glam::f64::DMat2" [[types]] -type="DMat3" -source="bevy_math" -lua_methods=[ -""" +type = "DMat3" +source = "bevy_math" +lua_methods = [ + """ mut (MetaMethod::Index) => |ctx,s,idx : LuaIndex| { Ok(LuaDVec3::new_ref( s.script_ref(ctx.get_world()?).sub_ref(ReflectPathElem::SubReflectionIndexed{ @@ -822,15 +833,15 @@ lua_methods=[ ) ) } -""" +""", ] -import_path="glam::f64::DMat3" +import_path = "glam::f64::DMat3" [[types]] -type="DMat4" -source="bevy_math" -lua_methods=[ -""" +type = "DMat4" +source = "bevy_math" +lua_methods = [ + """ mut (MetaMethod::Index) => |ctx,s,idx : LuaIndex| { Ok(LuaDVec4::new_ref( s.script_ref(ctx.get_world()?).sub_ref(ReflectPathElem::SubReflectionIndexed{ @@ -853,45 +864,45 @@ lua_methods=[ ) ) } -""" +""", ] -import_path="glam::f64::DMat4" +import_path = "glam::f64::DMat4" [[types]] -type="Affine2" -source="bevy_math" -import_path="glam::f32::Affine2" +type = "Affine2" +source = "bevy_math" +import_path = "glam::f32::Affine2" [[types]] -type="Affine3A" -source="bevy_math" -import_path="glam::f32::Affine3A" +type = "Affine3A" +source = "bevy_math" +import_path = "glam::f32::Affine3A" [[types]] -type="DAffine2" -source="bevy_math" -import_path="glam::f64::DAffine2" +type = "DAffine2" +source = "bevy_math" +import_path = "glam::f64::DAffine2" [[types]] -type="DAffine3" -source="bevy_math" -import_path="glam::f64::DAffine3" +type = "DAffine3" +source = "bevy_math" +import_path = "glam::f64::DAffine3" [[types]] -type="Quat" -source="bevy_math" -import_path="glam::f32::Quat" +type = "Quat" +source = "bevy_math" +import_path = "glam::f32::Quat" [[types]] -type="DQuat" -source="bevy_math" -import_path="glam::f64::DQuat" +type = "DQuat" +source = "bevy_math" +import_path = "glam::f64::DQuat" [[types]] -type="EulerRot" -source="bevy_math" -import_path="glam::EulerRot" +type = "EulerRot" +source = "bevy_math" +import_path = "glam::EulerRot" [[types]] -type="Rect" -source="bevy_math" \ No newline at end of file +type = "Rect" +source = "bevy_math" diff --git a/bevy_api_gen/Cargo.toml b/bevy_api_gen/Cargo.toml index 45b23e16..7cc3d818 100644 --- a/bevy_api_gen/Cargo.toml +++ b/bevy_api_gen/Cargo.toml @@ -21,7 +21,7 @@ path = "src/main.rs" [dependencies] -rustdoc-types = "0.22.0" +rustdoc-types = "0.24.0" clap = { version = "3.2.6", features = ["derive"] } serde_json = "1.0.81" toml = "0.5.9" diff --git a/bevy_api_gen/src/main.rs b/bevy_api_gen/src/main.rs index 94370d51..d479fcd5 100644 --- a/bevy_api_gen/src/main.rs +++ b/bevy_api_gen/src/main.rs @@ -132,7 +132,7 @@ pub(crate) fn generate_macros( // we want to preserve the original ordering from the config file wrapped_items.sort_by_cached_key(|f| config.types.get_index_of(f.wrapped_type).unwrap()); - writer.write_line("#![allow(clippy::all,unused_imports)]"); + writer.write_line("#![allow(clippy::all,unused_imports,deprecated)]"); writer.write_line("// This file is generated by `bevy_mod_scripting_derive/main.rs` change the template not this file"); writer.write_line("extern crate self as bevy_script_api;"); writer.write_line("use bevy_mod_scripting_derive::impl_script_newtype;"); diff --git a/bevy_event_priority/Cargo.toml b/bevy_event_priority/Cargo.toml index f290d12b..d5c36447 100644 --- a/bevy_event_priority/Cargo.toml +++ b/bevy_event_priority/Cargo.toml @@ -17,4 +17,4 @@ name = "bevy_event_priority" path = "src/lib.rs" [dependencies] -bevy = { version = "0.12", default-features = false } +bevy = { version = "0.13", default-features = false } diff --git a/bevy_mod_scripting_core/Cargo.toml b/bevy_mod_scripting_core/Cargo.toml index 8b403f22..e12a35fe 100644 --- a/bevy_mod_scripting_core/Cargo.toml +++ b/bevy_mod_scripting_core/Cargo.toml @@ -21,7 +21,7 @@ doc_always = [] [dependencies] -bevy = { version = "0.12", default-features = false, features = [ +bevy = { version = "0.13", default-features = false, features = [ "bevy_asset", "bevy_gltf", "bevy_animation", diff --git a/bevy_mod_scripting_core/src/systems.rs b/bevy_mod_scripting_core/src/systems.rs index 10dca529..1ce4f340 100644 --- a/bevy_mod_scripting_core/src/systems.rs +++ b/bevy_mod_scripting_core/src/systems.rs @@ -36,7 +36,7 @@ pub fn script_add_synchronizer( ) { debug!("Handling addition/modification of scripts"); - query.for_each(|(entity, new_scripts, tracker)| { + query.iter().for_each(|(entity, new_scripts, tracker)| { if tracker.is_added() { new_scripts.scripts.iter().for_each(|new_script| { Script::::insert_new_script_context::( diff --git a/bevy_script_api/Cargo.toml b/bevy_script_api/Cargo.toml index 58a89c81..dc0b0312 100644 --- a/bevy_script_api/Cargo.toml +++ b/bevy_script_api/Cargo.toml @@ -16,7 +16,7 @@ lua = ["bevy_mod_scripting_lua", "bevy_mod_scripting_lua_derive"] rhai = ["bevy_mod_scripting_rhai"] [dependencies] -bevy = { version = "0.12", default-features = false, features = [ +bevy = { version = "0.13", default-features = false, features = [ "bevy_asset", "bevy_gltf", "bevy_animation", diff --git a/bevy_script_api/src/common/bevy/mod.rs b/bevy_script_api/src/common/bevy/mod.rs index b4c39917..1770d71d 100644 --- a/bevy_script_api/src/common/bevy/mod.rs +++ b/bevy_script_api/src/common/bevy/mod.rs @@ -169,6 +169,9 @@ impl ScriptWorld { ) -> Result { let mut w = self.write(); + // Remove: AppTypeRegistry + let registry: AppTypeRegistry = w.remove_resource().unwrap(); + let mut entity_ref = w .get_entity_mut(entity) .ok_or_else(|| ScriptError::Other(format!("Entity is not valid {:#?}", entity)))?; @@ -177,23 +180,31 @@ impl ScriptWorld { ScriptError::Other(format!("Not a component {}", comp_type.short_name())) })?; + let registry_lock = registry.read(); + // this is just a formality // TODO: maybe get an add_default impl added to ReflectComponent // this means that we don't require ReflectDefault for adding components! match comp_type.0.type_info(){ - bevy::reflect::TypeInfo::Struct(_) => component_data.insert(&mut entity_ref, &DynamicStruct::default()), - bevy::reflect::TypeInfo::TupleStruct(_) => component_data.insert(&mut entity_ref, &DynamicTupleStruct::default()), - bevy::reflect::TypeInfo::Tuple(_) => component_data.insert(&mut entity_ref, &DynamicTuple::default()), - bevy::reflect::TypeInfo::List(_) => component_data.insert(&mut entity_ref, &DynamicList::default()), - bevy::reflect::TypeInfo::Array(_) => component_data.insert(&mut entity_ref, &DynamicArray::new(Box::new([]))), - bevy::reflect::TypeInfo::Map(_) => component_data.insert(&mut entity_ref, &DynamicMap::default()), + bevy::reflect::TypeInfo::Struct(_) => component_data.insert(&mut entity_ref, &DynamicStruct::default(), ®istry_lock), + bevy::reflect::TypeInfo::TupleStruct(_) => component_data.insert(&mut entity_ref, &DynamicTupleStruct::default(), ®istry_lock), + bevy::reflect::TypeInfo::Tuple(_) => component_data.insert(&mut entity_ref, &DynamicTuple::default(), ®istry_lock), + bevy::reflect::TypeInfo::List(_) => component_data.insert(&mut entity_ref, &DynamicList::default(), ®istry_lock), + bevy::reflect::TypeInfo::Array(_) => component_data.insert(&mut entity_ref, &DynamicArray::new(Box::new([])), ®istry_lock), + bevy::reflect::TypeInfo::Map(_) => component_data.insert(&mut entity_ref, &DynamicMap::default(), ®istry_lock), bevy::reflect::TypeInfo::Value(_) => component_data.insert(&mut entity_ref, comp_type.data::().ok_or_else(|| ScriptError::Other(format!("Component {} is a value or dynamic type with no `ReflectDefault` type_data, cannot instantiate sensible value",comp_type.short_name())))? .default() - .as_ref()), - bevy::reflect::TypeInfo::Enum(_) => component_data.insert(&mut entity_ref, &DynamicEnum::default()) + .as_ref(), + ®istry_lock), + bevy::reflect::TypeInfo::Enum(_) => component_data.insert(&mut entity_ref, &DynamicEnum::default(), ®istry_lock) }; + // if we do not drop the lock here, line below will complain registry is still borrowed at drop + drop(registry_lock); + + // Insert: AppTypeRegistry + w.insert_resource(registry); Ok(ScriptRef::new_component_ref( component_data.clone(), diff --git a/bevy_script_api/src/generated.rs b/bevy_script_api/src/generated.rs index 01c14062..5df43e58 100644 --- a/bevy_script_api/src/generated.rs +++ b/bevy_script_api/src/generated.rs @@ -1,4 +1,4 @@ -#![allow(clippy::all, unused_imports)] +#![allow(clippy::all, unused_imports, deprecated)] // This file is generated by `bevy_mod_scripting_derive/main.rs` change the template not this file extern crate self as bevy_script_api; use crate::{ @@ -9,8 +9,6 @@ use crate::{ use bevy::animation::AnimationPlayer; use bevy::asset::AssetIndex; use bevy::core::Name; -use bevy::core_pipeline::clear_color::ClearColor; -use bevy::core_pipeline::clear_color::ClearColorConfig; use bevy::core_pipeline::core_2d::Camera2d; use bevy::core_pipeline::core_3d::Camera3d; use bevy::core_pipeline::core_3d::Camera3dDepthLoadOp; @@ -67,6 +65,8 @@ use bevy::reflect::Enum; use bevy::render::camera::Camera; use bevy::render::camera::CameraProjection; use bevy::render::camera::CameraRenderGraph; +use bevy::render::camera::ClearColor; +use bevy::render::camera::ClearColorConfig; use bevy::render::camera::OrthographicProjection; use bevy::render::camera::PerspectiveProjection; use bevy::render::camera::Projection; @@ -87,10 +87,10 @@ use bevy::render::view::Msaa; use bevy::sprite::Anchor; use bevy::sprite::Mesh2dHandle; use bevy::sprite::Sprite; -use bevy::sprite::TextureAtlasSprite; +use bevy::sprite::TextureAtlas; +use bevy::text::JustifyText; use bevy::text::Text; use bevy::text::Text2dBounds; -use bevy::text::TextAlignment; use bevy::text::TextSection; use bevy::text::TextStyle; use bevy::time::Stopwatch; @@ -312,6 +312,11 @@ impl_script_newtype! { /// ///Note that you can also control the visibility of a node using the [`Display`](crate::ui_node::Display) property, ///which fully collapses it during layout calculations. + /// + ///# See also + /// + ///- [`ButtonBundle`](crate::node_bundles::ButtonBundle) which includes this component + ///- [`RelativeCursorPosition`] to obtain the position of the cursor relative to current node bevy_ui::Interaction : Clone + Debug + @@ -474,7 +479,14 @@ impl_script_newtype! { } impl_script_newtype! { #[languages(on_feature(lua))] - ///Describes the size of a UI node + ///Base component for a UI node, which also provides the computed size of the node. + /// + ///# See also + /// + ///- [`node_bundles`](crate::node_bundles) for the list of built-in bundles that set up UI node + ///- [`RelativeCursorPosition`](crate::RelativeCursorPosition) + /// to obtain the cursor position relative to this node + ///- [`Interaction`](crate::Interaction) to obtain the interaction state of this node bevy_ui::Node : Clone + Debug + @@ -495,13 +507,13 @@ impl_script_newtype! { unrounded_size(&self:) -> Wrapped(Vec2), ///Returns the size of the node in physical pixels based on the given scale factor and `UiScale`. - physical_size(&self:Raw(f64),Raw(f64)) -> Wrapped(Vec2), + physical_size(&self:Raw(f32),Raw(f32)) -> Wrapped(Vec2), ///Returns the logical pixel coordinates of the UI node, based on its [`GlobalTransform`]. logical_rect(&self:Wrapped(&GlobalTransform)) -> Wrapped(Rect), ///Returns the physical pixel coordinates of the UI node, based on its [`GlobalTransform`] and the scale factor. - physical_rect(&self:Wrapped(&GlobalTransform),Raw(f64),Raw(f64)) -> Wrapped(Rect), + physical_rect(&self:Wrapped(&GlobalTransform),Raw(f32),Raw(f32)) -> Wrapped(Rect), ///Returns the thickness of the UI node's outline. ///If this value is negative or `0.` then no outline will be rendered. @@ -932,7 +944,7 @@ impl_script_newtype! { ///The hash is eagerly re-computed upon each update to the name. /// ///[`Name`] should not be treated as a globally unique identifier for entities, - ///as multiple entities can have the same name. [`bevy_ecs::entity::Entity`] should be + ///as multiple entities can have the same name. [`Entity`] should be ///used instead as the default unique identifier. bevy_core::Name : Clone + @@ -983,10 +995,17 @@ impl_script_newtype! { #[languages(on_feature(lua))] ///Contains references to the child entities of this entity. /// + ///Each child must contain a [`Parent`] component that points back to this entity. + ///This component rarely needs to be created manually, + ///consider using higher level utilities like [`BuildChildren::with_children`] + ///which are safer and easier to use. + /// ///See [`HierarchyQueryExt`] for hierarchy related methods on [`Query`]. /// ///[`HierarchyQueryExt`]: crate::query_extension::HierarchyQueryExt ///[`Query`]: bevy_ecs::system::Query + ///[`Parent`]: crate::components::parent::Parent + ///[`BuildChildren::with_children`]: crate::child_builder::BuildChildren::with_children bevy_hierarchy::Children : Debug + Methods @@ -1013,10 +1032,16 @@ impl_script_newtype! { ///Holds a reference to the parent entity of this entity. ///This component should only be present on entities that actually have a parent entity. /// + ///Parent entity must have this entity stored in its [`Children`] component. + ///It is hard to set up parent/child relationships manually, + ///consider using higher level utilities like [`BuildChildren::with_children`]. + /// ///See [`HierarchyQueryExt`] for hierarchy related methods on [`Query`]. /// ///[`HierarchyQueryExt`]: crate::query_extension::HierarchyQueryExt ///[`Query`]: bevy_ecs::system::Query + ///[`Children`]: super::children::Children + ///[`BuildChildren::with_children`]: crate::child_builder::BuildChildren::with_children bevy_hierarchy::Parent : Debug + Methods @@ -1042,7 +1067,7 @@ impl_script_newtype! { #[languages(on_feature(lua))] ///The maximum width and height of text. The text will wrap according to the specified size. ///Characters out of the bounds after wrapping will be truncated. Text is aligned according to the - ///specified [`TextAlignment`](crate::text::TextAlignment). + ///specified [`JustifyText`](crate::text::JustifyText). /// ///Note: only characters that are completely out of the bounds will be truncated, so this is not a ///reliable limit if it is necessary to contain the text strictly in the bounds. Currently this @@ -1075,8 +1100,8 @@ impl_script_newtype! { Debug + Methods ( - ///Returns this [`Text`] with a new [`TextAlignment`]. - with_alignment(self:Wrapped(TextAlignment)) -> self, + ///Returns this [`Text`] with a new [`JustifyText`]. + with_justify(self:Wrapped(JustifyText)) -> self, ///Returns this [`Text`] with soft wrapping disabled. ///Hard wrapping, where text contains an explicit linebreak such as the escape sequence `\n`, will still occur. @@ -1088,7 +1113,7 @@ impl_script_newtype! { sections: Raw(ReflectedValue), /// The text's internal alignment. /// Should not affect its position within a container. - alignment: Wrapped(TextAlignment), + justify: Wrapped(JustifyText), /// How the text should linebreak when running out of the bounds determined by max_size linebreak_behavior: Raw(ReflectedValue), ) @@ -1104,8 +1129,12 @@ impl_script_newtype! { } impl_script_newtype! { #[languages(on_feature(lua))] - ///Describes horizontal alignment preference for positioning & bounds. - bevy_text::TextAlignment : + ///Describes the horizontal alignment of multiple lines of text relative to each other. + ///This only affects the internal positioning of the lines of text within a text entity and + ///does not affect the text entity's position. + /// + ///_Has no affect on a single line text entity._ + bevy_text::JustifyText : Clone + Debug + Methods @@ -1445,7 +1474,7 @@ impl_script_newtype! { ///``` reset(&mut self:), - ///Returns the percentage of the timer elapsed time (goes from 0.0 to 1.0). + ///Returns the fraction of the timer elapsed time (goes from 0.0 to 1.0). /// ///# Examples ///``` @@ -1453,11 +1482,11 @@ impl_script_newtype! { ///use std::time::Duration; ///let mut timer = Timer::from_seconds(2.0, TimerMode::Once); ///timer.tick(Duration::from_secs_f32(0.5)); - ///assert_eq!(timer.percent(), 0.25); + ///assert_eq!(timer.fraction(), 0.25); ///``` - percent(&self:) -> Raw(f32), + fraction(&self:) -> Raw(f32), - ///Returns the percentage of the timer remaining time (goes from 1.0 to 0.0). + ///Returns the fraction of the timer remaining time (goes from 1.0 to 0.0). /// ///# Examples ///``` @@ -1465,9 +1494,9 @@ impl_script_newtype! { ///use std::time::Duration; ///let mut timer = Timer::from_seconds(2.0, TimerMode::Once); ///timer.tick(Duration::from_secs_f32(0.5)); - ///assert_eq!(timer.percent_left(), 0.75); + ///assert_eq!(timer.fraction_remaining(), 0.75); ///``` - percent_left(&self:) -> Raw(f32), + fraction_remaining(&self:) -> Raw(f32), ///Returns the remaining time in seconds /// @@ -1580,7 +1609,7 @@ impl_script_newtype! { Debug + Methods ( - ///Creates a new entity ID with the specified `index` and a generation of 0. + ///Creates a new entity ID with the specified `index` and a generation of 1. /// ///# Note /// @@ -1605,6 +1634,10 @@ impl_script_newtype! { ///Reconstruct an `Entity` previously destructured with [`Entity::to_bits`]. /// ///Only useful when applied to results from `to_bits` in the same instance of an application. + /// + ///# Panics + /// + ///This method will likely panic if given `u64` values that did not come from [`Entity::to_bits`]. from_bits(Raw(u64)) -> self, ///Return a transiently unique identifier. @@ -1664,7 +1697,6 @@ impl_script_newtype! { /// ///[`global_vs_local_translation`]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/global_vs_local_translation.rs ///[`transform`]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs - ///[`Transform`]: super::Transform bevy_transform::components::Transform : Clone + Debug + @@ -1726,33 +1758,6 @@ impl_script_newtype! { ///rotation, and scale. compute_affine(&self:) -> Wrapped(Affine3A), - ///Get the unit vector in the local `X` direction. - local_x(&self:) -> Wrapped(Vec3), - - ///Equivalent to [`-local_x()`][Transform::local_x()] - left(&self:) -> Wrapped(Vec3), - - ///Equivalent to [`local_x()`][Transform::local_x()] - right(&self:) -> Wrapped(Vec3), - - ///Get the unit vector in the local `Y` direction. - local_y(&self:) -> Wrapped(Vec3), - - ///Equivalent to [`local_y()`][Transform::local_y] - up(&self:) -> Wrapped(Vec3), - - ///Equivalent to [`-local_y()`][Transform::local_y] - down(&self:) -> Wrapped(Vec3), - - ///Get the unit vector in the local `Z` direction. - local_z(&self:) -> Wrapped(Vec3), - - ///Equivalent to [`-local_z()`][Transform::local_z] - forward(&self:) -> Wrapped(Vec3), - - ///Equivalent to [`local_z()`][Transform::local_z] - back(&self:) -> Wrapped(Vec3), - ///Rotates this [`Transform`] by the given rotation. /// ///If this [`Transform`] has a parent, the `rotation` is relative to the rotation of the parent. @@ -1845,6 +1850,11 @@ impl_script_newtype! { ///consider using [`GlobalTransform::transform_point()`] instead. transform_point(&self:Wrapped(Vec3)) -> Wrapped(Vec3), + ///Returns `true` if, and only if, translation, rotation and scale all are + ///finite. If any of them contains a `NaN`, positive or negative infinity, + ///this will return `false`. + is_finite(&self:) -> Raw(bool), + ) + Fields ( @@ -1869,9 +1879,9 @@ impl_script_newtype! { ) + BinOps ( - self Mul Wrapped(GlobalTransform) -> Wrapped(GlobalTransform), - self Mul Wrapped(Transform) -> Wrapped(Transform), self Mul Wrapped(Vec3) -> Wrapped(Vec3), + self Mul Wrapped(Transform) -> Wrapped(Transform), + self Mul Wrapped(GlobalTransform) -> Wrapped(GlobalTransform), ) + UnaryOps ( @@ -1934,7 +1944,7 @@ impl_script_newtype! { ///Say you have an entity `e1` that you want to turn into a child of `e2`, ///but you want `e1` to keep the same global transform, even after re-parenting. You would use: /// - ///```rust + ///``` ///# use bevy_transform::prelude::{GlobalTransform, Transform}; ///# use bevy_ecs::prelude::{Entity, Query, Component, Commands}; ///# use bevy_hierarchy::{prelude::Parent, BuildChildren}; @@ -2004,9 +2014,9 @@ impl_script_newtype! { ) + BinOps ( + self Mul Wrapped(Transform) -> Wrapped(GlobalTransform), self Mul Wrapped(Vec3) -> Wrapped(Vec3), self Mul Wrapped(GlobalTransform) -> Wrapped(GlobalTransform), - self Mul Wrapped(Transform) -> Wrapped(GlobalTransform), ) + UnaryOps ( @@ -2018,6 +2028,20 @@ impl_script_newtype! { impl_script_newtype! { #[languages(on_feature(lua))] ///An ambient light, which lights the entire scene equally. + /// + ///This resource is inserted by the [`PbrPlugin`] and by default it is set to a low ambient light. + /// + ///# Examples + /// + ///Make ambient light slightly brighter: + /// + ///``` + ///# use bevy_ecs::system::ResMut; + ///# use bevy_pbr::AmbientLight; + ///fn setup_ambient_light(mut ambient_light: ResMut) { + /// ambient_light.brightness = 100.0; + ///} + ///``` bevy_pbr::AmbientLight : Clone + Debug + @@ -2100,7 +2124,7 @@ impl_script_newtype! { ///Shadows are produced via [cascaded shadow maps](https://developer.download.nvidia.com/SDK/10.5/opengl/src/cascaded_shadow_maps/doc/cascaded_shadow_maps.pdf). /// ///To modify the cascade set up, such as the number of cascades or the maximum shadow distance, - ///change the [`CascadeShadowConfig`] component of the [`crate::bundle::DirectionalLightBundle`]. + ///change the [`CascadeShadowConfig`] component of the [`DirectionalLightBundle`]. /// ///To control the resolution of the shadow maps, use the [`DirectionalLightShadowMap`] resource: /// @@ -2119,7 +2143,12 @@ impl_script_newtype! { + Fields ( color: Wrapped(Color), - /// Illuminance in lux + /// Illuminance in lux (lumens per square meter), representing the amount of + /// light projected onto surfaces by this light source. Lux is used here + /// instead of lumens because a directional light illuminates all surfaces + /// more-or-less the same way (depending on the angle of incidence). Lumens + /// can only be specified for light sources which emit light from a specific + /// area. illuminance: Raw(f32), shadows_enabled: Raw(bool), shadow_depth_bias: Raw(f32), @@ -2232,7 +2261,7 @@ impl_script_newtype! { + Fields ( color: Wrapped(Color), - /// Luminous power in lumens + /// Luminous power in lumens, representing the amount of light emitted by this source in all directions. intensity: Raw(f32), range: Raw(f32), radius: Raw(f32), @@ -2378,7 +2407,7 @@ impl_script_newtype! { /// ///This color appears as the "background" color for simple apps, ///when there are portions of the screen with nothing rendered. - bevy_core_pipeline::clear_color::ClearColor : + bevy_render::camera::ClearColor : Clone + Debug + Methods @@ -2400,7 +2429,7 @@ impl_script_newtype! { impl_script_newtype! { #[languages(on_feature(lua))] ///For a camera, specifies the color used to clear the viewport before rendering. - bevy_core_pipeline::clear_color::ClearColorConfig : + bevy_render::camera::ClearColorConfig : Clone + Debug + Methods @@ -2428,7 +2457,6 @@ impl_script_newtype! { ) + Fields ( - clear_color: Wrapped(ClearColorConfig), ) + BinOps ( @@ -2450,8 +2478,6 @@ impl_script_newtype! { ) + Fields ( - /// The clear color operation to perform for the main 3d pass. - clear_color: Wrapped(ClearColorConfig), /// The depth clear operation to perform for the main 3d pass. depth_load_op: Wrapped(Camera3dDepthLoadOp), /// The texture usages for the depth texture created for the main 3d pass. @@ -2468,7 +2494,7 @@ impl_script_newtype! { /// regardless of this setting. /// - Setting this to `0` disables the screen-space refraction effect entirely, and falls /// back to refracting only the environment map light's texture. - /// - If set to more than `0`, any opaque [`clear_color`](Camera3d::clear_color) will obscure the environment + /// - If set to more than `0`, any opaque [`clear_color`](Camera::clear_color) will obscure the environment /// map light's texture, preventing it from being visible “through” transmissive materials. If you'd like /// to still have the environment map show up in your refractions, you can set the clear color's alpha to `0.0`. /// Keep in mind that depending on the platform and your window settings, this may cause the window to become @@ -2543,31 +2569,29 @@ impl_script_newtype! { } impl_script_newtype! { #[languages(on_feature(lua))] - bevy_sprite::TextureAtlasSprite : + ///Component used to draw a specific section of a texture. + /// + ///It stores a handle to [`TextureAtlasLayout`] and the index of the current section of the atlas. + ///The texture atlas contains various *sections* of a given texture, allowing users to have a single + ///image file for either sprite animation or global mapping. + ///You can change the texture [`index`](Self::index) of the atlas to animate the sprite or display only a *section* of the texture + ///for efficient rendering of related game objects. + /// + ///Check the following examples for usage: + ///- [`animated sprite sheet example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs) + ///- [`texture atlas example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) + bevy_sprite::TextureAtlas : Clone + Debug + Methods ( - ///Create a new [`TextureAtlasSprite`] with a sprite index, - ///it should be valid in the corresponding [`TextureAtlas`] - new(Raw(usize)) -> Wrapped(TextureAtlasSprite), - ) + Fields ( - /// The tint color used to draw the sprite, defaulting to [`Color::WHITE`] - color: Wrapped(Color), - /// Texture index in [`TextureAtlas`] + /// Texture atlas layout handle + layout: Raw(ReflectedValue), + /// Texture atlas section index index: Raw(usize), - /// Whether to flip the sprite in the X axis - flip_x: Raw(bool), - /// Whether to flip the sprite in the Y axis - flip_y: Raw(bool), - /// An optional custom size for the sprite that will be used when rendering, instead of the size - /// of the sprite's image in the atlas - custom_size: Raw(ReflectedValue), - /// [`Anchor`] point of the sprite in the world - anchor: Wrapped(Anchor), ) + BinOps ( @@ -2581,6 +2605,9 @@ impl_script_newtype! { } impl_script_newtype! { #[languages(on_feature(lua))] + ///Specifies the rendering properties of a sprite. + /// + ///This is commonly used as a component within [`SpriteBundle`](crate::bundle::SpriteBundle). bevy_sprite::Sprite : Clone + Debug + @@ -2598,8 +2625,11 @@ impl_script_newtype! { /// An optional custom size for the sprite that will be used when rendering, instead of the size /// of the sprite's image custom_size: Raw(ReflectedValue), - /// An optional rectangle representing the region of the sprite's image to render, instead of - /// rendering the full image. This is an easy one-off alternative to using a texture atlas. + /// An optional rectangle representing the region of the sprite's image to render, instead of rendering + /// the full image. This is an easy one-off alternative to using a [`TextureAtlas`](crate::TextureAtlas). + /// + /// When used with a [`TextureAtlas`](crate::TextureAtlas), the rect + /// is offset by the atlas's minimal (top-left) corner position. rect: Raw(ReflectedValue), /// [`Anchor`] point of the sprite in the world anchor: Wrapped(Anchor), @@ -2648,6 +2678,9 @@ impl_script_newtype! { ///`RenderLayers`, even another with no layers. intersects(&self:Wrapped(&RenderLayers)) -> Raw(bool), + ///get the bitmask representation of the contained layers + bits(&self:) -> Raw(u32), + ) + Fields ( @@ -2757,7 +2790,7 @@ impl_script_newtype! { } impl_script_newtype! { #[languages(on_feature(lua))] - ///Algorithmically-computed indication or whether an entity is visible and should be extracted for rendering. + ///Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering. /// ///Each frame, this will be reset to `false` during [`VisibilityPropagate`] systems in [`PostUpdate`]. ///Later in the frame, systems in [`CheckVisibility`] will mark any visible entities using [`ViewVisibility::set`]. @@ -2829,6 +2862,19 @@ impl_script_newtype! { } impl_script_newtype! { #[languages(on_feature(lua))] + ///Scaling mode for [`OrthographicProjection`]. + /// + ///# Examples + /// + ///Configure the orthographic projection to two world units per window height: + /// + ///``` + ///# use bevy_render::camera::{OrthographicProjection, Projection, ScalingMode}; + ///let projection = Projection::Orthographic(OrthographicProjection { + /// scaling_mode: ScalingMode::FixedVertical(2.0), + /// ..OrthographicProjection::default() + ///}); + ///``` bevy_render::camera::ScalingMode : Clone + Debug + @@ -2840,6 +2886,8 @@ impl_script_newtype! { ) + BinOps ( + self Div Raw(f32) -> Wrapped(ScalingMode), + self Mul Raw(f32) -> Wrapped(ScalingMode), ) + UnaryOps ( @@ -3052,6 +3100,30 @@ impl_script_newtype! { ///`A` will be the most significant byte and `R` the least significant. as_linear_rgba_u32(Wrapped(Color):) -> Raw(u32), + ///Convert `Color` to RGBA and return as `Vec4`. + rgba_to_vec4(&self:) -> Wrapped(Vec4), + + ///Convert `Color` to RGBA and return as `Vec3`. + rgb_to_vec3(&self:) -> Wrapped(Vec3), + + ///Convert `Color` to linear RGBA and return as `Vec4`. + rgba_linear_to_vec4(&self:) -> Wrapped(Vec4), + + ///Convert `Color` to linear RGBA and return as `Vec3`. + rgb_linear_to_vec3(&self:) -> Wrapped(Vec3), + + ///Convert `Color` to HSLA and return as `Vec4`. + hsla_to_vec4(&self:) -> Wrapped(Vec4), + + ///Convert `Color` to HSLA and return as `Vec3`. + hsl_to_vec3(&self:) -> Wrapped(Vec3), + + ///Convert `Color` to LCHA and return as `Vec4`. + lcha_to_vec4(&self:) -> Wrapped(Vec4), + + ///Convert `Color` to LCHA and return as `Vec3`. + lch_to_vec3(&self:) -> Wrapped(Vec3), + ) + Fields ( @@ -3059,10 +3131,9 @@ impl_script_newtype! { + BinOps ( self Add Wrapped(Color) -> Wrapped(Color), - self Add Wrapped(Vec4) -> Wrapped(Color), - self Mul Wrapped(Vec4) -> Wrapped(Color), - self Mul Wrapped(Vec3) -> Wrapped(Color), self Mul Raw(f32) -> Wrapped(Color), + self Mul Wrapped(Vec3) -> Wrapped(Color), + self Mul Wrapped(Vec4) -> Wrapped(Color), ) + UnaryOps ( @@ -3132,6 +3203,7 @@ impl_script_newtype! { impl_script_newtype! { #[languages(on_feature(lua))] bevy_render::primitives::CubemapFrusta : + Clone + Debug + Methods ( @@ -3284,6 +3356,8 @@ impl_script_newtype! { /// "write their results on top" of previous camera results, and include them as a part of their render results. This is enabled by default to ensure /// cameras with MSAA enabled layer their results in the same way as cameras without MSAA enabled by default. msaa_writeback: Raw(bool), + /// The clear color operation to perform on the render target. + clear_color: Wrapped(ClearColorConfig), ) + BinOps ( @@ -3390,6 +3464,18 @@ impl_script_newtype! { /// ///Note that the scale of the projection and the apparent size of objects are inversely proportional. ///As the size of the projection increases, the size of objects decreases. + /// + ///# Examples + /// + ///Configure the orthographic projection to one world unit per 100 window pixels: + /// + ///``` + ///# use bevy_render::camera::{OrthographicProjection, Projection, ScalingMode}; + ///let projection = Projection::Orthographic(OrthographicProjection { + /// scaling_mode: ScalingMode::WindowSize(100.0), + /// ..OrthographicProjection::default() + ///}); + ///``` bevy_render::camera::OrthographicProjection : Clone + Debug + @@ -3430,15 +3516,20 @@ impl_script_newtype! { /// Defaults to `(0.5, 0.5)`, which makes scaling affect opposite sides equally, keeping the center /// point of the viewport centered. viewport_origin: Wrapped(Vec2), - /// How the projection will scale when the viewport is resized. + /// How the projection will scale to the viewport. /// /// Defaults to `ScalingMode::WindowSize(1.0)` scaling_mode: Wrapped(ScalingMode), - /// Scales the projection in world units. + /// Scales the projection. /// /// As scale increases, the apparent size of objects decreases, and vice versa. /// - /// Defaults to `1.0` + /// Note: scaling can be set by [`scaling_mode`](Self::scaling_mode) as well. + /// This parameter scales on top of that. + /// + /// This property is particularly useful in implementing zoom functionality. + /// + /// Defaults to `1.0`. scale: Raw(f32), /// The area that the projection covers relative to `viewport_origin`. /// @@ -3515,6 +3606,7 @@ impl_script_newtype! { #[languages(on_feature(lua))] ///Configures the [`RenderGraph`](crate::render_graph::RenderGraph) name assigned to be run for a given [`Camera`] entity. bevy_render::camera::CameraRenderGraph : + Clone + Methods ( ) @@ -3705,6 +3797,14 @@ impl_script_newtype! { ///Compute the squared euclidean distance between two points in space. distance_squared(self:self) -> Raw(f32), + ///Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + div_euclid(self:self) -> self, + + ///Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// + ///[Euclidean division]: f32::rem_euclid + rem_euclid(self:self) -> self, + ///Returns `self` normalized to length 1.0. /// ///For valid results, `self` must _not_ be of length zero, nor very close to zero. @@ -3849,6 +3949,11 @@ impl_script_newtype! { ///and rotate [`Vec2::Y`] around it returning `-Vec2::Y`. from_angle(Raw(f32)) -> self, + ///Returns the angle (in radians) of this vector in the range `[-π, +π]`. + /// + ///The input does not need to be a unit vector however it must be non-zero. + to_angle(self:) -> Raw(f32), + ///Returns the angle (in radians) between `self` and `rhs` in the range `[-π, +π]`. /// ///The inputs do not need to be unit vectors however they must be non-zero. @@ -3883,14 +3988,14 @@ impl_script_newtype! { ) + BinOps ( - self Add self -> Wrapped(Vec2), self Add Wrapped(Vec2) -> Wrapped(Vec2), + self Add self -> Wrapped(Vec2), self Add Raw(f32) -> Wrapped(Vec2), - self Sub Wrapped(Vec2) -> Wrapped(Vec2), - self Sub self -> Wrapped(Vec2), self Sub Raw(f32) -> Wrapped(Vec2), - self Div self -> Wrapped(Vec2), + self Sub self -> Wrapped(Vec2), + self Sub Wrapped(Vec2) -> Wrapped(Vec2), self Div Wrapped(Vec2) -> Wrapped(Vec2), + self Div self -> Wrapped(Vec2), self Div Raw(f32) -> Wrapped(Vec2), self Mul Wrapped(Vec2) -> Wrapped(Vec2), self Mul Raw(f32) -> Wrapped(Vec2), @@ -4068,6 +4173,14 @@ impl_script_newtype! { ///Compute the squared euclidean distance between two points in space. distance_squared(self:self) -> Raw(f32), + ///Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + div_euclid(self:self) -> self, + + ///Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// + ///[Euclidean division]: f32::rem_euclid + rem_euclid(self:self) -> self, + ///Returns `self` normalized to length 1.0. /// ///For valid results, `self` must _not_ be of length zero, nor very close to zero. @@ -4249,18 +4362,18 @@ impl_script_newtype! { self Add Raw(f32) -> Wrapped(Vec3), self Add Wrapped(Vec3) -> Wrapped(Vec3), self Add self -> Wrapped(Vec3), - self Sub Raw(f32) -> Wrapped(Vec3), self Sub self -> Wrapped(Vec3), self Sub Wrapped(Vec3) -> Wrapped(Vec3), + self Sub Raw(f32) -> Wrapped(Vec3), self Div Wrapped(Vec3) -> Wrapped(Vec3), - self Div Raw(f32) -> Wrapped(Vec3), self Div self -> Wrapped(Vec3), - self Mul Wrapped(Vec3) -> Wrapped(Vec3), + self Div Raw(f32) -> Wrapped(Vec3), self Mul Raw(f32) -> Wrapped(Vec3), self Mul self -> Wrapped(Vec3), - self Rem self -> Wrapped(Vec3), - self Rem Raw(f32) -> Wrapped(Vec3), + self Mul Wrapped(Vec3) -> Wrapped(Vec3), self Rem Wrapped(Vec3) -> Wrapped(Vec3), + self Rem Raw(f32) -> Wrapped(Vec3), + self Rem self -> Wrapped(Vec3), ) + UnaryOps ( @@ -4439,6 +4552,14 @@ impl_script_newtype! { ///Compute the squared euclidean distance between two points in space. distance_squared(self:self) -> Raw(f32), + ///Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + div_euclid(self:self) -> self, + + ///Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// + ///[Euclidean division]: f32::rem_euclid + rem_euclid(self:self) -> self, + ///Returns `self` normalized to length 1.0. /// ///For valid results, `self` must _not_ be of length zero, nor very close to zero. @@ -4618,14 +4739,14 @@ impl_script_newtype! { self Add Wrapped(Vec3A) -> Wrapped(Vec3A), self Add Raw(f32) -> Wrapped(Vec3A), self Sub Wrapped(Vec3A) -> Wrapped(Vec3A), - self Sub self -> Wrapped(Vec3A), self Sub Raw(f32) -> Wrapped(Vec3A), - self Div self -> Wrapped(Vec3A), + self Sub self -> Wrapped(Vec3A), self Div Wrapped(Vec3A) -> Wrapped(Vec3A), self Div Raw(f32) -> Wrapped(Vec3A), + self Div self -> Wrapped(Vec3A), self Mul self -> Wrapped(Vec3A), - self Mul Wrapped(Vec3A) -> Wrapped(Vec3A), self Mul Raw(f32) -> Wrapped(Vec3A), + self Mul Wrapped(Vec3A) -> Wrapped(Vec3A), self Rem Wrapped(Vec3A) -> Wrapped(Vec3A), self Rem Raw(f32) -> Wrapped(Vec3A), self Rem self -> Wrapped(Vec3A), @@ -4665,7 +4786,7 @@ impl_script_newtype! { ///uses the element from `if_false`. select(Wrapped(BVec4A),self,self) -> self, - ///Creates a 2D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + ///Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. /// ///Truncation to [`Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. /// @@ -4799,6 +4920,14 @@ impl_script_newtype! { ///Compute the squared euclidean distance between two points in space. distance_squared(self:self) -> Raw(f32), + ///Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + div_euclid(self:self) -> self, + + ///Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// + ///[Euclidean division]: f32::rem_euclid + rem_euclid(self:self) -> self, + ///Returns `self` normalized to length 1.0. /// ///For valid results, `self` must _not_ be of length zero, nor very close to zero. @@ -4952,21 +5081,21 @@ impl_script_newtype! { ) + BinOps ( + self Add Wrapped(Vec4) -> Wrapped(Vec4), self Add self -> Wrapped(Vec4), self Add Raw(f32) -> Wrapped(Vec4), - self Add Wrapped(Vec4) -> Wrapped(Vec4), - self Sub Wrapped(Vec4) -> Wrapped(Vec4), - self Sub self -> Wrapped(Vec4), self Sub Raw(f32) -> Wrapped(Vec4), - self Div Wrapped(Vec4) -> Wrapped(Vec4), + self Sub self -> Wrapped(Vec4), + self Sub Wrapped(Vec4) -> Wrapped(Vec4), self Div Raw(f32) -> Wrapped(Vec4), + self Div Wrapped(Vec4) -> Wrapped(Vec4), self Div self -> Wrapped(Vec4), self Mul self -> Wrapped(Vec4), self Mul Raw(f32) -> Wrapped(Vec4), self Mul Wrapped(Vec4) -> Wrapped(Vec4), - self Rem Wrapped(Vec4) -> Wrapped(Vec4), - self Rem Raw(f32) -> Wrapped(Vec4), self Rem self -> Wrapped(Vec4), + self Rem Raw(f32) -> Wrapped(Vec4), + self Rem Wrapped(Vec4) -> Wrapped(Vec4), ) + UnaryOps ( @@ -5392,6 +5521,14 @@ impl_script_newtype! { ///Compute the squared euclidean distance between two points in space. distance_squared(self:self) -> Raw(f64), + ///Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + div_euclid(self:self) -> self, + + ///Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// + ///[Euclidean division]: f64::rem_euclid + rem_euclid(self:self) -> self, + ///Returns `self` normalized to length 1.0. /// ///For valid results, `self` must _not_ be of length zero, nor very close to zero. @@ -5536,6 +5673,11 @@ impl_script_newtype! { ///and rotate [`DVec2::Y`] around it returning `-DVec2::Y`. from_angle(Raw(f64)) -> self, + ///Returns the angle (in radians) of this vector in the range `[-π, +π]`. + /// + ///The input does not need to be a unit vector however it must be non-zero. + to_angle(self:) -> Raw(f64), + ///Returns the angle (in radians) between `self` and `rhs` in the range `[-π, +π]`. /// ///The inputs do not need to be unit vectors however they must be non-zero. @@ -5570,20 +5712,20 @@ impl_script_newtype! { ) + BinOps ( - self Add Wrapped(DVec2) -> Wrapped(DVec2), self Add self -> Wrapped(DVec2), self Add Raw(f64) -> Wrapped(DVec2), - self Sub self -> Wrapped(DVec2), + self Add Wrapped(DVec2) -> Wrapped(DVec2), self Sub Raw(f64) -> Wrapped(DVec2), self Sub Wrapped(DVec2) -> Wrapped(DVec2), + self Sub self -> Wrapped(DVec2), self Div Raw(f64) -> Wrapped(DVec2), - self Div self -> Wrapped(DVec2), self Div Wrapped(DVec2) -> Wrapped(DVec2), + self Div self -> Wrapped(DVec2), self Mul Raw(f64) -> Wrapped(DVec2), - self Mul Wrapped(DVec2) -> Wrapped(DVec2), self Mul self -> Wrapped(DVec2), - self Rem Raw(f64) -> Wrapped(DVec2), + self Mul Wrapped(DVec2) -> Wrapped(DVec2), self Rem self -> Wrapped(DVec2), + self Rem Raw(f64) -> Wrapped(DVec2), self Rem Wrapped(DVec2) -> Wrapped(DVec2), ) + UnaryOps @@ -5755,6 +5897,14 @@ impl_script_newtype! { ///Compute the squared euclidean distance between two points in space. distance_squared(self:self) -> Raw(f64), + ///Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + div_euclid(self:self) -> self, + + ///Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// + ///[Euclidean division]: f64::rem_euclid + rem_euclid(self:self) -> self, + ///Returns `self` normalized to length 1.0. /// ///For valid results, `self` must _not_ be of length zero, nor very close to zero. @@ -5939,18 +6089,18 @@ impl_script_newtype! { self Add Raw(f64) -> Wrapped(DVec3), self Add Wrapped(DVec3) -> Wrapped(DVec3), self Add self -> Wrapped(DVec3), + self Sub Wrapped(DVec3) -> Wrapped(DVec3), self Sub Raw(f64) -> Wrapped(DVec3), self Sub self -> Wrapped(DVec3), - self Sub Wrapped(DVec3) -> Wrapped(DVec3), - self Div Wrapped(DVec3) -> Wrapped(DVec3), self Div self -> Wrapped(DVec3), + self Div Wrapped(DVec3) -> Wrapped(DVec3), self Div Raw(f64) -> Wrapped(DVec3), self Mul self -> Wrapped(DVec3), - self Mul Raw(f64) -> Wrapped(DVec3), self Mul Wrapped(DVec3) -> Wrapped(DVec3), + self Mul Raw(f64) -> Wrapped(DVec3), + self Rem self -> Wrapped(DVec3), self Rem Raw(f64) -> Wrapped(DVec3), self Rem Wrapped(DVec3) -> Wrapped(DVec3), - self Rem self -> Wrapped(DVec3), ) + UnaryOps ( @@ -5983,7 +6133,7 @@ impl_script_newtype! { ///uses the element from `if_false`. select(Wrapped(BVec4),self,self) -> self, - ///Creates a 2D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + ///Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. /// ///Truncation to [`DVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. truncate(self:) -> Wrapped(DVec3), @@ -6115,6 +6265,14 @@ impl_script_newtype! { ///Compute the squared euclidean distance between two points in space. distance_squared(self:self) -> Raw(f64), + ///Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + div_euclid(self:self) -> self, + + ///Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// + ///[Euclidean division]: f64::rem_euclid + rem_euclid(self:self) -> self, + ///Returns `self` normalized to length 1.0. /// ///For valid results, `self` must _not_ be of length zero, nor very close to zero. @@ -6272,20 +6430,20 @@ impl_script_newtype! { ) + BinOps ( - self Add self -> Wrapped(DVec4), - self Add Wrapped(DVec4) -> Wrapped(DVec4), self Add Raw(f64) -> Wrapped(DVec4), - self Sub Raw(f64) -> Wrapped(DVec4), + self Add Wrapped(DVec4) -> Wrapped(DVec4), + self Add self -> Wrapped(DVec4), self Sub Wrapped(DVec4) -> Wrapped(DVec4), self Sub self -> Wrapped(DVec4), - self Div self -> Wrapped(DVec4), + self Sub Raw(f64) -> Wrapped(DVec4), self Div Wrapped(DVec4) -> Wrapped(DVec4), self Div Raw(f64) -> Wrapped(DVec4), - self Mul self -> Wrapped(DVec4), - self Mul Raw(f64) -> Wrapped(DVec4), + self Div self -> Wrapped(DVec4), self Mul Wrapped(DVec4) -> Wrapped(DVec4), - self Rem Raw(f64) -> Wrapped(DVec4), + self Mul Raw(f64) -> Wrapped(DVec4), + self Mul self -> Wrapped(DVec4), self Rem self -> Wrapped(DVec4), + self Rem Raw(f64) -> Wrapped(DVec4), self Rem Wrapped(DVec4) -> Wrapped(DVec4), ) + UnaryOps @@ -6421,6 +6579,20 @@ impl_script_newtype! { ///Compute the squared euclidean distance between two points in space. distance_squared(self:self) -> Raw(i32), + ///Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + /// + ///# Panics + ///This function will panic if any `rhs` element is 0 or the division results in overflow. + div_euclid(self:self) -> self, + + ///Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// + ///# Panics + ///This function will panic if any `rhs` element is 0 or the division results in overflow. + /// + ///[Euclidean division]: i32::rem_euclid + rem_euclid(self:self) -> self, + ///Returns a vector that is equal to `self` rotated by 90 degrees. perp(self:) -> self, @@ -6442,6 +6614,46 @@ impl_script_newtype! { ///Casts all elements of `self` to `u32`. as_uvec2(&self:) -> Wrapped(UVec2), + ///Returns a vector containing the wrapping addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + wrapping_add(self:self) -> self, + + ///Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + wrapping_sub(self:self) -> self, + + ///Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + wrapping_mul(self:self) -> self, + + ///Returns a vector containing the wrapping division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + wrapping_div(self:self) -> self, + + ///Returns a vector containing the saturating addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + saturating_add(self:self) -> self, + + ///Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + saturating_sub(self:self) -> self, + + ///Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + saturating_mul(self:self) -> self, + + ///Returns a vector containing the saturating division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + saturating_div(self:self) -> self, + ) + Fields ( @@ -6450,20 +6662,20 @@ impl_script_newtype! { ) + BinOps ( - self Add self -> Wrapped(IVec2), - self Add Raw(i32) -> Wrapped(IVec2), self Add Wrapped(IVec2) -> Wrapped(IVec2), - self Sub self -> Wrapped(IVec2), + self Add Raw(i32) -> Wrapped(IVec2), + self Add self -> Wrapped(IVec2), self Sub Wrapped(IVec2) -> Wrapped(IVec2), + self Sub self -> Wrapped(IVec2), self Sub Raw(i32) -> Wrapped(IVec2), - self Div Wrapped(IVec2) -> Wrapped(IVec2), - self Div self -> Wrapped(IVec2), self Div Raw(i32) -> Wrapped(IVec2), - self Mul Raw(i32) -> Wrapped(IVec2), + self Div self -> Wrapped(IVec2), + self Div Wrapped(IVec2) -> Wrapped(IVec2), self Mul self -> Wrapped(IVec2), self Mul Wrapped(IVec2) -> Wrapped(IVec2), - self Rem Raw(i32) -> Wrapped(IVec2), + self Mul Raw(i32) -> Wrapped(IVec2), self Rem self -> Wrapped(IVec2), + self Rem Raw(i32) -> Wrapped(IVec2), self Rem Wrapped(IVec2) -> Wrapped(IVec2), ) + UnaryOps @@ -6607,6 +6819,20 @@ impl_script_newtype! { ///Compute the squared euclidean distance between two points in space. distance_squared(self:self) -> Raw(i32), + ///Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + /// + ///# Panics + ///This function will panic if any `rhs` element is 0 or the division results in overflow. + div_euclid(self:self) -> self, + + ///Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// + ///# Panics + ///This function will panic if any `rhs` element is 0 or the division results in overflow. + /// + ///[Euclidean division]: i32::rem_euclid + rem_euclid(self:self) -> self, + ///Casts all elements of `self` to `f32`. as_vec3(&self:) -> Wrapped(Vec3), @@ -6619,6 +6845,46 @@ impl_script_newtype! { ///Casts all elements of `self` to `u32`. as_uvec3(&self:) -> Wrapped(UVec3), + ///Returns a vector containing the wrapping addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + wrapping_add(self:self) -> self, + + ///Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + wrapping_sub(self:self) -> self, + + ///Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + wrapping_mul(self:self) -> self, + + ///Returns a vector containing the wrapping division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + wrapping_div(self:self) -> self, + + ///Returns a vector containing the saturating addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + saturating_add(self:self) -> self, + + ///Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + saturating_sub(self:self) -> self, + + ///Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + saturating_mul(self:self) -> self, + + ///Returns a vector containing the saturating division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + saturating_div(self:self) -> self, + ) + Fields ( @@ -6628,21 +6894,21 @@ impl_script_newtype! { ) + BinOps ( + self Add Raw(i32) -> Wrapped(IVec3), self Add self -> Wrapped(IVec3), self Add Wrapped(IVec3) -> Wrapped(IVec3), - self Add Raw(i32) -> Wrapped(IVec3), - self Sub Raw(i32) -> Wrapped(IVec3), self Sub Wrapped(IVec3) -> Wrapped(IVec3), + self Sub Raw(i32) -> Wrapped(IVec3), self Sub self -> Wrapped(IVec3), - self Div Raw(i32) -> Wrapped(IVec3), - self Div Wrapped(IVec3) -> Wrapped(IVec3), self Div self -> Wrapped(IVec3), + self Div Wrapped(IVec3) -> Wrapped(IVec3), + self Div Raw(i32) -> Wrapped(IVec3), self Mul Raw(i32) -> Wrapped(IVec3), self Mul self -> Wrapped(IVec3), self Mul Wrapped(IVec3) -> Wrapped(IVec3), - self Rem Raw(i32) -> Wrapped(IVec3), - self Rem self -> Wrapped(IVec3), self Rem Wrapped(IVec3) -> Wrapped(IVec3), + self Rem self -> Wrapped(IVec3), + self Rem Raw(i32) -> Wrapped(IVec3), ) + UnaryOps ( @@ -6675,7 +6941,7 @@ impl_script_newtype! { ///uses the element from `if_false`. select(Wrapped(BVec4),self,self) -> self, - ///Creates a 2D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + ///Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. /// ///Truncation to [`IVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. truncate(self:) -> Wrapped(IVec3), @@ -6779,6 +7045,20 @@ impl_script_newtype! { ///Compute the squared euclidean distance between two points in space. distance_squared(self:self) -> Raw(i32), + ///Returns the element-wise quotient of [Euclidean division] of `self` by `rhs`. + /// + ///# Panics + ///This function will panic if any `rhs` element is 0 or the division results in overflow. + div_euclid(self:self) -> self, + + ///Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`. + /// + ///# Panics + ///This function will panic if any `rhs` element is 0 or the division results in overflow. + /// + ///[Euclidean division]: i32::rem_euclid + rem_euclid(self:self) -> self, + ///Casts all elements of `self` to `f32`. as_vec4(&self:) -> Wrapped(Vec4), @@ -6788,6 +7068,46 @@ impl_script_newtype! { ///Casts all elements of `self` to `u32`. as_uvec4(&self:) -> Wrapped(UVec4), + ///Returns a vector containing the wrapping addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + wrapping_add(self:self) -> self, + + ///Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + wrapping_sub(self:self) -> self, + + ///Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + wrapping_mul(self:self) -> self, + + ///Returns a vector containing the wrapping division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + wrapping_div(self:self) -> self, + + ///Returns a vector containing the saturating addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + saturating_add(self:self) -> self, + + ///Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + saturating_sub(self:self) -> self, + + ///Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + saturating_mul(self:self) -> self, + + ///Returns a vector containing the saturating division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + saturating_div(self:self) -> self, + ) + Fields ( @@ -6799,20 +7119,20 @@ impl_script_newtype! { + BinOps ( self Add self -> Wrapped(IVec4), - self Add Raw(i32) -> Wrapped(IVec4), self Add Wrapped(IVec4) -> Wrapped(IVec4), + self Add Raw(i32) -> Wrapped(IVec4), self Sub self -> Wrapped(IVec4), self Sub Raw(i32) -> Wrapped(IVec4), self Sub Wrapped(IVec4) -> Wrapped(IVec4), + self Div self -> Wrapped(IVec4), self Div Wrapped(IVec4) -> Wrapped(IVec4), self Div Raw(i32) -> Wrapped(IVec4), - self Div self -> Wrapped(IVec4), self Mul Raw(i32) -> Wrapped(IVec4), self Mul self -> Wrapped(IVec4), self Mul Wrapped(IVec4) -> Wrapped(IVec4), + self Rem self -> Wrapped(IVec4), self Rem Wrapped(IVec4) -> Wrapped(IVec4), self Rem Raw(i32) -> Wrapped(IVec4), - self Rem self -> Wrapped(IVec4), ) + UnaryOps ( @@ -6937,6 +7257,46 @@ impl_script_newtype! { ///Casts all elements of `self` to `i32`. as_ivec2(&self:) -> Wrapped(IVec2), + ///Returns a vector containing the wrapping addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + wrapping_add(self:self) -> self, + + ///Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + wrapping_sub(self:self) -> self, + + ///Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + wrapping_mul(self:self) -> self, + + ///Returns a vector containing the wrapping division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + wrapping_div(self:self) -> self, + + ///Returns a vector containing the saturating addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + saturating_add(self:self) -> self, + + ///Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + saturating_sub(self:self) -> self, + + ///Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + saturating_mul(self:self) -> self, + + ///Returns a vector containing the saturating division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + saturating_div(self:self) -> self, + ) + Fields ( @@ -6954,11 +7314,11 @@ impl_script_newtype! { self Div self -> Wrapped(UVec2), self Div Wrapped(UVec2) -> Wrapped(UVec2), self Div Raw(u32) -> Wrapped(UVec2), - self Mul Wrapped(UVec2) -> Wrapped(UVec2), self Mul self -> Wrapped(UVec2), + self Mul Wrapped(UVec2) -> Wrapped(UVec2), self Mul Raw(u32) -> Wrapped(UVec2), - self Rem Wrapped(UVec2) -> Wrapped(UVec2), self Rem self -> Wrapped(UVec2), + self Rem Wrapped(UVec2) -> Wrapped(UVec2), self Rem Raw(u32) -> Wrapped(UVec2), ) + UnaryOps @@ -7094,6 +7454,46 @@ impl_script_newtype! { ///Casts all elements of `self` to `i32`. as_ivec3(&self:) -> Wrapped(IVec3), + ///Returns a vector containing the wrapping addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + wrapping_add(self:self) -> self, + + ///Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + wrapping_sub(self:self) -> self, + + ///Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + wrapping_mul(self:self) -> self, + + ///Returns a vector containing the wrapping division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + wrapping_div(self:self) -> self, + + ///Returns a vector containing the saturating addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + saturating_add(self:self) -> self, + + ///Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + saturating_sub(self:self) -> self, + + ///Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + saturating_mul(self:self) -> self, + + ///Returns a vector containing the saturating division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + saturating_div(self:self) -> self, + ) + Fields ( @@ -7103,21 +7503,21 @@ impl_script_newtype! { ) + BinOps ( - self Add self -> Wrapped(UVec3), - self Add Raw(u32) -> Wrapped(UVec3), self Add Wrapped(UVec3) -> Wrapped(UVec3), + self Add Raw(u32) -> Wrapped(UVec3), + self Add self -> Wrapped(UVec3), self Sub Wrapped(UVec3) -> Wrapped(UVec3), self Sub Raw(u32) -> Wrapped(UVec3), self Sub self -> Wrapped(UVec3), + self Div self -> Wrapped(UVec3), self Div Raw(u32) -> Wrapped(UVec3), self Div Wrapped(UVec3) -> Wrapped(UVec3), - self Div self -> Wrapped(UVec3), - self Mul Raw(u32) -> Wrapped(UVec3), self Mul self -> Wrapped(UVec3), self Mul Wrapped(UVec3) -> Wrapped(UVec3), + self Mul Raw(u32) -> Wrapped(UVec3), self Rem Raw(u32) -> Wrapped(UVec3), - self Rem self -> Wrapped(UVec3), self Rem Wrapped(UVec3) -> Wrapped(UVec3), + self Rem self -> Wrapped(UVec3), ) + UnaryOps ( @@ -7149,7 +7549,7 @@ impl_script_newtype! { ///uses the element from `if_false`. select(Wrapped(BVec4),self,self) -> self, - ///Creates a 2D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. + ///Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`. /// ///Truncation to [`UVec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()]. truncate(self:) -> Wrapped(UVec3), @@ -7243,6 +7643,46 @@ impl_script_newtype! { ///Casts all elements of `self` to `i32`. as_ivec4(&self:) -> Wrapped(IVec4), + ///Returns a vector containing the wrapping addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_add(rhs.x), self.y.wrapping_add(rhs.y), ..]`. + wrapping_add(self:self) -> self, + + ///Returns a vector containing the wrapping subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_sub(rhs.x), self.y.wrapping_sub(rhs.y), ..]`. + wrapping_sub(self:self) -> self, + + ///Returns a vector containing the wrapping multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_mul(rhs.x), self.y.wrapping_mul(rhs.y), ..]`. + wrapping_mul(self:self) -> self, + + ///Returns a vector containing the wrapping division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.wrapping_div(rhs.x), self.y.wrapping_div(rhs.y), ..]`. + wrapping_div(self:self) -> self, + + ///Returns a vector containing the saturating addition of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_add(rhs.x), self.y.saturating_add(rhs.y), ..]`. + saturating_add(self:self) -> self, + + ///Returns a vector containing the saturating subtraction of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_sub(rhs.x), self.y.saturating_sub(rhs.y), ..]`. + saturating_sub(self:self) -> self, + + ///Returns a vector containing the saturating multiplication of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_mul(rhs.x), self.y.saturating_mul(rhs.y), ..]`. + saturating_mul(self:self) -> self, + + ///Returns a vector containing the saturating division of `self` and `rhs`. + /// + ///In other words this computes `[self.x.saturating_div(rhs.x), self.y.saturating_div(rhs.y), ..]`. + saturating_div(self:self) -> self, + ) + Fields ( @@ -7257,14 +7697,14 @@ impl_script_newtype! { self Add Raw(u32) -> Wrapped(UVec4), self Add Wrapped(UVec4) -> Wrapped(UVec4), self Sub self -> Wrapped(UVec4), - self Sub Wrapped(UVec4) -> Wrapped(UVec4), self Sub Raw(u32) -> Wrapped(UVec4), + self Sub Wrapped(UVec4) -> Wrapped(UVec4), self Div self -> Wrapped(UVec4), - self Div Wrapped(UVec4) -> Wrapped(UVec4), self Div Raw(u32) -> Wrapped(UVec4), - self Mul self -> Wrapped(UVec4), + self Div Wrapped(UVec4) -> Wrapped(UVec4), self Mul Raw(u32) -> Wrapped(UVec4), self Mul Wrapped(UVec4) -> Wrapped(UVec4), + self Mul self -> Wrapped(UVec4), self Rem Wrapped(UVec4) -> Wrapped(UVec4), self Rem self -> Wrapped(UVec4), self Rem Raw(u32) -> Wrapped(UVec4), @@ -7482,10 +7922,10 @@ impl_script_newtype! { ( self Add self -> Wrapped(Mat3), self Sub self -> Wrapped(Mat3), - self Mul self -> Wrapped(Mat3), self Mul Wrapped(Mat3) -> Wrapped(Mat3), - self Mul Wrapped(Vec3A) -> Wrapped(Vec3A), + self Mul self -> Wrapped(Mat3), self Mul Wrapped(Affine2) -> Wrapped(Mat3), + self Mul Wrapped(Vec3A) -> Wrapped(Vec3A), self Mul Raw(f32) -> Wrapped(Mat3), self Mul Wrapped(Vec3) -> Wrapped(Vec3), ) @@ -7624,10 +8064,10 @@ impl_script_newtype! { ( self Add self -> Wrapped(Mat2), self Sub self -> Wrapped(Mat2), - self Mul Raw(f32) -> Wrapped(Mat2), self Mul Wrapped(Mat2) -> Wrapped(Mat2), - self Mul Wrapped(Vec2) -> Wrapped(Vec2), self Mul self -> Wrapped(Mat2), + self Mul Raw(f32) -> Wrapped(Mat2), + self Mul Wrapped(Vec2) -> Wrapped(Vec2), ) + UnaryOps ( @@ -7865,12 +8305,12 @@ impl_script_newtype! { ( self Add self -> Wrapped(Mat3A), self Sub self -> Wrapped(Mat3A), - self Mul Wrapped(Mat3A) -> Wrapped(Mat3A), - self Mul Wrapped(Vec3) -> Wrapped(Vec3), + self Mul self -> Wrapped(Mat3A), self Mul Wrapped(Affine2) -> Wrapped(Mat3A), + self Mul Wrapped(Vec3) -> Wrapped(Vec3), self Mul Raw(f32) -> Wrapped(Mat3A), - self Mul self -> Wrapped(Mat3A), self Mul Wrapped(Vec3A) -> Wrapped(Vec3A), + self Mul Wrapped(Mat3A) -> Wrapped(Mat3A), ) + UnaryOps ( @@ -8251,11 +8691,11 @@ impl_script_newtype! { ( self Add self -> Wrapped(Mat4), self Sub self -> Wrapped(Mat4), - self Mul self -> Wrapped(Mat4), - self Mul Raw(f32) -> Wrapped(Mat4), self Mul Wrapped(Vec4) -> Wrapped(Vec4), - self Mul Wrapped(Mat4) -> Wrapped(Mat4), self Mul Wrapped(Affine3A) -> Wrapped(Mat4), + self Mul Raw(f32) -> Wrapped(Mat4), + self Mul self -> Wrapped(Mat4), + self Mul Wrapped(Mat4) -> Wrapped(Mat4), ) + UnaryOps ( @@ -8388,8 +8828,8 @@ impl_script_newtype! { self Add self -> Wrapped(DMat2), self Sub self -> Wrapped(DMat2), self Mul self -> Wrapped(DMat2), - self Mul Wrapped(DVec2) -> Wrapped(DVec2), self Mul Wrapped(DMat2) -> Wrapped(DMat2), + self Mul Wrapped(DVec2) -> Wrapped(DVec2), self Mul Raw(f64) -> Wrapped(DMat2), ) + UnaryOps @@ -8627,8 +9067,8 @@ impl_script_newtype! { self Sub self -> Wrapped(DMat3), self Mul Raw(f64) -> Wrapped(DMat3), self Mul Wrapped(DAffine2) -> Wrapped(DMat3), - self Mul Wrapped(DMat3) -> Wrapped(DMat3), self Mul self -> Wrapped(DMat3), + self Mul Wrapped(DMat3) -> Wrapped(DMat3), self Mul Wrapped(DVec3) -> Wrapped(DVec3), ) + UnaryOps @@ -8993,11 +9433,11 @@ impl_script_newtype! { ( self Add self -> Wrapped(DMat4), self Sub self -> Wrapped(DMat4), - self Mul Wrapped(DVec4) -> Wrapped(DVec4), self Mul Raw(f64) -> Wrapped(DMat4), + self Mul Wrapped(DMat4) -> Wrapped(DMat4), self Mul self -> Wrapped(DMat4), + self Mul Wrapped(DVec4) -> Wrapped(DVec4), self Mul Wrapped(DAffine3) -> Wrapped(DMat4), - self Mul Wrapped(DMat4) -> Wrapped(DMat4), ) + UnaryOps ( @@ -9280,8 +9720,8 @@ impl_script_newtype! { ) + BinOps ( - self Mul Wrapped(Affine3A) -> Wrapped(Affine3A), self Mul Wrapped(Mat4) -> Wrapped(Mat4), + self Mul Wrapped(Affine3A) -> Wrapped(Affine3A), ) + UnaryOps ( @@ -9379,8 +9819,8 @@ impl_script_newtype! { ) + BinOps ( - self Mul Wrapped(DMat3) -> Wrapped(DMat3), self Mul Wrapped(DAffine2) -> Wrapped(DAffine2), + self Mul Wrapped(DMat3) -> Wrapped(DMat3), ) + UnaryOps ( @@ -9778,6 +10218,8 @@ impl_script_newtype! { ///Multiplies a quaternion and a 3D vector, returning the rotated vector. mul_vec3a(self:Wrapped(Vec3A)) -> Wrapped(Vec3A), + as_dquat(self:) -> Wrapped(DQuat), + as_f64(self:) -> Wrapped(DQuat), ) @@ -9789,10 +10231,10 @@ impl_script_newtype! { self Add self -> Wrapped(Quat), self Sub self -> Wrapped(Quat), self Div Raw(f32) -> Wrapped(Quat), - self Mul Wrapped(Vec3A) -> Wrapped(Vec3A), - self Mul Raw(f32) -> Wrapped(Quat), - self Mul Wrapped(Vec3) -> Wrapped(Vec3), self Mul self -> Wrapped(Quat), + self Mul Wrapped(Vec3) -> Wrapped(Vec3), + self Mul Raw(f32) -> Wrapped(Quat), + self Mul Wrapped(Vec3A) -> Wrapped(Vec3A), ) + UnaryOps ( @@ -10036,6 +10478,8 @@ impl_script_newtype! { ///Creates a quaternion from a 3x3 rotation matrix inside a 3D affine transform. from_affine3(Wrapped(&DAffine3)) -> self, + as_quat(self:) -> Wrapped(Quat), + as_f32(self:) -> Wrapped(Quat), ) @@ -10051,9 +10495,9 @@ impl_script_newtype! { self Add self -> Wrapped(DQuat), self Sub self -> Wrapped(DQuat), self Div Raw(f64) -> Wrapped(DQuat), + self Mul self -> Wrapped(DQuat), self Mul Raw(f64) -> Wrapped(DQuat), self Mul Wrapped(DVec3) -> Wrapped(DVec3), - self Mul self -> Wrapped(DQuat), ) + UnaryOps ( @@ -10112,7 +10556,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::Rect; ///let r = Rect::new(0., 4., 10., 6.); // w=10 h=2 ///let r = Rect::new(2., 3., 5., -1.); // w=3 h=4 @@ -10126,7 +10570,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///// Unit rect from [0,0] to [1,1] ///let r = Rect::from_corners(Vec2::ZERO, Vec2::ONE); // w=1 h=1 @@ -10143,7 +10587,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r = Rect::from_center_size(Vec2::ZERO, Vec2::ONE); // w=1 h=1 ///assert!(r.min.abs_diff_eq(Vec2::splat(-0.5), 1e-5)); @@ -10159,7 +10603,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r = Rect::from_center_half_size(Vec2::ZERO, Vec2::ONE); // w=2 h=2 ///assert!(r.min.abs_diff_eq(Vec2::splat(-1.), 1e-5)); @@ -10171,7 +10615,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r = Rect::from_corners(Vec2::ZERO, Vec2::new(0., 1.)); // w=0 h=1 ///assert!(r.is_empty()); @@ -10182,7 +10626,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::Rect; ///let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 ///assert!((r.width() - 5.).abs() <= 1e-5); @@ -10193,7 +10637,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::Rect; ///let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 ///assert!((r.height() - 1.).abs() <= 1e-5); @@ -10204,7 +10648,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 ///assert!(r.size().abs_diff_eq(Vec2::new(5., 1.), 1e-5)); @@ -10215,7 +10659,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 ///assert!(r.half_size().abs_diff_eq(Vec2::new(2.5, 0.5), 1e-5)); @@ -10226,7 +10670,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 ///assert!(r.center().abs_diff_eq(Vec2::new(2.5, 0.5), 1e-5)); @@ -10237,7 +10681,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::Rect; ///let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 ///assert!(r.contains(r.center())); @@ -10252,7 +10696,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r1 = Rect::new(0., 0., 5., 1.); // w=5 h=1 ///let r2 = Rect::new(1., -1., 3., 3.); // w=2 h=4 @@ -10269,7 +10713,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 ///let u = r.union_point(Vec2::new(3., 6.)); @@ -10286,7 +10730,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r1 = Rect::new(0., 0., 5., 1.); // w=5 h=1 ///let r2 = Rect::new(1., -1., 3., 3.); // w=2 h=4 @@ -10304,7 +10748,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r = Rect::new(0., 0., 5., 1.); // w=5 h=1 ///let r2 = r.inset(3.); // w=11 h=7 @@ -10323,7 +10767,7 @@ impl_script_newtype! { /// ///# Examples /// - ///```rust + ///``` ///# use bevy_math::{Rect, Vec2}; ///let r = Rect::new(2., 3., 4., 6.); ///let s = Rect::new(0., 0., 10., 10.); @@ -10401,10 +10845,6 @@ impl bevy_mod_scripting_lua::tealr::mlu::ExportInstances for BevyAPIGlobals { "Transform", bevy_mod_scripting_lua::tealr::mlu::UserDataProxy::::new, )?; - instances.add_instance( - "TextureAtlasSprite", - bevy_mod_scripting_lua::tealr::mlu::UserDataProxy::::new, - )?; instances.add_instance( "RenderLayers", bevy_mod_scripting_lua::tealr::mlu::UserDataProxy::::new, @@ -10615,7 +11055,7 @@ impl APIProvider for LuaBevyAPIProvider { .process_type::() .process_type::() .process_type::>() - .process_type::() + .process_type::() .process_type::() .process_type::>() .process_type::() @@ -10646,8 +11086,7 @@ impl APIProvider for LuaBevyAPIProvider { .process_type::() .process_type::() .process_type::() - .process_type::() - .process_type::>() + .process_type::() .process_type::() .process_type::() .process_type::>() @@ -10806,7 +11245,7 @@ impl APIProvider for LuaBevyAPIProvider { app.register_foreign_lua_type::(); app.register_foreign_lua_type::(); app.register_foreign_lua_type::(); - app.register_foreign_lua_type::(); + app.register_foreign_lua_type::(); app.register_foreign_lua_type::(); app.register_foreign_lua_type::(); app.register_foreign_lua_type::(); @@ -10832,7 +11271,7 @@ impl APIProvider for LuaBevyAPIProvider { app.register_foreign_lua_type::(); app.register_foreign_lua_type::(); app.register_foreign_lua_type::(); - app.register_foreign_lua_type::(); + app.register_foreign_lua_type::(); app.register_foreign_lua_type::(); app.register_foreign_lua_type::(); app.register_foreign_lua_type::(); diff --git a/bevy_script_api/src/lua/util.rs b/bevy_script_api/src/lua/util.rs index d7f2fc98..e13f262d 100644 --- a/bevy_script_api/src/lua/util.rs +++ b/bevy_script_api/src/lua/util.rs @@ -212,9 +212,6 @@ macro_rules! impl_tealr_generic{ } impl ::bevy::reflect::Reflect for $name { - fn type_name(&self) -> &str { - panic!("This should never be called, I am a dummy implementation"); - } fn into_any(self: Box) -> Box { panic!("This should never be called, I am a dummy implementation"); diff --git a/examples/lua/bevy_api.rs b/examples/lua/bevy_api.rs index 025e2e3d..b956dd9a 100644 --- a/examples/lua/bevy_api.rs +++ b/examples/lua/bevy_api.rs @@ -191,7 +191,7 @@ fn main() -> std::io::Result<()> { .expect("Something went wrong in the script!"); }); - world.send_event(AppExit) + world.send_event(AppExit); }, ); diff --git a/examples/rhai/bevy_api.rs b/examples/rhai/bevy_api.rs index b7ada450..b101f0bb 100644 --- a/examples/rhai/bevy_api.rs +++ b/examples/rhai/bevy_api.rs @@ -171,7 +171,7 @@ fn main() -> std::io::Result<()> { .expect("Something went wrong in the script!"); }); - world.send_event(AppExit) + world.send_event(AppExit); }); app.run(); diff --git a/examples/rhai/multiple_events_rhai.rs b/examples/rhai/multiple_events_rhai.rs index 7d455ac2..529e8572 100644 --- a/examples/rhai/multiple_events_rhai.rs +++ b/examples/rhai/multiple_events_rhai.rs @@ -103,7 +103,7 @@ fn call_update( ), >, ) { - to_update.for_each(|(entity, name)| { + to_update.iter().for_each(|(entity, name)| { events.send( RhaiEvent { hook_name: "on_update".to_owned(), diff --git a/examples/wrappers.rs b/examples/wrappers.rs index fe100262..6d6b1941 100644 --- a/examples/wrappers.rs +++ b/examples/wrappers.rs @@ -125,7 +125,7 @@ fn main() -> std::io::Result<()> { .expect("Could not find MyThing Resource"); println!("After script run: {my_thing:#?}"); // exit app - world.send_event(AppExit) + world.send_event(AppExit); }); app.run(); diff --git a/languages/bevy_mod_scripting_lua/Cargo.toml b/languages/bevy_mod_scripting_lua/Cargo.toml index 5cfdfdd1..4a15325b 100644 --- a/languages/bevy_mod_scripting_lua/Cargo.toml +++ b/languages/bevy_mod_scripting_lua/Cargo.toml @@ -39,7 +39,7 @@ name = "bevy_mod_scripting_lua" path = "src/lib.rs" [dependencies] -bevy = { version = "0.12", default-features = false } +bevy = { version = "0.13", default-features = false } bevy_mod_scripting_core = { path = "../../bevy_mod_scripting_core", version = "0.4.0" } tealr = { version = "0.9", features = [ "mlua_vendored", diff --git a/languages/bevy_mod_scripting_rhai/Cargo.toml b/languages/bevy_mod_scripting_rhai/Cargo.toml index b2fecb38..6c1fe5c2 100644 --- a/languages/bevy_mod_scripting_rhai/Cargo.toml +++ b/languages/bevy_mod_scripting_rhai/Cargo.toml @@ -16,7 +16,7 @@ name = "bevy_mod_scripting_rhai" path = "src/lib.rs" [dependencies] -bevy = { version = "0.12", default-features = false } +bevy = { version = "0.13", default-features = false } rhai = { version = "1.16", features = ["sync"] } bevy_mod_scripting_core = { path = "../../bevy_mod_scripting_core", version = "0.4.0" } anyhow = "1.0.75" diff --git a/languages/bevy_mod_scripting_rune/Cargo.toml b/languages/bevy_mod_scripting_rune/Cargo.toml index 6534c56f..d4bcf213 100644 --- a/languages/bevy_mod_scripting_rune/Cargo.toml +++ b/languages/bevy_mod_scripting_rune/Cargo.toml @@ -16,7 +16,7 @@ path = "src/lib.rs" [dependencies] bevy_mod_scripting_core = { path = "../../bevy_mod_scripting_core", version = "0.4.0" } -bevy = "0.12.1" +bevy = "0.13" rune = "0.13.1" rune-modules = "0.13.1" anyhow = "1.0.75" diff --git a/makefile b/makefile index 64ceeebe..a7d779be 100644 --- a/makefile +++ b/makefile @@ -58,22 +58,22 @@ generate_api: rustfmt ./bevy_script_api/src/generated.rs make_json_files: - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_asset@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_ecs@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_pbr@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_render@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_math@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_transform@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_sprite@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_ui@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_animation@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_core@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_core_pipeline@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_gltf@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_hierarchy@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_text@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_time@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_utils@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy_reflect@0.12.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p glam@0.24.1 -- -Zunstable-options --output-format json && \ - rustup run nightly-2023-07-16 cargo rustdoc -p bevy@0.12.1 -- -Zunstable-options --output-format json + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_asset@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_ecs@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_pbr@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_render@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_math@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_transform@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_sprite@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_ui@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_animation@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_core@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_core_pipeline@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_gltf@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_hierarchy@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_text@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_time@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_utils@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy_reflect@0.13.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p glam@0.25.0 -- -Zunstable-options --output-format json && \ + rustup run nightly-2024-03-06 cargo rustdoc -p bevy@0.13.0 -- -Zunstable-options --output-format json