diff --git a/Cargo.toml b/Cargo.toml index 475b6e6f69..5db973509f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -149,53 +149,53 @@ bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = " # bevy -bevy = { version = "0.17", default-features = false } -bevy_math = { version = "0.17", default-features = false, features = ["std"] } -bevy_transform = { version = "0.17", default-features = false } -bevy_reflect = { version = "0.17", default-features = false } -bevy_ecs = { version = "0.17", default-features = false } -bevy_asset = { version = "0.17", default-features = false } -bevy_app = { version = "0.17", default-features = false } -bevy_log = { version = "0.17", default-features = false } -bevy_internal = { version = "0.17", default-features = false } -bevy_diagnostic = { version = "0.17", default-features = false } -bevy_platform = { version = "0.17", default-features = false } -bevy_time = { version = "0.17", default-features = false } -bevy_input = { version = "0.17", default-features = false } -bevy_a11y = { version = "0.17", default-features = false, features = [ +bevy = { version = "0.18", default-features = false } +bevy_math = { version = "0.18", default-features = false, features = ["std"] } +bevy_transform = { version = "0.18", default-features = false } +bevy_reflect = { version = "0.18", default-features = false } +bevy_ecs = { version = "0.18", default-features = false } +bevy_asset = { version = "0.18", default-features = false } +bevy_app = { version = "0.18", default-features = false } +bevy_log = { version = "0.18", default-features = false } +bevy_internal = { version = "0.18", default-features = false } +bevy_diagnostic = { version = "0.18", default-features = false } +bevy_platform = { version = "0.18", default-features = false } +bevy_time = { version = "0.18", default-features = false } +bevy_input = { version = "0.18", default-features = false } +bevy_a11y = { version = "0.18", default-features = false, features = [ "std", "bevy_reflect", ] } -bevy_animation = { version = "0.17", default-features = false } -bevy_color = { version = "0.17", default-features = false, features = [ +bevy_animation = { version = "0.18", default-features = false } +bevy_color = { version = "0.18", default-features = false, features = [ "std", "bevy_reflect", ] } -bevy_core_pipeline = { version = "0.17", default-features = false } -bevy_gizmos = { version = "0.17", default-features = false } -bevy_gltf = { version = "0.17", default-features = false } -bevy_image = { version = "0.17", default-features = false, features = [ +bevy_core_pipeline = { version = "0.18", default-features = false } +bevy_gizmos = { version = "0.18", default-features = false } +bevy_gltf = { version = "0.18", default-features = false } +bevy_image = { version = "0.18", default-features = false, features = [ "bevy_reflect", ] } -bevy_input_focus = { version = "0.17", default-features = false, features = [ +bevy_input_focus = { version = "0.18", default-features = false, features = [ "std", "bevy_reflect", ] } -bevy_mesh = { version = "0.17", default-features = false } -bevy_pbr = { version = "0.17", default-features = false } -bevy_picking = { version = "0.17", default-features = false } -bevy_render = { version = "0.17", default-features = false } -bevy_scene = { version = "0.17", default-features = false } -bevy_sprite = { version = "0.17", default-features = false } -bevy_text = { version = "0.17", default-features = false } -bevy_window = { version = "0.17", default-features = false, features = [ +bevy_mesh = { version = "0.18", default-features = false } +bevy_pbr = { version = "0.18", default-features = false } +bevy_picking = { version = "0.18", default-features = false } +bevy_render = { version = "0.18", default-features = false } +bevy_scene = { version = "0.18", default-features = false } +bevy_sprite = { version = "0.18", default-features = false } +bevy_text = { version = "0.18", default-features = false } +bevy_window = { version = "0.18", default-features = false, features = [ "bevy_reflect", "std", ] } -bevy_winit = { version = "0.17", default-features = false } -bevy_utils = { version = "0.17", default-features = false, features = ["std"] } +bevy_winit = { version = "0.18", default-features = false } +bevy_utils = { version = "0.18", default-features = false, features = ["std"] } -glam = { version = "0.30.7", default-features = false } +glam = { version = "0.30.10", default-features = false } uuid = { version = "1.13", default-features = false } smol_str = { version = "0.2.0", default-features = false } nonmax = { version = "0.5", default-features = false, features = ["std"] } @@ -235,7 +235,7 @@ pretty_assertions = { version = "1.4", default-features = false, features = [ manifest-dir-macros = { version = "0.1.18", default-features = false } assert_cmd = { version = "2.1", default-features = false } tokio = { version = "1", default-features = false } -bevy_console = { version = "0.16", default-features = false } +bevy_console = { version = "0.17.1", default-features = false } tracing-tracy = { version = "0.11", default-features = false } libtest-mimic = { version = "0.8", default-features = false } criterion = { version = "0.5", default-features = false } @@ -247,6 +247,7 @@ bevy = { workspace = true, features = [ "bevy_render", "bevy_window", "bevy_asset", + "bevy_log", "bevy_core_pipeline", "bevy_sprite", "bevy_sprite_render", @@ -331,7 +332,7 @@ required-features = ["lua54", "rhai"] [[example]] name = "docgen" path = "examples/docgen.rs" -required-features = [] +required-features = ["lua_language_server_files"] [[example]] name = "runscript" diff --git a/assets/tests/query/dynamic_component_query.lua b/assets/tests/query/dynamic_component_query.lua index 65375c79ec..702929a457 100644 --- a/assets/tests/query/dynamic_component_query.lua +++ b/assets/tests/query/dynamic_component_query.lua @@ -4,7 +4,7 @@ local NewComponent = world.register_new_component("NewComponent") world.add_default_component(entity_a, NewComponent) local found_entities = {} -for i,result in pairs(world.query():component(NewComponent):build()) do +for i, result in pairs(world.query():component(NewComponent):build()) do table.insert(found_entities, result:entity()) end @@ -15,6 +15,6 @@ expected_entities = { } for i, entity in ipairs(found_entities) do - assert(entity:index() == expected_entities[i]:index(), "Expected entity " .. expected_entities[i]:index() .. " but got " .. entity:index()) + assert(entity:index():index() == expected_entities[i]:index():index(), + "Expected entity " .. expected_entities[i]:index():index() .. " but got " .. entity:index():index()) end - diff --git a/assets/tests/query/query_can_access_components.lua b/assets/tests/query/query_can_access_components.lua index 6b181993ee..65ec539cbb 100644 --- a/assets/tests/query/query_can_access_components.lua +++ b/assets/tests/query/query_can_access_components.lua @@ -14,7 +14,8 @@ local query_result = world.query():component(componentA):component(componentA):c assert(#query_result == 1, "Expected 1 result, got " .. #query_result) for i, result in pairs(query_result) do - assert(result:entity():index() == entity_a:index(), "Expected entity_a, got " .. result:entity():index()) + assert(result:entity():index():index() == entity_a:index():index(), + "Expected entity_a, got " .. result:entity():index():index()) components = result:components() assert(#components == 3, "Expected 3 components, got " .. #components) A = components[1] diff --git a/assets/tests/query/query_returns_all_entities_matching.lua b/assets/tests/query/query_returns_all_entities_matching.lua index 527085cac6..747e793c07 100644 --- a/assets/tests/query/query_returns_all_entities_matching.lua +++ b/assets/tests/query/query_returns_all_entities_matching.lua @@ -13,7 +13,7 @@ world.add_default_component(entity_c, component_with) world.add_default_component(entity_b, component_without) local found_entities = {} -for i,result in pairs(world.query():component(component_with):without(component_without):build()) do +for i, result in pairs(world.query():component(component_with):without(component_without):build()) do table.insert(found_entities, result:entity()) end @@ -26,6 +26,6 @@ expected_entities = { } for i, entity in ipairs(found_entities) do - assert(entity:index() == expected_entities[i]:index(), "Expected entity " .. expected_entities[i]:index() .. " but got " .. entity:index()) + assert(entity:index():index() == expected_entities[i]:index():index(), + "Expected entity " .. expected_entities[i]:index():index() .. " but got " .. entity:index():index()) end - diff --git a/codegen/Cargo.bootstrap.toml b/codegen/Cargo.bootstrap.toml index ad18aba78d..301eb863f2 100644 --- a/codegen/Cargo.bootstrap.toml +++ b/codegen/Cargo.bootstrap.toml @@ -6,12 +6,13 @@ edition = "2024" [dependencies] bevy_mod_scripting_bindings = { path = "{{BMS_BINDINGS_PATH}}" } -bevy_reflect = { version = "0.17", features = [ +bevy_reflect = { version = "0.18", features = [ "smol_str", "glam", "petgraph", "smallvec", "uuid", + "wgpu-types", ] } [workspace] diff --git a/codegen/src/args.rs b/codegen/src/args.rs index 815bcbf50f..d45115086c 100644 --- a/codegen/src/args.rs +++ b/codegen/src/args.rs @@ -85,7 +85,7 @@ pub struct Args { short, long, help = "The rust version to consider when looking at stability tags etc", - default_value = "1.88.0" + default_value = "1.89.0" )] pub minimum_supported_rust_version_target: Option, } diff --git a/codegen_bevy_features.txt b/codegen_bevy_features.txt index 187b384f91..659ccd878b 100644 --- a/codegen_bevy_features.txt +++ b/codegen_bevy_features.txt @@ -1 +1 @@ -default,bevy_asset,bevy_animation,bevy_core_pipeline,bevy_ui,bevy_pbr,bevy_render,bevy_text,bevy_sprite,file_watcher,multi_threaded,std,async_executor,bevy_reflect/glam,bevy_reflect/uuid,bevy_reflect/smol_str,bevy_sprite/bevy_sprite_picking_backend \ No newline at end of file +default,bevy_asset,bevy_animation,bevy_core_pipeline,bevy_ui,bevy_pbr,bevy_render,bevy_text,bevy_sprite,file_watcher,multi_threaded,std,async_executor,bevy_reflect/wgpu-types,bevy_reflect/glam,bevy_reflect/uuid,bevy_reflect/smol_str,bevy_sprite/bevy_picking \ No newline at end of file diff --git a/crates/bevy_mod_scripting_asset/src/loader.rs b/crates/bevy_mod_scripting_asset/src/loader.rs index c917d67b06..f4d38387b7 100644 --- a/crates/bevy_mod_scripting_asset/src/loader.rs +++ b/crates/bevy_mod_scripting_asset/src/loader.rs @@ -2,6 +2,7 @@ use bevy_asset::AssetLoader; use bevy_log::warn; +use bevy_reflect::TypePath; use serde::{Deserialize, Serialize}; use crate::{Language, LanguageExtensions, ScriptAsset, ScriptAssetError}; @@ -14,6 +15,7 @@ pub struct ScriptSettings { } /// A loader for script assets +#[derive(TypePath)] pub struct ScriptAssetLoader { /// The file extensions this loader should handle language_extensions: &'static LanguageExtensions, @@ -55,17 +57,14 @@ impl AssetLoader for ScriptAssetLoader { ) -> Result { let mut content = Vec::new(); reader.read_to_end(&mut content).await.map_err(|e| { - ScriptAssetError::new( - "reading from disk", - Some(load_context.asset_path()), - Box::new(e), - ) + ScriptAssetError::new("reading from disk", Some(load_context.path()), Box::new(e)) })?; if let Some(processor) = &self.preprocessor { processor(&mut content)?; } let language = settings.language.clone().unwrap_or_else(|| { let ext = load_context + .path() .path() .extension() .and_then(|e| e.to_str()) @@ -74,7 +73,7 @@ impl AssetLoader for ScriptAssetLoader { .get(ext) .cloned() .unwrap_or_else(|| { - warn!("Unknown language for {:?}", load_context.path().display()); + warn!("Unknown language for {}", load_context.path()); Language::Unknown }) }); diff --git a/crates/bevy_mod_scripting_bindings/src/error.rs b/crates/bevy_mod_scripting_bindings/src/error.rs index 7881857604..0a2e73bd39 100644 --- a/crates/bevy_mod_scripting_bindings/src/error.rs +++ b/crates/bevy_mod_scripting_bindings/src/error.rs @@ -560,7 +560,7 @@ impl DisplayWithTypeInfo for InteropError { ) } InteropError::MissingEntity(entity) => { - if *entity == Entity::PLACEHOLDER || entity.index() == 0 { + if *entity == Entity::PLACEHOLDER || entity.index().index() == 0 { write!( f, "Invalid entity: {entity}. Are you trying to use an entity in a callback in which it's unavailable?" diff --git a/crates/bevy_mod_scripting_bindings/src/reference.rs b/crates/bevy_mod_scripting_bindings/src/reference.rs index 9666bfd2fb..6478d310d5 100644 --- a/crates/bevy_mod_scripting_bindings/src/reference.rs +++ b/crates/bevy_mod_scripting_bindings/src/reference.rs @@ -68,13 +68,13 @@ impl DisplayWithTypeInfo for ReflectReference { .and_then(|t| t.try_get_context().ok().map(|c| c.world)) }); - if let Some(guard) = guard { - if let Ok(r) = self.with_reflect(guard.clone(), |s| { + if let Some(guard) = guard + && let Ok(r) = self.with_reflect(guard.clone(), |s| { PrintReflectAsDebug::new_with_opt_info(s, Some(type_info_provider)) .to_string_with_type_info(f, Some(type_info_provider)) - }) { - return r; - } + }) + { + return r; } } diff --git a/crates/bevy_mod_scripting_bindings/src/script_component.rs b/crates/bevy_mod_scripting_bindings/src/script_component.rs index a72ea2df90..3e3e9a85e6 100644 --- a/crates/bevy_mod_scripting_bindings/src/script_component.rs +++ b/crates/bevy_mod_scripting_bindings/src/script_component.rs @@ -98,6 +98,7 @@ impl WorldAccessGuard<'_> { needs_drop::().then_some(|x| x.drop_as::()), true, ComponentCloneBehavior::Default, + None, ) }; w.register_component_with_descriptor(descriptor) diff --git a/crates/bevy_mod_scripting_bindings/src/world.rs b/crates/bevy_mod_scripting_bindings/src/world.rs index ac96c7ebf3..b4edbd22f9 100644 --- a/crates/bevy_mod_scripting_bindings/src/world.rs +++ b/crates/bevy_mod_scripting_bindings/src/world.rs @@ -598,7 +598,7 @@ impl<'w> WorldAccessGuard<'w> { /// checks if a given entity exists and is valid pub fn is_valid_entity(&self, entity: Entity) -> Result { let cell = self.as_unsafe_world_cell()?; - Ok(cell.get_entity(entity).is_ok() && entity.index() != 0) + Ok(cell.get_entity(entity).is_ok() && entity.index().index() != 0) } /// Tries to call a fitting overload of the function with the given name and in the type id's namespace based on the arguments provided. @@ -1267,7 +1267,7 @@ impl WorldAccessGuard<'_> { self.with_global_access(|world| { let mut queue = CommandQueue::default(); let mut commands = Commands::new(&mut queue, world); - commands.entity(parent).remove_children(children); + commands.entity(parent).detach_children(children); queue.apply(world); }) } diff --git a/crates/bevy_mod_scripting_core/src/script_system.rs b/crates/bevy_mod_scripting_core/src/script_system.rs index 9cc4461e35..65e31fccb2 100644 --- a/crates/bevy_mod_scripting_core/src/script_system.rs +++ b/crates/bevy_mod_scripting_core/src/script_system.rs @@ -7,7 +7,7 @@ use crate::{ use ::{ bevy_ecs::{ - component::{ComponentId, Tick}, + component::ComponentId, entity::Entity, query::{FilteredAccess, FilteredAccessSet, QueryState}, reflect::AppTypeRegistry, @@ -18,6 +18,7 @@ use ::{ bevy_reflect::Reflect, }; use bevy_ecs::{ + change_detection::{CheckChangeTicks, Tick}, schedule::{InternedSystemSet, IntoScheduleConfigs, Schedule, Schedules}, system::{RunSystemError, SystemIn, SystemStateFlags}, world::DeferredWorld, @@ -466,7 +467,7 @@ impl System for DynamicScriptSystem

{ component_access_set } - fn check_change_tick(&mut self, change_tick: bevy_ecs::component::CheckChangeTicks) { + fn check_change_tick(&mut self, change_tick: CheckChangeTicks) { self.last_run.check_tick(change_tick); } diff --git a/crates/bevy_mod_scripting_display/src/printer/mod.rs b/crates/bevy_mod_scripting_display/src/printer/mod.rs index affe7fc9ac..0252043e9d 100644 --- a/crates/bevy_mod_scripting_display/src/printer/mod.rs +++ b/crates/bevy_mod_scripting_display/src/printer/mod.rs @@ -24,14 +24,13 @@ impl<'f, 'b: 'f, 't> ReflectPrinter<'f, 'b, 't> { /// Prints a `Reflect` value as if it was its native `Debug` implementation. pub fn debug(&mut self, value: &dyn PartialReflect) -> std::fmt::Result { - if let Some(type_info_provider) = &self.type_info { - if let Some(reflect_type) = value.try_as_reflect() - && let Some(display_type_data) = type_info_provider - .get_type_data::(reflect_type.type_id()) - && let Some(as_dyn_trait) = display_type_data.get(reflect_type) - { - return as_dyn_trait.display_with_type_info(self.formatter, self.type_info); - } + if let Some(type_info_provider) = &self.type_info + && let Some(reflect_type) = value.try_as_reflect() + && let Some(display_type_data) = type_info_provider + .get_type_data::(reflect_type.type_id()) + && let Some(as_dyn_trait) = display_type_data.get(reflect_type) + { + return as_dyn_trait.display_with_type_info(self.formatter, self.type_info); } // try to print the value as if it was its native Debug implementation diff --git a/crates/bindings/bevy_a11y_bms_bindings/Cargo.toml b/crates/bindings/bevy_a11y_bms_bindings/Cargo.toml index c4f64ef59a..4f00350f7a 100644 --- a/crates/bindings/bevy_a11y_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_a11y_bms_bindings/Cargo.toml @@ -17,15 +17,15 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_a11y = { version = "0.17.3", features = ["bevy_reflect", "std"], default-features = true} +bevy_a11y = { version = "0.18.0", features = ["bevy_reflect", "std"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} diff --git a/crates/bindings/bevy_animation_bms_bindings/Cargo.toml b/crates/bindings/bevy_animation_bms_bindings/Cargo.toml index 7c3e6a501a..e82327fa0d 100644 --- a/crates/bindings/bevy_animation_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_animation_bms_bindings/Cargo.toml @@ -17,32 +17,32 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_animation = { version = "0.17.3", features = [], default-features = true} +bevy_animation = { version = "0.18.0", features = ["bevy_mesh"], default-features = true} -bevy_animation_macros = { version = "^0.17.3", features = [], default-features = true} +bevy_animation_macros = { version = "^0.18.0", features = [], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_mesh = { version = "^0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_time = { version = "^0.17.3", features = ["bevy_reflect", "std"], default-features = true} +bevy_time = { version = "^0.18.0", features = ["bevy_reflect", "std"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} blake3 = { version = "^1.0", features = [], default-features = true} @@ -50,7 +50,7 @@ either = { version = "^1.13", features = [], default-features = true} petgraph = { version = "^0.8", features = [], default-features = true} -ron = { version = "^0.10", features = [], default-features = true} +ron = { version = "^0.12", features = [], default-features = true} serde = { version = "^1", features = [], default-features = true} diff --git a/crates/bindings/bevy_animation_bms_bindings/src/lib.rs b/crates/bindings/bevy_animation_bms_bindings/src/lib.rs index 7d89eca12e..571ddc33b5 100644 --- a/crates/bindings/bevy_animation_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_animation_bms_bindings/src/lib.rs @@ -404,18 +404,17 @@ pub(crate) fn register_animation_target_id_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_animation_target_functions(world: &mut World) { +pub(crate) fn register_animated_by_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_animation::AnimationTarget, + ::bevy_animation::AnimatedBy, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_animation::AnimationTarget>| { - let output: Val<::bevy_animation::AnimationTarget> = { + |_self: Ref<::bevy_animation::AnimatedBy>| { + let output: Val<::bevy_animation::AnimatedBy> = { { - let output: Val<::bevy_animation::AnimationTarget> = - <::bevy_animation::AnimationTarget as ::std::clone::Clone>::clone(&_self) - .into(); + let output: Val<::bevy_animation::AnimatedBy> = + <::bevy_animation::AnimatedBy as ::std::clone::Clone>::clone(&_self).into(); output } }; @@ -428,7 +427,7 @@ pub(crate) fn register_animation_target_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_animation::AnimationTarget, + ::bevy_animation::AnimatedBy, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -697,35 +696,6 @@ pub(crate) fn register_active_animation_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_weights_curve_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_animation::gltf_curves::WeightsCurve, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_animation::gltf_curves::WeightsCurve>| { - let output: Val<::bevy_animation::gltf_curves::WeightsCurve> = { - { - let output: Val<::bevy_animation::gltf_curves::WeightsCurve> = <::bevy_animation::gltf_curves::WeightsCurve as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_animation::gltf_curves::WeightsCurve, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} pub(crate) fn register_cubic_rotation_curve_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_animation::gltf_curves::CubicRotationCurve, @@ -908,10 +878,9 @@ impl Plugin for BevyAnimationScriptingPlugin { register_animation_player_functions(&mut world); register_animation_graph_functions(&mut world); register_animation_target_id_functions(&mut world); - register_animation_target_functions(&mut world); + register_animated_by_functions(&mut world); register_repeat_animation_functions(&mut world); register_active_animation_functions(&mut world); - register_weights_curve_functions(&mut world); register_cubic_rotation_curve_functions(&mut world); register_animation_graph_node_functions(&mut world); register_threaded_animation_graph_functions(&mut world); diff --git a/crates/bindings/bevy_asset_bms_bindings/Cargo.toml b/crates/bindings/bevy_asset_bms_bindings/Cargo.toml index bedb808eec..1fe6702404 100644 --- a/crates/bindings/bevy_asset_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_asset_bms_bindings/Cargo.toml @@ -17,12 +17,12 @@ bevy_app = { workspace = true, features = ["std"] } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_asset = { version = "0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_asset_macros = { version = "^0.17.3", features = [], default-features = true} +bevy_asset_macros = { version = "^0.18.0", features = [], default-features = true} -bevy_tasks = { version = "^0.17.3", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} +bevy_tasks = { version = "^0.18.0", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} js-sys = { version = "^0.3", features = [], default-features = true} diff --git a/crates/bindings/bevy_camera_bms_bindings/Cargo.toml b/crates/bindings/bevy_camera_bms_bindings/Cargo.toml index f672ff791c..933019ed3e 100644 --- a/crates/bindings/bevy_camera_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_camera_bms_bindings/Cargo.toml @@ -17,31 +17,31 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_camera = { version = "0.17.3", features = [], default-features = true} +bevy_camera = { version = "0.18.0", features = [], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_mesh = { version = "^0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} -bevy_window = { version = "^0.17.3", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} +bevy_window = { version = "^0.18.0", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} diff --git a/crates/bindings/bevy_camera_bms_bindings/src/lib.rs b/crates/bindings/bevy_camera_bms_bindings/src/lib.rs index 0a326481ef..edef7e2ae9 100644 --- a/crates/bindings/bevy_camera_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_camera_bms_bindings/src/lib.rs @@ -200,23 +200,6 @@ pub(crate) fn register_view_visibility_functions(world: &mut World) { }, " Returns `true` if the entity is visible in any view.\n Otherwise, returns `false`.", &["_self"], - ) - .register_documented( - "set", - |mut _self: Mut<::bevy_camera::visibility::ViewVisibility>| { - let output: () = { - { - let output: () = ::bevy_camera::visibility::ViewVisibility::set( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Sets the visibility to `true`. This should not be considered reversible for a given frame,\n as this component tracks whether or not the entity visible in _any_ view.\n This will be automatically reset to `false` every frame in [`VisibilityPropagate`] and then set\n to the proper value in [`CheckVisibility`].\n You should only manually set this if you are defining a custom visibility system,\n in which case the system should be placed in the [`CheckVisibility`] set.\n For normal user-defined entity visibility, see [`Visibility`].\n [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate\n [`CheckVisibility`]: VisibilitySystems::CheckVisibility", - &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); @@ -526,6 +509,72 @@ pub(crate) fn register_clear_color_config_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_msaa_writeback_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::MsaaWriteback, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_camera::MsaaWriteback>| { + let output: () = { + { + let output: () = <::bevy_camera::MsaaWriteback as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::MsaaWriteback>| { + let output: Val<::bevy_camera::MsaaWriteback> = { + { + let output: Val<::bevy_camera::MsaaWriteback> = <::bevy_camera::MsaaWriteback as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::MsaaWriteback>, + other: Ref<::bevy_camera::MsaaWriteback>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::MsaaWriteback as ::std::cmp::PartialEq< + ::bevy_camera::MsaaWriteback, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::MsaaWriteback, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_orthographic_projection_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_camera::OrthographicProjection, @@ -702,9 +751,30 @@ pub(crate) fn register_frustum_functions(world: &mut World) { }; output }, - " Check if the frustum contains the Axis-Aligned Bounding Box (AABB).\n Referenced from: [Frustum Culling](https://learnopengl.com/Guest-Articles/2021/Scene/Frustum-Culling)", + " Check if the frustum contains the entire Axis-Aligned Bounding Box (AABB).\n Referenced from: [Frustum Culling](https://learnopengl.com/Guest-Articles/2021/Scene/Frustum-Culling)", &["_self", "aabb", "world_from_local"], ) + .register_documented( + "contains_aabb_identity", + | + _self: Ref<::bevy_camera::primitives::Frustum>, + aabb: Ref<::bevy_camera::primitives::Aabb>| + { + let output: bool = { + { + let output: bool = ::bevy_camera::primitives::Frustum::contains_aabb_identity( + &_self, + &aabb, + ) + .into(); + output + } + }; + output + }, + " Optimized version of [`Self::contains_aabb`] when the AABB is already in world space.\n Use this when `world_from_local` would be [`Affine3A::IDENTITY`].", + &["_self", "aabb"], + ) .register_documented( "from_clip_from_world", |clip_from_world: Ref<::bevy_math::Mat4>| { @@ -773,6 +843,27 @@ pub(crate) fn register_frustum_functions(world: &mut World) { }, " Checks if an Oriented Bounding Box (obb) intersects the frustum.", &["_self", "aabb", "world_from_local", "intersect_near", "intersect_far"], + ) + .register_documented( + "intersects_obb_identity", + | + _self: Ref<::bevy_camera::primitives::Frustum>, + aabb: Ref<::bevy_camera::primitives::Aabb>| + { + let output: bool = { + { + let output: bool = ::bevy_camera::primitives::Frustum::intersects_obb_identity( + &_self, + &aabb, + ) + .into(); + output + } + }; + output + }, + " Optimized version of [`Frustum::intersects_obb`]\n where the transform is [`Affine3A::IDENTITY`] and both `intersect_near` and `intersect_far` are `true`.", + &["_self", "aabb"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); @@ -1111,64 +1202,73 @@ pub(crate) fn register_render_target_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_camera_output_mode_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::CameraOutputMode, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::CameraOutputMode>| { + let output: Val<::bevy_camera::CameraOutputMode> = { + { + let output: Val<::bevy_camera::CameraOutputMode> = + <::bevy_camera::CameraOutputMode as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::CameraOutputMode, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_image_render_target_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_camera::ImageRenderTarget, >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_camera::ImageRenderTarget>| { - let output: () = { - { - let output: () = <::bevy_camera::ImageRenderTarget as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_camera::ImageRenderTarget>| { - let output: Val<::bevy_camera::ImageRenderTarget> = { - { - let output: Val<::bevy_camera::ImageRenderTarget> = <::bevy_camera::ImageRenderTarget as ::std::clone::Clone>::clone( - &_self, - ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::ImageRenderTarget>| { + let output: Val<::bevy_camera::ImageRenderTarget> = { + { + let output: Val<::bevy_camera::ImageRenderTarget> = + <::bevy_camera::ImageRenderTarget as ::std::clone::Clone>::clone(&_self) .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_camera::ImageRenderTarget>, - other: Ref<::bevy_camera::ImageRenderTarget>| - { - let output: bool = { - { - let output: bool = <::bevy_camera::ImageRenderTarget as ::std::cmp::PartialEq< + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_camera::ImageRenderTarget>, + other: Ref<::bevy_camera::ImageRenderTarget>| { + let output: bool = { + { + let output: bool = + <::bevy_camera::ImageRenderTarget as ::std::cmp::PartialEq< ::bevy_camera::ImageRenderTarget, >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -1814,6 +1914,36 @@ pub(crate) fn register_cascades_visible_entities_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_no_auto_aabb_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::NoAutoAabb, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::NoAutoAabb>| { + let output: Val<::bevy_camera::visibility::NoAutoAabb> = { + { + let output: Val<::bevy_camera::visibility::NoAutoAabb> = + <::bevy_camera::visibility::NoAutoAabb as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::visibility::NoAutoAabb, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_render_layers_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_camera::visibility::RenderLayers, @@ -2169,6 +2299,7 @@ impl Plugin for BevyCameraScriptingPlugin { register_camera_2_d_functions(&mut world); register_camera_3_d_functions(&mut world); register_clear_color_config_functions(&mut world); + register_msaa_writeback_functions(&mut world); register_orthographic_projection_functions(&mut world); register_perspective_projection_functions(&mut world); register_projection_functions(&mut world); @@ -2180,6 +2311,7 @@ impl Plugin for BevyCameraScriptingPlugin { register_exposure_functions(&mut world); register_camera_main_texture_usages_functions(&mut world); register_render_target_functions(&mut world); + register_camera_output_mode_functions(&mut world); register_image_render_target_functions(&mut world); register_manual_texture_view_handle_functions(&mut world); register_normalized_render_target_functions(&mut world); @@ -2197,6 +2329,7 @@ impl Plugin for BevyCameraScriptingPlugin { register_visible_mesh_entities_functions(&mut world); register_cubemap_visible_entities_functions(&mut world); register_cascades_visible_entities_functions(&mut world); + register_no_auto_aabb_functions(&mut world); register_render_layers_functions(&mut world); register_visibility_range_functions(&mut world); } diff --git a/crates/bindings/bevy_color_bms_bindings/Cargo.toml b/crates/bindings/bevy_color_bms_bindings/Cargo.toml index 3f520f538a..e7a53e6382 100644 --- a/crates/bindings/bevy_color_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_color_bms_bindings/Cargo.toml @@ -17,15 +17,15 @@ bevy_app = { workspace = true, features = ["std"] } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_color = { version = "0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} bytemuck = { version = "^1", features = [], default-features = true} -wgpu-types = { version = "^26", features = ["std"], default-features = false} +wgpu-types = { version = "^27", features = ["std"], default-features = false} diff --git a/crates/bindings/bevy_core_pipeline_bms_bindings/Cargo.toml b/crates/bindings/bevy_core_pipeline_bms_bindings/Cargo.toml index c597ec1279..45625b0a30 100644 --- a/crates/bindings/bevy_core_pipeline_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_core_pipeline_bms_bindings/Cargo.toml @@ -17,36 +17,38 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_core_pipeline = { version = "0.17.3", features = ["tonemapping_luts", "webgl"], default-features = true} +bevy_core_pipeline = { version = "0.18.0", features = ["tonemapping_luts", "webgl"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_diagnostic = { version = "^0.18.0", features = ["std", "sysinfo", "sysinfo_plugin"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_render = { version = "^0.17.3", features = ["multi_threaded", "webgl"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_shader = { version = "^0.17.3", features = [], default-features = true} +bevy_render = { version = "^0.18.0", features = ["morph", "multi_threaded", "webgl"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_shader = { version = "^0.18.0", features = [], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_window = { version = "^0.17.3", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} + +bevy_window = { version = "^0.18.0", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} bitflags = { version = "^2.3", features = [], default-features = true} diff --git a/crates/bindings/bevy_core_pipeline_bms_bindings/src/lib.rs b/crates/bindings/bevy_core_pipeline_bms_bindings/src/lib.rs index 7e0b870b04..5c910b99a6 100644 --- a/crates/bindings/bevy_core_pipeline_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_core_pipeline_bms_bindings/src/lib.rs @@ -204,6 +204,39 @@ pub(crate) fn register_deferred_prepass_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_deferred_prepass_double_buffer_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_core_pipeline::prepass::DeferredPrepassDoubleBuffer, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_core_pipeline::prepass::DeferredPrepassDoubleBuffer>| { + let output: Val< + ::bevy_core_pipeline::prepass::DeferredPrepassDoubleBuffer, + > = { + { + let output: Val< + ::bevy_core_pipeline::prepass::DeferredPrepassDoubleBuffer, + > = <::bevy_core_pipeline::prepass::DeferredPrepassDoubleBuffer as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_core_pipeline::prepass::DeferredPrepassDoubleBuffer, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_depth_prepass_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_core_pipeline::prepass::DepthPrepass, @@ -233,6 +266,39 @@ pub(crate) fn register_depth_prepass_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_depth_prepass_double_buffer_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_core_pipeline::prepass::DepthPrepassDoubleBuffer, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_core_pipeline::prepass::DepthPrepassDoubleBuffer>| { + let output: Val< + ::bevy_core_pipeline::prepass::DepthPrepassDoubleBuffer, + > = { + { + let output: Val< + ::bevy_core_pipeline::prepass::DepthPrepassDoubleBuffer, + > = <::bevy_core_pipeline::prepass::DepthPrepassDoubleBuffer as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_core_pipeline::prepass::DepthPrepassDoubleBuffer, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_motion_vector_prepass_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_core_pipeline::prepass::MotionVectorPrepass, @@ -337,7 +403,9 @@ impl Plugin for BevyCorePipelineScriptingPlugin { register_tonemapping_functions(&mut world); register_deband_dither_functions(&mut world); register_deferred_prepass_functions(&mut world); + register_deferred_prepass_double_buffer_functions(&mut world); register_depth_prepass_functions(&mut world); + register_depth_prepass_double_buffer_functions(&mut world); register_motion_vector_prepass_functions(&mut world); register_normal_prepass_functions(&mut world); register_order_independent_transparency_settings_functions(&mut world); diff --git a/crates/bindings/bevy_ecs_bms_bindings/Cargo.toml b/crates/bindings/bevy_ecs_bms_bindings/Cargo.toml index b72d92b738..87eae2938c 100644 --- a/crates/bindings/bevy_ecs_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_ecs_bms_bindings/Cargo.toml @@ -17,22 +17,22 @@ bevy_app = { workspace = true, features = ["std"] } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_ecs = { version = "0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} arrayvec = { version = "^0.7.4", features = ["std"], default-features = false} -bevy_ecs_macros = { version = "^0.17.3", features = [], default-features = true} +bevy_ecs_macros = { version = "^0.18.0", features = [], default-features = true} -bevy_platform = { version = "^0.17.3", features = ["alloc", "serialize", "std"], default-features = true} +bevy_platform = { version = "^0.18.0", features = ["alloc", "serialize", "std"], default-features = true} -bevy_ptr = { version = "^0.17.3", features = [], default-features = true} +bevy_ptr = { version = "^0.18.0", features = [], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_tasks = { version = "^0.17.3", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} +bevy_tasks = { version = "^0.18.0", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel", "std"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel", "std"], default-features = true} bitflags = { version = "^2.3", features = ["std"], default-features = false} diff --git a/crates/bindings/bevy_ecs_bms_bindings/src/lib.rs b/crates/bindings/bevy_ecs_bms_bindings/src/lib.rs index a9f518d0d4..fbb8b9f285 100644 --- a/crates/bindings/bevy_ecs_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_ecs_bms_bindings/src/lib.rs @@ -71,12 +71,12 @@ pub(crate) fn register_entity_functions(world: &mut World) { &["bits"], ) .register_documented( - "from_row", - |row: Val<::bevy_ecs::entity::EntityRow>| { + "from_index", + |index: Val<::bevy_ecs::entity::EntityIndex>| { let output: Val<::bevy_ecs::entity::Entity> = { { - let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::entity::Entity::from_row( - row.into_inner(), + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::entity::Entity::from_index( + index.into_inner(), ) .into(); output @@ -84,19 +84,19 @@ pub(crate) fn register_entity_functions(world: &mut World) { }; output }, - " Creates a new entity ID with the specified `row` and a generation of 1.\n # Note\n Spawning a specific `entity` value is __rarely the right choice__. Most apps should favor\n [`Commands::spawn`](crate::system::Commands::spawn). This method should generally\n only be used for sharing entities across apps, and only when they have a scheme\n worked out to share an index space (which doesn't happen by default).\n In general, one should not try to synchronize the ECS by attempting to ensure that\n `Entity` lines up between instances, but instead insert a secondary identifier as\n a component.", - &["row"], + " Creates a new entity ID with the specified `index` and an unspecified generation.\n # Note\n Spawning a specific `entity` value is __rarely the right choice__. Most apps should favor\n [`Commands::spawn`](crate::system::Commands::spawn). This method should generally\n only be used for sharing entities across apps, and only when they have a scheme\n worked out to share an index space (which doesn't happen by default).\n In general, one should not try to synchronize the ECS by attempting to ensure that\n `Entity` lines up between instances, but instead insert a secondary identifier as\n a component.", + &["index"], ) .register_documented( - "from_row_and_generation", + "from_index_and_generation", | - row: Val<::bevy_ecs::entity::EntityRow>, + index: Val<::bevy_ecs::entity::EntityIndex>, generation: Val<::bevy_ecs::entity::EntityGeneration>| { let output: Val<::bevy_ecs::entity::Entity> = { { - let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::entity::Entity::from_row_and_generation( - row.into_inner(), + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::entity::Entity::from_index_and_generation( + index.into_inner(), generation.into_inner(), ) .into(); @@ -106,7 +106,7 @@ pub(crate) fn register_entity_functions(world: &mut World) { output }, " Creates a new instance with the given index and generation.", - &["row", "generation"], + &["index", "generation"], ) .register_documented( "generation", @@ -122,15 +122,15 @@ pub(crate) fn register_entity_functions(world: &mut World) { }; output }, - " Returns the generation of this Entity's row. The generation is incremented each time an\n entity with a given row is despawned. This serves as a \"count\" of the number of times a\n given row has been reused (row, generation) pairs uniquely identify a given Entity.", + " Returns the generation of this Entity's index. The generation is incremented each time an\n entity with a given index is despawned. This serves as a \"count\" of the number of times a\n given index has been reused (index, generation) pairs uniquely identify a given Entity.", &["_self"], ) .register_documented( "index", |_self: Val<::bevy_ecs::entity::Entity>| { - let output: u32 = { + let output: Val<::bevy_ecs::entity::EntityIndex> = { { - let output: u32 = ::bevy_ecs::entity::Entity::index( + let output: Val<::bevy_ecs::entity::EntityIndex> = ::bevy_ecs::entity::Entity::index( _self.into_inner(), ) .into(); @@ -139,15 +139,15 @@ pub(crate) fn register_entity_functions(world: &mut World) { }; output }, - " Equivalent to `self.row().index()`. See [`Self::row`] for details.", + " Return a transiently unique identifier.\n See also [`EntityIndex`].\n No two simultaneously-live entities share the same index, but dead entities' indices may collide\n with both live and dead entities. Useful for compactly representing entities within a\n specific snapshot of the world, such as when serializing.", &["_self"], ) .register_documented( - "row", + "index_u32", |_self: Val<::bevy_ecs::entity::Entity>| { - let output: Val<::bevy_ecs::entity::EntityRow> = { + let output: u32 = { { - let output: Val<::bevy_ecs::entity::EntityRow> = ::bevy_ecs::entity::Entity::row( + let output: u32 = ::bevy_ecs::entity::Entity::index_u32( _self.into_inner(), ) .into(); @@ -156,7 +156,7 @@ pub(crate) fn register_entity_functions(world: &mut World) { }; output }, - " Return a transiently unique identifier.\n See also [`EntityRow`].\n No two simultaneously-live entities share the same row, but dead entities' indices may collide\n with both live and dead entities. Useful for compactly representing entities within a\n specific snapshot of the world, such as when serializing.", + " Equivalent to `self.index().index()`. See [`Self::index`] for details.", &["_self"], ) .register_documented( @@ -676,14 +676,14 @@ pub(crate) fn register_component_id_functions(world: &mut World) { } pub(crate) fn register_tick_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::component::Tick, + ::bevy_ecs::change_detection::Tick, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ecs::component::Tick>| { + |_self: Ref<::bevy_ecs::change_detection::Tick>| { let output: () = { { - let output: () = <::bevy_ecs::component::Tick as ::core::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_ecs::change_detection::Tick as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -697,10 +697,10 @@ pub(crate) fn register_tick_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_ecs::component::Tick>| { - let output: Val<::bevy_ecs::component::Tick> = { + |_self: Ref<::bevy_ecs::change_detection::Tick>| { + let output: Val<::bevy_ecs::change_detection::Tick> = { { - let output: Val<::bevy_ecs::component::Tick> = <::bevy_ecs::component::Tick as ::core::clone::Clone>::clone( + let output: Val<::bevy_ecs::change_detection::Tick> = <::bevy_ecs::change_detection::Tick as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -715,13 +715,13 @@ pub(crate) fn register_tick_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_ecs::component::Tick>, - other: Ref<::bevy_ecs::component::Tick>| + _self: Ref<::bevy_ecs::change_detection::Tick>, + other: Ref<::bevy_ecs::change_detection::Tick>| { let output: bool = { { - let output: bool = <::bevy_ecs::component::Tick as ::core::cmp::PartialEq< - ::bevy_ecs::component::Tick, + let output: bool = <::bevy_ecs::change_detection::Tick as ::core::cmp::PartialEq< + ::bevy_ecs::change_detection::Tick, >>::eq(&_self, &other) .into(); output @@ -734,10 +734,10 @@ pub(crate) fn register_tick_functions(world: &mut World) { ) .register_documented( "get", - |_self: Val<::bevy_ecs::component::Tick>| { + |_self: Val<::bevy_ecs::change_detection::Tick>| { let output: u32 = { { - let output: u32 = ::bevy_ecs::component::Tick::get( + let output: u32 = ::bevy_ecs::change_detection::Tick::get( _self.into_inner(), ) .into(); @@ -752,13 +752,13 @@ pub(crate) fn register_tick_functions(world: &mut World) { .register_documented( "is_newer_than", | - _self: Val<::bevy_ecs::component::Tick>, - last_run: Val<::bevy_ecs::component::Tick>, - this_run: Val<::bevy_ecs::component::Tick>| + _self: Val<::bevy_ecs::change_detection::Tick>, + last_run: Val<::bevy_ecs::change_detection::Tick>, + this_run: Val<::bevy_ecs::change_detection::Tick>| { let output: bool = { { - let output: bool = ::bevy_ecs::component::Tick::is_newer_than( + let output: bool = ::bevy_ecs::change_detection::Tick::is_newer_than( _self.into_inner(), last_run.into_inner(), this_run.into_inner(), @@ -775,9 +775,9 @@ pub(crate) fn register_tick_functions(world: &mut World) { .register_documented( "new", |tick: u32| { - let output: Val<::bevy_ecs::component::Tick> = { + let output: Val<::bevy_ecs::change_detection::Tick> = { { - let output: Val<::bevy_ecs::component::Tick> = ::bevy_ecs::component::Tick::new( + let output: Val<::bevy_ecs::change_detection::Tick> = ::bevy_ecs::change_detection::Tick::new( tick, ) .into(); @@ -791,10 +791,10 @@ pub(crate) fn register_tick_functions(world: &mut World) { ) .register_documented( "set", - |mut _self: Mut<::bevy_ecs::component::Tick>, tick: u32| { + |mut _self: Mut<::bevy_ecs::change_detection::Tick>, tick: u32| { let output: () = { { - let output: () = ::bevy_ecs::component::Tick::set( + let output: () = ::bevy_ecs::change_detection::Tick::set( &mut _self, tick, ) @@ -811,20 +811,20 @@ pub(crate) fn register_tick_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ecs::component::Tick, + ::bevy_ecs::change_detection::Tick, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_component_ticks_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::component::ComponentTicks, + ::bevy_ecs::change_detection::ComponentTicks, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_ecs::component::ComponentTicks>| { - let output: Val<::bevy_ecs::component::ComponentTicks> = { + |_self: Ref<::bevy_ecs::change_detection::ComponentTicks>| { + let output: Val<::bevy_ecs::change_detection::ComponentTicks> = { { - let output: Val<::bevy_ecs::component::ComponentTicks> = <::bevy_ecs::component::ComponentTicks as ::core::clone::Clone>::clone( + let output: Val<::bevy_ecs::change_detection::ComponentTicks> = <::bevy_ecs::change_detection::ComponentTicks as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -839,13 +839,13 @@ pub(crate) fn register_component_ticks_functions(world: &mut World) { .register_documented( "is_added", | - _self: Ref<::bevy_ecs::component::ComponentTicks>, - last_run: Val<::bevy_ecs::component::Tick>, - this_run: Val<::bevy_ecs::component::Tick>| + _self: Ref<::bevy_ecs::change_detection::ComponentTicks>, + last_run: Val<::bevy_ecs::change_detection::Tick>, + this_run: Val<::bevy_ecs::change_detection::Tick>| { let output: bool = { { - let output: bool = ::bevy_ecs::component::ComponentTicks::is_added( + let output: bool = ::bevy_ecs::change_detection::ComponentTicks::is_added( &_self, last_run.into_inner(), this_run.into_inner(), @@ -862,13 +862,13 @@ pub(crate) fn register_component_ticks_functions(world: &mut World) { .register_documented( "is_changed", | - _self: Ref<::bevy_ecs::component::ComponentTicks>, - last_run: Val<::bevy_ecs::component::Tick>, - this_run: Val<::bevy_ecs::component::Tick>| + _self: Ref<::bevy_ecs::change_detection::ComponentTicks>, + last_run: Val<::bevy_ecs::change_detection::Tick>, + this_run: Val<::bevy_ecs::change_detection::Tick>| { let output: bool = { { - let output: bool = ::bevy_ecs::component::ComponentTicks::is_changed( + let output: bool = ::bevy_ecs::change_detection::ComponentTicks::is_changed( &_self, last_run.into_inner(), this_run.into_inner(), @@ -884,10 +884,10 @@ pub(crate) fn register_component_ticks_functions(world: &mut World) { ) .register_documented( "new", - |change_tick: Val<::bevy_ecs::component::Tick>| { - let output: Val<::bevy_ecs::component::ComponentTicks> = { + |change_tick: Val<::bevy_ecs::change_detection::Tick>| { + let output: Val<::bevy_ecs::change_detection::ComponentTicks> = { { - let output: Val<::bevy_ecs::component::ComponentTicks> = ::bevy_ecs::component::ComponentTicks::new( + let output: Val<::bevy_ecs::change_detection::ComponentTicks> = ::bevy_ecs::change_detection::ComponentTicks::new( change_tick.into_inner(), ) .into(); @@ -902,12 +902,12 @@ pub(crate) fn register_component_ticks_functions(world: &mut World) { .register_documented( "set_changed", | - mut _self: Mut<::bevy_ecs::component::ComponentTicks>, - change_tick: Val<::bevy_ecs::component::Tick>| + mut _self: Mut<::bevy_ecs::change_detection::ComponentTicks>, + change_tick: Val<::bevy_ecs::change_detection::Tick>| { let output: () = { { - let output: () = ::bevy_ecs::component::ComponentTicks::set_changed( + let output: () = ::bevy_ecs::change_detection::ComponentTicks::set_changed( &mut _self, change_tick.into_inner(), ) @@ -917,14 +917,14 @@ pub(crate) fn register_component_ticks_functions(world: &mut World) { }; output }, - " Manually sets the change tick.\n This is normally done automatically via the [`DerefMut`](core::ops::DerefMut) implementation\n on [`Mut`](crate::change_detection::Mut), [`ResMut`](crate::change_detection::ResMut), etc.\n However, components and resources that make use of interior mutability might require manual updates.\n # Example\n ```no_run\n # use bevy_ecs::{world::World, component::ComponentTicks};\n let world: World = unimplemented!();\n let component_ticks: ComponentTicks = unimplemented!();\n component_ticks.set_changed(world.read_change_tick());\n ```", + " Manually sets the change tick.\n This is normally done automatically via the [`DerefMut`](core::ops::DerefMut) implementation\n on [`Mut`](crate::change_detection::Mut), [`ResMut`](crate::change_detection::ResMut), etc.\n However, components and resources that make use of interior mutability might require manual updates.\n # Example\n ```no_run\n # use bevy_ecs::{world::World, change_detection::ComponentTicks};\n let world: World = unimplemented!();\n let component_ticks: ComponentTicks = unimplemented!();\n component_ticks.set_changed(world.read_change_tick());\n ```", &["_self", "change_tick"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ecs::component::ComponentTicks, + ::bevy_ecs::change_detection::ComponentTicks, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -1060,16 +1060,97 @@ pub(crate) fn register_entity_hash_set_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_entity_row_functions(world: &mut World) { +pub(crate) fn register_entity_index_set_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::entity::EntityRow, + ::bevy_ecs::entity::EntityIndexSet, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ecs::entity::EntityIndexSet>| { + let output: Val<::bevy_ecs::entity::EntityIndexSet> = { + { + let output: Val<::bevy_ecs::entity::EntityIndexSet> = <::bevy_ecs::entity::EntityIndexSet as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ecs::entity::EntityIndexSet>, + other: Ref<::bevy_ecs::entity::EntityIndexSet>| + { + let output: bool = { + { + let output: bool = <::bevy_ecs::entity::EntityIndexSet as ::core::cmp::PartialEq< + ::bevy_ecs::entity::EntityIndexSet, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "new", + || { + let output: Val<::bevy_ecs::entity::EntityIndexSet> = { + { + let output: Val<::bevy_ecs::entity::EntityIndexSet> = ::bevy_ecs::entity::EntityIndexSet::new() + .into(); + output + } + }; + output + }, + " Creates an empty `EntityIndexSet`.\n Equivalent to [`IndexSet::with_hasher(EntityHash)`].\n [`IndexSet::with_hasher(EntityHash)`]: IndexSet::with_hasher", + &[], + ) + .register_documented( + "with_capacity", + |n: usize| { + let output: Val<::bevy_ecs::entity::EntityIndexSet> = { + { + let output: Val<::bevy_ecs::entity::EntityIndexSet> = ::bevy_ecs::entity::EntityIndexSet::with_capacity( + n, + ) + .into(); + output + } + }; + output + }, + " Creates an empty `EntityIndexSet` with the specified capacity.\n Equivalent to [`IndexSet::with_capacity_and_hasher(n, EntityHash)`].\n [`IndexSet::with_capacity_and_hasher(n, EntityHash)`]: IndexSet::with_capacity_and_hasher", + &["n"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ecs::entity::EntityIndexSet, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_entity_index_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ecs::entity::EntityIndex, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ecs::entity::EntityRow>| { + |_self: Ref<::bevy_ecs::entity::EntityIndex>| { let output: () = { { - let output: () = <::bevy_ecs::entity::EntityRow as ::core::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_ecs::entity::EntityIndex as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1083,10 +1164,10 @@ pub(crate) fn register_entity_row_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_ecs::entity::EntityRow>| { - let output: Val<::bevy_ecs::entity::EntityRow> = { + |_self: Ref<::bevy_ecs::entity::EntityIndex>| { + let output: Val<::bevy_ecs::entity::EntityIndex> = { { - let output: Val<::bevy_ecs::entity::EntityRow> = <::bevy_ecs::entity::EntityRow as ::core::clone::Clone>::clone( + let output: Val<::bevy_ecs::entity::EntityIndex> = <::bevy_ecs::entity::EntityIndex as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1101,13 +1182,13 @@ pub(crate) fn register_entity_row_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_ecs::entity::EntityRow>, - other: Ref<::bevy_ecs::entity::EntityRow>| + _self: Ref<::bevy_ecs::entity::EntityIndex>, + other: Ref<::bevy_ecs::entity::EntityIndex>| { let output: bool = { { - let output: bool = <::bevy_ecs::entity::EntityRow as ::core::cmp::PartialEq< - ::bevy_ecs::entity::EntityRow, + let output: bool = <::bevy_ecs::entity::EntityIndex as ::core::cmp::PartialEq< + ::bevy_ecs::entity::EntityIndex, >>::eq(&_self, &other) .into(); output @@ -1120,10 +1201,10 @@ pub(crate) fn register_entity_row_functions(world: &mut World) { ) .register_documented( "index", - |_self: Val<::bevy_ecs::entity::EntityRow>| { + |_self: Val<::bevy_ecs::entity::EntityIndex>| { let output: u32 = { { - let output: u32 = ::bevy_ecs::entity::EntityRow::index( + let output: u32 = ::bevy_ecs::entity::EntityIndex::index( _self.into_inner(), ) .into(); @@ -1139,7 +1220,7 @@ pub(crate) fn register_entity_row_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ecs::entity::EntityRow, + ::bevy_ecs::entity::EntityIndex, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -1162,7 +1243,7 @@ pub(crate) fn register_entity_generation_functions(world: &mut World) { }; output }, - " Returns the [`EntityGeneration`] that would result from this many more `versions` of the corresponding [`EntityRow`] from passing.", + " Returns the [`EntityGeneration`] that would result from this many more `versions` of the corresponding [`EntityIndex`] from passing.", &["_self", "versions"], ) .register_documented( @@ -1319,36 +1400,6 @@ pub(crate) fn register_disabled_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_internal_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::entity_disabling::Internal, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ecs::entity_disabling::Internal>| { - let output: Val<::bevy_ecs::entity_disabling::Internal> = { - { - let output: Val<::bevy_ecs::entity_disabling::Internal> = - <::bevy_ecs::entity_disabling::Internal as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ecs::entity_disabling::Internal, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} pub(crate) fn register_removed_component_entity_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_ecs::lifecycle::RemovedComponentEntity, @@ -1407,11 +1458,11 @@ impl Plugin for BevyEcsScriptingPlugin { register_tick_functions(&mut world); register_component_ticks_functions(&mut world); register_entity_hash_set_functions(&mut world); - register_entity_row_functions(&mut world); + register_entity_index_set_functions(&mut world); + register_entity_index_functions(&mut world); register_entity_generation_functions(&mut world); register_entity_hash_functions(&mut world); register_disabled_functions(&mut world); - register_internal_functions(&mut world); register_removed_component_entity_functions(&mut world); register_observed_by_functions(&mut world); } diff --git a/crates/bindings/bevy_gizmos_bms_bindings/Cargo.toml b/crates/bindings/bevy_gizmos_bms_bindings/Cargo.toml index 82d1045051..bf90f72fcd 100644 --- a/crates/bindings/bevy_gizmos_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_gizmos_bms_bindings/Cargo.toml @@ -17,47 +17,31 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_gizmos = { version = "0.17.3", features = ["bevy_core_pipeline", "bevy_pbr", "bevy_render", "bevy_sprite_render", "webgl"], default-features = false} +bevy_gizmos = { version = "0.18.0", features = ["bevy_light"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_core_pipeline = { version = "^0.17.3", features = ["tonemapping_luts", "webgl"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_gizmos_macros = { version = "^0.18.0", features = [], default-features = true} -bevy_gizmos_macros = { version = "^0.17.3", features = [], default-features = true} +bevy_light = { version = "^0.18.0", features = ["webgl"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_light = { version = "^0.17.3", features = ["webgl"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_time = { version = "^0.18.0", features = ["bevy_reflect", "std"], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_pbr = { version = "^0.17.3", features = ["webgl"], default-features = true} - -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} - -bevy_render = { version = "^0.17.3", features = ["multi_threaded", "webgl"], default-features = true} - -bevy_shader = { version = "^0.17.3", features = [], default-features = true} - -bevy_sprite_render = { version = "^0.17.3", features = ["bevy_text", "webgl"], default-features = true} - -bevy_time = { version = "^0.17.3", features = ["bevy_reflect", "std"], default-features = true} - -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} - -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} - -bytemuck = { version = "^1.0", features = [], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} diff --git a/crates/bindings/bevy_gltf_bms_bindings/Cargo.toml b/crates/bindings/bevy_gltf_bms_bindings/Cargo.toml index deaefa3c57..f87fc0ee79 100644 --- a/crates/bindings/bevy_gltf_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_gltf_bms_bindings/Cargo.toml @@ -17,42 +17,42 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_gltf = { version = "0.17.3", features = ["bevy_animation"], default-features = true} +bevy_gltf = { version = "0.18.0", features = ["bevy_animation"], default-features = true} base64 = { version = "^0.22.0", features = [], default-features = true} -bevy_animation = { version = "^0.17.3", features = [], default-features = true} +bevy_animation = { version = "^0.18.0", features = ["bevy_mesh"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_light = { version = "^0.17.3", features = ["webgl"], default-features = true} +bevy_light = { version = "^0.18.0", features = ["webgl"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_mesh = { version = "^0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_pbr = { version = "^0.17.3", features = ["webgl"], default-features = true} +bevy_pbr = { version = "^0.18.0", features = ["webgl"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_render = { version = "^0.17.3", features = ["multi_threaded", "webgl"], default-features = true} +bevy_render = { version = "^0.18.0", features = ["morph", "multi_threaded", "webgl"], default-features = true} -bevy_scene = { version = "^0.17.3", features = ["serialize"], default-features = true} +bevy_scene = { version = "^0.18.0", features = ["serialize"], default-features = true} -bevy_tasks = { version = "^0.17.3", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} +bevy_tasks = { version = "^0.18.0", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} fixedbitset = { version = "^0.5", features = [], default-features = true} diff --git a/crates/bindings/bevy_image_bms_bindings/Cargo.toml b/crates/bindings/bevy_image_bms_bindings/Cargo.toml index ef30dfd7df..42bb00b171 100644 --- a/crates/bindings/bevy_image_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_image_bms_bindings/Cargo.toml @@ -17,20 +17,20 @@ bevy_ecs = { workspace = true, features = ["std", "bevy_reflect"] } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_image = { version = "0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} bitflags = { version = "^2.3", features = [], default-features = true} diff --git a/crates/bindings/bevy_image_bms_bindings/src/lib.rs b/crates/bindings/bevy_image_bms_bindings/src/lib.rs index 9fc9afcd52..b3cbf18371 100644 --- a/crates/bindings/bevy_image_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_image_bms_bindings/src/lib.rs @@ -349,24 +349,6 @@ pub(crate) fn register_image_functions(world: &mut World) { " Compute the byte offset where the data of a specific pixel is stored\n Returns None if the provided coordinates are out of bounds.\n For 2D textures, Z is the layer number. For 1D textures, Y and Z are ignored.", &["_self", "coords"], ) - .register_documented( - "reinterpret_stacked_2d_as_array", - |mut _self: Mut<::bevy_image::Image>, layers: u32| { - let output: () = { - { - let output: () = ::bevy_image::Image::reinterpret_stacked_2d_as_array( - &mut _self, - layers, - ) - .into(); - output - } - }; - output - }, - " Takes a 2D image containing vertically stacked images of the same size, and reinterprets\n it as a 2D array texture, where each of the stacked images becomes one layer of the\n array. This is primarily for use with the `texture2DArray` shader uniform type.\n # Panics\n Panics if the texture is not 2D, has more than one layers or is not evenly dividable into\n the `layers`.", - &["_self", "layers"], - ) .register_documented( "size", |_self: Ref<::bevy_image::Image>| { diff --git a/crates/bindings/bevy_input_bms_bindings/Cargo.toml b/crates/bindings/bevy_input_bms_bindings/Cargo.toml index 6d7280d6c0..9c1debf859 100644 --- a/crates/bindings/bevy_input_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_input_bms_bindings/Cargo.toml @@ -17,17 +17,17 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_input = { version = "0.17.3", features = ["bevy_reflect", "smol_str", "std"], default-features = true} +bevy_input = { version = "0.18.0", features = ["bevy_reflect", "gamepad", "keyboard", "mouse", "smol_str", "std"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_platform = { version = "^0.17.3", features = ["alloc", "serialize", "std"], default-features = true} +bevy_platform = { version = "^0.18.0", features = ["alloc", "serialize", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} diff --git a/crates/bindings/bevy_input_focus_bms_bindings/Cargo.toml b/crates/bindings/bevy_input_focus_bms_bindings/Cargo.toml index dfd0616aab..1bbbc30b0e 100644 --- a/crates/bindings/bevy_input_focus_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_input_focus_bms_bindings/Cargo.toml @@ -17,19 +17,19 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_input_focus = { version = "0.17.3", features = ["bevy_reflect", "std"], default-features = true} +bevy_input_focus = { version = "0.18.0", features = ["bevy_picking", "bevy_reflect", "gamepad", "keyboard", "mouse", "std"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_input = { version = "^0.17.3", features = ["bevy_reflect", "smol_str", "std"], default-features = true} +bevy_input = { version = "^0.18.0", features = ["bevy_reflect", "gamepad", "keyboard", "mouse", "smol_str", "std"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_window = { version = "^0.17.3", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} +bevy_window = { version = "^0.18.0", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} diff --git a/crates/bindings/bevy_input_focus_bms_bindings/src/lib.rs b/crates/bindings/bevy_input_focus_bms_bindings/src/lib.rs index 1030ab25b9..c18b35dc4b 100644 --- a/crates/bindings/bevy_input_focus_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_input_focus_bms_bindings/src/lib.rs @@ -50,6 +50,26 @@ pub(crate) fn register_input_focus_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input_focus::InputFocus>, + other: Ref<::bevy_input_focus::InputFocus>| + { + let output: bool = { + { + let output: bool = <::bevy_input_focus::InputFocus as ::core::cmp::PartialEq< + ::bevy_input_focus::InputFocus, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) .register_documented( "from_entity", |entity: Val<::bevy_ecs::entity::Entity>| { @@ -302,7 +322,7 @@ pub(crate) fn register_directional_navigation_map_functions(world: &mut World) { }; output }, - " Adds a new entity to the navigation map, overwriting any existing neighbors for that entity.\n Removes an entity from the navigation map, including all connections to and from it.\n Note that this is an O(n) operation, where n is the number of entities in the map,\n as we must iterate over each entity to check for connections to the removed entity.\n If you are removing multiple entities, consider using [`remove_multiple`](Self::remove_multiple) instead.", + " Removes an entity from the navigation map, including all connections to and from it.\n Note that this is an O(n) operation, where n is the number of entities in the map,\n as we must iterate over each entity to check for connections to the removed entity.\n If you are removing multiple entities, consider using [`remove_multiple`](Self::remove_multiple) instead.", &["_self", "entity"], ) .register_documented( @@ -336,6 +356,67 @@ pub(crate) fn register_directional_navigation_map_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_auto_navigation_config_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_input_focus::directional_navigation::AutoNavigationConfig, + >::new(world) + .register_documented( + "clone", + | + _self: Ref< + ::bevy_input_focus::directional_navigation::AutoNavigationConfig, + >| + { + let output: Val< + ::bevy_input_focus::directional_navigation::AutoNavigationConfig, + > = { + { + let output: Val< + ::bevy_input_focus::directional_navigation::AutoNavigationConfig, + > = <::bevy_input_focus::directional_navigation::AutoNavigationConfig as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref< + ::bevy_input_focus::directional_navigation::AutoNavigationConfig, + >, + other: Ref< + ::bevy_input_focus::directional_navigation::AutoNavigationConfig, + >| + { + let output: bool = { + { + let output: bool = <::bevy_input_focus::directional_navigation::AutoNavigationConfig as ::core::cmp::PartialEq< + ::bevy_input_focus::directional_navigation::AutoNavigationConfig, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_input_focus::directional_navigation::AutoNavigationConfig, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_nav_neighbors_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input_focus::directional_navigation::NavNeighbors, @@ -412,6 +493,59 @@ pub(crate) fn register_nav_neighbors_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_focusable_area_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_input_focus::directional_navigation::FocusableArea, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_input_focus::directional_navigation::FocusableArea>| { + let output: Val< + ::bevy_input_focus::directional_navigation::FocusableArea, + > = { + { + let output: Val< + ::bevy_input_focus::directional_navigation::FocusableArea, + > = <::bevy_input_focus::directional_navigation::FocusableArea as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input_focus::directional_navigation::FocusableArea>, + other: Ref<::bevy_input_focus::directional_navigation::FocusableArea>| + { + let output: bool = { + { + let output: bool = <::bevy_input_focus::directional_navigation::FocusableArea as ::core::cmp::PartialEq< + ::bevy_input_focus::directional_navigation::FocusableArea, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_input_focus::directional_navigation::FocusableArea, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_tab_index_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input_focus::tab_navigation::TabIndex, @@ -546,7 +680,9 @@ impl Plugin for BevyInputFocusScriptingPlugin { register_input_focus_visible_functions(&mut world); register_auto_focus_functions(&mut world); register_directional_navigation_map_functions(&mut world); + register_auto_navigation_config_functions(&mut world); register_nav_neighbors_functions(&mut world); + register_focusable_area_functions(&mut world); register_tab_index_functions(&mut world); register_tab_group_functions(&mut world); } diff --git a/crates/bindings/bevy_light_bms_bindings/Cargo.toml b/crates/bindings/bevy_light_bms_bindings/Cargo.toml index 4b8ac5395c..5b9ffca51a 100644 --- a/crates/bindings/bevy_light_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_light_bms_bindings/Cargo.toml @@ -17,31 +17,31 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_light = { version = "0.17.3", features = ["webgl"], default-features = true} +bevy_light = { version = "0.18.0", features = ["webgl"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_mesh = { version = "^0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_platform = { version = "^0.17.3", features = ["alloc", "serialize", "std"], default-features = true} +bevy_platform = { version = "^0.18.0", features = ["alloc", "serialize", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} diff --git a/crates/bindings/bevy_light_bms_bindings/src/lib.rs b/crates/bindings/bevy_light_bms_bindings/src/lib.rs index 59f3376b4f..1473f47b8c 100644 --- a/crates/bindings/bevy_light_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_light_bms_bindings/src/lib.rs @@ -68,6 +68,34 @@ pub(crate) fn register_ambient_light_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_global_ambient_light_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::GlobalAmbientLight, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::GlobalAmbientLight>| { + let output: Val<::bevy_light::GlobalAmbientLight> = { + { + let output: Val<::bevy_light::GlobalAmbientLight> = + <::bevy_light::GlobalAmbientLight as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_light::GlobalAmbientLight, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_environment_map_light_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_light::EnvironmentMapLight, @@ -827,6 +855,7 @@ impl Plugin for BevyLightScriptingPlugin { let mut world = app.world_mut(); register_clustered_decal_functions(&mut world); register_ambient_light_functions(&mut world); + register_global_ambient_light_functions(&mut world); register_environment_map_light_functions(&mut world); register_generated_environment_map_light_functions(&mut world); register_irradiance_volume_functions(&mut world); diff --git a/crates/bindings/bevy_math_bms_bindings/Cargo.toml b/crates/bindings/bevy_math_bms_bindings/Cargo.toml index 21fd6bd838..ffc93dd89c 100644 --- a/crates/bindings/bevy_math_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_math_bms_bindings/Cargo.toml @@ -17,14 +17,14 @@ bevy_app = { workspace = true, features = ["std"] } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_math = { version = "0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} derive_more = { version = "^2", features = ["std"], default-features = false} -glam = { version = "^0.30.1", features = ["rand", "std"], default-features = false} +glam = { version = "^0.30.7", features = ["rand", "std"], default-features = false} itertools = { version = "^0.14.0", features = ["use_alloc", "use_std"], default-features = false} diff --git a/crates/bindings/bevy_math_bms_bindings/src/lib.rs b/crates/bindings/bevy_math_bms_bindings/src/lib.rs index 913642c169..f7ce297411 100644 --- a/crates/bindings/bevy_math_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_math_bms_bindings/src/lib.rs @@ -192,6 +192,29 @@ pub(crate) fn register_compass_octant_functions(world: &mut World) { "", &["_self", "other"], ) + .register_documented( + "is_in_direction", + | + _self: Val<::bevy_math::CompassOctant>, + origin: Val<::bevy_math::Vec2>, + candidate: Val<::bevy_math::Vec2>| + { + let output: bool = { + { + let output: bool = ::bevy_math::CompassOctant::is_in_direction( + _self.into_inner(), + origin.into_inner(), + candidate.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Checks if a point is in the direction represented by this [`CompassOctant`] from an origin.\n This uses a cone-based check: the vector from origin to the candidate point\n must have a positive dot product with the direction vector.\n Uses standard mathematical coordinates where Y increases upward.\n # Arguments\n * `origin` - The starting position\n * `candidate` - The target position to check\n # Returns\n `true` if the candidate is generally in the direction of this octant from the origin.\n # Example\n ```\n use bevy_math::{CompassOctant, Vec2};\n let origin = Vec2::new(0.0, 0.0);\n let north_point = Vec2::new(0.0, 10.0); // Above origin (Y+ = up)\n let east_point = Vec2::new(10.0, 0.0); // Right of origin\n assert!(CompassOctant::North.is_in_direction(origin, north_point));\n assert!(!CompassOctant::North.is_in_direction(origin, east_point));\n ```", + &["_self", "origin", "candidate"], + ) .register_documented( "neg", |_self: Val<::bevy_math::CompassOctant>| { @@ -309,6 +332,29 @@ pub(crate) fn register_compass_quadrant_functions(world: &mut World) { "", &["_self", "other"], ) + .register_documented( + "is_in_direction", + | + _self: Val<::bevy_math::CompassQuadrant>, + origin: Val<::bevy_math::Vec2>, + candidate: Val<::bevy_math::Vec2>| + { + let output: bool = { + { + let output: bool = ::bevy_math::CompassQuadrant::is_in_direction( + _self.into_inner(), + origin.into_inner(), + candidate.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Checks if a point is in the direction represented by this [`CompassQuadrant`] from an origin.\n This uses a cone-based check: the vector from origin to the candidate point\n must have a positive dot product with the direction vector.\n Uses standard mathematical coordinates where Y increases upward.\n # Arguments\n * `origin` - The starting position\n * `candidate` - The target position to check\n # Returns\n `true` if the candidate is generally in the direction of this quadrant from the origin.\n # Example\n ```\n use bevy_math::{CompassQuadrant, Vec2};\n let origin = Vec2::new(0.0, 0.0);\n let north_point = Vec2::new(0.0, 10.0); // Above origin (Y+ = up)\n let east_point = Vec2::new(10.0, 0.0); // Right of origin\n assert!(CompassQuadrant::North.is_in_direction(origin, north_point));\n assert!(!CompassQuadrant::North.is_in_direction(origin, east_point));\n ```", + &["_self", "origin", "candidate"], + ) .register_documented( "neg", |_self: Val<::bevy_math::CompassQuadrant>| { @@ -792,201 +838,16 @@ pub(crate) fn register_isometry_3_d_functions(world: &mut World) { >(); } pub(crate) fn register_ray_2_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::bevy_math::Ray2d>::new( - world, - ) - .register_documented( - "clone", - |_self: Ref<::bevy_math::Ray2d>| { - let output: Val<::bevy_math::Ray2d> = { - { - let output: Val<::bevy_math::Ray2d> = - <::bevy_math::Ray2d as ::core::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::Ray2d>, other: Ref<::bevy_math::Ray2d>| { - let output: bool = { - { - let output: bool = <::bevy_math::Ray2d as ::core::cmp::PartialEq< - ::bevy_math::Ray2d, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "get_point", - |_self: Ref<::bevy_math::Ray2d>, distance: f32| { - let output: Val<::bevy_math::Vec2> = { - { - let output: Val<::bevy_math::Vec2> = - ::bevy_math::Ray2d::get_point(&_self, distance).into(); - output - } - }; - output - }, - " Get a point at a given distance along the ray", - &["_self", "distance"], - ) - .register_documented( - "intersect_plane", - |_self: Ref<::bevy_math::Ray2d>, - plane_origin: Val<::bevy_math::Vec2>, - plane: Val<::bevy_math::primitives::Plane2d>| { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = ::bevy_math::Ray2d::intersect_plane( - &_self, - plane_origin.into_inner(), - plane.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the distance to a plane if the ray intersects it", - &["_self", "plane_origin", "plane"], - ) - .register_documented( - "new", - |origin: Val<::bevy_math::Vec2>, direction: Val<::bevy_math::Dir2>| { - let output: Val<::bevy_math::Ray2d> = { - { - let output: Val<::bevy_math::Ray2d> = - ::bevy_math::Ray2d::new(origin.into_inner(), direction.into_inner()).into(); - output - } - }; - output - }, - " Create a new `Ray2d` from a given origin and direction", - &["origin", "direction"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::<::bevy_math::Ray2d, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} -pub(crate) fn register_ray_3_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::bevy_math::Ray3d>::new( - world, - ) - .register_documented( - "clone", - |_self: Ref<::bevy_math::Ray3d>| { - let output: Val<::bevy_math::Ray3d> = { - { - let output: Val<::bevy_math::Ray3d> = - <::bevy_math::Ray3d as ::core::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::Ray3d>, other: Ref<::bevy_math::Ray3d>| { - let output: bool = { - { - let output: bool = <::bevy_math::Ray3d as ::core::cmp::PartialEq< - ::bevy_math::Ray3d, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "get_point", - |_self: Ref<::bevy_math::Ray3d>, distance: f32| { - let output: Val<::bevy_math::Vec3> = { - { - let output: Val<::bevy_math::Vec3> = - ::bevy_math::Ray3d::get_point(&_self, distance).into(); - output - } - }; - output - }, - " Get a point at a given distance along the ray", - &["_self", "distance"], - ) - .register_documented( - "intersect_plane", - |_self: Ref<::bevy_math::Ray3d>, - plane_origin: Val<::bevy_math::Vec3>, - plane: Val<::bevy_math::primitives::InfinitePlane3d>| { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = ::bevy_math::Ray3d::intersect_plane( - &_self, - plane_origin.into_inner(), - plane.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the distance to a plane if the ray intersects it", - &["_self", "plane_origin", "plane"], - ) - .register_documented( - "new", - |origin: Val<::bevy_math::Vec3>, direction: Val<::bevy_math::Dir3>| { - let output: Val<::bevy_math::Ray3d> = { - { - let output: Val<::bevy_math::Ray3d> = - ::bevy_math::Ray3d::new(origin.into_inner(), direction.into_inner()).into(); - output - } - }; - output - }, - " Create a new `Ray3d` from a given origin and direction", - &["origin", "direction"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::<::bevy_math::Ray3d, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} -pub(crate) fn register_rot_2_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::Rot2, + ::bevy_math::Ray2d, >::new(world) .register_documented( - "angle_to", - |_self: Val<::bevy_math::Rot2>, other: Val<::bevy_math::Rot2>| { - let output: f32 = { + "clone", + |_self: Ref<::bevy_math::Ray2d>| { + let output: Val<::bevy_math::Ray2d> = { { - let output: f32 = ::bevy_math::Rot2::angle_to( - _self.into_inner(), - other.into_inner(), + let output: Val<::bevy_math::Ray2d> = <::bevy_math::Ray2d as ::core::clone::Clone>::clone( + &_self, ) .into(); output @@ -994,33 +855,34 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Returns the angle in radians needed to make `self` and `other` coincide.", - &["_self", "other"], + "", + &["_self"], ) .register_documented( - "as_degrees", - |_self: Val<::bevy_math::Rot2>| { - let output: f32 = { + "eq", + |_self: Ref<::bevy_math::Ray2d>, other: Ref<::bevy_math::Ray2d>| { + let output: bool = { { - let output: f32 = ::bevy_math::Rot2::as_degrees( - _self.into_inner(), - ) + let output: bool = <::bevy_math::Ray2d as ::core::cmp::PartialEq< + ::bevy_math::Ray2d, + >>::eq(&_self, &other) .into(); output } }; output }, - " Returns a corresponding rotation angle in degrees in the `(-180, 180]` range.", - &["_self"], + "", + &["_self", "other"], ) .register_documented( - "as_radians", - |_self: Val<::bevy_math::Rot2>| { - let output: f32 = { + "get_point", + |_self: Ref<::bevy_math::Ray2d>, distance: f32| { + let output: Val<::bevy_math::Vec2> = { { - let output: f32 = ::bevy_math::Rot2::as_radians( - _self.into_inner(), + let output: Val<::bevy_math::Vec2> = ::bevy_math::Ray2d::get_point( + &_self, + distance, ) .into(); output @@ -1028,16 +890,22 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Returns a corresponding rotation angle in radians in the `(-pi, pi]` range.", - &["_self"], + " Returns the point at a given distance along the ray.", + &["_self", "distance"], ) .register_documented( - "as_turn_fraction", - |_self: Val<::bevy_math::Rot2>| { - let output: f32 = { + "intersect_plane", + | + _self: Ref<::bevy_math::Ray2d>, + plane_origin: Val<::bevy_math::Vec2>, + plane: Val<::bevy_math::primitives::Plane2d>| + { + let output: ::core::option::Option = { { - let output: f32 = ::bevy_math::Rot2::as_turn_fraction( - _self.into_inner(), + let output: ::core::option::Option = ::bevy_math::Ray2d::intersect_plane( + &_self, + plane_origin.into_inner(), + plane.into_inner(), ) .into(); output @@ -1045,16 +913,17 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Returns a corresponding rotation angle as a fraction of a full 360 degree turn in the `(-0.5, 0.5]` range.", - &["_self"], + " Returns the distance to a plane if the ray intersects it.\n Use [`Ray2d::plane_intersection_point`] to get the intersection point directly.", + &["_self", "plane_origin", "plane"], ) .register_documented( - "clone", - |_self: Ref<::bevy_math::Rot2>| { - let output: Val<::bevy_math::Rot2> = { + "new", + |origin: Val<::bevy_math::Vec2>, direction: Val<::bevy_math::Dir2>| { + let output: Val<::bevy_math::Ray2d> = { { - let output: Val<::bevy_math::Rot2> = <::bevy_math::Rot2 as ::core::clone::Clone>::clone( - &_self, + let output: Val<::bevy_math::Ray2d> = ::bevy_math::Ray2d::new( + origin.into_inner(), + direction.into_inner(), ) .into(); output @@ -1062,16 +931,25 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - "", - &["_self"], - ) + " Creates a new `Ray2d` from a given origin and direction", + &["origin", "direction"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_math::Ray2d, bevy_mod_scripting_bindings::MarkAsGenerated>(); +} +pub(crate) fn register_ray_3_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::Ray3d, + >::new(world) .register_documented( - "degrees", - |degrees: f32| { - let output: Val<::bevy_math::Rot2> = { + "clone", + |_self: Ref<::bevy_math::Ray3d>| { + let output: Val<::bevy_math::Ray3d> = { { - let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::degrees( - degrees, + let output: Val<::bevy_math::Ray3d> = <::bevy_math::Ray3d as ::core::clone::Clone>::clone( + &_self, ) .into(); output @@ -1079,16 +957,16 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Creates a [`Rot2`] from a counterclockwise angle in degrees.\n A negative argument corresponds to a clockwise rotation.\n # Note\n Angles larger than or equal to 360° (in either direction) loop around to smaller rotations, since a full rotation returns an object to its starting orientation.\n # Example\n ```\n # use bevy_math::Rot2;\n # use approx::{assert_relative_eq, assert_abs_diff_eq};\n let rot1 = Rot2::degrees(270.0);\n let rot2 = Rot2::degrees(-90.0);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1, rot2);\n let rot3 = Rot2::degrees(180.0);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1 * rot1, rot3);\n // A rotation by 365° and 5° are the same\n #[cfg(feature = \"approx\")]\n assert_abs_diff_eq!(Rot2::degrees(365.0), Rot2::degrees(5.0), epsilon = 2e-7);\n ```", - &["degrees"], + "", + &["_self"], ) .register_documented( "eq", - |_self: Ref<::bevy_math::Rot2>, other: Ref<::bevy_math::Rot2>| { + |_self: Ref<::bevy_math::Ray3d>, other: Ref<::bevy_math::Ray3d>| { let output: bool = { { - let output: bool = <::bevy_math::Rot2 as ::core::cmp::PartialEq< - ::bevy_math::Rot2, + let output: bool = <::bevy_math::Ray3d as ::core::cmp::PartialEq< + ::bevy_math::Ray3d, >>::eq(&_self, &other) .into(); output @@ -1100,12 +978,13 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { &["_self", "other"], ) .register_documented( - "fast_renormalize", - |_self: Val<::bevy_math::Rot2>| { - let output: Val<::bevy_math::Rot2> = { + "get_point", + |_self: Ref<::bevy_math::Ray3d>, distance: f32| { + let output: Val<::bevy_math::Vec3> = { { - let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::fast_renormalize( - _self.into_inner(), + let output: Val<::bevy_math::Vec3> = ::bevy_math::Ray3d::get_point( + &_self, + distance, ) .into(); output @@ -1113,17 +992,22 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Returns `self` after an approximate normalization, assuming the value is already nearly normalized.\n Useful for preventing numerical error accumulation.\n See [`Dir3::fast_renormalize`](crate::Dir3::fast_renormalize) for an example of when such error accumulation might occur.", - &["_self"], + " Returns the point at a given distance along the ray", + &["_self", "distance"], ) .register_documented( - "from_sin_cos", - |sin: f32, cos: f32| { - let output: Val<::bevy_math::Rot2> = { + "intersect_plane", + | + _self: Ref<::bevy_math::Ray3d>, + plane_origin: Val<::bevy_math::Vec3>, + plane: Val<::bevy_math::primitives::InfinitePlane3d>| + { + let output: ::core::option::Option = { { - let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::from_sin_cos( - sin, - cos, + let output: ::core::option::Option = ::bevy_math::Ray3d::intersect_plane( + &_self, + plane_origin.into_inner(), + plane.into_inner(), ) .into(); output @@ -1131,11 +1015,193 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Creates a [`Rot2`] from the sine and cosine of an angle.\n The rotation is only valid if `sin * sin + cos * cos == 1.0`.\n # Panics\n Panics if `sin * sin + cos * cos != 1.0` when the `glam_assert` feature is enabled.", - &["sin", "cos"], + " Returns the distance to a plane if the ray intersects it\n Use [`Ray3d::plane_intersection_point`] to get the intersection point directly.", + &["_self", "plane_origin", "plane"], ) .register_documented( - "inverse", + "new", + |origin: Val<::bevy_math::Vec3>, direction: Val<::bevy_math::Dir3>| { + let output: Val<::bevy_math::Ray3d> = { + { + let output: Val<::bevy_math::Ray3d> = ::bevy_math::Ray3d::new( + origin.into_inner(), + direction.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a new `Ray3d` from a given origin and direction", + &["origin", "direction"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_math::Ray3d, bevy_mod_scripting_bindings::MarkAsGenerated>(); +} +pub(crate) fn register_rot_2_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::Rot2, + >::new(world) + .register_documented( + "angle_to", + |_self: Val<::bevy_math::Rot2>, other: Val<::bevy_math::Rot2>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::Rot2::angle_to( + _self.into_inner(), + other.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the angle in radians needed to make `self` and `other` coincide.", + &["_self", "other"], + ) + .register_documented( + "as_degrees", + |_self: Val<::bevy_math::Rot2>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::Rot2::as_degrees( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a corresponding rotation angle in degrees in the `(-180, 180]` range.", + &["_self"], + ) + .register_documented( + "as_radians", + |_self: Val<::bevy_math::Rot2>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::Rot2::as_radians( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a corresponding rotation angle in radians in the `(-pi, pi]` range.", + &["_self"], + ) + .register_documented( + "as_turn_fraction", + |_self: Val<::bevy_math::Rot2>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::Rot2::as_turn_fraction( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a corresponding rotation angle as a fraction of a full 360 degree turn in the `(-0.5, 0.5]` range.", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_math::Rot2>| { + let output: Val<::bevy_math::Rot2> = { + { + let output: Val<::bevy_math::Rot2> = <::bevy_math::Rot2 as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "degrees", + |degrees: f32| { + let output: Val<::bevy_math::Rot2> = { + { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::degrees( + degrees, + ) + .into(); + output + } + }; + output + }, + " Creates a [`Rot2`] from a counterclockwise angle in degrees.\n A negative argument corresponds to a clockwise rotation.\n # Note\n Angles larger than or equal to 360° (in either direction) loop around to smaller rotations, since a full rotation returns an object to its starting orientation.\n # Example\n ```\n # use bevy_math::Rot2;\n # use approx::{assert_relative_eq, assert_abs_diff_eq};\n let rot1 = Rot2::degrees(270.0);\n let rot2 = Rot2::degrees(-90.0);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1, rot2);\n let rot3 = Rot2::degrees(180.0);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1 * rot1, rot3);\n // A rotation by 365° and 5° are the same\n #[cfg(feature = \"approx\")]\n assert_abs_diff_eq!(Rot2::degrees(365.0), Rot2::degrees(5.0), epsilon = 2e-7);\n ```", + &["degrees"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_math::Rot2>, other: Ref<::bevy_math::Rot2>| { + let output: bool = { + { + let output: bool = <::bevy_math::Rot2 as ::core::cmp::PartialEq< + ::bevy_math::Rot2, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "fast_renormalize", + |_self: Val<::bevy_math::Rot2>| { + let output: Val<::bevy_math::Rot2> = { + { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::fast_renormalize( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns `self` after an approximate normalization, assuming the value is already nearly normalized.\n Useful for preventing numerical error accumulation.\n See [`Dir3::fast_renormalize`](crate::Dir3::fast_renormalize) for an example of when such error accumulation might occur.", + &["_self"], + ) + .register_documented( + "from_sin_cos", + |sin: f32, cos: f32| { + let output: Val<::bevy_math::Rot2> = { + { + let output: Val<::bevy_math::Rot2> = ::bevy_math::Rot2::from_sin_cos( + sin, + cos, + ) + .into(); + output + } + }; + output + }, + " Creates a [`Rot2`] from the sine and cosine of an angle.\n The rotation is only valid if `sin * sin + cos * cos == 1.0`.\n # Panics\n Panics if `sin * sin + cos * cos != 1.0` when the `glam_assert` feature is enabled.", + &["sin", "cos"], + ) + .register_documented( + "inverse", |_self: Val<::bevy_math::Rot2>| { let output: Val<::bevy_math::Rot2> = { { @@ -2384,6 +2450,20 @@ pub(crate) fn register_rect_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_math::Rect, >::new(world) + .register_documented( + "area", + |_self: Ref<::bevy_math::Rect>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::Rect::area(&_self).into(); + output + } + }; + output + }, + " Return the area of this rectangle.\n # Examples\n ```\n # use bevy_math::Rect;\n let r = Rect::new(0., 0., 10., 10.); // w=10 h=10\n assert_eq!(r.area(), 100.0);\n ```", + &["_self"], + ) .register_documented( "as_irect", |_self: Ref<::bevy_math::Rect>| { @@ -4423,12 +4503,12 @@ pub(crate) fn register_circular_segment_functions(world: &mut World) { ) .register_documented( "new", - |radius: f32, angle: f32| { + |radius: f32, half_angle: f32| { let output: Val<::bevy_math::primitives::CircularSegment> = { { let output: Val<::bevy_math::primitives::CircularSegment> = ::bevy_math::primitives::CircularSegment::new( radius, - angle, + half_angle, ) .into(); output @@ -4436,8 +4516,8 @@ pub(crate) fn register_circular_segment_functions(world: &mut World) { }; output }, - " Create a new [`CircularSegment`] from a `radius`, and an `angle`", - &["radius", "angle"], + " Create a new [`CircularSegment`] from a `radius`, and a `half_angle` in radians.", + &["radius", "half_angle"], ) .register_documented( "radius", @@ -6087,6 +6167,161 @@ pub(crate) fn register_polyline_2_d_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_cuboid_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::Cuboid, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_math::primitives::Cuboid>| { + let output: Val<::bevy_math::primitives::Cuboid> = { + { + let output: Val<::bevy_math::primitives::Cuboid> = <::bevy_math::primitives::Cuboid as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "closest_point", + |_self: Ref<::bevy_math::primitives::Cuboid>, point: Val<::bevy_math::Vec3>| { + let output: Val<::bevy_math::Vec3> = { + { + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Cuboid::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Finds the point on the cuboid that is closest to the given `point`.\n If the point is outside the cuboid, the returned point will be on the surface of the cuboid.\n Otherwise, it will be inside the cuboid and returned as is.", + &["_self", "point"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::primitives::Cuboid>, + other: Ref<::bevy_math::primitives::Cuboid>| + { + let output: bool = { + { + let output: bool = <::bevy_math::primitives::Cuboid as ::core::cmp::PartialEq< + ::bevy_math::primitives::Cuboid, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "from_corners", + |point1: Val<::bevy_math::Vec3>, point2: Val<::bevy_math::Vec3>| { + let output: Val<::bevy_math::primitives::Cuboid> = { + { + let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_corners( + point1.into_inner(), + point2.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Create a new `Cuboid` from two corner points", + &["point1", "point2"], + ) + .register_documented( + "from_length", + |length: f32| { + let output: Val<::bevy_math::primitives::Cuboid> = { + { + let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_length( + length, + ) + .into(); + output + } + }; + output + }, + " Create a `Cuboid` from a single length.\n The resulting `Cuboid` will be the same size in every direction.", + &["length"], + ) + .register_documented( + "from_size", + |size: Val<::bevy_math::Vec3>| { + let output: Val<::bevy_math::primitives::Cuboid> = { + { + let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_size( + size.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Create a new `Cuboid` from a given full size", + &["size"], + ) + .register_documented( + "new", + |x_length: f32, y_length: f32, z_length: f32| { + let output: Val<::bevy_math::primitives::Cuboid> = { + { + let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::new( + x_length, + y_length, + z_length, + ) + .into(); + output + } + }; + output + }, + " Create a new `Cuboid` from a full x, y, and z length", + &["x_length", "y_length", "z_length"], + ) + .register_documented( + "size", + |_self: Ref<::bevy_math::primitives::Cuboid>| { + let output: Val<::bevy_math::Vec3> = { + { + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Cuboid::size( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the size of the cuboid", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::primitives::Cuboid, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_aabb_3_d_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_math::bounding::Aabb3d, @@ -6227,115 +6462,14 @@ pub(crate) fn register_bounding_sphere_functions(world: &mut World) { } pub(crate) fn register_sphere_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Sphere, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::Sphere>| { - let output: Val<::bevy_math::primitives::Sphere> = { - { - let output: Val<::bevy_math::primitives::Sphere> = <::bevy_math::primitives::Sphere as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "closest_point", - |_self: Ref<::bevy_math::primitives::Sphere>, point: Val<::bevy_math::Vec3>| { - let output: Val<::bevy_math::Vec3> = { - { - let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Sphere::closest_point( - &_self, - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Finds the point on the sphere that is closest to the given `point`.\n If the point is outside the sphere, the returned point will be on the surface of the sphere.\n Otherwise, it will be inside the sphere and returned as is.", - &["_self", "point"], - ) - .register_documented( - "diameter", - |_self: Ref<::bevy_math::primitives::Sphere>| { - let output: f32 = { - { - let output: f32 = ::bevy_math::primitives::Sphere::diameter( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the diameter of the sphere", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_math::primitives::Sphere>, - other: Ref<::bevy_math::primitives::Sphere>| - { - let output: bool = { - { - let output: bool = <::bevy_math::primitives::Sphere as ::core::cmp::PartialEq< - ::bevy_math::primitives::Sphere, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - |radius: f32| { - let output: Val<::bevy_math::primitives::Sphere> = { - { - let output: Val<::bevy_math::primitives::Sphere> = ::bevy_math::primitives::Sphere::new( - radius, - ) - .into(); - output - } - }; - output - }, - " Create a new [`Sphere`] from a `radius`", - &["radius"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_math::primitives::Sphere, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_cuboid_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Cuboid, + ::bevy_math::primitives::Sphere, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_math::primitives::Cuboid>| { - let output: Val<::bevy_math::primitives::Cuboid> = { + |_self: Ref<::bevy_math::primitives::Sphere>| { + let output: Val<::bevy_math::primitives::Sphere> = { { - let output: Val<::bevy_math::primitives::Cuboid> = <::bevy_math::primitives::Cuboid as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::primitives::Sphere> = <::bevy_math::primitives::Sphere as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -6349,10 +6483,10 @@ pub(crate) fn register_cuboid_functions(world: &mut World) { ) .register_documented( "closest_point", - |_self: Ref<::bevy_math::primitives::Cuboid>, point: Val<::bevy_math::Vec3>| { + |_self: Ref<::bevy_math::primitives::Sphere>, point: Val<::bevy_math::Vec3>| { let output: Val<::bevy_math::Vec3> = { { - let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Cuboid::closest_point( + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Sphere::closest_point( &_self, point.into_inner(), ) @@ -6362,54 +6496,16 @@ pub(crate) fn register_cuboid_functions(world: &mut World) { }; output }, - " Finds the point on the cuboid that is closest to the given `point`.\n If the point is outside the cuboid, the returned point will be on the surface of the cuboid.\n Otherwise, it will be inside the cuboid and returned as is.", + " Finds the point on the sphere that is closest to the given `point`.\n If the point is outside the sphere, the returned point will be on the surface of the sphere.\n Otherwise, it will be inside the sphere and returned as is.", &["_self", "point"], ) .register_documented( - "eq", - | - _self: Ref<::bevy_math::primitives::Cuboid>, - other: Ref<::bevy_math::primitives::Cuboid>| - { - let output: bool = { - { - let output: bool = <::bevy_math::primitives::Cuboid as ::core::cmp::PartialEq< - ::bevy_math::primitives::Cuboid, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_corners", - |point1: Val<::bevy_math::Vec3>, point2: Val<::bevy_math::Vec3>| { - let output: Val<::bevy_math::primitives::Cuboid> = { - { - let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_corners( - point1.into_inner(), - point2.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new `Cuboid` from two corner points", - &["point1", "point2"], - ) - .register_documented( - "from_length", - |length: f32| { - let output: Val<::bevy_math::primitives::Cuboid> = { + "diameter", + |_self: Ref<::bevy_math::primitives::Sphere>| { + let output: f32 = { { - let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_length( - length, + let output: f32 = ::bevy_math::primitives::Sphere::diameter( + &_self, ) .into(); output @@ -6417,52 +6513,36 @@ pub(crate) fn register_cuboid_functions(world: &mut World) { }; output }, - " Create a `Cuboid` from a single length.\n The resulting `Cuboid` will be the same size in every direction.", - &["length"], + " Get the diameter of the sphere", + &["_self"], ) .register_documented( - "from_size", - |size: Val<::bevy_math::Vec3>| { - let output: Val<::bevy_math::primitives::Cuboid> = { + "eq", + | + _self: Ref<::bevy_math::primitives::Sphere>, + other: Ref<::bevy_math::primitives::Sphere>| + { + let output: bool = { { - let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_size( - size.into_inner(), - ) + let output: bool = <::bevy_math::primitives::Sphere as ::core::cmp::PartialEq< + ::bevy_math::primitives::Sphere, + >>::eq(&_self, &other) .into(); output } }; output }, - " Create a new `Cuboid` from a given full size", - &["size"], + "", + &["_self", "other"], ) .register_documented( "new", - |x_length: f32, y_length: f32, z_length: f32| { - let output: Val<::bevy_math::primitives::Cuboid> = { - { - let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::new( - x_length, - y_length, - z_length, - ) - .into(); - output - } - }; - output - }, - " Create a new `Cuboid` from a full x, y, and z length", - &["x_length", "y_length", "z_length"], - ) - .register_documented( - "size", - |_self: Ref<::bevy_math::primitives::Cuboid>| { - let output: Val<::bevy_math::Vec3> = { + |radius: f32| { + let output: Val<::bevy_math::primitives::Sphere> = { { - let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Cuboid::size( - &_self, + let output: Val<::bevy_math::primitives::Sphere> = ::bevy_math::primitives::Sphere::new( + radius, ) .into(); output @@ -6470,14 +6550,14 @@ pub(crate) fn register_cuboid_functions(world: &mut World) { }; output }, - " Get the size of the cuboid", - &["_self"], + " Create a new [`Sphere`] from a `radius`", + &["radius"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::primitives::Cuboid, + ::bevy_math::primitives::Sphere, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -6803,43 +6883,145 @@ pub(crate) fn register_conical_frustum_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_math::primitives::ConicalFrustum, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::ConicalFrustum>| { - let output: Val<::bevy_math::primitives::ConicalFrustum> = { - { - let output: Val<::bevy_math::primitives::ConicalFrustum> = - <::bevy_math::primitives::ConicalFrustum as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::primitives::ConicalFrustum>, - other: Ref<::bevy_math::primitives::ConicalFrustum>| { - let output: bool = { - { - let output: bool = - <::bevy_math::primitives::ConicalFrustum as ::core::cmp::PartialEq< + .register_documented( + "bottom_base", + |_self: Ref<::bevy_math::primitives::ConicalFrustum>| { + let output: Val<::bevy_math::primitives::Circle> = { + { + let output: Val<::bevy_math::primitives::Circle> = ::bevy_math::primitives::ConicalFrustum::bottom_base( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the bottom base of the conical frustum as a [`Circle`]", + &["_self"], + ) + .register_documented( + "bottom_base_area", + |_self: Ref<::bevy_math::primitives::ConicalFrustum>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::primitives::ConicalFrustum::bottom_base_area( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the surface area of the bottom base of the conical frustum", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_math::primitives::ConicalFrustum>| { + let output: Val<::bevy_math::primitives::ConicalFrustum> = { + { + let output: Val<::bevy_math::primitives::ConicalFrustum> = <::bevy_math::primitives::ConicalFrustum as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::primitives::ConicalFrustum>, + other: Ref<::bevy_math::primitives::ConicalFrustum>| + { + let output: bool = { + { + let output: bool = <::bevy_math::primitives::ConicalFrustum as ::core::cmp::PartialEq< ::bevy_math::primitives::ConicalFrustum, >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "lateral_area", + |_self: Ref<::bevy_math::primitives::ConicalFrustum>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::primitives::ConicalFrustum::lateral_area( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the surface area of the side of the conical frustum,\n also known as the lateral area", + &["_self"], + ) + .register_documented( + "slant_height", + |_self: Ref<::bevy_math::primitives::ConicalFrustum>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::primitives::ConicalFrustum::slant_height( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the slant height of the conical frustum, the length of the line segment\n connecting a point on the base to the closest point on the top", + &["_self"], + ) + .register_documented( + "top_base", + |_self: Ref<::bevy_math::primitives::ConicalFrustum>| { + let output: Val<::bevy_math::primitives::Circle> = { + { + let output: Val<::bevy_math::primitives::Circle> = ::bevy_math::primitives::ConicalFrustum::top_base( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the top base of the conical frustum as a [`Circle`]", + &["_self"], + ) + .register_documented( + "top_base_area", + |_self: Ref<::bevy_math::primitives::ConicalFrustum>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::primitives::ConicalFrustum::top_base_area( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the surface area of the top base of the conical frustum", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -9108,10 +9290,10 @@ impl Plugin for BevyMathScriptingPlugin { register_convex_polygon_functions(&mut world); register_polygon_functions(&mut world); register_polyline_2_d_functions(&mut world); + register_cuboid_functions(&mut world); register_aabb_3_d_functions(&mut world); register_bounding_sphere_functions(&mut world); register_sphere_functions(&mut world); - register_cuboid_functions(&mut world); register_cylinder_functions(&mut world); register_capsule_3_d_functions(&mut world); register_cone_functions(&mut world); diff --git a/crates/bindings/bevy_mesh_bms_bindings/Cargo.toml b/crates/bindings/bevy_mesh_bms_bindings/Cargo.toml index 22e81be139..12fcb0d1f3 100644 --- a/crates/bindings/bevy_mesh_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_mesh_bms_bindings/Cargo.toml @@ -17,26 +17,26 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_mesh = { version = "0.17.3", features = [], default-features = true} +bevy_mesh = { version = "0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} bevy_mikktspace = { version = "^0.17.0-dev", features = [], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} bitflags = { version = "^2.3", features = [], default-features = true} diff --git a/crates/bindings/bevy_mesh_bms_bindings/src/lib.rs b/crates/bindings/bevy_mesh_bms_bindings/src/lib.rs index 5342e47860..38cfdf1efc 100644 --- a/crates/bindings/bevy_mesh_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_mesh_bms_bindings/src/lib.rs @@ -75,7 +75,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Calculates the [`Mesh::ATTRIBUTE_NORMAL`] of an indexed mesh, smoothing normals for shared\n vertices.\n This method weights normals by the area of each triangle containing the vertex. Thus,\n larger triangles will skew the normals of their vertices towards their own normal more\n than smaller triangles will.\n This method is actually somewhat faster than [`Mesh::compute_smooth_normals`] because an\n intermediate result of triangle normal calculation is already scaled by the triangle's area.\n If you would rather have the computed normals be influenced only by the angles of connected\n edges, see [`Mesh::compute_smooth_normals`] instead. If you need to weight them in some\n other way, see [`Mesh::compute_custom_smooth_normals`].\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics if the mesh does not have indices defined.", + " Calculates the [`Mesh::ATTRIBUTE_NORMAL`] of an indexed mesh, smoothing normals for shared\n vertices.\n This method weights normals by the area of each triangle containing the vertex. Thus,\n larger triangles will skew the normals of their vertices towards their own normal more\n than smaller triangles will.\n This method is actually somewhat faster than [`Mesh::compute_smooth_normals`] because an\n intermediate result of triangle normal calculation is already scaled by the triangle's area.\n If you would rather have the computed normals be influenced only by the angles of connected\n edges, see [`Mesh::compute_smooth_normals`] instead. If you need to weight them in some\n other way, see [`Mesh::compute_custom_smooth_normals`].\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics if the mesh does not have indices defined.\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_compute_area_weighted_normals`]", &["_self"], ) .register_documented( @@ -92,7 +92,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Calculates the [`Mesh::ATTRIBUTE_NORMAL`] of a mesh.\n # Panics\n Panics if [`Indices`] are set or [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Consider calling [`Mesh::duplicate_vertices`] or exporting your mesh with normal\n attributes.\n FIXME: This should handle more cases since this is called as a part of gltf\n mesh loading where we can't really blame users for loading meshes that might\n not conform to the limitations here!", + " Calculates the [`Mesh::ATTRIBUTE_NORMAL`] of a mesh.\n # Panics\n Panics if [`Indices`] are set or [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Consider calling [`Mesh::duplicate_vertices`] or exporting your mesh with normal\n attributes.\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_compute_flat_normals`]\n FIXME: This should handle more cases since this is called as a part of gltf\n mesh loading where we can't really blame users for loading meshes that might\n not conform to the limitations here!", &["_self"], ) .register_documented( @@ -107,7 +107,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Calculates the [`Mesh::ATTRIBUTE_NORMAL`] of a mesh.\n If the mesh is indexed, this defaults to smooth normals. Otherwise, it defaults to flat\n normals.\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].=", + " Calculates the [`Mesh::ATTRIBUTE_NORMAL`] of a mesh.\n If the mesh is indexed, this defaults to smooth normals. Otherwise, it defaults to flat\n normals.\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].=\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_compute_normals`]", &["_self"], ) .register_documented( @@ -124,7 +124,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Calculates the [`Mesh::ATTRIBUTE_NORMAL`] of an indexed mesh, smoothing normals for shared\n vertices.\n This method weights normals by the angles of the corners of connected triangles, thus\n eliminating triangle area and count as factors in the final normal. This does make it\n somewhat slower than [`Mesh::compute_area_weighted_normals`] which does not need to\n greedily normalize each triangle's normal or calculate corner angles.\n If you would rather have the computed normals be weighted by triangle area, see\n [`Mesh::compute_area_weighted_normals`] instead. If you need to weight them in some other\n way, see [`Mesh::compute_custom_smooth_normals`].\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics if the mesh does not have indices defined.", + " Calculates the [`Mesh::ATTRIBUTE_NORMAL`] of an indexed mesh, smoothing normals for shared\n vertices.\n This method weights normals by the angles of the corners of connected triangles, thus\n eliminating triangle area and count as factors in the final normal. This does make it\n somewhat slower than [`Mesh::compute_area_weighted_normals`] which does not need to\n greedily normalize each triangle's normal or calculate corner angles.\n If you would rather have the computed normals be weighted by triangle area, see\n [`Mesh::compute_area_weighted_normals`] instead. If you need to weight them in some other\n way, see [`Mesh::compute_custom_smooth_normals`].\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics if the mesh does not have indices defined.\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_compute_smooth_normals`]", &["_self"], ) .register_documented( @@ -139,7 +139,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Counts all vertices of the mesh.\n If the attributes have different vertex counts, the smallest is returned.", + " Counts all vertices of the mesh.\n If the attributes have different vertex counts, the smallest is returned.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`.", &["_self"], ) .register_documented( @@ -156,7 +156,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Computes and returns the vertex data of the mesh as bytes.\n Therefore the attributes are located in the order of their [`MeshVertexAttribute::id`].\n This is used to transform the vertex data into a GPU friendly format.\n If the vertex attributes have different lengths, they are all truncated to\n the length of the smallest.\n This is a convenience method which allocates a Vec.\n Prefer pre-allocating and using [`Mesh::write_packed_vertex_buffer_data`] when possible.", + " Computes and returns the vertex data of the mesh as bytes.\n Therefore the attributes are located in the order of their [`MeshVertexAttribute::id`].\n This is used to transform the vertex data into a GPU friendly format.\n If the vertex attributes have different lengths, they are all truncated to\n the length of the smallest.\n This is a convenience method which allocates a Vec.\n Prefer pre-allocating and using [`Mesh::write_packed_vertex_buffer_data`] when possible.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`.", &["_self"], ) .register_documented( @@ -173,7 +173,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Duplicates the vertex attributes so that no vertices are shared.\n This can dramatically increase the vertex count, so make sure this is what you want.\n Does nothing if no [Indices] are set.", + " Duplicates the vertex attributes so that no vertices are shared.\n This can dramatically increase the vertex count, so make sure this is what you want.\n Does nothing if no [Indices] are set.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_duplicate_vertices`]", &["_self"], ) .register_documented( @@ -207,7 +207,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Returns the size required for the vertex buffer in bytes.", + " Returns the size required for the vertex buffer in bytes.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`.", &["_self"], ) .register_documented( @@ -222,7 +222,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Returns the size of a vertex in bytes.", + " Returns the size of a vertex in bytes.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`.", &["_self"], ) .register_documented( @@ -237,7 +237,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Whether this mesh has morph targets.", + " Whether this mesh has morph targets.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_has_morph_targets`]", &["_self"], ) .register_documented( @@ -255,7 +255,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Sets the vertex indices of the mesh. They describe how triangles are constructed out of the\n vertex attributes and are therefore only useful for the [`PrimitiveTopology`] variants\n that use triangles.", + " Sets the vertex indices of the mesh. They describe how triangles are constructed out of the\n vertex attributes and are therefore only useful for the [`PrimitiveTopology`] variants\n that use triangles.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_insert_indices`]", &["_self", "indices"], ) .register_documented( @@ -272,7 +272,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Normalize joint weights so they sum to 1.", + " Normalize joint weights so they sum to 1.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_normalize_joint_weights`]", &["_self"], ) .register_documented( @@ -290,7 +290,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Rotates the vertex positions, normals, and tangents of the mesh in place by the given [`Quat`].\n `Aabb` of entities with modified mesh are not updated automatically.", + " Rotates the vertex positions, normals, and tangents of the mesh in place by the given [`Quat`].\n `Aabb` of entities with modified mesh are not updated automatically.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_rotate_by`]", &["_self", "rotation"], ) .register_documented( @@ -308,7 +308,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Rotates the vertex positions, normals, and tangents of the mesh by the given [`Quat`].\n `Aabb` of entities with modified mesh are not updated automatically.", + " Rotates the vertex positions, normals, and tangents of the mesh by the given [`Quat`].\n `Aabb` of entities with modified mesh are not updated automatically.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_rotated_by`]", &["_self", "rotation"], ) .register_documented( @@ -326,7 +326,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Scales the vertex positions, normals, and tangents of the mesh in place by the given [`Vec3`].\n `Aabb` of entities with modified mesh are not updated automatically.", + " Scales the vertex positions, normals, and tangents of the mesh in place by the given [`Vec3`].\n `Aabb` of entities with modified mesh are not updated automatically.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_scale_by`]", &["_self", "scale"], ) .register_documented( @@ -344,7 +344,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Scales the vertex positions, normals, and tangents of the mesh by the given [`Vec3`].\n `Aabb` of entities with modified mesh are not updated automatically.", + " Scales the vertex positions, normals, and tangents of the mesh by the given [`Vec3`].\n `Aabb` of entities with modified mesh are not updated automatically.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_scaled_by`]", &["_self", "scale"], ) .register_documented( @@ -365,7 +365,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Sets the names of each morph target. This should correspond to the order of the morph targets in `set_morph_targets`.", + " Sets the names of each morph target. This should correspond to the order of the morph targets in `set_morph_targets`.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_set_morph_target_names`]", &["_self", "names"], ) .register_documented( @@ -386,7 +386,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Transforms the vertex positions, normals, and tangents of the mesh in place by the given [`Transform`].\n `Aabb` of entities with modified mesh are not updated automatically.", + " Transforms the vertex positions, normals, and tangents of the mesh in place by the given [`Transform`].\n `Aabb` of entities with modified mesh are not updated automatically.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_transform_by`]", &["_self", "transform"], ) .register_documented( @@ -407,7 +407,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Transforms the vertex positions, normals, and tangents of the mesh by the given [`Transform`].\n `Aabb` of entities with modified mesh are not updated automatically.", + " Transforms the vertex positions, normals, and tangents of the mesh by the given [`Transform`].\n `Aabb` of entities with modified mesh are not updated automatically.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_transformed_by`]", &["_self", "transform"], ) .register_documented( @@ -425,7 +425,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Translates the vertex positions of the mesh in place by the given [`Vec3`].\n `Aabb` of entities with modified mesh are not updated automatically.", + " Translates the vertex positions of the mesh in place by the given [`Vec3`].\n `Aabb` of entities with modified mesh are not updated automatically.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_translate_by`]", &["_self", "translation"], ) .register_documented( @@ -443,7 +443,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Translates the vertex positions of the mesh by the given [`Vec3`].\n `Aabb` of entities with modified mesh are not updated automatically.", + " Translates the vertex positions of the mesh by the given [`Vec3`].\n `Aabb` of entities with modified mesh are not updated automatically.\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_translated_by`]", &["_self", "translation"], ) .register_documented( @@ -460,7 +460,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Consumes the mesh and returns a mesh with calculated [`Mesh::ATTRIBUTE_NORMAL`].\n (Alternatively, you can use [`Mesh::compute_area_weighted_normals`] to mutate an existing mesh in-place)\n This method weights normals by the area of each triangle containing the vertex. Thus,\n larger triangles will skew the normals of their vertices towards their own normal more\n than smaller triangles will. If you would rather have the computed normals be influenced\n only by the angles of connected edges, see [`Mesh::with_computed_smooth_normals`] instead.\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics if the mesh does not have indices defined.", + " Consumes the mesh and returns a mesh with calculated [`Mesh::ATTRIBUTE_NORMAL`].\n (Alternatively, you can use [`Mesh::compute_area_weighted_normals`] to mutate an existing mesh in-place)\n This method weights normals by the area of each triangle containing the vertex. Thus,\n larger triangles will skew the normals of their vertices towards their own normal more\n than smaller triangles will. If you would rather have the computed normals be influenced\n only by the angles of connected edges, see [`Mesh::with_computed_smooth_normals`] instead.\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics if the mesh does not have indices defined.\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_with_computed_area_weighted_normals`]", &["_self"], ) .register_documented( @@ -477,7 +477,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Consumes the mesh and returns a mesh with calculated [`Mesh::ATTRIBUTE_NORMAL`].\n (Alternatively, you can use [`Mesh::compute_flat_normals`] to mutate an existing mesh in-place)\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics if the mesh has indices defined", + " Consumes the mesh and returns a mesh with calculated [`Mesh::ATTRIBUTE_NORMAL`].\n (Alternatively, you can use [`Mesh::compute_flat_normals`] to mutate an existing mesh in-place)\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics if the mesh has indices defined\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_with_computed_flat_normals`]", &["_self"], ) .register_documented( @@ -494,7 +494,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Consumes the mesh and returns a mesh with calculated [`Mesh::ATTRIBUTE_NORMAL`].\n If the mesh is indexed, this defaults to smooth normals. Otherwise, it defaults to flat\n normals.\n (Alternatively, you can use [`Mesh::compute_normals`] to mutate an existing mesh in-place)\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].", + " Consumes the mesh and returns a mesh with calculated [`Mesh::ATTRIBUTE_NORMAL`].\n If the mesh is indexed, this defaults to smooth normals. Otherwise, it defaults to flat\n normals.\n (Alternatively, you can use [`Mesh::compute_normals`] to mutate an existing mesh in-place)\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_with_computed_normals`]", &["_self"], ) .register_documented( @@ -511,7 +511,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Consumes the mesh and returns a mesh with calculated [`Mesh::ATTRIBUTE_NORMAL`].\n (Alternatively, you can use [`Mesh::compute_smooth_normals`] to mutate an existing mesh in-place)\n This method weights normals by the angles of triangle corners connected to each vertex. If\n you would rather have the computed normals be weighted by triangle area, see\n [`Mesh::with_computed_area_weighted_normals`] instead.\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics if the mesh does not have indices defined.", + " Consumes the mesh and returns a mesh with calculated [`Mesh::ATTRIBUTE_NORMAL`].\n (Alternatively, you can use [`Mesh::compute_smooth_normals`] to mutate an existing mesh in-place)\n This method weights normals by the angles of triangle corners connected to each vertex. If\n you would rather have the computed normals be weighted by triangle area, see\n [`Mesh::with_computed_area_weighted_normals`] instead.\n # Panics\n Panics if [`Mesh::ATTRIBUTE_POSITION`] is not of type `float3`.\n Panics if the mesh has any other topology than [`PrimitiveTopology::TriangleList`].\n Panics if the mesh does not have indices defined.\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_with_computed_smooth_normals`]", &["_self"], ) .register_documented( @@ -528,7 +528,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Consumes the mesh and returns a mesh with no shared vertices.\n This can dramatically increase the vertex count, so make sure this is what you want.\n Does nothing if no [`Indices`] are set.\n (Alternatively, you can use [`Mesh::duplicate_vertices`] to mutate an existing mesh in-place)", + " Consumes the mesh and returns a mesh with no shared vertices.\n This can dramatically increase the vertex count, so make sure this is what you want.\n Does nothing if no [`Indices`] are set.\n (Alternatively, you can use [`Mesh::duplicate_vertices`] to mutate an existing mesh in-place)\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_with_duplicated_vertices`]", &["_self"], ) .register_documented( @@ -546,7 +546,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Consumes the mesh and returns a mesh with the given vertex indices. They describe how triangles\n are constructed out of the vertex attributes and are therefore only useful for the\n [`PrimitiveTopology`] variants that use triangles.\n (Alternatively, you can use [`Mesh::insert_indices`] to mutate an existing mesh in-place)", + " Consumes the mesh and returns a mesh with the given vertex indices. They describe how triangles\n are constructed out of the vertex attributes and are therefore only useful for the\n [`PrimitiveTopology`] variants that use triangles.\n (Alternatively, you can use [`Mesh::insert_indices`] to mutate an existing mesh in-place)\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_with_inserted_indices`]", &["_self", "indices"], ) .register_documented( @@ -567,7 +567,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Consumes the mesh and returns a mesh with morph target names.\n Names should correspond to the order of the morph targets in `set_morph_targets`.\n (Alternatively, you can use [`Mesh::set_morph_target_names`] to mutate an existing mesh in-place)", + " Consumes the mesh and returns a mesh with morph target names.\n Names should correspond to the order of the morph targets in `set_morph_targets`.\n (Alternatively, you can use [`Mesh::set_morph_target_names`] to mutate an existing mesh in-place)\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_set_morph_target_names`]", &["_self", "names"], ) .register_documented( @@ -584,7 +584,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { }; output }, - " Consumes the mesh and returns a mesh without the vertex `indices` of the mesh.\n (Alternatively, you can use [`Mesh::remove_indices`] to mutate an existing mesh in-place)", + " Consumes the mesh and returns a mesh without the vertex `indices` of the mesh.\n (Alternatively, you can use [`Mesh::remove_indices`] to mutate an existing mesh in-place)\n # Panics\n Panics when the mesh data has already been extracted to `RenderWorld`. To handle\n this as an error use [`Mesh::try_with_removed_indices`]", &["_self"], ); let registry = world.get_resource_or_init::(); diff --git a/crates/bindings/bevy_pbr_bms_bindings/Cargo.toml b/crates/bindings/bevy_pbr_bms_bindings/Cargo.toml index e9e76752e6..771b5aa1ab 100644 --- a/crates/bindings/bevy_pbr_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_pbr_bms_bindings/Cargo.toml @@ -17,42 +17,44 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_pbr = { version = "0.17.3", features = ["webgl"], default-features = true} +bevy_pbr = { version = "0.18.0", features = ["webgl"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_core_pipeline = { version = "^0.17.3", features = ["tonemapping_luts", "webgl"], default-features = true} +bevy_core_pipeline = { version = "^0.18.0", features = ["tonemapping_luts", "webgl"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_diagnostic = { version = "^0.17.3", features = ["std", "sysinfo", "sysinfo_plugin"], default-features = true} +bevy_diagnostic = { version = "^0.18.0", features = ["std", "sysinfo", "sysinfo_plugin"], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_light = { version = "^0.17.3", features = ["webgl"], default-features = true} +bevy_light = { version = "^0.18.0", features = ["webgl"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_log = { version = "^0.18.0", features = [], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_mesh = { version = "^0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_render = { version = "^0.17.3", features = ["multi_threaded", "webgl"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_shader = { version = "^0.17.3", features = [], default-features = true} +bevy_render = { version = "^0.18.0", features = ["morph", "multi_threaded", "webgl"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_shader = { version = "^0.18.0", features = [], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} + +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} bitflags = { version = "^2.3", features = [], default-features = true} diff --git a/crates/bindings/bevy_pbr_bms_bindings/src/lib.rs b/crates/bindings/bevy_pbr_bms_bindings/src/lib.rs index 1cb1d3afc0..240cf28978 100644 --- a/crates/bindings/bevy_pbr_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_pbr_bms_bindings/src/lib.rs @@ -830,51 +830,6 @@ pub(crate) fn register_mesh_3_d_wireframe_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_atmosphere_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::Atmosphere, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::Atmosphere>| { - let output: Val<::bevy_pbr::Atmosphere> = { - { - let output: Val<::bevy_pbr::Atmosphere> = <::bevy_pbr::Atmosphere as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "with_density_multiplier", - |_self: Val<::bevy_pbr::Atmosphere>, mult: f32| { - let output: Val<::bevy_pbr::Atmosphere> = { - { - let output: Val<::bevy_pbr::Atmosphere> = ::bevy_pbr::Atmosphere::with_density_multiplier( - _self.into_inner(), - mult, - ) - .into(); - output - } - }; - output - }, - "", - &["_self", "mult"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::<::bevy_pbr::Atmosphere, bevy_mod_scripting_bindings::MarkAsGenerated>( - ); -} pub(crate) fn register_gpu_atmosphere_settings_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::GpuAtmosphereSettings, @@ -1421,7 +1376,6 @@ impl Plugin for BevyPbrScriptingPlugin { register_wireframe_color_functions(&mut world); register_no_wireframe_functions(&mut world); register_mesh_3_d_wireframe_functions(&mut world); - register_atmosphere_functions(&mut world); register_gpu_atmosphere_settings_functions(&mut world); register_atmosphere_settings_functions(&mut world); register_atmosphere_mode_functions(&mut world); diff --git a/crates/bindings/bevy_picking_bms_bindings/Cargo.toml b/crates/bindings/bevy_picking_bms_bindings/Cargo.toml index 9d1a270987..4e2a8270dc 100644 --- a/crates/bindings/bevy_picking_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_picking_bms_bindings/Cargo.toml @@ -17,32 +17,32 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_picking = { version = "0.17.3", features = ["bevy_mesh_picking_backend"], default-features = true} +bevy_picking = { version = "0.18.0", features = ["mesh_picking"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_input = { version = "^0.17.3", features = ["bevy_reflect", "smol_str", "std"], default-features = true} +bevy_input = { version = "^0.18.0", features = ["bevy_reflect", "gamepad", "keyboard", "mouse", "smol_str", "std"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_mesh = { version = "^0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_time = { version = "^0.17.3", features = ["bevy_reflect", "std"], default-features = true} +bevy_time = { version = "^0.18.0", features = ["bevy_reflect", "std"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_window = { version = "^0.17.3", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} +bevy_window = { version = "^0.18.0", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} crossbeam-channel = { version = "^0.5", features = [], default-features = true} diff --git a/crates/bindings/bevy_post_process_bms_bindings/Cargo.toml b/crates/bindings/bevy_post_process_bms_bindings/Cargo.toml index b4438fe99a..dce22e0716 100644 --- a/crates/bindings/bevy_post_process_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_post_process_bms_bindings/Cargo.toml @@ -17,38 +17,38 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_post_process = { version = "0.17.3", features = [], default-features = true} +bevy_post_process = { version = "0.18.0", features = [], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_core_pipeline = { version = "^0.17.3", features = ["tonemapping_luts", "webgl"], default-features = true} +bevy_core_pipeline = { version = "^0.18.0", features = ["tonemapping_luts", "webgl"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_render = { version = "^0.17.3", features = ["multi_threaded", "webgl"], default-features = true} +bevy_render = { version = "^0.18.0", features = ["morph", "multi_threaded", "webgl"], default-features = true} -bevy_shader = { version = "^0.17.3", features = [], default-features = true} +bevy_shader = { version = "^0.18.0", features = [], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} -bevy_window = { version = "^0.17.3", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} +bevy_window = { version = "^0.18.0", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} bitflags = { version = "^2.3", features = [], default-features = true} diff --git a/crates/bindings/bevy_reflect_bms_bindings/Cargo.toml b/crates/bindings/bevy_reflect_bms_bindings/Cargo.toml index ff20d7926e..5e63eb5be0 100644 --- a/crates/bindings/bevy_reflect_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_reflect_bms_bindings/Cargo.toml @@ -17,22 +17,22 @@ bevy_app = { workspace = true, features = ["std"] } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_reflect = { version = "0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} assert_type_match = { version = "^0.1.1", features = [], default-features = true} -bevy_platform = { version = "^0.17.3", features = ["alloc", "serialize", "std"], default-features = true} +bevy_platform = { version = "^0.18.0", features = ["alloc", "serialize", "std"], default-features = true} -bevy_ptr = { version = "^0.17.3", features = [], default-features = true} +bevy_ptr = { version = "^0.18.0", features = [], default-features = true} -bevy_reflect_derive = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory"], default-features = true} +bevy_reflect_derive = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory"], default-features = true} downcast-rs = { version = "^2", features = ["std"], default-features = false} erased-serde = { version = "^0.4", features = ["std"], default-features = false} -glam = { version = "^0.30.1", features = ["std"], default-features = false} +glam = { version = "^0.30.7", features = ["std"], default-features = false} inventory = { version = "^0.3", features = [], default-features = true} @@ -44,4 +44,6 @@ uuid = { version = "^1.13.1", features = ["std"], default-features = false} variadics_please = { version = "^1.1", features = [], default-features = true} +wgpu-types = { version = "^27", features = ["std"], default-features = false} + diff --git a/crates/bindings/bevy_reflect_bms_bindings/src/lib.rs b/crates/bindings/bevy_reflect_bms_bindings/src/lib.rs index 14955f8b95..305d75472e 100644 --- a/crates/bindings/bevy_reflect_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_reflect_bms_bindings/src/lib.rs @@ -3160,6 +3160,23 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", &["_self"], ) + .register_documented( + "exp2", + |_self: Val<::glam::Vec3>| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3::exp2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing `2^self` for each element of `self`.", + &["_self"], + ) .register_documented( "extend", |_self: Val<::glam::Vec3>, w: f32| { @@ -3244,6 +3261,23 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { " Creates a new vector from an array.", &["a"], ) + .register_documented( + "from_homogeneous", + |v: Val<::glam::Vec4>| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3::from_homogeneous( + v.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Projects a homogeneous coordinate to 3D space by performing perspective divide.\n # Panics\n Will panic if `v.w` is `0` when `glam_assert` is enabled.", + &["v"], + ) .register_documented( "is_finite", |_self: Val<::glam::Vec3>| { @@ -3408,6 +3442,40 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", &["_self", "rhs", "s"], ) + .register_documented( + "ln", + |_self: Val<::glam::Vec3>| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3::ln( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the natural logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) + .register_documented( + "log2", + |_self: Val<::glam::Vec3>| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3::log2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the base 2 logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) .register_documented( "max", |_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>| { @@ -4159,6 +4227,23 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { " Converts `self` to `[x, y, z]`", &["_self"], ) + .register_documented( + "to_homogeneous", + |_self: Val<::glam::Vec3>| { + let output: Val<::glam::Vec4> = { + { + let output: Val<::glam::Vec4> = ::glam::Vec3::to_homogeneous( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a homogeneous coordinate from `self`, equivalent to `self.extend(1.0)`.", + &["_self"], + ) .register_documented( "to_vec3a", |_self: Val<::glam::Vec3>| { @@ -35692,6 +35777,23 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", &["_self"], ) + .register_documented( + "exp2", + |_self: Val<::glam::Vec2>| { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::Vec2> = ::glam::Vec2::exp2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing `2^self` for each element of `self`.", + &["_self"], + ) .register_documented( "extend", |_self: Val<::glam::Vec2>, z: f32| { @@ -35955,6 +36057,40 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", &["_self", "rhs", "s"], ) + .register_documented( + "ln", + |_self: Val<::glam::Vec2>| { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::Vec2> = ::glam::Vec2::ln( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the natural logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) + .register_documented( + "log2", + |_self: Val<::glam::Vec2>| { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::Vec2> = ::glam::Vec2::log2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the base 2 logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) .register_documented( "max", |_self: Val<::glam::Vec2>, rhs: Val<::glam::Vec2>| { @@ -37491,6 +37627,23 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", &["_self"], ) + .register_documented( + "exp2", + |_self: Val<::glam::Vec3A>| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::exp2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing `2^self` for each element of `self`.", + &["_self"], + ) .register_documented( "extend", |_self: Val<::glam::Vec3A>, w: f32| { @@ -37575,6 +37728,23 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { " Creates a new vector from an array.", &["a"], ) + .register_documented( + "from_homogeneous", + |v: Val<::glam::Vec4>| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::from_homogeneous( + v.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Projects a homogeneous coordinate to 3D space by performing perspective divide.\n # Panics\n Will panic if `v.w` is `0` when `glam_assert` is enabled.", + &["v"], + ) .register_documented( "from_vec4", |v: Val<::glam::Vec4>| { @@ -37756,6 +37926,40 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", &["_self", "rhs", "s"], ) + .register_documented( + "ln", + |_self: Val<::glam::Vec3A>| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::ln( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the natural logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) + .register_documented( + "log2", + |_self: Val<::glam::Vec3A>| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::log2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the base 2 logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) .register_documented( "max", |_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>| { @@ -38507,6 +38711,23 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { " Converts `self` to `[x, y, z]`", &["_self"], ) + .register_documented( + "to_homogeneous", + |_self: Val<::glam::Vec3A>| { + let output: Val<::glam::Vec4> = { + { + let output: Val<::glam::Vec4> = ::glam::Vec3A::to_homogeneous( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a homogeneous coordinate from `self`, equivalent to `self.extend(1.0)`.", + &["_self"], + ) .register_documented( "to_vec3", |_self: Val<::glam::Vec3A>| { @@ -39291,6 +39512,23 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", &["_self"], ) + .register_documented( + "exp2", + |_self: Val<::glam::Vec4>| { + let output: Val<::glam::Vec4> = { + { + let output: Val<::glam::Vec4> = ::glam::Vec4::exp2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing `2^self` for each element of `self`.", + &["_self"], + ) .register_documented( "floor", |_self: Val<::glam::Vec4>| { @@ -39521,6 +39759,40 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", &["_self", "rhs", "s"], ) + .register_documented( + "ln", + |_self: Val<::glam::Vec4>| { + let output: Val<::glam::Vec4> = { + { + let output: Val<::glam::Vec4> = ::glam::Vec4::ln( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the natural logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) + .register_documented( + "log2", + |_self: Val<::glam::Vec4>| { + let output: Val<::glam::Vec4> = { + { + let output: Val<::glam::Vec4> = ::glam::Vec4::log2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the base 2 logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) .register_documented( "max", |_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>| { @@ -39830,6 +40102,23 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { " Returns a vector containing each element of `self` raised to the power of `n`.", &["_self", "n"], ) + .register_documented( + "project", + |_self: Val<::glam::Vec4>| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec4::project( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Projects a homogeneous coordinate to 3D space by performing perspective divide.\n To project to [`Vec3A`] use [`Vec3A::from_homogeneous()`].\n # Panics\n Will panic if `self.w` is `0` when `glam_assert` is enabled.", + &["_self"], + ) .register_documented( "project_onto", |_self: Val<::glam::Vec4>, rhs: Val<::glam::Vec4>| { @@ -41514,6 +41803,23 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", &["_self"], ) + .register_documented( + "exp2", + |_self: Val<::glam::DVec2>| { + let output: Val<::glam::DVec2> = { + { + let output: Val<::glam::DVec2> = ::glam::DVec2::exp2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing `2^self` for each element of `self`.", + &["_self"], + ) .register_documented( "extend", |_self: Val<::glam::DVec2>, z: f64| { @@ -41777,6 +42083,40 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", &["_self", "rhs", "s"], ) + .register_documented( + "ln", + |_self: Val<::glam::DVec2>| { + let output: Val<::glam::DVec2> = { + { + let output: Val<::glam::DVec2> = ::glam::DVec2::ln( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the natural logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) + .register_documented( + "log2", + |_self: Val<::glam::DVec2>| { + let output: Val<::glam::DVec2> = { + { + let output: Val<::glam::DVec2> = ::glam::DVec2::log2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the base 2 logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) .register_documented( "max", |_self: Val<::glam::DVec2>, rhs: Val<::glam::DVec2>| { @@ -43328,6 +43668,23 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", &["_self"], ) + .register_documented( + "exp2", + |_self: Val<::glam::DVec3>| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec3::exp2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing `2^self` for each element of `self`.", + &["_self"], + ) .register_documented( "extend", |_self: Val<::glam::DVec3>, w: f64| { @@ -43412,6 +43769,23 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { " Creates a new vector from an array.", &["a"], ) + .register_documented( + "from_homogeneous", + |v: Val<::glam::DVec4>| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec3::from_homogeneous( + v.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Projects a homogeneous coordinate to 3D space by performing perspective divide.\n # Panics\n Will panic if `v.w` is `0` when `glam_assert` is enabled.", + &["v"], + ) .register_documented( "is_finite", |_self: Val<::glam::DVec3>| { @@ -43576,6 +43950,40 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", &["_self", "rhs", "s"], ) + .register_documented( + "ln", + |_self: Val<::glam::DVec3>| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec3::ln( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the natural logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) + .register_documented( + "log2", + |_self: Val<::glam::DVec3>| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec3::log2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the base 2 logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) .register_documented( "max", |_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>| { @@ -44327,6 +44735,23 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { " Converts `self` to `[x, y, z]`", &["_self"], ) + .register_documented( + "to_homogeneous", + |_self: Val<::glam::DVec3>| { + let output: Val<::glam::DVec4> = { + { + let output: Val<::glam::DVec4> = ::glam::DVec3::to_homogeneous( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a homogeneous coordinate from `self`, equivalent to `self.extend(1.0)`.", + &["_self"], + ) .register_documented( "trunc", |_self: Val<::glam::DVec3>| { @@ -45102,6 +45527,23 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { " Returns a vector containing `e^self` (the exponential function) for each element of\n `self`.", &["_self"], ) + .register_documented( + "exp2", + |_self: Val<::glam::DVec4>| { + let output: Val<::glam::DVec4> = { + { + let output: Val<::glam::DVec4> = ::glam::DVec4::exp2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing `2^self` for each element of `self`.", + &["_self"], + ) .register_documented( "floor", |_self: Val<::glam::DVec4>| { @@ -45332,6 +45774,40 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { " Performs a linear interpolation between `self` and `rhs` based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s` is `1.0`, the result\n will be equal to `rhs`. When `s` is outside of range `[0, 1]`, the result is linearly\n extrapolated.", &["_self", "rhs", "s"], ) + .register_documented( + "ln", + |_self: Val<::glam::DVec4>| { + let output: Val<::glam::DVec4> = { + { + let output: Val<::glam::DVec4> = ::glam::DVec4::ln( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the natural logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) + .register_documented( + "log2", + |_self: Val<::glam::DVec4>| { + let output: Val<::glam::DVec4> = { + { + let output: Val<::glam::DVec4> = ::glam::DVec4::log2( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns a vector containing the base 2 logarithm for each element of `self`.\n This returns NaN when the element is negative and negative infinity when the element is zero.", + &["_self"], + ) .register_documented( "max", |_self: Val<::glam::DVec4>, rhs: Val<::glam::DVec4>| { @@ -45641,6 +46117,23 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { " Returns a vector containing each element of `self` raised to the power of `n`.", &["_self", "n"], ) + .register_documented( + "project", + |_self: Val<::glam::DVec4>| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec4::project( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Projects a homogeneous coordinate to 3D space by performing perspective divide.\n # Panics\n Will panic if `self.w` is `0` when `glam_assert` is enabled.", + &["_self"], + ) .register_documented( "project_onto", |_self: Val<::glam::DVec4>, rhs: Val<::glam::DVec4>| { @@ -56557,7 +57050,7 @@ pub(crate) fn register_uuid_functions(world: &mut World) { }; output }, - " Creates a UUID using the supplied bytes in little endian order.\n The individual fields encoded in the buffer will be flipped.\n # Examples\n Basic usage:\n ```\n # fn main() -> Result<(), uuid::Error> {\n # use uuid::Uuid;\n let bytes = [\n 0xa1, 0xa2, 0xa3, 0xa4,\n 0xb1, 0xb2,\n 0xc1, 0xc2,\n 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n ];\n let uuid = Uuid::from_bytes_le(bytes);\n assert_eq!(\n \"a4a3a2a1-b2b1-c2c1-d1d2-d3d4d5d6d7d8\",\n uuid.hyphenated().to_string(),\n );\n # Ok(())\n # }\n ```", + " Creates a UUID using the supplied bytes in little endian order.\n Note that ordering is applied to each _field_, rather than to the bytes as a whole.\n This ordering is compatible with Microsoft's mixed endian GUID format.\n # Examples\n Basic usage:\n ```\n # fn main() -> Result<(), uuid::Error> {\n # use uuid::Uuid;\n let bytes = [\n 0xa1, 0xa2, 0xa3, 0xa4,\n 0xb1, 0xb2,\n 0xc1, 0xc2,\n 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8,\n ];\n let uuid = Uuid::from_bytes_le(bytes);\n assert_eq!(\n \"a4a3a2a1-b2b1-c2c1-d1d2-d3d4d5d6d7d8\",\n uuid.hyphenated().to_string(),\n );\n # Ok(())\n # }\n ```", &["b"], ) .register_documented( @@ -56737,7 +57230,7 @@ pub(crate) fn register_uuid_functions(world: &mut World) { }; output }, - " Returns the bytes of the UUID in little-endian order.\n The bytes will be flipped to convert into little-endian order. This is\n based on the endianness of the UUID, rather than the target environment\n so bytes will be flipped on both big and little endian machines.\n # Examples\n ```\n use uuid::Uuid;\n # fn main() -> Result<(), uuid::Error> {\n let uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n assert_eq!(\n uuid.to_bytes_le(),\n ([\n 0xa4, 0xa3, 0xa2, 0xa1, 0xb2, 0xb1, 0xc2, 0xc1, 0xd1, 0xd2,\n 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8\n ])\n );\n # Ok(())\n # }\n ```", + " Returns the bytes of the UUID in little-endian order.\n The bytes for each field will be flipped to convert into little-endian order.\n This is based on the endianness of the UUID, rather than the target environment\n so bytes will be flipped on both big and little endian machines.\n Note that ordering is applied to each _field_, rather than to the bytes as a whole.\n This ordering is compatible with Microsoft's mixed endian GUID format.\n # Examples\n ```\n use uuid::Uuid;\n # fn main() -> Result<(), uuid::Error> {\n let uuid = Uuid::parse_str(\"a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8\")?;\n assert_eq!(\n uuid.to_bytes_le(),\n ([\n 0xa4, 0xa3, 0xa2, 0xa1, 0xb2, 0xb1, 0xc2, 0xc1, 0xd1, 0xd2,\n 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8\n ])\n );\n # Ok(())\n # }\n ```", &["_self"], ) .register_documented( @@ -56849,6 +57342,454 @@ pub(crate) fn register_non_nil_uuid_functions(world: &mut World) { registry .register_type_data::<::uuid::NonNilUuid, bevy_mod_scripting_bindings::MarkAsGenerated>(); } +pub(crate) fn register_texture_format_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::wgpu_types::TextureFormat, + >::new(world) + .register_documented( + "add_srgb_suffix", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: Val<::wgpu_types::TextureFormat> = { + { + let output: Val<::wgpu_types::TextureFormat> = ::wgpu_types::TextureFormat::add_srgb_suffix( + &_self, + ) + .into(); + output + } + }; + output + }, + " Adds an `Srgb` suffix to the given texture format, if the format supports it.", + &["_self"], + ) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: () = { + { + let output: () = <::wgpu_types::TextureFormat as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "block_dimensions", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: (u32, u32) = { + { + let output: (u32, u32) = ::wgpu_types::TextureFormat::block_dimensions( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the dimension of a [block](https://gpuweb.github.io/gpuweb/#texel-block) of texels.\n Uncompressed formats have a block dimension of `(1, 1)`.", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: Val<::wgpu_types::TextureFormat> = { + { + let output: Val<::wgpu_types::TextureFormat> = <::wgpu_types::TextureFormat as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "components", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: u8 = { + { + let output: u8 = ::wgpu_types::TextureFormat::components(&_self) + .into(); + output + } + }; + output + }, + " Returns the number of components this format has.", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::wgpu_types::TextureFormat>, + other: Ref<::wgpu_types::TextureFormat>| + { + let output: bool = { + { + let output: bool = <::wgpu_types::TextureFormat as ::core::cmp::PartialEq< + ::wgpu_types::TextureFormat, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "has_color_aspect", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::has_color_aspect( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns `true` if the format has a color aspect", + &["_self"], + ) + .register_documented( + "has_depth_aspect", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::has_depth_aspect( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns `true` if the format has a depth aspect", + &["_self"], + ) + .register_documented( + "has_stencil_aspect", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::has_stencil_aspect( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns `true` if the format has a stencil aspect", + &["_self"], + ) + .register_documented( + "is_astc", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::is_astc(&_self) + .into(); + output + } + }; + output + }, + " Returns `true` for ASTC compressed formats.", + &["_self"], + ) + .register_documented( + "is_bcn", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::is_bcn(&_self) + .into(); + output + } + }; + output + }, + " Returns `true` for BCn compressed formats.", + &["_self"], + ) + .register_documented( + "is_combined_depth_stencil_format", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::is_combined_depth_stencil_format( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns `true` if the format is a combined depth-stencil format\n see ", + &["_self"], + ) + .register_documented( + "is_compressed", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::is_compressed( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns `true` for compressed formats.", + &["_self"], + ) + .register_documented( + "is_depth_stencil_component", + | + _self: Ref<::wgpu_types::TextureFormat>, + combined_format: Val<::wgpu_types::TextureFormat>| + { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::is_depth_stencil_component( + &_self, + combined_format.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns `true` if `self` is a depth or stencil component of the given\n combined depth-stencil format", + &["_self", "combined_format"], + ) + .register_documented( + "is_depth_stencil_format", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::is_depth_stencil_format( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns `true` if the format is a depth and/or stencil format\n see ", + &["_self"], + ) + .register_documented( + "is_multi_planar_format", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::is_multi_planar_format( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns `true` if the format is a multi-planar format", + &["_self"], + ) + .register_documented( + "is_srgb", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: bool = { + { + let output: bool = ::wgpu_types::TextureFormat::is_srgb(&_self) + .into(); + output + } + }; + output + }, + " Returns `true` for srgb formats.", + &["_self"], + ) + .register_documented( + "planes", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::wgpu_types::TextureFormat::planes( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the number of planes a multi-planar format has.", + &["_self"], + ) + .register_documented( + "remove_srgb_suffix", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: Val<::wgpu_types::TextureFormat> = { + { + let output: Val<::wgpu_types::TextureFormat> = ::wgpu_types::TextureFormat::remove_srgb_suffix( + &_self, + ) + .into(); + output + } + }; + output + }, + " Strips the `Srgb` suffix from the given texture format.", + &["_self"], + ) + .register_documented( + "size_multiple_requirement", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: (u32, u32) = { + { + let output: (u32, u32) = ::wgpu_types::TextureFormat::size_multiple_requirement( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the size multiple requirement for a texture using this format.", + &["_self"], + ) + .register_documented( + "target_component_alignment", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::wgpu_types::TextureFormat::target_component_alignment( + &_self, + ) + .into(); + output + } + }; + output + }, + " See ", + &["_self"], + ) + .register_documented( + "target_pixel_byte_cost", + |_self: Ref<::wgpu_types::TextureFormat>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::wgpu_types::TextureFormat::target_pixel_byte_cost( + &_self, + ) + .into(); + output + } + }; + output + }, + " The number of bytes occupied per pixel in a color attachment\n ", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::wgpu_types::TextureFormat, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_blend_state_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::wgpu_types::BlendState, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::wgpu_types::BlendState>| { + let output: () = { + { + let output: () = <::wgpu_types::BlendState as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::wgpu_types::BlendState>| { + let output: Val<::wgpu_types::BlendState> = { + { + let output: Val<::wgpu_types::BlendState> = <::wgpu_types::BlendState as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::wgpu_types::BlendState>, other: Ref<::wgpu_types::BlendState>| { + let output: bool = { + { + let output: bool = <::wgpu_types::BlendState as ::core::cmp::PartialEq< + ::wgpu_types::BlendState, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::wgpu_types::BlendState, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} impl Plugin for BevyReflectScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); @@ -56921,5 +57862,7 @@ impl Plugin for BevyReflectScriptingPlugin { register_smol_str_functions(&mut world); register_uuid_functions(&mut world); register_non_nil_uuid_functions(&mut world); + register_texture_format_functions(&mut world); + register_blend_state_functions(&mut world); } } diff --git a/crates/bindings/bevy_render_bms_bindings/Cargo.toml b/crates/bindings/bevy_render_bms_bindings/Cargo.toml index 12791380a7..29615c3aed 100644 --- a/crates/bindings/bevy_render_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_render_bms_bindings/Cargo.toml @@ -17,62 +17,62 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_render = { version = "0.17.3", features = ["multi_threaded", "webgl"], default-features = true} +bevy_render = { version = "0.18.0", features = ["morph", "multi_threaded", "webgl"], default-features = true} async-channel = { version = "^2.3.0", features = [], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_diagnostic = { version = "^0.17.3", features = ["std", "sysinfo", "sysinfo_plugin"], default-features = true} +bevy_diagnostic = { version = "^0.18.0", features = ["std", "sysinfo", "sysinfo_plugin"], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_encase_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_encase_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_mesh = { version = "^0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_render_macros = { version = "^0.17.3", features = [], default-features = true} +bevy_render_macros = { version = "^0.18.0", features = [], default-features = true} -bevy_shader = { version = "^0.17.3", features = [], default-features = true} +bevy_shader = { version = "^0.18.0", features = [], default-features = true} -bevy_tasks = { version = "^0.17.3", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} +bevy_tasks = { version = "^0.18.0", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} -bevy_time = { version = "^0.17.3", features = ["bevy_reflect", "std"], default-features = true} +bevy_time = { version = "^0.18.0", features = ["bevy_reflect", "std"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} -bevy_window = { version = "^0.17.3", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} +bevy_window = { version = "^0.18.0", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} bitflags = { version = "^2", features = [], default-features = true} bytemuck = { version = "^1.5", features = [], default-features = true} -encase = { version = "^0.11", features = [], default-features = true} +encase = { version = "^0.12", features = [], default-features = true} fixedbitset = { version = "^0.5", features = [], default-features = true} indexmap = { version = "^2", features = [], default-features = true} -js-sys = { version = "^0.3", features = [], default-features = true} +js-sys = { version = "^0.3.83", features = [], default-features = true} -naga = { version = "^26", features = [], default-features = true} +naga = { version = "^27", features = [], default-features = true} nonmax = { version = "^0.5", features = [], default-features = true} @@ -86,6 +86,6 @@ wasm-bindgen = { version = "^0.2", features = [], default-features = true} web-sys = { version = "^0.3.67", features = [], default-features = true} -wgpu = { version = "^26", features = ["webgl"], default-features = false} +wgpu = { version = "^27", features = ["webgl"], default-features = false} diff --git a/crates/bindings/bevy_scene_bms_bindings/Cargo.toml b/crates/bindings/bevy_scene_bms_bindings/Cargo.toml index 716fb4723c..1952bc5ae4 100644 --- a/crates/bindings/bevy_scene_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_scene_bms_bindings/Cargo.toml @@ -17,26 +17,26 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_scene = { version = "0.17.3", features = ["serialize"], default-features = true} +bevy_scene = { version = "0.18.0", features = ["serialize"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_platform = { version = "^0.17.3", features = ["alloc", "serialize", "std"], default-features = true} +bevy_platform = { version = "^0.18.0", features = ["alloc", "serialize", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} serde = { version = "^1.0", features = [], default-features = true} diff --git a/crates/bindings/bevy_sprite_bms_bindings/Cargo.toml b/crates/bindings/bevy_sprite_bms_bindings/Cargo.toml index d49d1855f6..e45282b52c 100644 --- a/crates/bindings/bevy_sprite_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_sprite_bms_bindings/Cargo.toml @@ -17,36 +17,36 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_sprite = { version = "0.17.3", features = ["bevy_picking", "bevy_sprite_picking_backend", "bevy_text", "bevy_window"], default-features = true} +bevy_sprite = { version = "0.18.0", features = ["bevy_picking", "bevy_text", "bevy_window"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_mesh = { version = "^0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_picking = { version = "^0.17.3", features = ["bevy_mesh_picking_backend"], default-features = true} +bevy_picking = { version = "^0.18.0", features = ["mesh_picking"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_text = { version = "^0.17.3", features = ["default_font"], default-features = true} +bevy_text = { version = "^0.18.0", features = ["default_font"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_window = { version = "^0.17.3", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} +bevy_window = { version = "^0.18.0", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} radsort = { version = "^0.1", features = [], default-features = true} diff --git a/crates/bindings/bevy_sprite_bms_bindings/src/lib.rs b/crates/bindings/bevy_sprite_bms_bindings/src/lib.rs index 779a59dbcf..b394326983 100644 --- a/crates/bindings/bevy_sprite_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_sprite_bms_bindings/src/lib.rs @@ -240,11 +240,11 @@ pub(crate) fn register_border_rect_functions(world: &mut World) { ) .register_documented( "all", - |extent: f32| { + |inset: f32| { let output: Val<::bevy_sprite::BorderRect> = { { let output: Val<::bevy_sprite::BorderRect> = ::bevy_sprite::BorderRect::all( - extent, + inset, ) .into(); output @@ -252,8 +252,8 @@ pub(crate) fn register_border_rect_functions(world: &mut World) { }; output }, - " Creates a border with the same `extent` along each edge", - &["extent"], + " Creates a border with the same `inset` along each edge", + &["inset"], ) .register_documented( "axes", @@ -270,7 +270,7 @@ pub(crate) fn register_border_rect_functions(world: &mut World) { }; output }, - " Creates a new border with the `left` and `right` extents equal to `horizontal`, and `top` and `bottom` extents equal to `vertical`.", + " Creates a new border with the `min.x` and `max.x` insets equal to `horizontal`, and the `min.y` and `max.y` insets equal to `vertical`.", &["horizontal", "vertical"], ) .register_documented( @@ -458,52 +458,50 @@ pub(crate) fn register_texture_slicer_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_scaling_mode_functions(world: &mut World) { +pub(crate) fn register_sprite_scaling_mode_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::ScalingMode, + ::bevy_sprite::SpriteScalingMode, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_sprite::ScalingMode>| { - let output: Val<::bevy_sprite::ScalingMode> = { - { - let output: Val<::bevy_sprite::ScalingMode> = <::bevy_sprite::ScalingMode as ::std::clone::Clone>::clone( - &_self, - ) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite::SpriteScalingMode>| { + let output: Val<::bevy_sprite::SpriteScalingMode> = { + { + let output: Val<::bevy_sprite::SpriteScalingMode> = + <::bevy_sprite::SpriteScalingMode as ::std::clone::Clone>::clone(&_self) .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_sprite::ScalingMode>, - other: Ref<::bevy_sprite::ScalingMode>| - { - let output: bool = { - { - let output: bool = <::bevy_sprite::ScalingMode as ::std::cmp::PartialEq< - ::bevy_sprite::ScalingMode, + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_sprite::SpriteScalingMode>, + other: Ref<::bevy_sprite::SpriteScalingMode>| { + let output: bool = { + { + let output: bool = + <::bevy_sprite::SpriteScalingMode as ::std::cmp::PartialEq< + ::bevy_sprite::SpriteScalingMode, >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_sprite::ScalingMode, + ::bevy_sprite::SpriteScalingMode, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -629,7 +627,7 @@ impl Plugin for BevySpriteScriptingPlugin { register_border_rect_functions(&mut world); register_slice_scale_mode_functions(&mut world); register_texture_slicer_functions(&mut world); - register_scaling_mode_functions(&mut world); + register_sprite_scaling_mode_functions(&mut world); register_anchor_functions(&mut world); register_text_2_d_shadow_functions(&mut world); } diff --git a/crates/bindings/bevy_sprite_render_bms_bindings/Cargo.toml b/crates/bindings/bevy_sprite_render_bms_bindings/Cargo.toml index 5a68f5c5a7..9db630ba73 100644 --- a/crates/bindings/bevy_sprite_render_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_sprite_render_bms_bindings/Cargo.toml @@ -17,42 +17,42 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_sprite_render = { version = "0.17.3", features = ["bevy_text", "webgl"], default-features = true} +bevy_sprite_render = { version = "0.18.0", features = ["bevy_text", "webgl"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_core_pipeline = { version = "^0.17.3", features = ["tonemapping_luts", "webgl"], default-features = true} +bevy_core_pipeline = { version = "^0.18.0", features = ["tonemapping_luts", "webgl"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_mesh = { version = "^0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_render = { version = "^0.17.3", features = ["multi_threaded", "webgl"], default-features = true} +bevy_render = { version = "^0.18.0", features = ["morph", "multi_threaded", "webgl"], default-features = true} -bevy_shader = { version = "^0.17.3", features = [], default-features = true} +bevy_shader = { version = "^0.18.0", features = [], default-features = true} -bevy_sprite = { version = "^0.17.3", features = ["bevy_picking", "bevy_sprite_picking_backend", "bevy_text", "bevy_window"], default-features = true} +bevy_sprite = { version = "^0.18.0", features = ["bevy_picking", "bevy_text", "bevy_window"], default-features = true} -bevy_text = { version = "^0.17.3", features = ["default_font"], default-features = true} +bevy_text = { version = "^0.18.0", features = ["default_font"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} bitflags = { version = "^2.3", features = [], default-features = true} diff --git a/crates/bindings/bevy_text_bms_bindings/Cargo.toml b/crates/bindings/bevy_text_bms_bindings/Cargo.toml index c85958111a..c282043828 100644 --- a/crates/bindings/bevy_text_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_text_bms_bindings/Cargo.toml @@ -17,30 +17,30 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_text = { version = "0.17.3", features = ["default_font"], default-features = true} +bevy_text = { version = "0.18.0", features = ["default_font"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_log = { version = "^0.17.3", features = [], default-features = true} +bevy_log = { version = "^0.18.0", features = [], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} -cosmic-text = { version = "^0.14", features = [], default-features = true} +cosmic-text = { version = "^0.16", features = [], default-features = true} serde = { version = "^1", features = [], default-features = true} diff --git a/crates/bindings/bevy_text_bms_bindings/src/lib.rs b/crates/bindings/bevy_text_bms_bindings/src/lib.rs index ead3ff1538..3927a6701d 100644 --- a/crates/bindings/bevy_text_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_text_bms_bindings/src/lib.rs @@ -12,6 +12,132 @@ use bevy_mod_scripting_bindings::{ }; use bevy_mod_scripting_derive::script_bindings; pub struct BevyTextScriptingPlugin; +pub(crate) fn register_font_hinting_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::FontHinting, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_text::FontHinting>| { + let output: Val<::bevy_text::FontHinting> = { + { + let output: Val<::bevy_text::FontHinting> = <::bevy_text::FontHinting as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_text::FontHinting>, other: Ref<::bevy_text::FontHinting>| { + let output: bool = { + { + let output: bool = <::bevy_text::FontHinting as ::std::cmp::PartialEq< + ::bevy_text::FontHinting, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_text::FontHinting, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_font_weight_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::FontWeight, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_text::FontWeight>| { + let output: () = { + { + let output: () = <::bevy_text::FontWeight as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clamp", + |_self: Val<::bevy_text::FontWeight>| { + let output: Val<::bevy_text::FontWeight> = { + { + let output: Val<::bevy_text::FontWeight> = ::bevy_text::FontWeight::clamp( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Clamp the weight value to between 1 and 1000.\n Values of 0 are mapped to `Weight::DEFAULT`.", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_text::FontWeight>| { + let output: Val<::bevy_text::FontWeight> = { + { + let output: Val<::bevy_text::FontWeight> = <::bevy_text::FontWeight as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_text::FontWeight>, other: Ref<::bevy_text::FontWeight>| { + let output: bool = { + { + let output: bool = <::bevy_text::FontWeight as ::std::cmp::PartialEq< + ::bevy_text::FontWeight, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_text::FontWeight, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_justify_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_text::Justify, @@ -133,6 +259,81 @@ pub(crate) fn register_line_break_functions(world: &mut World) { .register_type_data::<::bevy_text::LineBreak, bevy_mod_scripting_bindings::MarkAsGenerated>( ); } +pub(crate) fn register_strikethrough_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::Strikethrough, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_text::Strikethrough>| { + let output: Val<::bevy_text::Strikethrough> = { + { + let output: Val<::bevy_text::Strikethrough> = <::bevy_text::Strikethrough as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_text::Strikethrough, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_strikethrough_color_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::StrikethroughColor, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_text::StrikethroughColor>| { + let output: Val<::bevy_text::StrikethroughColor> = { + { + let output: Val<::bevy_text::StrikethroughColor> = + <::bevy_text::StrikethroughColor as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_text::StrikethroughColor>, + other: Ref<::bevy_text::StrikethroughColor>| { + let output: bool = { + { + let output: bool = <::bevy_text::StrikethroughColor as ::std::cmp::PartialEq< + ::bevy_text::StrikethroughColor, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_text::StrikethroughColor, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_text_color_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_text::TextColor, @@ -270,27 +471,6 @@ pub(crate) fn register_text_font_functions(world: &mut World) { }, " Returns this [`TextFont`] with the specified [`FontSmoothing`].", &["_self", "font_smoothing"], - ) - .register_documented( - "with_line_height", - | - _self: Val<::bevy_text::TextFont>, - line_height: Val<::bevy_text::LineHeight>| - { - let output: Val<::bevy_text::TextFont> = { - { - let output: Val<::bevy_text::TextFont> = ::bevy_text::TextFont::with_line_height( - _self.into_inner(), - line_height.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns this [`TextFont`] with the specified [`LineHeight`].", - &["_self", "line_height"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); @@ -477,6 +657,82 @@ pub(crate) fn register_text_span_functions(world: &mut World) { .register_type_data::<::bevy_text::TextSpan, bevy_mod_scripting_bindings::MarkAsGenerated>( ); } +pub(crate) fn register_underline_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::Underline, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_text::Underline>| { + let output: Val<::bevy_text::Underline> = { + { + let output: Val<::bevy_text::Underline> = <::bevy_text::Underline as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_text::Underline, bevy_mod_scripting_bindings::MarkAsGenerated>( + ); +} +pub(crate) fn register_underline_color_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::UnderlineColor, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_text::UnderlineColor>| { + let output: Val<::bevy_text::UnderlineColor> = { + { + let output: Val<::bevy_text::UnderlineColor> = <::bevy_text::UnderlineColor as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_text::UnderlineColor>, + other: Ref<::bevy_text::UnderlineColor>| + { + let output: bool = { + { + let output: bool = <::bevy_text::UnderlineColor as ::std::cmp::PartialEq< + ::bevy_text::UnderlineColor, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_text::UnderlineColor, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_text_bounds_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_text::TextBounds, @@ -624,34 +880,6 @@ pub(crate) fn register_font_smoothing_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_glyph_atlas_location_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::GlyphAtlasLocation, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_text::GlyphAtlasLocation>| { - let output: Val<::bevy_text::GlyphAtlasLocation> = { - { - let output: Val<::bevy_text::GlyphAtlasLocation> = - <::bevy_text::GlyphAtlasLocation as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_text::GlyphAtlasLocation, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} pub(crate) fn register_glyph_atlas_info_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_text::GlyphAtlasInfo, @@ -681,6 +909,34 @@ pub(crate) fn register_glyph_atlas_info_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_glyph_atlas_location_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::GlyphAtlasLocation, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_text::GlyphAtlasLocation>| { + let output: Val<::bevy_text::GlyphAtlasLocation> = { + { + let output: Val<::bevy_text::GlyphAtlasLocation> = + <::bevy_text::GlyphAtlasLocation as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_text::GlyphAtlasLocation, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_positioned_glyph_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_text::PositionedGlyph, @@ -754,6 +1010,52 @@ pub(crate) fn register_computed_text_block_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_line_height_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::LineHeight, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_text::LineHeight>| { + let output: Val<::bevy_text::LineHeight> = { + { + let output: Val<::bevy_text::LineHeight> = <::bevy_text::LineHeight as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_text::LineHeight>, other: Ref<::bevy_text::LineHeight>| { + let output: bool = { + { + let output: bool = <::bevy_text::LineHeight as ::std::cmp::PartialEq< + ::bevy_text::LineHeight, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_text::LineHeight, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_text_entity_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_text::TextEntity, @@ -787,6 +1089,21 @@ pub(crate) fn register_text_layout_info_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_text::TextLayoutInfo, >::new(world) + .register_documented( + "clear", + |mut _self: Mut<::bevy_text::TextLayoutInfo>| { + let output: () = { + { + let output: () = ::bevy_text::TextLayoutInfo::clear(&mut _self) + .into(); + output + } + }; + output + }, + " Clear the layout, retaining capacity", + &["_self"], + ) .register_documented( "clone", |_self: Ref<::bevy_text::TextLayoutInfo>| { @@ -812,16 +1129,113 @@ pub(crate) fn register_text_layout_info_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_line_height_functions(world: &mut World) { +pub(crate) fn register_run_geometry_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::LineHeight, + ::bevy_text::RunGeometry, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_text::LineHeight>| { - let output: Val<::bevy_text::LineHeight> = { + |_self: Ref<::bevy_text::RunGeometry>| { + let output: Val<::bevy_text::RunGeometry> = { { - let output: Val<::bevy_text::LineHeight> = <::bevy_text::LineHeight as ::std::clone::Clone>::clone( + let output: Val<::bevy_text::RunGeometry> = <::bevy_text::RunGeometry as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "strikethrough_position", + |_self: Ref<::bevy_text::RunGeometry>| { + let output: Val<::bevy_math::Vec2> = { + { + let output: Val<::bevy_math::Vec2> = ::bevy_text::RunGeometry::strikethrough_position( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the center of the strikethrough in the text layout.", + &["_self"], + ) + .register_documented( + "strikethrough_size", + |_self: Ref<::bevy_text::RunGeometry>| { + let output: Val<::bevy_math::Vec2> = { + { + let output: Val<::bevy_math::Vec2> = ::bevy_text::RunGeometry::strikethrough_size( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the size of the strikethrough.", + &["_self"], + ) + .register_documented( + "underline_position", + |_self: Ref<::bevy_text::RunGeometry>| { + let output: Val<::bevy_math::Vec2> = { + { + let output: Val<::bevy_math::Vec2> = ::bevy_text::RunGeometry::underline_position( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the center of the underline in the text layout.", + &["_self"], + ) + .register_documented( + "underline_size", + |_self: Ref<::bevy_text::RunGeometry>| { + let output: Val<::bevy_math::Vec2> = { + { + let output: Val<::bevy_math::Vec2> = ::bevy_text::RunGeometry::underline_size( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the size of the underline.", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_text::RunGeometry, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_font_features_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::FontFeatures, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_text::FontFeatures>| { + let output: Val<::bevy_text::FontFeatures> = { + { + let output: Val<::bevy_text::FontFeatures> = <::bevy_text::FontFeatures as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -835,11 +1249,14 @@ pub(crate) fn register_line_height_functions(world: &mut World) { ) .register_documented( "eq", - |_self: Ref<::bevy_text::LineHeight>, other: Ref<::bevy_text::LineHeight>| { + | + _self: Ref<::bevy_text::FontFeatures>, + other: Ref<::bevy_text::FontFeatures>| + { let output: bool = { { - let output: bool = <::bevy_text::LineHeight as ::std::cmp::PartialEq< - ::bevy_text::LineHeight, + let output: bool = <::bevy_text::FontFeatures as ::std::cmp::PartialEq< + ::bevy_text::FontFeatures, >>::eq(&_self, &other) .into(); output @@ -854,7 +1271,73 @@ pub(crate) fn register_line_height_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_text::LineHeight, + ::bevy_text::FontFeatures, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_font_feature_tag_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::FontFeatureTag, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_text::FontFeatureTag>| { + let output: () = { + { + let output: () = <::bevy_text::FontFeatureTag as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_text::FontFeatureTag>| { + let output: Val<::bevy_text::FontFeatureTag> = { + { + let output: Val<::bevy_text::FontFeatureTag> = <::bevy_text::FontFeatureTag as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_text::FontFeatureTag>, + other: Ref<::bevy_text::FontFeatureTag>| + { + let output: bool = { + { + let output: bool = <::bevy_text::FontFeatureTag as ::std::cmp::PartialEq< + ::bevy_text::FontFeatureTag, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_text::FontFeatureTag, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -908,21 +1391,30 @@ pub(crate) fn register_text_background_color_functions(world: &mut World) { impl Plugin for BevyTextScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); + register_font_hinting_functions(&mut world); + register_font_weight_functions(&mut world); register_justify_functions(&mut world); register_line_break_functions(&mut world); + register_strikethrough_functions(&mut world); + register_strikethrough_color_functions(&mut world); register_text_color_functions(&mut world); register_text_font_functions(&mut world); register_text_layout_functions(&mut world); register_text_span_functions(&mut world); + register_underline_functions(&mut world); + register_underline_color_functions(&mut world); register_text_bounds_functions(&mut world); register_font_smoothing_functions(&mut world); - register_glyph_atlas_location_functions(&mut world); register_glyph_atlas_info_functions(&mut world); + register_glyph_atlas_location_functions(&mut world); register_positioned_glyph_functions(&mut world); register_computed_text_block_functions(&mut world); + register_line_height_functions(&mut world); register_text_entity_functions(&mut world); register_text_layout_info_functions(&mut world); - register_line_height_functions(&mut world); + register_run_geometry_functions(&mut world); + register_font_features_functions(&mut world); + register_font_feature_tag_functions(&mut world); register_text_background_color_functions(&mut world); } } diff --git a/crates/bindings/bevy_time_bms_bindings/Cargo.toml b/crates/bindings/bevy_time_bms_bindings/Cargo.toml index 1b9a17be93..3a936efceb 100644 --- a/crates/bindings/bevy_time_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_time_bms_bindings/Cargo.toml @@ -17,15 +17,15 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_time = { version = "0.17.3", features = ["bevy_reflect", "std"], default-features = true} +bevy_time = { version = "0.18.0", features = ["bevy_reflect", "std"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_platform = { version = "^0.17.3", features = ["alloc", "serialize", "std"], default-features = true} +bevy_platform = { version = "^0.18.0", features = ["alloc", "serialize", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} diff --git a/crates/bindings/bevy_time_bms_bindings/src/lib.rs b/crates/bindings/bevy_time_bms_bindings/src/lib.rs index 1109e04d52..c26eae715c 100644 --- a/crates/bindings/bevy_time_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_time_bms_bindings/src/lib.rs @@ -64,6 +64,21 @@ pub(crate) fn register_timer_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_time::Timer, >::new(world) + .register_documented( + "almost_finish", + |mut _self: Mut<::bevy_time::Timer>| { + let output: () = { + { + let output: () = ::bevy_time::Timer::almost_finish(&mut _self) + .into(); + output + } + }; + output + }, + " Almost finishes the timer leaving 1 ns of remaining time.\n This can be useful when needing an immediate action without having\n to wait for the set duration of the timer in the first tick.\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.5, TimerMode::Once);\n timer.almost_finish();\n assert!(!timer.is_finished());\n assert_eq!(timer.remaining(), Duration::from_nanos(1));\n ```", + &["_self"], + ) .register_documented( "assert_receiver_is_total_eq", |_self: Ref<::bevy_time::Timer>| { @@ -190,21 +205,7 @@ pub(crate) fn register_timer_functions(world: &mut World) { }; output }, - " Finishes the timer.\n # Examples\n ```\n # use bevy_time::*;\n let mut timer = Timer::from_seconds(1.5, TimerMode::Once);\n timer.finish();\n assert!(timer.finished());\n ```", - &["_self"], - ) - .register_documented( - "finished", - |_self: Ref<::bevy_time::Timer>| { - let output: bool = { - { - let output: bool = ::bevy_time::Timer::finished(&_self).into(); - output - } - }; - output - }, - " Returns `true` if the timer has reached its duration.\n For repeating timers, this method behaves identically to [`Timer::just_finished`].\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer_once = Timer::from_seconds(1.0, TimerMode::Once);\n timer_once.tick(Duration::from_secs_f32(1.5));\n assert!(timer_once.finished());\n timer_once.tick(Duration::from_secs_f32(0.5));\n assert!(timer_once.finished());\n let mut timer_repeating = Timer::from_seconds(1.0, TimerMode::Repeating);\n timer_repeating.tick(Duration::from_secs_f32(1.1));\n assert!(timer_repeating.finished());\n timer_repeating.tick(Duration::from_secs_f32(0.8));\n assert!(!timer_repeating.finished());\n timer_repeating.tick(Duration::from_secs_f32(0.6));\n assert!(timer_repeating.finished());\n ```", + " Finishes the timer.\n # Examples\n ```\n # use bevy_time::*;\n let mut timer = Timer::from_seconds(1.5, TimerMode::Once);\n timer.finish();\n assert!(timer.is_finished());\n ```", &["_self"], ) .register_documented( @@ -347,20 +348,6 @@ pub(crate) fn register_timer_functions(world: &mut World) { " Pauses the Timer. Disables the ticking of the timer.\n See also [`Stopwatch::pause`](Stopwatch::pause).\n # Examples\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n timer.pause();\n timer.tick(Duration::from_secs_f32(0.5));\n assert_eq!(timer.elapsed_secs(), 0.0);\n ```", &["_self"], ) - .register_documented( - "paused", - |_self: Ref<::bevy_time::Timer>| { - let output: bool = { - { - let output: bool = ::bevy_time::Timer::paused(&_self).into(); - output - } - }; - output - }, - " Returns `true` if the timer is paused.\n See also [`Stopwatch::is_paused`](Stopwatch::is_paused).\n # Examples\n ```\n # use bevy_time::*;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n assert!(!timer.paused());\n timer.pause();\n assert!(timer.paused());\n timer.unpause();\n assert!(!timer.paused());\n ```", - &["_self"], - ) .register_documented( "remaining", |_self: Ref<::bevy_time::Timer>| { diff --git a/crates/bindings/bevy_transform_bms_bindings/Cargo.toml b/crates/bindings/bevy_transform_bms_bindings/Cargo.toml index 0c62b06a4d..8a9d3b0b08 100644 --- a/crates/bindings/bevy_transform_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_transform_bms_bindings/Cargo.toml @@ -17,19 +17,19 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_transform = { version = "0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_tasks = { version = "^0.17.3", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} +bevy_tasks = { version = "^0.18.0", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} diff --git a/crates/bindings/bevy_transform_bms_bindings/src/lib.rs b/crates/bindings/bevy_transform_bms_bindings/src/lib.rs index 3e376cb112..fc9c48e1b9 100644 --- a/crates/bindings/bevy_transform_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_transform_bms_bindings/src/lib.rs @@ -12,6 +12,71 @@ use bevy_mod_scripting_bindings::{ }; use bevy_mod_scripting_derive::script_bindings; pub struct BevyTransformScriptingPlugin; +pub(crate) fn register_static_transform_optimizations_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_transform::StaticTransformOptimizations, + >::new(world) + .register_documented( + "disabled", + || { + let output: Val<::bevy_transform::StaticTransformOptimizations> = { + { + let output: Val< + ::bevy_transform::StaticTransformOptimizations, + > = ::bevy_transform::StaticTransformOptimizations::disabled() + .into(); + output + } + }; + output + }, + " Unconditionally disable static scene optimizations.", + &[], + ) + .register_documented( + "enabled", + || { + let output: Val<::bevy_transform::StaticTransformOptimizations> = { + { + let output: Val< + ::bevy_transform::StaticTransformOptimizations, + > = ::bevy_transform::StaticTransformOptimizations::enabled() + .into(); + output + } + }; + output + }, + " Unconditionally enable static scene optimizations.", + &[], + ) + .register_documented( + "from_threshold", + |threshold: f32| { + let output: Val<::bevy_transform::StaticTransformOptimizations> = { + { + let output: Val< + ::bevy_transform::StaticTransformOptimizations, + > = ::bevy_transform::StaticTransformOptimizations::from_threshold( + threshold, + ) + .into(); + output + } + }; + output + }, + " If the percentage of moving objects exceeds this threshold, disable static [`Transform`]\n optimizations. This is done because the scene is so dynamic that the cost of tracking static\n trees exceeds the performance benefit of skipping propagation for these trees.\n - Setting this to `0.0` will result in never running static scene tracking.\n - Setting this to `1.0` will result in always tracking static transform trees.", + &["threshold"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_transform::StaticTransformOptimizations, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_global_transform_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_transform::components::GlobalTransform, @@ -1365,6 +1430,7 @@ pub(crate) fn register_transform_tree_changed_functions(world: &mut World) { impl Plugin for BevyTransformScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); + register_static_transform_optimizations_functions(&mut world); register_global_transform_functions(&mut world); register_transform_functions(&mut world); register_transform_tree_changed_functions(&mut world); diff --git a/crates/bindings/bevy_ui_bms_bindings/Cargo.toml b/crates/bindings/bevy_ui_bms_bindings/Cargo.toml index fe1d857dc9..3fd5ec8e33 100644 --- a/crates/bindings/bevy_ui_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_ui_bms_bindings/Cargo.toml @@ -17,46 +17,46 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_ui = { version = "0.17.3", features = ["bevy_picking", "bevy_ui_picking_backend"], default-features = true} +bevy_ui = { version = "0.18.0", features = ["bevy_picking"], default-features = true} accesskit = { version = "^0.21", features = [], default-features = true} -bevy_a11y = { version = "^0.17.3", features = ["bevy_reflect", "std"], default-features = true} +bevy_a11y = { version = "^0.18.0", features = ["bevy_reflect", "std"], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_input = { version = "^0.17.3", features = ["bevy_reflect", "smol_str", "std"], default-features = true} +bevy_input = { version = "^0.18.0", features = ["bevy_reflect", "gamepad", "keyboard", "mouse", "smol_str", "std"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_input_focus = { version = "^0.18.0", features = ["bevy_picking", "bevy_reflect", "gamepad", "keyboard", "mouse", "std"], default-features = true} -bevy_picking = { version = "^0.17.3", features = ["bevy_mesh_picking_backend"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_picking = { version = "^0.18.0", features = ["mesh_picking"], default-features = true} -bevy_sprite = { version = "^0.17.3", features = ["bevy_picking", "bevy_sprite_picking_backend", "bevy_text", "bevy_window"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_text = { version = "^0.17.3", features = ["default_font"], default-features = true} +bevy_sprite = { version = "^0.18.0", features = ["bevy_picking", "bevy_text", "bevy_window"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_text = { version = "^0.18.0", features = ["default_font"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_window = { version = "^0.17.3", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} -taffy = { version = "^0.7", features = [], default-features = true} +bevy_window = { version = "^0.18.0", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} uuid = { version = "^1.1", features = [], default-features = true} diff --git a/crates/bindings/bevy_ui_bms_bindings/src/lib.rs b/crates/bindings/bevy_ui_bms_bindings/src/lib.rs index edcff8251d..34d591db98 100644 --- a/crates/bindings/bevy_ui_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_ui_bms_bindings/src/lib.rs @@ -753,17 +753,17 @@ pub(crate) fn register_computed_ui_render_target_info_functions(world: &mut Worl bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_content_size_functions(world: &mut World) { +pub(crate) fn register_computed_node_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::ContentSize, + ::bevy_ui::ComputedNode, >::new(world) .register_documented( - "fixed_size", - |size: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_ui::ContentSize> = { + "border", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_ui::prelude::BorderRect> = { { - let output: Val<::bevy_ui::ContentSize> = ::bevy_ui::ContentSize::fixed_size( - size.into_inner(), + let output: Val<::bevy_ui::prelude::BorderRect> = ::bevy_ui::ComputedNode::border( + &_self, ) .into(); output @@ -771,69 +771,15 @@ pub(crate) fn register_content_size_functions(world: &mut World) { }; output }, - " Creates a `ContentSize` with a `Measure` that always returns given `size` argument, regardless of the UI layout's constraints.", - &["size"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::<::bevy_ui::ContentSize, bevy_mod_scripting_bindings::MarkAsGenerated>( - ); -} -pub(crate) fn register_ui_global_transform_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::UiGlobalTransform, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::UiGlobalTransform>| { - let output: Val<::bevy_ui::UiGlobalTransform> = { - { - let output: Val<::bevy_ui::UiGlobalTransform> = - <::bevy_ui::UiGlobalTransform as ::std::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_ui::UiGlobalTransform>, other: Ref<::bevy_ui::UiGlobalTransform>| { - let output: bool = { - { - let output: bool = <::bevy_ui::UiGlobalTransform as ::std::cmp::PartialEq< - ::bevy_ui::UiGlobalTransform, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::UiGlobalTransform, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_calculated_clip_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::CalculatedClip, - >::new(world) + " Returns the thickness of the node's border on each edge in physical pixels.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", + &["_self"], + ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::CalculatedClip>| { - let output: Val<::bevy_ui::CalculatedClip> = { + "border_box", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_ui::CalculatedClip> = <::bevy_ui::CalculatedClip as ::std::clone::Clone>::clone( + let output: Val<::bevy_math::Rect> = ::bevy_ui::ComputedNode::border_box( &_self, ) .into(); @@ -842,67 +788,15 @@ pub(crate) fn register_calculated_clip_functions(world: &mut World) { }; output }, - "", + " Returns the node's border-box in object-centered physical coordinates.\n This is the full rectangle enclosing the node.", &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::CalculatedClip, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_node_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::bevy_ui::Node>::new( - world, - ) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::Node>| { - let output: Val<::bevy_ui::Node> = { - { - let output: Val<::bevy_ui::Node> = - <::bevy_ui::Node as ::std::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_ui::Node>, other: Ref<::bevy_ui::Node>| { - let output: bool = { - { - let output: bool = <::bevy_ui::Node as ::std::cmp::PartialEq< - ::bevy_ui::Node, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry.register_type_data::<::bevy_ui::Node, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} -pub(crate) fn register_overflow_axis_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::OverflowAxis, - >::new(world) + ) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ui::OverflowAxis>| { - let output: () = { + "border_radius", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_ui::ResolvedBorderRadius> = { { - let output: () = <::bevy_ui::OverflowAxis as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::bevy_ui::ResolvedBorderRadius> = ::bevy_ui::ComputedNode::border_radius( &_self, ) .into(); @@ -911,15 +805,15 @@ pub(crate) fn register_overflow_axis_functions(world: &mut World) { }; output }, - "", + " Returns the border radius for each of the node's corners in physical pixels.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", &["_self"], ) .register_documented( "clone", - |_self: Ref<::bevy_ui::OverflowAxis>| { - let output: Val<::bevy_ui::OverflowAxis> = { + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_ui::ComputedNode> = { { - let output: Val<::bevy_ui::OverflowAxis> = <::bevy_ui::OverflowAxis as ::std::clone::Clone>::clone( + let output: Val<::bevy_ui::ComputedNode> = <::bevy_ui::ComputedNode as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -932,13 +826,19 @@ pub(crate) fn register_overflow_axis_functions(world: &mut World) { &["_self"], ) .register_documented( - "eq", - |_self: Ref<::bevy_ui::OverflowAxis>, other: Ref<::bevy_ui::OverflowAxis>| { + "contains_point", + | + _self: Ref<::bevy_ui::ComputedNode>, + transform: Val<::bevy_ui::UiGlobalTransform>, + point: Val<::bevy_math::Vec2>| + { let output: bool = { { - let output: bool = <::bevy_ui::OverflowAxis as ::std::cmp::PartialEq< - ::bevy_ui::OverflowAxis, - >>::eq(&_self, &other) + let output: bool = ::bevy_ui::ComputedNode::contains_point( + &_self, + transform.into_inner(), + point.into_inner(), + ) .into(); output } @@ -946,41 +846,14 @@ pub(crate) fn register_overflow_axis_functions(world: &mut World) { output }, "", - &["_self", "other"], + &["_self", "transform", "point"], ) .register_documented( - "is_visible", - |_self: Ref<::bevy_ui::OverflowAxis>| { - let output: bool = { - { - let output: bool = ::bevy_ui::OverflowAxis::is_visible(&_self) - .into(); - output - } - }; - output - }, - " Overflow is visible on this axis", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::OverflowAxis, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_ui_target_camera_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::UiTargetCamera, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ui::UiTargetCamera>| { - let output: () = { + "content_box", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_math::Rect> = { { - let output: () = <::bevy_ui::UiTargetCamera as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::bevy_math::Rect> = ::bevy_ui::ComputedNode::content_box( &_self, ) .into(); @@ -989,15 +862,15 @@ pub(crate) fn register_ui_target_camera_functions(world: &mut World) { }; output }, - "", + " Returns the node's content-box in object-centered physical coordinates.\n This is the innermost region of the node, where its content is placed.", &["_self"], ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::UiTargetCamera>| { - let output: Val<::bevy_ui::UiTargetCamera> = { + "content_inset", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_ui::prelude::BorderRect> = { { - let output: Val<::bevy_ui::UiTargetCamera> = <::bevy_ui::UiTargetCamera as ::std::clone::Clone>::clone( + let output: Val<::bevy_ui::prelude::BorderRect> = ::bevy_ui::ComputedNode::content_inset( &_self, ) .into(); @@ -1006,15 +879,15 @@ pub(crate) fn register_ui_target_camera_functions(world: &mut World) { }; output }, - "", + " Returns the combined inset on each edge including both padding and border thickness in physical pixels.", &["_self"], ) .register_documented( - "entity", - |_self: Ref<::bevy_ui::UiTargetCamera>| { - let output: Val<::bevy_ecs::entity::Entity> = { + "content_size", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ui::UiTargetCamera::entity( + let output: Val<::bevy_math::Vec2> = ::bevy_ui::ComputedNode::content_size( &_self, ) .into(); @@ -1023,19 +896,16 @@ pub(crate) fn register_ui_target_camera_functions(world: &mut World) { }; output }, - "", + " The calculated node content size as width and height in physical pixels.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", &["_self"], ) .register_documented( "eq", - | - _self: Ref<::bevy_ui::UiTargetCamera>, - other: Ref<::bevy_ui::UiTargetCamera>| - { + |_self: Ref<::bevy_ui::ComputedNode>, other: Ref<::bevy_ui::ComputedNode>| { let output: bool = { { - let output: bool = <::bevy_ui::UiTargetCamera as ::std::cmp::PartialEq< - ::bevy_ui::UiTargetCamera, + let output: bool = <::bevy_ui::ComputedNode as ::std::cmp::PartialEq< + ::bevy_ui::ComputedNode, >>::eq(&_self, &other) .into(); output @@ -1045,25 +915,13 @@ pub(crate) fn register_ui_target_camera_functions(world: &mut World) { }, "", &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::UiTargetCamera, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_computed_node_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::ComputedNode, - >::new(world) + ) .register_documented( - "border", + "inner_radius", |_self: Ref<::bevy_ui::ComputedNode>| { - let output: Val<::bevy_ui::prelude::BorderRect> = { + let output: Val<::bevy_ui::ResolvedBorderRadius> = { { - let output: Val<::bevy_ui::prelude::BorderRect> = ::bevy_ui::ComputedNode::border( + let output: Val<::bevy_ui::ResolvedBorderRadius> = ::bevy_ui::ComputedNode::inner_radius( &_self, ) .into(); @@ -1072,140 +930,15 @@ pub(crate) fn register_computed_node_functions(world: &mut World) { }; output }, - " Returns the thickness of the node's border on each edge in physical pixels.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", + " Returns the inner border radius for each of the node's corners in physical pixels.", &["_self"], ) .register_documented( - "border_radius", + "inverse_scale_factor", |_self: Ref<::bevy_ui::ComputedNode>| { - let output: Val<::bevy_ui::ResolvedBorderRadius> = { + let output: f32 = { { - let output: Val<::bevy_ui::ResolvedBorderRadius> = ::bevy_ui::ComputedNode::border_radius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the border radius for each of the node's corners in physical pixels.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::ComputedNode>| { - let output: Val<::bevy_ui::ComputedNode> = { - { - let output: Val<::bevy_ui::ComputedNode> = <::bevy_ui::ComputedNode as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "contains_point", - | - _self: Ref<::bevy_ui::ComputedNode>, - transform: Val<::bevy_ui::UiGlobalTransform>, - point: Val<::bevy_math::Vec2>| - { - let output: bool = { - { - let output: bool = ::bevy_ui::ComputedNode::contains_point( - &_self, - transform.into_inner(), - point.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self", "transform", "point"], - ) - .register_documented( - "content_inset", - |_self: Ref<::bevy_ui::ComputedNode>| { - let output: Val<::bevy_ui::prelude::BorderRect> = { - { - let output: Val<::bevy_ui::prelude::BorderRect> = ::bevy_ui::ComputedNode::content_inset( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the combined inset on each edge including both padding and border thickness in physical pixels.", - &["_self"], - ) - .register_documented( - "content_size", - |_self: Ref<::bevy_ui::ComputedNode>| { - let output: Val<::bevy_math::Vec2> = { - { - let output: Val<::bevy_math::Vec2> = ::bevy_ui::ComputedNode::content_size( - &_self, - ) - .into(); - output - } - }; - output - }, - " The calculated node content size as width and height in physical pixels.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_ui::ComputedNode>, other: Ref<::bevy_ui::ComputedNode>| { - let output: bool = { - { - let output: bool = <::bevy_ui::ComputedNode as ::std::cmp::PartialEq< - ::bevy_ui::ComputedNode, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "inner_radius", - |_self: Ref<::bevy_ui::ComputedNode>| { - let output: Val<::bevy_ui::ResolvedBorderRadius> = { - { - let output: Val<::bevy_ui::ResolvedBorderRadius> = ::bevy_ui::ComputedNode::inner_radius( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the inner border radius for each of the node's corners in physical pixels.", - &["_self"], - ) - .register_documented( - "inverse_scale_factor", - |_self: Ref<::bevy_ui::ComputedNode>| { - let output: f32 = { - { - let output: f32 = ::bevy_ui::ComputedNode::inverse_scale_factor( + let output: f32 = ::bevy_ui::ComputedNode::inverse_scale_factor( &_self, ) .into(); @@ -1313,6 +1046,23 @@ pub(crate) fn register_computed_node_functions(world: &mut World) { " Returns the thickness of the node's padding on each edge in physical pixels.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", &["_self"], ) + .register_documented( + "padding_box", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_math::Rect> = { + { + let output: Val<::bevy_math::Rect> = ::bevy_ui::ComputedNode::padding_box( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the node's padding-box in object-centered physical coordinates.\n This is the region inside the border containing the node's padding and content areas.", + &["_self"], + ) .register_documented( "resolve_clip_rect", | @@ -1393,16 +1143,16 @@ pub(crate) fn register_computed_node_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_overflow_clip_box_functions(world: &mut World) { +pub(crate) fn register_ui_global_transform_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::OverflowClipBox, + ::bevy_ui::UiGlobalTransform, >::new(world) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ui::OverflowClipBox>| { - let output: () = { + "affine", + |_self: Ref<::bevy_ui::UiGlobalTransform>| { + let output: Val<::bevy_math::Affine2> = { { - let output: () = <::bevy_ui::OverflowClipBox as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::bevy_math::Affine2> = ::bevy_ui::UiGlobalTransform::affine( &_self, ) .into(); @@ -1411,15 +1161,15 @@ pub(crate) fn register_overflow_clip_box_functions(world: &mut World) { }; output }, - "", + " Returns the transform as an [`Affine2`]", &["_self"], ) .register_documented( "clone", - |_self: Ref<::bevy_ui::OverflowClipBox>| { - let output: Val<::bevy_ui::OverflowClipBox> = { + |_self: Ref<::bevy_ui::UiGlobalTransform>| { + let output: Val<::bevy_ui::UiGlobalTransform> = { { - let output: Val<::bevy_ui::OverflowClipBox> = <::bevy_ui::OverflowClipBox as ::std::clone::Clone>::clone( + let output: Val<::bevy_ui::UiGlobalTransform> = <::bevy_ui::UiGlobalTransform as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1434,13 +1184,13 @@ pub(crate) fn register_overflow_clip_box_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_ui::OverflowClipBox>, - other: Ref<::bevy_ui::OverflowClipBox>| + _self: Ref<::bevy_ui::UiGlobalTransform>, + other: Ref<::bevy_ui::UiGlobalTransform>| { let output: bool = { { - let output: bool = <::bevy_ui::OverflowClipBox as ::std::cmp::PartialEq< - ::bevy_ui::OverflowClipBox, + let output: bool = <::bevy_ui::UiGlobalTransform as ::std::cmp::PartialEq< + ::bevy_ui::UiGlobalTransform, >>::eq(&_self, &other) .into(); output @@ -1450,26 +1200,14 @@ pub(crate) fn register_overflow_clip_box_functions(world: &mut World) { }, "", &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::OverflowClipBox, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_focus_policy_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::FocusPolicy, - >::new(world) + ) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ui::FocusPolicy>| { - let output: () = { + "from_rotation", + |rotation: Val<::bevy_math::Rot2>| { + let output: Val<::bevy_ui::UiGlobalTransform> = { { - let output: () = <::bevy_ui::FocusPolicy as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, + let output: Val<::bevy_ui::UiGlobalTransform> = ::bevy_ui::UiGlobalTransform::from_rotation( + rotation.into_inner(), ) .into(); output @@ -1477,16 +1215,51 @@ pub(crate) fn register_focus_policy_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Creates a `UiGlobalTransform` from the given rotation.", + &["rotation"], ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::FocusPolicy>| { - let output: Val<::bevy_ui::FocusPolicy> = { + "from_scale", + |scale: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_ui::UiGlobalTransform> = { { - let output: Val<::bevy_ui::FocusPolicy> = <::bevy_ui::FocusPolicy as ::std::clone::Clone>::clone( - &_self, + let output: Val<::bevy_ui::UiGlobalTransform> = ::bevy_ui::UiGlobalTransform::from_scale( + scale.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a `UiGlobalTransform` from the given scaling.", + &["scale"], + ) + .register_documented( + "from_translation", + |translation: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_ui::UiGlobalTransform> = { + { + let output: Val<::bevy_ui::UiGlobalTransform> = ::bevy_ui::UiGlobalTransform::from_translation( + translation.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a `UiGlobalTransform` from the given 2D translation.", + &["translation"], + ) + .register_documented( + "from_xy", + |x: f32, y: f32| { + let output: Val<::bevy_ui::UiGlobalTransform> = { + { + let output: Val<::bevy_ui::UiGlobalTransform> = ::bevy_ui::UiGlobalTransform::from_xy( + x, + y, ) .into(); output @@ -1494,17 +1267,37 @@ pub(crate) fn register_focus_policy_functions(world: &mut World) { }; output }, + " Creates a `UiGlobalTransform` from the given 2D translation.", + &["x", "y"], + ) + .register_documented( + "mul", + | + _self: Val<::bevy_ui::UiGlobalTransform>, + affine2: Val<::bevy_math::Affine2>| + { + let output: Val<::bevy_math::Affine2> = { + { + let output: Val<::bevy_math::Affine2> = <::bevy_ui::UiGlobalTransform as ::std::ops::Mul< + ::bevy_math::Affine2, + >>::mul(_self.into_inner(), affine2.into_inner()) + .into(); + output + } + }; + output + }, "", - &["_self"], + &["_self", "affine2"], ) .register_documented( - "eq", - |_self: Ref<::bevy_ui::FocusPolicy>, other: Ref<::bevy_ui::FocusPolicy>| { - let output: bool = { + "mul", + |_self: Val<::bevy_ui::UiGlobalTransform>, value: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Vec2> = { { - let output: bool = <::bevy_ui::FocusPolicy as ::std::cmp::PartialEq< - ::bevy_ui::FocusPolicy, - >>::eq(&_self, &other) + let output: Val<::bevy_math::Vec2> = <::bevy_ui::UiGlobalTransform as ::std::ops::Mul< + ::bevy_math::Vec2, + >>::mul(_self.into_inner(), value.into_inner()) .into(); output } @@ -1512,96 +1305,55 @@ pub(crate) fn register_focus_policy_functions(world: &mut World) { output }, "", - &["_self", "other"], + &["_self", "value"], + ) + .register_documented( + "mul", + | + _self: Val<::bevy_ui::UiGlobalTransform>, + value: Val<::bevy_ui::UiGlobalTransform>| + { + let output: Val<::bevy_ui::UiGlobalTransform> = { + { + let output: Val<::bevy_ui::UiGlobalTransform> = <::bevy_ui::UiGlobalTransform as ::std::ops::Mul< + ::bevy_ui::UiGlobalTransform, + >>::mul(_self.into_inner(), value.into_inner()) + .into(); + output + } + }; + output + }, + "", + &["_self", "value"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); - registry - .register_type_data::<::bevy_ui::FocusPolicy, bevy_mod_scripting_bindings::MarkAsGenerated>( - ); -} -pub(crate) fn register_image_node_size_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::widget::ImageNodeSize, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::widget::ImageNodeSize>| { - let output: Val<::bevy_ui::widget::ImageNodeSize> = { - { - let output: Val<::bevy_ui::widget::ImageNodeSize> = - <::bevy_ui::widget::ImageNodeSize as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "size", - |_self: Ref<::bevy_ui::widget::ImageNodeSize>| { - let output: Val<::bevy_math::UVec2> = { - { - let output: Val<::bevy_math::UVec2> = - ::bevy_ui::widget::ImageNodeSize::size(&_self).into(); - output - } - }; - output - }, - " The size of the image's texture", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::widget::ImageNodeSize, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_text_node_flags_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::widget::TextNodeFlags, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::widget::TextNodeFlags>| { - let output: Val<::bevy_ui::widget::TextNodeFlags> = { - { - let output: Val<::bevy_ui::widget::TextNodeFlags> = - <::bevy_ui::widget::TextNodeFlags as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ui::widget::TextNodeFlags, + ::bevy_ui::UiGlobalTransform, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_ui_position_functions(world: &mut World) { +pub(crate) fn register_auto_directional_navigation_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::UiPosition, + ::bevy_ui::auto_directional_navigation::AutoDirectionalNavigation, >::new(world) .register_documented( - "anchor", - |anchor: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_ui::UiPosition> = { + "clone", + | + _self: Ref< + ::bevy_ui::auto_directional_navigation::AutoDirectionalNavigation, + >| + { + let output: Val< + ::bevy_ui::auto_directional_navigation::AutoDirectionalNavigation, + > = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::anchor( - anchor.into_inner(), + let output: Val< + ::bevy_ui::auto_directional_navigation::AutoDirectionalNavigation, + > = <::bevy_ui::auto_directional_navigation::AutoDirectionalNavigation as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -1609,41 +1361,52 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Position at the given normalized anchor point", - &["anchor"], + "", + &["_self"], ) .register_documented( - "at", + "eq", | - _self: Val<::bevy_ui::UiPosition>, - x: Val<::bevy_ui::Val>, - y: Val<::bevy_ui::Val>| + _self: Ref< + ::bevy_ui::auto_directional_navigation::AutoDirectionalNavigation, + >, + other: Ref< + ::bevy_ui::auto_directional_navigation::AutoDirectionalNavigation, + >| { - let output: Val<::bevy_ui::UiPosition> = { + let output: bool = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at( - _self.into_inner(), - x.into_inner(), - y.into_inner(), - ) + let output: bool = <::bevy_ui::auto_directional_navigation::AutoDirectionalNavigation as ::std::cmp::PartialEq< + ::bevy_ui::auto_directional_navigation::AutoDirectionalNavigation, + >>::eq(&_self, &other) .into(); output } }; output }, - " Creates a position from self with the given `x` and `y` coordinates", - &["_self", "x", "y"], - ) + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::auto_directional_navigation::AutoDirectionalNavigation, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_content_size_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::ContentSize, + >::new(world) .register_documented( - "at_percent", - |_self: Val<::bevy_ui::UiPosition>, x: f32, y: f32| { - let output: Val<::bevy_ui::UiPosition> = { + "fixed_size", + |size: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_ui::ContentSize> = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_percent( - _self.into_inner(), - x, - y, + let output: Val<::bevy_ui::ContentSize> = ::bevy_ui::ContentSize::fixed_size( + size.into_inner(), ) .into(); output @@ -1651,18 +1414,26 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Creates a percentage position from self with the given `x` and `y` coordinates", - &["_self", "x", "y"], - ) + " Creates a `ContentSize` with a `Measure` that always returns given `size` argument, regardless of the UI layout's constraints.", + &["size"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_ui::ContentSize, bevy_mod_scripting_bindings::MarkAsGenerated>( + ); +} +pub(crate) fn register_calculated_clip_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::CalculatedClip, + >::new(world) .register_documented( - "at_px", - |_self: Val<::bevy_ui::UiPosition>, x: f32, y: f32| { - let output: Val<::bevy_ui::UiPosition> = { + "clone", + |_self: Ref<::bevy_ui::CalculatedClip>| { + let output: Val<::bevy_ui::CalculatedClip> = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_px( - _self.into_inner(), - x, - y, + let output: Val<::bevy_ui::CalculatedClip> = <::bevy_ui::CalculatedClip as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -1670,17 +1441,68 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Creates a position in logical pixels from self with the given `x` and `y` coordinates", - &["_self", "x", "y"], - ) + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::CalculatedClip, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_node_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::bevy_ui::Node>::new( + world, + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::Node>| { + let output: Val<::bevy_ui::Node> = { + { + let output: Val<::bevy_ui::Node> = + <::bevy_ui::Node as ::std::clone::Clone>::clone(&_self).into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::Node>, other: Ref<::bevy_ui::Node>| { + let output: bool = { + { + let output: bool = <::bevy_ui::Node as ::std::cmp::PartialEq< + ::bevy_ui::Node, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry.register_type_data::<::bevy_ui::Node, bevy_mod_scripting_bindings::MarkAsGenerated>(); +} +pub(crate) fn register_overflow_axis_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::OverflowAxis, + >::new(world) .register_documented( - "at_x", - |_self: Val<::bevy_ui::UiPosition>, x: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::OverflowAxis>| { + let output: () = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_x( - _self.into_inner(), - x.into_inner(), + let output: () = <::bevy_ui::OverflowAxis as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, ) .into(); output @@ -1688,17 +1510,16 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Creates a position from self with the given `x` coordinate", - &["_self", "x"], + "", + &["_self"], ) .register_documented( - "at_y", - |_self: Val<::bevy_ui::UiPosition>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { + "clone", + |_self: Ref<::bevy_ui::OverflowAxis>| { + let output: Val<::bevy_ui::OverflowAxis> = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_y( - _self.into_inner(), - y.into_inner(), + let output: Val<::bevy_ui::OverflowAxis> = <::bevy_ui::OverflowAxis as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -1706,53 +1527,60 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Creates a position from self with the given `y` coordinate", - &["_self", "y"], + "", + &["_self"], ) .register_documented( - "bottom", - |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { + "eq", + |_self: Ref<::bevy_ui::OverflowAxis>, other: Ref<::bevy_ui::OverflowAxis>| { + let output: bool = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::bottom( - x.into_inner(), - y.into_inner(), - ) + let output: bool = <::bevy_ui::OverflowAxis as ::std::cmp::PartialEq< + ::bevy_ui::OverflowAxis, + >>::eq(&_self, &other) .into(); output } }; output }, - " Position relative to the bottom edge", - &["x", "y"], + "", + &["_self", "other"], ) .register_documented( - "bottom_left", - |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { + "is_visible", + |_self: Ref<::bevy_ui::OverflowAxis>| { + let output: bool = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::bottom_left( - x.into_inner(), - y.into_inner(), - ) + let output: bool = ::bevy_ui::OverflowAxis::is_visible(&_self) .into(); output } }; output }, - " Position relative to the bottom-left corner", - &["x", "y"], - ) + " Overflow is visible on this axis", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::OverflowAxis, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_ui_target_camera_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::UiTargetCamera, + >::new(world) .register_documented( - "bottom_right", - |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::UiTargetCamera>| { + let output: () = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::bottom_right( - x.into_inner(), - y.into_inner(), + let output: () = <::bevy_ui::UiTargetCamera as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, ) .into(); output @@ -1760,17 +1588,16 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Position relative to the bottom-right corner", - &["x", "y"], + "", + &["_self"], ) .register_documented( - "center", - |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { + "clone", + |_self: Ref<::bevy_ui::UiTargetCamera>| { + let output: Val<::bevy_ui::UiTargetCamera> = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::center( - x.into_inner(), - y.into_inner(), + let output: Val<::bevy_ui::UiTargetCamera> = <::bevy_ui::UiTargetCamera as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -1778,15 +1605,15 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Position relative to the center", - &["x", "y"], + "", + &["_self"], ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::UiPosition>| { - let output: Val<::bevy_ui::UiPosition> = { + "entity", + |_self: Ref<::bevy_ui::UiTargetCamera>| { + let output: Val<::bevy_ecs::entity::Entity> = { { - let output: Val<::bevy_ui::UiPosition> = <::bevy_ui::UiPosition as ::std::clone::Clone>::clone( + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ui::UiTargetCamera::entity( &_self, ) .into(); @@ -1800,11 +1627,14 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { ) .register_documented( "eq", - |_self: Ref<::bevy_ui::UiPosition>, other: Ref<::bevy_ui::UiPosition>| { + | + _self: Ref<::bevy_ui::UiTargetCamera>, + other: Ref<::bevy_ui::UiTargetCamera>| + { let output: bool = { { - let output: bool = <::bevy_ui::UiPosition as ::std::cmp::PartialEq< - ::bevy_ui::UiPosition, + let output: bool = <::bevy_ui::UiTargetCamera as ::std::cmp::PartialEq< + ::bevy_ui::UiTargetCamera, >>::eq(&_self, &other) .into(); output @@ -1814,15 +1644,26 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }, "", &["_self", "other"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::UiTargetCamera, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_overflow_clip_box_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::OverflowClipBox, + >::new(world) .register_documented( - "left", - |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::OverflowClipBox>| { + let output: () = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::left( - x.into_inner(), - y.into_inner(), + let output: () = <::bevy_ui::OverflowClipBox as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, ) .into(); output @@ -1830,22 +1671,16 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Position relative to the left edge", - &["x", "y"], + "", + &["_self"], ) .register_documented( - "new", - | - anchor: Val<::bevy_math::Vec2>, - x: Val<::bevy_ui::Val>, - y: Val<::bevy_ui::Val>| - { - let output: Val<::bevy_ui::UiPosition> = { + "clone", + |_self: Ref<::bevy_ui::OverflowClipBox>| { + let output: Val<::bevy_ui::OverflowClipBox> = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::new( - anchor.into_inner(), - x.into_inner(), - y.into_inner(), + let output: Val<::bevy_ui::OverflowClipBox> = <::bevy_ui::OverflowClipBox as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -1853,78 +1688,48 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Create a new position", - &["anchor", "x", "y"], + "", + &["_self"], ) .register_documented( - "resolve", + "eq", | - _self: Val<::bevy_ui::UiPosition>, - scale_factor: f32, - physical_size: Val<::bevy_math::Vec2>, - physical_target_size: Val<::bevy_math::Vec2>| + _self: Ref<::bevy_ui::OverflowClipBox>, + other: Ref<::bevy_ui::OverflowClipBox>| { - let output: Val<::bevy_math::Vec2> = { - { - let output: Val<::bevy_math::Vec2> = ::bevy_ui::UiPosition::resolve( - _self.into_inner(), - scale_factor, - physical_size.into_inner(), - physical_target_size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Resolves the `Position` into physical coordinates.", - &["_self", "scale_factor", "physical_size", "physical_target_size"], - ) - .register_documented( - "right", - |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { - { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::right( - x.into_inner(), - y.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Position relative to the right edge", - &["x", "y"], - ) - .register_documented( - "top", - |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { + let output: bool = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::top( - x.into_inner(), - y.into_inner(), - ) + let output: bool = <::bevy_ui::OverflowClipBox as ::std::cmp::PartialEq< + ::bevy_ui::OverflowClipBox, + >>::eq(&_self, &other) .into(); output } }; output }, - " Position relative to the top edge", - &["x", "y"], - ) + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::OverflowClipBox, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_focus_policy_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::FocusPolicy, + >::new(world) .register_documented( - "top_left", - |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::FocusPolicy>| { + let output: () = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::top_left( - x.into_inner(), - y.into_inner(), + let output: () = <::bevy_ui::FocusPolicy as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, ) .into(); output @@ -1932,17 +1737,16 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Position relative to the top-left corner", - &["x", "y"], + "", + &["_self"], ) .register_documented( - "top_right", - |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiPosition> = { + "clone", + |_self: Ref<::bevy_ui::FocusPolicy>| { + let output: Val<::bevy_ui::FocusPolicy> = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::top_right( - x.into_inner(), - y.into_inner(), + let output: Val<::bevy_ui::FocusPolicy> = <::bevy_ui::FocusPolicy as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -1950,44 +1754,114 @@ pub(crate) fn register_ui_position_functions(world: &mut World) { }; output }, - " Position relative to the top-right corner", - &["x", "y"], + "", + &["_self"], ) .register_documented( - "with_anchor", - |_self: Val<::bevy_ui::UiPosition>, anchor: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_ui::UiPosition> = { + "eq", + |_self: Ref<::bevy_ui::FocusPolicy>, other: Ref<::bevy_ui::FocusPolicy>| { + let output: bool = { { - let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::with_anchor( - _self.into_inner(), - anchor.into_inner(), - ) + let output: bool = <::bevy_ui::FocusPolicy as ::std::cmp::PartialEq< + ::bevy_ui::FocusPolicy, + >>::eq(&_self, &other) .into(); output } }; output }, - " Creates a position from self with the given `anchor` point", - &["_self", "anchor"], + "", + &["_self", "other"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_ui::UiPosition, bevy_mod_scripting_bindings::MarkAsGenerated>( + .register_type_data::<::bevy_ui::FocusPolicy, bevy_mod_scripting_bindings::MarkAsGenerated>( ); } -pub(crate) fn register_val_functions(world: &mut World) { +pub(crate) fn register_image_node_size_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::Val, + ::bevy_ui::widget::ImageNodeSize, >::new(world) - .register_documented( - "all", - |_self: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + .register_documented( + "clone", + |_self: Ref<::bevy_ui::widget::ImageNodeSize>| { + let output: Val<::bevy_ui::widget::ImageNodeSize> = { + { + let output: Val<::bevy_ui::widget::ImageNodeSize> = + <::bevy_ui::widget::ImageNodeSize as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "size", + |_self: Ref<::bevy_ui::widget::ImageNodeSize>| { + let output: Val<::bevy_math::UVec2> = { + { + let output: Val<::bevy_math::UVec2> = + ::bevy_ui::widget::ImageNodeSize::size(&_self).into(); + output + } + }; + output + }, + " The size of the image's texture", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::widget::ImageNodeSize, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_text_node_flags_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::widget::TextNodeFlags, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::widget::TextNodeFlags>| { + let output: Val<::bevy_ui::widget::TextNodeFlags> = { + { + let output: Val<::bevy_ui::widget::TextNodeFlags> = + <::bevy_ui::widget::TextNodeFlags as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::widget::TextNodeFlags, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_ui_position_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::UiPosition, + >::new(world) + .register_documented( + "anchor", + |anchor: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::all( - _self.into_inner(), + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::anchor( + anchor.into_inner(), ) .into(); output @@ -1995,16 +1869,22 @@ pub(crate) fn register_val_functions(world: &mut World) { }; output }, - " Returns a [`UiRect`] with all its fields equal to this value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).all();\n assert_eq!(ui_rect.left, Val::Px(1.));\n assert_eq!(ui_rect.right, Val::Px(1.));\n assert_eq!(ui_rect.top, Val::Px(1.));\n assert_eq!(ui_rect.bottom, Val::Px(1.));\n ```", - &["_self"], + " Position at the given normalized anchor point", + &["anchor"], ) .register_documented( - "bottom", - |_self: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "at", + | + _self: Val<::bevy_ui::UiPosition>, + x: Val<::bevy_ui::Val>, + y: Val<::bevy_ui::Val>| + { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::bottom( + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at( _self.into_inner(), + x.into_inner(), + y.into_inner(), ) .into(); output @@ -2012,16 +1892,18 @@ pub(crate) fn register_val_functions(world: &mut World) { }; output }, - " Returns a [`UiRect`] with its `bottom` equal to this value,\n and all other fields set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).bottom();\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::Px(1.));\n ```", - &["_self"], + " Creates a position from self with the given `x` and `y` coordinates", + &["_self", "x", "y"], ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::Val>| { - let output: Val<::bevy_ui::Val> = { + "at_percent", + |_self: Val<::bevy_ui::UiPosition>, x: f32, y: f32| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::clone::Clone>::clone( - &_self, + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_percent( + _self.into_inner(), + x, + y, ) .into(); output @@ -2029,50 +1911,54 @@ pub(crate) fn register_val_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Creates a percentage position from self with the given `x` and `y` coordinates", + &["_self", "x", "y"], ) .register_documented( - "div", - |_self: Val<::bevy_ui::Val>, rhs: f32| { - let output: Val<::bevy_ui::Val> = { + "at_px", + |_self: Val<::bevy_ui::UiPosition>, x: f32, y: f32| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::ops::Div< - f32, - >>::div(_self.into_inner(), rhs) + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_px( + _self.into_inner(), + x, + y, + ) .into(); output } }; output }, - "", - &["_self", "rhs"], + " Creates a position in logical pixels from self with the given `x` and `y` coordinates", + &["_self", "x", "y"], ) .register_documented( - "eq", - |_self: Ref<::bevy_ui::Val>, other: Ref<::bevy_ui::Val>| { - let output: bool = { + "at_x", + |_self: Val<::bevy_ui::UiPosition>, x: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: bool = <::bevy_ui::Val as ::std::cmp::PartialEq< - ::bevy_ui::Val, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_x( + _self.into_inner(), + x.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], + " Creates a position from self with the given `x` coordinate", + &["_self", "x"], ) .register_documented( - "horizontal", - |_self: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "at_y", + |_self: Val<::bevy_ui::UiPosition>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::horizontal( + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_y( _self.into_inner(), + y.into_inner(), ) .into(); output @@ -2080,16 +1966,17 @@ pub(crate) fn register_val_functions(world: &mut World) { }; output }, - " Returns a [`UiRect`] with all its `left` and `right` equal to this value,\n and its `top` and `bottom` set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).horizontal();\n assert_eq!(ui_rect.left, Val::Px(1.));\n assert_eq!(ui_rect.right, Val::Px(1.));\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", - &["_self"], + " Creates a position from self with the given `y` coordinate", + &["_self", "y"], ) .register_documented( - "left", - |_self: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "bottom", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::left( - _self.into_inner(), + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::bottom( + x.into_inner(), + y.into_inner(), ) .into(); output @@ -2097,33 +1984,35 @@ pub(crate) fn register_val_functions(world: &mut World) { }; output }, - " Returns a [`UiRect`] with its `left` equal to this value,\n and all other fields set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).left();\n assert_eq!(ui_rect.left, Val::Px(1.));\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", - &["_self"], + " Position relative to the bottom edge", + &["x", "y"], ) .register_documented( - "mul", - |_self: Val<::bevy_ui::Val>, rhs: f32| { - let output: Val<::bevy_ui::Val> = { + "bottom_left", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::ops::Mul< - f32, - >>::mul(_self.into_inner(), rhs) + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::bottom_left( + x.into_inner(), + y.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "rhs"], + " Position relative to the bottom-left corner", + &["x", "y"], ) .register_documented( - "neg", - |_self: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::Val> = { + "bottom_right", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::ops::Neg>::neg( - _self.into_inner(), + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::bottom_right( + x.into_inner(), + y.into_inner(), ) .into(); output @@ -2131,16 +2020,17 @@ pub(crate) fn register_val_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Position relative to the bottom-right corner", + &["x", "y"], ) .register_documented( - "right", - |_self: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "center", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::right( - _self.into_inner(), + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::center( + x.into_inner(), + y.into_inner(), ) .into(); output @@ -2148,16 +2038,16 @@ pub(crate) fn register_val_functions(world: &mut World) { }; output }, - " Returns a [`UiRect`] with its `right` equal to this value,\n and all other fields set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).right();\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::Px(1.));\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", - &["_self"], + " Position relative to the center", + &["x", "y"], ) .register_documented( - "top", - |_self: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "clone", + |_self: Ref<::bevy_ui::UiPosition>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::top( - _self.into_inner(), + let output: Val<::bevy_ui::UiPosition> = <::bevy_ui::UiPosition as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -2165,41 +2055,34 @@ pub(crate) fn register_val_functions(world: &mut World) { }; output }, - " Returns a [`UiRect`] with its `top` equal to this value,\n and all other fields set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).top();\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::Px(1.));\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", + "", &["_self"], ) .register_documented( - "vertical", - |_self: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "eq", + |_self: Ref<::bevy_ui::UiPosition>, other: Ref<::bevy_ui::UiPosition>| { + let output: bool = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::vertical( - _self.into_inner(), - ) + let output: bool = <::bevy_ui::UiPosition as ::std::cmp::PartialEq< + ::bevy_ui::UiPosition, + >>::eq(&_self, &other) .into(); output } }; output }, - " Returns a [`UiRect`] with all its `top` and `bottom` equal to this value,\n and its `left` and `right` set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).vertical();\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::Px(1.));\n assert_eq!(ui_rect.bottom, Val::Px(1.));\n ```", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry.register_type_data::<::bevy_ui::Val, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} -pub(crate) fn register_color_stop_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::ColorStop, - >::new(world) + "", + &["_self", "other"], + ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::ColorStop>| { - let output: Val<::bevy_ui::ColorStop> = { + "left", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::ColorStop> = <::bevy_ui::ColorStop as ::std::clone::Clone>::clone( - &_self, + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::left( + x.into_inner(), + y.into_inner(), ) .into(); output @@ -2207,34 +2090,47 @@ pub(crate) fn register_color_stop_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Position relative to the left edge", + &["x", "y"], ) .register_documented( - "eq", - |_self: Ref<::bevy_ui::ColorStop>, other: Ref<::bevy_ui::ColorStop>| { - let output: bool = { + "new", + | + anchor: Val<::bevy_math::Vec2>, + x: Val<::bevy_ui::Val>, + y: Val<::bevy_ui::Val>| + { + let output: Val<::bevy_ui::UiPosition> = { { - let output: bool = <::bevy_ui::ColorStop as ::std::cmp::PartialEq< - ::bevy_ui::ColorStop, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::new( + anchor.into_inner(), + x.into_inner(), + y.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], + " Create a new position", + &["anchor", "x", "y"], ) .register_documented( - "with_hint", - |_self: Val<::bevy_ui::ColorStop>, hint: f32| { - let output: Val<::bevy_ui::ColorStop> = { + "resolve", + | + _self: Val<::bevy_ui::UiPosition>, + scale_factor: f32, + physical_size: Val<::bevy_math::Vec2>, + physical_target_size: Val<::bevy_math::Vec2>| + { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_ui::ColorStop> = ::bevy_ui::ColorStop::with_hint( + let output: Val<::bevy_math::Vec2> = ::bevy_ui::UiPosition::resolve( _self.into_inner(), - hint, + scale_factor, + physical_size.into_inner(), + physical_target_size.into_inner(), ) .into(); output @@ -2242,25 +2138,17 @@ pub(crate) fn register_color_stop_functions(world: &mut World) { }; output }, - "", - &["_self", "hint"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::<::bevy_ui::ColorStop, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} -pub(crate) fn register_angular_color_stop_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::AngularColorStop, - >::new(world) + " Resolves the `Position` into physical coordinates.", + &["_self", "scale_factor", "physical_size", "physical_target_size"], + ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::AngularColorStop>| { - let output: Val<::bevy_ui::AngularColorStop> = { + "right", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::AngularColorStop> = <::bevy_ui::AngularColorStop as ::std::clone::Clone>::clone( - &_self, + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::right( + x.into_inner(), + y.into_inner(), ) .into(); output @@ -2268,37 +2156,35 @@ pub(crate) fn register_angular_color_stop_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Position relative to the right edge", + &["x", "y"], ) .register_documented( - "eq", - | - _self: Ref<::bevy_ui::AngularColorStop>, - other: Ref<::bevy_ui::AngularColorStop>| - { - let output: bool = { + "top", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: bool = <::bevy_ui::AngularColorStop as ::std::cmp::PartialEq< - ::bevy_ui::AngularColorStop, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::top( + x.into_inner(), + y.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], + " Position relative to the top edge", + &["x", "y"], ) .register_documented( - "with_hint", - |_self: Val<::bevy_ui::AngularColorStop>, hint: f32| { - let output: Val<::bevy_ui::AngularColorStop> = { + "top_left", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::AngularColorStop> = ::bevy_ui::AngularColorStop::with_hint( - _self.into_inner(), - hint, + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::top_left( + x.into_inner(), + y.into_inner(), ) .into(); output @@ -2306,28 +2192,17 @@ pub(crate) fn register_angular_color_stop_functions(world: &mut World) { }; output }, - "", - &["_self", "hint"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::AngularColorStop, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_linear_gradient_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::LinearGradient, - >::new(world) + " Position relative to the top-left corner", + &["x", "y"], + ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::LinearGradient>| { - let output: Val<::bevy_ui::LinearGradient> = { + "top_right", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: Val<::bevy_ui::LinearGradient> = <::bevy_ui::LinearGradient as ::std::clone::Clone>::clone( - &_self, + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::top_right( + x.into_inner(), + y.into_inner(), ) .into(); output @@ -2335,40 +2210,44 @@ pub(crate) fn register_linear_gradient_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Position relative to the top-right corner", + &["x", "y"], ) .register_documented( - "eq", - | - _self: Ref<::bevy_ui::LinearGradient>, - other: Ref<::bevy_ui::LinearGradient>| - { - let output: bool = { + "with_anchor", + |_self: Val<::bevy_ui::UiPosition>, anchor: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_ui::UiPosition> = { { - let output: bool = <::bevy_ui::LinearGradient as ::std::cmp::PartialEq< - ::bevy_ui::LinearGradient, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::with_anchor( + _self.into_inner(), + anchor.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], - ) + " Creates a position from self with the given `anchor` point", + &["_self", "anchor"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_ui::UiPosition, bevy_mod_scripting_bindings::MarkAsGenerated>( + ); +} +pub(crate) fn register_val_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::Val, + >::new(world) .register_documented( - "in_color_space", - | - _self: Val<::bevy_ui::LinearGradient>, - color_space: Val<::bevy_ui::InterpolationColorSpace>| - { - let output: Val<::bevy_ui::LinearGradient> = { + "all", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::LinearGradient> = ::bevy_ui::LinearGradient::in_color_space( + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::all( _self.into_inner(), - color_space.into_inner(), ) .into(); output @@ -2376,28 +2255,16 @@ pub(crate) fn register_linear_gradient_functions(world: &mut World) { }; output }, - "", - &["_self", "color_space"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::LinearGradient, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_interpolation_color_space_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::InterpolationColorSpace, - >::new(world) + " Returns a [`UiRect`] with all its fields equal to this value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).all();\n assert_eq!(ui_rect.left, Val::Px(1.));\n assert_eq!(ui_rect.right, Val::Px(1.));\n assert_eq!(ui_rect.top, Val::Px(1.));\n assert_eq!(ui_rect.bottom, Val::Px(1.));\n ```", + &["_self"], + ) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ui::InterpolationColorSpace>| { - let output: () = { + "bottom", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: () = <::bevy_ui::InterpolationColorSpace as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::bottom( + _self.into_inner(), ) .into(); output @@ -2405,15 +2272,15 @@ pub(crate) fn register_interpolation_color_space_functions(world: &mut World) { }; output }, - "", + " Returns a [`UiRect`] with its `bottom` equal to this value,\n and all other fields set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).bottom();\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::Px(1.));\n ```", &["_self"], ) .register_documented( "clone", - |_self: Ref<::bevy_ui::InterpolationColorSpace>| { - let output: Val<::bevy_ui::InterpolationColorSpace> = { + |_self: Ref<::bevy_ui::Val>| { + let output: Val<::bevy_ui::Val> = { { - let output: Val<::bevy_ui::InterpolationColorSpace> = <::bevy_ui::InterpolationColorSpace as ::std::clone::Clone>::clone( + let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2426,16 +2293,13 @@ pub(crate) fn register_interpolation_color_space_functions(world: &mut World) { &["_self"], ) .register_documented( - "eq", - | - _self: Ref<::bevy_ui::InterpolationColorSpace>, - other: Ref<::bevy_ui::InterpolationColorSpace>| - { - let output: bool = { + "div", + |_self: Val<::bevy_ui::Val>, rhs: f32| { + let output: Val<::bevy_ui::Val> = { { - let output: bool = <::bevy_ui::InterpolationColorSpace as ::std::cmp::PartialEq< - ::bevy_ui::InterpolationColorSpace, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) .into(); output } @@ -2443,28 +2307,16 @@ pub(crate) fn register_interpolation_color_space_functions(world: &mut World) { output }, "", - &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::InterpolationColorSpace, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_radial_gradient_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::RadialGradient, - >::new(world) + &["_self", "rhs"], + ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::RadialGradient>| { - let output: Val<::bevy_ui::RadialGradient> = { + "eq", + |_self: Ref<::bevy_ui::Val>, other: Ref<::bevy_ui::Val>| { + let output: bool = { { - let output: Val<::bevy_ui::RadialGradient> = <::bevy_ui::RadialGradient as ::std::clone::Clone>::clone( - &_self, - ) + let output: bool = <::bevy_ui::Val as ::std::cmp::PartialEq< + ::bevy_ui::Val, + >>::eq(&_self, &other) .into(); output } @@ -2472,39 +2324,32 @@ pub(crate) fn register_radial_gradient_functions(world: &mut World) { output }, "", - &["_self"], + &["_self", "other"], ) .register_documented( - "eq", - | - _self: Ref<::bevy_ui::RadialGradient>, - other: Ref<::bevy_ui::RadialGradient>| - { - let output: bool = { + "horizontal", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: bool = <::bevy_ui::RadialGradient as ::std::cmp::PartialEq< - ::bevy_ui::RadialGradient, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::horizontal( + _self.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], + " Returns a [`UiRect`] with all its `left` and `right` equal to this value,\n and its `top` and `bottom` set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).horizontal();\n assert_eq!(ui_rect.left, Val::Px(1.));\n assert_eq!(ui_rect.right, Val::Px(1.));\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", + &["_self"], ) .register_documented( - "in_color_space", - | - _self: Val<::bevy_ui::RadialGradient>, - color_space: Val<::bevy_ui::InterpolationColorSpace>| - { - let output: Val<::bevy_ui::RadialGradient> = { + "left", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::RadialGradient> = ::bevy_ui::RadialGradient::in_color_space( + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::left( _self.into_inner(), - color_space.into_inner(), ) .into(); output @@ -2512,105 +2357,17 @@ pub(crate) fn register_radial_gradient_functions(world: &mut World) { }; output }, - "", - &["_self", "color_space"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::RadialGradient, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_radial_gradient_shape_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::RadialGradientShape, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::RadialGradientShape>| { - let output: Val<::bevy_ui::RadialGradientShape> = { - { - let output: Val<::bevy_ui::RadialGradientShape> = - <::bevy_ui::RadialGradientShape as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_ui::RadialGradientShape>, other: Ref<::bevy_ui::RadialGradientShape>| { - let output: bool = { - { - let output: bool = <::bevy_ui::RadialGradientShape as ::std::cmp::PartialEq< - ::bevy_ui::RadialGradientShape, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "resolve", - |_self: Val<::bevy_ui::RadialGradientShape>, - position: Val<::bevy_math::Vec2>, - scale_factor: f32, - physical_size: Val<::bevy_math::Vec2>, - physical_target_size: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_math::Vec2> = { - { - let output: Val<::bevy_math::Vec2> = ::bevy_ui::RadialGradientShape::resolve( - _self.into_inner(), - position.into_inner(), - scale_factor, - physical_size.into_inner(), - physical_target_size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Resolve the physical dimensions of the end shape of the radial gradient", - &[ - "_self", - "position", - "scale_factor", - "physical_size", - "physical_target_size", - ], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::RadialGradientShape, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_conic_gradient_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::ConicGradient, - >::new(world) + " Returns a [`UiRect`] with its `left` equal to this value,\n and all other fields set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).left();\n assert_eq!(ui_rect.left, Val::Px(1.));\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", + &["_self"], + ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::ConicGradient>| { - let output: Val<::bevy_ui::ConicGradient> = { + "mul", + |_self: Val<::bevy_ui::Val>, rhs: f32| { + let output: Val<::bevy_ui::Val> = { { - let output: Val<::bevy_ui::ConicGradient> = <::bevy_ui::ConicGradient as ::std::clone::Clone>::clone( - &_self, - ) + let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) .into(); output } @@ -2618,16 +2375,16 @@ pub(crate) fn register_conic_gradient_functions(world: &mut World) { output }, "", - &["_self"], + &["_self", "rhs"], ) .register_documented( - "eq", - |_self: Ref<::bevy_ui::ConicGradient>, other: Ref<::bevy_ui::ConicGradient>| { - let output: bool = { + "neg", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::Val> = { { - let output: bool = <::bevy_ui::ConicGradient as ::std::cmp::PartialEq< - ::bevy_ui::ConicGradient, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::ops::Neg>::neg( + _self.into_inner(), + ) .into(); output } @@ -2635,19 +2392,15 @@ pub(crate) fn register_conic_gradient_functions(world: &mut World) { output }, "", - &["_self", "other"], + &["_self"], ) .register_documented( - "in_color_space", - | - _self: Val<::bevy_ui::ConicGradient>, - color_space: Val<::bevy_ui::InterpolationColorSpace>| - { - let output: Val<::bevy_ui::ConicGradient> = { + "right", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::ConicGradient> = ::bevy_ui::ConicGradient::in_color_space( + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::right( _self.into_inner(), - color_space.into_inner(), ) .into(); output @@ -2655,17 +2408,16 @@ pub(crate) fn register_conic_gradient_functions(world: &mut World) { }; output }, - "", - &["_self", "color_space"], + " Returns a [`UiRect`] with its `right` equal to this value,\n and all other fields set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).right();\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::Px(1.));\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", + &["_self"], ) .register_documented( - "with_position", - |_self: Val<::bevy_ui::ConicGradient>, position: Val<::bevy_ui::UiPosition>| { - let output: Val<::bevy_ui::ConicGradient> = { + "top", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::ConicGradient> = ::bevy_ui::ConicGradient::with_position( + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::top( _self.into_inner(), - position.into_inner(), ) .into(); output @@ -2673,17 +2425,16 @@ pub(crate) fn register_conic_gradient_functions(world: &mut World) { }; output }, - " Sets the position of the gradient", - &["_self", "position"], + " Returns a [`UiRect`] with its `top` equal to this value,\n and all other fields set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).top();\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::Px(1.));\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", + &["_self"], ) .register_documented( - "with_start", - |_self: Val<::bevy_ui::ConicGradient>, start: f32| { - let output: Val<::bevy_ui::ConicGradient> = { + "vertical", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::ConicGradient> = ::bevy_ui::ConicGradient::with_start( + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::vertical( _self.into_inner(), - start, ) .into(); output @@ -2691,127 +2442,23 @@ pub(crate) fn register_conic_gradient_functions(world: &mut World) { }; output }, - " Sets the starting angle of the gradient in radians", - &["_self", "start"], + " Returns a [`UiRect`] with all its `top` and `bottom` equal to this value,\n and its `left` and `right` set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = Val::Px(1.).vertical();\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::Px(1.));\n assert_eq!(ui_rect.bottom, Val::Px(1.));\n ```", + &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::ConicGradient, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); + registry.register_type_data::<::bevy_ui::Val, bevy_mod_scripting_bindings::MarkAsGenerated>(); } -pub(crate) fn register_gradient_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::bevy_ui::Gradient>::new( - world, - ) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::Gradient>| { - let output: Val<::bevy_ui::Gradient> = { - { - let output: Val<::bevy_ui::Gradient> = - <::bevy_ui::Gradient as ::std::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_ui::Gradient>, other: Ref<::bevy_ui::Gradient>| { - let output: bool = { - { - let output: bool = <::bevy_ui::Gradient as ::std::cmp::PartialEq< - ::bevy_ui::Gradient, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "is_empty", - |_self: Ref<::bevy_ui::Gradient>| { - let output: bool = { - { - let output: bool = ::bevy_ui::Gradient::is_empty(&_self).into(); - output - } - }; - output - }, - " Returns true if the gradient has no stops.", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::<::bevy_ui::Gradient, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} -pub(crate) fn register_background_gradient_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::BackgroundGradient, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::BackgroundGradient>| { - let output: Val<::bevy_ui::BackgroundGradient> = { - { - let output: Val<::bevy_ui::BackgroundGradient> = - <::bevy_ui::BackgroundGradient as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_ui::BackgroundGradient>, other: Ref<::bevy_ui::BackgroundGradient>| { - let output: bool = { - { - let output: bool = <::bevy_ui::BackgroundGradient as ::std::cmp::PartialEq< - ::bevy_ui::BackgroundGradient, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::BackgroundGradient, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_border_gradient_functions(world: &mut World) { +pub(crate) fn register_color_stop_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::BorderGradient, + ::bevy_ui::ColorStop, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_ui::BorderGradient>| { - let output: Val<::bevy_ui::BorderGradient> = { + |_self: Ref<::bevy_ui::ColorStop>| { + let output: Val<::bevy_ui::ColorStop> = { { - let output: Val<::bevy_ui::BorderGradient> = <::bevy_ui::BorderGradient as ::std::clone::Clone>::clone( + let output: Val<::bevy_ui::ColorStop> = <::bevy_ui::ColorStop as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2825,14 +2472,11 @@ pub(crate) fn register_border_gradient_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_ui::BorderGradient>, - other: Ref<::bevy_ui::BorderGradient>| - { + |_self: Ref<::bevy_ui::ColorStop>, other: Ref<::bevy_ui::ColorStop>| { let output: bool = { { - let output: bool = <::bevy_ui::BorderGradient as ::std::cmp::PartialEq< - ::bevy_ui::BorderGradient, + let output: bool = <::bevy_ui::ColorStop as ::std::cmp::PartialEq< + ::bevy_ui::ColorStop, >>::eq(&_self, &other) .into(); output @@ -2842,25 +2486,40 @@ pub(crate) fn register_border_gradient_functions(world: &mut World) { }, "", &["_self", "other"], + ) + .register_documented( + "with_hint", + |_self: Val<::bevy_ui::ColorStop>, hint: f32| { + let output: Val<::bevy_ui::ColorStop> = { + { + let output: Val<::bevy_ui::ColorStop> = ::bevy_ui::ColorStop::with_hint( + _self.into_inner(), + hint, + ) + .into(); + output + } + }; + output + }, + "", + &["_self", "hint"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::< - ::bevy_ui::BorderGradient, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); + .register_type_data::<::bevy_ui::ColorStop, bevy_mod_scripting_bindings::MarkAsGenerated>(); } -pub(crate) fn register_val_2_functions(world: &mut World) { +pub(crate) fn register_angular_color_stop_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::Val2, + ::bevy_ui::AngularColorStop, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_ui::Val2>| { - let output: Val<::bevy_ui::Val2> = { + |_self: Ref<::bevy_ui::AngularColorStop>| { + let output: Val<::bevy_ui::AngularColorStop> = { { - let output: Val<::bevy_ui::Val2> = <::bevy_ui::Val2 as ::std::clone::Clone>::clone( + let output: Val<::bevy_ui::AngularColorStop> = <::bevy_ui::AngularColorStop as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2874,11 +2533,14 @@ pub(crate) fn register_val_2_functions(world: &mut World) { ) .register_documented( "eq", - |_self: Ref<::bevy_ui::Val2>, other: Ref<::bevy_ui::Val2>| { + | + _self: Ref<::bevy_ui::AngularColorStop>, + other: Ref<::bevy_ui::AngularColorStop>| + { let output: bool = { { - let output: bool = <::bevy_ui::Val2 as ::std::cmp::PartialEq< - ::bevy_ui::Val2, + let output: bool = <::bevy_ui::AngularColorStop as ::std::cmp::PartialEq< + ::bevy_ui::AngularColorStop, >>::eq(&_self, &other) .into(); output @@ -2890,13 +2552,13 @@ pub(crate) fn register_val_2_functions(world: &mut World) { &["_self", "other"], ) .register_documented( - "new", - |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::Val2> = { + "with_hint", + |_self: Val<::bevy_ui::AngularColorStop>, hint: f32| { + let output: Val<::bevy_ui::AngularColorStop> = { { - let output: Val<::bevy_ui::Val2> = ::bevy_ui::Val2::new( - x.into_inner(), - y.into_inner(), + let output: Val<::bevy_ui::AngularColorStop> = ::bevy_ui::AngularColorStop::with_hint( + _self.into_inner(), + hint, ) .into(); output @@ -2904,54 +2566,69 @@ pub(crate) fn register_val_2_functions(world: &mut World) { }; output }, - " Creates a new [`Val2`]", - &["x", "y"], - ) + "", + &["_self", "hint"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::AngularColorStop, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_linear_gradient_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::LinearGradient, + >::new(world) .register_documented( - "percent", - |x: f32, y: f32| { - let output: Val<::bevy_ui::Val2> = { + "clone", + |_self: Ref<::bevy_ui::LinearGradient>| { + let output: Val<::bevy_ui::LinearGradient> = { { - let output: Val<::bevy_ui::Val2> = ::bevy_ui::Val2::percent(x, y) + let output: Val<::bevy_ui::LinearGradient> = <::bevy_ui::LinearGradient as ::std::clone::Clone>::clone( + &_self, + ) .into(); output } }; output }, - " Creates a new [`Val2`] where both components are percentage values", - &["x", "y"], + "", + &["_self"], ) .register_documented( - "px", - |x: f32, y: f32| { - let output: Val<::bevy_ui::Val2> = { + "eq", + | + _self: Ref<::bevy_ui::LinearGradient>, + other: Ref<::bevy_ui::LinearGradient>| + { + let output: bool = { { - let output: Val<::bevy_ui::Val2> = ::bevy_ui::Val2::px(x, y) + let output: bool = <::bevy_ui::LinearGradient as ::std::cmp::PartialEq< + ::bevy_ui::LinearGradient, + >>::eq(&_self, &other) .into(); output } }; output }, - " Creates a new [`Val2`] where both components are in logical pixels", - &["x", "y"], + "", + &["_self", "other"], ) .register_documented( - "resolve", + "in_color_space", | - _self: Ref<::bevy_ui::Val2>, - scale_factor: f32, - base_size: Val<::bevy_math::Vec2>, - viewport_size: Val<::bevy_math::Vec2>| + _self: Val<::bevy_ui::LinearGradient>, + color_space: Val<::bevy_ui::InterpolationColorSpace>| { - let output: Val<::bevy_math::Vec2> = { + let output: Val<::bevy_ui::LinearGradient> = { { - let output: Val<::bevy_math::Vec2> = ::bevy_ui::Val2::resolve( - &_self, - scale_factor, - base_size.into_inner(), - viewport_size.into_inner(), + let output: Val<::bevy_ui::LinearGradient> = ::bevy_ui::LinearGradient::in_color_space( + _self.into_inner(), + color_space.into_inner(), ) .into(); output @@ -2959,23 +2636,27 @@ pub(crate) fn register_val_2_functions(world: &mut World) { }; output }, - " Resolves this [`Val2`] from the given `scale_factor`, `parent_size`,\n and `viewport_size`.\n Component values of [`Val::Auto`] are resolved to 0.", - &["_self", "scale_factor", "base_size", "viewport_size"], + "", + &["_self", "color_space"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); - registry.register_type_data::<::bevy_ui::Val2, bevy_mod_scripting_bindings::MarkAsGenerated>(); + registry + .register_type_data::< + ::bevy_ui::LinearGradient, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } -pub(crate) fn register_ui_transform_functions(world: &mut World) { +pub(crate) fn register_interpolation_color_space_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::UiTransform, + ::bevy_ui::InterpolationColorSpace, >::new(world) .register_documented( - "clone", - |_self: Ref<::bevy_ui::UiTransform>| { - let output: Val<::bevy_ui::UiTransform> = { + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::InterpolationColorSpace>| { + let output: () = { { - let output: Val<::bevy_ui::UiTransform> = <::bevy_ui::UiTransform as ::std::clone::Clone>::clone( + let output: () = <::bevy_ui::InterpolationColorSpace as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -2988,20 +2669,12 @@ pub(crate) fn register_ui_transform_functions(world: &mut World) { &["_self"], ) .register_documented( - "compute_affine", - | - _self: Ref<::bevy_ui::UiTransform>, - scale_factor: f32, - base_size: Val<::bevy_math::Vec2>, - target_size: Val<::bevy_math::Vec2>| - { - let output: Val<::bevy_math::Affine2> = { + "clone", + |_self: Ref<::bevy_ui::InterpolationColorSpace>| { + let output: Val<::bevy_ui::InterpolationColorSpace> = { { - let output: Val<::bevy_math::Affine2> = ::bevy_ui::UiTransform::compute_affine( + let output: Val<::bevy_ui::InterpolationColorSpace> = <::bevy_ui::InterpolationColorSpace as ::std::clone::Clone>::clone( &_self, - scale_factor, - base_size.into_inner(), - target_size.into_inner(), ) .into(); output @@ -3009,16 +2682,19 @@ pub(crate) fn register_ui_transform_functions(world: &mut World) { }; output }, - " Resolves the translation from the given `scale_factor`, `base_value`, and `target_size`\n and returns a 2d affine transform from the resolved translation, and the `UiTransform`'s rotation, and scale.", - &["_self", "scale_factor", "base_size", "target_size"], + "", + &["_self"], ) .register_documented( "eq", - |_self: Ref<::bevy_ui::UiTransform>, other: Ref<::bevy_ui::UiTransform>| { + | + _self: Ref<::bevy_ui::InterpolationColorSpace>, + other: Ref<::bevy_ui::InterpolationColorSpace>| + { let output: bool = { { - let output: bool = <::bevy_ui::UiTransform as ::std::cmp::PartialEq< - ::bevy_ui::UiTransform, + let output: bool = <::bevy_ui::InterpolationColorSpace as ::std::cmp::PartialEq< + ::bevy_ui::InterpolationColorSpace, >>::eq(&_self, &other) .into(); output @@ -3028,14 +2704,26 @@ pub(crate) fn register_ui_transform_functions(world: &mut World) { }, "", &["_self", "other"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::InterpolationColorSpace, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_radial_gradient_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::RadialGradient, + >::new(world) .register_documented( - "from_rotation", - |rotation: Val<::bevy_math::Rot2>| { - let output: Val<::bevy_ui::UiTransform> = { + "clone", + |_self: Ref<::bevy_ui::RadialGradient>| { + let output: Val<::bevy_ui::RadialGradient> = { { - let output: Val<::bevy_ui::UiTransform> = ::bevy_ui::UiTransform::from_rotation( - rotation.into_inner(), + let output: Val<::bevy_ui::RadialGradient> = <::bevy_ui::RadialGradient as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -3043,33 +2731,40 @@ pub(crate) fn register_ui_transform_functions(world: &mut World) { }; output }, - " Creates a UI transform representing a rotation.", - &["rotation"], + "", + &["_self"], ) .register_documented( - "from_scale", - |scale: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_ui::UiTransform> = { + "eq", + | + _self: Ref<::bevy_ui::RadialGradient>, + other: Ref<::bevy_ui::RadialGradient>| + { + let output: bool = { { - let output: Val<::bevy_ui::UiTransform> = ::bevy_ui::UiTransform::from_scale( - scale.into_inner(), - ) + let output: bool = <::bevy_ui::RadialGradient as ::std::cmp::PartialEq< + ::bevy_ui::RadialGradient, + >>::eq(&_self, &other) .into(); output } }; output }, - " Creates a UI transform representing a scaling.", - &["scale"], + "", + &["_self", "other"], ) .register_documented( - "from_translation", - |translation: Val<::bevy_ui::Val2>| { - let output: Val<::bevy_ui::UiTransform> = { + "in_color_space", + | + _self: Val<::bevy_ui::RadialGradient>, + color_space: Val<::bevy_ui::InterpolationColorSpace>| + { + let output: Val<::bevy_ui::RadialGradient> = { { - let output: Val<::bevy_ui::UiTransform> = ::bevy_ui::UiTransform::from_translation( - translation.into_inner(), + let output: Val<::bevy_ui::RadialGradient> = ::bevy_ui::RadialGradient::in_color_space( + _self.into_inner(), + color_space.into_inner(), ) .into(); output @@ -3077,26 +2772,28 @@ pub(crate) fn register_ui_transform_functions(world: &mut World) { }; output }, - " Creates a UI transform representing a responsive translation.", - &["translation"], + "", + &["_self", "color_space"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_ui::UiTransform, bevy_mod_scripting_bindings::MarkAsGenerated>( - ); + .register_type_data::< + ::bevy_ui::RadialGradient, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } -pub(crate) fn register_relative_cursor_position_functions(world: &mut World) { +pub(crate) fn register_radial_gradient_shape_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::RelativeCursorPosition, + ::bevy_ui::RadialGradientShape, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_ui::RelativeCursorPosition>| { - let output: Val<::bevy_ui::RelativeCursorPosition> = { + |_self: Ref<::bevy_ui::RadialGradientShape>| { + let output: Val<::bevy_ui::RadialGradientShape> = { { - let output: Val<::bevy_ui::RelativeCursorPosition> = - <::bevy_ui::RelativeCursorPosition as ::std::clone::Clone>::clone(&_self) + let output: Val<::bevy_ui::RadialGradientShape> = + <::bevy_ui::RadialGradientShape as ::std::clone::Clone>::clone(&_self) .into(); output } @@ -3107,109 +2804,71 @@ pub(crate) fn register_relative_cursor_position_functions(world: &mut World) { &["_self"], ) .register_documented( - "cursor_over", - |_self: Ref<::bevy_ui::RelativeCursorPosition>| { + "eq", + |_self: Ref<::bevy_ui::RadialGradientShape>, other: Ref<::bevy_ui::RadialGradientShape>| { let output: bool = { { - let output: bool = - ::bevy_ui::RelativeCursorPosition::cursor_over(&_self).into(); + let output: bool = <::bevy_ui::RadialGradientShape as ::std::cmp::PartialEq< + ::bevy_ui::RadialGradientShape, + >>::eq(&_self, &other) + .into(); output } }; output }, - " A helper function to check if the mouse is over the node", - &["_self"], + "", + &["_self", "other"], ) .register_documented( - "eq", - |_self: Ref<::bevy_ui::RelativeCursorPosition>, - other: Ref<::bevy_ui::RelativeCursorPosition>| { - let output: bool = { + "resolve", + |_self: Val<::bevy_ui::RadialGradientShape>, + position: Val<::bevy_math::Vec2>, + scale_factor: f32, + physical_size: Val<::bevy_math::Vec2>, + physical_target_size: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Vec2> = { { - let output: bool = - <::bevy_ui::RelativeCursorPosition as ::std::cmp::PartialEq< - ::bevy_ui::RelativeCursorPosition, - >>::eq(&_self, &other) - .into(); + let output: Val<::bevy_math::Vec2> = ::bevy_ui::RadialGradientShape::resolve( + _self.into_inner(), + position.into_inner(), + scale_factor, + physical_size.into_inner(), + physical_target_size.into_inner(), + ) + .into(); output } }; output }, - "", - &["_self", "other"], + " Resolve the physical dimensions of the end shape of the radial gradient", + &[ + "_self", + "position", + "scale_factor", + "physical_size", + "physical_target_size", + ], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ui::RelativeCursorPosition, + ::bevy_ui::RadialGradientShape, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_ui_rect_functions(world: &mut World) { +pub(crate) fn register_conic_gradient_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::UiRect, + ::bevy_ui::ConicGradient, >::new(world) - .register_documented( - "all", - |value: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { - { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::all( - value.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new [`UiRect`] where all sides have the same value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::all(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::Px(10.0));\n assert_eq!(ui_rect.top, Val::Px(10.0));\n assert_eq!(ui_rect.bottom, Val::Px(10.0));\n ```", - &["value"], - ) - .register_documented( - "axes", - |horizontal: Val<::bevy_ui::Val>, vertical: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { - { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::axes( - horizontal.into_inner(), - vertical.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new [`UiRect`] where both `left` and `right` take the value of `horizontal`, and both `top` and `bottom` take the value of `vertical`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::axes(Val::Px(10.0), Val::Percent(15.0));\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::Px(10.0));\n assert_eq!(ui_rect.top, Val::Percent(15.0));\n assert_eq!(ui_rect.bottom, Val::Percent(15.0));\n ```", - &["horizontal", "vertical"], - ) - .register_documented( - "bottom", - |bottom: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { - { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::bottom( - bottom.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new [`UiRect`] where `bottom` takes the given value,\n and the other fields are set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::bottom(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::Px(10.0));\n ```", - &["bottom"], - ) .register_documented( "clone", - |_self: Ref<::bevy_ui::UiRect>| { - let output: Val<::bevy_ui::UiRect> = { + |_self: Ref<::bevy_ui::ConicGradient>| { + let output: Val<::bevy_ui::ConicGradient> = { { - let output: Val<::bevy_ui::UiRect> = <::bevy_ui::UiRect as ::std::clone::Clone>::clone( + let output: Val<::bevy_ui::ConicGradient> = <::bevy_ui::ConicGradient as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -3223,11 +2882,11 @@ pub(crate) fn register_ui_rect_functions(world: &mut World) { ) .register_documented( "eq", - |_self: Ref<::bevy_ui::UiRect>, other: Ref<::bevy_ui::UiRect>| { + |_self: Ref<::bevy_ui::ConicGradient>, other: Ref<::bevy_ui::ConicGradient>| { let output: bool = { { - let output: bool = <::bevy_ui::UiRect as ::std::cmp::PartialEq< - ::bevy_ui::UiRect, + let output: bool = <::bevy_ui::ConicGradient as ::std::cmp::PartialEq< + ::bevy_ui::ConicGradient, >>::eq(&_self, &other) .into(); output @@ -3239,12 +2898,16 @@ pub(crate) fn register_ui_rect_functions(world: &mut World) { &["_self", "other"], ) .register_documented( - "horizontal", - |value: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "in_color_space", + | + _self: Val<::bevy_ui::ConicGradient>, + color_space: Val<::bevy_ui::InterpolationColorSpace>| + { + let output: Val<::bevy_ui::ConicGradient> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::horizontal( - value.into_inner(), + let output: Val<::bevy_ui::ConicGradient> = ::bevy_ui::ConicGradient::in_color_space( + _self.into_inner(), + color_space.into_inner(), ) .into(); output @@ -3252,16 +2915,17 @@ pub(crate) fn register_ui_rect_functions(world: &mut World) { }; output }, - " Creates a new [`UiRect`] where `left` and `right` take the given value,\n and `top` and `bottom` set to zero `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::horizontal(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::Px(10.0));\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", - &["value"], + "", + &["_self", "color_space"], ) .register_documented( - "left", - |left: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "with_position", + |_self: Val<::bevy_ui::ConicGradient>, position: Val<::bevy_ui::UiPosition>| { + let output: Val<::bevy_ui::ConicGradient> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::left( - left.into_inner(), + let output: Val<::bevy_ui::ConicGradient> = ::bevy_ui::ConicGradient::with_position( + _self.into_inner(), + position.into_inner(), ) .into(); output @@ -3269,24 +2933,17 @@ pub(crate) fn register_ui_rect_functions(world: &mut World) { }; output }, - " Creates a new [`UiRect`] where `left` takes the given value, and\n the other fields are set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::left(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", - &["left"], + " Sets the position of the gradient", + &["_self", "position"], ) .register_documented( - "new", - | - left: Val<::bevy_ui::Val>, - right: Val<::bevy_ui::Val>, - top: Val<::bevy_ui::Val>, - bottom: Val<::bevy_ui::Val>| - { - let output: Val<::bevy_ui::UiRect> = { + "with_start", + |_self: Val<::bevy_ui::ConicGradient>, start: f32| { + let output: Val<::bevy_ui::ConicGradient> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::new( - left.into_inner(), - right.into_inner(), - top.into_inner(), - bottom.into_inner(), + let output: Val<::bevy_ui::ConicGradient> = ::bevy_ui::ConicGradient::with_start( + _self.into_inner(), + start, ) .into(); output @@ -3294,19 +2951,128 @@ pub(crate) fn register_ui_rect_functions(world: &mut World) { }; output }, - " Creates a new [`UiRect`] from the values specified.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::new(\n Val::Px(10.0),\n Val::Px(20.0),\n Val::Px(30.0),\n Val::Px(40.0),\n );\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::Px(20.0));\n assert_eq!(ui_rect.top, Val::Px(30.0));\n assert_eq!(ui_rect.bottom, Val::Px(40.0));\n ```", - &["left", "right", "top", "bottom"], - ) + " Sets the starting angle of the gradient in radians", + &["_self", "start"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::ConicGradient, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_gradient_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::bevy_ui::Gradient>::new( + world, + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::Gradient>| { + let output: Val<::bevy_ui::Gradient> = { + { + let output: Val<::bevy_ui::Gradient> = + <::bevy_ui::Gradient as ::std::clone::Clone>::clone(&_self).into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::Gradient>, other: Ref<::bevy_ui::Gradient>| { + let output: bool = { + { + let output: bool = <::bevy_ui::Gradient as ::std::cmp::PartialEq< + ::bevy_ui::Gradient, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "is_empty", + |_self: Ref<::bevy_ui::Gradient>| { + let output: bool = { + { + let output: bool = ::bevy_ui::Gradient::is_empty(&_self).into(); + output + } + }; + output + }, + " Returns true if the gradient has no stops.", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_ui::Gradient, bevy_mod_scripting_bindings::MarkAsGenerated>(); +} +pub(crate) fn register_background_gradient_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::BackgroundGradient, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::BackgroundGradient>| { + let output: Val<::bevy_ui::BackgroundGradient> = { + { + let output: Val<::bevy_ui::BackgroundGradient> = + <::bevy_ui::BackgroundGradient as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::BackgroundGradient>, other: Ref<::bevy_ui::BackgroundGradient>| { + let output: bool = { + { + let output: bool = <::bevy_ui::BackgroundGradient as ::std::cmp::PartialEq< + ::bevy_ui::BackgroundGradient, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::BackgroundGradient, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_border_gradient_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::BorderGradient, + >::new(world) .register_documented( - "percent", - |left: f32, right: f32, top: f32, bottom: f32| { - let output: Val<::bevy_ui::UiRect> = { + "clone", + |_self: Ref<::bevy_ui::BorderGradient>| { + let output: Val<::bevy_ui::BorderGradient> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::percent( - left, - right, - top, - bottom, + let output: Val<::bevy_ui::BorderGradient> = <::bevy_ui::BorderGradient as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -3314,36 +3080,48 @@ pub(crate) fn register_ui_rect_functions(world: &mut World) { }; output }, - " Creates a new [`UiRect`] from the values specified in percentages.\n This is a shortcut for [`UiRect::new()`], applying [`Val::Percent`] to all arguments.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::percent(5., 10., 2., 1.);\n assert_eq!(ui_rect.left, Val::Percent(5.));\n assert_eq!(ui_rect.right, Val::Percent(10.));\n assert_eq!(ui_rect.top, Val::Percent(2.));\n assert_eq!(ui_rect.bottom, Val::Percent(1.));\n ```", - &["left", "right", "top", "bottom"], + "", + &["_self"], ) .register_documented( - "px", - |left: f32, right: f32, top: f32, bottom: f32| { - let output: Val<::bevy_ui::UiRect> = { + "eq", + | + _self: Ref<::bevy_ui::BorderGradient>, + other: Ref<::bevy_ui::BorderGradient>| + { + let output: bool = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::px( - left, - right, - top, - bottom, - ) + let output: bool = <::bevy_ui::BorderGradient as ::std::cmp::PartialEq< + ::bevy_ui::BorderGradient, + >>::eq(&_self, &other) .into(); output } }; output }, - " Creates a new [`UiRect`] from the values specified in logical pixels.\n This is a shortcut for [`UiRect::new()`], applying [`Val::Px`] to all arguments.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::px(10., 20., 30., 40.);\n assert_eq!(ui_rect.left, Val::Px(10.));\n assert_eq!(ui_rect.right, Val::Px(20.));\n assert_eq!(ui_rect.top, Val::Px(30.));\n assert_eq!(ui_rect.bottom, Val::Px(40.));\n ```", - &["left", "right", "top", "bottom"], - ) + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::BorderGradient, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_val_2_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::Val2, + >::new(world) .register_documented( - "right", - |right: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "clone", + |_self: Ref<::bevy_ui::Val2>| { + let output: Val<::bevy_ui::Val2> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::right( - right.into_inner(), + let output: Val<::bevy_ui::Val2> = <::bevy_ui::Val2 as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -3351,33 +3129,34 @@ pub(crate) fn register_ui_rect_functions(world: &mut World) { }; output }, - " Creates a new [`UiRect`] where `right` takes the given value,\n and the other fields are set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::right(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::Px(10.0));\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", - &["right"], + "", + &["_self"], ) .register_documented( - "top", - |top: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "eq", + |_self: Ref<::bevy_ui::Val2>, other: Ref<::bevy_ui::Val2>| { + let output: bool = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::top( - top.into_inner(), - ) + let output: bool = <::bevy_ui::Val2 as ::std::cmp::PartialEq< + ::bevy_ui::Val2, + >>::eq(&_self, &other) .into(); output } }; output }, - " Creates a new [`UiRect`] where `top` takes the given value,\n and the other fields are set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::top(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::Px(10.0));\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", - &["top"], + "", + &["_self", "other"], ) .register_documented( - "vertical", - |value: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "new", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::Val2> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::vertical( - value.into_inner(), + let output: Val<::bevy_ui::Val2> = ::bevy_ui::Val2::new( + x.into_inner(), + y.into_inner(), ) .into(); output @@ -3385,71 +3164,54 @@ pub(crate) fn register_ui_rect_functions(world: &mut World) { }; output }, - " Creates a new [`UiRect`] where `top` and `bottom` take the given value,\n and `left` and `right` are set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::vertical(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::Px(10.0));\n assert_eq!(ui_rect.bottom, Val::Px(10.0));\n ```", - &["value"], + " Creates a new [`Val2`]", + &["x", "y"], ) .register_documented( - "with_bottom", - |_self: Val<::bevy_ui::UiRect>, bottom: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "percent", + |x: f32, y: f32| { + let output: Val<::bevy_ui::Val2> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_bottom( - _self.into_inner(), - bottom.into_inner(), - ) + let output: Val<::bevy_ui::Val2> = ::bevy_ui::Val2::percent(x, y) .into(); output } }; output }, - " Returns the [`UiRect`] with its `bottom` field set to the given value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::all(Val::Px(20.0)).with_bottom(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(20.0));\n assert_eq!(ui_rect.right, Val::Px(20.0));\n assert_eq!(ui_rect.top, Val::Px(20.0));\n assert_eq!(ui_rect.bottom, Val::Px(10.0));\n ```", - &["_self", "bottom"], + " Creates a new [`Val2`] where both components are percentage values", + &["x", "y"], ) .register_documented( - "with_left", - |_self: Val<::bevy_ui::UiRect>, left: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "px", + |x: f32, y: f32| { + let output: Val<::bevy_ui::Val2> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_left( - _self.into_inner(), - left.into_inner(), - ) + let output: Val<::bevy_ui::Val2> = ::bevy_ui::Val2::px(x, y) .into(); output } }; output }, - " Returns the [`UiRect`] with its `left` field set to the given value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::all(Val::Px(20.0)).with_left(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::Px(20.0));\n assert_eq!(ui_rect.top, Val::Px(20.0));\n assert_eq!(ui_rect.bottom, Val::Px(20.0));\n ```", - &["_self", "left"], + " Creates a new [`Val2`] where both components are in logical pixels", + &["x", "y"], ) .register_documented( - "with_right", - |_self: Val<::bevy_ui::UiRect>, right: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { - { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_right( - _self.into_inner(), - right.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the [`UiRect`] with its `right` field set to the given value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::all(Val::Px(20.0)).with_right(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(20.0));\n assert_eq!(ui_rect.right, Val::Px(10.0));\n assert_eq!(ui_rect.top, Val::Px(20.0));\n assert_eq!(ui_rect.bottom, Val::Px(20.0));\n ```", - &["_self", "right"], - ) - .register_documented( - "with_top", - |_self: Val<::bevy_ui::UiRect>, top: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::UiRect> = { + "resolve", + | + _self: Ref<::bevy_ui::Val2>, + scale_factor: f32, + base_size: Val<::bevy_math::Vec2>, + viewport_size: Val<::bevy_math::Vec2>| + { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_top( - _self.into_inner(), - top.into_inner(), + let output: Val<::bevy_math::Vec2> = ::bevy_ui::Val2::resolve( + &_self, + scale_factor, + base_size.into_inner(), + viewport_size.into_inner(), ) .into(); output @@ -3457,25 +3219,24 @@ pub(crate) fn register_ui_rect_functions(world: &mut World) { }; output }, - " Returns the [`UiRect`] with its `top` field set to the given value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::all(Val::Px(20.0)).with_top(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(20.0));\n assert_eq!(ui_rect.right, Val::Px(20.0));\n assert_eq!(ui_rect.top, Val::Px(10.0));\n assert_eq!(ui_rect.bottom, Val::Px(20.0));\n ```", - &["_self", "top"], + " Resolves this [`Val2`] from the given `scale_factor`, `parent_size`,\n and `viewport_size`.\n Component values of [`Val::Auto`] are resolved to 0.", + &["_self", "scale_factor", "base_size", "viewport_size"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); - registry - .register_type_data::<::bevy_ui::UiRect, bevy_mod_scripting_bindings::MarkAsGenerated>(); + registry.register_type_data::<::bevy_ui::Val2, bevy_mod_scripting_bindings::MarkAsGenerated>(); } -pub(crate) fn register_border_radius_functions(world: &mut World) { +pub(crate) fn register_ui_transform_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::BorderRadius, + ::bevy_ui::UiTransform, >::new(world) .register_documented( - "all", - |radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "clone", + |_self: Ref<::bevy_ui::UiTransform>| { + let output: Val<::bevy_ui::UiTransform> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::all( - radius.into_inner(), + let output: Val<::bevy_ui::UiTransform> = <::bevy_ui::UiTransform as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -3483,16 +3244,24 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Set all four corners to the same curvature.", - &["radius"], + "", + &["_self"], ) .register_documented( - "bottom", - |radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "compute_affine", + | + _self: Ref<::bevy_ui::UiTransform>, + scale_factor: f32, + base_size: Val<::bevy_math::Vec2>, + target_size: Val<::bevy_math::Vec2>| + { + let output: Val<::bevy_math::Affine2> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::bottom( - radius.into_inner(), + let output: Val<::bevy_math::Affine2> = ::bevy_ui::UiTransform::compute_affine( + &_self, + scale_factor, + base_size.into_inner(), + target_size.into_inner(), ) .into(); output @@ -3500,33 +3269,33 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Sets the radii for the bottom left and bottom right corners.\n Remaining corners will be right-angled.", - &["radius"], + " Resolves the translation from the given `scale_factor`, `base_value`, and `target_size`\n and returns a 2d affine transform from the resolved translation, and the `UiTransform`'s rotation, and scale.", + &["_self", "scale_factor", "base_size", "target_size"], ) .register_documented( - "bottom_left", - |radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "eq", + |_self: Ref<::bevy_ui::UiTransform>, other: Ref<::bevy_ui::UiTransform>| { + let output: bool = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::bottom_left( - radius.into_inner(), - ) + let output: bool = <::bevy_ui::UiTransform as ::std::cmp::PartialEq< + ::bevy_ui::UiTransform, + >>::eq(&_self, &other) .into(); output } }; output }, - " Sets the radius for the bottom left corner.\n Remaining corners will be right-angled.", - &["radius"], + "", + &["_self", "other"], ) .register_documented( - "bottom_right", - |radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "from_rotation", + |rotation: Val<::bevy_math::Rot2>| { + let output: Val<::bevy_ui::UiTransform> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::bottom_right( - radius.into_inner(), + let output: Val<::bevy_ui::UiTransform> = ::bevy_ui::UiTransform::from_rotation( + rotation.into_inner(), ) .into(); output @@ -3534,16 +3303,16 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Sets the radius for the bottom right corner.\n Remaining corners will be right-angled.", - &["radius"], + " Creates a UI transform representing a rotation.", + &["rotation"], ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::BorderRadius>| { - let output: Val<::bevy_ui::BorderRadius> = { + "from_scale", + |scale: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_ui::UiTransform> = { { - let output: Val<::bevy_ui::BorderRadius> = <::bevy_ui::BorderRadius as ::std::clone::Clone>::clone( - &_self, + let output: Val<::bevy_ui::UiTransform> = ::bevy_ui::UiTransform::from_scale( + scale.into_inner(), ) .into(); output @@ -3551,33 +3320,105 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Creates a UI transform representing a scaling.", + &["scale"], ) .register_documented( - "eq", - |_self: Ref<::bevy_ui::BorderRadius>, other: Ref<::bevy_ui::BorderRadius>| { - let output: bool = { + "from_translation", + |translation: Val<::bevy_ui::Val2>| { + let output: Val<::bevy_ui::UiTransform> = { { - let output: bool = <::bevy_ui::BorderRadius as ::std::cmp::PartialEq< - ::bevy_ui::BorderRadius, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::UiTransform> = ::bevy_ui::UiTransform::from_translation( + translation.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], - ) + " Creates a UI transform representing a responsive translation.", + &["translation"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_ui::UiTransform, bevy_mod_scripting_bindings::MarkAsGenerated>( + ); +} +pub(crate) fn register_relative_cursor_position_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::RelativeCursorPosition, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::RelativeCursorPosition>| { + let output: Val<::bevy_ui::RelativeCursorPosition> = { + { + let output: Val<::bevy_ui::RelativeCursorPosition> = + <::bevy_ui::RelativeCursorPosition as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "cursor_over", + |_self: Ref<::bevy_ui::RelativeCursorPosition>| { + let output: bool = { + { + let output: bool = + ::bevy_ui::RelativeCursorPosition::cursor_over(&_self).into(); + output + } + }; + output + }, + " A helper function to check if the mouse is over the node", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::RelativeCursorPosition>, + other: Ref<::bevy_ui::RelativeCursorPosition>| { + let output: bool = { + { + let output: bool = + <::bevy_ui::RelativeCursorPosition as ::std::cmp::PartialEq< + ::bevy_ui::RelativeCursorPosition, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::RelativeCursorPosition, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_ui_rect_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::UiRect, + >::new(world) .register_documented( - "left", - |radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "all", + |value: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::left( - radius.into_inner(), + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::all( + value.into_inner(), ) .into(); output @@ -3585,24 +3426,17 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Sets the radii for the top left and bottom left corners.\n Remaining corners will be right-angled.", - &["radius"], + " Creates a new [`UiRect`] where all sides have the same value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::all(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::Px(10.0));\n assert_eq!(ui_rect.top, Val::Px(10.0));\n assert_eq!(ui_rect.bottom, Val::Px(10.0));\n ```", + &["value"], ) .register_documented( - "new", - | - top_left: Val<::bevy_ui::Val>, - top_right: Val<::bevy_ui::Val>, - bottom_right: Val<::bevy_ui::Val>, - bottom_left: Val<::bevy_ui::Val>| - { - let output: Val<::bevy_ui::BorderRadius> = { + "axes", + |horizontal: Val<::bevy_ui::Val>, vertical: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::new( - top_left.into_inner(), - top_right.into_inner(), - bottom_right.into_inner(), - bottom_left.into_inner(), + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::axes( + horizontal.into_inner(), + vertical.into_inner(), ) .into(); output @@ -3610,19 +3444,16 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - "", - &["top_left", "top_right", "bottom_right", "bottom_left"], + " Creates a new [`UiRect`] where both `left` and `right` take the value of `horizontal`, and both `top` and `bottom` take the value of `vertical`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::axes(Val::Px(10.0), Val::Percent(15.0));\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::Px(10.0));\n assert_eq!(ui_rect.top, Val::Percent(15.0));\n assert_eq!(ui_rect.bottom, Val::Percent(15.0));\n ```", + &["horizontal", "vertical"], ) .register_documented( - "percent", - |top_left: f32, top_right: f32, bottom_right: f32, bottom_left: f32| { - let output: Val<::bevy_ui::BorderRadius> = { + "bottom", + |bottom: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::percent( - top_left, - top_right, - bottom_right, - bottom_left, + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::bottom( + bottom.into_inner(), ) .into(); output @@ -3630,19 +3461,16 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Sets the radii to percentage values.", - &["top_left", "top_right", "bottom_right", "bottom_left"], + " Creates a new [`UiRect`] where `bottom` takes the given value,\n and the other fields are set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::bottom(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::Px(10.0));\n ```", + &["bottom"], ) .register_documented( - "px", - |top_left: f32, top_right: f32, bottom_right: f32, bottom_left: f32| { - let output: Val<::bevy_ui::BorderRadius> = { + "clone", + |_self: Ref<::bevy_ui::UiRect>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::px( - top_left, - top_right, - bottom_right, - bottom_left, + let output: Val<::bevy_ui::UiRect> = <::bevy_ui::UiRect as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -3650,24 +3478,33 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Sets the radii to logical pixel values.", - &["top_left", "top_right", "bottom_right", "bottom_left"], + "", + &["_self"], ) .register_documented( - "resolve", - | - _self: Ref<::bevy_ui::BorderRadius>, - scale_factor: f32, - node_size: Val<::bevy_math::Vec2>, - viewport_size: Val<::bevy_math::Vec2>| - { - let output: Val<::bevy_ui::ResolvedBorderRadius> = { + "eq", + |_self: Ref<::bevy_ui::UiRect>, other: Ref<::bevy_ui::UiRect>| { + let output: bool = { { - let output: Val<::bevy_ui::ResolvedBorderRadius> = ::bevy_ui::BorderRadius::resolve( - &_self, - scale_factor, - node_size.into_inner(), - viewport_size.into_inner(), + let output: bool = <::bevy_ui::UiRect as ::std::cmp::PartialEq< + ::bevy_ui::UiRect, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "horizontal", + |value: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::horizontal( + value.into_inner(), ) .into(); output @@ -3675,24 +3512,16 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Resolve the border radii for the corners from the given context values.\n Returns the radii of the each corner in physical pixels.", - &["_self", "scale_factor", "node_size", "viewport_size"], + " Creates a new [`UiRect`] where `left` and `right` take the given value,\n and `top` and `bottom` set to zero `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::horizontal(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::Px(10.0));\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", + &["value"], ) .register_documented( - "resolve_single_corner", - | - radius: Val<::bevy_ui::Val>, - scale_factor: f32, - min_length: f32, - viewport_size: Val<::bevy_math::Vec2>| - { - let output: f32 = { + "left", + |left: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: f32 = ::bevy_ui::BorderRadius::resolve_single_corner( - radius.into_inner(), - scale_factor, - min_length, - viewport_size.into_inner(), + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::left( + left.into_inner(), ) .into(); output @@ -3700,16 +3529,24 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Resolve the border radius for a single corner from the given context values.\n Returns the radius of the corner in physical pixels.", - &["radius", "scale_factor", "min_length", "viewport_size"], + " Creates a new [`UiRect`] where `left` takes the given value, and\n the other fields are set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::left(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", + &["left"], ) .register_documented( - "right", - |radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "new", + | + left: Val<::bevy_ui::Val>, + right: Val<::bevy_ui::Val>, + top: Val<::bevy_ui::Val>, + bottom: Val<::bevy_ui::Val>| + { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::right( - radius.into_inner(), + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::new( + left.into_inner(), + right.into_inner(), + top.into_inner(), + bottom.into_inner(), ) .into(); output @@ -3717,16 +3554,19 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Sets the radii for the top right and bottom right corners.\n Remaining corners will be right-angled.", - &["radius"], + " Creates a new [`UiRect`] from the values specified.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::new(\n Val::Px(10.0),\n Val::Px(20.0),\n Val::Px(30.0),\n Val::Px(40.0),\n );\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::Px(20.0));\n assert_eq!(ui_rect.top, Val::Px(30.0));\n assert_eq!(ui_rect.bottom, Val::Px(40.0));\n ```", + &["left", "right", "top", "bottom"], ) .register_documented( - "top", - |radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "percent", + |left: f32, right: f32, top: f32, bottom: f32| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::top( - radius.into_inner(), + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::percent( + left, + right, + top, + bottom, ) .into(); output @@ -3734,16 +3574,19 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Sets the radii for the top left and top right corners.\n Remaining corners will be right-angled.", - &["radius"], + " Creates a new [`UiRect`] from the values specified in percentages.\n This is a shortcut for [`UiRect::new()`], applying [`Val::Percent`] to all arguments.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::percent(5., 10., 2., 1.);\n assert_eq!(ui_rect.left, Val::Percent(5.));\n assert_eq!(ui_rect.right, Val::Percent(10.));\n assert_eq!(ui_rect.top, Val::Percent(2.));\n assert_eq!(ui_rect.bottom, Val::Percent(1.));\n ```", + &["left", "right", "top", "bottom"], ) .register_documented( - "top_left", - |radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "px", + |left: f32, right: f32, top: f32, bottom: f32| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::top_left( - radius.into_inner(), + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::px( + left, + right, + top, + bottom, ) .into(); output @@ -3751,16 +3594,16 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Sets the radius for the top left corner.\n Remaining corners will be right-angled.", - &["radius"], + " Creates a new [`UiRect`] from the values specified in logical pixels.\n This is a shortcut for [`UiRect::new()`], applying [`Val::Px`] to all arguments.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::px(10., 20., 30., 40.);\n assert_eq!(ui_rect.left, Val::Px(10.));\n assert_eq!(ui_rect.right, Val::Px(20.));\n assert_eq!(ui_rect.top, Val::Px(30.));\n assert_eq!(ui_rect.bottom, Val::Px(40.));\n ```", + &["left", "right", "top", "bottom"], ) .register_documented( - "top_right", - |radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "right", + |right: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::top_right( - radius.into_inner(), + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::right( + right.into_inner(), ) .into(); output @@ -3768,17 +3611,16 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Sets the radius for the top right corner.\n Remaining corners will be right-angled.", - &["radius"], + " Creates a new [`UiRect`] where `right` takes the given value,\n and the other fields are set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::right(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::Px(10.0));\n assert_eq!(ui_rect.top, Val::ZERO);\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", + &["right"], ) .register_documented( - "with_bottom", - |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "top", + |top: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_bottom( - _self.into_inner(), - radius.into_inner(), + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::top( + top.into_inner(), ) .into(); output @@ -3786,17 +3628,16 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Returns the [`BorderRadius`] with its `bottom_left` and `bottom_right` fields set to the given value.", - &["_self", "radius"], + " Creates a new [`UiRect`] where `top` takes the given value,\n and the other fields are set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::top(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::Px(10.0));\n assert_eq!(ui_rect.bottom, Val::ZERO);\n ```", + &["top"], ) .register_documented( - "with_bottom_left", - |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "vertical", + |value: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_bottom_left( - _self.into_inner(), - radius.into_inner(), + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::vertical( + value.into_inner(), ) .into(); output @@ -3804,17 +3645,17 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Returns the [`BorderRadius`] with its `bottom_left` field set to the given value.", - &["_self", "radius"], + " Creates a new [`UiRect`] where `top` and `bottom` take the given value,\n and `left` and `right` are set to `Val::ZERO`.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::vertical(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::ZERO);\n assert_eq!(ui_rect.right, Val::ZERO);\n assert_eq!(ui_rect.top, Val::Px(10.0));\n assert_eq!(ui_rect.bottom, Val::Px(10.0));\n ```", + &["value"], ) .register_documented( - "with_bottom_right", - |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "with_bottom", + |_self: Val<::bevy_ui::UiRect>, bottom: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_bottom_right( + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_bottom( _self.into_inner(), - radius.into_inner(), + bottom.into_inner(), ) .into(); output @@ -3822,17 +3663,17 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Returns the [`BorderRadius`] with its `bottom_right` field set to the given value.", - &["_self", "radius"], + " Returns the [`UiRect`] with its `bottom` field set to the given value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::all(Val::Px(20.0)).with_bottom(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(20.0));\n assert_eq!(ui_rect.right, Val::Px(20.0));\n assert_eq!(ui_rect.top, Val::Px(20.0));\n assert_eq!(ui_rect.bottom, Val::Px(10.0));\n ```", + &["_self", "bottom"], ) .register_documented( "with_left", - |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + |_self: Val<::bevy_ui::UiRect>, left: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_left( + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_left( _self.into_inner(), - radius.into_inner(), + left.into_inner(), ) .into(); output @@ -3840,17 +3681,17 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Returns the [`BorderRadius`] with its `top_left` and `bottom_left` fields set to the given value.", - &["_self", "radius"], + " Returns the [`UiRect`] with its `left` field set to the given value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::all(Val::Px(20.0)).with_left(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(10.0));\n assert_eq!(ui_rect.right, Val::Px(20.0));\n assert_eq!(ui_rect.top, Val::Px(20.0));\n assert_eq!(ui_rect.bottom, Val::Px(20.0));\n ```", + &["_self", "left"], ) .register_documented( "with_right", - |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + |_self: Val<::bevy_ui::UiRect>, right: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_right( + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_right( _self.into_inner(), - radius.into_inner(), + right.into_inner(), ) .into(); output @@ -3858,17 +3699,17 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Returns the [`BorderRadius`] with its `top_right` and `bottom_right` fields set to the given value.", - &["_self", "radius"], + " Returns the [`UiRect`] with its `right` field set to the given value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::all(Val::Px(20.0)).with_right(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(20.0));\n assert_eq!(ui_rect.right, Val::Px(10.0));\n assert_eq!(ui_rect.top, Val::Px(20.0));\n assert_eq!(ui_rect.bottom, Val::Px(20.0));\n ```", + &["_self", "right"], ) .register_documented( "with_top", - |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + |_self: Val<::bevy_ui::UiRect>, top: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_top( + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_top( _self.into_inner(), - radius.into_inner(), + top.into_inner(), ) .into(); output @@ -3876,17 +3717,25 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Returns the [`BorderRadius`] with its `top_left` and `top_right` fields set to the given value.", - &["_self", "radius"], - ) + " Returns the [`UiRect`] with its `top` field set to the given value.\n # Example\n ```\n # use bevy_ui::{UiRect, Val};\n #\n let ui_rect = UiRect::all(Val::Px(20.0)).with_top(Val::Px(10.0));\n assert_eq!(ui_rect.left, Val::Px(20.0));\n assert_eq!(ui_rect.right, Val::Px(20.0));\n assert_eq!(ui_rect.top, Val::Px(10.0));\n assert_eq!(ui_rect.bottom, Val::Px(20.0));\n ```", + &["_self", "top"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_ui::UiRect, bevy_mod_scripting_bindings::MarkAsGenerated>(); +} +pub(crate) fn register_ignore_scroll_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::IgnoreScroll, + >::new(world) .register_documented( - "with_top_left", - |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { + "clone", + |_self: Ref<::bevy_ui::IgnoreScroll>| { + let output: Val<::bevy_ui::IgnoreScroll> = { { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_top_left( - _self.into_inner(), - radius.into_inner(), + let output: Val<::bevy_ui::IgnoreScroll> = <::bevy_ui::IgnoreScroll as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -3894,32 +3743,14 @@ pub(crate) fn register_border_radius_functions(world: &mut World) { }; output }, - " Returns the [`BorderRadius`] with its `top_left` field set to the given value.", - &["_self", "radius"], - ) - .register_documented( - "with_top_right", - |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { - let output: Val<::bevy_ui::BorderRadius> = { - { - let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_top_right( - _self.into_inner(), - radius.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns the [`BorderRadius`] with its `top_right` field set to the given value.", - &["_self", "radius"], + "", + &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ui::BorderRadius, + ::bevy_ui::IgnoreScroll, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -4736,12 +4567,801 @@ pub(crate) fn register_grid_placement_functions(world: &mut World) { &["_self"], ) .register_documented( - "get_start", - |_self: Val<::bevy_ui::GridPlacement>| { - let output: ::std::option::Option = { + "get_start", + |_self: Val<::bevy_ui::GridPlacement>| { + let output: ::std::option::Option = { + { + let output: ::std::option::Option = ::bevy_ui::GridPlacement::get_start( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the grid line at which the item should start, or `None` if not set.", + &["_self"], + ) + .register_documented( + "set_end", + |_self: Val<::bevy_ui::GridPlacement>, end: i16| { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::set_end( + _self.into_inner(), + end, + ) + .into(); + output + } + }; + output + }, + " Mutate the item, setting the `end` grid line\n # Panics\n Panics if `end` is `0`.", + &["_self", "end"], + ) + .register_documented( + "set_span", + |_self: Val<::bevy_ui::GridPlacement>, span: u16| { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::set_span( + _self.into_inner(), + span, + ) + .into(); + output + } + }; + output + }, + " Mutate the item, setting the number of tracks the item should `span`\n # Panics\n Panics if `span` is `0`.", + &["_self", "span"], + ) + .register_documented( + "set_start", + |_self: Val<::bevy_ui::GridPlacement>, start: i16| { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::set_start( + _self.into_inner(), + start, + ) + .into(); + output + } + }; + output + }, + " Mutate the item, setting the `start` grid line\n # Panics\n Panics if `start` is `0`.", + &["_self", "start"], + ) + .register_documented( + "span", + |span: u16| { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::span( + span, + ) + .into(); + output + } + }; + output + }, + " Place the grid item automatically, specifying how many tracks it should `span`.\n # Panics\n Panics if `span` is `0`.", + &["span"], + ) + .register_documented( + "start", + |start: i16| { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::start( + start, + ) + .into(); + output + } + }; + output + }, + " Place the grid item specifying the `start` grid line (letting the `span` default to `1`).\n # Panics\n Panics if `start` is `0`.", + &["start"], + ) + .register_documented( + "start_end", + |start: i16, end: i16| { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::start_end( + start, + end, + ) + .into(); + output + } + }; + output + }, + " Place the grid item specifying `start` and `end` grid lines (`span` will be inferred)\n # Panics\n Panics if `start` or `end` is `0`.", + &["start", "end"], + ) + .register_documented( + "start_span", + |start: i16, span: u16| { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::start_span( + start, + span, + ) + .into(); + output + } + }; + output + }, + " Place the grid item specifying the `start` grid line and how many tracks it should `span`.\n # Panics\n Panics if `start` or `span` is `0`.", + &["start", "span"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::GridPlacement, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_grid_track_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::GridTrack, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::GridTrack>| { + let output: Val<::bevy_ui::GridTrack> = { + { + let output: Val<::bevy_ui::GridTrack> = <::bevy_ui::GridTrack as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::GridTrack>, other: Ref<::bevy_ui::GridTrack>| { + let output: bool = { + { + let output: bool = <::bevy_ui::GridTrack as ::std::cmp::PartialEq< + ::bevy_ui::GridTrack, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_ui::GridTrack, bevy_mod_scripting_bindings::MarkAsGenerated>(); +} +pub(crate) fn register_grid_track_repetition_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::GridTrackRepetition, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::GridTrackRepetition>| { + let output: Val<::bevy_ui::GridTrackRepetition> = { + { + let output: Val<::bevy_ui::GridTrackRepetition> = + <::bevy_ui::GridTrackRepetition as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::GridTrackRepetition>, other: Ref<::bevy_ui::GridTrackRepetition>| { + let output: bool = { + { + let output: bool = <::bevy_ui::GridTrackRepetition as ::std::cmp::PartialEq< + ::bevy_ui::GridTrackRepetition, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::GridTrackRepetition, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_justify_content_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::JustifyContent, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::JustifyContent>| { + let output: () = { + { + let output: () = <::bevy_ui::JustifyContent as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::JustifyContent>| { + let output: Val<::bevy_ui::JustifyContent> = { + { + let output: Val<::bevy_ui::JustifyContent> = <::bevy_ui::JustifyContent as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::JustifyContent>, + other: Ref<::bevy_ui::JustifyContent>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::JustifyContent as ::std::cmp::PartialEq< + ::bevy_ui::JustifyContent, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::JustifyContent, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_justify_items_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::JustifyItems, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::JustifyItems>| { + let output: () = { + { + let output: () = <::bevy_ui::JustifyItems as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::JustifyItems>| { + let output: Val<::bevy_ui::JustifyItems> = { + { + let output: Val<::bevy_ui::JustifyItems> = <::bevy_ui::JustifyItems as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::JustifyItems>, other: Ref<::bevy_ui::JustifyItems>| { + let output: bool = { + { + let output: bool = <::bevy_ui::JustifyItems as ::std::cmp::PartialEq< + ::bevy_ui::JustifyItems, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::JustifyItems, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_justify_self_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::JustifySelf, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::JustifySelf>| { + let output: () = { + { + let output: () = <::bevy_ui::JustifySelf as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::JustifySelf>| { + let output: Val<::bevy_ui::JustifySelf> = { + { + let output: Val<::bevy_ui::JustifySelf> = <::bevy_ui::JustifySelf as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::JustifySelf>, other: Ref<::bevy_ui::JustifySelf>| { + let output: bool = { + { + let output: bool = <::bevy_ui::JustifySelf as ::std::cmp::PartialEq< + ::bevy_ui::JustifySelf, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_ui::JustifySelf, bevy_mod_scripting_bindings::MarkAsGenerated>( + ); +} +pub(crate) fn register_max_track_sizing_function_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::MaxTrackSizingFunction, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::MaxTrackSizingFunction>| { + let output: Val<::bevy_ui::MaxTrackSizingFunction> = { + { + let output: Val<::bevy_ui::MaxTrackSizingFunction> = + <::bevy_ui::MaxTrackSizingFunction as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::MaxTrackSizingFunction>, + other: Ref<::bevy_ui::MaxTrackSizingFunction>| { + let output: bool = { + { + let output: bool = + <::bevy_ui::MaxTrackSizingFunction as ::std::cmp::PartialEq< + ::bevy_ui::MaxTrackSizingFunction, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::MaxTrackSizingFunction, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_min_track_sizing_function_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::MinTrackSizingFunction, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::MinTrackSizingFunction>| { + let output: Val<::bevy_ui::MinTrackSizingFunction> = { + { + let output: Val<::bevy_ui::MinTrackSizingFunction> = + <::bevy_ui::MinTrackSizingFunction as ::std::clone::Clone>::clone(&_self) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::MinTrackSizingFunction>, + other: Ref<::bevy_ui::MinTrackSizingFunction>| { + let output: bool = { + { + let output: bool = + <::bevy_ui::MinTrackSizingFunction as ::std::cmp::PartialEq< + ::bevy_ui::MinTrackSizingFunction, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::MinTrackSizingFunction, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_overflow_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::bevy_ui::Overflow>::new( + world, + ) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::Overflow>| { + let output: () = { + { + let output: () = + <::bevy_ui::Overflow as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clip", + || { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::clip().into(); + output + } + }; + output + }, + " Clip overflowing items on both axes", + &[], + ) + .register_documented( + "clip_x", + || { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::clip_x().into(); + output + } + }; + output + }, + " Clip overflowing items on the x axis", + &[], + ) + .register_documented( + "clip_y", + || { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::clip_y().into(); + output + } + }; + output + }, + " Clip overflowing items on the y axis", + &[], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::Overflow>| { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = + <::bevy_ui::Overflow as ::std::clone::Clone>::clone(&_self).into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::Overflow>, other: Ref<::bevy_ui::Overflow>| { + let output: bool = { + { + let output: bool = <::bevy_ui::Overflow as ::std::cmp::PartialEq< + ::bevy_ui::Overflow, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "hidden", + || { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::hidden().into(); + output + } + }; + output + }, + " Hide overflowing items on both axes by influencing layout and then clipping", + &[], + ) + .register_documented( + "hidden_x", + || { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::hidden_x().into(); + output + } + }; + output + }, + " Hide overflowing items on the x axis by influencing layout and then clipping", + &[], + ) + .register_documented( + "hidden_y", + || { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::hidden_y().into(); + output + } + }; + output + }, + " Hide overflowing items on the y axis by influencing layout and then clipping", + &[], + ) + .register_documented( + "is_visible", + |_self: Ref<::bevy_ui::Overflow>| { + let output: bool = { + { + let output: bool = ::bevy_ui::Overflow::is_visible(&_self).into(); + output + } + }; + output + }, + " Overflow is visible on both axes", + &["_self"], + ) + .register_documented( + "scroll", + || { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::scroll().into(); + output + } + }; + output + }, + "", + &[], + ) + .register_documented( + "scroll_x", + || { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::scroll_x().into(); + output + } + }; + output + }, + " Scroll overflowing items on the x axis", + &[], + ) + .register_documented( + "scroll_y", + || { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::scroll_y().into(); + output + } + }; + output + }, + " Scroll overflowing items on the y axis", + &[], + ) + .register_documented( + "visible", + || { + let output: Val<::bevy_ui::Overflow> = { + { + let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::visible().into(); + output + } + }; + output + }, + " Show overflowing items on both axes", + &[], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::bevy_ui::Overflow, bevy_mod_scripting_bindings::MarkAsGenerated>(); +} +pub(crate) fn register_border_radius_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::BorderRadius, + >::new(world) + .register_documented( + "all", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::all( + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Set all four corners to the same curvature.", + &["radius"], + ) + .register_documented( + "bottom", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::bottom( + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Sets the radii for the bottom left and bottom right corners.\n Remaining corners will be right-angled.", + &["radius"], + ) + .register_documented( + "bottom_left", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::bottom_left( + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Sets the radius for the bottom left corner.\n Remaining corners will be right-angled.", + &["radius"], + ) + .register_documented( + "bottom_right", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: ::std::option::Option = ::bevy_ui::GridPlacement::get_start( - _self.into_inner(), + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::bottom_right( + radius.into_inner(), ) .into(); output @@ -4749,17 +5369,16 @@ pub(crate) fn register_grid_placement_functions(world: &mut World) { }; output }, - " Returns the grid line at which the item should start, or `None` if not set.", - &["_self"], + " Sets the radius for the bottom right corner.\n Remaining corners will be right-angled.", + &["radius"], ) .register_documented( - "set_end", - |_self: Val<::bevy_ui::GridPlacement>, end: i16| { - let output: Val<::bevy_ui::GridPlacement> = { + "clone", + |_self: Ref<::bevy_ui::BorderRadius>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::set_end( - _self.into_inner(), - end, + let output: Val<::bevy_ui::BorderRadius> = <::bevy_ui::BorderRadius as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -4767,35 +5386,33 @@ pub(crate) fn register_grid_placement_functions(world: &mut World) { }; output }, - " Mutate the item, setting the `end` grid line\n # Panics\n Panics if `end` is `0`.", - &["_self", "end"], + "", + &["_self"], ) .register_documented( - "set_span", - |_self: Val<::bevy_ui::GridPlacement>, span: u16| { - let output: Val<::bevy_ui::GridPlacement> = { + "eq", + |_self: Ref<::bevy_ui::BorderRadius>, other: Ref<::bevy_ui::BorderRadius>| { + let output: bool = { { - let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::set_span( - _self.into_inner(), - span, - ) + let output: bool = <::bevy_ui::BorderRadius as ::std::cmp::PartialEq< + ::bevy_ui::BorderRadius, + >>::eq(&_self, &other) .into(); output } }; output }, - " Mutate the item, setting the number of tracks the item should `span`\n # Panics\n Panics if `span` is `0`.", - &["_self", "span"], + "", + &["_self", "other"], ) .register_documented( - "set_start", - |_self: Val<::bevy_ui::GridPlacement>, start: i16| { - let output: Val<::bevy_ui::GridPlacement> = { + "left", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::set_start( - _self.into_inner(), - start, + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::left( + radius.into_inner(), ) .into(); output @@ -4803,16 +5420,24 @@ pub(crate) fn register_grid_placement_functions(world: &mut World) { }; output }, - " Mutate the item, setting the `start` grid line\n # Panics\n Panics if `start` is `0`.", - &["_self", "start"], + " Sets the radii for the top left and bottom left corners.\n Remaining corners will be right-angled.", + &["radius"], ) .register_documented( - "span", - |span: u16| { - let output: Val<::bevy_ui::GridPlacement> = { + "new", + | + top_left: Val<::bevy_ui::Val>, + top_right: Val<::bevy_ui::Val>, + bottom_right: Val<::bevy_ui::Val>, + bottom_left: Val<::bevy_ui::Val>| + { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::span( - span, + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::new( + top_left.into_inner(), + top_right.into_inner(), + bottom_right.into_inner(), + bottom_left.into_inner(), ) .into(); output @@ -4820,16 +5445,19 @@ pub(crate) fn register_grid_placement_functions(world: &mut World) { }; output }, - " Place the grid item automatically, specifying how many tracks it should `span`.\n # Panics\n Panics if `span` is `0`.", - &["span"], + "", + &["top_left", "top_right", "bottom_right", "bottom_left"], ) .register_documented( - "start", - |start: i16| { - let output: Val<::bevy_ui::GridPlacement> = { + "percent", + |top_left: f32, top_right: f32, bottom_right: f32, bottom_left: f32| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::start( - start, + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::percent( + top_left, + top_right, + bottom_right, + bottom_left, ) .into(); output @@ -4837,17 +5465,19 @@ pub(crate) fn register_grid_placement_functions(world: &mut World) { }; output }, - " Place the grid item specifying the `start` grid line (letting the `span` default to `1`).\n # Panics\n Panics if `start` is `0`.", - &["start"], + " Sets the radii to percentage values.", + &["top_left", "top_right", "bottom_right", "bottom_left"], ) .register_documented( - "start_end", - |start: i16, end: i16| { - let output: Val<::bevy_ui::GridPlacement> = { + "px", + |top_left: f32, top_right: f32, bottom_right: f32, bottom_left: f32| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::start_end( - start, - end, + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::px( + top_left, + top_right, + bottom_right, + bottom_left, ) .into(); output @@ -4855,17 +5485,24 @@ pub(crate) fn register_grid_placement_functions(world: &mut World) { }; output }, - " Place the grid item specifying `start` and `end` grid lines (`span` will be inferred)\n # Panics\n Panics if `start` or `end` is `0`.", - &["start", "end"], + " Sets the radii to logical pixel values.", + &["top_left", "top_right", "bottom_right", "bottom_left"], ) .register_documented( - "start_span", - |start: i16, span: u16| { - let output: Val<::bevy_ui::GridPlacement> = { + "resolve", + | + _self: Ref<::bevy_ui::BorderRadius>, + scale_factor: f32, + node_size: Val<::bevy_math::Vec2>, + viewport_size: Val<::bevy_math::Vec2>| + { + let output: Val<::bevy_ui::ResolvedBorderRadius> = { { - let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::start_span( - start, - span, + let output: Val<::bevy_ui::ResolvedBorderRadius> = ::bevy_ui::BorderRadius::resolve( + &_self, + scale_factor, + node_size.into_inner(), + viewport_size.into_inner(), ) .into(); output @@ -4873,28 +5510,24 @@ pub(crate) fn register_grid_placement_functions(world: &mut World) { }; output }, - " Place the grid item specifying the `start` grid line and how many tracks it should `span`.\n # Panics\n Panics if `start` or `span` is `0`.", - &["start", "span"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::GridPlacement, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_grid_track_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::GridTrack, - >::new(world) + " Resolve the border radii for the corners from the given context values.\n Returns the radii of the each corner in physical pixels.", + &["_self", "scale_factor", "node_size", "viewport_size"], + ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::GridTrack>| { - let output: Val<::bevy_ui::GridTrack> = { + "resolve_single_corner", + | + radius: Val<::bevy_ui::Val>, + scale_factor: f32, + min_length: f32, + viewport_size: Val<::bevy_math::Vec2>| + { + let output: f32 = { { - let output: Val<::bevy_ui::GridTrack> = <::bevy_ui::GridTrack as ::std::clone::Clone>::clone( - &_self, + let output: f32 = ::bevy_ui::BorderRadius::resolve_single_corner( + radius.into_inner(), + scale_factor, + min_length, + viewport_size.into_inner(), ) .into(); output @@ -4902,87 +5535,33 @@ pub(crate) fn register_grid_track_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Resolve the border radius for a single corner from the given context values.\n Returns the radius of the corner in physical pixels.", + &["radius", "scale_factor", "min_length", "viewport_size"], ) .register_documented( - "eq", - |_self: Ref<::bevy_ui::GridTrack>, other: Ref<::bevy_ui::GridTrack>| { - let output: bool = { + "right", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: bool = <::bevy_ui::GridTrack as ::std::cmp::PartialEq< - ::bevy_ui::GridTrack, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::right( + radius.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::<::bevy_ui::GridTrack, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} -pub(crate) fn register_grid_track_repetition_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::GridTrackRepetition, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::GridTrackRepetition>| { - let output: Val<::bevy_ui::GridTrackRepetition> = { - { - let output: Val<::bevy_ui::GridTrackRepetition> = - <::bevy_ui::GridTrackRepetition as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_ui::GridTrackRepetition>, other: Ref<::bevy_ui::GridTrackRepetition>| { - let output: bool = { - { - let output: bool = <::bevy_ui::GridTrackRepetition as ::std::cmp::PartialEq< - ::bevy_ui::GridTrackRepetition, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::GridTrackRepetition, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_justify_content_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::JustifyContent, - >::new(world) + " Sets the radii for the top right and bottom right corners.\n Remaining corners will be right-angled.", + &["radius"], + ) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ui::JustifyContent>| { - let output: () = { + "top", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: () = <::bevy_ui::JustifyContent as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::top( + radius.into_inner(), ) .into(); output @@ -4990,16 +5569,16 @@ pub(crate) fn register_justify_content_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Sets the radii for the top left and top right corners.\n Remaining corners will be right-angled.", + &["radius"], ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::JustifyContent>| { - let output: Val<::bevy_ui::JustifyContent> = { + "top_left", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: Val<::bevy_ui::JustifyContent> = <::bevy_ui::JustifyContent as ::std::clone::Clone>::clone( - &_self, + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::top_left( + radius.into_inner(), ) .into(); output @@ -5007,48 +5586,34 @@ pub(crate) fn register_justify_content_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Sets the radius for the top left corner.\n Remaining corners will be right-angled.", + &["radius"], ) .register_documented( - "eq", - | - _self: Ref<::bevy_ui::JustifyContent>, - other: Ref<::bevy_ui::JustifyContent>| - { - let output: bool = { + "top_right", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: bool = <::bevy_ui::JustifyContent as ::std::cmp::PartialEq< - ::bevy_ui::JustifyContent, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::top_right( + radius.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::JustifyContent, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_justify_items_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::JustifyItems, - >::new(world) + " Sets the radius for the top right corner.\n Remaining corners will be right-angled.", + &["radius"], + ) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ui::JustifyItems>| { - let output: () = { + "with_bottom", + |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: () = <::bevy_ui::JustifyItems as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_bottom( + _self.into_inner(), + radius.into_inner(), ) .into(); output @@ -5056,16 +5621,17 @@ pub(crate) fn register_justify_items_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Returns the [`BorderRadius`] with its `bottom_left` and `bottom_right` fields set to the given value.", + &["_self", "radius"], ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::JustifyItems>| { - let output: Val<::bevy_ui::JustifyItems> = { + "with_bottom_left", + |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: Val<::bevy_ui::JustifyItems> = <::bevy_ui::JustifyItems as ::std::clone::Clone>::clone( - &_self, + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_bottom_left( + _self.into_inner(), + radius.into_inner(), ) .into(); output @@ -5073,45 +5639,35 @@ pub(crate) fn register_justify_items_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Returns the [`BorderRadius`] with its `bottom_left` field set to the given value.", + &["_self", "radius"], ) .register_documented( - "eq", - |_self: Ref<::bevy_ui::JustifyItems>, other: Ref<::bevy_ui::JustifyItems>| { - let output: bool = { + "with_bottom_right", + |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: bool = <::bevy_ui::JustifyItems as ::std::cmp::PartialEq< - ::bevy_ui::JustifyItems, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_bottom_right( + _self.into_inner(), + radius.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::JustifyItems, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_justify_self_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::JustifySelf, - >::new(world) + " Returns the [`BorderRadius`] with its `bottom_right` field set to the given value.", + &["_self", "radius"], + ) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ui::JustifySelf>| { - let output: () = { + "with_left", + |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: () = <::bevy_ui::JustifySelf as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_left( + _self.into_inner(), + radius.into_inner(), ) .into(); output @@ -5119,16 +5675,17 @@ pub(crate) fn register_justify_self_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Returns the [`BorderRadius`] with its `top_left` and `bottom_left` fields set to the given value.", + &["_self", "radius"], ) .register_documented( - "clone", - |_self: Ref<::bevy_ui::JustifySelf>| { - let output: Val<::bevy_ui::JustifySelf> = { + "with_right", + |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: Val<::bevy_ui::JustifySelf> = <::bevy_ui::JustifySelf as ::std::clone::Clone>::clone( - &_self, + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_right( + _self.into_inner(), + radius.into_inner(), ) .into(); output @@ -5136,339 +5693,71 @@ pub(crate) fn register_justify_self_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Returns the [`BorderRadius`] with its `top_right` and `bottom_right` fields set to the given value.", + &["_self", "radius"], ) .register_documented( - "eq", - |_self: Ref<::bevy_ui::JustifySelf>, other: Ref<::bevy_ui::JustifySelf>| { - let output: bool = { + "with_top", + |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { { - let output: bool = <::bevy_ui::JustifySelf as ::std::cmp::PartialEq< - ::bevy_ui::JustifySelf, - >>::eq(&_self, &other) + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_top( + _self.into_inner(), + radius.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::<::bevy_ui::JustifySelf, bevy_mod_scripting_bindings::MarkAsGenerated>( - ); -} -pub(crate) fn register_max_track_sizing_function_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::MaxTrackSizingFunction, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::MaxTrackSizingFunction>| { - let output: Val<::bevy_ui::MaxTrackSizingFunction> = { - { - let output: Val<::bevy_ui::MaxTrackSizingFunction> = - <::bevy_ui::MaxTrackSizingFunction as ::std::clone::Clone>::clone(&_self) + " Returns the [`BorderRadius`] with its `top_left` and `top_right` fields set to the given value.", + &["_self", "radius"], + ) + .register_documented( + "with_top_left", + |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_top_left( + _self.into_inner(), + radius.into_inner(), + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_ui::MaxTrackSizingFunction>, - other: Ref<::bevy_ui::MaxTrackSizingFunction>| { - let output: bool = { - { - let output: bool = - <::bevy_ui::MaxTrackSizingFunction as ::std::cmp::PartialEq< - ::bevy_ui::MaxTrackSizingFunction, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ui::MaxTrackSizingFunction, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_min_track_sizing_function_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ui::MinTrackSizingFunction, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::MinTrackSizingFunction>| { - let output: Val<::bevy_ui::MinTrackSizingFunction> = { - { - let output: Val<::bevy_ui::MinTrackSizingFunction> = - <::bevy_ui::MinTrackSizingFunction as ::std::clone::Clone>::clone(&_self) + output + } + }; + output + }, + " Returns the [`BorderRadius`] with its `top_left` field set to the given value.", + &["_self", "radius"], + ) + .register_documented( + "with_top_right", + |_self: Val<::bevy_ui::BorderRadius>, radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::with_top_right( + _self.into_inner(), + radius.into_inner(), + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_ui::MinTrackSizingFunction>, - other: Ref<::bevy_ui::MinTrackSizingFunction>| { - let output: bool = { - { - let output: bool = - <::bevy_ui::MinTrackSizingFunction as ::std::cmp::PartialEq< - ::bevy_ui::MinTrackSizingFunction, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + output + } + }; + output + }, + " Returns the [`BorderRadius`] with its `top_right` field set to the given value.", + &["_self", "radius"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ui::MinTrackSizingFunction, + ::bevy_ui::BorderRadius, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_overflow_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::bevy_ui::Overflow>::new( - world, - ) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ui::Overflow>| { - let output: () = { - { - let output: () = - <::bevy_ui::Overflow as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clip", - || { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::clip().into(); - output - } - }; - output - }, - " Clip overflowing items on both axes", - &[], - ) - .register_documented( - "clip_x", - || { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::clip_x().into(); - output - } - }; - output - }, - " Clip overflowing items on the x axis", - &[], - ) - .register_documented( - "clip_y", - || { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::clip_y().into(); - output - } - }; - output - }, - " Clip overflowing items on the y axis", - &[], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_ui::Overflow>| { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = - <::bevy_ui::Overflow as ::std::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_ui::Overflow>, other: Ref<::bevy_ui::Overflow>| { - let output: bool = { - { - let output: bool = <::bevy_ui::Overflow as ::std::cmp::PartialEq< - ::bevy_ui::Overflow, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "hidden", - || { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::hidden().into(); - output - } - }; - output - }, - " Hide overflowing items on both axes by influencing layout and then clipping", - &[], - ) - .register_documented( - "hidden_x", - || { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::hidden_x().into(); - output - } - }; - output - }, - " Hide overflowing items on the x axis by influencing layout and then clipping", - &[], - ) - .register_documented( - "hidden_y", - || { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::hidden_y().into(); - output - } - }; - output - }, - " Hide overflowing items on the y axis by influencing layout and then clipping", - &[], - ) - .register_documented( - "is_visible", - |_self: Ref<::bevy_ui::Overflow>| { - let output: bool = { - { - let output: bool = ::bevy_ui::Overflow::is_visible(&_self).into(); - output - } - }; - output - }, - " Overflow is visible on both axes", - &["_self"], - ) - .register_documented( - "scroll", - || { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::scroll().into(); - output - } - }; - output - }, - "", - &[], - ) - .register_documented( - "scroll_x", - || { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::scroll_x().into(); - output - } - }; - output - }, - " Scroll overflowing items on the x axis", - &[], - ) - .register_documented( - "scroll_y", - || { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::scroll_y().into(); - output - } - }; - output - }, - " Scroll overflowing items on the y axis", - &[], - ) - .register_documented( - "visible", - || { - let output: Val<::bevy_ui::Overflow> = { - { - let output: Val<::bevy_ui::Overflow> = ::bevy_ui::Overflow::visible().into(); - output - } - }; - output - }, - " Show overflowing items on both axes", - &[], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::<::bevy_ui::Overflow, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} pub(crate) fn register_overflow_clip_margin_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_ui::OverflowClipMargin, @@ -5988,13 +6277,14 @@ impl Plugin for BevyUiScriptingPlugin { register_ui_scale_functions(&mut world); register_computed_ui_target_camera_functions(&mut world); register_computed_ui_render_target_info_functions(&mut world); - register_content_size_functions(&mut world); + register_computed_node_functions(&mut world); register_ui_global_transform_functions(&mut world); + register_auto_directional_navigation_functions(&mut world); + register_content_size_functions(&mut world); register_calculated_clip_functions(&mut world); register_node_functions(&mut world); register_overflow_axis_functions(&mut world); register_ui_target_camera_functions(&mut world); - register_computed_node_functions(&mut world); register_overflow_clip_box_functions(&mut world); register_focus_policy_functions(&mut world); register_image_node_size_functions(&mut world); @@ -6015,7 +6305,7 @@ impl Plugin for BevyUiScriptingPlugin { register_ui_transform_functions(&mut world); register_relative_cursor_position_functions(&mut world); register_ui_rect_functions(&mut world); - register_border_radius_functions(&mut world); + register_ignore_scroll_functions(&mut world); register_layout_config_functions(&mut world); register_outline_functions(&mut world); register_scroll_position_functions(&mut world); @@ -6037,6 +6327,7 @@ impl Plugin for BevyUiScriptingPlugin { register_max_track_sizing_function_functions(&mut world); register_min_track_sizing_function_functions(&mut world); register_overflow_functions(&mut world); + register_border_radius_functions(&mut world); register_overflow_clip_margin_functions(&mut world); register_global_z_index_functions(&mut world); register_z_index_functions(&mut world); diff --git a/crates/bindings/bevy_ui_render_bms_bindings/Cargo.toml b/crates/bindings/bevy_ui_render_bms_bindings/Cargo.toml index 0fef7408a2..2f41c97bca 100644 --- a/crates/bindings/bevy_ui_render_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_ui_render_bms_bindings/Cargo.toml @@ -17,46 +17,46 @@ categories.workspace = true bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_derive = { workspace = true } -bevy_ui_render = { version = "0.17.3", features = [], default-features = true} +bevy_ui_render = { version = "0.18.0", features = [], default-features = true} -bevy_app = { version = "^0.17.3", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} +bevy_app = { version = "^0.18.0", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.17.3", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} +bevy_asset = { version = "^0.18.0", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_camera = { version = "^0.17.3", features = [], default-features = true} +bevy_camera = { version = "^0.18.0", features = [], default-features = true} -bevy_color = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} +bevy_color = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_core_pipeline = { version = "^0.17.3", features = ["tonemapping_luts", "webgl"], default-features = true} +bevy_core_pipeline = { version = "^0.18.0", features = ["tonemapping_luts", "webgl"], default-features = true} -bevy_derive = { version = "^0.17.3", features = [], default-features = true} +bevy_derive = { version = "^0.18.0", features = [], default-features = true} -bevy_ecs = { version = "^0.17.3", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} +bevy_ecs = { version = "^0.18.0", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.17.3", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} +bevy_image = { version = "^0.18.0", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.17.3", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} +bevy_math = { version = "^0.18.0", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mesh = { version = "^0.17.3", features = [], default-features = true} +bevy_mesh = { version = "^0.18.0", features = ["bevy_mikktspace", "morph"], default-features = true} -bevy_reflect = { version = "^0.17.3", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} +bevy_reflect = { version = "^0.18.0", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "indexmap", "smallvec", "smol_str", "std", "uuid", "wgpu-types"], default-features = true} -bevy_render = { version = "^0.17.3", features = ["multi_threaded", "webgl"], default-features = true} +bevy_render = { version = "^0.18.0", features = ["morph", "multi_threaded", "webgl"], default-features = true} -bevy_shader = { version = "^0.17.3", features = [], default-features = true} +bevy_shader = { version = "^0.18.0", features = [], default-features = true} -bevy_sprite = { version = "^0.17.3", features = ["bevy_picking", "bevy_sprite_picking_backend", "bevy_text", "bevy_window"], default-features = true} +bevy_sprite = { version = "^0.18.0", features = ["bevy_picking", "bevy_text", "bevy_window"], default-features = true} -bevy_sprite_render = { version = "^0.17.3", features = ["bevy_text", "webgl"], default-features = true} +bevy_sprite_render = { version = "^0.18.0", features = ["bevy_text", "webgl"], default-features = true} -bevy_text = { version = "^0.17.3", features = ["default_font"], default-features = true} +bevy_text = { version = "^0.18.0", features = ["default_font"], default-features = true} -bevy_transform = { version = "^0.17.3", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} +bevy_transform = { version = "^0.18.0", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_ui = { version = "^0.17.3", features = ["bevy_picking", "bevy_ui_picking_backend"], default-features = true} +bevy_ui = { version = "^0.18.0", features = ["bevy_picking"], default-features = true} -bevy_utils = { version = "^0.17.3", features = ["debug", "parallel"], default-features = true} +bevy_utils = { version = "^0.18.0", features = ["parallel"], default-features = true} bytemuck = { version = "^1.5", features = [], default-features = true} diff --git a/crates/ladfile_builder/Cargo.toml b/crates/ladfile_builder/Cargo.toml index 8f96244ca8..15c304d95d 100644 --- a/crates/ladfile_builder/Cargo.toml +++ b/crates/ladfile_builder/Cargo.toml @@ -24,7 +24,7 @@ bevy_log = { workspace = true, default-features = false, features = [] } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_bindings_domain = { workspace = true } -bevy_reflect = { workspace = true, features = ["documentation"] } +bevy_reflect = { workspace = true, features = ["reflect_documentation"] } lua_language_server_lad_backend = { workspace = true, optional = true } ladfile = { workspace = true } regex = { workspace = true } diff --git a/crates/testing_crates/script_integration_test_harness/src/scenario.rs b/crates/testing_crates/script_integration_test_harness/src/scenario.rs index e78413684d..c151b639ab 100644 --- a/crates/testing_crates/script_integration_test_harness/src/scenario.rs +++ b/crates/testing_crates/script_integration_test_harness/src/scenario.rs @@ -636,13 +636,12 @@ impl ScenarioStep { "Callback '{label}' for attachment: '{script}' succeeded, with value: {val:?}" ); - if let Some(expected_string) = expect_string_value.as_ref() { - if ScriptValue::String(Cow::Owned(expected_string.clone())) != *val - { - return Err(anyhow!( - "Callback '{label}' for attachment: '{script}' expected: {expected_string}, but got: {val:#?}", - )); - } + if let Some(expected_string) = expect_string_value.as_ref() + && ScriptValue::String(Cow::Owned(expected_string.clone())) != *val + { + return Err(anyhow!( + "Callback '{label}' for attachment: '{script}' expected: {expected_string}, but got: {val:#?}", + )); } } Err(e) => { diff --git a/crates/testing_crates/test_utils/src/test_data.rs b/crates/testing_crates/test_utils/src/test_data.rs index 4f253dd44f..f3e7360c40 100644 --- a/crates/testing_crates/test_utils/src/test_data.rs +++ b/crates/testing_crates/test_utils/src/test_data.rs @@ -267,7 +267,7 @@ impl SimpleEnum { } pub(crate) const TEST_COMPONENT_ID_START: usize = 20; -pub(crate) const TEST_ENTITY_ID_START: u32 = 1; +pub(crate) const TEST_ENTITY_ID_START: u32 = 9; pub trait GetTestComponentId { fn test_component_id() -> ComponentId; @@ -315,7 +315,7 @@ macro_rules! impl_test_component_ids { let registered_id = world.component_id::<$comp_type>().unwrap().index(); assert_eq!(registered_id, TEST_COMPONENT_ID_START + $comp_id, "Test setup failed. Did you register components before running setup_world?: {}", stringify!($comp_type)); let entity = world.spawn(<$comp_type>::init()).id(); - assert_eq!(entity.index(), TEST_ENTITY_ID_START + $comp_id, "Test setup failed. Did you spawn entities before running setup_world?: {}", stringify!($comp_type)); + assert_eq!(entity.index().index(), TEST_ENTITY_ID_START + $comp_id, "Test setup failed. Did you spawn entities before running setup_world?: {}", stringify!($comp_type)); assert_eq!(entity.generation(), bevy_ecs::entity::EntityGeneration::FIRST, "Test setup failed. Did you spawn entities before running setup_world?: {}", stringify!($comp_type)); )* $( @@ -390,10 +390,15 @@ fn init_world(world: &mut World, init: None, true, ComponentCloneBehavior::Default, + None, )) }; } + while world.entities().len() < TEST_ENTITY_ID_START { + world.spawn_empty(); + } + init_all_components(world, &mut type_registry_guard); init(world, &mut type_registry_guard); } diff --git a/docs/src/ReleaseNotes/0.17-to-0.18.md b/docs/src/ReleaseNotes/0.17-to-0.18.md new file mode 100644 index 0000000000..0e5de68879 --- /dev/null +++ b/docs/src/ReleaseNotes/0.17-to-0.18.md @@ -0,0 +1,6 @@ +# Migrating from 0.17 to 0.18 + +Migrate according to the official bevy migration guide. Scripts referencing native bevy bindings will also need updating accordingly. + +For example in lua `entity:index()` will now be `entity:index():index()`. + diff --git a/docs/src/ReleaseNotes/0.18.0.md b/docs/src/ReleaseNotes/0.18.0.md new file mode 100644 index 0000000000..b08bcda414 --- /dev/null +++ b/docs/src/ReleaseNotes/0.18.0.md @@ -0,0 +1,3 @@ +# 0.18.0 - Bevy 0.18 Support + +This update only upgrades the supported version of bevy to `0.18` \ No newline at end of file diff --git a/examples/game_of_life.rs b/examples/game_of_life.rs index d5a73f4cd3..db572d7824 100644 --- a/examples/game_of_life.rs +++ b/examples/game_of_life.rs @@ -211,7 +211,7 @@ pub fn init_game_of_life_state( } pub fn sync_window_size( - mut resize_event: EventReader, + mut resize_event: MessageReader, mut settings: ResMut, mut query: Query<&mut Sprite, With>, primary_windows: Query<&Window, With>, diff --git a/examples/script_loading.rs b/examples/script_loading.rs index d1d5a23743..6360b21e9c 100644 --- a/examples/script_loading.rs +++ b/examples/script_loading.rs @@ -35,10 +35,6 @@ pub fn initialize_script_loading( } } -/// Marker component for the UI root -#[derive(Component)] -struct LoadingUiRoot; - /// Marker components for UI updates #[derive(Component)] struct LoadingBarFill; diff --git a/readme.md b/readme.md index c061c30fd5..963b16a2b0 100644 --- a/readme.md +++ b/readme.md @@ -59,6 +59,8 @@ BMS generates code based on each bevy release, which is why we pin the patch ver | bevy_mod_scripting | bevy | |---------------------|--------| +| 0.18.0+ | 0.18.0 | +| 0.17.0+ | 0.17.0 | | 0.14.0+ | 0.16.0 | | 0.11.1+ | 0.15.3 | | 0.9.5+ | 0.15.2 | diff --git a/rust-toolchain.toml b/rust-toolchain.toml index e88baf106b..b67e7d5348 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.88.0" +channel = "1.89.0"