diff --git a/.github/workflows/synchronize_bindings.yml b/.github/workflows/synchronize_bindings.yml index aaaa55ff19..4c0ba2ee6c 100644 --- a/.github/workflows/synchronize_bindings.yml +++ b/.github/workflows/synchronize_bindings.yml @@ -32,7 +32,7 @@ jobs: run: | if [[ -n $(git status --porcelain) ]]; then echo "changes=true" >> "$GITHUB_OUTPUT" - git diff > bindings.diff + git diff --text > bindings.diff echo "Diff created:" cat bindings.diff else diff --git a/.github/workflows/synchronize_bindings_check_diff.yml b/.github/workflows/synchronize_bindings_check_diff.yml index aebef0fdb2..7d2cd2f521 100644 --- a/.github/workflows/synchronize_bindings_check_diff.yml +++ b/.github/workflows/synchronize_bindings_check_diff.yml @@ -15,8 +15,9 @@ jobs: env: DIFF_ARTIFACT: bindings.diff PR_EVENT: event-bindings.json + EVENT_FILE: event.json steps: - - name: Download Benchmark Results + - name: Download Diff Results uses: dawidd6/action-download-artifact@v6 with: name: ${{ env.DIFF_ARTIFACT }} @@ -31,13 +32,48 @@ jobs: with: script: | let fs = require('fs'); - let prEvent = JSON.parse(fs.readFileSync(process.env.PR_EVENT, {encoding: 'utf8'})); + let prEvent = JSON.parse(fs.readFileSync(process.env.EVENT_FILE, {encoding: 'utf8'})); core.exportVariable("PR_HEAD", prEvent.pull_request.head.ref); core.exportVariable("PR_BASE", prEvent.pull_request.base.ref); core.exportVariable("PR_BASE_SHA", prEvent.pull_request.base.sha); core.exportVariable("PR_NUMBER", prEvent.number); core.exportVariable("HEAD_REPO", prEvent.pull_request.head.repo.full_name); core.exportVariable("HEAD_REPO_URL", prEvent.pull_request.head.repo.git_url); + + - name: Build Collapsible Diff Comment + id: build_comment + continue-on-error: true + shell: bash + run: | + echo '### 🔍 Binding Differences Detected' > comment.md + echo '' >> comment.md + echo '> The following changes were detected in generated bindings:' >> comment.md + echo '' >> comment.md + + # Build collapsible sections per file + awk ' + /^diff --git/ { + if (file != "") print "" >> "comment.md" + file=$4 + gsub(/^a\//, "", file) + print "
" file "
" >> "comment.md"
+            next
+          }
+          { print $0 >> "comment.md" }
+          END { if (file != "") print "
" >> "comment.md" } + ' "${{ env.DIFF_ARTIFACT }}" + + - name: Add or Update PR Comment with Diff + id: pr_comment + continue-on-error: true + uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ env.PR_NUMBER }} + body-path: comment.md + edit-mode: replace + token: ${{ secrets.GITHUB_TOKEN }} + comment-identifier: bindings-diff + - name: Fail PR With URL uses: actions/github-script@v6 with: diff --git a/Cargo.toml b/Cargo.toml index 14c05b8747..a67b23aeb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,6 +66,7 @@ core_functions = ["bevy_mod_scripting_functions/core_functions"] bevy_a11y_bindings = ["bevy_mod_scripting_functions/bevy_a11y"] bevy_animation_bindings = ["bevy_mod_scripting_functions/bevy_animation"] bevy_asset_bindings = ["bevy_mod_scripting_functions/bevy_asset"] +bevy_camera_bindings = ["bevy_mod_scripting_functions/bevy_camera"] bevy_color_bindings = ["bevy_mod_scripting_functions/bevy_color"] bevy_core_pipeline_bindings = [ "bevy_mod_scripting_functions/bevy_core_pipeline", @@ -76,17 +77,24 @@ bevy_gltf_bindings = ["bevy_mod_scripting_functions/bevy_gltf"] bevy_image_bindings = ["bevy_mod_scripting_functions/bevy_image"] bevy_input_bindings = ["bevy_mod_scripting_functions/bevy_input"] bevy_input_focus_bindings = ["bevy_mod_scripting_functions/bevy_input_focus"] +bevy_light_bindings = ["bevy_mod_scripting_functions/bevy_light"] bevy_math_bindings = ["bevy_mod_scripting_functions/bevy_math"] bevy_mesh_bindings = ["bevy_mod_scripting_functions/bevy_mesh"] bevy_pbr_bindings = ["bevy_mod_scripting_functions/bevy_pbr"] bevy_picking_bindings = ["bevy_mod_scripting_functions/bevy_picking"] +bevy_post_process_bindings = ["bevy_mod_scripting_functions/bevy_post_process"] bevy_reflect_bindings = ["bevy_mod_scripting_functions/bevy_reflect"] bevy_render_bindings = ["bevy_mod_scripting_functions/bevy_render"] bevy_scene_bindings = ["bevy_mod_scripting_functions/bevy_scene"] bevy_sprite_bindings = ["bevy_mod_scripting_functions/bevy_sprite"] +bevy_sprite_render_bindings = [ + "bevy_mod_scripting_functions/bevy_sprite_render", +] bevy_text_bindings = ["bevy_mod_scripting_functions/bevy_text"] bevy_time_bindings = ["bevy_mod_scripting_functions/bevy_time"] bevy_transform_bindings = ["bevy_mod_scripting_functions/bevy_transform"] +bevy_ui_bindings = ["bevy_mod_scripting_functions/bevy_ui"] +bevy_ui_render_bindings = ["bevy_mod_scripting_functions/bevy_ui_render"] # optional unsafe_lua_modules = ["bevy_mod_scripting_lua?/unsafe_lua_modules"] @@ -140,54 +148,57 @@ bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = " # bevy -bevy = { version = "0.16.0", default-features = false } -bevy_math = { version = "0.16.0", default-features = false, features = ["std"] } -bevy_transform = { version = "0.16.0", default-features = false } -bevy_reflect = { version = "0.16.0", default-features = false } -bevy_ecs = { version = "0.16.0", default-features = false } -bevy_asset = { version = "0.16.0", default-features = false } -bevy_app = { version = "0.16.0", default-features = false } -bevy_log = { version = "0.16.0", default-features = false } -bevy_internal = { version = "0.16.0", default-features = false } -bevy_diagnostic = { version = "0.16.0", default-features = false } -bevy_platform = { version = "0.16.0", default-features = false } -bevy_time = { version = "0.16.0", default-features = false } -bevy_input = { version = "0.16.0", default-features = false } -bevy_a11y = { version = "0.16.0", default-features = false, features = [ + +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 = [ "std", "bevy_reflect", ] } -bevy_animation = { version = "0.16.0", default-features = false } -bevy_color = { version = "0.16.0", default-features = false, features = [ +bevy_animation = { version = "0.17", default-features = false } +bevy_color = { version = "0.17", default-features = false, features = [ "std", "bevy_reflect", ] } -bevy_core_pipeline = { version = "0.16.0", default-features = false } -bevy_gizmos = { version = "0.16.0", default-features = false } -bevy_gltf = { version = "0.16.0", default-features = false } -bevy_image = { version = "0.16.0", default-features = false, features = [ +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_reflect", ] } -bevy_input_focus = { version = "0.16.0", default-features = false, features = [ +bevy_input_focus = { version = "0.17", default-features = false, features = [ "std", "bevy_reflect", ] } -bevy_mesh = { version = "0.16.0", default-features = false } -bevy_pbr = { version = "0.16.0", default-features = false } -bevy_picking = { version = "0.16.0", default-features = false } -bevy_render = { version = "0.16.0", default-features = false } -bevy_scene = { version = "0.16.0", default-features = false } -bevy_sprite = { version = "0.16.0", default-features = false } -bevy_text = { version = "0.16.0", default-features = false } -bevy_window = { version = "0.16.0", default-features = false, features = [ +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_reflect", "std", ] } -bevy_winit = { version = "0.16.0", default-features = false } +bevy_winit = { version = "0.17", default-features = false } +bevy_utils = { version = "0.17", default-features = false, features = ["std"] } -glam = { version = "0.29.3", default-features = false } -uuid = { version = "1.11", default-features = false } +glam = { version = "0.30.7", 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"] } # other serde_json = { version = "1.0", default-features = false } @@ -224,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.14", default-features = false } +bevy_console = { version = "0.16", 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 } @@ -238,10 +249,13 @@ bevy = { workspace = true, features = [ "bevy_asset", "bevy_core_pipeline", "bevy_sprite", + "bevy_sprite_render", "bevy_state", "x11", "bevy_ui", "default_font", + "custom_cursor", + "debug", ] } bevy_platform = { workspace = true } clap = { workspace = true, features = ["derive"] } diff --git a/assets/scripts/game_of_life.lua b/assets/scripts/game_of_life.lua index c217f6b821..49a2ce4d21 100644 --- a/assets/scripts/game_of_life.lua +++ b/assets/scripts/game_of_life.lua @@ -2,7 +2,6 @@ LifeState = world.get_type_by_name("LifeState") Settings = world.get_type_by_name("Settings") info("Lua: The game_of_life.lua script just got loaded") - math.randomseed(os.time()) function fetch_life_state() @@ -37,11 +36,11 @@ function on_click(x, y) local dimensions = settings.physical_grid_dimensions local screen = settings.display_grid_dimensions - local dimension_x = dimensions._1 - local dimension_y = dimensions._2 + local dimension_x = dimensions[1] + local dimension_y = dimensions[2] - local screen_x = screen._1 - local screen_y = screen._2 + local screen_x = screen[1] + local screen_y = screen[2] local cell_width = screen_x / dimension_x local cell_height = screen_y / dimension_y @@ -78,8 +77,8 @@ function on_update() local cells = fetch_life_state().cells local settings = world.get_resource(Settings) local dimensions = settings.physical_grid_dimensions - local dimension_x = dimensions._1 - local dimension_y = dimensions._2 + local dimension_x = dimensions[1] + local dimension_y = dimensions[2] -- primitives are passed by value to lua, keep a hold of old state but turn 255's into 1's local prev_state = {} diff --git a/assets/scripts/game_of_life.rhai b/assets/scripts/game_of_life.rhai index 0b99e385c7..557cdcf478 100644 --- a/assets/scripts/game_of_life.rhai +++ b/assets/scripts/game_of_life.rhai @@ -40,11 +40,11 @@ fn on_click(x,y) { let dimensions = settings.physical_grid_dimensions; let screen = settings.display_grid_dimensions; - let dimension_x = dimensions["_0"]; - let dimension_y = dimensions["_1"]; + let dimension_x = dimensions[0]; + let dimension_y = dimensions[1]; - let screen_x = screen["_0"]; - let screen_y = screen["_1"]; + let screen_x = screen[0]; + let screen_y = screen[1]; let cell_width = screen_x / dimension_x; let cell_height = screen_y / dimension_y; @@ -77,8 +77,8 @@ fn on_update() { // note that here we do not make use of RhaiProxyable and just go off pure reflection let settings = world.get_resource.call(Settings); let dimensions = settings.physical_grid_dimensions; - let dimension_x = dimensions["_0"]; - let dimension_y = dimensions["_1"]; + let dimension_x = dimensions[0]; + let dimension_y = dimensions[1]; // primitives are passed by value to rhai, keep a hold of old state but turn 255's into 1's let prev_state = []; diff --git a/assets/tests/add_system/added_systems_run_in_parallel.lua b/assets/tests/add_system/added_systems_run_in_parallel.lua index f5c129280c..63788e88fc 100644 --- a/assets/tests/add_system/added_systems_run_in_parallel.lua +++ b/assets/tests/add_system/added_systems_run_in_parallel.lua @@ -41,7 +41,7 @@ digraph { node_16 [label="on_test_post_update"]; node_17 [label="custom_system_a"]; node_18 [label="custom_system_b"]; - node_19 [label="SystemSet AssetEvents"]; + node_19 [label="SystemSet AssetEventSystems"]; node_20 [label="SystemSet GarbageCollection"]; node_21 [label="SystemSet ListeningPhase"]; node_22 [label="SystemSet MachineStartPhase"]; diff --git a/assets/tests/add_system/added_systems_run_in_parallel.rhai b/assets/tests/add_system/added_systems_run_in_parallel.rhai index b87e5e75a9..c3d84302fe 100644 --- a/assets/tests/add_system/added_systems_run_in_parallel.rhai +++ b/assets/tests/add_system/added_systems_run_in_parallel.rhai @@ -40,7 +40,7 @@ digraph { node_16 [label="on_test_post_update"]; node_17 [label="custom_system_a"]; node_18 [label="custom_system_b"]; - node_19 [label="SystemSet AssetEvents"]; + node_19 [label="SystemSet AssetEventSystems"]; node_20 [label="SystemSet GarbageCollection"]; node_21 [label="SystemSet ListeningPhase"]; node_22 [label="SystemSet MachineStartPhase"]; diff --git a/codegen/Cargo.bootstrap.toml b/codegen/Cargo.bootstrap.toml index 90374660ef..ad18aba78d 100644 --- a/codegen/Cargo.bootstrap.toml +++ b/codegen/Cargo.bootstrap.toml @@ -6,7 +6,7 @@ edition = "2024" [dependencies] bevy_mod_scripting_bindings = { path = "{{BMS_BINDINGS_PATH}}" } -bevy_reflect = { version = "0.16.0", features = [ +bevy_reflect = { version = "0.17", features = [ "smol_str", "glam", "petgraph", diff --git a/codegen/build.rs b/codegen/build.rs index b6690b0ffd..cee5f6012f 100644 --- a/codegen/build.rs +++ b/codegen/build.rs @@ -1,8 +1,48 @@ -fn main() { +use std::{ + path::{Path, PathBuf}, + process::Command, +}; + +fn rustc_path(channel: &str) -> PathBuf { + let output = Command::new("rustup") + .args(["which", "--toolchain", channel, "rustc"]) + .output() + .expect("failed to run rustup which"); + + let rustc_path = String::from_utf8(output.stdout).unwrap(); + + PathBuf::from(rustc_path.trim()) +} + +fn target_libdir(rustc: &Path) -> PathBuf { + let output = Command::new(rustc) + .args(["--print", "target-libdir"]) + .output() + .expect("failed to run rustc --print target-libdir"); + + let libdir = String::from_utf8(output.stdout).unwrap(); + + PathBuf::from(libdir.trim()) +} + +pub fn main() { // Use to set RUSTC_CHANNEL so we can compute target dir from rustc_plugin let toolchain_toml = include_str!("rust-toolchain.toml"); let toolchain_table = toolchain_toml.parse::().unwrap(); let toolchain = toolchain_table["toolchain"].as_table().unwrap(); let channel = toolchain["channel"].as_str().unwrap(); println!("cargo:rustc-env=RUSTC_CHANNEL={channel}"); + + // I believe there was some sort of change in cargo, which motivated this change in the original rustc_plugin: + // https://github.com/cognitive-engineering-lab/rustc_plugin/pull/41 + // + // This solves issues with linking to the rustc driver dynamic library, as cargo does not seem to put in the correct LD_LIBRARY_PATH for the driver binary instantiations + // Embedding this in the binary solves the problem + let rustc_path = rustc_path(channel); + let target_libdir = target_libdir(&rustc_path); + + println!( + "cargo::rustc-link-arg=-Wl,-rpath,{}", + target_libdir.display() + ); } diff --git a/codegen/crates/crate_feature_graph/src/feature.rs b/codegen/crates/crate_feature_graph/src/feature.rs index 0f34a8b550..d3471b42e3 100644 --- a/codegen/crates/crate_feature_graph/src/feature.rs +++ b/codegen/crates/crate_feature_graph/src/feature.rs @@ -2,6 +2,7 @@ use std::{ borrow::{Borrow, Cow}, collections::VecDeque, fmt::Display, + hash::Hash, }; use cargo_metadata::{ @@ -49,6 +50,10 @@ impl FeatureName { pub fn new(name: impl Into>) -> Self { Self(name.into()) } + + pub fn is_special_default_enabling_feature(&self) -> bool { + self.0.contains("enable_default_for") + } } impl Display for FeatureName { @@ -218,6 +223,43 @@ impl Ord for CrateDependency { } } +/// A feature activation descriptor within a crate +#[derive(Debug, Clone, Eq)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +pub struct LocalActivatedFeature { + pub feature: FeatureName, + pub activated_via_other_crate: bool, +} + +impl PartialEq for LocalActivatedFeature { + fn eq(&self, other: &Self) -> bool { + self.feature == other.feature + } +} + +impl Ord for LocalActivatedFeature { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + match self.feature.cmp(&other.feature) { + core::cmp::Ordering::Equal => {} + ord => return ord, + } + self.activated_via_other_crate + .cmp(&other.activated_via_other_crate) + } +} + +impl PartialOrd for LocalActivatedFeature { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Hash for LocalActivatedFeature { + fn hash(&self, state: &mut H) { + self.feature.hash(state); + } +} + #[derive(Clone, Debug, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct Crate { @@ -228,7 +270,7 @@ pub struct Crate { pub version: Version, pub in_workspace: Option, pub active_features: Option>, - pub active_dependency_features: Option>>, + pub active_dependency_features: Option>>, pub is_enabled: Option, } diff --git a/codegen/crates/crate_feature_graph/src/graph.rs b/codegen/crates/crate_feature_graph/src/graph.rs index af18cadcc2..e04418189d 100644 --- a/codegen/crates/crate_feature_graph/src/graph.rs +++ b/codegen/crates/crate_feature_graph/src/graph.rs @@ -4,7 +4,7 @@ use indexmap::{IndexMap, IndexSet}; use log::error; use petgraph::Directed; -use crate::{CrateName, DependencyKind, Feature, FeatureName, Workspace}; +use crate::{CrateName, DependencyKind, Feature, FeatureName, LocalActivatedFeature, Workspace}; #[derive(Clone, Debug, PartialEq, Eq)] pub enum DependsOn { @@ -328,12 +328,7 @@ impl WorkspaceGraph { .as_ref() .map(|m| { m.iter() - .map(|(k, v)| { - ( - k.to_string(), - v.iter().map(|f| f.to_string()).collect::>(), - ) - }) + .map(|(k, v)| (k.to_string(), v.iter().collect::>())) .collect() }) .unwrap_or_default(), @@ -345,7 +340,18 @@ impl WorkspaceGraph { active_features.join("\\n"), active_dependencies .iter() - .map(|(k, v)| format!("{}: [{}]", k, v.join(", "))) + .map(|(k, v)| format!( + "{}: [{}]", + k, + v.iter() + .map(|f| format!( + "{}{}", + f.feature, + if f.activated_via_other_crate { String::from(" (*shared)") } else { Default::default() } + )) + .collect::>() + .join(", ") + )) .collect::>() .join("\\n") ); @@ -420,6 +426,7 @@ impl WorkspaceGraph { f.sort() } if let Some(m) = krate.active_dependency_features.as_mut() { + m.sort_keys(); for v in m.values_mut() { v.sort(); } @@ -585,12 +592,37 @@ impl WorkspaceGraph { active_dependency_features .entry((krate.name.clone(), dependency.name.clone())) .or_default() - .push(feature.clone()); + .push(LocalActivatedFeature { + feature: feature.clone(), + activated_via_other_crate: false, + }); } } } + // now go through the active features for this crate, and add remaining features enabled by cargo through other crates + if let Some(entry) = active_dependency_features + .get_mut(&(krate.name.clone(), dependency.name.clone())) + { + // find features on these active deps, that must now be enabled, we show that on the graph with a note + for feat in self + .workspace + .find_crate_opt(&dependency.name) + .iter() + .flat_map(|d| d.active_features.iter()) + .flatten() + .filter(|f| !f.is_special_default_enabling_feature()) + { + // meh + let val = LocalActivatedFeature { + feature: feat.clone(), + activated_via_other_crate: true, + }; + entry.push(val); + } + } } } + // finally remove all enable_default_for_ features not to pollute the output // and insert the previously computed active dependency features for krate in self.workspace.all_crates_mut() { @@ -603,6 +635,16 @@ impl WorkspaceGraph { if let Some(krate) = self.workspace.find_crate_mut(&in_crate, || format!( "package from workspace manifest: `{in_crate}` was not found in the parsed workspace list. While setting active dependency features." )) { + // remove duplicates, but keep the "lowest" activation level to show + let mut feature_set = HashSet::::with_capacity(features.len()); + for mut feat in features.into_iter() { + if let Some(existing) = feature_set.get(&feat) { + feat.activated_via_other_crate = existing.activated_via_other_crate && feat.activated_via_other_crate; + } + feature_set.insert(feat); + } + let features = feature_set.into_iter().collect(); + match krate.active_dependency_features.as_mut() { Some(map) => { map.insert(dependency, features); diff --git a/codegen/rust-toolchain.toml b/codegen/rust-toolchain.toml index d03a332d52..4077610134 100644 --- a/codegen/rust-toolchain.toml +++ b/codegen/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] components = ["clippy", "rust-src", "rustc-dev", "llvm-tools"] -channel = "nightly-2025-06-27" +channel = "nightly-2025-11-08" diff --git a/codegen/src/args.rs b/codegen/src/args.rs index 9380af33f4..815bcbf50f 100644 --- a/codegen/src/args.rs +++ b/codegen/src/args.rs @@ -1,5 +1,6 @@ use cargo_metadata::camino::Utf8PathBuf; use clap::{Parser, Subcommand}; +use rustc_hir::RustcVersion; use serde::{Deserialize, Serialize}; #[derive(Parser, Deserialize, Serialize)] @@ -26,6 +27,10 @@ use serde::{Deserialize, Serialize}; /// /// 5.Generates code using Tera templates given the data gathered from the analysis pub struct Args { + /// the output and artifact directory + #[arg(global = true, short, long, default_value = compute_default_dir(), value_name = "DIR")] + pub output: Utf8PathBuf, + #[command(subcommand)] pub cmd: Command, @@ -74,6 +79,43 @@ pub struct Args { value_delimiter = ',' )] pub exclude_crates: Option>, + + #[arg( + global = true, + short, + long, + help = "The rust version to consider when looking at stability tags etc", + default_value = "1.88.0" + )] + pub minimum_supported_rust_version_target: Option, +} + +impl Args { + /// Returns false if the minimum rustc target is not specified, or specified but smaller than the given version + pub fn rustc_version_is_greater_than_mrsv_target(&self, version: RustcVersion) -> bool { + match self.mrsv_target() { + Some(mrsv) => version > mrsv, + None => false, + } + } + + pub fn mrsv_target(&self) -> Option { + match &self.minimum_supported_rust_version_target { + Some(ver) => { + // Ignore any suffixes such as "-dev" or "-nightly". + let mut components = ver.split('-').next().unwrap().splitn(3, '.'); + let major = components.next()?.parse().ok()?; + let minor = components.next()?.parse().ok()?; + let patch = components.next().unwrap_or("0").parse().ok()?; + Some(RustcVersion { + major, + minor, + patch, + }) + } + None => None, + } + } } #[derive(clap::Args, Debug, Clone, Default, Serialize, Deserialize)] @@ -160,10 +202,6 @@ pub enum Command { ListTemplates, /// Crawls current workspace/crate and generates wrappers for Reflect types using templates Generate { - /// the output and artifact directory - #[arg(short, long, default_value = compute_default_dir(), value_name = "DIR")] - output: Utf8PathBuf, - /// The directory in which to look for templates, if unspecified will use built-in templates #[arg(short, long, value_name = "DIR")] templates: Option, diff --git a/codegen/src/bin/main.rs b/codegen/src/bin/main.rs index 9481a18d0b..2910caf82a 100644 --- a/codegen/src/bin/main.rs +++ b/codegen/src/bin/main.rs @@ -29,6 +29,13 @@ fn main() { info!("Using RUST_LOG: {:?}", env::var("RUST_LOG")); + info!( + "MSRV target: {}", + args.mrsv_target() + .map(|t| t.to_string()) + .unwrap_or(String::from("unset")) + ); + info!("Computing crate metadata"); let metadata = cargo_metadata::MetadataCommand::new() .no_deps() @@ -43,7 +50,7 @@ fn main() { .collect::>(); info!("Computing active features"); - let include_crates = if args.cmd.is_generate() { + let include_crates = if !args.cmd.is_collect() { let workspace = Workspace::from(&metadata); let mut graph = WorkspaceGraph::from(workspace); info!("Using workspace graph: \n{}", graph.to_dot()); diff --git a/codegen/src/callback.rs b/codegen/src/callback.rs index 22d01bd2eb..8bb951ce61 100644 --- a/codegen/src/callback.rs +++ b/codegen/src/callback.rs @@ -37,8 +37,8 @@ impl rustc_driver::Callbacks for BevyAnalyzerCallbacks { let mut meta_dirs = Vec::default(); let mut templates_dir = None; // add all relevant meta dirs to the context + meta_dirs.push(self.args.output.to_owned()); if let crate::Command::Generate { - output, meta, meta_output, templates, @@ -49,7 +49,6 @@ impl rustc_driver::Callbacks for BevyAnalyzerCallbacks { if let Some(meta_output) = meta_output { meta_dirs.push(meta_output.to_owned()) }; - meta_dirs.push(output.to_owned()); meta.iter() .flatten() .for_each(|m| meta_dirs.push(m.to_owned())); @@ -66,6 +65,13 @@ impl rustc_driver::Callbacks for BevyAnalyzerCallbacks { let tera = crate::configure_tera(tcx.crate_name(LOCAL_CRATE).as_str(), &templates_dir); info!("Using meta directories: {meta_dirs:?}"); + + let mut graph = WorkspaceGraph::deserialize(&PathBuf::from( + std::env::var(WORKSPACE_GRAPH_FILE_ENV).unwrap(), + )) + .unwrap(); + graph.stable_sort(); + let mut ctxt = crate::BevyCtxt::new( tcx, &meta_dirs, @@ -77,10 +83,7 @@ impl rustc_driver::Callbacks for BevyAnalyzerCallbacks { tera.render(&TemplateKind::ImportProcessor.to_string(), &ctxt) .unwrap() })), - WorkspaceGraph::deserialize(&PathBuf::from( - std::env::var(WORKSPACE_GRAPH_FILE_ENV).unwrap(), - )) - .unwrap(), + graph, ); trace!("Running all passes"); diff --git a/codegen/src/candidate.rs b/codegen/src/candidate.rs new file mode 100644 index 0000000000..68c2ca5d75 --- /dev/null +++ b/codegen/src/candidate.rs @@ -0,0 +1,383 @@ +use std::borrow::Cow; + +use indexmap::IndexMap; +use rustc_hir::def_id::DefId; +use rustc_middle::ty::{AdtDef, FieldDef, FnSig, TyCtxt, VariantDef, Visibility}; +use rustc_span::Symbol; + +use crate::ReflectionStrategy; + +#[derive(Debug)] +pub struct GenerationCandidate<'tcx, D> { + pub did: Option, + pub friendly_name: Option, + pub def: D, + pub variants: Vec>, + pub excluded_variants: Vec>, + pub trait_impls: IndexMap>, + pub notes: Vec, + pub functions: Vec>, + pub excluded_functions: Vec>, +} + +impl<'tcx, D> GenerationCandidate<'tcx, D> { + pub fn promote(self, def: AdtDef<'tcx>) -> GenerationCandidate<'tcx, AdtDef<'tcx>> { + GenerationCandidate { + def, + friendly_name: self.friendly_name, + did: Some(def.did()), + variants: self.variants, + notes: self.notes, + excluded_variants: self.excluded_variants, + trait_impls: self.trait_impls, + functions: self.functions, + excluded_functions: self.excluded_functions, + } + } +} + +impl Default for GenerationCandidate<'_, D> +where + D: Default, +{ + fn default() -> Self { + Self { + friendly_name: Default::default(), + def: Default::default(), + variants: Default::default(), + notes: Default::default(), + did: Default::default(), + excluded_variants: Default::default(), + trait_impls: Default::default(), + functions: Default::default(), + excluded_functions: Default::default(), + } + } +} + +#[derive(Debug)] +pub struct FunctionCandidate<'tcx> { + pub(crate) fn_name: Symbol, + pub(crate) sig: FnSig<'tcx>, + pub(crate) did: DefId, + pub(crate) visibility: Visibility, + pub(crate) has_self: bool, + pub(crate) is_unsafe: bool, + pub(crate) kind: FunctionCandidateKind, + pub(crate) notes: Vec, + pub(crate) arguments: Vec, + pub(crate) ret: FunctionArgCandidate, +} + +#[derive(Debug)] +pub enum FunctionCandidateKind { + TraitImplMethod { trait_did: DefId, impl_did: DefId }, + Method { impl_did: DefId }, +} + +impl FunctionCandidateKind { + pub fn impl_did(&self) -> DefId { + match self { + FunctionCandidateKind::TraitImplMethod { impl_did, .. } + | FunctionCandidateKind::Method { impl_did } => *impl_did, + } + } + + pub fn as_trait_fn(&self) -> Option<(DefId, DefId)> { + if let FunctionCandidateKind::TraitImplMethod { + trait_did, + impl_did, + } = self + { + Some((*trait_did, *impl_did)) + } else { + None + } + } +} + +#[derive(Debug)] +pub struct FunctionArgCandidate { + pub friendly_name: String, + pub reflection_strategy: ReflectionStrategy, + pub notes: Vec, +} + +impl FunctionArgCandidate { + pub fn new(friendly_name: String) -> Self { + Self { + friendly_name, + reflection_strategy: Default::default(), + notes: Default::default(), + } + } +} + +impl FunctionArgCandidate { + pub fn with_reflection_strategy(mut self, strategy: ReflectionStrategy) -> Self { + self.reflection_strategy = strategy; + self + } +} + +#[derive(Debug)] +pub struct VariantCandidate<'tcx> { + pub def: &'tcx VariantDef, + pub fields: Vec, + pub excluded_fields: Vec, + pub notes: Vec, +} + +impl<'tcx> VariantCandidate<'tcx> { + pub fn new(def: &'tcx VariantDef) -> Self { + Self { + def, + fields: Default::default(), + excluded_fields: Default::default(), + notes: Default::default(), + } + } +} +#[derive(Debug)] +pub struct FieldCandidate { + pub did: DefId, + pub name: Symbol, + // pub vis: Visibility, + // pub safety: Safety, + pub notes: Vec, + pub reflection_strategy: ReflectionStrategy, +} + +impl FieldCandidate { + pub fn new(def: &FieldDef) -> Self { + Self { + did: def.did, + name: def.name, + // vis: def.vis, + // safety: def.safety, + notes: Default::default(), + reflection_strategy: ReflectionStrategy::Filtered, + } + } + + pub fn with_reflection_strategy(mut self, strategy: ReflectionStrategy) -> Self { + self.reflection_strategy = strategy; + self + } +} + +#[derive(Debug, Clone)] +pub enum GenerationExclusionNote { + Reason(String), +} + +impl std::fmt::Display for GenerationExclusionNote { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.write_str("Excluded: ")?; + match self { + GenerationExclusionNote::Reason(reason) => f.write_str(reason.as_str())?, + } + Ok(()) + } +} + +pub trait Annotated { + fn with_note(self, note: GenerationExclusionNote) -> Self; + fn applying_notes(&self) -> impl Iterator; + fn friendly_name<'a, 'tcx>(&'a self, tcx: TyCtxt<'tcx>) -> Cow<'a, str> + where + 'tcx: 'a; +} + +impl Annotated for GenerationCandidate<'_, D> { + fn with_note(mut self, note: GenerationExclusionNote) -> Self { + self.notes.push(note); + self + } + + fn applying_notes(&self) -> impl Iterator { + self.notes + .iter() + .chain(self.variants.iter().flat_map(|v| v.applying_notes())) + .chain( + self.excluded_variants + .iter() + .flat_map(|v| v.applying_notes()), + ) + .chain(self.functions.iter().flat_map(|f| f.applying_notes())) + .chain( + self.excluded_functions + .iter() + .flat_map(|f| f.applying_notes()), + ) + } + fn friendly_name<'a, 'tcx>(&'a self, tcx: TyCtxt<'tcx>) -> Cow<'a, str> + where + 'tcx: 'a, + { + self.did + .map(|did| format!("{}::{}", tcx.crate_name(did.krate), tcx.item_name(did)).into()) + .unwrap_or(Cow::Borrowed("unknown")) + } +} + +impl Annotated for VariantCandidate<'_> { + fn with_note(mut self, note: GenerationExclusionNote) -> Self { + self.notes.push(note); + self + } + + fn applying_notes(&self) -> impl Iterator { + self.notes + .iter() + .chain(self.fields.iter().flat_map(|f| f.applying_notes())) + .chain(self.excluded_fields.iter().flat_map(|f| f.applying_notes())) + } + + fn friendly_name<'a, 'tcx>(&'a self, _tcx: TyCtxt<'tcx>) -> Cow<'a, str> + where + 'tcx: 'a, + { + self.def.name.as_str().into() + } +} + +impl Annotated for FieldCandidate { + fn with_note(mut self, note: GenerationExclusionNote) -> Self { + self.notes.push(note); + self + } + + fn applying_notes(&self) -> impl Iterator { + self.notes.iter() + } + + fn friendly_name<'a, 'tcx>(&'a self, _tcx: TyCtxt<'tcx>) -> Cow<'a, str> + where + 'tcx: 'a, + { + self.name.as_str().into() + } +} + +impl<'tcx> Annotated for FunctionCandidate<'tcx> { + fn with_note(mut self, note: GenerationExclusionNote) -> Self { + self.notes.push(note); + self + } + + fn applying_notes(&self) -> impl Iterator { + self.notes + .iter() + .chain(self.arguments.iter().flat_map(|a| a.applying_notes())) + .chain(self.ret.applying_notes()) + } + + fn friendly_name<'a, 'b>(&'a self, _tcx: TyCtxt<'b>) -> Cow<'a, str> + where + 'b: 'a, + { + self.fn_name.as_str().into() + } +} + +impl Annotated for FunctionArgCandidate { + fn with_note(mut self, note: GenerationExclusionNote) -> Self { + self.notes.push(note); + self + } + + fn applying_notes(&self) -> impl Iterator { + self.notes.iter() + } + + fn friendly_name<'a, 'tcx>(&'a self, _tcx: TyCtxt<'tcx>) -> Cow<'a, str> + where + 'tcx: 'a, + { + (&self.friendly_name).into() + } +} + +pub struct AnnotationContextCollector<'n, 'tcx> { + notes_with_context: Vec<(String, &'n GenerationExclusionNote)>, + ctxt: TyCtxt<'tcx>, +} + +impl<'n, 'tcx> AnnotationContextCollector<'n, 'tcx> { + pub fn new(ctxt: TyCtxt<'tcx>) -> Self { + Self { + notes_with_context: Default::default(), + ctxt, + } + } + + pub fn build(self) -> Vec<(String, &'n GenerationExclusionNote)> { + self.notes_with_context + } + + pub fn annotate(&mut self, candidate: &'n GenerationCandidate<'tcx, D>) { + let ctxt = candidate.friendly_name(self.ctxt); + + for note in &candidate.notes { + self.notes_with_context.push((ctxt.to_string(), note)) + } + + for variant in &candidate.excluded_variants { + self.annotate_variant(&ctxt, variant); + } + + for variant in &candidate.variants { + self.annotate_variant(&ctxt, variant); + } + + for function in &candidate.excluded_functions { + self.annotate_function(&ctxt, function); + } + } + + pub fn annotate_variant(&mut self, ctxt: &str, variant: &'n VariantCandidate<'tcx>) { + let ctxt = format!("{ctxt}::{}", variant.friendly_name(self.ctxt)); + + for note in &variant.notes { + self.notes_with_context.push((ctxt.to_string(), note)) + } + + for field in &variant.fields { + self.annotate_field(&ctxt, field) + } + + for field in &variant.excluded_fields { + self.annotate_field(&ctxt, field) + } + } + + pub fn annotate_field(&mut self, ctxt: &str, field: &'n FieldCandidate) { + let ctxt = format!("{ctxt}::{}", field.friendly_name(self.ctxt)); + for note in &field.notes { + self.notes_with_context.push((ctxt.to_string(), note)) + } + } + + fn annotate_function(&mut self, ctxt: &str, function: &'n FunctionCandidate<'tcx>) { + let ctxt = format!("{ctxt}::{}", function.friendly_name(self.ctxt)); + + for note in &function.notes { + self.notes_with_context.push((ctxt.to_string(), note)) + } + + for arg in &function.arguments { + self.annotate_arg(&ctxt, arg); + } + + self.annotate_arg(&ctxt, &function.ret) + } + + fn annotate_arg(&mut self, ctxt: &str, arg: &'n FunctionArgCandidate) { + let ctxt = format!("{ctxt}::{}", arg.friendly_name(self.ctxt)); + + for note in &arg.notes { + self.notes_with_context.push((ctxt.to_string(), note)) + } + } +} diff --git a/codegen/src/context.rs b/codegen/src/context.rs index 6120402b31..f8ef2b692e 100644 --- a/codegen/src/context.rs +++ b/codegen/src/context.rs @@ -8,12 +8,13 @@ use rustc_hir::def_id::DefId; use rustc_middle::ty::{AdtDef, TyCtxt}; use serde::Serialize; -use crate::{ImportPathFinder, MetaLoader, TemplateContext}; +use crate::{ImportPathFinder, MetaLoader, TemplateContext, candidate::GenerationCandidate}; pub(crate) struct BevyCtxt<'tcx> { pub(crate) tcx: TyCtxt<'tcx>, pub(crate) meta_loader: MetaLoader, - pub(crate) reflect_types: IndexMap>, + pub(crate) reflect_types: IndexMap>>, + pub(crate) excluded_reflect_types: Vec>>>, pub(crate) cached_traits: CachedTraits, pub(crate) path_finder: ImportPathFinder<'tcx>, pub(crate) workspace: WorkspaceGraph, @@ -35,6 +36,7 @@ impl<'tcx> BevyCtxt<'tcx> { Self { tcx, reflect_types: Default::default(), + excluded_reflect_types: Default::default(), cached_traits: Default::default(), meta_loader: MetaLoader::new(meta_dirs.to_vec(), workspace_meta), template_context: Default::default(), @@ -58,34 +60,6 @@ impl<'tcx> BevyCtxt<'tcx> { } } -#[derive(Clone, Default, Debug)] -pub(crate) struct ReflectType<'tcx> { - /// Map from traits to their implementations for the reflect type (from a selection) - pub(crate) trait_impls: Option>>, - /// Information about the ADT structure, fields, and variants - pub(crate) variant_data: Option>, - /// Functions passing criteria to be proxied - pub(crate) valid_functions: Option>, - - /// Mapping from fields to the reflection strategy - field_reflection_types: IndexMap, -} - -impl ReflectType<'_> { - pub(crate) fn set_field_reflection_strategies< - I: Iterator, - >( - &mut self, - field_strats: I, - ) { - self.field_reflection_types = field_strats.collect(); - } - - pub(crate) fn get_field_reflection_strat(&self, field: DefId) -> Option<&ReflectionStrategy> { - self.field_reflection_types.get(&field) - } -} - pub(crate) const DEF_PATHS_BMS_FROM_SCRIPT: [&str; 2] = ["bevy_mod_scripting_bindings::FromScript", "FromScript"]; pub(crate) const DEF_PATHS_BMS_INTO_SCRIPT: [&str; 2] = @@ -190,17 +164,7 @@ impl CachedTraits { // } } -#[derive(Clone, Debug)] -pub(crate) struct FunctionContext { - pub(crate) def_id: DefId, - pub(crate) has_self: bool, - pub(crate) is_unsafe: bool, - pub(crate) trait_and_impl_did: Option<(DefId, DefId)>, - /// strategies for input and output (last element is the output) - pub(crate) reflection_strategies: Vec, -} - -#[derive(PartialEq, Eq, Clone, Copy, Serialize, Debug)] +#[derive(PartialEq, Eq, Clone, Copy, Serialize, Debug, Default)] pub(crate) enum ReflectionStrategy { /// The will have a known wrapper we can use Proxy, @@ -209,5 +173,6 @@ pub(crate) enum ReflectionStrategy { /// Use a reflection primitive i.e. 'ReflectedValue', dynamic runtime reflection Reflection, /// Either ignored via 'reflect(ignore)' or not visible + #[default] Filtered, } diff --git a/codegen/src/driver/mod.rs b/codegen/src/driver/mod.rs index f963ff39e1..3ad259c229 100644 --- a/codegen/src/driver/mod.rs +++ b/codegen/src/driver/mod.rs @@ -19,7 +19,7 @@ pub const CARGO_VERBOSE: &str = "CARGO_VERBOSE"; pub const WORKSPACE_GRAPH_FILE_ENV: &str = "WORKSPACE_GRAPH_FILE"; pub fn fetch_target_directory(metadata: &Metadata) -> Utf8PathBuf { - let plugin_subdir = format!("plugin-{}", env!("RUSTC_CHANNEL")); + let plugin_subdir = format!("plugin-{}", crate::CHANNEL); metadata.target_directory.join(plugin_subdir) } @@ -197,7 +197,7 @@ pub fn driver_main(plugin: T) { // the driver directly without having to pass --sysroot or anything let mut args: Vec = orig_args.clone(); if !have_sys_root_arg { - args.extend(["--sysroot".into(), sys_root]); + args.extend(["--sysroot".into(), sys_root.clone()]); }; // On a given invocation of rustc, we have to decide whether to act as rustc, @@ -215,16 +215,15 @@ pub fn driver_main(plugin: T) { let run_plugin = !normal_rustc && is_target_crate; + // TODO: this is dangerous + // ignore all lints that could break the comp in crates that we don't care about + // args.extend([String::from("--cap-lints"), String::from("warn")]); if run_plugin { - // TODO: this is dangerous - args.extend([String::from("--cap-lints"), String::from("warn")]); log::debug!("Running plugin on crate: {crate_being_built}"); let plugin_args: T::Args = serde_json::from_str(&env::var(PLUGIN_ARGS).unwrap()).unwrap(); plugin.run(args, plugin_args); } else { - // ignore all lints that could break the comp in crates that we don't care about - args.extend([String::from("--cap-lints"), String::from("warn")]); log::debug!( "Running normal Rust. Relevant variables:\ normal_rustc={normal_rustc}, \ diff --git a/codegen/src/import_path.rs b/codegen/src/import_path.rs index 4bae0d0f0a..b981d0e636 100644 --- a/codegen/src/import_path.rs +++ b/codegen/src/import_path.rs @@ -12,6 +12,18 @@ pub(crate) enum ImportPathElement { Rename(DefId, String), /// direct import of the def id by name Item(DefId), + /// A crate root + Crate(CrateNum), +} + +impl ImportPathElement { + pub fn def_id(&self) -> Option { + Some(match self { + Self::Rename(did, _) => *did, + Self::Item(did) => *did, + _ => return None, + }) + } } impl std::fmt::Debug for ImportPathElement { @@ -19,6 +31,7 @@ impl std::fmt::Debug for ImportPathElement { match self { ImportPathElement::Rename(did, name) => write!(f, "{did:?} as {name}"), ImportPathElement::Item(did) => write!(f, "{did:?}"), + ImportPathElement::Crate(crate_num) => write!(f, "{crate_num:?}"), } } } @@ -49,17 +62,20 @@ impl<'tcx> ImportPathFinder<'tcx> { } pub(crate) fn crawl_crate(&mut self, crate_num: CrateNum) { - self.crawl_module(crate_num.as_def_id(), &[]) + self.crawl_module( + crate_num.as_def_id(), + &[ImportPathElement::Crate(crate_num)], + ); + // sort by length of path, shortest wins + self.cache.iter_mut().for_each(|(_, paths)| { + paths.sort_by_key(|a| a.len()); + }); } fn crawl_module(&mut self, did: DefId, frontier: &[ImportPathElement]) { trace!("Crawling module {did:?}"); - let mut new_frontier = frontier.to_vec(); - new_frontier.push(ImportPathElement::Item(did)); - // do not allow modification or weird things happen - let new_frontier = &new_frontier; - + // Get children of the module let children = if did.is_local() { self.tcx.module_children_local(did.expect_local()) } else { @@ -67,49 +83,88 @@ impl<'tcx> ImportPathFinder<'tcx> { }; for child in children { - let rename = child.ident.to_string(); + // Skip if the child has no DefId + let did = match child.res.opt_def_id() { + Some(did) => did, + None => { + trace!("Skipping child without did {:?}", child.ident); + continue; + } + }; + // Skip private items if we don't include them if !self.include_private_paths && !child.vis.is_public() { - trace!("Skipping private child {rename:?}"); + trace!("Skipping private child {:?}", child.ident); continue; } - let did = if let Some(did) = child.res.opt_def_id() { - did - } else { - continue; - }; - - trace!( - "Crawling item: '{:?}', of kind: '{:?}'", - did, - self.tcx.def_kind(did) - ); + // skip non local items, i.e. don't go crawling serde + if !did.is_local() { + trace!("Skipping non-local child {:?}", child.ident); + // continue; + } - match self.tcx.def_kind(did) { - DefKind::Mod => self.crawl_module(did, new_frontier), - DefKind::Struct | DefKind::Union | DefKind::Enum | DefKind::Trait => { - // save the rename and the def id + let rename = (Some(child.ident.name) != self.tcx.opt_item_name(did)) + .then_some(child.ident.as_str()); - let mut new_frontier = new_frontier.clone(); - new_frontier.push(ImportPathElement::Rename(did, rename)); + self.crawl_item(did, frontier, rename); + } + } - trace!("saving import path for {did:?}: {new_frontier:?}"); - self.cache.entry(did).or_default().push(new_frontier); + fn crawl_item(&mut self, did: DefId, frontier: &[ImportPathElement], rename: Option<&str>) { + trace!( + "Crawling item: '{:?}', of kind: '{:?}'", + did, + self.tcx.def_kind(did) + ); + + match self.tcx.def_kind(did) { + DefKind::Mod => { + // Only recurse if this DefId is not already in the current path + if frontier + .iter() + .any(|el| el.def_id().is_some_and(|id| id == did)) + { + trace!("Cycle detected for {did:?}, skipping recursion"); + return; } - _ => continue, + let mut new_frontier = frontier.to_vec(); + new_frontier.push( + rename + .map(|rename| ImportPathElement::Rename(did, rename.to_string())) + .unwrap_or(ImportPathElement::Item(did)), + ); + + self.crawl_module(did, &new_frontier) } + + DefKind::Struct | DefKind::Union | DefKind::Enum | DefKind::Trait => { + // Save the rename and the DefId + let mut path_for_item = frontier.to_vec(); + + path_for_item.push(ImportPathElement::Item(did)); + + trace!("Saving import path for {did:?}: {path_for_item:?}"); + self.cache.entry(did).or_default().push(path_for_item); + } + + _ => (), } } + /// Like find_import_paths but won't always return at least one path + pub(crate) fn find_import_paths_no_fallback(&self, def_id: DefId) -> Option> { + self.cache.get(&def_id).map(|v| { + v.iter() + .map(|elems| self.import_path_to_def_string(elems)) + .collect() + }) + } + + /// Finds the import path for the item if there is one given the current settings + /// or returns a fallback value based on the defID which might not be accurate pub(crate) fn find_import_paths(&self, def_id: DefId) -> Vec { - self.cache - .get(&def_id) - .map(|v| { - v.iter() - .map(|elems| self.import_path_to_def_string(elems)) - .collect() - }) + self.find_import_paths_no_fallback(def_id) .unwrap_or_else(|| { let path = self.tcx.def_path_str(def_id); if let Some(p) = &self.import_path_processor { @@ -125,7 +180,19 @@ impl<'tcx> ImportPathFinder<'tcx> { .iter() .map(|elem| match elem { ImportPathElement::Rename(_, name) => name.to_owned(), - ImportPathElement::Item(did) => self.tcx.item_name(*did).to_ident_string(), + ImportPathElement::Item(did) => self + .tcx + .opt_item_name(*did) + .expect("missing item name") + .to_ident_string(), + ImportPathElement::Crate(crate_num) => { + self.tcx.crate_name(*crate_num).to_ident_string() + } + }) + .inspect(|e| { + if e.is_empty() { + panic!("empty path elem: {e}") + } }) .collect::>() .join("::"); diff --git a/codegen/src/lib.rs b/codegen/src/lib.rs index 32d2e6a058..de0271bbe6 100644 --- a/codegen/src/lib.rs +++ b/codegen/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(rustc_private, let_chains)] +#![feature(rustc_private)] #![deny(rustc::internal)] extern crate rustc_ast; @@ -17,6 +17,7 @@ extern crate rustc_trait_selection; mod args; mod callback; +mod candidate; mod context; mod import_path; mod meta; @@ -39,3 +40,6 @@ pub use template::{ Collect, Crate, TEMPLATE_DIR, TemplateKind, configure_tera, extend_context_with_args, }; pub mod driver; + +/// The rustc toolchain this crate was built with and needs to work with +pub const CHANNEL: &str = env!("RUSTC_CHANNEL"); diff --git a/codegen/src/meta.rs b/codegen/src/meta.rs index fa4afdc930..35590fcb3e 100644 --- a/codegen/src/meta.rs +++ b/codegen/src/meta.rs @@ -7,6 +7,7 @@ use std::{ use cargo_metadata::camino::Utf8PathBuf; use chrono::NaiveDateTime; +use indexmap::IndexMap; use log::trace; use rustc_hir::def_id::DefPathHash; use serde::{Deserialize, Serialize, Serializer}; @@ -38,7 +39,7 @@ pub struct Meta { pub(crate) version: String, /// a map of crate names to the features that crate was compiled with - pub(crate) dependencies: HashMap, + pub(crate) dependencies: IndexMap, } #[derive(Serialize, Deserialize, Clone, Debug)] diff --git a/codegen/src/passes/cache_traits.rs b/codegen/src/passes/cache_traits.rs index d44f30eadb..b06e6aef72 100644 --- a/codegen/src/passes/cache_traits.rs +++ b/codegen/src/passes/cache_traits.rs @@ -10,7 +10,7 @@ use crate::{ fn dump_traits(tcx: &TyCtxt) -> String { let mut buffer = String::new(); - for t in tcx.all_traits() { + for t in tcx.all_traits_including_private() { buffer.push_str(&tcx.def_path_str(t)); buffer.push_str(", "); } @@ -21,7 +21,7 @@ fn dump_traits(tcx: &TyCtxt) -> String { pub(crate) fn cache_traits(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { let tcx = &ctxt.tcx; - for trait_did in tcx.all_traits() { + for trait_did in tcx.all_traits_including_private() { let def_path_str = tcx.def_path_str(trait_did); if DEF_PATHS_REFLECT.contains(&def_path_str.as_str()) { trace!("found Reflect trait def id: {trait_did:?}"); diff --git a/codegen/src/passes/codegen.rs b/codegen/src/passes/codegen.rs index 7584b2256a..4f3d2af650 100644 --- a/codegen/src/passes/codegen.rs +++ b/codegen/src/passes/codegen.rs @@ -11,24 +11,23 @@ use crate::{Args, BevyCtxt, TemplateKind, configure_tera}; /// generates a module with the appropriate wrappers for all the found reflection ADT's in the crate pub(crate) fn codegen(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bool { - let (output, templates) = match &args.cmd { - crate::Command::Generate { - output, templates, .. - } => (output, templates), + let templates = match &args.cmd { + crate::Command::Generate { templates, .. } => templates, _ => return true, }; let tera = configure_tera(ctxt.tcx.crate_name(LOCAL_CRATE).as_str(), templates); // perform code gen using templates - fs::create_dir_all(output).unwrap(); - info!("Writing code files to : {output}"); + fs::create_dir_all(&args.output).unwrap(); + info!("Writing code files to : {}", args.output); let template_data = ctxt.template_context.as_ref().unwrap(); let mut context = Context::from_serialize(template_data).unwrap(); crate::extend_context_with_args(args.template_args.as_deref(), &mut context); // generate crate artifact - let mut file = File::create(output.join(format!("{}.rs", template_data.crate_name))).unwrap(); + let mut file = + File::create(args.output.join(format!("{}.rs", template_data.crate_name))).unwrap(); match tera.render_to( &TemplateKind::CrateArtifact.to_string(), diff --git a/codegen/src/passes/crawl_paths.rs b/codegen/src/passes/crawl_paths.rs index 64f44893e1..fd2a4cf8af 100644 --- a/codegen/src/passes/crawl_paths.rs +++ b/codegen/src/passes/crawl_paths.rs @@ -6,8 +6,8 @@ use crate::{Args, BevyCtxt}; pub(crate) fn crawl_paths(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { ctxt.path_finder.crawl_crate(LOCAL_CRATE); - // for c in ctxt.tcx.crates(()) { - // ctxt.path_finder.crawl_crate(*c); - // } + for c in ctxt.tcx.crates(()) { + ctxt.path_finder.crawl_crate(*c); + } true } diff --git a/codegen/src/passes/find_methods_and_fields.rs b/codegen/src/passes/find_methods_and_fields.rs index 7efe4d8427..a054ebb145 100644 --- a/codegen/src/passes/find_methods_and_fields.rs +++ b/codegen/src/passes/find_methods_and_fields.rs @@ -1,294 +1,332 @@ +use std::io::Write; + use indexmap::IndexMap; -use log::{info, trace}; +use itertools::Itertools; +use log::trace; use rustc_hir::{ - Safety, + StableSince, def_id::{DefId, LOCAL_CRATE}, }; use rustc_infer::infer::TyCtxtInferExt; -use rustc_middle::ty::{ - AdtKind, AssocKind, FieldDef, FnSig, GenericArgs, Ty, TyCtxt, TyKind, TypingEnv, -}; +use rustc_middle::ty::{AdtDef, AssocKind, FnSig, GenericArgs, Ty, TyCtxt, TyKind, TypingEnv}; use rustc_span::Symbol; use rustc_trait_selection::infer::InferCtxtExt; use crate::{ - Args, BevyCtxt, CachedTraits, FunctionContext, MetaLoader, ReflectType, ReflectionStrategy, + Args, BevyCtxt, CachedTraits, MetaLoader, ReflectionStrategy, + candidate::{ + Annotated, AnnotationContextCollector, FieldCandidate, FunctionArgCandidate, + FunctionCandidate, FunctionCandidateKind, GenerationCandidate, GenerationExclusionNote, + VariantCandidate, + }, }; /// Finds all methods and fields which can be wrapped on a proxy, stores them in sorted order. -pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { +pub(crate) fn find_methods_and_fields(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bool { // we need to find all the methods and fields for which we want to generate lua bindings // we have to filter some out // go through all impls on the types (traits and non-traits) and pick signatures we're happy with // borrow checker fucky wucky - let reflect_types = ctxt.reflect_types.keys().cloned().collect::>(); - for def_id in reflect_types { - let adt_def = ctxt.tcx.adt_def(def_id); - - match adt_def.adt_kind() { - AdtKind::Enum => { - let strats = adt_def - .variants() - .iter() - .flat_map(|variant| { - if has_reflect_ignore_attr(ctxt.tcx.get_attrs_unchecked(variant.def_id)) { - // TODO: is this the right approach? do we need to still include those variants? or do we just provide dummies - // or can we just skip those ? - info!( - "ignoring enum variant: {}::{} due to 'reflect(ignore)' attribute", - ctxt.tcx.item_name(def_id), - variant.name - ); - todo!(); - } - let param_env = TypingEnv::non_body_analysis(ctxt.tcx, variant.def_id); - process_fields( - ctxt.tcx, - &ctxt.meta_loader, - &ctxt.reflect_types, - &ctxt.cached_traits, - variant.fields.iter(), - param_env, - ) - }) - .collect::>(); - - strats.iter().for_each(|(f_did, strat)| match strat { - ReflectionStrategy::Reflection => report_field_not_supported( - ctxt.tcx, - *f_did, - def_id, - None, - "type is neither a proxy nor a type expressible as lua primitive", - ), - ReflectionStrategy::Filtered => report_field_not_supported( - ctxt.tcx, - *f_did, - def_id, - None, - "field has a 'reflect(ignore)' attribute", - ), - _ => {} - }); - - let ty_ctxt = ctxt.reflect_types.get_mut(&def_id).unwrap(); - ty_ctxt.variant_data = Some(adt_def); - ty_ctxt.set_field_reflection_strategies(strats.into_iter()); - } - AdtKind::Struct => { - let param_env = TypingEnv::non_body_analysis(ctxt.tcx, def_id); - let fields = process_fields( - ctxt.tcx, - &ctxt.meta_loader, - &ctxt.reflect_types, - &ctxt.cached_traits, - adt_def.all_fields(), - param_env, - ); - fields.iter().for_each(|(f_did, strat)| match strat { - ReflectionStrategy::Reflection => report_field_not_supported( - ctxt.tcx, - *f_did, - def_id, - None, - "type is neither a proxy nor a type expressible as lua primitive", - ), - ReflectionStrategy::Filtered => report_field_not_supported( - ctxt.tcx, - *f_did, - def_id, - None, - "field has a 'reflect(ignore)' attribute", - ), - _ => {} - }); - let ty_ctxt = ctxt.reflect_types.get_mut(&def_id).unwrap(); - assert!(ty_ctxt.variant_data.is_none(), "variant data already set!"); - ty_ctxt.variant_data = Some(adt_def); - ty_ctxt.set_field_reflection_strategies(fields.into_iter()); - } - t => panic!( - "Unexpected item type, all `Reflect` implementing items should be enums or structs. : {t:?}" - ), - }; + // let mut reflect_types = std::mem::take(&mut ctxt.reflect_types); + let all_def_ids = ctxt.reflect_types.keys().cloned().collect::>(); + for def_id in all_def_ids { + let (variants, excluded_variants) = generate_variants(ctxt, def_id); + + // filter the list of all methods and select candidates applicable to proxy generation + let mut all_impls = { + let trait_impls = &ctxt.reflect_types[&def_id].trait_impls; - // borrow checker fucky wucky pt2 - let trait_impls_for_ty = { - let ty_ctxt = ctxt.reflect_types.get(&def_id).unwrap(); - ty_ctxt.trait_impls.as_ref() - .expect("A type was not processed correctly in a previous pass, missing trait impl info") - .values() + ctxt.tcx + .inherent_impls(def_id) + .iter() + .chain(trait_impls.iter().flat_map(|(_, impl_did)| impl_did)) .cloned() .collect::>() }; - // should we not find functions set default value for future passes - let ty_ctxt = ctxt.reflect_types.get_mut(&def_id).unwrap(); - assert!( - ty_ctxt.valid_functions.is_none(), - "valid functions already set!" - ); - ty_ctxt.valid_functions = Some(Vec::default()); - - // filter the list of all methods and select candidates applicable to proxy generation - let mut all_impls = ctxt - .tcx - .inherent_impls(def_id) - .iter() - .chain(trait_impls_for_ty.iter().flatten()) - .collect::>(); - // sort them to avoid unnecessary diffs, we can use hashes here as they are forever stable (touch wood) - all_impls.sort_by_cached_key(|a| ctxt.tcx.def_path_hash(**a)); + all_impls.sort_by_cached_key(|a| ctxt.tcx.def_path_hash(*a)); for impl_did in all_impls { - let functions = ctxt + let (functions, excluded_functions) = generate_functions(ctxt, args, def_id, impl_did); + + let candidate = &mut ctxt.reflect_types[&def_id]; + candidate.functions.extend(functions); + candidate.excluded_functions.extend(excluded_functions); + } + let candidate = &mut ctxt.reflect_types[&def_id]; + candidate.variants.extend(variants); + candidate.excluded_variants.extend(excluded_variants); + } + + if args.cmd.is_list_types() { + let stdout = std::io::stdout(); + let mut handle = stdout.lock(); + + writeln!( + handle, + "included generation candidates in crate: {}", + ctxt.tcx.crate_name(LOCAL_CRATE) + ) + .unwrap(); + for (did, candidate) in ctxt.reflect_types.iter() { + writeln!(handle, "{:?}", ctxt.tcx.def_path_str(did)).unwrap(); + writeln!(handle, "Exclusions: ").unwrap(); + let mut annotator = AnnotationContextCollector::new(ctxt.tcx); + annotator.annotate(candidate); + let built = annotator.build(); + for (ctxt, annotation) in built { + writeln!(handle, "{ctxt} : {annotation}").unwrap(); + } + } + writeln!( + handle, + "excluded generation candidates in crate: {}", + ctxt.tcx.crate_name(LOCAL_CRATE) + ) + .unwrap(); + for candidate in ctxt.excluded_reflect_types.iter() { + if let Some(did) = candidate.did { + writeln!(handle, "{:?}", ctxt.tcx.def_path_str(did)).unwrap(); + } + writeln!(handle, "Exclusions: ").unwrap(); + let mut annotator = AnnotationContextCollector::new(ctxt.tcx); + annotator.annotate(candidate); + let built = annotator.build(); + for (ctxt, annotation) in built { + writeln!(handle, "{ctxt} : {annotation}").unwrap(); + } + } + return false; + } + + true +} + +fn generate_functions<'tcx>( + ctxt: &mut BevyCtxt<'tcx>, + args: &Args, + def_id: DefId, + impl_did: DefId, +) -> (Vec>, Vec>) { + let (functions, excluded_functions): (Vec<_>, Vec<_>) = ctxt + .tcx + .associated_items(impl_did) + .in_definition_order() + .filter_map(|assoc_item| { + if !matches!(assoc_item.kind, AssocKind::Fn { .. }) { + return None; + } + + let (fn_name, has_self) = match assoc_item.kind { + AssocKind::Fn { has_self, name } => (name, has_self), + _ => return None, + }; + + let trait_did = ctxt .tcx - .associated_items(impl_did) - .in_definition_order() - .filter_map(|assoc_item| { - if !matches!(assoc_item.kind, AssocKind::Fn { .. }) { - return None; - } + .impl_opt_trait_ref(impl_did) + .map(|tr| tr.skip_binder().def_id); + let param_env = TypingEnv::non_body_analysis(ctxt.tcx, def_id); + let fn_did = assoc_item.def_id; + let fn_sig = ctxt.tcx.fn_sig(fn_did).instantiate_identity(); + let sig: FnSig = ctxt + .tcx + .normalize_erasing_late_bound_regions(param_env, fn_sig); + Some(FunctionCandidate { + fn_name, + did: fn_did, + visibility: assoc_item.visibility(ctxt.tcx), + sig, + has_self, + is_unsafe: sig.safety.is_unsafe(), + kind: trait_did + .map(|trait_did| FunctionCandidateKind::TraitImplMethod {trait_did,impl_did}) + .unwrap_or(FunctionCandidateKind::Method { impl_did }), + notes: vec![], + arguments: vec![], + ret: FunctionArgCandidate::new(String::from("Return value")), + }) + }) + .map(|mut fn_candidate| { - let (fn_name, has_self) = match assoc_item.kind { - AssocKind::Fn { has_self, name } => (name, has_self), - _ => return None, - }; - - let trait_did = ctxt - .tcx - .impl_trait_ref(*impl_did) - .map(|tr| tr.skip_binder().def_id); - let trait_name = trait_did - .map(|td| ctxt.tcx.item_name(td).to_ident_string()) - .unwrap_or_else(|| "None".to_string()); - - let fn_name = fn_name.to_ident_string(); - let fn_did = assoc_item.def_id; - - trace!( - "Processing function: '{fn_name}' on type: `{}` on trait: `{trait_name}`", - ctxt.tcx.item_name(def_id) - ); - - let param_env = TypingEnv::non_body_analysis(ctxt.tcx, def_id); - let fn_sig = ctxt.tcx.fn_sig(fn_did).instantiate_identity(); - let sig: FnSig = ctxt - .tcx - .normalize_erasing_late_bound_regions(param_env, fn_sig); - - let function_generics = get_function_generics(ctxt.tcx, fn_did, *impl_did); - - if !function_generics.is_empty() { - log::debug!( - "Skipping function: `{}` on type: `{}` as it has generics: {:?}", - fn_name, - ctxt.tcx.item_name(def_id), - function_generics - ); - return None; - } + if !fn_candidate.visibility.is_public() { + return Err(fn_candidate.with_note(GenerationExclusionNote::Reason(String::from("function is not public")))) + } - if let Some(unstability) = ctxt.tcx.lookup_stability(fn_did) - && unstability.is_unstable() - { - log::debug!( - "Skipping unstable function: `{}` on type: `{}` feature: {:?}", - ctxt.tcx.item_name(fn_did), - ctxt.tcx.item_name(def_id), - unstability.feature.as_str() - ); - return None; - }; - - let is_unsafe = sig.safety == Safety::Unsafe; - - if trait_did.is_none() && !ctxt.tcx.visibility(fn_did).is_public() { - log::info!( - "Skipping non-public function: `{}` on type: `{}`", - fn_name, - ctxt.tcx.item_name(def_id) - ); - return None; - } + let function_generics = + get_function_generics(ctxt.tcx, fn_candidate.did, fn_candidate.kind.impl_did()); - let arg_names = ctxt.tcx.fn_arg_idents(fn_did); - - let mut reflection_strategies = Vec::with_capacity(sig.inputs().len()); - for (idx, arg_ty) in sig.inputs().iter().enumerate() { - if type_is_supported_as_non_proxy_arg( - ctxt.tcx, - param_env, - &ctxt.cached_traits, - *arg_ty, - ) { - reflection_strategies.push(ReflectionStrategy::Primitive); - } else if type_is_supported_as_proxy_arg( - ctxt.tcx, - &ctxt.reflect_types, - &ctxt.meta_loader, - *arg_ty, - ) { - reflection_strategies.push(ReflectionStrategy::Proxy); - } else { - report_fn_arg_not_supported( - ctxt.tcx, - fn_did, - def_id, - *arg_ty, - &format!( - "argument \"{:?}\" at idx {idx} not supported", - arg_names[idx] - ), - ); - return None; - } + if !function_generics.is_empty() { + return Err(fn_candidate.with_note(GenerationExclusionNote::Reason(format!( + "function has generics: {function_generics:?}" + )))); + } + + let stability = ctxt.tcx.lookup_stability(fn_candidate.did); + let is_stable_for_target = stability + .map(|stability| match stability.stable_since() { + Some(StableSince::Version(rustc_version)) => { + !args.rustc_version_is_greater_than_mrsv_target(rustc_version) } + _ => false, + }) + .unwrap_or(true); + + if !is_stable_for_target { + return Err(fn_candidate.with_note(GenerationExclusionNote::Reason(format!( + "function is not stable for the target: {:?} or unstable. Item stability: {stability:?}", + args.mrsv_target() + )))); + } + + if fn_candidate.is_unsafe { + + return Err(fn_candidate.with_note(GenerationExclusionNote::Reason("Function is unsafe".to_string()))) + } + + if matches!(fn_candidate.kind, FunctionCandidateKind::TraitImplMethod { .. }) && !ctxt.tcx.visibility(fn_candidate.did).is_public() { + return Err(fn_candidate.with_note(GenerationExclusionNote::Reason("Function is not public and does not come from a trait impl".to_string()))); + } - if type_is_supported_as_non_proxy_return_val( + let param_env = TypingEnv::non_body_analysis(ctxt.tcx, def_id); + + let arg_names = ctxt.tcx.fn_arg_idents(fn_candidate.did); + fn_candidate.arguments = fn_candidate.sig.inputs().iter().zip(arg_names).enumerate().map(|(index, (arg_ty, ident))| { + let candidate_input = FunctionArgCandidate::new(ident.map(|id| id.to_string()).unwrap_or(index.to_string())); + if type_is_supported_as_non_proxy_arg( + ctxt.tcx, + param_env, + &ctxt.cached_traits, + *arg_ty, + ) { + candidate_input.with_reflection_strategy(ReflectionStrategy::Primitive) + } else if type_is_supported_as_proxy_arg( + ctxt.tcx, + &ctxt.reflect_types, + &ctxt.meta_loader, + *arg_ty, + ) { + candidate_input.with_reflection_strategy(ReflectionStrategy::Proxy) + } else { + candidate_input.with_note(GenerationExclusionNote::Reason("argument is neither a primitive type implementing FromScript or a reflectable type".to_string())) + } + }).collect::>(); + + if type_is_supported_as_non_proxy_return_val( + ctxt.tcx, + param_env, + &ctxt.cached_traits, + fn_candidate.sig.output(), + ) { + fn_candidate.ret = fn_candidate.ret.with_reflection_strategy(ReflectionStrategy::Primitive); + } else if type_is_supported_as_proxy_return_val( + ctxt.tcx, + &ctxt.reflect_types, + &ctxt.meta_loader, + fn_candidate.sig.output(), + ) { + fn_candidate.ret = fn_candidate.ret.with_reflection_strategy(ReflectionStrategy::Proxy); + } else { + fn_candidate.ret = fn_candidate.ret.with_note(GenerationExclusionNote::Reason("return type is neither a primitive type implementing IntoScript, or a reflectable type, or is a reference".to_string())) + } + + if fn_candidate.applying_notes().next().is_some() { + // notes inside will suffice here + return Err(fn_candidate); + } + + Ok(fn_candidate) + }) + .partition_result(); + (functions, excluded_functions) +} + +fn generate_variants<'tcx>( + ctxt: &mut BevyCtxt<'tcx>, + did: DefId, +) -> (Vec>, Vec>) { + let candidate = &ctxt.reflect_types[&did]; + let (mut variants, excluded_variants): (Vec<_>, Vec<_>) = candidate + .def + .variants() + .iter() + .map(|variant| { + let variant_candidate = VariantCandidate::new(variant); + if has_reflect_ignore_attr(ctxt.tcx.get_all_attrs(variant.def_id)) { + return Err(variant_candidate.with_note(GenerationExclusionNote::Reason( + "variant has 'reflect(ignore)' attribute".to_string(), + ))); + } + + Ok(variant_candidate) + }) + .partition_result(); + + for variant in &mut variants { + let param_env = TypingEnv::non_body_analysis(ctxt.tcx, variant.def.def_id); + + let (fields, excluded_fields): (Vec<_>, Vec<_>) = variant + .def + .fields + .iter() + .map(|field| { + let candidate = FieldCandidate::new(field); + let visibility = field.vis; + if !visibility.is_public() { + return Err(candidate.with_note(GenerationExclusionNote::Reason(format!( + "field is not public {:?}", + field.did + )))); + } + + if has_reflect_ignore_attr(ctxt.tcx.get_all_attrs(field.did)) { + return Err(candidate.with_note(GenerationExclusionNote::Reason( + "field has 'reflect(ignore)' attribute".to_string(), + ))); + } + + let field_ty = ctxt.tcx.erase_and_anonymize_regions( + ctxt.tcx.type_of(field.did).instantiate_identity(), + ); + + Ok( + if type_is_supported_as_non_proxy_arg( ctxt.tcx, param_env, &ctxt.cached_traits, - sig.output(), + field_ty, + ) && type_is_supported_as_non_proxy_return_val( + ctxt.tcx, + param_env, + &ctxt.cached_traits, + field_ty, ) { - reflection_strategies.push(ReflectionStrategy::Primitive); - } else if type_is_supported_as_proxy_return_val( + candidate.with_reflection_strategy(ReflectionStrategy::Primitive) + } else if type_is_supported_as_proxy_arg( + ctxt.tcx, + &ctxt.reflect_types, + &ctxt.meta_loader, + field_ty, + ) && type_is_supported_as_proxy_return_val( ctxt.tcx, &ctxt.reflect_types, &ctxt.meta_loader, - sig.output(), + field_ty, ) { - reflection_strategies.push(ReflectionStrategy::Proxy); + candidate.with_reflection_strategy(ReflectionStrategy::Proxy) } else { - report_fn_arg_not_supported( - ctxt.tcx, - fn_did, - def_id, - sig.output(), - "return value not supported", - ); - return None; - } - - Some(FunctionContext { - is_unsafe, - def_id: fn_did, - has_self, - trait_and_impl_did: trait_did.map(|td| (td, *impl_did)), - reflection_strategies, - }) - }) - .collect::>(); + candidate.with_reflection_strategy(ReflectionStrategy::Reflection) + }, + ) + }) + .partition_result(); - let ty_ctxt = ctxt.reflect_types.get_mut(&def_id).unwrap(); - // must exist since we set default above - ty_ctxt.valid_functions.as_mut().unwrap().extend(functions); - } + variant.fields.extend(fields); + variant.excluded_fields.extend(excluded_fields); } - - true + (variants, excluded_variants) } fn get_function_generics(tcx: TyCtxt, fn_did: DefId, impl_did: DefId) -> Vec { @@ -308,74 +346,6 @@ fn get_function_generics(tcx: TyCtxt, fn_did: DefId, impl_did: DefId) -> Vec .collect::>() } -fn report_fn_arg_not_supported(tcx: TyCtxt, f_did: DefId, type_did: DefId, ty: Ty, reason: &str) { - info!( - "Ignoring function: `{}` on type: `{}` reason: `{}`, relevant type: `{}`", - tcx.item_name(f_did), - tcx.item_name(type_did), - reason, - ty - ); -} - -fn report_field_not_supported( - tcx: TyCtxt, - f_did: DefId, - type_did: DefId, - variant_did: Option, - reason: &'static str, -) { - let param_env = TypingEnv::non_body_analysis(tcx, type_did); - let normalised_ty = - tcx.normalize_erasing_regions(param_env, tcx.type_of(f_did).instantiate_identity()); - info!( - "Ignoring field: `{}:{}` on type: `{}` in variant: `{}` as it is not supported: `{}`", - tcx.item_name(f_did), - normalised_ty, - tcx.item_name(type_did), - tcx.item_name(variant_did.unwrap_or(type_did)), - reason - ); -} - -/// Checks each field individually and returns reflection strategies -fn process_fields<'tcx, 'f, I: Iterator>( - tcx: TyCtxt<'tcx>, - meta_loader: &MetaLoader, - reflect_types: &IndexMap>, - cached_traits: &CachedTraits, - fields: I, - param_env: TypingEnv<'tcx>, -) -> Vec<(DefId, ReflectionStrategy)> { - fields - .map(move |f| { - if !f.vis.is_public() { - return (f.did, crate::ReflectionStrategy::Filtered); - } - - let field_ty = tcx.erase_regions(tcx.type_of(f.did).instantiate_identity()); - if type_is_supported_as_non_proxy_arg(tcx, param_env, cached_traits, field_ty) - && type_is_supported_as_non_proxy_return_val( - tcx, - param_env, - cached_traits, - field_ty, - ) - { - (f.did, crate::ReflectionStrategy::Primitive) - } else if type_is_supported_as_proxy_arg(tcx, reflect_types, meta_loader, field_ty) - && type_is_supported_as_proxy_return_val(tcx, reflect_types, meta_loader, field_ty) - { - (f.did, crate::ReflectionStrategy::Proxy) - } else if !has_reflect_ignore_attr(tcx.get_attrs_unchecked(f.did)) { - (f.did, crate::ReflectionStrategy::Reflection) - } else { - (f.did, crate::ReflectionStrategy::Filtered) - } - }) - .collect::>() -} - /// Checks if the given attributes contain among them a reflect ignore attribute fn has_reflect_ignore_attr(attrs: &[rustc_hir::Attribute]) -> bool { attrs.iter().any(|a| { @@ -389,7 +359,7 @@ fn has_reflect_ignore_attr(attrs: &[rustc_hir::Attribute]) -> bool { /// Returns true if this type can be used in argument position by checking if it's a top level proxy arg fn type_is_supported_as_proxy_arg<'tcx>( tcx: TyCtxt<'tcx>, - reflect_types: &IndexMap>, + reflect_types: &IndexMap>>, meta_loader: &MetaLoader, ty: Ty, ) -> bool { @@ -409,7 +379,7 @@ fn peel_refs_up_to_once(ty: Ty) -> Ty { /// Returns true if this type can be used in return position by checking if it's a top level proxy arg without references fn type_is_supported_as_proxy_return_val<'tcx>( tcx: TyCtxt<'tcx>, - reflect_types: &IndexMap>, + reflect_types: &IndexMap>>, meta_loader: &MetaLoader, ty: Ty, ) -> bool { @@ -420,7 +390,7 @@ fn type_is_supported_as_proxy_return_val<'tcx>( /// Check if the type is an ADT and is reflectable (i.e. a proxy is being generated for it in SOME crate that we know about from the meta files) fn type_is_adt_and_reflectable<'tcx>( tcx: TyCtxt<'tcx>, - reflect_types: &IndexMap>, + reflect_types: &IndexMap>>, meta_loader: &MetaLoader, ty: Ty, ) -> bool { @@ -487,7 +457,9 @@ fn type_is_supported_as_non_proxy_return_val<'tcx>( "Checkign type is supported as non proxy return val: '{ty:?}' with param_env: '{param_env:?}'" ); if let TyKind::Ref(region, _, _) = ty.kind() - && region.get_name().is_none_or(|rn| rn.as_str() != "'static") + && region + .get_name(tcx) + .is_none_or(|rn| rn.as_str() != "'static") { return false; } diff --git a/codegen/src/passes/find_reflect_types.rs b/codegen/src/passes/find_reflect_types.rs index 74a55642bd..157c43a3ab 100644 --- a/codegen/src/passes/find_reflect_types.rs +++ b/codegen/src/passes/find_reflect_types.rs @@ -1,13 +1,18 @@ -use log::{debug, info}; +use itertools::Itertools; use rustc_hir::def_id::LOCAL_CRATE; +use rustc_middle::ty::AdtDef; -use crate::{Args, BevyCtxt, DEF_PATHS_REFLECT, ReflectType}; +use crate::{ + Args, BevyCtxt, DEF_PATHS_REFLECT, + candidate::{Annotated, GenerationCandidate, GenerationExclusionNote}, +}; /// Finds all reflect types which we can wrap in the crate as well as sorts the final list. pub(crate) fn find_reflect_types(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bool { let tcx = &ctxt.tcx; let ignored_types = match &args.cmd { crate::Command::Generate { ignored_types, .. } => ignored_types, + crate::Command::ListTypes => &vec![], _ => return true, }; @@ -21,12 +26,6 @@ pub(crate) fn find_reflect_types(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bool { continue; } - debug!( - "Found Reflect impls in crate: {}, with path: {}", - tcx.crate_name(LOCAL_CRATE), - def_path_str - ); - // this returns non-local impls as well let reflect_trait_impls = tcx.trait_impls_of(trait_did); @@ -34,40 +33,93 @@ pub(crate) fn find_reflect_types(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bool { // non blanket impls may also contain generics but those will be contained within another type i.e. `impl Default for Vec` // ignore anything with a generic, so blanket_impls are out for now // we also make sure to only work over types and impls directly in the local crate - let reflect_adts_did = reflect_trait_impls + let (reflect_adts_did, excluded_candidates): (Vec<_>, Vec<_>) = reflect_trait_impls .non_blanket_impls() .iter() .flat_map(|(self_ty, impl_dids)| impl_dids.iter().zip(std::iter::repeat(self_ty))) - .filter_map(|(impl_did, self_ty)| { + .map(|(impl_did, self_ty)| { + let mut early_candidate = GenerationCandidate::>::default(); + + let did = match self_ty.def() { + Some(ty) => ty, + None => { + return Err(early_candidate.with_note(GenerationExclusionNote::Reason( + format!("impl block {impl_did:?}, has no self type"), + ))); + } + }; + + early_candidate.did = Some(did); + + if !impl_did.is_local() { + return Err(early_candidate.with_note(GenerationExclusionNote::Reason( + format!("impl block {impl_did:?}, is not local"), + ))); + } + let generics = tcx.generics_of(*impl_did); - (impl_did.is_local() && + if generics.count() > 0 { + return Err(early_candidate.with_note(GenerationExclusionNote::Reason( + format!("impl block {impl_did:?}, has generics"), + ))); + } + // only non parametrized simple types are allowed, i.e. "MyStruct" is allowed but "MyStruct" isn't - generics.count() == 0 && - self_ty.def().is_some_and(|did| { - let short_form = format!("{}::{}",ctxt.tcx.crate_name(LOCAL_CRATE),ctxt.tcx.item_name(did)); - if ignored_types.contains(&short_form) || ignored_types.contains(&tcx.def_path_str(did)) { info!("Ignoring type: {:?}", tcx.def_path_str(did)); - return false; - }; - let adt_generics = tcx.generics_of(did); - tcx.visibility(did).is_public() && adt_generics.count() == 0 - })) - .then(|| self_ty.def().unwrap()) - }) - .inspect(|impl_| debug!("On type: {:?}", tcx.item_name(*impl_))) - .map(|did| (did, ReflectType::default())); + let short_form = format!( + "{}::{}", + ctxt.tcx.crate_name(LOCAL_CRATE), + ctxt.tcx.item_name(did) + ); + + if ignored_types.contains(&short_form) + || ignored_types.contains(&tcx.def_path_str(did)) + { + return Err(early_candidate.with_note(GenerationExclusionNote::Reason( + format!("type {short_form} explicitly excluded by user"), + ))); + }; - ctxt.reflect_types.extend(reflect_adts_did); + let adt_generics = tcx.generics_of(did); + + if adt_generics.count() > 0 { + return Err(early_candidate.with_note(GenerationExclusionNote::Reason( + format!("type has generics: {adt_generics:?}"), + ))); + } + + let visibility = tcx.visibility(did); + if !visibility.is_public() { + return Err(early_candidate.with_note(GenerationExclusionNote::Reason( + format!("type has non-public visibility: {visibility:?}"), + ))); + } + + if ctxt + .path_finder + .find_import_paths_no_fallback(did) + .is_none() + && did.is_local() + { + return Err(early_candidate.with_note(GenerationExclusionNote::Reason( + "type is local and has no public import paths".to_string(), + ))); + } + + let adt = ctxt.tcx.adt_def(did); + + Ok(early_candidate.promote(adt)) + }) + .partition_result(); + ctxt.reflect_types + .extend(reflect_adts_did.into_iter().map(|a| (a.def.did(), a))); + ctxt.excluded_reflect_types.extend(excluded_candidates); } ctxt.reflect_types .sort_by_cached_key(|did, _| tcx.item_name(*did)); - if args.cmd.is_list_types() { - for did in ctxt.reflect_types.keys() { - println!("{:?}", tcx.def_path_str(did)); - } - return false; - } + log::info!("Found: {} types", ctxt.reflect_types.len()); + log::info!("Excluded: {} types", ctxt.excluded_reflect_types.len()); true } diff --git a/codegen/src/passes/find_trait_impls.rs b/codegen/src/passes/find_trait_impls.rs index 1d33232bb7..cb1e220daf 100644 --- a/codegen/src/passes/find_trait_impls.rs +++ b/codegen/src/passes/find_trait_impls.rs @@ -1,5 +1,3 @@ -use std::collections::HashMap; - use log::trace; use rustc_hir::def_id::DefId; use rustc_infer::{ @@ -79,8 +77,7 @@ pub(crate) fn find_trait_impls(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { } } - assert!(type_ctxt.trait_impls.is_none(), "trait impls already set!"); - type_ctxt.trait_impls = Some(HashMap::from_iter(impls)); + type_ctxt.trait_impls.extend(impls); } true } @@ -146,10 +143,7 @@ fn impl_matches<'tcx>(infcx: &InferCtxt<'tcx>, ty: Ty<'tcx>, impl_def_id: DefId) let param_env = typing_env.with_post_analysis_normalized(tcx).param_env; let impl_args = infcx.fresh_args_for_item(DUMMY_SP, impl_def_id); - let impl_trait_ref = tcx - .impl_trait_ref(impl_def_id) - .expect("Expected defid to be an impl for a trait") - .instantiate(tcx, impl_args); + let impl_trait_ref = tcx.impl_trait_ref(impl_def_id).instantiate(tcx, impl_args); let impl_trait_ref = ocx.normalize(&ObligationCause::dummy(), param_env, impl_trait_ref); let impl_trait_ref_ty = impl_trait_ref.self_ty(); if ocx @@ -164,7 +158,7 @@ fn impl_matches<'tcx>(infcx: &InferCtxt<'tcx>, ty: Ty<'tcx>, impl_def_id: DefId) Obligation::new(tcx, ObligationCause::dummy(), param_env, predicate) })); - ocx.select_where_possible().is_empty() + ocx.try_evaluate_obligations().is_empty() }; infcx.probe(|_| impl_may_apply(impl_def_id)) diff --git a/codegen/src/passes/mod.rs b/codegen/src/passes/mod.rs index 43dc5738a7..24549f80d7 100644 --- a/codegen/src/passes/mod.rs +++ b/codegen/src/passes/mod.rs @@ -66,11 +66,11 @@ pub(crate) const CRAWL_PATHS: Pass = Pass { pub(crate) const ALL_PASSES: [Pass; 8] = [ CACHE_TRAITS, + CRAWL_PATHS, // paths needed in the reflect type finder step FIND_REFLECT_TYPES, FIND_TRAIT_IMPLS, // we have to do this before meta as we still filter some things here WRITE_META, // the earlier this happens the better, as other crates will depend on our meta files but not the rest of the passes! FIND_METHODS_AND_FIELDS, - CRAWL_PATHS, POPULATE_TEMPLATE_DATA, CODEGEN, ]; diff --git a/codegen/src/passes/populate_template_data.rs b/codegen/src/passes/populate_template_data.rs index a56701c6c7..3c81a01f48 100644 --- a/codegen/src/passes/populate_template_data.rs +++ b/codegen/src/passes/populate_template_data.rs @@ -2,14 +2,12 @@ use std::{borrow::Cow, convert::identity, panic}; use log::{trace, warn}; use rustc_hir::def_id::{DefId, LOCAL_CRATE}; -use rustc_middle::ty::{ - AdtDef, FieldDef, GenericArg, GenericParamDefKind, TraitRef, Ty, TyKind, TypingEnv, -}; +use rustc_middle::ty::{AdtDef, GenericArg, GenericParamDefKind, TraitRef, Ty, TyKind, TypingEnv}; use rustc_span::Symbol; use crate::{ - Arg, Args, BevyCtxt, Field, Function, FunctionContext, Item, Output, ReflectType, - TemplateContext, Variant, + Arg, Args, BevyCtxt, Field, Function, Item, Output, TemplateContext, Variant, + candidate::{FunctionCandidate, VariantCandidate}, }; /// Converts the BevyCtxt into simpler data that can be used in templates directly, /// Clears the BevyCtxt by clearing data structures after it uses them. @@ -23,11 +21,7 @@ pub(crate) fn populate_template_data(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bo let display_diagnostic = tcx.get_diagnostic_item(Symbol::intern("Display")).unwrap(); for (reflect_ty_did, ty_ctxt) in ctxt.reflect_types.drain(..).collect::>().into_iter() { - let fn_ctxts = ty_ctxt - .valid_functions - .as_ref() - .expect("Missing function context for a type, were all the passes run correctly?"); - + let fn_ctxts = &ty_ctxt.functions; let has_static_methods = fn_ctxts.iter().any(|fn_ctxt| !fn_ctxt.has_self); let mut functions = process_functions(ctxt, fn_ctxts); @@ -45,24 +39,25 @@ pub(crate) fn populate_template_data(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bo ) }); - let variant = ty_ctxt.variant_data.as_ref().unwrap(); + let def = &ty_ctxt.def; - let is_tuple_struct = variant.is_struct() - && variant + let is_tuple_struct = def.is_struct() + && def .all_fields() .next() .is_some_and(|f| f.name.as_str().chars().all(|c| c.is_numeric())); - let variants = variant - .variants() + let variants = ty_ctxt + .variants .iter() .map(|variant| Variant { - docstrings: docstrings(ctxt.tcx.get_attrs_unchecked(variant.def_id)), - name: variant.name.to_ident_string().into(), - fields: process_fields(ctxt, variant.fields.iter(), &ty_ctxt), + docstrings: docstrings(ctxt.tcx.get_all_attrs(variant.def.def_id)), + name: variant.def.name.to_ident_string().into(), + fields: process_fields(ctxt, variant), }) .collect::>(); - let trait_impls = ty_ctxt.trait_impls.as_ref().unwrap(); + + let trait_impls = ty_ctxt.trait_impls; let item = Item { ident: tcx.item_name(reflect_ty_did).to_ident_string(), import_path: import_path(ctxt, reflect_ty_did), @@ -71,7 +66,7 @@ pub(crate) fn populate_template_data(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bo is_enum: variants.len() > 1, variants, is_tuple_struct, - docstrings: docstrings(tcx.get_attrs_unchecked(reflect_ty_did)), + docstrings: docstrings(tcx.get_all_attrs(reflect_ty_did)), impls_clone: trait_impls.contains_key(&clone_diagnostic), impls_debug: trait_impls.contains_key(&debug_diagnostic), impls_display: trait_impls.contains_key(&display_diagnostic), @@ -103,69 +98,70 @@ pub(crate) fn populate_template_data(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bo true } -pub(crate) fn process_fields<'f, I: Iterator>( - ctxt: &BevyCtxt, - fields: I, - ty_ctxt: &ReflectType, +pub(crate) fn process_fields<'ctx>( + ctxt: &BevyCtxt<'ctx>, + variant: &VariantCandidate<'ctx>, ) -> Vec { - fields + variant + .fields + .iter() .map(|field| Field { - docstrings: docstrings(ctxt.tcx.get_attrs_unchecked(field.did)), + docstrings: docstrings(ctxt.tcx.get_all_attrs(field.did)), ident: field.name.to_ident_string(), ty: ty_to_string(ctxt, ctxt.tcx.type_of(field.did).skip_binder(), false), - reflection_strategy: *ty_ctxt - .get_field_reflection_strat(field.did) - .unwrap_or_else(|| panic!("{ty_ctxt:#?}")), + reflection_strategy: field.reflection_strategy, }) .collect() } -pub(crate) fn process_functions(ctxt: &BevyCtxt, fns: &[FunctionContext]) -> Vec { +pub(crate) fn process_functions<'tcx>( + ctxt: &BevyCtxt<'tcx>, + fns: &[FunctionCandidate<'tcx>], +) -> Vec { fns.iter() .map(|fn_ctxt| { - let fn_sig = ctxt.tcx.fn_sig(fn_ctxt.def_id).skip_binder().skip_binder(); let args = ctxt .tcx - .fn_arg_idents(fn_ctxt.def_id) + .fn_arg_idents(fn_ctxt.did) .iter() - .zip(fn_sig.inputs()) + .zip(fn_ctxt.sig.inputs()) .enumerate() .map(|(idx, (ident, ty))| { let normalized_ty = ctxt.tcx.normalize_erasing_regions( - TypingEnv::non_body_analysis(ctxt.tcx, fn_ctxt.def_id), + TypingEnv::non_body_analysis(ctxt.tcx, fn_ctxt.did), *ty, ); Arg { ident: ident.map(|s| s.to_string()).unwrap_or(format!("arg_{idx}")), ty: ty_to_string(ctxt, normalized_ty, false), proxy_ty: ty_to_string(ctxt, normalized_ty, true), - reflection_strategy: fn_ctxt.reflection_strategies[idx], + reflection_strategy: fn_ctxt.arguments[idx].reflection_strategy, } }) .collect(); let out_ty = ctxt.tcx.normalize_erasing_regions( - TypingEnv::non_body_analysis(ctxt.tcx, fn_ctxt.def_id), - fn_sig.output(), + TypingEnv::non_body_analysis(ctxt.tcx, fn_ctxt.did), + fn_ctxt.sig.output(), ); let output = Output { ty: ty_to_string(ctxt, out_ty, false), proxy_ty: ty_to_string(ctxt, out_ty, true), - reflection_strategy: *fn_ctxt.reflection_strategies.last().unwrap(), + reflection_strategy: fn_ctxt.ret.reflection_strategy, }; let is_unsafe = fn_ctxt.is_unsafe; Function { is_unsafe, - ident: ctxt.tcx.item_name(fn_ctxt.def_id).to_ident_string(), + ident: ctxt.tcx.item_name(fn_ctxt.did).to_ident_string(), args, output, has_self: fn_ctxt.has_self, - docstrings: docstrings(ctxt.tcx.get_attrs_unchecked(fn_ctxt.def_id)), - from_trait_path: fn_ctxt.trait_and_impl_did.map(|(_, impl_did)| { - let trait_ref = ctxt.tcx.impl_trait_ref(impl_did).unwrap().skip_binder(); + docstrings: docstrings(ctxt.tcx.get_all_attrs(fn_ctxt.did)), + from_trait_path: fn_ctxt.kind.as_trait_fn().map(|(_, impl_did)| { + let trait_ref = ctxt.tcx.impl_trait_ref(impl_did).skip_binder(); trait_ref_to_string(ctxt, trait_ref) }), @@ -239,7 +235,7 @@ fn trait_ref_to_string<'tcx>(ctxt: &BevyCtxt<'tcx>, trait_ref: TraitRef<'tcx>) - // filter out non const | type generics and the compiler generated ones .filter(|(_, arg_def)| match arg_def.kind { GenericParamDefKind::Lifetime => false, - GenericParamDefKind::Const { synthetic, .. } => !synthetic, + GenericParamDefKind::Type { synthetic, .. } => !synthetic, _ => true, }) .map(|(arg, arg_def)| { diff --git a/codegen/src/passes/write_meta.rs b/codegen/src/passes/write_meta.rs index 1d478f2964..ae00ed6a92 100644 --- a/codegen/src/passes/write_meta.rs +++ b/codegen/src/passes/write_meta.rs @@ -51,7 +51,7 @@ pub(crate) fn write_meta(ctxt: &mut BevyCtxt<'_>, _args: &Args) -> bool { k.to_string(), Dependency { version: d.version.to_string(), - features: features.iter().map(|f| f.to_string()).collect(), + features: features.iter().map(|f| f.feature.to_string()).collect(), }, ), None => todo!(), diff --git a/codegen/src/plugin.rs b/codegen/src/plugin.rs index 937c4db23d..bc5c88cfd6 100644 --- a/codegen/src/plugin.rs +++ b/codegen/src/plugin.rs @@ -50,7 +50,7 @@ impl crate::driver::RustcPlugin for BevyAnalyzer { // make cargo chatty as well if args.verbose.get_log_level_int() >= 3 { - cmd.arg("-v"); + cmd.arg("-vv"); } else { cmd.arg("-q"); } @@ -74,7 +74,7 @@ impl crate::driver::RustcPlugin for BevyAnalyzer { .map(|a| a.to_string_lossy()) .collect::>() .join(" "); - log::debug!("Running: \n{all_env} {bin_name} {args}",); + log::debug!("Running cargo build command: \n{all_env} {bin_name} {args}",); } } diff --git a/codegen/templates/footer.tera b/codegen/templates/footer.tera index a9d37435e7..82e2c1544c 100644 --- a/codegen/templates/footer.tera +++ b/codegen/templates/footer.tera @@ -1,13 +1,7 @@ -{% if args.self_is_bms_lua %} -{% set bms_lua_path="crate" %} -{% else %} -{% set bms_lua_path="bevy_mod_scripting::lua"%} -{% endif %} - - pub struct {{ "ScriptingPlugin" | prefix_cratename | convert_case(case="upper_camel")}}; {% for item in items %} +// {{ item.import_path }} #[script_bindings( remote, name = "{{ item.ident | convert_case(case="snake") }}_functions", @@ -16,7 +10,6 @@ pub struct {{ "ScriptingPlugin" | prefix_cratename | convert_case(case="upper_ca )] impl {{item.import_path}} { {% for function in item.functions %} - {% for docstring in function.docstrings %} /// {{ docstring }} {% endfor %} @@ -37,12 +30,13 @@ impl {{item.import_path}} { ( {%- for arg in function.args -%} {%- if arg.proxy_ty is matching("Ref.*")-%} - &{% endif -%} - {%- if arg.proxy_ty is matching ("Mut.*")-%} - &mut {% endif -%} + & {{ arg.ident | to_arg_pattern() -}} + {%- elif arg.proxy_ty is matching ("Mut.*")-%} + &mut {{ arg.ident | to_arg_pattern() -}} + {%- elif arg.proxy_ty is matching("Val.*")-%} + {{- arg.ident | to_arg_pattern() -}}.into_inner() + {%- else -%} {{- arg.ident | to_arg_pattern() -}} - {%- if arg.proxy_ty is matching("Val.*")-%} - .into_inner() {%- endif -%}, {%- endfor -%} ).into(); diff --git a/crates/bevy_mod_scripting_bindings/Cargo.toml b/crates/bevy_mod_scripting_bindings/Cargo.toml index 59d7901bf9..7bdfb0eb6b 100644 --- a/crates/bevy_mod_scripting_bindings/Cargo.toml +++ b/crates/bevy_mod_scripting_bindings/Cargo.toml @@ -32,6 +32,7 @@ profiling = { workspace = true } bevy_asset = { workspace = true } variadics_please = { workspace = true } serde = { workspace = true } +nonmax = { workspace = true } [dev-dependencies] pretty_assertions = { workspace = true } diff --git a/crates/bevy_mod_scripting_bindings/src/function/from.rs b/crates/bevy_mod_scripting_bindings/src/function/from.rs index b03b493c4d..33fa2d8006 100644 --- a/crates/bevy_mod_scripting_bindings/src/function/from.rs +++ b/crates/bevy_mod_scripting_bindings/src/function/from.rs @@ -5,6 +5,7 @@ use crate::{ }; use bevy_platform::collections::{HashMap, HashSet}; use bevy_reflect::{FromReflect, Reflect}; +use nonmax::NonMaxU32; use std::{ any::TypeId, ffi::OsString, @@ -115,6 +116,28 @@ macro_rules! impl_from_stringlike { impl_from_stringlike!(String, PathBuf, OsString); +impl FromScript for NonMaxU32 { + type This<'w> = Self; + + fn from_script( + value: ScriptValue, + _world: WorldGuard<'_>, + ) -> Result, InteropError> + where + Self: Sized, + { + match value { + ScriptValue::Integer(i) if i != 0 => Ok(unsafe { NonMaxU32::new_unchecked(i as u32) }), + ScriptValue::Float(f) if f != 0.0 => Ok(unsafe { NonMaxU32::new_unchecked(f as u32) }), + // ScriptValue::Reference(r) => r.downcast::(world), + _ => Err(InteropError::value_mismatch( + std::any::TypeId::of::(), + value, + )), + } + } +} + #[profiling::all_functions] impl FromScript for char { type This<'w> = Self; diff --git a/crates/bevy_mod_scripting_bindings/src/function/script_function.rs b/crates/bevy_mod_scripting_bindings/src/function/script_function.rs index e8860ea70c..b578d5c77a 100644 --- a/crates/bevy_mod_scripting_bindings/src/function/script_function.rs +++ b/crates/bevy_mod_scripting_bindings/src/function/script_function.rs @@ -724,7 +724,7 @@ variadics_please::all_tuples!(impl_script_function, 0, 13, T); #[cfg(test)] mod test { use super::*; - use bevy_asset::{AssetId, Handle}; + use bevy_asset::Handle; use bevy_ecs::{prelude::Component, world::World}; use bevy_mod_scripting_script::ScriptAttachment; @@ -734,7 +734,7 @@ mod test { ThreadWorldContainer .set_context(crate::ThreadScriptContext { world, - attachment: ScriptAttachment::StaticScript(Handle::Weak(AssetId::invalid())), + attachment: ScriptAttachment::StaticScript(Handle::default()), }) .unwrap(); f() diff --git a/crates/bevy_mod_scripting_bindings/src/reference.rs b/crates/bevy_mod_scripting_bindings/src/reference.rs index 46693d99e1..9666bfd2fb 100644 --- a/crates/bevy_mod_scripting_bindings/src/reference.rs +++ b/crates/bevy_mod_scripting_bindings/src/reference.rs @@ -17,7 +17,6 @@ use bevy_mod_scripting_display::{ DebugWithTypeInfo, DisplayWithTypeInfo, OrFakeId, PrintReflectAsDebug, WithTypeInfo, }; use bevy_reflect::{Access, OffsetAccess, ReflectRef, TypeRegistry}; -use core::alloc; use std::{ any::{Any, TypeId}, fmt::Debug, @@ -323,8 +322,8 @@ impl ReflectReference { // Safety: The caller guarantees exclusive access to the asset through the WorldGuard, // and we've validated that the type_id matches the ReflectAsset type data. // The UnsafeWorldCell is valid for the lifetime 'w of the WorldGuard. - let asset = unsafe { reflect_asset.get_unchecked_mut(world_cell, handle.clone()) } - .ok_or_else(|| { + let asset = + unsafe { reflect_asset.get_unchecked_mut(world_cell, handle) }.ok_or_else(|| { InteropError::unsupported_operation( Some(self.base.type_id), None, diff --git a/crates/bevy_mod_scripting_bindings/src/schedule.rs b/crates/bevy_mod_scripting_bindings/src/schedule.rs index b4d380616e..dff25ee5ba 100644 --- a/crates/bevy_mod_scripting_bindings/src/schedule.rs +++ b/crates/bevy_mod_scripting_bindings/src/schedule.rs @@ -201,7 +201,7 @@ mod tests { bevy_app::{App, Plugin, Update}, bevy_ecs::{ entity::Entity, - schedule::{NodeId, Schedules}, + schedule::{NodeId, Schedules, SystemKey}, system::IntoSystem, }, std::{cell::OnceCell, rc::Rc}, @@ -236,7 +236,7 @@ mod tests { #[test] fn test_reflect_system_names() { let system = IntoSystem::into_system(test_system_generic::); - let system = ReflectSystem::from_system(&system, NodeId::Set(0)); + let system = ReflectSystem::from_system(&system, SystemKey::default()); assert_eq!(system.identifier(), "test_system_generic"); assert_eq!( @@ -245,7 +245,7 @@ mod tests { ); let system = IntoSystem::into_system(test_system); - let system = ReflectSystem::from_system(&system, NodeId::Set(0)); + let system = ReflectSystem::from_system(&system, SystemKey::default()); assert_eq!(system.identifier(), "test_system"); assert_eq!( @@ -314,16 +314,24 @@ mod tests { let resolve_name = |node_id: NodeId| { let out = { - // try systems - if let Some(system) = graph.get_system_at(node_id) { - system.name().clone().to_string() - } else if let Some(system_set) = graph.get_set_at(node_id) { - format!("{system_set:?}").to_string() + let name = match node_id { + NodeId::System(system_key) => graph + .systems + .get(system_key) + .map(|system| system.system.name().clone().to_string()), + NodeId::Set(system_set_key) => graph + .system_sets + .get(system_set_key) + .map(|set| format!("{set:?}").to_string()), + }; + + if let Some(name) = name { + name } else { // try schedule systems let mut default = format!("{node_id:?}").to_string(); for (system_node, system) in schedule.systems().unwrap() { - if node_id == system_node { + if node_id == NodeId::System(system_node) { default = system.name().clone().to_string(); } } diff --git a/crates/bevy_mod_scripting_bindings/src/script_component.rs b/crates/bevy_mod_scripting_bindings/src/script_component.rs index 4bf333a114..a72ea2df90 100644 --- a/crates/bevy_mod_scripting_bindings/src/script_component.rs +++ b/crates/bevy_mod_scripting_bindings/src/script_component.rs @@ -165,6 +165,6 @@ mod test { .get_info(info.registration.component_id) .unwrap(); - assert_eq!(component.name(), "ScriptTest"); + assert_eq!(component.name(), "ScriptTest".into()); } } diff --git a/crates/bevy_mod_scripting_bindings/src/world.rs b/crates/bevy_mod_scripting_bindings/src/world.rs index 5b98d7eb8d..ac96c7ebf3 100644 --- a/crates/bevy_mod_scripting_bindings/src/world.rs +++ b/crates/bevy_mod_scripting_bindings/src/world.rs @@ -43,6 +43,7 @@ use ::{ PartialReflect, TypeRegistryArc, std_traits::ReflectDefault, }, }; +use bevy_asset::AssetPath; use bevy_ecs::{ component::Mutable, hierarchy::{ChildOf, Children}, @@ -906,7 +907,10 @@ impl WorldAccessGuard<'_> { } /// Loads a script from the given asset path with default settings. - pub fn load_script_asset(&self, asset_path: &str) -> Result, InteropError> { + pub fn load_script_asset<'a>( + &self, + asset_path: impl Into>, + ) -> Result, InteropError> { self.with_resource(|r: &AssetServer| r.load(asset_path)) } @@ -1337,7 +1341,7 @@ impl WorldAccessGuard<'_> { /// Sends AppExit event to the world with success status pub fn exit(&self) -> Result<(), InteropError> { self.with_global_access(|world| { - world.send_event(AppExit::Success); + world.write_message(AppExit::Success); }) } } diff --git a/crates/bevy_mod_scripting_core/Cargo.toml b/crates/bevy_mod_scripting_core/Cargo.toml index 25ed1685d3..f3189f40a7 100644 --- a/crates/bevy_mod_scripting_core/Cargo.toml +++ b/crates/bevy_mod_scripting_core/Cargo.toml @@ -33,6 +33,7 @@ bevy_log = { workspace = true, default-features = false, features = [] } bevy_asset = { workspace = true, default-features = false, features = [] } bevy_diagnostic = { workspace = true, default-features = false, features = [] } bevy_platform = { workspace = true, default-features = false, features = [] } +bevy_utils = { workspace = true } parking_lot = { workspace = true } smallvec = { workspace = true } diff --git a/crates/bevy_mod_scripting_core/src/commands.rs b/crates/bevy_mod_scripting_core/src/commands.rs index 3fd9efa9c3..1b696ddf59 100644 --- a/crates/bevy_mod_scripting_core/src/commands.rs +++ b/crates/bevy_mod_scripting_core/src/commands.rs @@ -60,9 +60,16 @@ impl RunScriptCallback

{ self } + fn handle_error(res: &Result, guard: WorldGuard) { + if let Err(err) = res { + send_script_errors(guard, [err]); + } + } + /// Run the command on the given context. /// /// Assumes this context matches the attachment for the command. + /// Does not send the error as a message, this needs to be done explicitly by the caller. pub fn run_with_context( self, guard: WorldGuard, @@ -109,6 +116,8 @@ impl RunScriptCallback

{ } /// Equivalent to [`Self::run`], but usable in the case where you already have [`ScriptContext`] and [`ScriptCallbacks`] resources available. + /// + /// Does not send the error as a message, this needs to be done explicitly by the caller. pub fn run_with_contexts( self, guard: WorldGuard, @@ -125,7 +134,6 @@ impl RunScriptCallback

{ ) .with_script(self.attachment.script().display()) .with_language(P::LANGUAGE); - send_script_errors(guard, [&err]); return Err(err); } }; @@ -135,19 +143,22 @@ impl RunScriptCallback

{ /// Equivalent to running the command, but also returns the result of the callback. /// - /// The returned errors will NOT be sent as events or printed - pub fn run(self, world: &mut World) -> Result { + /// The returned errors will NOT be sent as events or printed unless send errors is set to true + pub fn run(self, world: &mut World, send_errors: bool) -> Result { let script_contexts = world.get_resource_or_init::>().clone(); let script_callbacks = world.get_resource_or_init::>().clone(); let guard = WorldGuard::new_exclusive(world); - self.run_with_contexts(guard, script_contexts, script_callbacks) + let res = self.run_with_contexts(guard.clone(), script_contexts, script_callbacks); + if send_errors && res.is_err() { + Self::handle_error(&res, guard); + } + res } } impl Command for RunScriptCallback

{ fn apply(self, world: &mut World) { - // Internals handle this. - let _ = self.run(world); + let _ = self.run(world, true); } } @@ -175,14 +186,14 @@ impl DetachScript

{ impl Command for AttachScript

{ fn apply(self, world: &mut World) { - world.send_event(self.0); + world.write_message(self.0); RunProcessingPipelineOnce::

::new(Some(Duration::from_secs(9999))).apply(world) } } impl Command for DetachScript

{ fn apply(self, world: &mut World) { - world.send_event(self.0); + world.write_message(self.0); RunProcessingPipelineOnce::

::new(Some(Duration::from_secs(9999))).apply(world) } } diff --git a/crates/bevy_mod_scripting_core/src/event.rs b/crates/bevy_mod_scripting_core/src/event.rs index 86667e589b..bcff5235f8 100644 --- a/crates/bevy_mod_scripting_core/src/event.rs +++ b/crates/bevy_mod_scripting_core/src/event.rs @@ -2,9 +2,10 @@ use std::{marker::PhantomData, sync::Arc}; -use ::{bevy_asset::Handle, bevy_ecs::entity::Entity, bevy_reflect::Reflect}; -use bevy_ecs::event::Event; -use bevy_mod_scripting_asset::Language; +use ::{bevy_ecs::entity::Entity, bevy_reflect::Reflect}; +use bevy_asset::AssetId; +use bevy_ecs::message::Message; +use bevy_mod_scripting_asset::{Language, ScriptAsset}; use bevy_mod_scripting_bindings::ScriptValue; use bevy_mod_scripting_script::ScriptAttachment; use parking_lot::Mutex; @@ -16,7 +17,7 @@ use crate::{ }; /// An error coming from a script -#[derive(Debug, Event)] +#[derive(Debug, Message)] pub struct ScriptErrorEvent { /// The script that caused the error pub error: ScriptError, @@ -30,18 +31,18 @@ impl ScriptErrorEvent { } /// Emitted when a script is attached. -#[derive(Event, Clone, Debug)] +#[derive(Message, Clone, Debug)] pub struct ScriptAttachedEvent(pub ScriptAttachment); /// Emitted when a script is detached. -#[derive(Event, Clone, Debug)] +#[derive(Message, Clone, Debug)] pub struct ScriptDetachedEvent(pub ScriptAttachment); /// Emitted when a script asset is modified and all its attachments require re-loading -#[derive(Event, Clone, Debug)] -pub struct ScriptAssetModifiedEvent(pub ScriptId); +#[derive(Message, Clone, Debug)] +pub struct ScriptAssetModifiedEvent(pub AssetId); -#[derive(Event)] +#[derive(Message)] /// Wrapper around a script event making it available to read by a specific plugin only pub struct ForPlugin(T, PhantomData); @@ -65,8 +66,8 @@ impl Clone for ForPlugin { impl ForPlugin { /// Creates a new wrapper for the specific plugin - pub fn new(event: T) -> Self { - Self(event, Default::default()) + pub fn new(message: T) -> Self { + Self(message, Default::default()) } /// Retrieves the inner event @@ -218,7 +219,7 @@ impl Recipients { Recipients::AllScripts => script_context.all_residents().collect(), Recipients::AllContexts => script_context.first_resident_from_each_context().collect(), Recipients::ScriptEntity(script, entity) => { - let attachment = ScriptAttachment::EntityScript(*entity, Handle::Weak(*script)); + let attachment = ScriptAttachment::EntityScript(*entity, script.clone()); script_context .get_context(&attachment) .into_iter() @@ -226,7 +227,7 @@ impl Recipients { .collect() } Recipients::StaticScript(script) => { - let attachment = ScriptAttachment::StaticScript(Handle::Weak(*script)); + let attachment = ScriptAttachment::StaticScript(script.clone()); script_context .get_context(&attachment) .into_iter() @@ -238,7 +239,7 @@ impl Recipients { } /// A callback event meant to trigger a callback in a subset/set of scripts in the world with the given arguments -#[derive(Clone, Event, Debug)] +#[derive(Clone, Message, Debug)] #[non_exhaustive] pub struct ScriptCallbackEvent { /// The label of the callback @@ -290,7 +291,7 @@ impl ScriptCallbackEvent { } /// Event published when a script completes a callback and a response is requested. -#[derive(Clone, Event, Debug)] +#[derive(Clone, Message, Debug)] #[non_exhaustive] pub struct ScriptCallbackResponseEvent { /// the label of the callback @@ -419,11 +420,12 @@ mod test { use ::{ bevy_app::{App, Plugin}, - bevy_asset::{AssetId, AssetIndex, Handle}, + bevy_asset::{AssetId, Handle}, bevy_ecs::entity::Entity, }; use parking_lot::Mutex; use test_utils::make_test_plugin; + use uuid::uuid; use super::FORBIDDEN_KEYWORDS; use crate::{ @@ -476,18 +478,18 @@ mod test { /// make the following arrangement: /// use AssetId's to identify residents /// ContextA: - /// - EntityScriptA (Entity::from_raw(0), AssetId::from_bits(0)) - /// - EntityScriptB (Entity::from_raw(0), AssetId::from_bits(1)) + /// - EntityScriptA (Entity::from_raw(0), 163f1128-62f9-456f-9b76-a326fbe86fa8) + /// - EntityScriptB (Entity::from_raw(0), 263f1128-62f9-456f-9b76-a326fbe86fa8) /// /// ContextB: - /// - EntityScriptC (Entity::from_raw(1), AssetId::from_bits(2)) - /// - EntityScriptD (Entity::from_raw(1), AssetId::from_bits(3)) + /// - EntityScriptC (Entity::from_raw(1), 363f1128-62f9-456f-9b76-a326fbe86fa8) + /// - EntityScriptD (Entity::from_raw(1), 463f1128-62f9-456f-9b76-a326fbe86fa8) /// /// ContextC: - /// - StaticScriptA (AssetId::from_bits(4)) + /// - StaticScriptA (563f1128-62f9-456f-9b76-a326fbe86fa8) /// /// ContextD: - /// - StaticScriptB (AssetId::from_bits(5)) + /// - StaticScriptB (663f1128-62f9-456f-9b76-a326fbe86fa8) fn make_test_contexts() -> ScriptContext { let policy = ContextPolicy::per_entity(); let script_context = ScriptContext::::new(policy); @@ -505,37 +507,55 @@ mod test { invocations: vec![ScriptValue::String("d".to_string().into())], })); - let entity_script_a = Handle::Weak(AssetId::from(AssetIndex::from_bits(0))); - let entity_script_b = Handle::Weak(AssetId::from(AssetIndex::from_bits(1))); - let entity_script_c = Handle::Weak(AssetId::from(AssetIndex::from_bits(2))); - let entity_script_d = Handle::Weak(AssetId::from(AssetIndex::from_bits(3))); + let entity_script_a = Handle::Uuid( + uuid!("163f1128-62f9-456f-9b76-a326fbe86fa8"), + Default::default(), + ); + let entity_script_b = Handle::Uuid( + uuid!("263f1128-62f9-456f-9b76-a326fbe86fa8"), + Default::default(), + ); + let entity_script_c = Handle::Uuid( + uuid!("363f1128-62f9-456f-9b76-a326fbe86fa8"), + Default::default(), + ); + let entity_script_d = Handle::Uuid( + uuid!("463f1128-62f9-456f-9b76-a326fbe86fa8"), + Default::default(), + ); - let static_script_a = Handle::Weak(AssetId::from(AssetIndex::from_bits(4))); - let static_script_b = Handle::Weak(AssetId::from(AssetIndex::from_bits(5))); + let static_script_a = Handle::Uuid( + uuid!("563f1128-62f9-456f-9b76-a326fbe86fa8"), + Default::default(), + ); + let static_script_b = Handle::Uuid( + uuid!("663f1128-62f9-456f-9b76-a326fbe86fa8"), + Default::default(), + ); script_context_guard .insert( - ScriptAttachment::EntityScript(Entity::from_raw(0), entity_script_a), + ScriptAttachment::EntityScript(Entity::from_raw_u32(0).unwrap(), entity_script_a), context_a, ) .unwrap(); script_context_guard .insert_resident(ScriptAttachment::EntityScript( - Entity::from_raw(0), + Entity::from_raw_u32(0).unwrap(), entity_script_b, )) .unwrap(); script_context_guard .insert( - ScriptAttachment::EntityScript(Entity::from_raw(1), entity_script_c), + ScriptAttachment::EntityScript(Entity::from_raw_u32(1).unwrap(), entity_script_c), context_b, ) .unwrap(); script_context_guard .insert_resident(ScriptAttachment::EntityScript( - Entity::from_raw(1), + Entity::from_raw_u32(1).unwrap(), entity_script_d, )) .unwrap(); @@ -629,9 +649,14 @@ mod test { #[test] fn test_script_entity_recipients() { let script_context = make_test_contexts(); - let recipients = - Recipients::ScriptEntity(AssetId::from(AssetIndex::from_bits(0)), Entity::from_raw(0)) - .get_recipients(script_context); + let recipients = Recipients::ScriptEntity( + Handle::Uuid( + uuid!("163f1128-62f9-456f-9b76-a326fbe86fa8"), + Default::default(), + ), + Entity::from_raw_u32(0).unwrap(), + ) + .get_recipients(script_context); assert_eq!(recipients.len(), 1); let id_context_pairs = recipients_to_asset_ids(&recipients); @@ -641,8 +666,11 @@ mod test { #[test] fn test_static_script_recipients() { let script_context = make_test_contexts(); - let recipients = Recipients::StaticScript(AssetId::from(AssetIndex::from_bits(4))) - .get_recipients(script_context); + let recipients = Recipients::StaticScript(Handle::Uuid( + uuid!("563f1128-62f9-456f-9b76-a326fbe86fa8"), + Default::default(), + )) + .get_recipients(script_context); assert_eq!(recipients.len(), 1); let id_context_pairs = recipients_to_asset_ids(&recipients); diff --git a/crates/bevy_mod_scripting_core/src/extractors.rs b/crates/bevy_mod_scripting_core/src/extractors.rs index 4973e199c6..9a5cc6574e 100644 --- a/crates/bevy_mod_scripting_core/src/extractors.rs +++ b/crates/bevy_mod_scripting_core/src/extractors.rs @@ -3,126 +3,134 @@ //! These are designed to be used to pipe inputs into other systems which require them, while handling any configuration erorrs nicely. use bevy_ecs::{ - archetype::Archetype, - component::{ComponentId, Tick}, + component::ComponentId, query::{Access, AccessConflicts}, storage::SparseSetIndex, - system::{SystemMeta, SystemParam, SystemParamValidationError}, - world::{DeferredWorld, World, unsafe_world_cell::UnsafeWorldCell}, }; -use bevy_mod_scripting_bindings::{WorldAccessGuard, WorldGuard, access_map::ReflectAccessId}; +use bevy_mod_scripting_bindings::access_map::ReflectAccessId; use fixedbitset::FixedBitSet; -/// A wrapper around a world which pre-populates access, to safely co-exist with other system params, -/// acts exactly like `&mut World` so this should be your only top-level system param -/// -/// The reason is the guard needs to know the underlying access that -pub struct WithWorldGuard<'w, 's, T: SystemParam> { - world_guard: WorldGuard<'w>, - param: T::Item<'w, 's>, -} - -impl<'w, 's, T: SystemParam> WithWorldGuard<'w, 's, T> { - /// Get the world guard and the inner system param - pub fn get(&self) -> (WorldGuard<'w>, &T::Item<'w, 's>) { - (self.world_guard.clone(), &self.param) - } - - /// Get the world guard and the inner system param mutably - pub fn get_mut(&mut self) -> (WorldGuard<'w>, &mut T::Item<'w, 's>) { - (self.world_guard.clone(), &mut self.param) - } -} - -unsafe impl SystemParam for WithWorldGuard<'_, '_, T> { - type State = (T::State, Vec<(ReflectAccessId, bool)>); - - type Item<'world, 'state> = WithWorldGuard<'world, 'state, T>; - - fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State { - // verify there are no accesses previously - let other_accessed_components = - system_meta.component_access_set().combined_access().clone(); - - let inner_state = T::init_state(world, system_meta); - - let accessed_components = system_meta.component_access_set().combined_access(); - let access_ids = get_all_access_ids(accessed_components); - let other_access_ids = get_all_access_ids(&other_accessed_components); - - // reason: we can't handle this error nicely, and continuing is a safety issue - #[allow(clippy::panic)] - if !other_access_ids.is_empty() { - panic!( - "WithWorldGuard must be the only top-level system param, cannot run system: `{}`", - system_meta.name() - ); - } - - // Safety: not removing any accesses - unsafe { system_meta.component_access_set_mut().write_all() } - unsafe { system_meta.archetype_component_access_mut().write_all() } - (inner_state, access_ids) - } - - unsafe fn get_param<'world, 'state>( - state: &'state mut Self::State, - system_meta: &SystemMeta, - world: UnsafeWorldCell<'world>, - change_tick: Tick, - ) -> Self::Item<'world, 'state> { - // create a guard which can only access the resources/components specified by the system. - let guard = WorldAccessGuard::new_exclusive(unsafe { world.world_mut() }); - - #[allow( - clippy::panic, - reason = "This API does not allow us to handle this error nicely, and continuing is a safety issue." - )] - for (raid, is_write) in &state.1 { - if *is_write { - if !guard.claim_write_access(*raid) { - panic!( - "System tried to access set of system params which break rust aliasing rules. Aliasing access: {raid:#?}", - ); - } - } else if !guard.claim_read_access(*raid) { - panic!( - "System tried to access set of system params which break rust aliasing rules. Aliasing access: {raid:#?}", - ); - } - } - - WithWorldGuard { - world_guard: guard, - param: unsafe { T::get_param(&mut state.0, system_meta, world, change_tick) }, - } - } - - unsafe fn new_archetype( - state: &mut Self::State, - archetype: &Archetype, - system_meta: &mut SystemMeta, - ) { - unsafe { T::new_archetype(&mut state.0, archetype, system_meta) } - } - - fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World) { - T::apply(&mut state.0, system_meta, world) - } - - fn queue(state: &mut Self::State, system_meta: &SystemMeta, world: DeferredWorld) { - T::queue(&mut state.0, system_meta, world) - } - - unsafe fn validate_param( - state: &Self::State, - system_meta: &SystemMeta, - world: UnsafeWorldCell, - ) -> Result<(), SystemParamValidationError> { - unsafe { T::validate_param(&state.0, system_meta, world) } - } -} +// /// A wrapper around a world which pre-populates access, to safely co-exist with other system params, +// /// acts exactly like `&mut World` so this should be your only top-level system param +// /// +// /// The reason is the guard needs to know the underlying access that +// pub struct WithWorldGuard<'w, 's, T: SystemParam> { +// world_guard: WorldGuard<'w>, +// param: T::Item<'w, 's>, +// } + +// impl<'w, 's, T: SystemParam> WithWorldGuard<'w, 's, T> { +// /// Get the world guard and the inner system param +// pub fn get(&self) -> (WorldGuard<'w>, &T::Item<'w, 's>) { +// (self.world_guard.clone(), &self.param) +// } + +// /// Get the world guard and the inner system param mutably +// pub fn get_mut(&mut self) -> (WorldGuard<'w>, &mut T::Item<'w, 's>) { +// (self.world_guard.clone(), &mut self.param) +// } +// } + +// unsafe impl SystemParam for WithWorldGuard<'_, '_, T> { +// type State = (T::State, Vec<(ReflectAccessId, bool)>); + +// type Item<'world, 'state> = WithWorldGuard<'world, 'state, T>; + +// fn init_access( +// _state: &Self::State, +// _system_meta: &mut SystemMeta, +// component_access_set: &mut bevy_ecs::query::FilteredAccessSet, +// _world: &mut World, +// ) { +// // verify there are no accesses previously +// // let other_accessed_components = component_access_set.combined_access().clone(); + +// // let accessed_components = component_access_set.combined_access(); +// // let access_ids = get_all_access_ids(accessed_components); +// // let other_access_ids = get_all_access_ids(&other_accessed_components); + +// // reason: we can't handle this error nicely, and continuing is a safety issue +// // #[allow(clippy::panic)] +// // if !other_access_ids.is_empty() { +// // panic!( +// // "WithWorldGuard must be the only top-level system param, cannot run system: `{}`", +// // system_meta.name() +// // ); +// // } + +// // Safety: not removing any accesses +// component_access_set.write_all() +// } + +// fn init_state(world: &mut World) -> Self::State { +// // // verify there are no accesses previously +// // let other_accessed_components = +// // system_meta.component_access_set().combined_access().clone(); + +// // let inner_state = T::init_state(world); + +// // let accessed_components = system_meta.component_access_set().combined_access(); +// // let inner_state = T::init_access(T::init_state(world)); +// // let access_ids = get_all_access_ids(accessed_components); +// // let other_access_ids = get_all_access_ids(&other_accessed_components); + +// (T::init_state(world), vec![]) +// } + +// unsafe fn get_param<'world, 'state>( +// state: &'state mut (T::State, Vec<(ReflectAccessId, bool)>), +// system_meta: &SystemMeta, +// world: UnsafeWorldCell<'world>, +// change_tick: Tick, +// ) -> Self::Item<'world, 'state> { +// if state.1.is_empty() { +// T::init_access() +// } + +// // create a guard which can only access the resources/components specified by the system. +// let guard = WorldAccessGuard::new_exclusive(unsafe { world.world_mut() }); + +// #[allow( +// clippy::panic, +// reason = "This API does not allow us to handle this error nicely, and continuing is a safety issue." +// )] +// for (raid, is_write) in &state.1 { +// if *is_write { +// if !guard.claim_write_access(*raid) { +// panic!( +// "System tried to access set of system params which break rust aliasing rules. Aliasing access: {raid:#?}", +// ); +// } +// } else if !guard.claim_read_access(*raid) { +// panic!( +// "System tried to access set of system params which break rust aliasing rules. Aliasing access: {raid:#?}", +// ); +// } +// } + +// WithWorldGuard { +// world_guard: guard, +// param: unsafe { T::get_param(&mut state.0, system_meta, world, change_tick) }, +// } +// } + +// fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World) { +// T::apply(&mut state.0, system_meta, world) +// } + +// fn queue(state: &mut Self::State, system_meta: &SystemMeta, world: DeferredWorld) { +// T::queue(&mut state.0, system_meta, world) +// } + +// unsafe fn validate_param( +// state: &mut Self::State, +// system_meta: &SystemMeta, +// world: UnsafeWorldCell, +// ) -> Result<(), SystemParamValidationError> { +// unsafe { T::validate_param(&mut state.0, system_meta, world) } +// } +// } fn individual_conflicts(conflicts: AccessConflicts) -> FixedBitSet { match conflicts { @@ -132,11 +140,11 @@ fn individual_conflicts(conflicts: AccessConflicts) -> FixedBitSet { } } -pub(crate) fn get_all_access_ids(access: &Access) -> Vec<(ReflectAccessId, bool)> { - let mut access_all_read = Access::::default(); +pub(crate) fn get_all_access_ids(access: &Access) -> Vec<(ReflectAccessId, bool)> { + let mut access_all_read = Access::default(); access_all_read.read_all(); - let mut access_all_write = Access::::default(); + let mut access_all_write = Access::default(); access_all_write.write_all(); // read conflicts with each set to figure out the necessary locks @@ -164,96 +172,96 @@ pub(crate) fn get_all_access_ids(access: &Access) -> Vec<(ReflectAc result } -#[cfg(test)] -mod test { - use crate::config::{GetPluginThreadConfig, ScriptingPluginConfiguration}; - use bevy_ecs::resource::Resource; - use bevy_mod_scripting_bindings::ScriptValue; - use test_utils::make_test_plugin; - - use { - bevy_app::{App, Plugin, Update}, - bevy_ecs::{ - component::Component, - entity::Entity, - event::{Event, EventReader}, - system::{Query, ResMut}, - }, - }; - - use super::*; - - make_test_plugin!(crate); - - #[derive(Component)] - struct Comp; - - #[derive(Resource, Default)] - struct Res; - - #[test] - pub fn check_with_world_correctly_locks_resource_and_component() { - let system_fn = |mut guard: WithWorldGuard<(ResMut, Query<&'static Comp>)>| { - let (guard, (_res, _entity)) = guard.get_mut(); - assert_eq!(guard.list_accesses().len(), 2, "Expected 2 accesses"); - assert!( - !guard.claim_read_access( - ReflectAccessId::for_resource::(&guard.as_unsafe_world_cell().unwrap()) - .unwrap() - ) - ); - assert!( - !guard.claim_write_access( - ReflectAccessId::for_resource::(&guard.as_unsafe_world_cell().unwrap()) - .unwrap() - ) - ); - }; - - let mut app = App::new(); - app.add_systems(Update, system_fn); - app.insert_resource(Res); - app.world_mut().spawn(Comp); - - app.cleanup(); - app.finish(); - app.update(); - } - - #[test] - #[should_panic( - expected = "WithWorldGuard must be the only top-level system param, cannot run system" - )] - pub fn check_with_world_panics_when_used_with_resource_top_level() { - let system_fn = |_res: ResMut, mut _guard: WithWorldGuard>| {}; - - let mut app = App::new(); - app.add_systems(Update, system_fn); - app.insert_resource(Res); - app.world_mut().spawn(Comp); - - app.cleanup(); - app.finish(); - app.update(); - } - - #[test] - #[should_panic( - expected = "WithWorldGuard must be the only top-level system param, cannot run system" - )] - pub fn check_with_world_panics_when_used_with_event_reader_top_level() { - #[derive(Event)] - struct TestEvent; - let system_fn = - |_res: EventReader, mut _guard: WithWorldGuard>| {}; - - let mut app = App::new(); - app.add_systems(Update, system_fn); - app.insert_resource(Res); - app.world_mut().spawn(Comp); - - app.cleanup(); - app.finish(); - app.update(); - } -} +// #[cfg(test)] +// mod test { +// use crate::config::{GetPluginThreadConfig, ScriptingPluginConfiguration}; +// use bevy_ecs::resource::Resource; +// use bevy_mod_scripting_bindings::ScriptValue; +// use test_utils::make_test_plugin; + +// use { +// bevy_app::{App, Plugin, Update}, +// bevy_ecs::{ +// component::Component, +// entity::Entity, +// event::{Event, EventReader}, +// system::{Query, ResMut}, +// }, +// }; + +// use super::*; + +// make_test_plugin!(crate); + +// #[derive(Component)] +// struct Comp; + +// #[derive(Resource, Default)] +// struct Res; + +// #[test] +// pub fn check_with_world_correctly_locks_resource_and_component() { +// let system_fn = |mut guard: WithWorldGuard<(ResMut, Query<&'static Comp>)>| { +// let (guard, (_res, _entity)) = guard.get_mut(); +// assert_eq!(guard.list_accesses().len(), 2, "Expected 2 accesses"); +// assert!( +// !guard.claim_read_access( +// ReflectAccessId::for_resource::(&guard.as_unsafe_world_cell().unwrap()) +// .unwrap() +// ) +// ); +// assert!( +// !guard.claim_write_access( +// ReflectAccessId::for_resource::(&guard.as_unsafe_world_cell().unwrap()) +// .unwrap() +// ) +// ); +// }; + +// let mut app = App::new(); +// app.add_systems(Update, system_fn); +// app.insert_resource(Res); +// app.world_mut().spawn(Comp); + +// app.cleanup(); +// app.finish(); +// app.update(); +// } + +// #[test] +// #[should_panic( +// expected = "WithWorldGuard must be the only top-level system param, cannot run system" +// )] +// pub fn check_with_world_panics_when_used_with_resource_top_level() { +// let system_fn = |_res: ResMut, mut _guard: WithWorldGuard>| {}; + +// let mut app = App::new(); +// app.add_systems(Update, system_fn); +// app.insert_resource(Res); +// app.world_mut().spawn(Comp); + +// app.cleanup(); +// app.finish(); +// app.update(); +// } + +// #[test] +// #[should_panic( +// expected = "WithWorldGuard must be the only top-level system param, cannot run system" +// )] +// pub fn check_with_world_panics_when_used_with_event_reader_top_level() { +// #[derive(Event)] +// struct TestEvent; +// let system_fn = +// |_res: EventReader, mut _guard: WithWorldGuard>| {}; + +// let mut app = App::new(); +// app.add_systems(Update, system_fn); +// app.insert_resource(Res); +// app.world_mut().spawn(Comp); + +// app.cleanup(); +// app.finish(); +// app.update(); +// } +// } diff --git a/crates/bevy_mod_scripting_core/src/handler.rs b/crates/bevy_mod_scripting_core/src/handler.rs index 631e3d15b7..67fca54053 100644 --- a/crates/bevy_mod_scripting_core/src/handler.rs +++ b/crates/bevy_mod_scripting_core/src/handler.rs @@ -1,5 +1,8 @@ //! Contains the logic for handling script callback events -use bevy_ecs::world::WorldId; +use bevy_ecs::{ + message::{MessageCursor, Messages}, + world::WorldId, +}; use bevy_mod_scripting_bindings::{ InteropError, ScriptValue, ThreadScriptContext, ThreadWorldContainer, WorldAccessGuard, WorldGuard, @@ -15,13 +18,10 @@ use crate::{ CallbackLabel, IntoCallbackLabel, ScriptCallbackEvent, ScriptCallbackResponseEvent, ScriptErrorEvent, }, - extractors::WithWorldGuard, script::ScriptContext, }; use { bevy_ecs::{ - event::EventCursor, - event::Events, system::{Local, SystemState}, world::{Mut, World}, }, @@ -90,14 +90,14 @@ impl ScriptingHandler

for P { #[allow(deprecated)] pub fn event_handler( world: &mut World, - state: &mut EventHandlerSystemState, + state: &mut SystemState>>, ) { // we wrap the inner event handler, so that we can guarantee that the handler context is released statically { let script_context = world.get_resource_or_init::>().clone(); let script_callbacks = world.get_resource_or_init::>().clone(); - let (event_cursor, mut guard) = state.get_mut(world); - let (guard, _) = guard.get_mut(); + let event_cursor = state.get_mut(world); + let guard = WorldAccessGuard::new_exclusive(world); event_handler_inner::

( L::into_callback_label(), event_cursor, @@ -108,22 +108,17 @@ pub fn event_handler( } } -type EventHandlerSystemState<'w, 's> = SystemState<( - Local<'s, EventCursor>, - WithWorldGuard<'w, 's, ()>, -)>; - #[profiling::function] #[allow(deprecated)] pub(crate) fn event_handler_inner( callback_label: CallbackLabel, - mut event_cursor: Local>, + mut event_cursor: Local>, script_context: ScriptContext

, script_callbacks: ScriptCallbacks

, guard: WorldAccessGuard, ) { let mut errors = Vec::default(); - let events = guard.with_resource(|events: &Events| { + let events = guard.with_resource(|events: &Messages| { event_cursor .read(events) .filter(|e| e.label == callback_label) @@ -195,8 +190,8 @@ fn collect_errors(call_result: Result, errors: &mut Ve /// Sends a callback response event to the world pub fn send_callback_response(world: WorldGuard, response: ScriptCallbackResponseEvent) { - let err = world.with_resource_mut(|mut events: Mut>| { - events.send(response); + let err = world.with_resource_mut(|mut events: Mut>| { + events.write(response); }); if let Err(err) = err { @@ -213,9 +208,9 @@ pub fn send_script_errors<'e>( errors: impl IntoIterator, ) { let iter = errors.into_iter(); - let err = world.with_resource_mut(|mut error_events: Mut>| { + let err = world.with_resource_mut(|mut error_events: Mut>| { for error in iter { - error_events.send(ScriptErrorEvent { + error_events.write(ScriptErrorEvent { error: error.clone(), }); } @@ -232,10 +227,10 @@ pub fn send_script_errors<'e>( /// A system which receives all script errors and logs them to console pub fn script_error_logger( world: &mut World, - mut errors_cursor: Local>, + mut errors_cursor: Local>, ) { let guard = WorldGuard::new_exclusive(world); - let errors = guard.with_resource(|events: &Events| { + let errors = guard.with_resource(|events: &Messages| { errors_cursor .read(events) .map(|e| e.error.clone()) diff --git a/crates/bevy_mod_scripting_core/src/lib.rs b/crates/bevy_mod_scripting_core/src/lib.rs index 6ddd081a7b..06d8fc8a83 100644 --- a/crates/bevy_mod_scripting_core/src/lib.rs +++ b/crates/bevy_mod_scripting_core/src/lib.rs @@ -336,9 +336,9 @@ pub struct BMSScriptingInfrastructurePlugin { impl Plugin for BMSScriptingInfrastructurePlugin { fn build(&self, app: &mut App) { - app.add_event::() - .add_event::() - .add_event::() + app.add_message::() + .add_message::() + .add_message::() .init_resource::() .init_asset::() .init_resource::() diff --git a/crates/bevy_mod_scripting_core/src/pipeline/hooks.rs b/crates/bevy_mod_scripting_core/src/pipeline/hooks.rs index 7f1d846153..e25169eb23 100644 --- a/crates/bevy_mod_scripting_core/src/pipeline/hooks.rs +++ b/crates/bevy_mod_scripting_core/src/pipeline/hooks.rs @@ -23,7 +23,10 @@ impl TransitionListener> for OnLoa let emit_responses = P::readonly_configuration(world_id).emit_responses; let callbacks = world.get_resource_or_init::>().clone(); let guard = WorldGuard::new_exclusive(world); - + bevy_log::trace!( + "Running on_script_loaded hook for script: {}", + ctxt.attachment + ); RunScriptCallback::

::new( ctxt.attachment.clone(), OnScriptLoaded::into_callback_label(), @@ -49,7 +52,10 @@ impl TransitionListener> let emit_responses = P::readonly_configuration(world_id).emit_responses; let callbacks = world.get_resource_or_init::>().clone(); let guard = WorldGuard::new_exclusive(world); - + bevy_log::trace!( + "Running on_script_unloaded hook for script: {}", + ctxt.attachment + ); let v = RunScriptCallback::

::new( ctxt.attachment.clone(), OnScriptUnloaded::into_callback_label(), @@ -77,6 +83,11 @@ impl TransitionListener> let callbacks = world.get_resource_or_init::>().clone(); let guard = WorldGuard::new_exclusive(world); + bevy_log::trace!( + "Running on_script_unloaded for reload hook for script: {}", + ctxt.attachment + ); + let v = RunScriptCallback::

::new( ctxt.attachment.clone(), OnScriptUnloaded::into_callback_label(), @@ -106,6 +117,11 @@ impl TransitionListener> for OnRel return Ok(()); } + bevy_log::trace!( + "Running on_script_reloaded hook for script: {}", + ctxt.attachment + ); + let unload_state = ctxt.get_first_typed::(UNLOADED_SCRIPT_STATE_KEY); let unload_state = unload_state.unwrap_or(ScriptValue::Unit); diff --git a/crates/bevy_mod_scripting_core/src/pipeline/machines.rs b/crates/bevy_mod_scripting_core/src/pipeline/machines.rs index 32dfe922ab..2ca903e6e9 100644 --- a/crates/bevy_mod_scripting_core/src/pipeline/machines.rs +++ b/crates/bevy_mod_scripting_core/src/pipeline/machines.rs @@ -6,6 +6,7 @@ use std::{ time::{Duration, Instant}, }; +use bevy_ecs::message::{MessageCursor, Messages}; use bevy_log::debug; use bevy_mod_scripting_bindings::InteropError; use bevy_mod_scripting_script::ScriptAttachment; @@ -19,8 +20,8 @@ use super::*; /// Allows re-publishing of the same events too #[derive(SystemParam)] pub struct StateMachine<'w, 's, T: Send + Sync + 'static, P: IntoScriptPluginParams> { - events: ResMut<'w, Events>>, - cursor: Local<'s, EventCursor>>, + events: ResMut<'w, Messages>>, + cursor: Local<'s, MessageCursor>>, } impl<'w, 's, T: Send + Sync + 'static, P: IntoScriptPluginParams> StateMachine<'w, 's, T, P> { @@ -62,7 +63,7 @@ impl<'w, 's, T: Send + Sync + 'static, P: IntoScriptPluginParams> StateMachine<' /// Consumes an iterator of state machines and writes them to the asset pipe pub fn write_batch(&mut self, batch: impl IntoIterator) { self.events - .send_batch(batch.into_iter().map(ForPlugin::new)); + .write_batch(batch.into_iter().map(ForPlugin::new)); } } @@ -165,7 +166,8 @@ impl ActiveMachines

{ // removed } Some(Err(err)) => { - _ = world.send_event(ScriptErrorEvent::new(err)); + _ = world + .write_message(ScriptErrorEvent::new(err.with_language(P::LANGUAGE))); // removed } None => { @@ -244,7 +246,7 @@ impl ScriptMachine

{ if let Err(err) = (on_entered)(machine_state.as_mut(), world, &mut self.context) { - _ = world.send_event(ScriptErrorEvent::new( + _ = world.write_message(ScriptErrorEvent::new( err.with_context(self.context.attachment.to_string()) .with_context(machine_state.state_name()) .with_language(P::LANGUAGE), @@ -523,13 +525,14 @@ impl MachineState

for ContextAssigned

{ let mut contexts_guard = contexts.write(); // drop any strong handles - match contexts_guard.insert(attachment.clone().into_weak(), self.context.clone()) { + match contexts_guard.insert(attachment.clone(), self.context.clone()) { Ok(_) => {} Err(_) => { drop(contexts_guard); - _ = world.send_event(ScriptErrorEvent::new(ScriptError::from(InteropError::str( - "no context policy matched", - )))) + _ = world.write_message(ScriptErrorEvent::new( + ScriptError::from(InteropError::str("no context policy matched")) + .with_language(P::LANGUAGE), + )) } } Box::new(ready(Ok( diff --git a/crates/bevy_mod_scripting_core/src/pipeline/mod.rs b/crates/bevy_mod_scripting_core/src/pipeline/mod.rs index f759e874c8..10bbe91fd8 100644 --- a/crates/bevy_mod_scripting_core/src/pipeline/mod.rs +++ b/crates/bevy_mod_scripting_core/src/pipeline/mod.rs @@ -5,14 +5,14 @@ use std::{any::Any, collections::VecDeque, marker::PhantomData, sync::Arc, time: use bevy_app::{App, Plugin, PostUpdate}; use bevy_asset::{AssetServer, Assets, Handle, LoadState}; use bevy_ecs::{ - event::{Event, EventCursor, EventReader, EventWriter, Events}, + message::{Message, MessageReader}, resource::Resource, schedule::{IntoScheduleConfigs, Schedule, ScheduleLabel, SystemSet}, system::{Command, Local, Res, ResMut, SystemParam}, world::World, }; use bevy_log::debug; -use bevy_mod_scripting_asset::ScriptAsset; +use bevy_mod_scripting_asset::{Language, ScriptAsset}; use bevy_mod_scripting_bindings::WorldGuard; use bevy_mod_scripting_display::DisplayProxy; use bevy_platform::collections::HashSet; @@ -138,8 +138,8 @@ impl std::fmt::Debug for ScriptProcessingSchedule

} impl ScriptLoadingPipeline

{ - fn add_plugin_event(&self, app: &mut App) -> &Self { - app.add_event::().add_event::>(); + fn add_plugin_message(&self, app: &mut App) -> &Self { + app.add_message::().add_message::>(); self } } @@ -156,21 +156,21 @@ pub trait GetScriptHandle { /// is loaded, will also guarantee a strong handle, otherwise the whole thing is skipped. /// /// Think of this as a proxy for "baby'ing" asset handles -pub struct LoadedWithHandles<'w, 's, T: GetScriptHandle + Event + Clone> { +pub struct LoadedWithHandles<'w, 's, T: GetScriptHandle + Message + Clone> { assets: ResMut<'w, Assets>, asset_server: Res<'w, AssetServer>, - fresh_events: EventReader<'w, 's, T>, - loaded_with_handles: Local<'s, VecDeque<(T, StrongScriptHandle)>>, + fresh_events: MessageReader<'w, 's, T>, + loaded_with_handles: Local<'s, VecDeque<(T, StrongScriptHandle, Language)>>, loading: Local<'s, VecDeque>, } -impl LoadedWithHandles<'_, '_, T> { +impl LoadedWithHandles<'_, '_, T> { /// Retrieves all of the events of type `T`, which have finished loading and have a strong handle, /// the rest will be discarded. /// /// This uses a [`EventReader`] underneath, meaning if you don't call this method once every frame (or every other frame). /// You may miss events. - pub fn get_loaded(&mut self) -> impl Iterator { + pub fn get_loaded(&mut self) -> impl Iterator { // first get all of the fresh_events self.loading.extend(self.fresh_events.read().cloned()); // now process the loading queue @@ -180,7 +180,8 @@ impl LoadedWithHandles<'_, '_, T> { Some(LoadState::Loaded) | None => { // none in case this is added in memory and not through asset server let strong = StrongScriptHandle::from_assets(handle, &mut self.assets); if let Some(strong) = strong { - self.loaded_with_handles.push_front((e.clone(), strong)); + let lang = strong.get(&self.assets).language.clone(); + self.loaded_with_handles.push_front((e.clone(), strong, lang)); } false } @@ -203,9 +204,9 @@ impl LoadedWithHandles<'_, '_, T> { impl Plugin for ScriptLoadingPipeline

{ fn build(&self, app: &mut App) { - self.add_plugin_event::(app) - .add_plugin_event::(app) - .add_plugin_event::(app); + self.add_plugin_message::(app) + .add_plugin_message::(app) + .add_plugin_message::(app); let mut active_machines = app.world_mut().get_resource_or_init::>(); if self.on_script_loaded_callback { @@ -405,7 +406,7 @@ impl<'w, P: IntoScriptPluginParams> ScriptPipelineState<'w, P> { #[cfg(test)] mod test { - use bevy_asset::{AssetApp, AssetId, AssetPlugin}; + use bevy_asset::{AssetApp, AssetPlugin}; use bevy_ecs::{entity::Entity, system::SystemState, world::FromWorld}; use bevy_mod_scripting_asset::Language; use bevy_mod_scripting_bindings::ScriptValue; @@ -418,7 +419,7 @@ mod test { #[test] fn test_system_params() { let mut app = App::default(); - app.add_event::(); + app.add_message::(); app.add_plugins(AssetPlugin::default()); app.init_asset::(); app.finish(); @@ -441,9 +442,9 @@ mod test { language: Language::Lua, }; let handle = asset_server.add(asset); - let handle_invalid = Handle::Weak(AssetId::invalid()); - world.send_event(ScriptAttachedEvent(ScriptAttachment::StaticScript(handle))); - world.send_event(ScriptAttachedEvent(ScriptAttachment::StaticScript( + let handle_invalid = Handle::default(); + world.write_message(ScriptAttachedEvent(ScriptAttachment::StaticScript(handle))); + world.write_message(ScriptAttachedEvent(ScriptAttachment::StaticScript( handle_invalid, ))); @@ -468,7 +469,7 @@ mod test { #[test] fn test_run_override_is_undid() { let mut app = App::default(); - app.add_event::(); + app.add_message::(); app.add_plugins((AssetPlugin::default(), TestPlugin::default())); app.init_asset::(); diff --git a/crates/bevy_mod_scripting_core/src/pipeline/start.rs b/crates/bevy_mod_scripting_core/src/pipeline/start.rs index f02b15a111..6e94a85221 100644 --- a/crates/bevy_mod_scripting_core/src/pipeline/start.rs +++ b/crates/bevy_mod_scripting_core/src/pipeline/start.rs @@ -1,16 +1,17 @@ use super::*; use bevy_asset::AssetEvent; +use bevy_ecs::message::{MessageReader, MessageWriter}; use bevy_log::{debug, trace}; /// A handle to a script asset which can only be made from a strong handle #[derive(Clone, Debug)] pub struct StrongScriptHandle(Handle); -impl GetScriptHandle for ScriptAssetModifiedEvent { - fn get_script_handle(&self) -> Handle { - Handle::Weak(self.0) - } -} +// impl GetScriptHandle for ScriptAssetModifiedEvent { +// fn get_script_handle(&self) -> Handle { +// self.0.clone() +// } +// } impl GetScriptHandle for ScriptAttachedEvent { fn get_script_handle(&self) -> Handle { @@ -58,8 +59,8 @@ impl StrongScriptHandle { /// Generate [`ScriptAssetModifiedEvent`]'s from asset modification events, filtering to only forward those matching the plugin's language pub fn filter_script_modifications( - mut events: EventReader>, - mut filtered: EventWriter>, + mut events: MessageReader>, + mut filtered: MessageWriter>, assets: Res>, ) { let mut batch = events.read().filter_map(|e| { @@ -81,13 +82,19 @@ pub fn filter_script_modifications( /// Filters incoming [`ScriptAttachedEvent`]'s leaving only those which match the plugin's language pub fn filter_script_attachments( mut events: LoadedWithHandles, - mut filtered: EventWriter>, + mut filtered: MessageWriter>, ) { - let mut batch = events.get_loaded().map(|(mut a, b)| { - trace!("dispatching script attachment event for: {a:?}"); - *a.0.script_mut() = b.0; - ForPlugin::new(a) - }); + let mut batch = events + .get_loaded() + .filter(|(_, _, l)| *l == P::LANGUAGE) + .map(|(mut a, b, _)| { + trace!( + "dispatching script attachment event for: {a:?}, language: {}", + P::LANGUAGE + ); + *a.0.script_mut() = b.0; + ForPlugin::new(a) + }); if let Some(next) = batch.next() { filtered.write_batch(std::iter::once(next).chain(batch)); @@ -96,8 +103,8 @@ pub fn filter_script_attachments( /// Filters incoming [`ScriptDetachedEvent`]'s leaving only those which are currently attached pub fn filter_script_detachments( - mut events: EventReader, - mut filtered: EventWriter>, + mut events: MessageReader, + mut filtered: MessageWriter>, contexts: Res>, ) { let contexts_guard = contexts.read(); @@ -115,7 +122,7 @@ pub fn filter_script_detachments( /// Process [`ScriptAttachedEvent`]'s and generate loading machines with the [`LoadingInitialized`] and [`ReloadingInitialized`] states pub fn process_attachments( - mut events: EventReader>, + mut events: MessageReader>, mut machines: ResMut>, mut assets: ResMut>, contexts: Res>, @@ -157,7 +164,7 @@ pub fn process_attachments( /// Processes [`ScriptAttachedEvent`]'s and initialized unloading state machines with [`UnloadingInitialized`] states pub fn process_detachments( - mut events: EventReader>, + mut events: MessageReader>, mut machines: ResMut>, contexts: Res>, ) { @@ -181,7 +188,7 @@ pub fn process_detachments( /// Processes [`ScriptAssetModifiedEvent`]'s and initializes loading state machines with [`ReloadingInitialized`] states pub fn process_asset_modifications( - mut events: EventReader>, + mut events: MessageReader>, mut machines: ResMut>, mut assets: ResMut>, contexts: Res>, diff --git a/crates/bevy_mod_scripting_core/src/script/context_key.rs b/crates/bevy_mod_scripting_core/src/script/context_key.rs index 640d32abfe..9872c69d8e 100644 --- a/crates/bevy_mod_scripting_core/src/script/context_key.rs +++ b/crates/bevy_mod_scripting_core/src/script/context_key.rs @@ -1,7 +1,7 @@ use std::fmt; +use bevy_asset::AssetId; use bevy_ecs::entity::Entity; -use bevy_mod_scripting_display::DisplayProxy; use super::*; use crate::ScriptAsset; @@ -11,11 +11,11 @@ impl From for ContextKey { match val { ScriptAttachment::EntityScript(entity, script) => ContextKey { entity: Some(entity), - script: Some(script), + script: Some(script.id()), }, ScriptAttachment::StaticScript(script) => ContextKey { entity: None, - script: Some(script), + script: Some(script.id()), }, } } @@ -30,7 +30,7 @@ pub struct ContextKey { pub entity: Option, /// Script ID if there is one. /// Can be empty if the script is not driven by an asset. - pub script: Option>, + pub script: Option>, } impl fmt::Display for ContextKey { @@ -38,7 +38,7 @@ impl fmt::Display for ContextKey { // write!(f, "context ")?; let mut empty = true; if let Some(script_id) = &self.script { - write!(f, "script {}", script_id.display())?; + write!(f, "script {script_id}")?; empty = false; } if let Some(id) = self.entity { @@ -56,7 +56,7 @@ impl ContextKey { /// Creates an invalid context key, which should never exist. pub const INVALID: Self = Self { entity: Some(Entity::PLACEHOLDER), - script: Some(Handle::Weak(AssetId::invalid())), + script: Some(AssetId::invalid()), }; /// Creates a shared context key, which is used for shared contexts @@ -79,16 +79,4 @@ impl ContextKey { script: self.script.or(other.script), } } - - /// If a script handle is present and is strong, convert it to a weak - /// handle. - pub fn into_weak(mut self) -> Self { - if let Some(script) = &self.script - && script.is_strong() - { - self.script = Some(script.clone_weak()); - } - - self - } } diff --git a/crates/bevy_mod_scripting_core/src/script/mod.rs b/crates/bevy_mod_scripting_core/src/script/mod.rs index 296d4cb175..c7b7e06892 100644 --- a/crates/bevy_mod_scripting_core/src/script/mod.rs +++ b/crates/bevy_mod_scripting_core/src/script/mod.rs @@ -8,17 +8,16 @@ use std::{ use crate::event::{ScriptAttachedEvent, ScriptDetachedEvent}; use ::{ - bevy_asset::{AssetId, Handle}, + bevy_asset::Handle, bevy_ecs::{ - component::HookContext, entity::Entity, prelude::ReflectComponent, resource::Resource, - world::DeferredWorld, + entity::Entity, prelude::ReflectComponent, resource::Resource, world::DeferredWorld, }, bevy_reflect::Reflect, }; mod context_key; mod script_context; -use bevy_ecs::component::Component; +use bevy_ecs::{component::Component, lifecycle::HookContext}; use bevy_log::trace; use bevy_mod_scripting_asset::ScriptAsset; use bevy_mod_scripting_script::ScriptAttachment; @@ -28,7 +27,7 @@ pub use script_context::*; /// A unique identifier for a script, by default corresponds to the path of the asset excluding the asset source. /// /// I.e. an asset with the path `path/to/asset.ext` will have the script id `path/to/asset.ext` -pub type ScriptId = AssetId; +pub type ScriptId = Handle; #[derive(Component, Reflect, Clone, Default, Debug)] #[reflect(Component)] @@ -67,7 +66,7 @@ impl ScriptComponent { pub fn on_remove(mut world: DeferredWorld, context: HookContext) { let context_keys = Self::get_context_keys_present(&world, context.entity); trace!("on remove hook for script components: {context_keys:?}"); - world.send_event_batch(context_keys.into_iter().map(ScriptDetachedEvent)); + world.write_message_batch(context_keys.into_iter().map(ScriptDetachedEvent)); } /// the lifecycle hook called when a script component is added to an entity, emits an appropriate event so we can handle @@ -75,29 +74,27 @@ impl ScriptComponent { pub fn on_add(mut world: DeferredWorld, context: HookContext) { let context_keys = Self::get_context_keys_present(&world, context.entity); trace!("on add hook for script components: {context_keys:?}"); - world.send_event_batch(context_keys.into_iter().map(ScriptAttachedEvent)); + world.write_message_batch(context_keys.into_iter().map(ScriptAttachedEvent)); } } #[cfg(test)] mod tests { - use bevy_ecs::{event::Events, world::World}; + use bevy_ecs::{message::Messages, world::World}; use super::*; #[test] fn test_component_add() { let mut world = World::new(); - world.init_resource::>(); + world.init_resource::>(); // spawn new script component - let entity = world - .spawn(ScriptComponent::new([Handle::Weak(AssetId::invalid())])) - .id(); + let entity = world.spawn(ScriptComponent::new([Handle::default()])).id(); // check that the event was sent - let mut events = world.resource_mut::>(); + let mut events = world.resource_mut::>(); assert_eq!( - ScriptAttachment::EntityScript(entity, Handle::Weak(AssetId::invalid())), + ScriptAttachment::EntityScript(entity, Handle::default()), events.drain().next().unwrap().0 ); } diff --git a/crates/bevy_mod_scripting_core/src/script/script_context.rs b/crates/bevy_mod_scripting_core/src/script/script_context.rs index 952514b0fd..ee95373f16 100644 --- a/crates/bevy_mod_scripting_core/src/script/script_context.rs +++ b/crates/bevy_mod_scripting_core/src/script/script_context.rs @@ -63,7 +63,7 @@ impl ContextKeySelector for ContextRule { ContextRule::EntityScript => { context_key .entity - .zip(context_key.script.clone()) + .zip(context_key.script) .map(|(entity, script)| ContextKey { entity: Some(entity), script: Some(script), @@ -303,13 +303,10 @@ impl ScriptContextInner

{ ) -> Result<(), (ScriptAttachment, Arc>)> { match self.policy.select(&context_key) { Some(key) => { - let entry = self - .map - .entry(key.into_weak()) - .or_insert_with(|| ContextEntry { - context: context.clone(), - residents: HashSet::from_iter([context_key.clone()]), - }); + let entry = self.map.entry(key.clone()).or_insert_with(|| ContextEntry { + context: context.clone(), + residents: HashSet::from_iter([context_key.clone()]), + }); entry.context = context; entry.residents.insert(context_key.clone()); @@ -348,7 +345,7 @@ impl ScriptContextInner

{ context, residents: HashSet::from_iter([context_key.clone()]), // context with a residency of one }; - self.map.insert(key.into_weak(), entry); + self.map.insert(key.clone(), entry); Ok(()) } None => Err(context), @@ -466,7 +463,6 @@ impl Default for ScriptContextInner

{ mod tests { use crate::config::{GetPluginThreadConfig, ScriptingPluginConfiguration}; use bevy_app::{App, Plugin}; - use bevy_asset::AssetIndex; use bevy_mod_scripting_bindings::ScriptValue; use test_utils::make_test_plugin; @@ -480,14 +476,10 @@ mod tests { let script_context = ScriptContext::::new(policy.clone()); let mut script_context = script_context.write(); - let context_key = ScriptAttachment::EntityScript( - Entity::from_raw(1), - Handle::Weak(AssetIndex::from_bits(1).into()), - ); - let context_key2 = ScriptAttachment::EntityScript( - Entity::from_raw(2), - Handle::Weak(AssetIndex::from_bits(1).into()), - ); + let context_key = + ScriptAttachment::EntityScript(Entity::from_raw_u32(1u32).unwrap(), Handle::default()); + let context_key2 = + ScriptAttachment::EntityScript(Entity::from_raw_u32(2u32).unwrap(), Handle::default()); assert_eq!(policy.select(&context_key), policy.select(&context_key2)); script_context diff --git a/crates/bevy_mod_scripting_core/src/script_system.rs b/crates/bevy_mod_scripting_core/src/script_system.rs index 1171a03cd9..9cc4461e35 100644 --- a/crates/bevy_mod_scripting_core/src/script_system.rs +++ b/crates/bevy_mod_scripting_core/src/script_system.rs @@ -7,10 +7,9 @@ use crate::{ use ::{ bevy_ecs::{ - archetype::{ArchetypeComponentId, ArchetypeGeneration}, component::{ComponentId, Tick}, entity::Entity, - query::{Access, FilteredAccess, FilteredAccessSet, QueryState}, + query::{FilteredAccess, FilteredAccessSet, QueryState}, reflect::AppTypeRegistry, schedule::SystemSet, system::{System, SystemParamValidationError}, @@ -18,13 +17,12 @@ use ::{ }, bevy_reflect::Reflect, }; -use bevy_app::DynEq; use bevy_ecs::{ schedule::{InternedSystemSet, IntoScheduleConfigs, Schedule, Schedules}, - system::SystemIn, + system::{RunSystemError, SystemIn, SystemStateFlags}, world::DeferredWorld, }; -use bevy_log::{debug, error, info, warn_once}; +use bevy_log::{debug, error, warn_once}; use bevy_mod_scripting_bindings::{ AppReflectAllocator, AppScheduleRegistry, AppScriptComponentRegistry, AppScriptFunctionRegistry, InteropError, IntoScript, ReflectAccessId, ReflectReference, @@ -33,6 +31,7 @@ use bevy_mod_scripting_bindings::{ }; use bevy_mod_scripting_script::ScriptAttachment; use bevy_system_reflection::{ReflectSchedule, ReflectSystem}; +use bevy_utils::prelude::DebugName; use std::{ any::TypeId, borrow::Cow, collections::HashSet, hash::Hash, marker::PhantomData, ops::Deref, }; @@ -62,14 +61,6 @@ impl SystemSet for ScriptSystemSet { fn dyn_clone(&self) -> Box { Box::new(self.clone()) } - - fn as_dyn_eq(&self) -> &dyn DynEq { - self - } - - fn dyn_hash(&self, mut state: &mut dyn ::core::hash::Hasher) { - self.hash(&mut state); - } } #[derive(Clone)] @@ -164,11 +155,8 @@ impl ScriptSystemBuilder { { for default_set in other.default_system_sets() { if is_before { - info!("before {default_set:?}"); system_config = system_config.before(*default_set); } else { - info!("before {default_set:?}"); - info!("after {default_set:?}"); system_config = system_config.after(*default_set); } } @@ -227,25 +215,10 @@ pub enum ScriptSystemParam { /// A system specified, created, and added by a script pub struct DynamicScriptSystem { - name: Cow<'static, str>, + name: DebugName, exclusive: bool, - /// The set of component accesses for this system. This is used to determine - /// - soundness issues (e.g. multiple [`SystemParam`]s mutably accessing the same component) - /// - ambiguities in the schedule (e.g. two systems that have some sort of conflicting access) - pub(crate) component_access_set: FilteredAccessSet, - /// This [`Access`] is used to determine which systems can run in parallel with each other - /// in the multithreaded executor. - /// - /// We use a [`ArchetypeComponentId`] as it is more precise than just checking [`ComponentId`]: - /// for example if you have one system with `Query<&mut T, With>` and one system with `Query<&mut T, With>` - /// they conflict if you just look at the [`ComponentId`] of `T`; but if there are no archetypes with - /// both `A`, `B` and `T` then in practice there's no risk of conflict. By using [`ArchetypeComponentId`] - /// we can be more precise because we can check if the existing archetypes of the [`World`] - /// cause a conflict - pub(crate) archetype_component_access: Access, pub(crate) last_run: Tick, target_attachment: ScriptAttachment, - archetype_generation: ArchetypeGeneration, system_param_descriptors: Vec, state: Option>, _marker: std::marker::PhantomData P>, @@ -264,53 +237,43 @@ impl bevy_ecs::system::IntoSystem<(), (), IsDynamicSc Self::System { name: builder.name.to_string().into(), exclusive: builder.is_exclusive, - archetype_generation: ArchetypeGeneration::initial(), system_param_descriptors: builder.system_params, last_run: Default::default(), target_attachment: builder.attachment, state: None, - component_access_set: Default::default(), - archetype_component_access: Default::default(), _marker: Default::default(), } } } -#[profiling::all_functions] +// #[profiling::all_functions] impl System for DynamicScriptSystem

{ type In = (); type Out = (); - fn name(&self) -> std::borrow::Cow<'static, str> { + fn name(&self) -> DebugName { self.name.clone() } - fn component_access(&self) -> &Access { - self.component_access_set.combined_access() - } - - fn archetype_component_access(&self) -> &Access { - &self.archetype_component_access - } - - fn is_send(&self) -> bool { - !self.is_exclusive() - } - - fn is_exclusive(&self) -> bool { - self.exclusive + fn flags(&self) -> SystemStateFlags { + println!("flags"); + if self.exclusive { + SystemStateFlags::NON_SEND | SystemStateFlags::EXCLUSIVE + } else { + SystemStateFlags::empty() + } } - fn has_deferred(&self) -> bool { - false - } + // fn component_access(&self) -> &Access { + // self.component_access_set.combined_access() + // } unsafe fn run_unsafe( &mut self, _input: SystemIn<'_, Self>, world: UnsafeWorldCell, - ) -> Self::Out { + ) -> Result { let _change_tick = world.increment_change_tick(); #[allow( @@ -411,9 +374,11 @@ impl System for DynamicScriptSystem

{ self.target_attachment ); } + + Ok(()) } - fn initialize(&mut self, world: &mut World) { + fn initialize(&mut self, world: &mut World) -> FilteredAccessSet { // we need to register all the: // - resources, simple just need the component ID's // - queries, more difficult the queries need to be built, and archetype access registered on top of component access @@ -421,6 +386,7 @@ impl System for DynamicScriptSystem

{ // start with resources let mut subset = HashSet::default(); let mut system_params = Vec::with_capacity(self.system_param_descriptors.len()); + let mut component_access_set = FilteredAccessSet::new(); for param in &self.system_param_descriptors { match param { ScriptSystemParamDescriptor::Res(res) => { @@ -433,10 +399,10 @@ impl System for DynamicScriptSystem

{ }; system_params.push(system_param); - let mut access = FilteredAccess::::matches_nothing(); + let mut access = FilteredAccess::matches_nothing(); access.add_resource_write(component_id); - self.component_access_set.add(access); + component_access_set.add(access); let raid = ReflectAccessId::for_component_id(component_id); #[allow( clippy::panic, @@ -456,8 +422,7 @@ impl System for DynamicScriptSystem

{ let query = query.as_query_state::(world); // Safety: we are not removing - self.component_access_set - .add(query.component_access().clone()); + component_access_set.add(query.component_access().clone()); let new_raids = get_all_access_ids(query.component_access().access()) .into_iter() @@ -496,37 +461,13 @@ impl System for DynamicScriptSystem

{ system_params, script_contexts: world.get_resource_or_init::>().clone(), script_callbacks: world.get_resource_or_init::>().clone(), - }) - } - - fn update_archetype_component_access(&mut self, world: UnsafeWorldCell) { - let archetypes = world.archetypes(); - - let old_generation = - std::mem::replace(&mut self.archetype_generation, archetypes.generation()); + }); - if let Some(state) = &mut self.state { - for archetype in &archetypes[old_generation..] { - for param in &mut state.system_params { - if let ScriptSystemParam::EntityQuery { query, .. } = param { - // SAFETY: The assertion above ensures that the param_state was initialized from `world`. - unsafe { - query.new_archetype(archetype, &mut self.archetype_component_access) - }; - } - } - } - } + component_access_set } - fn check_change_tick(&mut self, change_tick: Tick) { - let last_run = &mut self.last_run; - let this_run = change_tick; - - let age = this_run.get().wrapping_sub(last_run.get()); - if age > Tick::MAX.get() { - *last_run = Tick::new(this_run.get().wrapping_sub(Tick::MAX.get())); - } + fn check_change_tick(&mut self, change_tick: bevy_ecs::component::CheckChangeTicks) { + self.last_run.check_tick(change_tick); } fn get_last_run(&self) -> Tick { @@ -558,7 +499,6 @@ impl System for DynamicScriptSystem

{ fn validate_param(&mut self, world: &World) -> Result<(), SystemParamValidationError> { let world_cell = world.as_unsafe_world_cell_readonly(); - self.update_archetype_component_access(world_cell); // SAFETY: // - We have exclusive access to the entire world. // - `update_archetype_component_access` has been called. @@ -666,7 +606,7 @@ impl ManageScriptSystems for WorldGuard<'_> { mod test { use ::{ bevy_app::{App, MainScheduleOrder, Plugin, Update}, - bevy_asset::{AssetId, AssetPlugin, Handle}, + bevy_asset::{AssetPlugin, Handle}, bevy_diagnostic::DiagnosticsPlugin, bevy_ecs::{ entity::Entity, @@ -727,7 +667,7 @@ mod test { // now dynamically add script system via builder, without a matching script let mut builder = ScriptSystemBuilder::new( "test".into(), - ScriptAttachment::StaticScript(Handle::Weak(AssetId::invalid())), + ScriptAttachment::StaticScript(Handle::default()), ); builder.before_system(test_system); diff --git a/crates/bevy_mod_scripting_functions/Cargo.toml b/crates/bevy_mod_scripting_functions/Cargo.toml index ed662f7b61..d8a90d5b37 100644 --- a/crates/bevy_mod_scripting_functions/Cargo.toml +++ b/crates/bevy_mod_scripting_functions/Cargo.toml @@ -15,6 +15,7 @@ readme.workspace = true bevy_a11y = ["bevy_a11y_bms_bindings"] bevy_animation = ["bevy_animation_bms_bindings"] bevy_asset = ["bevy_asset_bms_bindings"] +bevy_camera = ["bevy_camera_bms_bindings"] bevy_color = ["bevy_color_bms_bindings"] bevy_core_pipeline = ["bevy_core_pipeline_bms_bindings"] bevy_ecs = ["bevy_ecs_bms_bindings"] @@ -23,17 +24,22 @@ bevy_gltf = ["bevy_gltf_bms_bindings"] bevy_image = ["bevy_image_bms_bindings"] bevy_input = ["bevy_input_bms_bindings"] bevy_input_focus = ["bevy_input_focus_bms_bindings"] +bevy_light = ["bevy_light_bms_bindings"] bevy_math = ["bevy_math_bms_bindings"] bevy_mesh = ["bevy_mesh_bms_bindings"] bevy_pbr = ["bevy_pbr_bms_bindings"] bevy_picking = ["bevy_picking_bms_bindings"] +bevy_post_process = ["bevy_post_process_bms_bindings"] bevy_reflect = ["bevy_reflect_bms_bindings"] bevy_render = ["bevy_render_bms_bindings"] bevy_scene = ["bevy_scene_bms_bindings"] bevy_sprite = ["bevy_sprite_bms_bindings"] +bevy_sprite_render = ["bevy_sprite_render_bms_bindings"] bevy_text = ["bevy_text_bms_bindings"] bevy_time = ["bevy_time_bms_bindings"] bevy_transform = ["bevy_transform_bms_bindings"] +bevy_ui = ["bevy_ui_bms_bindings"] +bevy_ui_render = ["bevy_ui_render_bms_bindings"] core_functions = [] lua_bindings = ["bevy_mod_scripting_lua"] @@ -61,6 +67,7 @@ bevy_reflect = { workspace = true, features = [] } bevy_a11y_bms_bindings = { path = "../bindings/bevy_a11y_bms_bindings", version = "0.17.0", optional = true } bevy_animation_bms_bindings = { path = "../bindings/bevy_animation_bms_bindings", version = "0.17.0", optional = true } bevy_asset_bms_bindings = { path = "../bindings/bevy_asset_bms_bindings", version = "0.17.0", optional = true } +bevy_camera_bms_bindings = { path = "../bindings/bevy_camera_bms_bindings", version = "0.17.0", optional = true } bevy_color_bms_bindings = { path = "../bindings/bevy_color_bms_bindings", version = "0.17.0", optional = true } bevy_core_pipeline_bms_bindings = { path = "../bindings/bevy_core_pipeline_bms_bindings", version = "0.17.0", optional = true } bevy_ecs_bms_bindings = { path = "../bindings/bevy_ecs_bms_bindings", version = "0.17.0", optional = true } @@ -69,17 +76,22 @@ bevy_gltf_bms_bindings = { path = "../bindings/bevy_gltf_bms_bindings", version bevy_image_bms_bindings = { path = "../bindings/bevy_image_bms_bindings", version = "0.17.0", optional = true } bevy_input_bms_bindings = { path = "../bindings/bevy_input_bms_bindings", version = "0.17.0", optional = true } bevy_input_focus_bms_bindings = { path = "../bindings/bevy_input_focus_bms_bindings", version = "0.17.0", optional = true } +bevy_light_bms_bindings = { path = "../bindings/bevy_light_bms_bindings", version = "0.17.0", optional = true } bevy_math_bms_bindings = { path = "../bindings/bevy_math_bms_bindings", version = "0.17.0", optional = true } bevy_mesh_bms_bindings = { path = "../bindings/bevy_mesh_bms_bindings", version = "0.17.0", optional = true } bevy_pbr_bms_bindings = { path = "../bindings/bevy_pbr_bms_bindings", version = "0.17.0", optional = true } bevy_picking_bms_bindings = { path = "../bindings/bevy_picking_bms_bindings", version = "0.17.0", optional = true } +bevy_post_process_bms_bindings = { path = "../bindings/bevy_post_process_bms_bindings", version = "0.17.0", optional = true } bevy_reflect_bms_bindings = { path = "../bindings/bevy_reflect_bms_bindings", version = "0.17.0", optional = true } bevy_render_bms_bindings = { path = "../bindings/bevy_render_bms_bindings", version = "0.17.0", optional = true } bevy_scene_bms_bindings = { path = "../bindings/bevy_scene_bms_bindings", version = "0.17.0", optional = true } bevy_sprite_bms_bindings = { path = "../bindings/bevy_sprite_bms_bindings", version = "0.17.0", optional = true } +bevy_sprite_render_bms_bindings = { path = "../bindings/bevy_sprite_render_bms_bindings", version = "0.17.0", optional = true } bevy_text_bms_bindings = { path = "../bindings/bevy_text_bms_bindings", version = "0.17.0", optional = true } bevy_time_bms_bindings = { path = "../bindings/bevy_time_bms_bindings", version = "0.17.0", optional = true } bevy_transform_bms_bindings = { path = "../bindings/bevy_transform_bms_bindings", version = "0.17.0", optional = true } +bevy_ui_bms_bindings = { path = "../bindings/bevy_ui_bms_bindings", version = "0.17.0", optional = true } +bevy_ui_render_bms_bindings = { path = "../bindings/bevy_ui_render_bms_bindings", version = "0.17.0", optional = true } [lints] workspace = true diff --git a/crates/bevy_mod_scripting_functions/src/core.rs b/crates/bevy_mod_scripting_functions/src/core.rs index 5da871d8e0..97129069fb 100644 --- a/crates/bevy_mod_scripting_functions/src/core.rs +++ b/crates/bevy_mod_scripting_functions/src/core.rs @@ -35,6 +35,8 @@ pub fn register_bevy_bindings(app: &mut App) { app.add_plugins(bevy_animation_bms_bindings::BevyAnimationScriptingPlugin); #[cfg(feature = "bevy_asset")] app.add_plugins(bevy_asset_bms_bindings::BevyAssetScriptingPlugin); + #[cfg(feature = "bevy_camera")] + app.add_plugins(bevy_camera_bms_bindings::BevyCameraScriptingPlugin); #[cfg(feature = "bevy_color")] app.add_plugins(bevy_color_bms_bindings::BevyColorScriptingPlugin); #[cfg(feature = "bevy_core_pipeline")] @@ -51,6 +53,8 @@ pub fn register_bevy_bindings(app: &mut App) { app.add_plugins(bevy_input_bms_bindings::BevyInputScriptingPlugin); #[cfg(feature = "bevy_input_focus")] app.add_plugins(bevy_input_focus_bms_bindings::BevyInputFocusScriptingPlugin); + #[cfg(feature = "bevy_light")] + app.add_plugins(bevy_light_bms_bindings::BevyLightScriptingPlugin); #[cfg(feature = "bevy_math")] app.add_plugins(bevy_math_bms_bindings::BevyMathScriptingPlugin); #[cfg(feature = "bevy_mesh")] @@ -59,6 +63,8 @@ pub fn register_bevy_bindings(app: &mut App) { app.add_plugins(bevy_pbr_bms_bindings::BevyPbrScriptingPlugin); #[cfg(feature = "bevy_picking")] app.add_plugins(bevy_picking_bms_bindings::BevyPickingScriptingPlugin); + #[cfg(feature = "bevy_post_process")] + app.add_plugins(bevy_post_process_bms_bindings::BevyPostProcessScriptingPlugin); #[cfg(feature = "bevy_reflect")] app.add_plugins(bevy_reflect_bms_bindings::BevyReflectScriptingPlugin); #[cfg(feature = "bevy_render")] @@ -67,12 +73,18 @@ pub fn register_bevy_bindings(app: &mut App) { app.add_plugins(bevy_scene_bms_bindings::BevySceneScriptingPlugin); #[cfg(feature = "bevy_sprite")] app.add_plugins(bevy_sprite_bms_bindings::BevySpriteScriptingPlugin); + #[cfg(feature = "bevy_sprite_render")] + app.add_plugins(bevy_sprite_renderer_bms_bindings::BevySpriteRendererScriptingPlugin); #[cfg(feature = "bevy_text")] app.add_plugins(bevy_text_bms_bindings::BevyTextScriptingPlugin); #[cfg(feature = "bevy_time")] app.add_plugins(bevy_time_bms_bindings::BevyTimeScriptingPlugin); #[cfg(feature = "bevy_transform")] app.add_plugins(bevy_transform_bms_bindings::BevyTransformScriptingPlugin); + #[cfg(feature = "bevy_ui")] + app.add_plugins(bevy_ui_bms_bindings::BevyUiScriptingPlugin); + #[cfg(feature = "bevy_ui_render")] + app.add_plugins(bevy_ui_renderer_bms_bindings::BevyUiRendererScriptingPlugin); } #[script_bindings( diff --git a/crates/bevy_mod_scripting_script/src/lib.rs b/crates/bevy_mod_scripting_script/src/lib.rs index ae84fc343c..285a36603e 100644 --- a/crates/bevy_mod_scripting_script/src/lib.rs +++ b/crates/bevy_mod_scripting_script/src/lib.rs @@ -59,18 +59,6 @@ impl ScriptAttachment { } } - /// Downcasts any script handles into weak handles. - pub fn into_weak(self) -> Self { - match self { - ScriptAttachment::EntityScript(entity, script) => { - ScriptAttachment::EntityScript(entity, script.clone_weak()) - } - ScriptAttachment::StaticScript(script) => { - ScriptAttachment::StaticScript(script.clone_weak()) - } - } - } - /// Returns true if the attachment is a static script. pub fn is_static(&self) -> bool { matches!(self, ScriptAttachment::StaticScript(_)) diff --git a/crates/bevy_system_reflection/src/lib.rs b/crates/bevy_system_reflection/src/lib.rs index 85f897def1..5867a10b52 100644 --- a/crates/bevy_system_reflection/src/lib.rs +++ b/crates/bevy_system_reflection/src/lib.rs @@ -11,6 +11,7 @@ use ::{ bevy_platform::collections::{HashMap, HashSet}, bevy_reflect::Reflect, }; +use bevy_ecs::schedule::SystemKey; use bevy_log::warn; use dot_writer::{Attributes, DotWriter}; @@ -47,12 +48,12 @@ impl ReflectSystem { /// Creates a reflect system from a system specification pub fn from_system( system: &dyn System, - node_id: NodeId, + node_id: SystemKey, ) -> Self { ReflectSystem { - name: system.name().clone(), + name: system.name().into(), type_id: system.type_id(), - node_id: ReflectNodeId(node_id), + node_id: ReflectNodeId(NodeId::System(node_id)), default_system_sets: system.default_system_sets(), } } @@ -257,17 +258,17 @@ pub fn schedule_to_reflect_graph(schedule: &Schedule) -> ReflectSystemGraph { let mut nodes = Vec::new(); let mut covered_nodes = HashSet::new(); - for (node_id, system_set, _) in graph.system_sets() { - covered_nodes.insert(node_id); + for (node_id, system_set, _) in graph.system_sets.iter() { + covered_nodes.insert(NodeId::Set(node_id)); nodes.push(ReflectSystemGraphNode::SystemSet( - ReflectSystemSet::from_set(system_set, node_id), + ReflectSystemSet::from_set(system_set, NodeId::Set(node_id)), )); } // for some reason the graph doesn't contain these if let Ok(systems) = schedule.systems() { for (node_id, system) in systems { - covered_nodes.insert(node_id); + covered_nodes.insert(NodeId::System(node_id)); nodes.push(ReflectSystemGraphNode::System(ReflectSystem::from_system( system.as_ref(), node_id, diff --git a/crates/bindings/bevy_a11y_bms_bindings/Cargo.toml b/crates/bindings/bevy_a11y_bms_bindings/Cargo.toml index b910600307..64efd0dd52 100644 --- a/crates/bindings/bevy_a11y_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_a11y_bms_bindings/Cargo.toml @@ -17,25 +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.16.1", features = [ - "std", - "bevy_reflect", -], default-features = true } +bevy_a11y = { version = "0.17.2", features = ["bevy_reflect", "std"], default-features = true} -bevy_app = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_derive = { version = "^0.16.1", features = [], default-features = true } +bevy_derive = { version = "^0.17.2", features = [], default-features = true} + +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", - "async_executor", -], default-features = false } -bevy_reflect = { version = "^0.16.1", features = [ - "std", -], default-features = false } diff --git a/crates/bindings/bevy_a11y_bms_bindings/src/lib.rs b/crates/bindings/bevy_a11y_bms_bindings/src/lib.rs index 0bd6d37980..7b7f72cd41 100644 --- a/crates/bindings/bevy_a11y_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_a11y_bms_bindings/src/lib.rs @@ -1,15 +1,18 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyA11YScriptingPlugin; pub(crate) fn register_accessibility_requested_functions(world: &mut World) { @@ -47,7 +50,7 @@ pub(crate) fn register_accessibility_requested_functions(world: &mut World) { }; output }, - " Returns `true` if an access technology is active and accessibility tree\n updates should be sent.", + " Checks if any assistive technology has requested accessibility\n information.\n If so, this method returns `true`, indicating that accessibility tree\n updates should be sent.", &["_self"], ) .register_documented( @@ -65,7 +68,7 @@ pub(crate) fn register_accessibility_requested_functions(world: &mut World) { }; output }, - " Sets whether accessibility updates were requested by an access technology.", + " Sets the app's preference for sending accessibility updates.\n If the `value` argument is `true`, this method requests that the app,\n including both Bevy and third-party interfaces, provides updates to\n accessibility information.\n Setting with `false` requests that the entire app stops providing these\n updates.", &["_self", "value"], ); let registry = world.get_resource_or_init::(); @@ -80,53 +83,58 @@ pub(crate) fn register_manage_accessibility_updates_functions(world: &mut World) bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_a11y::ManageAccessibilityUpdates, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_a11y::ManageAccessibilityUpdates>| { - let output: Val<::bevy_a11y::ManageAccessibilityUpdates> = { - { - let output: Val<::bevy_a11y::ManageAccessibilityUpdates> = - <::bevy_a11y::ManageAccessibilityUpdates as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "get", - |_self: Ref<::bevy_a11y::ManageAccessibilityUpdates>| { - let output: bool = { - { - let output: bool = ::bevy_a11y::ManageAccessibilityUpdates::get(&_self).into(); - output - } - }; - output - }, - " Returns `true` if the ECS should update the accessibility tree.", - &["_self"], - ) - .register_documented( - "set", - |mut _self: Mut<::bevy_a11y::ManageAccessibilityUpdates>, value: bool| { - let output: () = { - { - let output: () = - ::bevy_a11y::ManageAccessibilityUpdates::set(&mut _self, value).into(); - output - } - }; - output - }, - " Sets whether the ECS should update the accessibility tree.", - &["_self", "value"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_a11y::ManageAccessibilityUpdates>| { + let output: Val<::bevy_a11y::ManageAccessibilityUpdates> = { + { + let output: Val<::bevy_a11y::ManageAccessibilityUpdates> = <::bevy_a11y::ManageAccessibilityUpdates as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "get", + |_self: Ref<::bevy_a11y::ManageAccessibilityUpdates>| { + let output: bool = { + { + let output: bool = ::bevy_a11y::ManageAccessibilityUpdates::get( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns `true` if Bevy's ECS should update the accessibility tree.", + &["_self"], + ) + .register_documented( + "set", + |mut _self: Mut<::bevy_a11y::ManageAccessibilityUpdates>, value: bool| { + let output: () = { + { + let output: () = ::bevy_a11y::ManageAccessibilityUpdates::set( + &mut _self, + value, + ) + .into(); + output + } + }; + output + }, + " Sets whether Bevy's ECS should update the accessibility tree.", + &["_self", "value"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -135,16 +143,16 @@ pub(crate) fn register_manage_accessibility_updates_functions(world: &mut World) bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_accessibility_system_functions(world: &mut World) { +pub(crate) fn register_accessibility_systems_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_a11y::AccessibilitySystem, + ::bevy_a11y::AccessibilitySystems, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_a11y::AccessibilitySystem>| { + |_self: Ref<::bevy_a11y::AccessibilitySystems>| { let output: () = { { - let output: () = <::bevy_a11y::AccessibilitySystem as ::core::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_a11y::AccessibilitySystems as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -158,10 +166,10 @@ pub(crate) fn register_accessibility_system_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_a11y::AccessibilitySystem>| { - let output: Val<::bevy_a11y::AccessibilitySystem> = { + |_self: Ref<::bevy_a11y::AccessibilitySystems>| { + let output: Val<::bevy_a11y::AccessibilitySystems> = { { - let output: Val<::bevy_a11y::AccessibilitySystem> = <::bevy_a11y::AccessibilitySystem as ::core::clone::Clone>::clone( + let output: Val<::bevy_a11y::AccessibilitySystems> = <::bevy_a11y::AccessibilitySystems as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -176,13 +184,13 @@ pub(crate) fn register_accessibility_system_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_a11y::AccessibilitySystem>, - other: Ref<::bevy_a11y::AccessibilitySystem>| + _self: Ref<::bevy_a11y::AccessibilitySystems>, + other: Ref<::bevy_a11y::AccessibilitySystems>| { let output: bool = { { - let output: bool = <::bevy_a11y::AccessibilitySystem as ::core::cmp::PartialEq< - ::bevy_a11y::AccessibilitySystem, + let output: bool = <::bevy_a11y::AccessibilitySystems as ::core::cmp::PartialEq< + ::bevy_a11y::AccessibilitySystems, >>::eq(&_self, &other) .into(); output @@ -197,7 +205,7 @@ pub(crate) fn register_accessibility_system_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_a11y::AccessibilitySystem, + ::bevy_a11y::AccessibilitySystems, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -206,6 +214,6 @@ impl Plugin for BevyA11YScriptingPlugin { let mut world = app.world_mut(); register_accessibility_requested_functions(&mut world); register_manage_accessibility_updates_functions(&mut world); - register_accessibility_system_functions(&mut world); + register_accessibility_systems_functions(&mut world); } } diff --git a/crates/bindings/bevy_animation_bms_bindings/Cargo.toml b/crates/bindings/bevy_animation_bms_bindings/Cargo.toml index 819ad9423d..2e32dc2378 100644 --- a/crates/bindings/bevy_animation_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_animation_bms_bindings/Cargo.toml @@ -17,47 +17,45 @@ 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.16.1", features = [], default-features = true } +bevy_animation = { version = "0.17.2", features = [], default-features = true} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_animation_macros = { version = "^0.17.2", features = [], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_color = { version = "^0.16.2", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_derive = { version = "^0.16.1", features = [], default-features = true } +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } +bevy_derive = { version = "^0.17.2", features = [], default-features = true} -bevy_log = { version = "^0.16.1", features = [], default-features = true } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_math = { version = "^0.16.1", features = [], default-features = true } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mesh = { version = "^0.16.1", features = [], default-features = true } +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_render = { version = "^0.16.1", features = [], default-features = true } +bevy_time = { version = "^0.17.2", features = ["bevy_reflect", "std"], default-features = true} -bevy_time = { version = "^0.16.1", features = [], default-features = true } +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +blake3 = { version = "^1.0", features = [], default-features = true} -blake3 = { version = "^1.0", features = [], default-features = true } +either = { version = "^1.13", features = [], default-features = true} -either = { version = "^1.13", features = [], default-features = true } +petgraph = { version = "^0.8", features = [], default-features = true} -petgraph = { version = "^0.7", features = [], default-features = true } +ron = { version = "^0.10", features = [], default-features = true} -ron = { version = "^0.8", features = [], default-features = true } +serde = { version = "^1", features = [], default-features = true} -serde = { version = "^1", features = [], default-features = true } +thread_local = { version = "^1", features = [], default-features = true} -smallvec = { version = "^1", features = [], default-features = true } +uuid = { version = "^1.13.1", features = [], default-features = true} -thread_local = { version = "^1", features = [], default-features = true } -uuid = { version = "^1.13.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 3e09ae2549..9670f0b3b2 100644 --- a/crates/bindings/bevy_animation_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_animation_bms_bindings/src/lib.rs @@ -1,39 +1,41 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyAnimationScriptingPlugin; pub(crate) fn register_animation_node_type_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_animation::graph::AnimationNodeType, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_animation::graph::AnimationNodeType>| { - let output: Val<::bevy_animation::graph::AnimationNodeType> = { - { - let output: Val<::bevy_animation::graph::AnimationNodeType> = - <::bevy_animation::graph::AnimationNodeType as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_animation::graph::AnimationNodeType>| { + let output: Val<::bevy_animation::graph::AnimationNodeType> = { + { + let output: Val<::bevy_animation::graph::AnimationNodeType> = <::bevy_animation::graph::AnimationNodeType as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -122,77 +124,78 @@ pub(crate) fn register_threaded_animation_graphs_functions(world: &mut World) { } pub(crate) fn register_animation_clip_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_animation::prelude::AnimationClip, + ::bevy_animation::AnimationClip, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_animation::prelude::AnimationClip>| { - let output: Val<::bevy_animation::prelude::AnimationClip> = { - { - let output: Val<::bevy_animation::prelude::AnimationClip> = - <::bevy_animation::prelude::AnimationClip as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "duration", - |_self: Ref<::bevy_animation::prelude::AnimationClip>| { - let output: f32 = { - { - let output: f32 = - ::bevy_animation::prelude::AnimationClip::duration(&_self).into(); - output - } - }; - output - }, - " Duration of the clip, represented in seconds.", - &["_self"], - ) - .register_documented( - "set_duration", - |mut _self: Mut<::bevy_animation::prelude::AnimationClip>, duration_sec: f32| { - let output: () = { - { - let output: () = ::bevy_animation::prelude::AnimationClip::set_duration( - &mut _self, - duration_sec, - ) - .into(); - output - } - }; - output - }, - " Set the duration of the clip in seconds.", - &["_self", "duration_sec"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_animation::AnimationClip>| { + let output: Val<::bevy_animation::AnimationClip> = { + { + let output: Val<::bevy_animation::AnimationClip> = <::bevy_animation::AnimationClip as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "duration", + |_self: Ref<::bevy_animation::AnimationClip>| { + let output: f32 = { + { + let output: f32 = ::bevy_animation::AnimationClip::duration( + &_self, + ) + .into(); + output + } + }; + output + }, + " Duration of the clip, represented in seconds.", + &["_self"], + ) + .register_documented( + "set_duration", + |mut _self: Mut<::bevy_animation::AnimationClip>, duration_sec: f32| { + let output: () = { + { + let output: () = ::bevy_animation::AnimationClip::set_duration( + &mut _self, + duration_sec, + ) + .into(); + output + } + }; + output + }, + " Set the duration of the clip in seconds.", + &["_self", "duration_sec"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_animation::prelude::AnimationClip, + ::bevy_animation::AnimationClip, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_animation_player_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_animation::prelude::AnimationPlayer, + ::bevy_animation::AnimationPlayer, >::new(world) .register_documented( "all_finished", - |_self: Ref<::bevy_animation::prelude::AnimationPlayer>| { + |_self: Ref<::bevy_animation::AnimationPlayer>| { let output: bool = { { - let output: bool = ::bevy_animation::prelude::AnimationPlayer::all_finished( + let output: bool = ::bevy_animation::AnimationPlayer::all_finished( &_self, ) .into(); @@ -206,10 +209,10 @@ pub(crate) fn register_animation_player_functions(world: &mut World) { ) .register_documented( "all_paused", - |_self: Ref<::bevy_animation::prelude::AnimationPlayer>| { + |_self: Ref<::bevy_animation::AnimationPlayer>| { let output: bool = { { - let output: bool = ::bevy_animation::prelude::AnimationPlayer::all_paused( + let output: bool = ::bevy_animation::AnimationPlayer::all_paused( &_self, ) .into(); @@ -223,10 +226,10 @@ pub(crate) fn register_animation_player_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_animation::prelude::AnimationPlayer>| { - let output: Val<::bevy_animation::prelude::AnimationPlayer> = { + |_self: Ref<::bevy_animation::AnimationPlayer>| { + let output: Val<::bevy_animation::AnimationPlayer> = { { - let output: Val<::bevy_animation::prelude::AnimationPlayer> = <::bevy_animation::prelude::AnimationPlayer as ::std::clone::Clone>::clone( + let output: Val<::bevy_animation::AnimationPlayer> = <::bevy_animation::AnimationPlayer as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -241,12 +244,12 @@ pub(crate) fn register_animation_player_functions(world: &mut World) { .register_documented( "clone_from", | - mut _self: Mut<::bevy_animation::prelude::AnimationPlayer>, - source: Ref<::bevy_animation::prelude::AnimationPlayer>| + mut _self: Mut<::bevy_animation::AnimationPlayer>, + source: Ref<::bevy_animation::AnimationPlayer>| { let output: () = { { - let output: () = <::bevy_animation::prelude::AnimationPlayer as ::std::clone::Clone>::clone_from( + let output: () = <::bevy_animation::AnimationPlayer as ::std::clone::Clone>::clone_from( &mut _self, &source, ) @@ -263,7 +266,7 @@ pub(crate) fn register_animation_player_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_animation::prelude::AnimationPlayer, + ::bevy_animation::AnimationPlayer, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -334,75 +337,6 @@ pub(crate) fn register_animation_graph_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_animation_transitions_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_animation::transition::AnimationTransitions, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_animation::transition::AnimationTransitions>| { - let output: Val<::bevy_animation::transition::AnimationTransitions> = { - { - let output: Val< - ::bevy_animation::transition::AnimationTransitions, - > = <::bevy_animation::transition::AnimationTransitions as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone_from", - | - mut _self: Mut<::bevy_animation::transition::AnimationTransitions>, - source: Ref<::bevy_animation::transition::AnimationTransitions>| - { - let output: () = { - { - let output: () = <::bevy_animation::transition::AnimationTransitions as ::std::clone::Clone>::clone_from( - &mut _self, - &source, - ) - .into(); - output - } - }; - output - }, - "", - &["_self", "source"], - ) - .register_documented( - "new", - || { - let output: Val<::bevy_animation::transition::AnimationTransitions> = { - { - let output: Val< - ::bevy_animation::transition::AnimationTransitions, - > = ::bevy_animation::transition::AnimationTransitions::new() - .into(); - output - } - }; - output - }, - " Creates a new [`AnimationTransitions`] component, ready to be added to\n an entity with an [`AnimationPlayer`].", - &[], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_animation::transition::AnimationTransitions, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} pub(crate) fn register_animation_target_id_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_animation::AnimationTargetId, @@ -490,22 +424,23 @@ pub(crate) fn register_animation_target_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_animation::AnimationTarget, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_animation::AnimationTarget>| { - let output: Val<::bevy_animation::AnimationTarget> = { - { - let output: Val<::bevy_animation::AnimationTarget> = - <::bevy_animation::AnimationTarget as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_animation::AnimationTarget>| { + let output: Val<::bevy_animation::AnimationTarget> = { + { + let output: Val<::bevy_animation::AnimationTarget> = <::bevy_animation::AnimationTarget as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -880,6 +815,75 @@ pub(crate) fn register_threaded_animation_graph_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_animation_transitions_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_animation::transition::AnimationTransitions, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_animation::transition::AnimationTransitions>| { + let output: Val<::bevy_animation::transition::AnimationTransitions> = { + { + let output: Val< + ::bevy_animation::transition::AnimationTransitions, + > = <::bevy_animation::transition::AnimationTransitions as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone_from", + | + mut _self: Mut<::bevy_animation::transition::AnimationTransitions>, + source: Ref<::bevy_animation::transition::AnimationTransitions>| + { + let output: () = { + { + let output: () = <::bevy_animation::transition::AnimationTransitions as ::std::clone::Clone>::clone_from( + &mut _self, + &source, + ) + .into(); + output + } + }; + output + }, + "", + &["_self", "source"], + ) + .register_documented( + "new", + || { + let output: Val<::bevy_animation::transition::AnimationTransitions> = { + { + let output: Val< + ::bevy_animation::transition::AnimationTransitions, + > = ::bevy_animation::transition::AnimationTransitions::new() + .into(); + output + } + }; + output + }, + " Creates a new [`AnimationTransitions`] component, ready to be added to\n an entity with an [`AnimationPlayer`].", + &[], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_animation::transition::AnimationTransitions, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_animation_transition_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_animation::transition::AnimationTransition, @@ -920,7 +924,6 @@ impl Plugin for BevyAnimationScriptingPlugin { register_animation_clip_functions(&mut world); register_animation_player_functions(&mut world); register_animation_graph_functions(&mut world); - register_animation_transitions_functions(&mut world); register_animation_target_id_functions(&mut world); register_animation_target_functions(&mut world); register_repeat_animation_functions(&mut world); @@ -929,6 +932,7 @@ impl Plugin for BevyAnimationScriptingPlugin { register_cubic_rotation_curve_functions(&mut world); register_animation_graph_node_functions(&mut world); register_threaded_animation_graph_functions(&mut world); + register_animation_transitions_functions(&mut world); register_animation_transition_functions(&mut world); } } diff --git a/crates/bindings/bevy_asset_bms_bindings/Cargo.toml b/crates/bindings/bevy_asset_bms_bindings/Cargo.toml index 8fdf2a62d6..3e89b5c7b7 100644 --- a/crates/bindings/bevy_asset_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_asset_bms_bindings/Cargo.toml @@ -12,77 +12,24 @@ keywords.workspace = true categories.workspace = true [dependencies] - - +bevy_ecs = { workspace = true, features = ["std", "bevy_reflect"] } +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.16.1", features = [ - "notify-debouncer-full", - "watch", - "file_watcher", - "multi_threaded", -], default-features = true } - - -async-broadcast = { version = "^0.7.2", features = [], default-features = true } - -async-fs = { version = "^2.0", features = [], default-features = true } - -async-lock = { version = "^3.0", features = [], default-features = true } - -atomicow = { version = "^1.0", features = [], default-features = true } - -bevy_app = { version = "^0.16.1", features = [], default-features = true } - -bevy_asset_macros = { version = "^0.16.1", features = [ -], default-features = true } - -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } - -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } - -bevy_tasks = { version = "^0.16.1", features = [ - "multi_threaded", - "multi_threaded", -], default-features = false } - -bevy_utils = { version = "^0.16.1", features = [], default-features = true } - -bevy_window = { version = "^0.16.1", features = [], default-features = true } - -bitflags = { version = "^2.3", features = [], default-features = true } - -blake3 = { version = "^1.5", features = [], default-features = true } - -crossbeam-channel = { version = "^0.5", features = [], default-features = true } - -disqualified = { version = "^1.0", features = [], default-features = true } - -either = { version = "^1.13", features = [], default-features = true } - -futures-io = { version = "^0.3", features = [], default-features = true } - -futures-lite = { version = "^2.0.1", features = [], default-features = true } - -js-sys = { version = "^0.3", features = [], default-features = true } +bevy_asset = { version = "0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -notify-debouncer-full = { version = "^0.5.0", features = [ -], default-features = true } -parking_lot = { version = "^0.12", features = [], default-features = true } +bevy_asset_macros = { version = "^0.17.2", features = [], default-features = true} -ron = { version = "^0.8", features = [], default-features = true } +bevy_tasks = { version = "^0.17.2", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} -serde = { version = "^1", features = [], default-features = true } +js-sys = { version = "^0.3", features = [], default-features = true} -stackfuture = { version = "^0.3", features = [], default-features = true } +wasm-bindgen = { version = "^0.2", features = [], default-features = true} -uuid = { version = "^1.13.1", features = [], default-features = true } +wasm-bindgen-futures = { version = "^0.4", features = [], default-features = true} -wasm-bindgen = { version = "^0.2", features = [], default-features = true } +web-sys = { version = "^0.3", features = [], default-features = true} -wasm-bindgen-futures = { version = "^0.4", features = [ -], default-features = true } -web-sys = { version = "^0.3", features = [], default-features = true } diff --git a/crates/bindings/bevy_asset_bms_bindings/src/lib.rs b/crates/bindings/bevy_asset_bms_bindings/src/lib.rs index a7223709a3..4c474c9c87 100644 --- a/crates/bindings/bevy_asset_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_asset_bms_bindings/src/lib.rs @@ -1,17 +1,169 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyAssetScriptingPlugin; +pub(crate) fn register_untyped_handle_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_asset::UntypedHandle, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_asset::UntypedHandle>| { + let output: Val<::bevy_asset::UntypedHandle> = { + { + let output: Val<::bevy_asset::UntypedHandle> = <::bevy_asset::UntypedHandle as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_asset::UntypedHandle>, + other: Ref<::bevy_asset::UntypedHandle>| + { + let output: bool = { + { + let output: bool = <::bevy_asset::UntypedHandle as ::core::cmp::PartialEq< + ::bevy_asset::UntypedHandle, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "id", + |_self: Ref<::bevy_asset::UntypedHandle>| { + let output: Val<::bevy_asset::UntypedAssetId> = { + { + let output: Val<::bevy_asset::UntypedAssetId> = ::bevy_asset::UntypedHandle::id( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the [`UntypedAssetId`] for the referenced asset.", + &["_self"], + ) + .register_documented( + "type_id", + |_self: Ref<::bevy_asset::UntypedHandle>| { + let output: Val<::core::any::TypeId> = { + { + let output: Val<::core::any::TypeId> = ::bevy_asset::UntypedHandle::type_id( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the [`TypeId`] of the referenced [`Asset`].", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_asset::UntypedHandle, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_untyped_asset_id_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_asset::UntypedAssetId, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_asset::UntypedAssetId>| { + let output: Val<::bevy_asset::UntypedAssetId> = { + { + let output: Val<::bevy_asset::UntypedAssetId> = <::bevy_asset::UntypedAssetId as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_asset::UntypedAssetId>, + other: Ref<::bevy_asset::UntypedAssetId>| + { + let output: bool = { + { + let output: bool = <::bevy_asset::UntypedAssetId as ::core::cmp::PartialEq< + ::bevy_asset::UntypedAssetId, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "type_id", + |_self: Ref<::bevy_asset::UntypedAssetId>| { + let output: Val<::core::any::TypeId> = { + { + let output: Val<::core::any::TypeId> = ::bevy_asset::UntypedAssetId::type_id( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the stored [`TypeId`] of the referenced [`Asset`].", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_asset::UntypedAssetId, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_asset_index_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_asset::AssetIndex, @@ -540,6 +692,8 @@ pub(crate) fn register_render_asset_usages_functions(world: &mut World) { impl Plugin for BevyAssetScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); + register_untyped_handle_functions(&mut world); + register_untyped_asset_id_functions(&mut world); register_asset_index_functions(&mut world); register_render_asset_usages_functions(&mut world); } diff --git a/crates/bindings/bevy_camera_bms_bindings/Cargo.toml b/crates/bindings/bevy_camera_bms_bindings/Cargo.toml new file mode 100644 index 0000000000..b737c093b3 --- /dev/null +++ b/crates/bindings/bevy_camera_bms_bindings/Cargo.toml @@ -0,0 +1,47 @@ +[package] +name = "bevy_camera_bms_bindings" +description = "Automatically generated bindings for bevy_camera crate" +readme = "README.md" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +keywords.workspace = true +categories.workspace = true + +[dependencies] + + +bevy_mod_scripting_core = { workspace = true } +bevy_mod_scripting_bindings = { workspace = true } +bevy_mod_scripting_derive = { workspace = true } +bevy_camera = { version = "0.17.2", features = [], default-features = true} + + +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} + +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} + +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} + +bevy_derive = { version = "^0.17.2", features = [], default-features = true} + +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} + +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} + +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} + +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} + +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} + +bevy_window = { version = "^0.17.2", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} + + diff --git a/crates/bindings/bevy_camera_bms_bindings/README.md b/crates/bindings/bevy_camera_bms_bindings/README.md new file mode 100644 index 0000000000..d7b64de5d0 --- /dev/null +++ b/crates/bindings/bevy_camera_bms_bindings/README.md @@ -0,0 +1,4 @@ +# bevy_camera bindings +This crate is part of the [bevy_mod_scripting](http://github.com/makspll/bevy_mod_scripting) project. + +The code inside is fully generated via a custom rustc plugin. \ No newline at end of file diff --git a/crates/bindings/bevy_camera_bms_bindings/src/lib.rs b/crates/bindings/bevy_camera_bms_bindings/src/lib.rs new file mode 100644 index 0000000000..0b49890149 --- /dev/null +++ b/crates/bindings/bevy_camera_bms_bindings/src/lib.rs @@ -0,0 +1,2226 @@ + +#![allow(clippy::all)] +#![allow(unused, deprecated, dead_code)] + + + +use bevy_mod_scripting_bindings::{ + ReflectReference, + function::{ + from::{Ref, Mut, Val}, + namespace::NamespaceBuilder, + }, +}; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; +use bevy_mod_scripting_derive::script_bindings; +pub struct BevyCameraScriptingPlugin; +pub(crate) fn register_clear_color_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::ClearColor, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::ClearColor>| { + let output: Val<::bevy_camera::ClearColor> = { + { + let output: Val<::bevy_camera::ClearColor> = <::bevy_camera::ClearColor 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::ClearColor, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_inherited_visibility_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::InheritedVisibility, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_camera::visibility::InheritedVisibility>| { + let output: () = { + { + let output: () = <::bevy_camera::visibility::InheritedVisibility as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::InheritedVisibility>| { + let output: Val<::bevy_camera::visibility::InheritedVisibility> = { + { + let output: Val< + ::bevy_camera::visibility::InheritedVisibility, + > = <::bevy_camera::visibility::InheritedVisibility as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::visibility::InheritedVisibility>, + other: Ref<::bevy_camera::visibility::InheritedVisibility>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::visibility::InheritedVisibility as ::std::cmp::PartialEq< + ::bevy_camera::visibility::InheritedVisibility, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "get", + |_self: Val<::bevy_camera::visibility::InheritedVisibility>| { + let output: bool = { + { + let output: bool = ::bevy_camera::visibility::InheritedVisibility::get( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns `true` if the entity is visible in the hierarchy.\n Otherwise, returns `false`.", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::visibility::InheritedVisibility, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_view_visibility_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::ViewVisibility, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_camera::visibility::ViewVisibility>| { + let output: () = { + { + let output: () = <::bevy_camera::visibility::ViewVisibility as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::ViewVisibility>| { + let output: Val<::bevy_camera::visibility::ViewVisibility> = { + { + let output: Val<::bevy_camera::visibility::ViewVisibility> = <::bevy_camera::visibility::ViewVisibility as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::visibility::ViewVisibility>, + other: Ref<::bevy_camera::visibility::ViewVisibility>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::visibility::ViewVisibility as ::std::cmp::PartialEq< + ::bevy_camera::visibility::ViewVisibility, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "get", + |_self: Val<::bevy_camera::visibility::ViewVisibility>| { + let output: bool = { + { + let output: bool = ::bevy_camera::visibility::ViewVisibility::get( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " 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(); + registry + .register_type_data::< + ::bevy_camera::visibility::ViewVisibility, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_visibility_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::Visibility, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_camera::visibility::Visibility>| { + let output: () = { + { + let output: () = <::bevy_camera::visibility::Visibility as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::Visibility>| { + let output: Val<::bevy_camera::visibility::Visibility> = { + { + let output: Val<::bevy_camera::visibility::Visibility> = <::bevy_camera::visibility::Visibility as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::visibility::Visibility>, + other: Ref<::bevy_camera::visibility::Visibility>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::visibility::Visibility as ::std::cmp::PartialEq< + ::bevy_camera::visibility::Visibility, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "toggle_inherited_hidden", + |mut _self: Mut<::bevy_camera::visibility::Visibility>| { + let output: () = { + { + let output: () = ::bevy_camera::visibility::Visibility::toggle_inherited_hidden( + &mut _self, + ) + .into(); + output + } + }; + output + }, + " Toggles between `Visibility::Inherited` and `Visibility::Hidden`.\n If the value is `Visibility::Visible`, it remains unaffected.", + &["_self"], + ) + .register_documented( + "toggle_inherited_visible", + |mut _self: Mut<::bevy_camera::visibility::Visibility>| { + let output: () = { + { + let output: () = ::bevy_camera::visibility::Visibility::toggle_inherited_visible( + &mut _self, + ) + .into(); + output + } + }; + output + }, + " Toggles between `Visibility::Inherited` and `Visibility::Visible`.\n If the value is `Visibility::Hidden`, it remains unaffected.", + &["_self"], + ) + .register_documented( + "toggle_visible_hidden", + |mut _self: Mut<::bevy_camera::visibility::Visibility>| { + let output: () = { + { + let output: () = ::bevy_camera::visibility::Visibility::toggle_visible_hidden( + &mut _self, + ) + .into(); + output + } + }; + output + }, + " Toggles between `Visibility::Visible` and `Visibility::Hidden`.\n If the value is `Visibility::Inherited`, it remains unaffected.", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::visibility::Visibility, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_camera_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::Camera, + >::new(world) + .register_documented( + "clip_from_view", + |_self: Ref<::bevy_camera::Camera>| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = ::bevy_camera::Camera::clip_from_view( + &_self, + ) + .into(); + output + } + }; + output + }, + " The projection matrix computed using this camera's [`Projection`](super::projection::Projection).", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::Camera>| { + let output: Val<::bevy_camera::Camera> = { + { + let output: Val<::bevy_camera::Camera> = <::bevy_camera::Camera as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "depth_ndc_to_view_z", + |_self: Ref<::bevy_camera::Camera>, ndc_depth: f32| { + let output: f32 = { + { + let output: f32 = ::bevy_camera::Camera::depth_ndc_to_view_z( + &_self, + ndc_depth, + ) + .into(); + output + } + }; + output + }, + " Converts the depth in Normalized Device Coordinates\n to linear view z for perspective projections.\n Note: Depth values in front of the camera will be negative as -z is forward", + &["_self", "ndc_depth"], + ) + .register_documented( + "depth_ndc_to_view_z_2d", + |_self: Ref<::bevy_camera::Camera>, ndc_depth: f32| { + let output: f32 = { + { + let output: f32 = ::bevy_camera::Camera::depth_ndc_to_view_z_2d( + &_self, + ndc_depth, + ) + .into(); + output + } + }; + output + }, + " Converts the depth in Normalized Device Coordinates\n to linear view z for orthographic projections.\n Note: Depth values in front of the camera will be negative as -z is forward", + &["_self", "ndc_depth"], + ) + .register_documented( + "target_scaling_factor", + |_self: Ref<::bevy_camera::Camera>| { + let output: ::std::option::Option = { + { + let output: ::std::option::Option = ::bevy_camera::Camera::target_scaling_factor( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::Camera, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_camera_2_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::Camera2d, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::Camera2d>| { + let output: Val<::bevy_camera::Camera2d> = { + { + let output: Val<::bevy_camera::Camera2d> = <::bevy_camera::Camera2d 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::Camera2d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_camera_3_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::Camera3d, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::Camera3d>| { + let output: Val<::bevy_camera::Camera3d> = { + { + let output: Val<::bevy_camera::Camera3d> = <::bevy_camera::Camera3d 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::Camera3d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_clear_color_config_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::ClearColorConfig, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::ClearColorConfig>| { + let output: Val<::bevy_camera::ClearColorConfig> = { + { + let output: Val<::bevy_camera::ClearColorConfig> = <::bevy_camera::ClearColorConfig 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::ClearColorConfig, + 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, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::OrthographicProjection>| { + let output: Val<::bevy_camera::OrthographicProjection> = { + { + let output: Val<::bevy_camera::OrthographicProjection> = <::bevy_camera::OrthographicProjection as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "default_2d", + || { + let output: Val<::bevy_camera::OrthographicProjection> = { + { + let output: Val<::bevy_camera::OrthographicProjection> = ::bevy_camera::OrthographicProjection::default_2d() + .into(); + output + } + }; + output + }, + " Returns the default orthographic projection for a 2D context.\n The near plane is set to a negative value so that the camera can still\n render the scene when using positive z coordinates to order foreground elements.", + &[], + ) + .register_documented( + "default_3d", + || { + let output: Val<::bevy_camera::OrthographicProjection> = { + { + let output: Val<::bevy_camera::OrthographicProjection> = ::bevy_camera::OrthographicProjection::default_3d() + .into(); + output + } + }; + output + }, + " Returns the default orthographic projection for a 3D context.\n The near plane is set to 0.0 so that the camera doesn't render\n objects that are behind it.", + &[], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::OrthographicProjection, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_perspective_projection_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::PerspectiveProjection, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::PerspectiveProjection>| { + let output: Val<::bevy_camera::PerspectiveProjection> = { + { + let output: Val<::bevy_camera::PerspectiveProjection> = <::bevy_camera::PerspectiveProjection 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::PerspectiveProjection, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_projection_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::Projection, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::Projection>| { + let output: Val<::bevy_camera::Projection> = { + { + let output: Val<::bevy_camera::Projection> = <::bevy_camera::Projection as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "is_perspective", + |_self: Ref<::bevy_camera::Projection>| { + let output: bool = { + { + let output: bool = ::bevy_camera::Projection::is_perspective( + &_self, + ) + .into(); + output + } + }; + output + }, + " Check if the projection is perspective.\n For [`CustomProjection`], this checks if the projection matrix's w-axis's w is 0.0.", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::Projection, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_frustum_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::primitives::Frustum, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::primitives::Frustum>| { + let output: Val<::bevy_camera::primitives::Frustum> = { + { + let output: Val<::bevy_camera::primitives::Frustum> = <::bevy_camera::primitives::Frustum as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "contains_aabb", + | + _self: Ref<::bevy_camera::primitives::Frustum>, + aabb: Ref<::bevy_camera::primitives::Aabb>, + world_from_local: Ref<::glam::Affine3A>| + { + let output: bool = { + { + let output: bool = ::bevy_camera::primitives::Frustum::contains_aabb( + &_self, + &aabb, + &world_from_local, + ) + .into(); + output + } + }; + 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)", + &["_self", "aabb", "world_from_local"], + ) + .register_documented( + "from_clip_from_world", + |clip_from_world: Ref<::glam::Mat4>| { + let output: Val<::bevy_camera::primitives::Frustum> = { + { + let output: Val<::bevy_camera::primitives::Frustum> = ::bevy_camera::primitives::Frustum::from_clip_from_world( + &clip_from_world, + ) + .into(); + output + } + }; + output + }, + " Returns a frustum derived from `clip_from_world`.", + &["clip_from_world"], + ) + .register_documented( + "from_clip_from_world_custom_far", + | + clip_from_world: Ref<::glam::Mat4>, + view_translation: Ref<::glam::Vec3>, + view_backward: Ref<::glam::Vec3>, + far: f32| + { + let output: Val<::bevy_camera::primitives::Frustum> = { + { + let output: Val<::bevy_camera::primitives::Frustum> = ::bevy_camera::primitives::Frustum::from_clip_from_world_custom_far( + &clip_from_world, + &view_translation, + &view_backward, + far, + ) + .into(); + output + } + }; + output + }, + " Returns a frustum derived from `clip_from_world`,\n but with a custom far plane.", + &["clip_from_world", "view_translation", "view_backward", "far"], + ) + .register_documented( + "intersects_obb", + | + _self: Ref<::bevy_camera::primitives::Frustum>, + aabb: Ref<::bevy_camera::primitives::Aabb>, + world_from_local: Ref<::glam::Affine3A>, + intersect_near: bool, + intersect_far: bool| + { + let output: bool = { + { + let output: bool = ::bevy_camera::primitives::Frustum::intersects_obb( + &_self, + &aabb, + &world_from_local, + intersect_near, + intersect_far, + ) + .into(); + output + } + }; + output + }, + " Checks if an Oriented Bounding Box (obb) intersects the frustum.", + &["_self", "aabb", "world_from_local", "intersect_near", "intersect_far"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::primitives::Frustum, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_visible_entities_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::VisibleEntities, + >::new(world) + .register_documented( + "clear", + | + mut _self: Mut<::bevy_camera::visibility::VisibleEntities>, + type_id: Val<::std::any::TypeId>| + { + let output: () = { + { + let output: () = ::bevy_camera::visibility::VisibleEntities::clear( + &mut _self, + type_id.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["_self", "type_id"], + ) + .register_documented( + "clear_all", + |mut _self: Mut<::bevy_camera::visibility::VisibleEntities>| { + let output: () = { + { + let output: () = ::bevy_camera::visibility::VisibleEntities::clear_all( + &mut _self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::VisibleEntities>| { + let output: Val<::bevy_camera::visibility::VisibleEntities> = { + { + let output: Val<::bevy_camera::visibility::VisibleEntities> = <::bevy_camera::visibility::VisibleEntities as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "is_empty", + | + _self: Ref<::bevy_camera::visibility::VisibleEntities>, + type_id: Val<::std::any::TypeId>| + { + let output: bool = { + { + let output: bool = ::bevy_camera::visibility::VisibleEntities::is_empty( + &_self, + type_id.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["_self", "type_id"], + ) + .register_documented( + "len", + | + _self: Ref<::bevy_camera::visibility::VisibleEntities>, + type_id: Val<::std::any::TypeId>| + { + let output: usize = { + { + let output: usize = ::bevy_camera::visibility::VisibleEntities::len( + &_self, + type_id.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["_self", "type_id"], + ) + .register_documented( + "push", + | + mut _self: Mut<::bevy_camera::visibility::VisibleEntities>, + entity: Val<::bevy_ecs::entity::Entity>, + type_id: Val<::std::any::TypeId>| + { + let output: () = { + { + let output: () = ::bevy_camera::visibility::VisibleEntities::push( + &mut _self, + entity.into_inner(), + type_id.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["_self", "entity", "type_id"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::visibility::VisibleEntities, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_viewport_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::Viewport, + >::new(world) + .register_documented( + "clamp_to_size", + |mut _self: Mut<::bevy_camera::Viewport>, size: Val<::glam::UVec2>| { + let output: () = { + { + let output: () = ::bevy_camera::Viewport::clamp_to_size( + &mut _self, + size.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Cut the viewport rectangle so that it lies inside a rectangle of the\n given size.\n If either of the viewport's position coordinates lies outside the given\n dimensions, it will be moved just inside first. If either of the given\n dimensions is zero, the position and size of the viewport rectangle will\n both be set to zero in that dimension.", + &["_self", "size"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::Viewport>| { + let output: Val<::bevy_camera::Viewport> = { + { + let output: Val<::bevy_camera::Viewport> = <::bevy_camera::Viewport 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::Viewport, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_main_pass_resolution_override_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::MainPassResolutionOverride, + >::new(world); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::MainPassResolutionOverride, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_sub_camera_view_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::SubCameraView, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::SubCameraView>| { + let output: Val<::bevy_camera::SubCameraView> = { + { + let output: Val<::bevy_camera::SubCameraView> = <::bevy_camera::SubCameraView as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::SubCameraView>, + other: Ref<::bevy_camera::SubCameraView>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::SubCameraView as ::std::cmp::PartialEq< + ::bevy_camera::SubCameraView, + >>::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::SubCameraView, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_exposure_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::Exposure, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::Exposure>| { + let output: Val<::bevy_camera::Exposure> = { + { + let output: Val<::bevy_camera::Exposure> = <::bevy_camera::Exposure as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "exposure", + |_self: Ref<::bevy_camera::Exposure>| { + let output: f32 = { + { + let output: f32 = ::bevy_camera::Exposure::exposure(&_self) + .into(); + output + } + }; + output + }, + " Converts EV100 values to exposure values.\n ", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::Exposure, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_camera_main_texture_usages_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::CameraMainTextureUsages, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::CameraMainTextureUsages>| { + let output: Val<::bevy_camera::CameraMainTextureUsages> = { + { + let output: Val<::bevy_camera::CameraMainTextureUsages> = <::bevy_camera::CameraMainTextureUsages 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::CameraMainTextureUsages, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_render_target_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::RenderTarget, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::RenderTarget>| { + let output: Val<::bevy_camera::RenderTarget> = { + { + let output: Val<::bevy_camera::RenderTarget> = <::bevy_camera::RenderTarget 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::RenderTarget, + 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, + ) + .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< + ::bevy_camera::ImageRenderTarget, + >>::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::ImageRenderTarget, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_manual_texture_view_handle_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::ManualTextureViewHandle, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_camera::ManualTextureViewHandle>| { + let output: () = { + { + let output: () = <::bevy_camera::ManualTextureViewHandle as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::ManualTextureViewHandle>| { + let output: Val<::bevy_camera::ManualTextureViewHandle> = { + { + let output: Val<::bevy_camera::ManualTextureViewHandle> = <::bevy_camera::ManualTextureViewHandle as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::ManualTextureViewHandle>, + other: Ref<::bevy_camera::ManualTextureViewHandle>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::ManualTextureViewHandle as ::std::cmp::PartialEq< + ::bevy_camera::ManualTextureViewHandle, + >>::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::ManualTextureViewHandle, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_normalized_render_target_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::NormalizedRenderTarget, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_camera::NormalizedRenderTarget>| { + let output: () = { + { + let output: () = <::bevy_camera::NormalizedRenderTarget as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::NormalizedRenderTarget>| { + let output: Val<::bevy_camera::NormalizedRenderTarget> = { + { + let output: Val<::bevy_camera::NormalizedRenderTarget> = <::bevy_camera::NormalizedRenderTarget as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::NormalizedRenderTarget>, + other: Ref<::bevy_camera::NormalizedRenderTarget>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::NormalizedRenderTarget as ::std::cmp::PartialEq< + ::bevy_camera::NormalizedRenderTarget, + >>::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::NormalizedRenderTarget, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_camera_3_d_depth_load_op_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::Camera3dDepthLoadOp, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::Camera3dDepthLoadOp>| { + let output: Val<::bevy_camera::Camera3dDepthLoadOp> = { + { + let output: Val<::bevy_camera::Camera3dDepthLoadOp> = <::bevy_camera::Camera3dDepthLoadOp 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::Camera3dDepthLoadOp, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_camera_3_d_depth_texture_usage_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::Camera3dDepthTextureUsage, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::Camera3dDepthTextureUsage>| { + let output: Val<::bevy_camera::Camera3dDepthTextureUsage> = { + { + let output: Val<::bevy_camera::Camera3dDepthTextureUsage> = <::bevy_camera::Camera3dDepthTextureUsage 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::Camera3dDepthTextureUsage, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_screen_space_transmission_quality_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::ScreenSpaceTransmissionQuality, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::ScreenSpaceTransmissionQuality>| { + let output: Val<::bevy_camera::ScreenSpaceTransmissionQuality> = { + { + let output: Val<::bevy_camera::ScreenSpaceTransmissionQuality> = <::bevy_camera::ScreenSpaceTransmissionQuality as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::ScreenSpaceTransmissionQuality>, + other: Ref<::bevy_camera::ScreenSpaceTransmissionQuality>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::ScreenSpaceTransmissionQuality as ::std::cmp::PartialEq< + ::bevy_camera::ScreenSpaceTransmissionQuality, + >>::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::ScreenSpaceTransmissionQuality, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_aabb_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::primitives::Aabb, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::primitives::Aabb>| { + let output: Val<::bevy_camera::primitives::Aabb> = { + { + let output: Val<::bevy_camera::primitives::Aabb> = <::bevy_camera::primitives::Aabb as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::primitives::Aabb>, + other: Ref<::bevy_camera::primitives::Aabb>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::primitives::Aabb as ::std::cmp::PartialEq< + ::bevy_camera::primitives::Aabb, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "from_min_max", + |minimum: Val<::glam::Vec3>, maximum: Val<::glam::Vec3>| { + let output: Val<::bevy_camera::primitives::Aabb> = { + { + let output: Val<::bevy_camera::primitives::Aabb> = ::bevy_camera::primitives::Aabb::from_min_max( + minimum.into_inner(), + maximum.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["minimum", "maximum"], + ) + .register_documented( + "max", + |_self: Ref<::bevy_camera::primitives::Aabb>| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::bevy_camera::primitives::Aabb::max( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "min", + |_self: Ref<::bevy_camera::primitives::Aabb>| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::bevy_camera::primitives::Aabb::min( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "relative_radius", + | + _self: Ref<::bevy_camera::primitives::Aabb>, + p_normal: Ref<::glam::Vec3A>, + world_from_local: Ref<::glam::Mat3A>| + { + let output: f32 = { + { + let output: f32 = ::bevy_camera::primitives::Aabb::relative_radius( + &_self, + &p_normal, + &world_from_local, + ) + .into(); + output + } + }; + output + }, + " Calculate the relative radius of the AABB with respect to a plane", + &["_self", "p_normal", "world_from_local"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::primitives::Aabb, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cubemap_frusta_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::primitives::CubemapFrusta, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::primitives::CubemapFrusta>| { + let output: Val<::bevy_camera::primitives::CubemapFrusta> = { + { + let output: Val<::bevy_camera::primitives::CubemapFrusta> = <::bevy_camera::primitives::CubemapFrusta 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::primitives::CubemapFrusta, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cubemap_layout_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::primitives::CubemapLayout, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::primitives::CubemapLayout>| { + let output: Val<::bevy_camera::primitives::CubemapLayout> = { + { + let output: Val<::bevy_camera::primitives::CubemapLayout> = <::bevy_camera::primitives::CubemapLayout 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::primitives::CubemapLayout, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cascades_frusta_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::primitives::CascadesFrusta, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::primitives::CascadesFrusta>| { + let output: Val<::bevy_camera::primitives::CascadesFrusta> = { + { + let output: Val<::bevy_camera::primitives::CascadesFrusta> = <::bevy_camera::primitives::CascadesFrusta 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::primitives::CascadesFrusta, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_custom_projection_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::CustomProjection, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::CustomProjection>| { + let output: Val<::bevy_camera::CustomProjection> = { + { + let output: Val<::bevy_camera::CustomProjection> = <::bevy_camera::CustomProjection 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::CustomProjection, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_scaling_mode_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::ScalingMode, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::ScalingMode>| { + let output: Val<::bevy_camera::ScalingMode> = { + { + let output: Val<::bevy_camera::ScalingMode> = <::bevy_camera::ScalingMode 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::ScalingMode, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_visibility_class_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::VisibilityClass, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::VisibilityClass>| { + let output: Val<::bevy_camera::visibility::VisibilityClass> = { + { + let output: Val<::bevy_camera::visibility::VisibilityClass> = <::bevy_camera::visibility::VisibilityClass 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::VisibilityClass, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_no_frustum_culling_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::NoFrustumCulling, + >::new(world); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::visibility::NoFrustumCulling, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_visible_mesh_entities_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::VisibleMeshEntities, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::VisibleMeshEntities>| { + let output: Val<::bevy_camera::visibility::VisibleMeshEntities> = { + { + let output: Val< + ::bevy_camera::visibility::VisibleMeshEntities, + > = <::bevy_camera::visibility::VisibleMeshEntities 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::VisibleMeshEntities, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cubemap_visible_entities_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::CubemapVisibleEntities, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::CubemapVisibleEntities>| { + let output: Val<::bevy_camera::visibility::CubemapVisibleEntities> = { + { + let output: Val< + ::bevy_camera::visibility::CubemapVisibleEntities, + > = <::bevy_camera::visibility::CubemapVisibleEntities 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::CubemapVisibleEntities, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cascades_visible_entities_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::CascadesVisibleEntities, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::CascadesVisibleEntities>| { + let output: Val<::bevy_camera::visibility::CascadesVisibleEntities> = { + { + let output: Val< + ::bevy_camera::visibility::CascadesVisibleEntities, + > = <::bevy_camera::visibility::CascadesVisibleEntities 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::CascadesVisibleEntities, + 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, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_camera::visibility::RenderLayers>| { + let output: () = { + { + let output: () = <::bevy_camera::visibility::RenderLayers as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::RenderLayers>| { + let output: Val<::bevy_camera::visibility::RenderLayers> = { + { + let output: Val<::bevy_camera::visibility::RenderLayers> = <::bevy_camera::visibility::RenderLayers as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::visibility::RenderLayers>, + other: Ref<::bevy_camera::visibility::RenderLayers>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::visibility::RenderLayers as ::std::cmp::PartialEq< + ::bevy_camera::visibility::RenderLayers, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "intersection", + | + _self: Ref<::bevy_camera::visibility::RenderLayers>, + other: Ref<::bevy_camera::visibility::RenderLayers>| + { + let output: Val<::bevy_camera::visibility::RenderLayers> = { + { + let output: Val<::bevy_camera::visibility::RenderLayers> = ::bevy_camera::visibility::RenderLayers::intersection( + &_self, + &other, + ) + .into(); + output + } + }; + output + }, + " Returns the set of [layers](Layer) shared by two instances of [`RenderLayers`].\n This corresponds to the `self & other` operation.", + &["_self", "other"], + ) + .register_documented( + "intersects", + | + _self: Ref<::bevy_camera::visibility::RenderLayers>, + other: Ref<::bevy_camera::visibility::RenderLayers>| + { + let output: bool = { + { + let output: bool = ::bevy_camera::visibility::RenderLayers::intersects( + &_self, + &other, + ) + .into(); + output + } + }; + output + }, + " Determine if a `RenderLayers` intersects another.\n `RenderLayers`s intersect if they share any common layers.\n A `RenderLayers` with no layers will not match any other\n `RenderLayers`, even another with no layers.", + &["_self", "other"], + ) + .register_documented( + "layer", + |n: usize| { + let output: Val<::bevy_camera::visibility::RenderLayers> = { + { + let output: Val<::bevy_camera::visibility::RenderLayers> = ::bevy_camera::visibility::RenderLayers::layer( + n, + ) + .into(); + output + } + }; + output + }, + " Create a new `RenderLayers` belonging to the given layer.\n This `const` constructor is limited to `size_of::()` layers.\n If you need to support an arbitrary number of layers, use [`with`](RenderLayers::with)\n or [`from_layers`](RenderLayers::from_layers).", + &["n"], + ) + .register_documented( + "none", + || { + let output: Val<::bevy_camera::visibility::RenderLayers> = { + { + let output: Val<::bevy_camera::visibility::RenderLayers> = ::bevy_camera::visibility::RenderLayers::none() + .into(); + output + } + }; + output + }, + " Create a new `RenderLayers` that belongs to no layers.\n This is distinct from [`RenderLayers::default`], which belongs to the first layer.", + &[], + ) + .register_documented( + "symmetric_difference", + | + _self: Ref<::bevy_camera::visibility::RenderLayers>, + other: Ref<::bevy_camera::visibility::RenderLayers>| + { + let output: Val<::bevy_camera::visibility::RenderLayers> = { + { + let output: Val<::bevy_camera::visibility::RenderLayers> = ::bevy_camera::visibility::RenderLayers::symmetric_difference( + &_self, + &other, + ) + .into(); + output + } + }; + output + }, + " Returns all [layers](Layer) included in exactly one of the instances of [`RenderLayers`].\n This corresponds to the \"exclusive or\" (XOR) operation: `self ^ other`.", + &["_self", "other"], + ) + .register_documented( + "union", + | + _self: Ref<::bevy_camera::visibility::RenderLayers>, + other: Ref<::bevy_camera::visibility::RenderLayers>| + { + let output: Val<::bevy_camera::visibility::RenderLayers> = { + { + let output: Val<::bevy_camera::visibility::RenderLayers> = ::bevy_camera::visibility::RenderLayers::union( + &_self, + &other, + ) + .into(); + output + } + }; + output + }, + " Returns all [layers](Layer) included in either instance of [`RenderLayers`].\n This corresponds to the `self | other` operation.", + &["_self", "other"], + ) + .register_documented( + "with", + |_self: Val<::bevy_camera::visibility::RenderLayers>, layer: usize| { + let output: Val<::bevy_camera::visibility::RenderLayers> = { + { + let output: Val<::bevy_camera::visibility::RenderLayers> = ::bevy_camera::visibility::RenderLayers::with( + _self.into_inner(), + layer, + ) + .into(); + output + } + }; + output + }, + " Add the given layer.\n This may be called multiple times to allow an entity to belong\n to multiple rendering layers.", + &["_self", "layer"], + ) + .register_documented( + "without", + |_self: Val<::bevy_camera::visibility::RenderLayers>, layer: usize| { + let output: Val<::bevy_camera::visibility::RenderLayers> = { + { + let output: Val<::bevy_camera::visibility::RenderLayers> = ::bevy_camera::visibility::RenderLayers::without( + _self.into_inner(), + layer, + ) + .into(); + output + } + }; + output + }, + " Removes the given rendering layer.", + &["_self", "layer"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::visibility::RenderLayers, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_visibility_range_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_camera::visibility::VisibilityRange, + >::new(world) + .register_documented( + "abrupt", + |start: f32, end: f32| { + let output: Val<::bevy_camera::visibility::VisibilityRange> = { + { + let output: Val<::bevy_camera::visibility::VisibilityRange> = ::bevy_camera::visibility::VisibilityRange::abrupt( + start, + end, + ) + .into(); + output + } + }; + output + }, + " Creates a new *abrupt* visibility range, with no crossfade.\n There will be no crossfade; the object will immediately vanish if the\n camera is closer than `start` units or farther than `end` units from the\n model.\n The `start` value must be less than or equal to the `end` value.", + &["start", "end"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_camera::visibility::VisibilityRange>| { + let output: Val<::bevy_camera::visibility::VisibilityRange> = { + { + let output: Val<::bevy_camera::visibility::VisibilityRange> = <::bevy_camera::visibility::VisibilityRange as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_camera::visibility::VisibilityRange>, + other: Ref<::bevy_camera::visibility::VisibilityRange>| + { + let output: bool = { + { + let output: bool = <::bevy_camera::visibility::VisibilityRange as ::std::cmp::PartialEq< + ::bevy_camera::visibility::VisibilityRange, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "is_abrupt", + |_self: Ref<::bevy_camera::visibility::VisibilityRange>| { + let output: bool = { + { + let output: bool = ::bevy_camera::visibility::VisibilityRange::is_abrupt( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns true if both the start and end transitions for this range are\n abrupt: that is, there is no crossfading.", + &["_self"], + ) + .register_documented( + "is_culled", + | + _self: Ref<::bevy_camera::visibility::VisibilityRange>, + camera_distance: f32| + { + let output: bool = { + { + let output: bool = ::bevy_camera::visibility::VisibilityRange::is_culled( + &_self, + camera_distance, + ) + .into(); + output + } + }; + output + }, + " Returns true if the object is completely invisible, given a camera\n `camera_distance` units away.\n This is equivalent to `!VisibilityRange::is_visible_at_all()`.", + &["_self", "camera_distance"], + ) + .register_documented( + "is_visible_at_all", + | + _self: Ref<::bevy_camera::visibility::VisibilityRange>, + camera_distance: f32| + { + let output: bool = { + { + let output: bool = ::bevy_camera::visibility::VisibilityRange::is_visible_at_all( + &_self, + camera_distance, + ) + .into(); + output + } + }; + output + }, + " Returns true if the object will be visible at all, given a camera\n `camera_distance` units away.\n Any amount of visibility, even with the heaviest dithering applied, is\n considered visible according to this check.", + &["_self", "camera_distance"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_camera::visibility::VisibilityRange, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +impl Plugin for BevyCameraScriptingPlugin { + fn build(&self, app: &mut App) { + let mut world = app.world_mut(); + register_clear_color_functions(&mut world); + register_inherited_visibility_functions(&mut world); + register_view_visibility_functions(&mut world); + register_visibility_functions(&mut world); + register_camera_functions(&mut world); + register_camera_2_d_functions(&mut world); + register_camera_3_d_functions(&mut world); + register_clear_color_config_functions(&mut world); + register_orthographic_projection_functions(&mut world); + register_perspective_projection_functions(&mut world); + register_projection_functions(&mut world); + register_frustum_functions(&mut world); + register_visible_entities_functions(&mut world); + register_viewport_functions(&mut world); + register_main_pass_resolution_override_functions(&mut world); + register_sub_camera_view_functions(&mut world); + register_exposure_functions(&mut world); + register_camera_main_texture_usages_functions(&mut world); + register_render_target_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); + register_camera_3_d_depth_load_op_functions(&mut world); + register_camera_3_d_depth_texture_usage_functions(&mut world); + register_screen_space_transmission_quality_functions(&mut world); + register_aabb_functions(&mut world); + register_cubemap_frusta_functions(&mut world); + register_cubemap_layout_functions(&mut world); + register_cascades_frusta_functions(&mut world); + register_custom_projection_functions(&mut world); + register_scaling_mode_functions(&mut world); + register_visibility_class_functions(&mut world); + register_no_frustum_culling_functions(&mut world); + register_visible_mesh_entities_functions(&mut world); + register_cubemap_visible_entities_functions(&mut world); + register_cascades_visible_entities_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 e7cd226302..addb65c95f 100644 --- a/crates/bindings/bevy_color_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_color_bms_bindings/Cargo.toml @@ -17,24 +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.16.2", features = [ - "std", - "bevy_reflect", - "encase", - "alloc", - "wgpu-types", -], default-features = true } +bevy_color = { version = "0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_math = { version = "^0.16.1", features = [ - "std", - "alloc", -], default-features = false } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [ - "std", -], default-features = false } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} + +bytemuck = { version = "^1", features = [], default-features = true} + +wgpu-types = { version = "^26", features = ["std"], default-features = false} -bytemuck = { version = "^1", features = [], default-features = true } -wgpu-types = { version = "^24", features = ["std"], default-features = false } diff --git a/crates/bindings/bevy_color_bms_bindings/src/lib.rs b/crates/bindings/bevy_color_bms_bindings/src/lib.rs index 76859d9761..7d513da6ea 100644 --- a/crates/bindings/bevy_color_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_color_bms_bindings/src/lib.rs @@ -1,27 +1,30 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyColorScriptingPlugin; pub(crate) fn register_color_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::Color, + ::bevy_color::Color, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::Color>| { - let output: Val<::bevy_color::prelude::Color> = { + |_self: Ref<::bevy_color::Color>| { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = <::bevy_color::prelude::Color as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::Color> = <::bevy_color::Color as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -35,14 +38,11 @@ pub(crate) fn register_color_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::Color>, - other: Ref<::bevy_color::prelude::Color>| - { + |_self: Ref<::bevy_color::Color>, other: Ref<::bevy_color::Color>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::Color as ::core::cmp::PartialEq< - ::bevy_color::prelude::Color, + let output: bool = <::bevy_color::Color as ::core::cmp::PartialEq< + ::bevy_color::Color, >>::eq(&_self, &other) .into(); output @@ -56,9 +56,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "hsl", |hue: f32, saturation: f32, lightness: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::hsl( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::hsl( hue, saturation, lightness, @@ -75,9 +75,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "hsla", |hue: f32, saturation: f32, lightness: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::hsla( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::hsla( hue, saturation, lightness, @@ -95,9 +95,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "hsv", |hue: f32, saturation: f32, value: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::hsv( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::hsv( hue, saturation, value, @@ -114,9 +114,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "hsva", |hue: f32, saturation: f32, value: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::hsva( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::hsva( hue, saturation, value, @@ -134,9 +134,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "hwb", |hue: f32, whiteness: f32, blackness: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::hwb( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::hwb( hue, whiteness, blackness, @@ -153,9 +153,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "hwba", |hue: f32, whiteness: f32, blackness: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::hwba( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::hwba( hue, whiteness, blackness, @@ -173,9 +173,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "lab", |lightness: f32, a: f32, b: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::lab( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::lab( lightness, a, b, @@ -192,9 +192,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "laba", |lightness: f32, a: f32, b: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::laba( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::laba( lightness, a, b, @@ -212,9 +212,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "lch", |lightness: f32, chroma: f32, hue: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::lch( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::lch( lightness, chroma, hue, @@ -231,9 +231,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "lcha", |lightness: f32, chroma: f32, hue: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::lcha( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::lcha( lightness, chroma, hue, @@ -251,9 +251,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "linear_rgb", |red: f32, green: f32, blue: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::linear_rgb( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::linear_rgb( red, green, blue, @@ -270,9 +270,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "linear_rgba", |red: f32, green: f32, blue: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::linear_rgba( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::linear_rgba( red, green, blue, @@ -290,9 +290,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "oklab", |lightness: f32, a: f32, b: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::oklab( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::oklab( lightness, a, b, @@ -309,9 +309,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "oklaba", |lightness: f32, a: f32, b: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::oklaba( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::oklaba( lightness, a, b, @@ -329,9 +329,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "oklch", |lightness: f32, chroma: f32, hue: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::oklch( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::oklch( lightness, chroma, hue, @@ -348,9 +348,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "oklcha", |lightness: f32, chroma: f32, hue: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::oklcha( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::oklcha( lightness, chroma, hue, @@ -368,9 +368,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "srgb", |red: f32, green: f32, blue: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::srgb( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::srgb( red, green, blue, @@ -387,9 +387,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "srgb_from_array", |array: [f32; 3]| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::srgb_from_array( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::srgb_from_array( array, ) .into(); @@ -404,9 +404,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "srgb_u8", |red: u8, green: u8, blue: u8| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::srgb_u8( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::srgb_u8( red, green, blue, @@ -423,9 +423,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "srgba", |red: f32, green: f32, blue: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::srgba( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::srgba( red, green, blue, @@ -443,9 +443,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "srgba_u8", |red: u8, green: u8, blue: u8, alpha: u8| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::srgba_u8( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::srgba_u8( red, green, blue, @@ -462,10 +462,10 @@ pub(crate) fn register_color_functions(world: &mut World) { ) .register_documented( "to_linear", - |_self: Ref<::bevy_color::prelude::Color>| { - let output: Val<::bevy_color::prelude::LinearRgba> = { + |_self: Ref<::bevy_color::Color>| { + let output: Val<::bevy_color::LinearRgba> = { { - let output: Val<::bevy_color::prelude::LinearRgba> = ::bevy_color::prelude::Color::to_linear( + let output: Val<::bevy_color::LinearRgba> = ::bevy_color::Color::to_linear( &_self, ) .into(); @@ -479,10 +479,10 @@ pub(crate) fn register_color_functions(world: &mut World) { ) .register_documented( "to_srgba", - |_self: Ref<::bevy_color::prelude::Color>| { - let output: Val<::bevy_color::prelude::Srgba> = { + |_self: Ref<::bevy_color::Color>| { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = ::bevy_color::prelude::Color::to_srgba( + let output: Val<::bevy_color::Srgba> = ::bevy_color::Color::to_srgba( &_self, ) .into(); @@ -497,9 +497,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "xyz", |x: f32, y: f32, z: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::xyz( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::xyz( x, y, z, @@ -516,9 +516,9 @@ pub(crate) fn register_color_functions(world: &mut World) { .register_documented( "xyza", |x: f32, y: f32, z: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Color> = { + let output: Val<::bevy_color::Color> = { { - let output: Val<::bevy_color::prelude::Color> = ::bevy_color::prelude::Color::xyza( + let output: Val<::bevy_color::Color> = ::bevy_color::Color::xyza( x, y, z, @@ -537,24 +537,21 @@ pub(crate) fn register_color_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::Color, + ::bevy_color::Color, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_srgba_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::Srgba, + ::bevy_color::Srgba, >::new(world) .register_documented( "add", - | - _self: Val<::bevy_color::prelude::Srgba>, - rhs: Val<::bevy_color::prelude::Srgba>| - { - let output: Val<::bevy_color::prelude::Srgba> = { - { - let output: Val<::bevy_color::prelude::Srgba> = <::bevy_color::prelude::Srgba as ::core::ops::Add< - ::bevy_color::prelude::Srgba, + |_self: Val<::bevy_color::Srgba>, rhs: Val<::bevy_color::Srgba>| { + let output: Val<::bevy_color::Srgba> = { + { + let output: Val<::bevy_color::Srgba> = <::bevy_color::Srgba as ::core::ops::Add< + ::bevy_color::Srgba, >>::add(_self.into_inner(), rhs.into_inner()) .into(); output @@ -567,10 +564,10 @@ pub(crate) fn register_srgba_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::Srgba>| { - let output: Val<::bevy_color::prelude::Srgba> = { + |_self: Ref<::bevy_color::Srgba>| { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = <::bevy_color::prelude::Srgba as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::Srgba> = <::bevy_color::Srgba as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -584,10 +581,10 @@ pub(crate) fn register_srgba_functions(world: &mut World) { ) .register_documented( "div", - |_self: Val<::bevy_color::prelude::Srgba>, rhs: f32| { - let output: Val<::bevy_color::prelude::Srgba> = { + |_self: Val<::bevy_color::Srgba>, rhs: f32| { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = <::bevy_color::prelude::Srgba as ::core::ops::Div< + let output: Val<::bevy_color::Srgba> = <::bevy_color::Srgba as ::core::ops::Div< f32, >>::div(_self.into_inner(), rhs) .into(); @@ -601,14 +598,11 @@ pub(crate) fn register_srgba_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::Srgba>, - other: Ref<::bevy_color::prelude::Srgba>| - { + |_self: Ref<::bevy_color::Srgba>, other: Ref<::bevy_color::Srgba>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::Srgba as ::core::cmp::PartialEq< - ::bevy_color::prelude::Srgba, + let output: bool = <::bevy_color::Srgba as ::core::cmp::PartialEq< + ::bevy_color::Srgba, >>::eq(&_self, &other) .into(); output @@ -624,9 +618,7 @@ pub(crate) fn register_srgba_functions(world: &mut World) { |value: f32| { let output: f32 = { { - let output: f32 = ::bevy_color::prelude::Srgba::gamma_function( - value, - ) + let output: f32 = ::bevy_color::Srgba::gamma_function(value) .into(); output } @@ -641,7 +633,7 @@ pub(crate) fn register_srgba_functions(world: &mut World) { |value: f32| { let output: f32 = { { - let output: f32 = ::bevy_color::prelude::Srgba::gamma_function_inverse( + let output: f32 = ::bevy_color::Srgba::gamma_function_inverse( value, ) .into(); @@ -655,10 +647,10 @@ pub(crate) fn register_srgba_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_color::prelude::Srgba>, rhs: f32| { - let output: Val<::bevy_color::prelude::Srgba> = { + |_self: Val<::bevy_color::Srgba>, rhs: f32| { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = <::bevy_color::prelude::Srgba as ::core::ops::Mul< + let output: Val<::bevy_color::Srgba> = <::bevy_color::Srgba as ::core::ops::Mul< f32, >>::mul(_self.into_inner(), rhs) .into(); @@ -672,10 +664,10 @@ pub(crate) fn register_srgba_functions(world: &mut World) { ) .register_documented( "neg", - |_self: Val<::bevy_color::prelude::Srgba>| { - let output: Val<::bevy_color::prelude::Srgba> = { + |_self: Val<::bevy_color::Srgba>| { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = <::bevy_color::prelude::Srgba as ::core::ops::Neg>::neg( + let output: Val<::bevy_color::Srgba> = <::bevy_color::Srgba as ::core::ops::Neg>::neg( _self.into_inner(), ) .into(); @@ -690,9 +682,9 @@ pub(crate) fn register_srgba_functions(world: &mut World) { .register_documented( "new", |red: f32, green: f32, blue: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Srgba> = { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = ::bevy_color::prelude::Srgba::new( + let output: Val<::bevy_color::Srgba> = ::bevy_color::Srgba::new( red, green, blue, @@ -710,9 +702,9 @@ pub(crate) fn register_srgba_functions(world: &mut World) { .register_documented( "rgb", |red: f32, green: f32, blue: f32| { - let output: Val<::bevy_color::prelude::Srgba> = { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = ::bevy_color::prelude::Srgba::rgb( + let output: Val<::bevy_color::Srgba> = ::bevy_color::Srgba::rgb( red, green, blue, @@ -729,9 +721,9 @@ pub(crate) fn register_srgba_functions(world: &mut World) { .register_documented( "rgb_u8", |r: u8, g: u8, b: u8| { - let output: Val<::bevy_color::prelude::Srgba> = { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = ::bevy_color::prelude::Srgba::rgb_u8( + let output: Val<::bevy_color::Srgba> = ::bevy_color::Srgba::rgb_u8( r, g, b, @@ -748,9 +740,9 @@ pub(crate) fn register_srgba_functions(world: &mut World) { .register_documented( "rgba_u8", |r: u8, g: u8, b: u8, a: u8| { - let output: Val<::bevy_color::prelude::Srgba> = { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = ::bevy_color::prelude::Srgba::rgba_u8( + let output: Val<::bevy_color::Srgba> = ::bevy_color::Srgba::rgba_u8( r, g, b, @@ -767,14 +759,11 @@ pub(crate) fn register_srgba_functions(world: &mut World) { ) .register_documented( "sub", - | - _self: Val<::bevy_color::prelude::Srgba>, - rhs: Val<::bevy_color::prelude::Srgba>| - { - let output: Val<::bevy_color::prelude::Srgba> = { - { - let output: Val<::bevy_color::prelude::Srgba> = <::bevy_color::prelude::Srgba as ::core::ops::Sub< - ::bevy_color::prelude::Srgba, + |_self: Val<::bevy_color::Srgba>, rhs: Val<::bevy_color::Srgba>| { + let output: Val<::bevy_color::Srgba> = { + { + let output: Val<::bevy_color::Srgba> = <::bevy_color::Srgba as ::core::ops::Sub< + ::bevy_color::Srgba, >>::sub(_self.into_inner(), rhs.into_inner()) .into(); output @@ -787,10 +776,10 @@ pub(crate) fn register_srgba_functions(world: &mut World) { ) .register_documented( "to_hex", - |_self: Ref<::bevy_color::prelude::Srgba>| { + |_self: Ref<::bevy_color::Srgba>| { let output: ::std::string::String = { { - let output: ::std::string::String = ::bevy_color::prelude::Srgba::to_hex( + let output: ::std::string::String = ::bevy_color::Srgba::to_hex( &_self, ) .into(); @@ -804,10 +793,10 @@ pub(crate) fn register_srgba_functions(world: &mut World) { ) .register_documented( "with_blue", - |_self: Val<::bevy_color::prelude::Srgba>, blue: f32| { - let output: Val<::bevy_color::prelude::Srgba> = { + |_self: Val<::bevy_color::Srgba>, blue: f32| { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = ::bevy_color::prelude::Srgba::with_blue( + let output: Val<::bevy_color::Srgba> = ::bevy_color::Srgba::with_blue( _self.into_inner(), blue, ) @@ -822,10 +811,10 @@ pub(crate) fn register_srgba_functions(world: &mut World) { ) .register_documented( "with_green", - |_self: Val<::bevy_color::prelude::Srgba>, green: f32| { - let output: Val<::bevy_color::prelude::Srgba> = { + |_self: Val<::bevy_color::Srgba>, green: f32| { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = ::bevy_color::prelude::Srgba::with_green( + let output: Val<::bevy_color::Srgba> = ::bevy_color::Srgba::with_green( _self.into_inner(), green, ) @@ -840,10 +829,10 @@ pub(crate) fn register_srgba_functions(world: &mut World) { ) .register_documented( "with_red", - |_self: Val<::bevy_color::prelude::Srgba>, red: f32| { - let output: Val<::bevy_color::prelude::Srgba> = { + |_self: Val<::bevy_color::Srgba>, red: f32| { + let output: Val<::bevy_color::Srgba> = { { - let output: Val<::bevy_color::prelude::Srgba> = ::bevy_color::prelude::Srgba::with_red( + let output: Val<::bevy_color::Srgba> = ::bevy_color::Srgba::with_red( _self.into_inner(), red, ) @@ -860,24 +849,21 @@ pub(crate) fn register_srgba_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::Srgba, + ::bevy_color::Srgba, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_linear_rgba_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::LinearRgba, + ::bevy_color::LinearRgba, >::new(world) .register_documented( "add", - | - _self: Val<::bevy_color::prelude::LinearRgba>, - rhs: Val<::bevy_color::prelude::LinearRgba>| - { - let output: Val<::bevy_color::prelude::LinearRgba> = { - { - let output: Val<::bevy_color::prelude::LinearRgba> = <::bevy_color::prelude::LinearRgba as ::core::ops::Add< - ::bevy_color::prelude::LinearRgba, + |_self: Val<::bevy_color::LinearRgba>, rhs: Val<::bevy_color::LinearRgba>| { + let output: Val<::bevy_color::LinearRgba> = { + { + let output: Val<::bevy_color::LinearRgba> = <::bevy_color::LinearRgba as ::core::ops::Add< + ::bevy_color::LinearRgba, >>::add(_self.into_inner(), rhs.into_inner()) .into(); output @@ -890,12 +876,10 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { ) .register_documented( "as_u32", - |_self: Ref<::bevy_color::prelude::LinearRgba>| { + |_self: Ref<::bevy_color::LinearRgba>| { let output: u32 = { { - let output: u32 = ::bevy_color::prelude::LinearRgba::as_u32( - &_self, - ) + let output: u32 = ::bevy_color::LinearRgba::as_u32(&_self) .into(); output } @@ -907,10 +891,10 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::LinearRgba>| { - let output: Val<::bevy_color::prelude::LinearRgba> = { + |_self: Ref<::bevy_color::LinearRgba>| { + let output: Val<::bevy_color::LinearRgba> = { { - let output: Val<::bevy_color::prelude::LinearRgba> = <::bevy_color::prelude::LinearRgba as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::LinearRgba> = <::bevy_color::LinearRgba as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -924,10 +908,10 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { ) .register_documented( "div", - |_self: Val<::bevy_color::prelude::LinearRgba>, rhs: f32| { - let output: Val<::bevy_color::prelude::LinearRgba> = { + |_self: Val<::bevy_color::LinearRgba>, rhs: f32| { + let output: Val<::bevy_color::LinearRgba> = { { - let output: Val<::bevy_color::prelude::LinearRgba> = <::bevy_color::prelude::LinearRgba as ::core::ops::Div< + let output: Val<::bevy_color::LinearRgba> = <::bevy_color::LinearRgba as ::core::ops::Div< f32, >>::div(_self.into_inner(), rhs) .into(); @@ -941,14 +925,11 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::LinearRgba>, - other: Ref<::bevy_color::prelude::LinearRgba>| - { + |_self: Ref<::bevy_color::LinearRgba>, other: Ref<::bevy_color::LinearRgba>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::LinearRgba as ::core::cmp::PartialEq< - ::bevy_color::prelude::LinearRgba, + let output: bool = <::bevy_color::LinearRgba as ::core::cmp::PartialEq< + ::bevy_color::LinearRgba, >>::eq(&_self, &other) .into(); output @@ -961,10 +942,10 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_color::prelude::LinearRgba>, rhs: f32| { - let output: Val<::bevy_color::prelude::LinearRgba> = { + |_self: Val<::bevy_color::LinearRgba>, rhs: f32| { + let output: Val<::bevy_color::LinearRgba> = { { - let output: Val<::bevy_color::prelude::LinearRgba> = <::bevy_color::prelude::LinearRgba as ::core::ops::Mul< + let output: Val<::bevy_color::LinearRgba> = <::bevy_color::LinearRgba as ::core::ops::Mul< f32, >>::mul(_self.into_inner(), rhs) .into(); @@ -978,10 +959,10 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { ) .register_documented( "neg", - |_self: Val<::bevy_color::prelude::LinearRgba>| { - let output: Val<::bevy_color::prelude::LinearRgba> = { + |_self: Val<::bevy_color::LinearRgba>| { + let output: Val<::bevy_color::LinearRgba> = { { - let output: Val<::bevy_color::prelude::LinearRgba> = <::bevy_color::prelude::LinearRgba as ::core::ops::Neg>::neg( + let output: Val<::bevy_color::LinearRgba> = <::bevy_color::LinearRgba as ::core::ops::Neg>::neg( _self.into_inner(), ) .into(); @@ -996,9 +977,9 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { .register_documented( "new", |red: f32, green: f32, blue: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::LinearRgba> = { + let output: Val<::bevy_color::LinearRgba> = { { - let output: Val<::bevy_color::prelude::LinearRgba> = ::bevy_color::prelude::LinearRgba::new( + let output: Val<::bevy_color::LinearRgba> = ::bevy_color::LinearRgba::new( red, green, blue, @@ -1016,9 +997,9 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { .register_documented( "rgb", |red: f32, green: f32, blue: f32| { - let output: Val<::bevy_color::prelude::LinearRgba> = { + let output: Val<::bevy_color::LinearRgba> = { { - let output: Val<::bevy_color::prelude::LinearRgba> = ::bevy_color::prelude::LinearRgba::rgb( + let output: Val<::bevy_color::LinearRgba> = ::bevy_color::LinearRgba::rgb( red, green, blue, @@ -1034,14 +1015,11 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { ) .register_documented( "sub", - | - _self: Val<::bevy_color::prelude::LinearRgba>, - rhs: Val<::bevy_color::prelude::LinearRgba>| - { - let output: Val<::bevy_color::prelude::LinearRgba> = { - { - let output: Val<::bevy_color::prelude::LinearRgba> = <::bevy_color::prelude::LinearRgba as ::core::ops::Sub< - ::bevy_color::prelude::LinearRgba, + |_self: Val<::bevy_color::LinearRgba>, rhs: Val<::bevy_color::LinearRgba>| { + let output: Val<::bevy_color::LinearRgba> = { + { + let output: Val<::bevy_color::LinearRgba> = <::bevy_color::LinearRgba as ::core::ops::Sub< + ::bevy_color::LinearRgba, >>::sub(_self.into_inner(), rhs.into_inner()) .into(); output @@ -1054,10 +1032,10 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { ) .register_documented( "with_blue", - |_self: Val<::bevy_color::prelude::LinearRgba>, blue: f32| { - let output: Val<::bevy_color::prelude::LinearRgba> = { + |_self: Val<::bevy_color::LinearRgba>, blue: f32| { + let output: Val<::bevy_color::LinearRgba> = { { - let output: Val<::bevy_color::prelude::LinearRgba> = ::bevy_color::prelude::LinearRgba::with_blue( + let output: Val<::bevy_color::LinearRgba> = ::bevy_color::LinearRgba::with_blue( _self.into_inner(), blue, ) @@ -1072,10 +1050,10 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { ) .register_documented( "with_green", - |_self: Val<::bevy_color::prelude::LinearRgba>, green: f32| { - let output: Val<::bevy_color::prelude::LinearRgba> = { + |_self: Val<::bevy_color::LinearRgba>, green: f32| { + let output: Val<::bevy_color::LinearRgba> = { { - let output: Val<::bevy_color::prelude::LinearRgba> = ::bevy_color::prelude::LinearRgba::with_green( + let output: Val<::bevy_color::LinearRgba> = ::bevy_color::LinearRgba::with_green( _self.into_inner(), green, ) @@ -1090,10 +1068,10 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { ) .register_documented( "with_red", - |_self: Val<::bevy_color::prelude::LinearRgba>, red: f32| { - let output: Val<::bevy_color::prelude::LinearRgba> = { + |_self: Val<::bevy_color::LinearRgba>, red: f32| { + let output: Val<::bevy_color::LinearRgba> = { { - let output: Val<::bevy_color::prelude::LinearRgba> = ::bevy_color::prelude::LinearRgba::with_red( + let output: Val<::bevy_color::LinearRgba> = ::bevy_color::LinearRgba::with_red( _self.into_inner(), red, ) @@ -1110,20 +1088,20 @@ pub(crate) fn register_linear_rgba_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::LinearRgba, + ::bevy_color::LinearRgba, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_hsla_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::Hsla, + ::bevy_color::Hsla, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::Hsla>| { - let output: Val<::bevy_color::prelude::Hsla> = { + |_self: Ref<::bevy_color::Hsla>| { + let output: Val<::bevy_color::Hsla> = { { - let output: Val<::bevy_color::prelude::Hsla> = <::bevy_color::prelude::Hsla as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::Hsla> = <::bevy_color::Hsla as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1137,14 +1115,11 @@ pub(crate) fn register_hsla_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::Hsla>, - other: Ref<::bevy_color::prelude::Hsla>| - { + |_self: Ref<::bevy_color::Hsla>, other: Ref<::bevy_color::Hsla>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::Hsla as ::core::cmp::PartialEq< - ::bevy_color::prelude::Hsla, + let output: bool = <::bevy_color::Hsla as ::core::cmp::PartialEq< + ::bevy_color::Hsla, >>::eq(&_self, &other) .into(); output @@ -1158,9 +1133,9 @@ pub(crate) fn register_hsla_functions(world: &mut World) { .register_documented( "hsl", |hue: f32, saturation: f32, lightness: f32| { - let output: Val<::bevy_color::prelude::Hsla> = { + let output: Val<::bevy_color::Hsla> = { { - let output: Val<::bevy_color::prelude::Hsla> = ::bevy_color::prelude::Hsla::hsl( + let output: Val<::bevy_color::Hsla> = ::bevy_color::Hsla::hsl( hue, saturation, lightness, @@ -1177,9 +1152,9 @@ pub(crate) fn register_hsla_functions(world: &mut World) { .register_documented( "new", |hue: f32, saturation: f32, lightness: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Hsla> = { + let output: Val<::bevy_color::Hsla> = { { - let output: Val<::bevy_color::prelude::Hsla> = ::bevy_color::prelude::Hsla::new( + let output: Val<::bevy_color::Hsla> = ::bevy_color::Hsla::new( hue, saturation, lightness, @@ -1197,9 +1172,9 @@ pub(crate) fn register_hsla_functions(world: &mut World) { .register_documented( "sequential_dispersed", |index: u32| { - let output: Val<::bevy_color::prelude::Hsla> = { + let output: Val<::bevy_color::Hsla> = { { - let output: Val<::bevy_color::prelude::Hsla> = ::bevy_color::prelude::Hsla::sequential_dispersed( + let output: Val<::bevy_color::Hsla> = ::bevy_color::Hsla::sequential_dispersed( index, ) .into(); @@ -1213,10 +1188,10 @@ pub(crate) fn register_hsla_functions(world: &mut World) { ) .register_documented( "with_lightness", - |_self: Val<::bevy_color::prelude::Hsla>, lightness: f32| { - let output: Val<::bevy_color::prelude::Hsla> = { + |_self: Val<::bevy_color::Hsla>, lightness: f32| { + let output: Val<::bevy_color::Hsla> = { { - let output: Val<::bevy_color::prelude::Hsla> = ::bevy_color::prelude::Hsla::with_lightness( + let output: Val<::bevy_color::Hsla> = ::bevy_color::Hsla::with_lightness( _self.into_inner(), lightness, ) @@ -1231,10 +1206,10 @@ pub(crate) fn register_hsla_functions(world: &mut World) { ) .register_documented( "with_saturation", - |_self: Val<::bevy_color::prelude::Hsla>, saturation: f32| { - let output: Val<::bevy_color::prelude::Hsla> = { + |_self: Val<::bevy_color::Hsla>, saturation: f32| { + let output: Val<::bevy_color::Hsla> = { { - let output: Val<::bevy_color::prelude::Hsla> = ::bevy_color::prelude::Hsla::with_saturation( + let output: Val<::bevy_color::Hsla> = ::bevy_color::Hsla::with_saturation( _self.into_inner(), saturation, ) @@ -1251,20 +1226,20 @@ pub(crate) fn register_hsla_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::Hsla, + ::bevy_color::Hsla, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_hsva_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::Hsva, + ::bevy_color::Hsva, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::Hsva>| { - let output: Val<::bevy_color::prelude::Hsva> = { + |_self: Ref<::bevy_color::Hsva>| { + let output: Val<::bevy_color::Hsva> = { { - let output: Val<::bevy_color::prelude::Hsva> = <::bevy_color::prelude::Hsva as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::Hsva> = <::bevy_color::Hsva as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1278,14 +1253,11 @@ pub(crate) fn register_hsva_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::Hsva>, - other: Ref<::bevy_color::prelude::Hsva>| - { + |_self: Ref<::bevy_color::Hsva>, other: Ref<::bevy_color::Hsva>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::Hsva as ::core::cmp::PartialEq< - ::bevy_color::prelude::Hsva, + let output: bool = <::bevy_color::Hsva as ::core::cmp::PartialEq< + ::bevy_color::Hsva, >>::eq(&_self, &other) .into(); output @@ -1299,9 +1271,9 @@ pub(crate) fn register_hsva_functions(world: &mut World) { .register_documented( "hsv", |hue: f32, saturation: f32, value: f32| { - let output: Val<::bevy_color::prelude::Hsva> = { + let output: Val<::bevy_color::Hsva> = { { - let output: Val<::bevy_color::prelude::Hsva> = ::bevy_color::prelude::Hsva::hsv( + let output: Val<::bevy_color::Hsva> = ::bevy_color::Hsva::hsv( hue, saturation, value, @@ -1318,9 +1290,9 @@ pub(crate) fn register_hsva_functions(world: &mut World) { .register_documented( "new", |hue: f32, saturation: f32, value: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Hsva> = { + let output: Val<::bevy_color::Hsva> = { { - let output: Val<::bevy_color::prelude::Hsva> = ::bevy_color::prelude::Hsva::new( + let output: Val<::bevy_color::Hsva> = ::bevy_color::Hsva::new( hue, saturation, value, @@ -1337,10 +1309,10 @@ pub(crate) fn register_hsva_functions(world: &mut World) { ) .register_documented( "with_saturation", - |_self: Val<::bevy_color::prelude::Hsva>, saturation: f32| { - let output: Val<::bevy_color::prelude::Hsva> = { + |_self: Val<::bevy_color::Hsva>, saturation: f32| { + let output: Val<::bevy_color::Hsva> = { { - let output: Val<::bevy_color::prelude::Hsva> = ::bevy_color::prelude::Hsva::with_saturation( + let output: Val<::bevy_color::Hsva> = ::bevy_color::Hsva::with_saturation( _self.into_inner(), saturation, ) @@ -1355,10 +1327,10 @@ pub(crate) fn register_hsva_functions(world: &mut World) { ) .register_documented( "with_value", - |_self: Val<::bevy_color::prelude::Hsva>, value: f32| { - let output: Val<::bevy_color::prelude::Hsva> = { + |_self: Val<::bevy_color::Hsva>, value: f32| { + let output: Val<::bevy_color::Hsva> = { { - let output: Val<::bevy_color::prelude::Hsva> = ::bevy_color::prelude::Hsva::with_value( + let output: Val<::bevy_color::Hsva> = ::bevy_color::Hsva::with_value( _self.into_inner(), value, ) @@ -1375,20 +1347,20 @@ pub(crate) fn register_hsva_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::Hsva, + ::bevy_color::Hsva, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_hwba_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::Hwba, + ::bevy_color::Hwba, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::Hwba>| { - let output: Val<::bevy_color::prelude::Hwba> = { + |_self: Ref<::bevy_color::Hwba>| { + let output: Val<::bevy_color::Hwba> = { { - let output: Val<::bevy_color::prelude::Hwba> = <::bevy_color::prelude::Hwba as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::Hwba> = <::bevy_color::Hwba as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1402,14 +1374,11 @@ pub(crate) fn register_hwba_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::Hwba>, - other: Ref<::bevy_color::prelude::Hwba>| - { + |_self: Ref<::bevy_color::Hwba>, other: Ref<::bevy_color::Hwba>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::Hwba as ::core::cmp::PartialEq< - ::bevy_color::prelude::Hwba, + let output: bool = <::bevy_color::Hwba as ::core::cmp::PartialEq< + ::bevy_color::Hwba, >>::eq(&_self, &other) .into(); output @@ -1423,9 +1392,9 @@ pub(crate) fn register_hwba_functions(world: &mut World) { .register_documented( "hwb", |hue: f32, whiteness: f32, blackness: f32| { - let output: Val<::bevy_color::prelude::Hwba> = { + let output: Val<::bevy_color::Hwba> = { { - let output: Val<::bevy_color::prelude::Hwba> = ::bevy_color::prelude::Hwba::hwb( + let output: Val<::bevy_color::Hwba> = ::bevy_color::Hwba::hwb( hue, whiteness, blackness, @@ -1442,9 +1411,9 @@ pub(crate) fn register_hwba_functions(world: &mut World) { .register_documented( "new", |hue: f32, whiteness: f32, blackness: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Hwba> = { + let output: Val<::bevy_color::Hwba> = { { - let output: Val<::bevy_color::prelude::Hwba> = ::bevy_color::prelude::Hwba::new( + let output: Val<::bevy_color::Hwba> = ::bevy_color::Hwba::new( hue, whiteness, blackness, @@ -1461,10 +1430,10 @@ pub(crate) fn register_hwba_functions(world: &mut World) { ) .register_documented( "with_blackness", - |_self: Val<::bevy_color::prelude::Hwba>, blackness: f32| { - let output: Val<::bevy_color::prelude::Hwba> = { + |_self: Val<::bevy_color::Hwba>, blackness: f32| { + let output: Val<::bevy_color::Hwba> = { { - let output: Val<::bevy_color::prelude::Hwba> = ::bevy_color::prelude::Hwba::with_blackness( + let output: Val<::bevy_color::Hwba> = ::bevy_color::Hwba::with_blackness( _self.into_inner(), blackness, ) @@ -1479,10 +1448,10 @@ pub(crate) fn register_hwba_functions(world: &mut World) { ) .register_documented( "with_whiteness", - |_self: Val<::bevy_color::prelude::Hwba>, whiteness: f32| { - let output: Val<::bevy_color::prelude::Hwba> = { + |_self: Val<::bevy_color::Hwba>, whiteness: f32| { + let output: Val<::bevy_color::Hwba> = { { - let output: Val<::bevy_color::prelude::Hwba> = ::bevy_color::prelude::Hwba::with_whiteness( + let output: Val<::bevy_color::Hwba> = ::bevy_color::Hwba::with_whiteness( _self.into_inner(), whiteness, ) @@ -1499,24 +1468,21 @@ pub(crate) fn register_hwba_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::Hwba, + ::bevy_color::Hwba, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_laba_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::Laba, + ::bevy_color::Laba, >::new(world) .register_documented( "add", - | - _self: Val<::bevy_color::prelude::Laba>, - rhs: Val<::bevy_color::prelude::Laba>| - { - let output: Val<::bevy_color::prelude::Laba> = { - { - let output: Val<::bevy_color::prelude::Laba> = <::bevy_color::prelude::Laba as ::core::ops::Add< - ::bevy_color::prelude::Laba, + |_self: Val<::bevy_color::Laba>, rhs: Val<::bevy_color::Laba>| { + let output: Val<::bevy_color::Laba> = { + { + let output: Val<::bevy_color::Laba> = <::bevy_color::Laba as ::core::ops::Add< + ::bevy_color::Laba, >>::add(_self.into_inner(), rhs.into_inner()) .into(); output @@ -1529,10 +1495,10 @@ pub(crate) fn register_laba_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::Laba>| { - let output: Val<::bevy_color::prelude::Laba> = { + |_self: Ref<::bevy_color::Laba>| { + let output: Val<::bevy_color::Laba> = { { - let output: Val<::bevy_color::prelude::Laba> = <::bevy_color::prelude::Laba as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::Laba> = <::bevy_color::Laba as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1546,10 +1512,10 @@ pub(crate) fn register_laba_functions(world: &mut World) { ) .register_documented( "div", - |_self: Val<::bevy_color::prelude::Laba>, rhs: f32| { - let output: Val<::bevy_color::prelude::Laba> = { + |_self: Val<::bevy_color::Laba>, rhs: f32| { + let output: Val<::bevy_color::Laba> = { { - let output: Val<::bevy_color::prelude::Laba> = <::bevy_color::prelude::Laba as ::core::ops::Div< + let output: Val<::bevy_color::Laba> = <::bevy_color::Laba as ::core::ops::Div< f32, >>::div(_self.into_inner(), rhs) .into(); @@ -1563,14 +1529,11 @@ pub(crate) fn register_laba_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::Laba>, - other: Ref<::bevy_color::prelude::Laba>| - { + |_self: Ref<::bevy_color::Laba>, other: Ref<::bevy_color::Laba>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::Laba as ::core::cmp::PartialEq< - ::bevy_color::prelude::Laba, + let output: bool = <::bevy_color::Laba as ::core::cmp::PartialEq< + ::bevy_color::Laba, >>::eq(&_self, &other) .into(); output @@ -1584,9 +1547,9 @@ pub(crate) fn register_laba_functions(world: &mut World) { .register_documented( "lab", |lightness: f32, a: f32, b: f32| { - let output: Val<::bevy_color::prelude::Laba> = { + let output: Val<::bevy_color::Laba> = { { - let output: Val<::bevy_color::prelude::Laba> = ::bevy_color::prelude::Laba::lab( + let output: Val<::bevy_color::Laba> = ::bevy_color::Laba::lab( lightness, a, b, @@ -1602,10 +1565,10 @@ pub(crate) fn register_laba_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_color::prelude::Laba>, rhs: f32| { - let output: Val<::bevy_color::prelude::Laba> = { + |_self: Val<::bevy_color::Laba>, rhs: f32| { + let output: Val<::bevy_color::Laba> = { { - let output: Val<::bevy_color::prelude::Laba> = <::bevy_color::prelude::Laba as ::core::ops::Mul< + let output: Val<::bevy_color::Laba> = <::bevy_color::Laba as ::core::ops::Mul< f32, >>::mul(_self.into_inner(), rhs) .into(); @@ -1619,10 +1582,10 @@ pub(crate) fn register_laba_functions(world: &mut World) { ) .register_documented( "neg", - |_self: Val<::bevy_color::prelude::Laba>| { - let output: Val<::bevy_color::prelude::Laba> = { + |_self: Val<::bevy_color::Laba>| { + let output: Val<::bevy_color::Laba> = { { - let output: Val<::bevy_color::prelude::Laba> = <::bevy_color::prelude::Laba as ::core::ops::Neg>::neg( + let output: Val<::bevy_color::Laba> = <::bevy_color::Laba as ::core::ops::Neg>::neg( _self.into_inner(), ) .into(); @@ -1637,9 +1600,9 @@ pub(crate) fn register_laba_functions(world: &mut World) { .register_documented( "new", |lightness: f32, a: f32, b: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Laba> = { + let output: Val<::bevy_color::Laba> = { { - let output: Val<::bevy_color::prelude::Laba> = ::bevy_color::prelude::Laba::new( + let output: Val<::bevy_color::Laba> = ::bevy_color::Laba::new( lightness, a, b, @@ -1656,14 +1619,11 @@ pub(crate) fn register_laba_functions(world: &mut World) { ) .register_documented( "sub", - | - _self: Val<::bevy_color::prelude::Laba>, - rhs: Val<::bevy_color::prelude::Laba>| - { - let output: Val<::bevy_color::prelude::Laba> = { - { - let output: Val<::bevy_color::prelude::Laba> = <::bevy_color::prelude::Laba as ::core::ops::Sub< - ::bevy_color::prelude::Laba, + |_self: Val<::bevy_color::Laba>, rhs: Val<::bevy_color::Laba>| { + let output: Val<::bevy_color::Laba> = { + { + let output: Val<::bevy_color::Laba> = <::bevy_color::Laba as ::core::ops::Sub< + ::bevy_color::Laba, >>::sub(_self.into_inner(), rhs.into_inner()) .into(); output @@ -1676,10 +1636,10 @@ pub(crate) fn register_laba_functions(world: &mut World) { ) .register_documented( "with_lightness", - |_self: Val<::bevy_color::prelude::Laba>, lightness: f32| { - let output: Val<::bevy_color::prelude::Laba> = { + |_self: Val<::bevy_color::Laba>, lightness: f32| { + let output: Val<::bevy_color::Laba> = { { - let output: Val<::bevy_color::prelude::Laba> = ::bevy_color::prelude::Laba::with_lightness( + let output: Val<::bevy_color::Laba> = ::bevy_color::Laba::with_lightness( _self.into_inner(), lightness, ) @@ -1696,20 +1656,20 @@ pub(crate) fn register_laba_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::Laba, + ::bevy_color::Laba, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_lcha_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::Lcha, + ::bevy_color::Lcha, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::Lcha>| { - let output: Val<::bevy_color::prelude::Lcha> = { + |_self: Ref<::bevy_color::Lcha>| { + let output: Val<::bevy_color::Lcha> = { { - let output: Val<::bevy_color::prelude::Lcha> = <::bevy_color::prelude::Lcha as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::Lcha> = <::bevy_color::Lcha as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1723,14 +1683,11 @@ pub(crate) fn register_lcha_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::Lcha>, - other: Ref<::bevy_color::prelude::Lcha>| - { + |_self: Ref<::bevy_color::Lcha>, other: Ref<::bevy_color::Lcha>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::Lcha as ::core::cmp::PartialEq< - ::bevy_color::prelude::Lcha, + let output: bool = <::bevy_color::Lcha as ::core::cmp::PartialEq< + ::bevy_color::Lcha, >>::eq(&_self, &other) .into(); output @@ -1744,9 +1701,9 @@ pub(crate) fn register_lcha_functions(world: &mut World) { .register_documented( "lch", |lightness: f32, chroma: f32, hue: f32| { - let output: Val<::bevy_color::prelude::Lcha> = { + let output: Val<::bevy_color::Lcha> = { { - let output: Val<::bevy_color::prelude::Lcha> = ::bevy_color::prelude::Lcha::lch( + let output: Val<::bevy_color::Lcha> = ::bevy_color::Lcha::lch( lightness, chroma, hue, @@ -1763,9 +1720,9 @@ pub(crate) fn register_lcha_functions(world: &mut World) { .register_documented( "new", |lightness: f32, chroma: f32, hue: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Lcha> = { + let output: Val<::bevy_color::Lcha> = { { - let output: Val<::bevy_color::prelude::Lcha> = ::bevy_color::prelude::Lcha::new( + let output: Val<::bevy_color::Lcha> = ::bevy_color::Lcha::new( lightness, chroma, hue, @@ -1783,9 +1740,9 @@ pub(crate) fn register_lcha_functions(world: &mut World) { .register_documented( "sequential_dispersed", |index: u32| { - let output: Val<::bevy_color::prelude::Lcha> = { + let output: Val<::bevy_color::Lcha> = { { - let output: Val<::bevy_color::prelude::Lcha> = ::bevy_color::prelude::Lcha::sequential_dispersed( + let output: Val<::bevy_color::Lcha> = ::bevy_color::Lcha::sequential_dispersed( index, ) .into(); @@ -1799,10 +1756,10 @@ pub(crate) fn register_lcha_functions(world: &mut World) { ) .register_documented( "with_chroma", - |_self: Val<::bevy_color::prelude::Lcha>, chroma: f32| { - let output: Val<::bevy_color::prelude::Lcha> = { + |_self: Val<::bevy_color::Lcha>, chroma: f32| { + let output: Val<::bevy_color::Lcha> = { { - let output: Val<::bevy_color::prelude::Lcha> = ::bevy_color::prelude::Lcha::with_chroma( + let output: Val<::bevy_color::Lcha> = ::bevy_color::Lcha::with_chroma( _self.into_inner(), chroma, ) @@ -1817,10 +1774,10 @@ pub(crate) fn register_lcha_functions(world: &mut World) { ) .register_documented( "with_lightness", - |_self: Val<::bevy_color::prelude::Lcha>, lightness: f32| { - let output: Val<::bevy_color::prelude::Lcha> = { + |_self: Val<::bevy_color::Lcha>, lightness: f32| { + let output: Val<::bevy_color::Lcha> = { { - let output: Val<::bevy_color::prelude::Lcha> = ::bevy_color::prelude::Lcha::with_lightness( + let output: Val<::bevy_color::Lcha> = ::bevy_color::Lcha::with_lightness( _self.into_inner(), lightness, ) @@ -1837,24 +1794,21 @@ pub(crate) fn register_lcha_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::Lcha, + ::bevy_color::Lcha, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_oklaba_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::Oklaba, + ::bevy_color::Oklaba, >::new(world) .register_documented( "add", - | - _self: Val<::bevy_color::prelude::Oklaba>, - rhs: Val<::bevy_color::prelude::Oklaba>| - { - let output: Val<::bevy_color::prelude::Oklaba> = { - { - let output: Val<::bevy_color::prelude::Oklaba> = <::bevy_color::prelude::Oklaba as ::core::ops::Add< - ::bevy_color::prelude::Oklaba, + |_self: Val<::bevy_color::Oklaba>, rhs: Val<::bevy_color::Oklaba>| { + let output: Val<::bevy_color::Oklaba> = { + { + let output: Val<::bevy_color::Oklaba> = <::bevy_color::Oklaba as ::core::ops::Add< + ::bevy_color::Oklaba, >>::add(_self.into_inner(), rhs.into_inner()) .into(); output @@ -1867,10 +1821,10 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::Oklaba>| { - let output: Val<::bevy_color::prelude::Oklaba> = { + |_self: Ref<::bevy_color::Oklaba>| { + let output: Val<::bevy_color::Oklaba> = { { - let output: Val<::bevy_color::prelude::Oklaba> = <::bevy_color::prelude::Oklaba as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::Oklaba> = <::bevy_color::Oklaba as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1884,10 +1838,10 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { ) .register_documented( "div", - |_self: Val<::bevy_color::prelude::Oklaba>, rhs: f32| { - let output: Val<::bevy_color::prelude::Oklaba> = { + |_self: Val<::bevy_color::Oklaba>, rhs: f32| { + let output: Val<::bevy_color::Oklaba> = { { - let output: Val<::bevy_color::prelude::Oklaba> = <::bevy_color::prelude::Oklaba as ::core::ops::Div< + let output: Val<::bevy_color::Oklaba> = <::bevy_color::Oklaba as ::core::ops::Div< f32, >>::div(_self.into_inner(), rhs) .into(); @@ -1901,14 +1855,11 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::Oklaba>, - other: Ref<::bevy_color::prelude::Oklaba>| - { + |_self: Ref<::bevy_color::Oklaba>, other: Ref<::bevy_color::Oklaba>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::Oklaba as ::core::cmp::PartialEq< - ::bevy_color::prelude::Oklaba, + let output: bool = <::bevy_color::Oklaba as ::core::cmp::PartialEq< + ::bevy_color::Oklaba, >>::eq(&_self, &other) .into(); output @@ -1922,9 +1873,9 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { .register_documented( "lab", |lightness: f32, a: f32, b: f32| { - let output: Val<::bevy_color::prelude::Oklaba> = { + let output: Val<::bevy_color::Oklaba> = { { - let output: Val<::bevy_color::prelude::Oklaba> = ::bevy_color::prelude::Oklaba::lab( + let output: Val<::bevy_color::Oklaba> = ::bevy_color::Oklaba::lab( lightness, a, b, @@ -1940,10 +1891,10 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_color::prelude::Oklaba>, rhs: f32| { - let output: Val<::bevy_color::prelude::Oklaba> = { + |_self: Val<::bevy_color::Oklaba>, rhs: f32| { + let output: Val<::bevy_color::Oklaba> = { { - let output: Val<::bevy_color::prelude::Oklaba> = <::bevy_color::prelude::Oklaba as ::core::ops::Mul< + let output: Val<::bevy_color::Oklaba> = <::bevy_color::Oklaba as ::core::ops::Mul< f32, >>::mul(_self.into_inner(), rhs) .into(); @@ -1957,10 +1908,10 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { ) .register_documented( "neg", - |_self: Val<::bevy_color::prelude::Oklaba>| { - let output: Val<::bevy_color::prelude::Oklaba> = { + |_self: Val<::bevy_color::Oklaba>| { + let output: Val<::bevy_color::Oklaba> = { { - let output: Val<::bevy_color::prelude::Oklaba> = <::bevy_color::prelude::Oklaba as ::core::ops::Neg>::neg( + let output: Val<::bevy_color::Oklaba> = <::bevy_color::Oklaba as ::core::ops::Neg>::neg( _self.into_inner(), ) .into(); @@ -1975,9 +1926,9 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { .register_documented( "new", |lightness: f32, a: f32, b: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Oklaba> = { + let output: Val<::bevy_color::Oklaba> = { { - let output: Val<::bevy_color::prelude::Oklaba> = ::bevy_color::prelude::Oklaba::new( + let output: Val<::bevy_color::Oklaba> = ::bevy_color::Oklaba::new( lightness, a, b, @@ -1994,14 +1945,11 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { ) .register_documented( "sub", - | - _self: Val<::bevy_color::prelude::Oklaba>, - rhs: Val<::bevy_color::prelude::Oklaba>| - { - let output: Val<::bevy_color::prelude::Oklaba> = { - { - let output: Val<::bevy_color::prelude::Oklaba> = <::bevy_color::prelude::Oklaba as ::core::ops::Sub< - ::bevy_color::prelude::Oklaba, + |_self: Val<::bevy_color::Oklaba>, rhs: Val<::bevy_color::Oklaba>| { + let output: Val<::bevy_color::Oklaba> = { + { + let output: Val<::bevy_color::Oklaba> = <::bevy_color::Oklaba as ::core::ops::Sub< + ::bevy_color::Oklaba, >>::sub(_self.into_inner(), rhs.into_inner()) .into(); output @@ -2014,10 +1962,10 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { ) .register_documented( "with_a", - |_self: Val<::bevy_color::prelude::Oklaba>, a: f32| { - let output: Val<::bevy_color::prelude::Oklaba> = { + |_self: Val<::bevy_color::Oklaba>, a: f32| { + let output: Val<::bevy_color::Oklaba> = { { - let output: Val<::bevy_color::prelude::Oklaba> = ::bevy_color::prelude::Oklaba::with_a( + let output: Val<::bevy_color::Oklaba> = ::bevy_color::Oklaba::with_a( _self.into_inner(), a, ) @@ -2032,10 +1980,10 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { ) .register_documented( "with_b", - |_self: Val<::bevy_color::prelude::Oklaba>, b: f32| { - let output: Val<::bevy_color::prelude::Oklaba> = { + |_self: Val<::bevy_color::Oklaba>, b: f32| { + let output: Val<::bevy_color::Oklaba> = { { - let output: Val<::bevy_color::prelude::Oklaba> = ::bevy_color::prelude::Oklaba::with_b( + let output: Val<::bevy_color::Oklaba> = ::bevy_color::Oklaba::with_b( _self.into_inner(), b, ) @@ -2050,10 +1998,10 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { ) .register_documented( "with_lightness", - |_self: Val<::bevy_color::prelude::Oklaba>, lightness: f32| { - let output: Val<::bevy_color::prelude::Oklaba> = { + |_self: Val<::bevy_color::Oklaba>, lightness: f32| { + let output: Val<::bevy_color::Oklaba> = { { - let output: Val<::bevy_color::prelude::Oklaba> = ::bevy_color::prelude::Oklaba::with_lightness( + let output: Val<::bevy_color::Oklaba> = ::bevy_color::Oklaba::with_lightness( _self.into_inner(), lightness, ) @@ -2070,20 +2018,20 @@ pub(crate) fn register_oklaba_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::Oklaba, + ::bevy_color::Oklaba, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_oklcha_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::Oklcha, + ::bevy_color::Oklcha, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::Oklcha>| { - let output: Val<::bevy_color::prelude::Oklcha> = { + |_self: Ref<::bevy_color::Oklcha>| { + let output: Val<::bevy_color::Oklcha> = { { - let output: Val<::bevy_color::prelude::Oklcha> = <::bevy_color::prelude::Oklcha as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::Oklcha> = <::bevy_color::Oklcha as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -2097,14 +2045,11 @@ pub(crate) fn register_oklcha_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::Oklcha>, - other: Ref<::bevy_color::prelude::Oklcha>| - { + |_self: Ref<::bevy_color::Oklcha>, other: Ref<::bevy_color::Oklcha>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::Oklcha as ::core::cmp::PartialEq< - ::bevy_color::prelude::Oklcha, + let output: bool = <::bevy_color::Oklcha as ::core::cmp::PartialEq< + ::bevy_color::Oklcha, >>::eq(&_self, &other) .into(); output @@ -2118,9 +2063,9 @@ pub(crate) fn register_oklcha_functions(world: &mut World) { .register_documented( "lch", |lightness: f32, chroma: f32, hue: f32| { - let output: Val<::bevy_color::prelude::Oklcha> = { + let output: Val<::bevy_color::Oklcha> = { { - let output: Val<::bevy_color::prelude::Oklcha> = ::bevy_color::prelude::Oklcha::lch( + let output: Val<::bevy_color::Oklcha> = ::bevy_color::Oklcha::lch( lightness, chroma, hue, @@ -2131,15 +2076,15 @@ pub(crate) fn register_oklcha_functions(world: &mut World) { }; output }, - " Construct a new [`Oklcha`] color from (l, c, h) components, with the default alpha (1.0).\n # Arguments\n * `lightness` - Lightness channel. [0.0, 1.0]\n * `chroma` - Chroma channel. [0.0, 1.0]\n * `hue` - Hue channel. [0.0, 360.0]\n * `alpha` - Alpha channel. [0.0, 1.0]", + " Construct a new [`Oklcha`] color from (l, c, h) components, with the default alpha (1.0).\n # Arguments\n * `lightness` - Lightness channel. [0.0, 1.0]\n * `chroma` - Chroma channel. [0.0, 1.0]\n * `hue` - Hue channel. [0.0, 360.0]", &["lightness", "chroma", "hue"], ) .register_documented( "new", |lightness: f32, chroma: f32, hue: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Oklcha> = { + let output: Val<::bevy_color::Oklcha> = { { - let output: Val<::bevy_color::prelude::Oklcha> = ::bevy_color::prelude::Oklcha::new( + let output: Val<::bevy_color::Oklcha> = ::bevy_color::Oklcha::new( lightness, chroma, hue, @@ -2157,9 +2102,9 @@ pub(crate) fn register_oklcha_functions(world: &mut World) { .register_documented( "sequential_dispersed", |index: u32| { - let output: Val<::bevy_color::prelude::Oklcha> = { + let output: Val<::bevy_color::Oklcha> = { { - let output: Val<::bevy_color::prelude::Oklcha> = ::bevy_color::prelude::Oklcha::sequential_dispersed( + let output: Val<::bevy_color::Oklcha> = ::bevy_color::Oklcha::sequential_dispersed( index, ) .into(); @@ -2173,10 +2118,10 @@ pub(crate) fn register_oklcha_functions(world: &mut World) { ) .register_documented( "with_chroma", - |_self: Val<::bevy_color::prelude::Oklcha>, chroma: f32| { - let output: Val<::bevy_color::prelude::Oklcha> = { + |_self: Val<::bevy_color::Oklcha>, chroma: f32| { + let output: Val<::bevy_color::Oklcha> = { { - let output: Val<::bevy_color::prelude::Oklcha> = ::bevy_color::prelude::Oklcha::with_chroma( + let output: Val<::bevy_color::Oklcha> = ::bevy_color::Oklcha::with_chroma( _self.into_inner(), chroma, ) @@ -2191,10 +2136,10 @@ pub(crate) fn register_oklcha_functions(world: &mut World) { ) .register_documented( "with_lightness", - |_self: Val<::bevy_color::prelude::Oklcha>, lightness: f32| { - let output: Val<::bevy_color::prelude::Oklcha> = { + |_self: Val<::bevy_color::Oklcha>, lightness: f32| { + let output: Val<::bevy_color::Oklcha> = { { - let output: Val<::bevy_color::prelude::Oklcha> = ::bevy_color::prelude::Oklcha::with_lightness( + let output: Val<::bevy_color::Oklcha> = ::bevy_color::Oklcha::with_lightness( _self.into_inner(), lightness, ) @@ -2211,24 +2156,21 @@ pub(crate) fn register_oklcha_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::Oklcha, + ::bevy_color::Oklcha, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_xyza_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_color::prelude::Xyza, + ::bevy_color::Xyza, >::new(world) .register_documented( "add", - | - _self: Val<::bevy_color::prelude::Xyza>, - rhs: Val<::bevy_color::prelude::Xyza>| - { - let output: Val<::bevy_color::prelude::Xyza> = { - { - let output: Val<::bevy_color::prelude::Xyza> = <::bevy_color::prelude::Xyza as ::core::ops::Add< - ::bevy_color::prelude::Xyza, + |_self: Val<::bevy_color::Xyza>, rhs: Val<::bevy_color::Xyza>| { + let output: Val<::bevy_color::Xyza> = { + { + let output: Val<::bevy_color::Xyza> = <::bevy_color::Xyza as ::core::ops::Add< + ::bevy_color::Xyza, >>::add(_self.into_inner(), rhs.into_inner()) .into(); output @@ -2241,10 +2183,10 @@ pub(crate) fn register_xyza_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_color::prelude::Xyza>| { - let output: Val<::bevy_color::prelude::Xyza> = { + |_self: Ref<::bevy_color::Xyza>| { + let output: Val<::bevy_color::Xyza> = { { - let output: Val<::bevy_color::prelude::Xyza> = <::bevy_color::prelude::Xyza as ::core::clone::Clone>::clone( + let output: Val<::bevy_color::Xyza> = <::bevy_color::Xyza as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -2258,10 +2200,10 @@ pub(crate) fn register_xyza_functions(world: &mut World) { ) .register_documented( "div", - |_self: Val<::bevy_color::prelude::Xyza>, rhs: f32| { - let output: Val<::bevy_color::prelude::Xyza> = { + |_self: Val<::bevy_color::Xyza>, rhs: f32| { + let output: Val<::bevy_color::Xyza> = { { - let output: Val<::bevy_color::prelude::Xyza> = <::bevy_color::prelude::Xyza as ::core::ops::Div< + let output: Val<::bevy_color::Xyza> = <::bevy_color::Xyza as ::core::ops::Div< f32, >>::div(_self.into_inner(), rhs) .into(); @@ -2275,14 +2217,11 @@ pub(crate) fn register_xyza_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_color::prelude::Xyza>, - other: Ref<::bevy_color::prelude::Xyza>| - { + |_self: Ref<::bevy_color::Xyza>, other: Ref<::bevy_color::Xyza>| { let output: bool = { { - let output: bool = <::bevy_color::prelude::Xyza as ::core::cmp::PartialEq< - ::bevy_color::prelude::Xyza, + let output: bool = <::bevy_color::Xyza as ::core::cmp::PartialEq< + ::bevy_color::Xyza, >>::eq(&_self, &other) .into(); output @@ -2295,10 +2234,10 @@ pub(crate) fn register_xyza_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_color::prelude::Xyza>, rhs: f32| { - let output: Val<::bevy_color::prelude::Xyza> = { + |_self: Val<::bevy_color::Xyza>, rhs: f32| { + let output: Val<::bevy_color::Xyza> = { { - let output: Val<::bevy_color::prelude::Xyza> = <::bevy_color::prelude::Xyza as ::core::ops::Mul< + let output: Val<::bevy_color::Xyza> = <::bevy_color::Xyza as ::core::ops::Mul< f32, >>::mul(_self.into_inner(), rhs) .into(); @@ -2312,10 +2251,10 @@ pub(crate) fn register_xyza_functions(world: &mut World) { ) .register_documented( "neg", - |_self: Val<::bevy_color::prelude::Xyza>| { - let output: Val<::bevy_color::prelude::Xyza> = { + |_self: Val<::bevy_color::Xyza>| { + let output: Val<::bevy_color::Xyza> = { { - let output: Val<::bevy_color::prelude::Xyza> = <::bevy_color::prelude::Xyza as ::core::ops::Neg>::neg( + let output: Val<::bevy_color::Xyza> = <::bevy_color::Xyza as ::core::ops::Neg>::neg( _self.into_inner(), ) .into(); @@ -2330,9 +2269,9 @@ pub(crate) fn register_xyza_functions(world: &mut World) { .register_documented( "new", |x: f32, y: f32, z: f32, alpha: f32| { - let output: Val<::bevy_color::prelude::Xyza> = { + let output: Val<::bevy_color::Xyza> = { { - let output: Val<::bevy_color::prelude::Xyza> = ::bevy_color::prelude::Xyza::new( + let output: Val<::bevy_color::Xyza> = ::bevy_color::Xyza::new( x, y, z, @@ -2349,14 +2288,11 @@ pub(crate) fn register_xyza_functions(world: &mut World) { ) .register_documented( "sub", - | - _self: Val<::bevy_color::prelude::Xyza>, - rhs: Val<::bevy_color::prelude::Xyza>| - { - let output: Val<::bevy_color::prelude::Xyza> = { - { - let output: Val<::bevy_color::prelude::Xyza> = <::bevy_color::prelude::Xyza as ::core::ops::Sub< - ::bevy_color::prelude::Xyza, + |_self: Val<::bevy_color::Xyza>, rhs: Val<::bevy_color::Xyza>| { + let output: Val<::bevy_color::Xyza> = { + { + let output: Val<::bevy_color::Xyza> = <::bevy_color::Xyza as ::core::ops::Sub< + ::bevy_color::Xyza, >>::sub(_self.into_inner(), rhs.into_inner()) .into(); output @@ -2369,10 +2305,10 @@ pub(crate) fn register_xyza_functions(world: &mut World) { ) .register_documented( "with_x", - |_self: Val<::bevy_color::prelude::Xyza>, x: f32| { - let output: Val<::bevy_color::prelude::Xyza> = { + |_self: Val<::bevy_color::Xyza>, x: f32| { + let output: Val<::bevy_color::Xyza> = { { - let output: Val<::bevy_color::prelude::Xyza> = ::bevy_color::prelude::Xyza::with_x( + let output: Val<::bevy_color::Xyza> = ::bevy_color::Xyza::with_x( _self.into_inner(), x, ) @@ -2387,10 +2323,10 @@ pub(crate) fn register_xyza_functions(world: &mut World) { ) .register_documented( "with_y", - |_self: Val<::bevy_color::prelude::Xyza>, y: f32| { - let output: Val<::bevy_color::prelude::Xyza> = { + |_self: Val<::bevy_color::Xyza>, y: f32| { + let output: Val<::bevy_color::Xyza> = { { - let output: Val<::bevy_color::prelude::Xyza> = ::bevy_color::prelude::Xyza::with_y( + let output: Val<::bevy_color::Xyza> = ::bevy_color::Xyza::with_y( _self.into_inner(), y, ) @@ -2405,10 +2341,10 @@ pub(crate) fn register_xyza_functions(world: &mut World) { ) .register_documented( "with_z", - |_self: Val<::bevy_color::prelude::Xyza>, z: f32| { - let output: Val<::bevy_color::prelude::Xyza> = { + |_self: Val<::bevy_color::Xyza>, z: f32| { + let output: Val<::bevy_color::Xyza> = { { - let output: Val<::bevy_color::prelude::Xyza> = ::bevy_color::prelude::Xyza::with_z( + let output: Val<::bevy_color::Xyza> = ::bevy_color::Xyza::with_z( _self.into_inner(), z, ) @@ -2424,9 +2360,9 @@ pub(crate) fn register_xyza_functions(world: &mut World) { .register_documented( "xyz", |x: f32, y: f32, z: f32| { - let output: Val<::bevy_color::prelude::Xyza> = { + let output: Val<::bevy_color::Xyza> = { { - let output: Val<::bevy_color::prelude::Xyza> = ::bevy_color::prelude::Xyza::xyz( + let output: Val<::bevy_color::Xyza> = ::bevy_color::Xyza::xyz( x, y, z, @@ -2444,7 +2380,7 @@ pub(crate) fn register_xyza_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_color::prelude::Xyza, + ::bevy_color::Xyza, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } diff --git a/crates/bindings/bevy_core_pipeline_bms_bindings/Cargo.toml b/crates/bindings/bevy_core_pipeline_bms_bindings/Cargo.toml index 649b3d3833..b28e6d2d60 100644 --- a/crates/bindings/bevy_core_pipeline_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_core_pipeline_bms_bindings/Cargo.toml @@ -17,56 +17,41 @@ 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.16.1", features = [ - "smaa_luts", - "tonemapping_luts", - "webgl", -], default-features = true } +bevy_core_pipeline = { version = "0.17.2", features = ["tonemapping_luts", "webgl"], default-features = true} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.16.2", features = [], default-features = true } +bevy_camera = { version = "^0.17.2", features = [], default-features = true} -bevy_derive = { version = "^0.16.1", features = [], default-features = true } +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_diagnostic = { version = "^0.16.1", features = [ -], default-features = true } +bevy_derive = { version = "^0.17.2", features = [], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.16.1", features = [ - "ktx2", - "zstd", - "ktx2", - "zstd", -], default-features = false } +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.16.1", features = [], default-features = true } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_render = { version = "^0.16.1", features = [ - "ktx2", - "ktx2", -], default-features = false } +bevy_render = { version = "^0.17.2", features = ["multi_threaded", "webgl"], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +bevy_shader = { version = "^0.17.2", features = [], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_window = { version = "^0.16.1", features = [], default-features = true } +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} -bitflags = { version = "^2.3", features = [], default-features = true } +bevy_window = { version = "^0.17.2", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} -bytemuck = { version = "^1", features = [], default-features = true } +bitflags = { version = "^2.3", features = [], default-features = true} -nonmax = { version = "^0.5", features = [], default-features = true } +nonmax = { version = "^0.5", features = [], default-features = true} -radsort = { version = "^0.1", features = [], default-features = true } +radsort = { version = "^0.1", features = [], default-features = true} -serde = { version = "^1", features = [], default-features = true } -smallvec = { version = "^1", 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 97e750849e..b554da9d4d 100644 --- a/crates/bindings/bevy_core_pipeline_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_core_pipeline_bms_bindings/src/lib.rs @@ -1,254 +1,30 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyCorePipelineScriptingPlugin; pub(crate) fn register_skybox_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_core_pipeline::Skybox, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::Skybox>| { - let output: Val<::bevy_core_pipeline::Skybox> = { - { - let output: Val<::bevy_core_pipeline::Skybox> = - <::bevy_core_pipeline::Skybox 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::Skybox, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_camera_2_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::core_2d::Camera2d, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::core_2d::Camera2d>| { - let output: Val<::bevy_core_pipeline::core_2d::Camera2d> = { - { - let output: Val<::bevy_core_pipeline::core_2d::Camera2d> = - <::bevy_core_pipeline::core_2d::Camera2d 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::core_2d::Camera2d, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_camera_3_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::core_3d::Camera3d, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::core_3d::Camera3d>| { - let output: Val<::bevy_core_pipeline::core_3d::Camera3d> = { - { - let output: Val<::bevy_core_pipeline::core_3d::Camera3d> = - <::bevy_core_pipeline::core_3d::Camera3d 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::core_3d::Camera3d, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_deferred_prepass_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::prepass::DeferredPrepass, - >::new(world); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_core_pipeline::prepass::DeferredPrepass, - 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, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::prepass::DepthPrepass>| { - let output: Val<::bevy_core_pipeline::prepass::DepthPrepass> = { - { - let output: Val<::bevy_core_pipeline::prepass::DepthPrepass> = <::bevy_core_pipeline::prepass::DepthPrepass 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::DepthPrepass, - 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, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::prepass::MotionVectorPrepass>| { - let output: Val<::bevy_core_pipeline::prepass::MotionVectorPrepass> = { - { - let output: Val< - ::bevy_core_pipeline::prepass::MotionVectorPrepass, - > = <::bevy_core_pipeline::prepass::MotionVectorPrepass 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::MotionVectorPrepass, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_normal_prepass_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::prepass::NormalPrepass, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::prepass::NormalPrepass>| { - let output: Val<::bevy_core_pipeline::prepass::NormalPrepass> = { - { - let output: Val<::bevy_core_pipeline::prepass::NormalPrepass> = <::bevy_core_pipeline::prepass::NormalPrepass 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::NormalPrepass, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_auto_exposure_compensation_curve_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::auto_exposure::AutoExposureCompensationCurve, - >::new(world) - .register_documented( - "clone", - | - _self: Ref< - ::bevy_core_pipeline::auto_exposure::AutoExposureCompensationCurve, - >| - { - let output: Val< - ::bevy_core_pipeline::auto_exposure::AutoExposureCompensationCurve, - > = { - { - let output: Val< - ::bevy_core_pipeline::auto_exposure::AutoExposureCompensationCurve, - > = <::bevy_core_pipeline::auto_exposure::AutoExposureCompensationCurve 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::auto_exposure::AutoExposureCompensationCurve, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_auto_exposure_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::auto_exposure::AutoExposure, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_core_pipeline::auto_exposure::AutoExposure>| { - let output: Val<::bevy_core_pipeline::auto_exposure::AutoExposure> = { + |_self: Ref<::bevy_core_pipeline::Skybox>| { + let output: Val<::bevy_core_pipeline::Skybox> = { { - let output: Val< - ::bevy_core_pipeline::auto_exposure::AutoExposure, - > = <::bevy_core_pipeline::auto_exposure::AutoExposure as ::std::clone::Clone>::clone( + let output: Val<::bevy_core_pipeline::Skybox> = <::bevy_core_pipeline::Skybox as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -264,7 +40,7 @@ pub(crate) fn register_auto_exposure_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_core_pipeline::auto_exposure::AutoExposure, + ::bevy_core_pipeline::Skybox, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -353,44 +129,16 @@ pub(crate) fn register_tonemapping_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_bloom_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::bloom::Bloom, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::bloom::Bloom>| { - let output: Val<::bevy_core_pipeline::bloom::Bloom> = { - { - let output: Val<::bevy_core_pipeline::bloom::Bloom> = - <::bevy_core_pipeline::bloom::Bloom 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::bloom::Bloom, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_bloom_composite_mode_functions(world: &mut World) { +pub(crate) fn register_deband_dither_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::bloom::BloomCompositeMode, + ::bevy_core_pipeline::tonemapping::DebandDither, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_core_pipeline::bloom::BloomCompositeMode>| { + |_self: Ref<::bevy_core_pipeline::tonemapping::DebandDither>| { let output: () = { { - let output: () = <::bevy_core_pipeline::bloom::BloomCompositeMode as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_core_pipeline::tonemapping::DebandDither as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -404,12 +152,12 @@ pub(crate) fn register_bloom_composite_mode_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_core_pipeline::bloom::BloomCompositeMode>| { - let output: Val<::bevy_core_pipeline::bloom::BloomCompositeMode> = { + |_self: Ref<::bevy_core_pipeline::tonemapping::DebandDither>| { + let output: Val<::bevy_core_pipeline::tonemapping::DebandDither> = { { let output: Val< - ::bevy_core_pipeline::bloom::BloomCompositeMode, - > = <::bevy_core_pipeline::bloom::BloomCompositeMode as ::std::clone::Clone>::clone( + ::bevy_core_pipeline::tonemapping::DebandDither, + > = <::bevy_core_pipeline::tonemapping::DebandDither as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -424,13 +172,13 @@ pub(crate) fn register_bloom_composite_mode_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_core_pipeline::bloom::BloomCompositeMode>, - other: Ref<::bevy_core_pipeline::bloom::BloomCompositeMode>| + _self: Ref<::bevy_core_pipeline::tonemapping::DebandDither>, + other: Ref<::bevy_core_pipeline::tonemapping::DebandDither>| { let output: bool = { { - let output: bool = <::bevy_core_pipeline::bloom::BloomCompositeMode as ::std::cmp::PartialEq< - ::bevy_core_pipeline::bloom::BloomCompositeMode, + let output: bool = <::bevy_core_pipeline::tonemapping::DebandDither as ::std::cmp::PartialEq< + ::bevy_core_pipeline::tonemapping::DebandDither, >>::eq(&_self, &other) .into(); output @@ -445,20 +193,32 @@ pub(crate) fn register_bloom_composite_mode_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_core_pipeline::bloom::BloomCompositeMode, + ::bevy_core_pipeline::tonemapping::DebandDither, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_deferred_prepass_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_core_pipeline::prepass::DeferredPrepass, + >::new(world); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_core_pipeline::prepass::DeferredPrepass, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_bloom_prefilter_functions(world: &mut World) { +pub(crate) fn register_depth_prepass_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::bloom::BloomPrefilter, + ::bevy_core_pipeline::prepass::DepthPrepass, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_core_pipeline::bloom::BloomPrefilter>| { - let output: Val<::bevy_core_pipeline::bloom::BloomPrefilter> = { + |_self: Ref<::bevy_core_pipeline::prepass::DepthPrepass>| { + let output: Val<::bevy_core_pipeline::prepass::DepthPrepass> = { { - let output: Val<::bevy_core_pipeline::bloom::BloomPrefilter> = <::bevy_core_pipeline::bloom::BloomPrefilter as ::std::clone::Clone>::clone( + let output: Val<::bevy_core_pipeline::prepass::DepthPrepass> = <::bevy_core_pipeline::prepass::DepthPrepass as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -474,28 +234,22 @@ pub(crate) fn register_bloom_prefilter_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_core_pipeline::bloom::BloomPrefilter, + ::bevy_core_pipeline::prepass::DepthPrepass, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_contrast_adaptive_sharpening_functions(world: &mut World) { +pub(crate) fn register_motion_vector_prepass_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpening, + ::bevy_core_pipeline::prepass::MotionVectorPrepass, >::new(world) .register_documented( "clone", - | - _self: Ref< - ::bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpening, - >| - { - let output: Val< - ::bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpening, - > = { + |_self: Ref<::bevy_core_pipeline::prepass::MotionVectorPrepass>| { + let output: Val<::bevy_core_pipeline::prepass::MotionVectorPrepass> = { { let output: Val< - ::bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpening, - > = <::bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpening as ::std::clone::Clone>::clone( + ::bevy_core_pipeline::prepass::MotionVectorPrepass, + > = <::bevy_core_pipeline::prepass::MotionVectorPrepass as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -511,24 +265,20 @@ pub(crate) fn register_contrast_adaptive_sharpening_functions(world: &mut World) let mut registry = registry.write(); registry .register_type_data::< - ::bevy_core_pipeline::contrast_adaptive_sharpening::ContrastAdaptiveSharpening, + ::bevy_core_pipeline::prepass::MotionVectorPrepass, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_denoise_cas_functions(world: &mut World) { +pub(crate) fn register_normal_prepass_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::contrast_adaptive_sharpening::DenoiseCas, + ::bevy_core_pipeline::prepass::NormalPrepass, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_core_pipeline::contrast_adaptive_sharpening::DenoiseCas>| { - let output: Val< - ::bevy_core_pipeline::contrast_adaptive_sharpening::DenoiseCas, - > = { + |_self: Ref<::bevy_core_pipeline::prepass::NormalPrepass>| { + let output: Val<::bevy_core_pipeline::prepass::NormalPrepass> = { { - let output: Val< - ::bevy_core_pipeline::contrast_adaptive_sharpening::DenoiseCas, - > = <::bevy_core_pipeline::contrast_adaptive_sharpening::DenoiseCas as ::std::clone::Clone>::clone( + let output: Val<::bevy_core_pipeline::prepass::NormalPrepass> = <::bevy_core_pipeline::prepass::NormalPrepass as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -544,491 +294,41 @@ pub(crate) fn register_denoise_cas_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_core_pipeline::contrast_adaptive_sharpening::DenoiseCas, + ::bevy_core_pipeline::prepass::NormalPrepass, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_fxaa_functions(world: &mut World) { +pub(crate) fn register_order_independent_transparency_settings_functions( + world: &mut World, +) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::fxaa::Fxaa, + ::bevy_core_pipeline::oit::OrderIndependentTransparencySettings, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::fxaa::Fxaa>| { - let output: Val<::bevy_core_pipeline::fxaa::Fxaa> = { - { - let output: Val<::bevy_core_pipeline::fxaa::Fxaa> = - <::bevy_core_pipeline::fxaa::Fxaa as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + | + _self: Ref< + ::bevy_core_pipeline::oit::OrderIndependentTransparencySettings, + >| + { + let output: Val< + ::bevy_core_pipeline::oit::OrderIndependentTransparencySettings, + > = { + { + let output: Val< + ::bevy_core_pipeline::oit::OrderIndependentTransparencySettings, + > = <::bevy_core_pipeline::oit::OrderIndependentTransparencySettings 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::fxaa::Fxaa, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_smaa_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::smaa::Smaa, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::smaa::Smaa>| { - let output: Val<::bevy_core_pipeline::smaa::Smaa> = { - { - let output: Val<::bevy_core_pipeline::smaa::Smaa> = - <::bevy_core_pipeline::smaa::Smaa 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::smaa::Smaa, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_deband_dither_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::tonemapping::DebandDither, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_core_pipeline::tonemapping::DebandDither>| { - let output: () = { - { - let output: () = <::bevy_core_pipeline::tonemapping::DebandDither as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::tonemapping::DebandDither>| { - let output: Val<::bevy_core_pipeline::tonemapping::DebandDither> = { - { - let output: Val< - ::bevy_core_pipeline::tonemapping::DebandDither, - > = <::bevy_core_pipeline::tonemapping::DebandDither as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_core_pipeline::tonemapping::DebandDither>, - other: Ref<::bevy_core_pipeline::tonemapping::DebandDither>| - { - let output: bool = { - { - let output: bool = <::bevy_core_pipeline::tonemapping::DebandDither as ::std::cmp::PartialEq< - ::bevy_core_pipeline::tonemapping::DebandDither, - >>::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_core_pipeline::tonemapping::DebandDither, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_motion_blur_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::motion_blur::MotionBlur, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::motion_blur::MotionBlur>| { - let output: Val<::bevy_core_pipeline::motion_blur::MotionBlur> = { - { - let output: Val<::bevy_core_pipeline::motion_blur::MotionBlur> = <::bevy_core_pipeline::motion_blur::MotionBlur 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::motion_blur::MotionBlur, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_depth_of_field_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::dof::DepthOfField, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::dof::DepthOfField>| { - let output: Val<::bevy_core_pipeline::dof::DepthOfField> = { - { - let output: Val<::bevy_core_pipeline::dof::DepthOfField> = - <::bevy_core_pipeline::dof::DepthOfField 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::dof::DepthOfField, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_screen_space_transmission_quality_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::core_3d::ScreenSpaceTransmissionQuality, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::core_3d::ScreenSpaceTransmissionQuality>| { - let output: Val< - ::bevy_core_pipeline::core_3d::ScreenSpaceTransmissionQuality, - > = { - { - let output: Val< - ::bevy_core_pipeline::core_3d::ScreenSpaceTransmissionQuality, - > = <::bevy_core_pipeline::core_3d::ScreenSpaceTransmissionQuality as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref< - ::bevy_core_pipeline::core_3d::ScreenSpaceTransmissionQuality, - >, - other: Ref< - ::bevy_core_pipeline::core_3d::ScreenSpaceTransmissionQuality, - >| - { - let output: bool = { - { - let output: bool = <::bevy_core_pipeline::core_3d::ScreenSpaceTransmissionQuality as ::std::cmp::PartialEq< - ::bevy_core_pipeline::core_3d::ScreenSpaceTransmissionQuality, - >>::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_core_pipeline::core_3d::ScreenSpaceTransmissionQuality, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_camera_3_d_depth_load_op_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::core_3d::Camera3dDepthLoadOp, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::core_3d::Camera3dDepthLoadOp>| { - let output: Val<::bevy_core_pipeline::core_3d::Camera3dDepthLoadOp> = { - { - let output: Val< - ::bevy_core_pipeline::core_3d::Camera3dDepthLoadOp, - > = <::bevy_core_pipeline::core_3d::Camera3dDepthLoadOp 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::core_3d::Camera3dDepthLoadOp, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_camera_3_d_depth_texture_usage_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::core_3d::Camera3dDepthTextureUsage, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::core_3d::Camera3dDepthTextureUsage>| { - let output: Val< - ::bevy_core_pipeline::core_3d::Camera3dDepthTextureUsage, - > = { - { - let output: Val< - ::bevy_core_pipeline::core_3d::Camera3dDepthTextureUsage, - > = <::bevy_core_pipeline::core_3d::Camera3dDepthTextureUsage 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::core_3d::Camera3dDepthTextureUsage, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_depth_of_field_mode_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::dof::DepthOfFieldMode, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::dof::DepthOfFieldMode>| { - let output: Val<::bevy_core_pipeline::dof::DepthOfFieldMode> = { - { - let output: Val<::bevy_core_pipeline::dof::DepthOfFieldMode> = <::bevy_core_pipeline::dof::DepthOfFieldMode as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_core_pipeline::dof::DepthOfFieldMode>, - other: Ref<::bevy_core_pipeline::dof::DepthOfFieldMode>| - { - let output: bool = { - { - let output: bool = <::bevy_core_pipeline::dof::DepthOfFieldMode as ::std::cmp::PartialEq< - ::bevy_core_pipeline::dof::DepthOfFieldMode, - >>::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_core_pipeline::dof::DepthOfFieldMode, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_temporal_anti_aliasing_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::experimental::taa::TemporalAntiAliasing, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::experimental::taa::TemporalAntiAliasing>| { - let output: Val< - ::bevy_core_pipeline::experimental::taa::TemporalAntiAliasing, - > = { - { - let output: Val< - ::bevy_core_pipeline::experimental::taa::TemporalAntiAliasing, - > = <::bevy_core_pipeline::experimental::taa::TemporalAntiAliasing 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::experimental::taa::TemporalAntiAliasing, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_sensitivity_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::fxaa::Sensitivity, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_core_pipeline::fxaa::Sensitivity>| { - let output: () = { - { - let output: () = <::bevy_core_pipeline::fxaa::Sensitivity as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::fxaa::Sensitivity>| { - let output: Val<::bevy_core_pipeline::fxaa::Sensitivity> = { - { - let output: Val<::bevy_core_pipeline::fxaa::Sensitivity> = <::bevy_core_pipeline::fxaa::Sensitivity as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_core_pipeline::fxaa::Sensitivity>, - other: Ref<::bevy_core_pipeline::fxaa::Sensitivity>| - { - let output: bool = { - { - let output: bool = <::bevy_core_pipeline::fxaa::Sensitivity as ::std::cmp::PartialEq< - ::bevy_core_pipeline::fxaa::Sensitivity, - >>::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_core_pipeline::fxaa::Sensitivity, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_order_independent_transparency_settings_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::oit::OrderIndependentTransparencySettings, - >::new(world) - .register_documented( - "clone", - | - _self: Ref< - ::bevy_core_pipeline::oit::OrderIndependentTransparencySettings, - >| - { - let output: Val< - ::bevy_core_pipeline::oit::OrderIndependentTransparencySettings, - > = { - { - let output: Val< - ::bevy_core_pipeline::oit::OrderIndependentTransparencySettings, - > = <::bevy_core_pipeline::oit::OrderIndependentTransparencySettings as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -1037,136 +337,16 @@ pub(crate) fn register_order_independent_transparency_settings_functions(world: bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_chromatic_aberration_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::post_process::ChromaticAberration, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::post_process::ChromaticAberration>| { - let output: Val< - ::bevy_core_pipeline::post_process::ChromaticAberration, - > = { - { - let output: Val< - ::bevy_core_pipeline::post_process::ChromaticAberration, - > = <::bevy_core_pipeline::post_process::ChromaticAberration 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::post_process::ChromaticAberration, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_smaa_preset_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_core_pipeline::smaa::SmaaPreset, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_core_pipeline::smaa::SmaaPreset>| { - let output: () = { - { - let output: () = <::bevy_core_pipeline::smaa::SmaaPreset as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_core_pipeline::smaa::SmaaPreset>| { - let output: Val<::bevy_core_pipeline::smaa::SmaaPreset> = { - { - let output: Val<::bevy_core_pipeline::smaa::SmaaPreset> = <::bevy_core_pipeline::smaa::SmaaPreset as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_core_pipeline::smaa::SmaaPreset>, - other: Ref<::bevy_core_pipeline::smaa::SmaaPreset>| - { - let output: bool = { - { - let output: bool = <::bevy_core_pipeline::smaa::SmaaPreset as ::std::cmp::PartialEq< - ::bevy_core_pipeline::smaa::SmaaPreset, - >>::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_core_pipeline::smaa::SmaaPreset, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} impl Plugin for BevyCorePipelineScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); register_skybox_functions(&mut world); - register_camera_2_d_functions(&mut world); - register_camera_3_d_functions(&mut world); + register_tonemapping_functions(&mut world); + register_deband_dither_functions(&mut world); register_deferred_prepass_functions(&mut world); register_depth_prepass_functions(&mut world); register_motion_vector_prepass_functions(&mut world); register_normal_prepass_functions(&mut world); - register_auto_exposure_compensation_curve_functions(&mut world); - register_auto_exposure_functions(&mut world); - register_tonemapping_functions(&mut world); - register_bloom_functions(&mut world); - register_bloom_composite_mode_functions(&mut world); - register_bloom_prefilter_functions(&mut world); - register_contrast_adaptive_sharpening_functions(&mut world); - register_denoise_cas_functions(&mut world); - register_fxaa_functions(&mut world); - register_smaa_functions(&mut world); - register_deband_dither_functions(&mut world); - register_motion_blur_functions(&mut world); - register_depth_of_field_functions(&mut world); - register_screen_space_transmission_quality_functions(&mut world); - register_camera_3_d_depth_load_op_functions(&mut world); - register_camera_3_d_depth_texture_usage_functions(&mut world); - register_depth_of_field_mode_functions(&mut world); - register_temporal_anti_aliasing_functions(&mut world); - register_sensitivity_functions(&mut world); register_order_independent_transparency_settings_functions(&mut world); - register_chromatic_aberration_functions(&mut world); - register_smaa_preset_functions(&mut world); } } diff --git a/crates/bindings/bevy_ecs_bms_bindings/Cargo.toml b/crates/bindings/bevy_ecs_bms_bindings/Cargo.toml index 046212fc25..d7a016a361 100644 --- a/crates/bindings/bevy_ecs_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_ecs_bms_bindings/Cargo.toml @@ -17,67 +17,37 @@ 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.16.1", features = [ - "std", - "bevy_reflect", - "async_executor", - "backtrace", - "multi_threaded", - "serialize", -], default-features = true } +bevy_ecs = { version = "0.17.2", 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 } +arrayvec = { version = "^0.7.4", features = ["std"], default-features = false} -bevy_ecs_macros = { version = "^0.16.1", features = [ -], default-features = true } +bevy_ecs_macros = { version = "^0.17.2", features = [], default-features = true} -bevy_platform = { version = "^0.16.1", features = [ - "std", - "serialize", -], default-features = false } +bevy_platform = { version = "^0.17.2", features = ["alloc", "serialize", "std"], default-features = true} -bevy_ptr = { version = "^0.16.1", features = [], default-features = true } +bevy_ptr = { version = "^0.17.2", features = [], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [ - "std", -], default-features = false } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_tasks = { version = "^0.16.1", features = [ - "std", - "async_executor", - "multi_threaded", -], default-features = false } +bevy_tasks = { version = "^0.17.2", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} -bevy_utils = { version = "^0.16.1", features = [ - "std", - "serde", -], default-features = false } +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel", "std"], default-features = true} -bitflags = { version = "^2.3", features = ["std"], default-features = false } +bitflags = { version = "^2.3", features = ["std"], default-features = false} -bumpalo = { version = "^3", features = [], default-features = true } +bumpalo = { version = "^3", features = [], default-features = true} -concurrent-queue = { version = "^2.5.0", features = [ - "std", - "std", -], default-features = false } +concurrent-queue = { version = "^2.5.0", features = ["std"], default-features = false} -disqualified = { version = "^1.0", features = [ - "alloc", -], default-features = false } +fixedbitset = { version = "^0.5", features = ["std"], default-features = false} -fixedbitset = { version = "^0.5", features = ["std"], default-features = false } +indexmap = { version = "^2.5.0", features = ["serde", "std"], default-features = false} -indexmap = { version = "^2.5.0", features = [ - "std", - "serde", -], default-features = false } +log = { version = "^0.4", features = ["std"], default-features = false} -log = { version = "^0.4", features = ["std"], default-features = false } +nonmax = { version = "^0.5", features = ["std"], default-features = false} -nonmax = { version = "^0.5", features = ["std"], default-features = false } +serde = { version = "^1", features = ["std"], default-features = false} -serde = { version = "^1", features = ["std"], default-features = false } -smallvec = { version = "^1", features = [], default-features = true } diff --git a/crates/bindings/bevy_ecs_bms_bindings/src/lib.rs b/crates/bindings/bevy_ecs_bms_bindings/src/lib.rs index bd0502c5b5..54b59c65d9 100644 --- a/crates/bindings/bevy_ecs_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_ecs_bms_bindings/src/lib.rs @@ -1,15 +1,18 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyEcsScriptingPlugin; pub(crate) fn register_entity_functions(world: &mut World) { @@ -71,12 +74,12 @@ pub(crate) fn register_entity_functions(world: &mut World) { &["bits"], ) .register_documented( - "from_raw", - |index: u32| { + "from_row", + |row: Val<::bevy_ecs::entity::EntityRow>| { let output: Val<::bevy_ecs::entity::Entity> = { { - let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::entity::Entity::from_raw( - index, + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::entity::Entity::from_row( + row.into_inner(), ) .into(); output @@ -84,15 +87,36 @@ pub(crate) fn register_entity_functions(world: &mut World) { }; output }, - " Creates a new entity ID with the specified `index` 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.", - &["index"], + " 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"], + ) + .register_documented( + "from_row_and_generation", + | + row: Val<::bevy_ecs::entity::EntityRow>, + 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(), + generation.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a new instance with the given index and generation.", + &["row", "generation"], ) .register_documented( "generation", |_self: Val<::bevy_ecs::entity::Entity>| { - let output: u32 = { + let output: Val<::bevy_ecs::entity::EntityGeneration> = { { - let output: u32 = ::bevy_ecs::entity::Entity::generation( + let output: Val<::bevy_ecs::entity::EntityGeneration> = ::bevy_ecs::entity::Entity::generation( _self.into_inner(), ) .into(); @@ -101,7 +125,7 @@ pub(crate) fn register_entity_functions(world: &mut World) { }; output }, - " 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.", + " 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.", &["_self"], ) .register_documented( @@ -118,7 +142,24 @@ pub(crate) fn register_entity_functions(world: &mut World) { }; output }, - " Return a transiently unique identifier.\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.", + " Equivalent to `self.row().index()`. See [`Self::row`] for details.", + &["_self"], + ) + .register_documented( + "row", + |_self: Val<::bevy_ecs::entity::Entity>| { + let output: Val<::bevy_ecs::entity::EntityRow> = { + { + let output: Val<::bevy_ecs::entity::EntityRow> = ::bevy_ecs::entity::Entity::row( + _self.into_inner(), + ) + .into(); + output + } + }; + 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.", &["_self"], ) .register_documented( @@ -204,23 +245,6 @@ pub(crate) fn register_child_of_functions(world: &mut World) { "", &["_self", "other"], ) - .register_documented( - "get", - |_self: Ref<::bevy_ecs::hierarchy::ChildOf>| { - let output: Val<::bevy_ecs::entity::Entity> = { - { - let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ecs::hierarchy::ChildOf::get( - &_self, - ) - .into(); - output - } - }; - output - }, - " The parent entity of this child entity.", - &["_self"], - ) .register_documented( "parent", |_self: Ref<::bevy_ecs::hierarchy::ChildOf>| { @@ -318,16 +342,16 @@ pub(crate) fn register_children_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_name_functions(world: &mut World) { +pub(crate) fn register_add_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::name::Name, + ::bevy_ecs::lifecycle::Add, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_ecs::name::Name>| { - let output: Val<::bevy_ecs::name::Name> = { + |_self: Ref<::bevy_ecs::lifecycle::Add>| { + let output: Val<::bevy_ecs::lifecycle::Add> = { { - let output: Val<::bevy_ecs::name::Name> = <::bevy_ecs::name::Name as ::core::clone::Clone>::clone( + let output: Val<::bevy_ecs::lifecycle::Add> = <::bevy_ecs::lifecycle::Add as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -338,15 +362,27 @@ pub(crate) fn register_name_functions(world: &mut World) { }, "", &["_self"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ecs::lifecycle::Add, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_despawn_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ecs::lifecycle::Despawn, + >::new(world) .register_documented( - "eq", - |_self: Ref<::bevy_ecs::name::Name>, other: Ref<::bevy_ecs::name::Name>| { - let output: bool = { + "clone", + |_self: Ref<::bevy_ecs::lifecycle::Despawn>| { + let output: Val<::bevy_ecs::lifecycle::Despawn> = { { - let output: bool = <::bevy_ecs::name::Name as ::core::cmp::PartialEq< - ::bevy_ecs::name::Name, - >>::eq(&_self, &other) + let output: Val<::bevy_ecs::lifecycle::Despawn> = <::bevy_ecs::lifecycle::Despawn as ::core::clone::Clone>::clone( + &_self, + ) .into(); output } @@ -354,59 +390,196 @@ pub(crate) fn register_name_functions(world: &mut World) { output }, "", - &["_self", "other"], + &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_ecs::name::Name, bevy_mod_scripting_bindings::MarkAsGenerated>( + .register_type_data::< + ::bevy_ecs::lifecycle::Despawn, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_insert_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ecs::lifecycle::Insert, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ecs::lifecycle::Insert>| { + let output: Val<::bevy_ecs::lifecycle::Insert> = { + { + let output: Val<::bevy_ecs::lifecycle::Insert> = <::bevy_ecs::lifecycle::Insert 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::lifecycle::Insert, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } -pub(crate) fn register_on_add_functions(world: &mut World) { +pub(crate) fn register_remove_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::world::OnAdd, - >::new(world); + ::bevy_ecs::lifecycle::Remove, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ecs::lifecycle::Remove>| { + let output: Val<::bevy_ecs::lifecycle::Remove> = { + { + let output: Val<::bevy_ecs::lifecycle::Remove> = <::bevy_ecs::lifecycle::Remove 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::world::OnAdd, + ::bevy_ecs::lifecycle::Remove, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_on_insert_functions(world: &mut World) { +pub(crate) fn register_replace_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::world::OnInsert, - >::new(world); + ::bevy_ecs::lifecycle::Replace, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ecs::lifecycle::Replace>| { + let output: Val<::bevy_ecs::lifecycle::Replace> = { + { + let output: Val<::bevy_ecs::lifecycle::Replace> = <::bevy_ecs::lifecycle::Replace 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::world::OnInsert, + ::bevy_ecs::lifecycle::Replace, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_on_remove_functions(world: &mut World) { +pub(crate) fn register_name_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::world::OnRemove, - >::new(world); + ::bevy_ecs::name::Name, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ecs::name::Name>| { + let output: Val<::bevy_ecs::name::Name> = { + { + let output: Val<::bevy_ecs::name::Name> = <::bevy_ecs::name::Name as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ecs::name::Name>, other: Ref<::bevy_ecs::name::Name>| { + let output: bool = { + { + let output: bool = <::bevy_ecs::name::Name as ::core::cmp::PartialEq< + ::bevy_ecs::name::Name, + >>::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_ecs::world::OnRemove, + ::bevy_ecs::name::Name, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_on_replace_functions(world: &mut World) { +pub(crate) fn register_default_query_filters_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::world::OnReplace, - >::new(world); + ::bevy_ecs::entity_disabling::DefaultQueryFilters, + >::new(world) + .register_documented( + "empty", + || { + let output: Val<::bevy_ecs::entity_disabling::DefaultQueryFilters> = { + { + let output: Val< + ::bevy_ecs::entity_disabling::DefaultQueryFilters, + > = ::bevy_ecs::entity_disabling::DefaultQueryFilters::empty() + .into(); + output + } + }; + output + }, + " Creates a new, completely empty [`DefaultQueryFilters`].\n This is provided as an escape hatch; in most cases you should initialize this using [`FromWorld`],\n which is automatically called when creating a new [`World`].", + &[], + ) + .register_documented( + "register_disabling_component", + | + mut _self: Mut<::bevy_ecs::entity_disabling::DefaultQueryFilters>, + component_id: Val<::bevy_ecs::component::ComponentId>| + { + let output: () = { + { + let output: () = ::bevy_ecs::entity_disabling::DefaultQueryFilters::register_disabling_component( + &mut _self, + component_id.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Adds this [`ComponentId`] to the set of [`DefaultQueryFilters`],\n causing entities with this component to be excluded from queries.\n This method is idempotent, and will not add the same component multiple times.\n # Warning\n This method should only be called before the app starts, as it will not affect queries\n initialized before it is called.\n As discussed in the [module docs](crate::entity_disabling), this can have performance implications,\n as well as create interoperability issues, and should be used with caution.", + &["_self", "component_id"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ecs::world::OnReplace, + ::bevy_ecs::entity_disabling::DefaultQueryFilters, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -510,56 +683,6 @@ pub(crate) fn register_component_id_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_default_query_filters_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::entity_disabling::DefaultQueryFilters, - >::new(world) - .register_documented( - "empty", - || { - let output: Val<::bevy_ecs::entity_disabling::DefaultQueryFilters> = { - { - let output: Val< - ::bevy_ecs::entity_disabling::DefaultQueryFilters, - > = ::bevy_ecs::entity_disabling::DefaultQueryFilters::empty() - .into(); - output - } - }; - output - }, - " Creates a new, completely empty [`DefaultQueryFilters`].\n This is provided as an escape hatch; in most cases you should initialize this using [`FromWorld`],\n which is automatically called when creating a new [`World`].", - &[], - ) - .register_documented( - "register_disabling_component", - | - mut _self: Mut<::bevy_ecs::entity_disabling::DefaultQueryFilters>, - component_id: Val<::bevy_ecs::component::ComponentId>| - { - let output: () = { - { - let output: () = ::bevy_ecs::entity_disabling::DefaultQueryFilters::register_disabling_component( - &mut _self, - component_id.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Adds this [`ComponentId`] to the set of [`DefaultQueryFilters`],\n causing entities with this component to be excluded from queries.\n This method is idempotent, and will not add the same component multiple times.\n # Warning\n This method should only be called before the app starts, as it will not affect queries\n initialized before it is called.\n As discussed in the [module docs](crate::entity_disabling), this can have performance implications,\n as well as create interoperability issues, and should be used with caution.", - &["_self", "component_id"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_ecs::entity_disabling::DefaultQueryFilters, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} pub(crate) fn register_tick_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_ecs::component::Tick, @@ -803,7 +926,7 @@ 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`] 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, component::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::(); @@ -816,14 +939,14 @@ pub(crate) fn register_component_ticks_functions(world: &mut World) { } pub(crate) fn register_entity_hash_set_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::entity::hash_set::EntityHashSet, + ::bevy_ecs::entity::EntityHashSet, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_ecs::entity::hash_set::EntityHashSet>| { + |_self: Ref<::bevy_ecs::entity::EntityHashSet>| { let output: () = { { - let output: () = <::bevy_ecs::entity::hash_set::EntityHashSet as ::core::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_ecs::entity::EntityHashSet as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -837,10 +960,10 @@ pub(crate) fn register_entity_hash_set_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_ecs::entity::hash_set::EntityHashSet>| { - let output: Val<::bevy_ecs::entity::hash_set::EntityHashSet> = { + |_self: Ref<::bevy_ecs::entity::EntityHashSet>| { + let output: Val<::bevy_ecs::entity::EntityHashSet> = { { - let output: Val<::bevy_ecs::entity::hash_set::EntityHashSet> = <::bevy_ecs::entity::hash_set::EntityHashSet as ::core::clone::Clone>::clone( + let output: Val<::bevy_ecs::entity::EntityHashSet> = <::bevy_ecs::entity::EntityHashSet as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -855,13 +978,13 @@ pub(crate) fn register_entity_hash_set_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_ecs::entity::hash_set::EntityHashSet>, - other: Ref<::bevy_ecs::entity::hash_set::EntityHashSet>| + _self: Ref<::bevy_ecs::entity::EntityHashSet>, + other: Ref<::bevy_ecs::entity::EntityHashSet>| { let output: bool = { { - let output: bool = <::bevy_ecs::entity::hash_set::EntityHashSet as ::core::cmp::PartialEq< - ::bevy_ecs::entity::hash_set::EntityHashSet, + let output: bool = <::bevy_ecs::entity::EntityHashSet as ::core::cmp::PartialEq< + ::bevy_ecs::entity::EntityHashSet, >>::eq(&_self, &other) .into(); output @@ -874,10 +997,10 @@ pub(crate) fn register_entity_hash_set_functions(world: &mut World) { ) .register_documented( "is_empty", - |_self: Ref<::bevy_ecs::entity::hash_set::EntityHashSet>| { + |_self: Ref<::bevy_ecs::entity::EntityHashSet>| { let output: bool = { { - let output: bool = ::bevy_ecs::entity::hash_set::EntityHashSet::is_empty( + let output: bool = ::bevy_ecs::entity::EntityHashSet::is_empty( &_self, ) .into(); @@ -891,10 +1014,10 @@ pub(crate) fn register_entity_hash_set_functions(world: &mut World) { ) .register_documented( "len", - |_self: Ref<::bevy_ecs::entity::hash_set::EntityHashSet>| { + |_self: Ref<::bevy_ecs::entity::EntityHashSet>| { let output: usize = { { - let output: usize = ::bevy_ecs::entity::hash_set::EntityHashSet::len( + let output: usize = ::bevy_ecs::entity::EntityHashSet::len( &_self, ) .into(); @@ -909,9 +1032,9 @@ pub(crate) fn register_entity_hash_set_functions(world: &mut World) { .register_documented( "new", || { - let output: Val<::bevy_ecs::entity::hash_set::EntityHashSet> = { + let output: Val<::bevy_ecs::entity::EntityHashSet> = { { - let output: Val<::bevy_ecs::entity::hash_set::EntityHashSet> = ::bevy_ecs::entity::hash_set::EntityHashSet::new() + let output: Val<::bevy_ecs::entity::EntityHashSet> = ::bevy_ecs::entity::EntityHashSet::new() .into(); output } @@ -924,9 +1047,9 @@ pub(crate) fn register_entity_hash_set_functions(world: &mut World) { .register_documented( "with_capacity", |n: usize| { - let output: Val<::bevy_ecs::entity::hash_set::EntityHashSet> = { + let output: Val<::bevy_ecs::entity::EntityHashSet> = { { - let output: Val<::bevy_ecs::entity::hash_set::EntityHashSet> = ::bevy_ecs::entity::hash_set::EntityHashSet::with_capacity( + let output: Val<::bevy_ecs::entity::EntityHashSet> = ::bevy_ecs::entity::EntityHashSet::with_capacity( n, ) .into(); @@ -942,20 +1065,37 @@ pub(crate) fn register_entity_hash_set_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ecs::entity::hash_set::EntityHashSet, + ::bevy_ecs::entity::EntityHashSet, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_identifier_functions(world: &mut World) { +pub(crate) fn register_entity_row_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::identifier::Identifier, + ::bevy_ecs::entity::EntityRow, >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ecs::entity::EntityRow>| { + let output: () = { + { + let output: () = <::bevy_ecs::entity::EntityRow as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) .register_documented( "clone", - |_self: Ref<::bevy_ecs::identifier::Identifier>| { - let output: Val<::bevy_ecs::identifier::Identifier> = { + |_self: Ref<::bevy_ecs::entity::EntityRow>| { + let output: Val<::bevy_ecs::entity::EntityRow> = { { - let output: Val<::bevy_ecs::identifier::Identifier> = <::bevy_ecs::identifier::Identifier as ::core::clone::Clone>::clone( + let output: Val<::bevy_ecs::entity::EntityRow> = <::bevy_ecs::entity::EntityRow as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -970,13 +1110,13 @@ pub(crate) fn register_identifier_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_ecs::identifier::Identifier>, - other: Ref<::bevy_ecs::identifier::Identifier>| + _self: Ref<::bevy_ecs::entity::EntityRow>, + other: Ref<::bevy_ecs::entity::EntityRow>| { let output: bool = { { - let output: bool = <::bevy_ecs::identifier::Identifier as ::core::cmp::PartialEq< - ::bevy_ecs::identifier::Identifier, + let output: bool = <::bevy_ecs::entity::EntityRow as ::core::cmp::PartialEq< + ::bevy_ecs::entity::EntityRow, >>::eq(&_self, &other) .into(); output @@ -988,12 +1128,12 @@ pub(crate) fn register_identifier_functions(world: &mut World) { &["_self", "other"], ) .register_documented( - "from_bits", - |value: u64| { - let output: Val<::bevy_ecs::identifier::Identifier> = { + "index", + |_self: Val<::bevy_ecs::entity::EntityRow>| { + let output: u32 = { { - let output: Val<::bevy_ecs::identifier::Identifier> = ::bevy_ecs::identifier::Identifier::from_bits( - value, + let output: u32 = ::bevy_ecs::entity::EntityRow::index( + _self.into_inner(), ) .into(); output @@ -1001,16 +1141,29 @@ pub(crate) fn register_identifier_functions(world: &mut World) { }; output }, - " Convert a `u64` into an [`Identifier`].\n # Panics\n This method will likely panic if given `u64` values that did not come from [`Identifier::to_bits`].", - &["value"], - ) + " Gets the index of the entity.", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ecs::entity::EntityRow, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_entity_generation_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ecs::entity::EntityGeneration, + >::new(world) .register_documented( - "low", - |_self: Val<::bevy_ecs::identifier::Identifier>| { - let output: u32 = { + "after_versions", + |_self: Val<::bevy_ecs::entity::EntityGeneration>, versions: u32| { + let output: Val<::bevy_ecs::entity::EntityGeneration> = { { - let output: u32 = ::bevy_ecs::identifier::Identifier::low( + let output: Val<::bevy_ecs::entity::EntityGeneration> = ::bevy_ecs::entity::EntityGeneration::after_versions( _self.into_inner(), + versions, ) .into(); output @@ -1018,16 +1171,33 @@ pub(crate) fn register_identifier_functions(world: &mut World) { }; output }, - " Returns the value of the low segment of the [`Identifier`].", + " Returns the [`EntityGeneration`] that would result from this many more `versions` of the corresponding [`EntityRow`] from passing.", + &["_self", "versions"], + ) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ecs::entity::EntityGeneration>| { + let output: () = { + { + let output: () = <::bevy_ecs::entity::EntityGeneration as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", &["_self"], ) .register_documented( - "masked_high", - |_self: Val<::bevy_ecs::identifier::Identifier>| { - let output: u32 = { + "clone", + |_self: Ref<::bevy_ecs::entity::EntityGeneration>| { + let output: Val<::bevy_ecs::entity::EntityGeneration> = { { - let output: u32 = ::bevy_ecs::identifier::Identifier::masked_high( - _self.into_inner(), + let output: Val<::bevy_ecs::entity::EntityGeneration> = <::bevy_ecs::entity::EntityGeneration as ::core::clone::Clone>::clone( + &_self, ) .into(); output @@ -1035,15 +1205,52 @@ pub(crate) fn register_identifier_functions(world: &mut World) { }; output }, - " Returns the masked value of the high segment of the [`Identifier`].\n Does not include the flag bits.", + "", &["_self"], ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ecs::entity::EntityGeneration>, + other: Ref<::bevy_ecs::entity::EntityGeneration>| + { + let output: bool = { + { + let output: bool = <::bevy_ecs::entity::EntityGeneration as ::core::cmp::PartialEq< + ::bevy_ecs::entity::EntityGeneration, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "from_bits", + |bits: u32| { + let output: Val<::bevy_ecs::entity::EntityGeneration> = { + { + let output: Val<::bevy_ecs::entity::EntityGeneration> = ::bevy_ecs::entity::EntityGeneration::from_bits( + bits, + ) + .into(); + output + } + }; + output + }, + " Reconstruct an [`EntityGeneration`] previously destructured with [`EntityGeneration::to_bits`].\n Only useful when applied to results from `to_bits` in the same instance of an application.", + &["bits"], + ) .register_documented( "to_bits", - |_self: Val<::bevy_ecs::identifier::Identifier>| { - let output: u64 = { + |_self: Val<::bevy_ecs::entity::EntityGeneration>| { + let output: u32 = { { - let output: u64 = ::bevy_ecs::identifier::Identifier::to_bits( + let output: u32 = ::bevy_ecs::entity::EntityGeneration::to_bits( _self.into_inner(), ) .into(); @@ -1052,14 +1259,14 @@ pub(crate) fn register_identifier_functions(world: &mut World) { }; output }, - " Convert the [`Identifier`] into a `u64`.", + " Gets some bits that represent this value.\n The bits are opaque and should not be regarded as meaningful.", &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ecs::identifier::Identifier, + ::bevy_ecs::entity::EntityGeneration, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -1067,22 +1274,23 @@ pub(crate) fn register_entity_hash_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_ecs::entity::EntityHash, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ecs::entity::EntityHash>| { - let output: Val<::bevy_ecs::entity::EntityHash> = { - { - let output: Val<::bevy_ecs::entity::EntityHash> = - <::bevy_ecs::entity::EntityHash as ::core::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_ecs::entity::EntityHash>| { + let output: Val<::bevy_ecs::entity::EntityHash> = { + { + let output: Val<::bevy_ecs::entity::EntityHash> = <::bevy_ecs::entity::EntityHash as ::core::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -1095,24 +1303,23 @@ pub(crate) fn register_disabled_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_ecs::entity_disabling::Disabled, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_ecs::entity_disabling::Disabled>| { - let output: Val<::bevy_ecs::entity_disabling::Disabled> = { - { - let output: Val<::bevy_ecs::entity_disabling::Disabled> = - <::bevy_ecs::entity_disabling::Disabled as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_ecs::entity_disabling::Disabled>| { + let output: Val<::bevy_ecs::entity_disabling::Disabled> = { + { + let output: Val<::bevy_ecs::entity_disabling::Disabled> = <::bevy_ecs::entity_disabling::Disabled as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -1121,18 +1328,16 @@ pub(crate) fn register_disabled_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_removed_component_entity_functions(world: &mut World) { +pub(crate) fn register_internal_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::removal_detection::RemovedComponentEntity, + ::bevy_ecs::entity_disabling::Internal, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_ecs::removal_detection::RemovedComponentEntity>| { - let output: Val<::bevy_ecs::removal_detection::RemovedComponentEntity> = { + |_self: Ref<::bevy_ecs::entity_disabling::Internal>| { + let output: Val<::bevy_ecs::entity_disabling::Internal> = { { - let output: Val< - ::bevy_ecs::removal_detection::RemovedComponentEntity, - > = <::bevy_ecs::removal_detection::RemovedComponentEntity as ::core::clone::Clone>::clone( + let output: Val<::bevy_ecs::entity_disabling::Internal> = <::bevy_ecs::entity_disabling::Internal as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1148,31 +1353,48 @@ pub(crate) fn register_removed_component_entity_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ecs::removal_detection::RemovedComponentEntity, + ::bevy_ecs::entity_disabling::Internal, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_system_id_marker_functions(world: &mut World) { +pub(crate) fn register_removed_component_entity_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::system::SystemIdMarker, - >::new(world); + ::bevy_ecs::lifecycle::RemovedComponentEntity, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ecs::lifecycle::RemovedComponentEntity>| { + let output: Val<::bevy_ecs::lifecycle::RemovedComponentEntity> = { + { + let output: Val<::bevy_ecs::lifecycle::RemovedComponentEntity> = <::bevy_ecs::lifecycle::RemovedComponentEntity 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::system::SystemIdMarker, + ::bevy_ecs::lifecycle::RemovedComponentEntity, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_on_despawn_functions(world: &mut World) { +pub(crate) fn register_observed_by_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_ecs::world::OnDespawn, + ::bevy_ecs::observer::ObservedBy, >::new(world); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_ecs::world::OnDespawn, + ::bevy_ecs::observer::ObservedBy, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -1182,21 +1404,23 @@ impl Plugin for BevyEcsScriptingPlugin { register_entity_functions(&mut world); register_child_of_functions(&mut world); register_children_functions(&mut world); + register_add_functions(&mut world); + register_despawn_functions(&mut world); + register_insert_functions(&mut world); + register_remove_functions(&mut world); + register_replace_functions(&mut world); register_name_functions(&mut world); - register_on_add_functions(&mut world); - register_on_insert_functions(&mut world); - register_on_remove_functions(&mut world); - register_on_replace_functions(&mut world); - register_component_id_functions(&mut world); register_default_query_filters_functions(&mut world); + register_component_id_functions(&mut world); register_tick_functions(&mut world); register_component_ticks_functions(&mut world); register_entity_hash_set_functions(&mut world); - register_identifier_functions(&mut world); + register_entity_row_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_system_id_marker_functions(&mut world); - register_on_despawn_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 32821e8dcd..33004e7c24 100644 --- a/crates/bindings/bevy_gizmos_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_gizmos_bms_bindings/Cargo.toml @@ -17,45 +17,47 @@ 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.16.1", features = [ - "bevy_pbr", - "bevy_core_pipeline", - "bevy_render", - "bevy_sprite", - "webgl", -], default-features = false } +bevy_gizmos = { version = "0.17.2", features = ["bevy_core_pipeline", "bevy_pbr", "bevy_render", "bevy_sprite_render", "webgl"], default-features = false} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.16.2", features = [], default-features = true } +bevy_camera = { version = "^0.17.2", features = [], default-features = true} -bevy_core_pipeline = { version = "^0.16.1", features = [ -], default-features = true } +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } +bevy_core_pipeline = { version = "^0.17.2", features = ["tonemapping_luts", "webgl"], default-features = true} -bevy_gizmos_macros = { version = "^0.16.1", features = [ -], default-features = true } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.16.1", features = [], default-features = true } +bevy_gizmos_macros = { version = "^0.17.2", features = [], default-features = true} -bevy_math = { version = "^0.16.1", features = [], default-features = true } +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_pbr = { version = "^0.16.1", features = [], default-features = true } +bevy_light = { version = "^0.17.2", features = ["webgl"], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_render = { version = "^0.16.1", features = [], default-features = true } +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} -bevy_sprite = { version = "^0.16.1", features = [], default-features = true } +bevy_pbr = { version = "^0.17.2", features = ["webgl"], default-features = true} -bevy_time = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +bevy_render = { version = "^0.17.2", features = ["multi_threaded", "webgl"], default-features = true} + +bevy_shader = { version = "^0.17.2", features = [], default-features = true} + +bevy_sprite_render = { version = "^0.17.2", features = ["bevy_text", "webgl"], default-features = true} + +bevy_time = { version = "^0.17.2", features = ["bevy_reflect", "std"], default-features = true} + +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} + +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} + +bytemuck = { version = "^1.0", features = [], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } -bytemuck = { version = "^1.0", features = [], default-features = true } diff --git a/crates/bindings/bevy_gizmos_bms_bindings/src/lib.rs b/crates/bindings/bevy_gizmos_bms_bindings/src/lib.rs index 4d5f5056f4..b56509a878 100644 --- a/crates/bindings/bevy_gizmos_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_gizmos_bms_bindings/src/lib.rs @@ -1,39 +1,41 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyGizmosScriptingPlugin; pub(crate) fn register_aabb_gizmo_config_group_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_gizmos::aabb::AabbGizmoConfigGroup, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_gizmos::aabb::AabbGizmoConfigGroup>| { - let output: Val<::bevy_gizmos::aabb::AabbGizmoConfigGroup> = { - { - let output: Val<::bevy_gizmos::aabb::AabbGizmoConfigGroup> = - <::bevy_gizmos::aabb::AabbGizmoConfigGroup as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_gizmos::aabb::AabbGizmoConfigGroup>| { + let output: Val<::bevy_gizmos::aabb::AabbGizmoConfigGroup> = { + { + let output: Val<::bevy_gizmos::aabb::AabbGizmoConfigGroup> = <::bevy_gizmos::aabb::AabbGizmoConfigGroup as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -70,22 +72,23 @@ pub(crate) fn register_gizmo_config_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_gizmos::config::GizmoConfig, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_gizmos::config::GizmoConfig>| { - let output: Val<::bevy_gizmos::config::GizmoConfig> = { - { - let output: Val<::bevy_gizmos::config::GizmoConfig> = - <::bevy_gizmos::config::GizmoConfig as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_gizmos::config::GizmoConfig>| { + let output: Val<::bevy_gizmos::config::GizmoConfig> = { + { + let output: Val<::bevy_gizmos::config::GizmoConfig> = <::bevy_gizmos::config::GizmoConfig as ::std::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -110,24 +113,23 @@ pub(crate) fn register_gizmo_line_config_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_gizmos::config::GizmoLineConfig, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_gizmos::config::GizmoLineConfig>| { - let output: Val<::bevy_gizmos::config::GizmoLineConfig> = { - { - let output: Val<::bevy_gizmos::config::GizmoLineConfig> = - <::bevy_gizmos::config::GizmoLineConfig as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_gizmos::config::GizmoLineConfig>| { + let output: Val<::bevy_gizmos::config::GizmoLineConfig> = { + { + let output: Val<::bevy_gizmos::config::GizmoLineConfig> = <::bevy_gizmos::config::GizmoLineConfig as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -206,43 +208,43 @@ pub(crate) fn register_gizmo_line_style_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_gizmos::config::GizmoLineStyle, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_gizmos::config::GizmoLineStyle>| { - let output: Val<::bevy_gizmos::config::GizmoLineStyle> = { - { - let output: Val<::bevy_gizmos::config::GizmoLineStyle> = - <::bevy_gizmos::config::GizmoLineStyle as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_gizmos::config::GizmoLineStyle>, - other: Ref<::bevy_gizmos::config::GizmoLineStyle>| { - let output: bool = { - { - let output: bool = - <::bevy_gizmos::config::GizmoLineStyle as ::std::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_gizmos::config::GizmoLineStyle>| { + let output: Val<::bevy_gizmos::config::GizmoLineStyle> = { + { + let output: Val<::bevy_gizmos::config::GizmoLineStyle> = <::bevy_gizmos::config::GizmoLineStyle as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_gizmos::config::GizmoLineStyle>, + other: Ref<::bevy_gizmos::config::GizmoLineStyle>| + { + let output: bool = { + { + let output: bool = <::bevy_gizmos::config::GizmoLineStyle as ::std::cmp::PartialEq< ::bevy_gizmos::config::GizmoLineStyle, >>::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 @@ -255,22 +257,23 @@ pub(crate) fn register_gizmo_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_gizmos::retained::Gizmo, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_gizmos::retained::Gizmo>| { - let output: Val<::bevy_gizmos::retained::Gizmo> = { - { - let output: Val<::bevy_gizmos::retained::Gizmo> = - <::bevy_gizmos::retained::Gizmo as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_gizmos::retained::Gizmo>| { + let output: Val<::bevy_gizmos::retained::Gizmo> = { + { + let output: Val<::bevy_gizmos::retained::Gizmo> = <::bevy_gizmos::retained::Gizmo as ::std::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -283,24 +286,23 @@ pub(crate) fn register_light_gizmo_color_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_gizmos::light::LightGizmoColor, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_gizmos::light::LightGizmoColor>| { - let output: Val<::bevy_gizmos::light::LightGizmoColor> = { - { - let output: Val<::bevy_gizmos::light::LightGizmoColor> = - <::bevy_gizmos::light::LightGizmoColor as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_gizmos::light::LightGizmoColor>| { + let output: Val<::bevy_gizmos::light::LightGizmoColor> = { + { + let output: Val<::bevy_gizmos::light::LightGizmoColor> = <::bevy_gizmos::light::LightGizmoColor as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry diff --git a/crates/bindings/bevy_gltf_bms_bindings/Cargo.toml b/crates/bindings/bevy_gltf_bms_bindings/Cargo.toml index b9a5767d11..f4f05b363d 100644 --- a/crates/bindings/bevy_gltf_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_gltf_bms_bindings/Cargo.toml @@ -17,54 +17,51 @@ 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.16.1", features = [ - "bevy_animation", -], default-features = true } +bevy_gltf = { version = "0.17.2", features = ["bevy_animation"], default-features = true} -base64 = { version = "^0.22.0", features = [], default-features = true } +base64 = { version = "^0.22.0", features = [], default-features = true} -bevy_animation = { version = "^0.16.1", features = [], default-features = true } +bevy_animation = { version = "^0.17.2", features = [], default-features = true} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.16.2", features = [], default-features = true } +bevy_camera = { version = "^0.17.2", features = [], default-features = true} -bevy_core_pipeline = { version = "^0.16.1", features = [ -], default-features = true } +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.16.1", features = [], default-features = true } +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.16.1", features = [], default-features = true } +bevy_light = { version = "^0.17.2", features = ["webgl"], default-features = true} -bevy_mesh = { version = "^0.16.1", features = [], default-features = true } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_pbr = { version = "^0.16.1", features = [], default-features = true } +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_pbr = { version = "^0.17.2", features = ["webgl"], default-features = true} -bevy_render = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_scene = { version = "^0.16.1", features = [], default-features = true } +bevy_render = { version = "^0.17.2", features = ["multi_threaded", "webgl"], default-features = true} -bevy_tasks = { version = "^0.16.1", features = [], default-features = true } +bevy_scene = { version = "^0.17.2", features = ["serialize"], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +bevy_tasks = { version = "^0.17.2", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -fixedbitset = { version = "^0.5", features = [], default-features = true } +fixedbitset = { version = "^0.5", features = [], default-features = true} -itertools = { version = "^0.14", features = [], default-features = true } +itertools = { version = "^0.14", features = [], default-features = true} -percent-encoding = { version = "^2.1", features = [], default-features = true } +percent-encoding = { version = "^2.1", features = [], default-features = true} -serde = { version = "^1.0", features = [], default-features = true } +serde = { version = "^1.0", features = [], default-features = true} + +serde_json = { version = "^1.0.140", features = [], default-features = true} -serde_json = { version = "^1.0.140", features = [], default-features = true } -smallvec = { version = "^1.11", features = [], default-features = true } diff --git a/crates/bindings/bevy_gltf_bms_bindings/src/lib.rs b/crates/bindings/bevy_gltf_bms_bindings/src/lib.rs index 3c4d746c5b..8fa50833ee 100644 --- a/crates/bindings/bevy_gltf_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_gltf_bms_bindings/src/lib.rs @@ -1,42 +1,46 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyGltfScriptingPlugin; pub(crate) fn register_gltf_extras_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_gltf::prelude::GltfExtras, + ::bevy_gltf::GltfExtras, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_gltf::prelude::GltfExtras>| { - let output: Val<::bevy_gltf::prelude::GltfExtras> = { - { - let output: Val<::bevy_gltf::prelude::GltfExtras> = - <::bevy_gltf::prelude::GltfExtras as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_gltf::GltfExtras>| { + let output: Val<::bevy_gltf::GltfExtras> = { + { + let output: Val<::bevy_gltf::GltfExtras> = <::bevy_gltf::GltfExtras as ::std::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_gltf::prelude::GltfExtras, + ::bevy_gltf::GltfExtras, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -44,21 +48,23 @@ pub(crate) fn register_gltf_scene_extras_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_gltf::GltfSceneExtras, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_gltf::GltfSceneExtras>| { - let output: Val<::bevy_gltf::GltfSceneExtras> = { - { - let output: Val<::bevy_gltf::GltfSceneExtras> = - <::bevy_gltf::GltfSceneExtras as ::std::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_gltf::GltfSceneExtras>| { + let output: Val<::bevy_gltf::GltfSceneExtras> = { + { + let output: Val<::bevy_gltf::GltfSceneExtras> = <::bevy_gltf::GltfSceneExtras as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -96,26 +102,56 @@ pub(crate) fn register_gltf_mesh_extras_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_gltf_mesh_name_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_gltf::GltfMeshName, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_gltf::GltfMeshName>| { + let output: Val<::bevy_gltf::GltfMeshName> = { + { + let output: Val<::bevy_gltf::GltfMeshName> = <::bevy_gltf::GltfMeshName 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_gltf::GltfMeshName, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_gltf_material_extras_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_gltf::GltfMaterialExtras, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_gltf::GltfMaterialExtras>| { - let output: Val<::bevy_gltf::GltfMaterialExtras> = { - { - let output: Val<::bevy_gltf::GltfMaterialExtras> = - <::bevy_gltf::GltfMaterialExtras as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_gltf::GltfMaterialExtras>| { + let output: Val<::bevy_gltf::GltfMaterialExtras> = { + { + let output: Val<::bevy_gltf::GltfMaterialExtras> = <::bevy_gltf::GltfMaterialExtras as ::std::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -128,22 +164,23 @@ pub(crate) fn register_gltf_material_name_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_gltf::GltfMaterialName, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_gltf::GltfMaterialName>| { - let output: Val<::bevy_gltf::GltfMaterialName> = { - { - let output: Val<::bevy_gltf::GltfMaterialName> = - <::bevy_gltf::GltfMaterialName as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_gltf::GltfMaterialName>| { + let output: Val<::bevy_gltf::GltfMaterialName> = { + { + let output: Val<::bevy_gltf::GltfMaterialName> = <::bevy_gltf::GltfMaterialName as ::std::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -158,6 +195,7 @@ impl Plugin for BevyGltfScriptingPlugin { register_gltf_extras_functions(&mut world); register_gltf_scene_extras_functions(&mut world); register_gltf_mesh_extras_functions(&mut world); + register_gltf_mesh_name_functions(&mut world); register_gltf_material_extras_functions(&mut world); register_gltf_material_name_functions(&mut world); } diff --git a/crates/bindings/bevy_image_bms_bindings/Cargo.toml b/crates/bindings/bevy_image_bms_bindings/Cargo.toml index c8e3120e66..95aac2a446 100644 --- a/crates/bindings/bevy_image_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_image_bms_bindings/Cargo.toml @@ -17,49 +17,39 @@ 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.16.1", features = [ - "bevy_reflect", - "hdr", - "ktx2", - "png", - "ruzstd", - "zstd", -], default-features = true } +bevy_image = { version = "0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.16.2", features = [], default-features = true } +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_math = { version = "^0.16.1", features = [ - "bevy_reflect", -], default-features = false } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} -bitflags = { version = "^2.3", features = [], default-features = true } +bitflags = { version = "^2.3", features = [], default-features = true} -bytemuck = { version = "^1.5", features = [], default-features = true } +bytemuck = { version = "^1.5", features = [], default-features = true} -futures-lite = { version = "^2.0.1", features = [], default-features = true } +futures-lite = { version = "^2.0.1", features = [], default-features = true} -guillotiere = { version = "^0.6.0", features = [], default-features = true } +guillotiere = { version = "^0.6.0", features = [], default-features = true} -half = { version = "^2.4.1", features = [], default-features = true } +half = { version = "^2.4.1", features = [], default-features = true} -image = { version = "^0.25.2", features = [ - "hdr", - "png", -], default-features = false } +image = { version = "^0.25.2", features = ["hdr", "png"], default-features = false} -ktx2 = { version = "^0.3.0", features = [], default-features = true } +ktx2 = { version = "^0.4.0", features = [], default-features = true} -rectangle-pack = { version = "^0.4", features = [], default-features = true } +rectangle-pack = { version = "^0.4", features = [], default-features = true} + +ruzstd = { version = "^0.8.0", features = [], default-features = true} + +serde = { version = "^1", features = [], default-features = true} -ruzstd = { version = "^0.8.0", features = [], default-features = true } -serde = { version = "^1", 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 252a5e1c98..db93a339b6 100644 --- a/crates/bindings/bevy_image_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_image_bms_bindings/src/lib.rs @@ -1,27 +1,30 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyImageScriptingPlugin; pub(crate) fn register_texture_atlas_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_image::prelude::TextureAtlas, + ::bevy_image::TextureAtlas, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_image::prelude::TextureAtlas>| { + |_self: Ref<::bevy_image::TextureAtlas>| { let output: () = { { - let output: () = <::bevy_image::prelude::TextureAtlas as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_image::TextureAtlas as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -35,10 +38,10 @@ pub(crate) fn register_texture_atlas_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_image::prelude::TextureAtlas>| { - let output: Val<::bevy_image::prelude::TextureAtlas> = { + |_self: Ref<::bevy_image::TextureAtlas>| { + let output: Val<::bevy_image::TextureAtlas> = { { - let output: Val<::bevy_image::prelude::TextureAtlas> = <::bevy_image::prelude::TextureAtlas as ::std::clone::Clone>::clone( + let output: Val<::bevy_image::TextureAtlas> = <::bevy_image::TextureAtlas as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -53,13 +56,13 @@ pub(crate) fn register_texture_atlas_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_image::prelude::TextureAtlas>, - other: Ref<::bevy_image::prelude::TextureAtlas>| + _self: Ref<::bevy_image::TextureAtlas>, + other: Ref<::bevy_image::TextureAtlas>| { let output: bool = { { - let output: bool = <::bevy_image::prelude::TextureAtlas as ::std::cmp::PartialEq< - ::bevy_image::prelude::TextureAtlas, + let output: bool = <::bevy_image::TextureAtlas as ::std::cmp::PartialEq< + ::bevy_image::TextureAtlas, >>::eq(&_self, &other) .into(); output @@ -69,28 +72,46 @@ pub(crate) fn register_texture_atlas_functions(world: &mut World) { }, "", &["_self", "other"], + ) + .register_documented( + "with_index", + |_self: Val<::bevy_image::TextureAtlas>, index: usize| { + let output: Val<::bevy_image::TextureAtlas> = { + { + let output: Val<::bevy_image::TextureAtlas> = ::bevy_image::TextureAtlas::with_index( + _self.into_inner(), + index, + ) + .into(); + output + } + }; + output + }, + " Returns this [`TextureAtlas`] with the specified index.", + &["_self", "index"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_image::prelude::TextureAtlas, + ::bevy_image::TextureAtlas, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_texture_atlas_layout_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_image::prelude::TextureAtlasLayout, + ::bevy_image::TextureAtlasLayout, >::new(world) .register_documented( "add_texture", | - mut _self: Mut<::bevy_image::prelude::TextureAtlasLayout>, + mut _self: Mut<::bevy_image::TextureAtlasLayout>, rect: Val<::bevy_math::URect>| { let output: usize = { { - let output: usize = ::bevy_image::prelude::TextureAtlasLayout::add_texture( + let output: usize = ::bevy_image::TextureAtlasLayout::add_texture( &mut _self, rect.into_inner(), ) @@ -105,10 +126,10 @@ pub(crate) fn register_texture_atlas_layout_functions(world: &mut World) { ) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_image::prelude::TextureAtlasLayout>| { + |_self: Ref<::bevy_image::TextureAtlasLayout>| { let output: () = { { - let output: () = <::bevy_image::prelude::TextureAtlasLayout as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_image::TextureAtlasLayout as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -122,10 +143,10 @@ pub(crate) fn register_texture_atlas_layout_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_image::prelude::TextureAtlasLayout>| { - let output: Val<::bevy_image::prelude::TextureAtlasLayout> = { + |_self: Ref<::bevy_image::TextureAtlasLayout>| { + let output: Val<::bevy_image::TextureAtlasLayout> = { { - let output: Val<::bevy_image::prelude::TextureAtlasLayout> = <::bevy_image::prelude::TextureAtlasLayout as ::std::clone::Clone>::clone( + let output: Val<::bevy_image::TextureAtlasLayout> = <::bevy_image::TextureAtlasLayout as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -140,13 +161,13 @@ pub(crate) fn register_texture_atlas_layout_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_image::prelude::TextureAtlasLayout>, - other: Ref<::bevy_image::prelude::TextureAtlasLayout>| + _self: Ref<::bevy_image::TextureAtlasLayout>, + other: Ref<::bevy_image::TextureAtlasLayout>| { let output: bool = { { - let output: bool = <::bevy_image::prelude::TextureAtlasLayout as ::std::cmp::PartialEq< - ::bevy_image::prelude::TextureAtlasLayout, + let output: bool = <::bevy_image::TextureAtlasLayout as ::std::cmp::PartialEq< + ::bevy_image::TextureAtlasLayout, >>::eq(&_self, &other) .into(); output @@ -159,10 +180,10 @@ pub(crate) fn register_texture_atlas_layout_functions(world: &mut World) { ) .register_documented( "is_empty", - |_self: Ref<::bevy_image::prelude::TextureAtlasLayout>| { + |_self: Ref<::bevy_image::TextureAtlasLayout>| { let output: bool = { { - let output: bool = ::bevy_image::prelude::TextureAtlasLayout::is_empty( + let output: bool = ::bevy_image::TextureAtlasLayout::is_empty( &_self, ) .into(); @@ -176,12 +197,10 @@ pub(crate) fn register_texture_atlas_layout_functions(world: &mut World) { ) .register_documented( "len", - |_self: Ref<::bevy_image::prelude::TextureAtlasLayout>| { + |_self: Ref<::bevy_image::TextureAtlasLayout>| { let output: usize = { { - let output: usize = ::bevy_image::prelude::TextureAtlasLayout::len( - &_self, - ) + let output: usize = ::bevy_image::TextureAtlasLayout::len(&_self) .into(); output } @@ -193,10 +212,10 @@ pub(crate) fn register_texture_atlas_layout_functions(world: &mut World) { ) .register_documented( "new_empty", - |dimensions: Val<::bevy_math::UVec2>| { - let output: Val<::bevy_image::prelude::TextureAtlasLayout> = { + |dimensions: Val<::glam::UVec2>| { + let output: Val<::bevy_image::TextureAtlasLayout> = { { - let output: Val<::bevy_image::prelude::TextureAtlasLayout> = ::bevy_image::prelude::TextureAtlasLayout::new_empty( + let output: Val<::bevy_image::TextureAtlasLayout> = ::bevy_image::TextureAtlasLayout::new_empty( dimensions.into_inner(), ) .into(); @@ -212,20 +231,20 @@ pub(crate) fn register_texture_atlas_layout_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_image::prelude::TextureAtlasLayout, + ::bevy_image::TextureAtlasLayout, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_image_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_image::prelude::Image, + ::bevy_image::Image, >::new(world) .register_documented( "aspect_ratio", - |_self: Ref<::bevy_image::prelude::Image>| { + |_self: Ref<::bevy_image::Image>| { let output: Val<::bevy_math::AspectRatio> = { { - let output: Val<::bevy_math::AspectRatio> = ::bevy_image::prelude::Image::aspect_ratio( + let output: Val<::bevy_math::AspectRatio> = ::bevy_image::Image::aspect_ratio( &_self, ) .into(); @@ -239,10 +258,10 @@ pub(crate) fn register_image_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_image::prelude::Image>| { - let output: Val<::bevy_image::prelude::Image> = { + |_self: Ref<::bevy_image::Image>| { + let output: Val<::bevy_image::Image> = { { - let output: Val<::bevy_image::prelude::Image> = <::bevy_image::prelude::Image as ::std::clone::Clone>::clone( + let output: Val<::bevy_image::Image> = <::bevy_image::Image as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -257,9 +276,9 @@ pub(crate) fn register_image_functions(world: &mut World) { .register_documented( "default_uninit", || { - let output: Val<::bevy_image::prelude::Image> = { + let output: Val<::bevy_image::Image> = { { - let output: Val<::bevy_image::prelude::Image> = ::bevy_image::prelude::Image::default_uninit() + let output: Val<::bevy_image::Image> = ::bevy_image::Image::default_uninit() .into(); output } @@ -269,13 +288,29 @@ pub(crate) fn register_image_functions(world: &mut World) { " Creates a new uninitialized 1x1x1 image", &[], ) + .register_documented( + "eq", + |_self: Ref<::bevy_image::Image>, other: Ref<::bevy_image::Image>| { + let output: bool = { + { + let output: bool = <::bevy_image::Image as ::std::cmp::PartialEq< + ::bevy_image::Image, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) .register_documented( "height", - |_self: Ref<::bevy_image::prelude::Image>| { + |_self: Ref<::bevy_image::Image>| { let output: u32 = { { - let output: u32 = ::bevy_image::prelude::Image::height(&_self) - .into(); + let output: u32 = ::bevy_image::Image::height(&_self).into(); output } }; @@ -286,12 +321,10 @@ pub(crate) fn register_image_functions(world: &mut World) { ) .register_documented( "is_compressed", - |_self: Ref<::bevy_image::prelude::Image>| { + |_self: Ref<::bevy_image::Image>| { let output: bool = { { - let output: bool = ::bevy_image::prelude::Image::is_compressed( - &_self, - ) + let output: bool = ::bevy_image::Image::is_compressed(&_self) .into(); output } @@ -303,10 +336,10 @@ pub(crate) fn register_image_functions(world: &mut World) { ) .register_documented( "pixel_data_offset", - |_self: Ref<::bevy_image::prelude::Image>, coords: Val<::bevy_math::UVec3>| { + |_self: Ref<::bevy_image::Image>, coords: Val<::glam::UVec3>| { let output: ::std::option::Option = { { - let output: ::std::option::Option = ::bevy_image::prelude::Image::pixel_data_offset( + let output: ::std::option::Option = ::bevy_image::Image::pixel_data_offset( &_self, coords.into_inner(), ) @@ -321,10 +354,10 @@ pub(crate) fn register_image_functions(world: &mut World) { ) .register_documented( "reinterpret_stacked_2d_as_array", - |mut _self: Mut<::bevy_image::prelude::Image>, layers: u32| { + |mut _self: Mut<::bevy_image::Image>, layers: u32| { let output: () = { { - let output: () = ::bevy_image::prelude::Image::reinterpret_stacked_2d_as_array( + let output: () = ::bevy_image::Image::reinterpret_stacked_2d_as_array( &mut _self, layers, ) @@ -339,10 +372,10 @@ pub(crate) fn register_image_functions(world: &mut World) { ) .register_documented( "size", - |_self: Ref<::bevy_image::prelude::Image>| { - let output: Val<::bevy_math::UVec2> = { + |_self: Ref<::bevy_image::Image>| { + let output: Val<::glam::UVec2> = { { - let output: Val<::bevy_math::UVec2> = ::bevy_image::prelude::Image::size( + let output: Val<::glam::UVec2> = ::bevy_image::Image::size( &_self, ) .into(); @@ -356,10 +389,10 @@ pub(crate) fn register_image_functions(world: &mut World) { ) .register_documented( "size_f32", - |_self: Ref<::bevy_image::prelude::Image>| { - let output: Val<::bevy_math::Vec2> = { + |_self: Ref<::bevy_image::Image>| { + let output: Val<::glam::Vec2> = { { - let output: Val<::bevy_math::Vec2> = ::bevy_image::prelude::Image::size_f32( + let output: Val<::glam::Vec2> = ::bevy_image::Image::size_f32( &_self, ) .into(); @@ -374,9 +407,9 @@ pub(crate) fn register_image_functions(world: &mut World) { .register_documented( "transparent", || { - let output: Val<::bevy_image::prelude::Image> = { + let output: Val<::bevy_image::Image> = { { - let output: Val<::bevy_image::prelude::Image> = ::bevy_image::prelude::Image::transparent() + let output: Val<::bevy_image::Image> = ::bevy_image::Image::transparent() .into(); output } @@ -388,11 +421,10 @@ pub(crate) fn register_image_functions(world: &mut World) { ) .register_documented( "width", - |_self: Ref<::bevy_image::prelude::Image>| { + |_self: Ref<::bevy_image::Image>| { let output: u32 = { { - let output: u32 = ::bevy_image::prelude::Image::width(&_self) - .into(); + let output: u32 = ::bevy_image::Image::width(&_self).into(); output } }; @@ -405,7 +437,7 @@ pub(crate) fn register_image_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_image::prelude::Image, + ::bevy_image::Image, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } diff --git a/crates/bindings/bevy_input_bms_bindings/Cargo.toml b/crates/bindings/bevy_input_bms_bindings/Cargo.toml index 7f79eb62a0..e4ab536a48 100644 --- a/crates/bindings/bevy_input_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_input_bms_bindings/Cargo.toml @@ -17,38 +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.16.1", features = [ - "std", - "bevy_reflect", - "smol_str", -], default-features = true } - - -bevy_app = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } - -bevy_ecs = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", - "async_executor", -], default-features = false } - -bevy_math = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } - -bevy_platform = { version = "^0.16.1", features = [ - "std", -], default-features = false } - -bevy_reflect = { version = "^0.16.1", features = [ - "std", - "smol_str", -], default-features = false } - -bevy_utils = { version = "^0.16.1", features = [ - "std", -], default-features = false } +bevy_input = { version = "0.17.2", features = ["bevy_reflect", "smol_str", "std"], default-features = true} + + +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} + +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} + +bevy_platform = { version = "^0.17.2", features = ["alloc", "serialize", "std"], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} + + diff --git a/crates/bindings/bevy_input_bms_bindings/src/lib.rs b/crates/bindings/bevy_input_bms_bindings/src/lib.rs index 786041ec21..36947c4ba8 100644 --- a/crates/bindings/bevy_input_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_input_bms_bindings/src/lib.rs @@ -1,15 +1,18 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyInputScriptingPlugin; pub(crate) fn register_gamepad_functions(world: &mut World) { @@ -19,9 +22,9 @@ pub(crate) fn register_gamepad_functions(world: &mut World) { .register_documented( "dpad", |_self: Ref<::bevy_input::gamepad::Gamepad>| { - let output: Val<::bevy_math::Vec2> = { + let output: Val<::glam::Vec2> = { { - let output: Val<::bevy_math::Vec2> = ::bevy_input::gamepad::Gamepad::dpad( + let output: Val<::glam::Vec2> = ::bevy_input::gamepad::Gamepad::dpad( &_self, ) .into(); @@ -78,9 +81,9 @@ pub(crate) fn register_gamepad_functions(world: &mut World) { .register_documented( "left_stick", |_self: Ref<::bevy_input::gamepad::Gamepad>| { - let output: Val<::bevy_math::Vec2> = { + let output: Val<::glam::Vec2> = { { - let output: Val<::bevy_math::Vec2> = ::bevy_input::gamepad::Gamepad::left_stick( + let output: Val<::glam::Vec2> = ::bevy_input::gamepad::Gamepad::left_stick( &_self, ) .into(); @@ -133,9 +136,9 @@ pub(crate) fn register_gamepad_functions(world: &mut World) { .register_documented( "right_stick", |_self: Ref<::bevy_input::gamepad::Gamepad>| { - let output: Val<::bevy_math::Vec2> = { + let output: Val<::glam::Vec2> = { { - let output: Val<::bevy_math::Vec2> = ::bevy_input::gamepad::Gamepad::right_stick( + let output: Val<::glam::Vec2> = ::bevy_input::gamepad::Gamepad::right_stick( &_self, ) .into(); @@ -308,24 +311,23 @@ pub(crate) fn register_gamepad_settings_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::gamepad::GamepadSettings, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::gamepad::GamepadSettings>| { - let output: Val<::bevy_input::gamepad::GamepadSettings> = { - { - let output: Val<::bevy_input::gamepad::GamepadSettings> = - <::bevy_input::gamepad::GamepadSettings as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_input::gamepad::GamepadSettings>| { + let output: Val<::bevy_input::gamepad::GamepadSettings> = { + { + let output: Val<::bevy_input::gamepad::GamepadSettings> = <::bevy_input::gamepad::GamepadSettings as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -470,41 +472,43 @@ pub(crate) fn register_touch_input_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::touch::TouchInput, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::touch::TouchInput>| { - let output: Val<::bevy_input::touch::TouchInput> = { - { - let output: Val<::bevy_input::touch::TouchInput> = - <::bevy_input::touch::TouchInput as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::touch::TouchInput>, - other: Ref<::bevy_input::touch::TouchInput>| { - let output: bool = { - { - let output: bool = - <::bevy_input::touch::TouchInput as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_input::touch::TouchInput>| { + let output: Val<::bevy_input::touch::TouchInput> = { + { + let output: Val<::bevy_input::touch::TouchInput> = <::bevy_input::touch::TouchInput as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::touch::TouchInput>, + other: Ref<::bevy_input::touch::TouchInput>| + { + let output: bool = { + { + let output: bool = <::bevy_input::touch::TouchInput as ::core::cmp::PartialEq< ::bevy_input::touch::TouchInput, >>::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 @@ -513,6 +517,72 @@ pub(crate) fn register_touch_input_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_key_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_input::keyboard::Key, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_input::keyboard::Key>| { + let output: () = { + { + let output: () = <::bevy_input::keyboard::Key as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_input::keyboard::Key>| { + let output: Val<::bevy_input::keyboard::Key> = { + { + let output: Val<::bevy_input::keyboard::Key> = <::bevy_input::keyboard::Key as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::keyboard::Key>, + other: Ref<::bevy_input::keyboard::Key>| + { + let output: bool = { + { + let output: bool = <::bevy_input::keyboard::Key as ::core::cmp::PartialEq< + ::bevy_input::keyboard::Key, + >>::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::keyboard::Key, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_keyboard_focus_lost_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::keyboard::KeyboardFocusLost, @@ -813,41 +883,43 @@ pub(crate) fn register_mouse_motion_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::mouse::MouseMotion, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::mouse::MouseMotion>| { - let output: Val<::bevy_input::mouse::MouseMotion> = { - { - let output: Val<::bevy_input::mouse::MouseMotion> = - <::bevy_input::mouse::MouseMotion as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::mouse::MouseMotion>, - other: Ref<::bevy_input::mouse::MouseMotion>| { - let output: bool = { - { - let output: bool = - <::bevy_input::mouse::MouseMotion as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_input::mouse::MouseMotion>| { + let output: Val<::bevy_input::mouse::MouseMotion> = { + { + let output: Val<::bevy_input::mouse::MouseMotion> = <::bevy_input::mouse::MouseMotion as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::mouse::MouseMotion>, + other: Ref<::bevy_input::mouse::MouseMotion>| + { + let output: bool = { + { + let output: bool = <::bevy_input::mouse::MouseMotion as ::core::cmp::PartialEq< ::bevy_input::mouse::MouseMotion, >>::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 @@ -860,41 +932,43 @@ pub(crate) fn register_mouse_wheel_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::mouse::MouseWheel, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::mouse::MouseWheel>| { - let output: Val<::bevy_input::mouse::MouseWheel> = { - { - let output: Val<::bevy_input::mouse::MouseWheel> = - <::bevy_input::mouse::MouseWheel as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::mouse::MouseWheel>, - other: Ref<::bevy_input::mouse::MouseWheel>| { - let output: bool = { - { - let output: bool = - <::bevy_input::mouse::MouseWheel as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_input::mouse::MouseWheel>| { + let output: Val<::bevy_input::mouse::MouseWheel> = { + { + let output: Val<::bevy_input::mouse::MouseWheel> = <::bevy_input::mouse::MouseWheel as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::mouse::MouseWheel>, + other: Ref<::bevy_input::mouse::MouseWheel>| + { + let output: bool = { + { + let output: bool = <::bevy_input::mouse::MouseWheel as ::core::cmp::PartialEq< ::bevy_input::mouse::MouseWheel, >>::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 @@ -1150,55 +1224,6 @@ pub(crate) fn register_gamepad_button_state_changed_event_functions(world: &mut bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_gamepad_connection_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_input::gamepad::GamepadConnection, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::gamepad::GamepadConnection>| { - let output: Val<::bevy_input::gamepad::GamepadConnection> = { - { - let output: Val<::bevy_input::gamepad::GamepadConnection> = - <::bevy_input::gamepad::GamepadConnection as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::gamepad::GamepadConnection>, - other: Ref<::bevy_input::gamepad::GamepadConnection>| { - let output: bool = { - { - let output: bool = - <::bevy_input::gamepad::GamepadConnection as ::core::cmp::PartialEq< - ::bevy_input::gamepad::GamepadConnection, - >>::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::gamepad::GamepadConnection, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} pub(crate) fn register_gamepad_connection_event_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::gamepad::GamepadConnectionEvent, @@ -1307,78 +1332,12 @@ pub(crate) fn register_gamepad_event_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::gamepad::GamepadEvent, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::gamepad::GamepadEvent>| { - let output: Val<::bevy_input::gamepad::GamepadEvent> = { - { - let output: Val<::bevy_input::gamepad::GamepadEvent> = - <::bevy_input::gamepad::GamepadEvent as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::gamepad::GamepadEvent>, - other: Ref<::bevy_input::gamepad::GamepadEvent>| { - let output: bool = { - { - let output: bool = - <::bevy_input::gamepad::GamepadEvent as ::core::cmp::PartialEq< - ::bevy_input::gamepad::GamepadEvent, - >>::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::gamepad::GamepadEvent, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_gamepad_input_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_input::gamepad::GamepadInput, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_input::gamepad::GamepadInput>| { - let output: () = { - { - let output: () = <::bevy_input::gamepad::GamepadInput as ::core::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) .register_documented( "clone", - |_self: Ref<::bevy_input::gamepad::GamepadInput>| { - let output: Val<::bevy_input::gamepad::GamepadInput> = { + |_self: Ref<::bevy_input::gamepad::GamepadEvent>| { + let output: Val<::bevy_input::gamepad::GamepadEvent> = { { - let output: Val<::bevy_input::gamepad::GamepadInput> = <::bevy_input::gamepad::GamepadInput as ::core::clone::Clone>::clone( + let output: Val<::bevy_input::gamepad::GamepadEvent> = <::bevy_input::gamepad::GamepadEvent as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1393,13 +1352,13 @@ pub(crate) fn register_gamepad_input_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_input::gamepad::GamepadInput>, - other: Ref<::bevy_input::gamepad::GamepadInput>| + _self: Ref<::bevy_input::gamepad::GamepadEvent>, + other: Ref<::bevy_input::gamepad::GamepadEvent>| { let output: bool = { { - let output: bool = <::bevy_input::gamepad::GamepadInput as ::core::cmp::PartialEq< - ::bevy_input::gamepad::GamepadInput, + let output: bool = <::bevy_input::gamepad::GamepadEvent as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadEvent, >>::eq(&_self, &other) .into(); output @@ -1414,7 +1373,7 @@ pub(crate) fn register_gamepad_input_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_input::gamepad::GamepadInput, + ::bevy_input::gamepad::GamepadEvent, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -1620,92 +1579,92 @@ pub(crate) fn register_raw_gamepad_event_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::gamepad::RawGamepadEvent, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::gamepad::RawGamepadEvent>| { - let output: Val<::bevy_input::gamepad::RawGamepadEvent> = { - { - let output: Val<::bevy_input::gamepad::RawGamepadEvent> = - <::bevy_input::gamepad::RawGamepadEvent as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::gamepad::RawGamepadEvent>, - other: Ref<::bevy_input::gamepad::RawGamepadEvent>| { - let output: bool = { - { - let output: bool = - <::bevy_input::gamepad::RawGamepadEvent as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_input::gamepad::RawGamepadEvent>| { + let output: Val<::bevy_input::gamepad::RawGamepadEvent> = { + { + let output: Val<::bevy_input::gamepad::RawGamepadEvent> = <::bevy_input::gamepad::RawGamepadEvent as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::gamepad::RawGamepadEvent>, + other: Ref<::bevy_input::gamepad::RawGamepadEvent>| + { + let output: bool = { + { + let output: bool = <::bevy_input::gamepad::RawGamepadEvent as ::core::cmp::PartialEq< ::bevy_input::gamepad::RawGamepadEvent, >>::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::gamepad::RawGamepadEvent, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_input::gamepad::RawGamepadEvent, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } pub(crate) fn register_pinch_gesture_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::gestures::PinchGesture, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::gestures::PinchGesture>| { - let output: Val<::bevy_input::gestures::PinchGesture> = { - { - let output: Val<::bevy_input::gestures::PinchGesture> = - <::bevy_input::gestures::PinchGesture as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::gestures::PinchGesture>, - other: Ref<::bevy_input::gestures::PinchGesture>| { - let output: bool = { - { - let output: bool = - <::bevy_input::gestures::PinchGesture as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_input::gestures::PinchGesture>| { + let output: Val<::bevy_input::gestures::PinchGesture> = { + { + let output: Val<::bevy_input::gestures::PinchGesture> = <::bevy_input::gestures::PinchGesture as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::gestures::PinchGesture>, + other: Ref<::bevy_input::gestures::PinchGesture>| + { + let output: bool = { + { + let output: bool = <::bevy_input::gestures::PinchGesture as ::core::cmp::PartialEq< ::bevy_input::gestures::PinchGesture, >>::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 @@ -1718,43 +1677,43 @@ pub(crate) fn register_rotation_gesture_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::gestures::RotationGesture, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::gestures::RotationGesture>| { - let output: Val<::bevy_input::gestures::RotationGesture> = { - { - let output: Val<::bevy_input::gestures::RotationGesture> = - <::bevy_input::gestures::RotationGesture as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::gestures::RotationGesture>, - other: Ref<::bevy_input::gestures::RotationGesture>| { - let output: bool = { - { - let output: bool = - <::bevy_input::gestures::RotationGesture as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_input::gestures::RotationGesture>| { + let output: Val<::bevy_input::gestures::RotationGesture> = { + { + let output: Val<::bevy_input::gestures::RotationGesture> = <::bevy_input::gestures::RotationGesture as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::gestures::RotationGesture>, + other: Ref<::bevy_input::gestures::RotationGesture>| + { + let output: bool = { + { + let output: bool = <::bevy_input::gestures::RotationGesture as ::core::cmp::PartialEq< ::bevy_input::gestures::RotationGesture, >>::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 @@ -1767,43 +1726,43 @@ pub(crate) fn register_double_tap_gesture_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::gestures::DoubleTapGesture, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::gestures::DoubleTapGesture>| { - let output: Val<::bevy_input::gestures::DoubleTapGesture> = { - { - let output: Val<::bevy_input::gestures::DoubleTapGesture> = - <::bevy_input::gestures::DoubleTapGesture as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::gestures::DoubleTapGesture>, - other: Ref<::bevy_input::gestures::DoubleTapGesture>| { - let output: bool = { - { - let output: bool = - <::bevy_input::gestures::DoubleTapGesture as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_input::gestures::DoubleTapGesture>| { + let output: Val<::bevy_input::gestures::DoubleTapGesture> = { + { + let output: Val<::bevy_input::gestures::DoubleTapGesture> = <::bevy_input::gestures::DoubleTapGesture as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::gestures::DoubleTapGesture>, + other: Ref<::bevy_input::gestures::DoubleTapGesture>| + { + let output: bool = { + { + let output: bool = <::bevy_input::gestures::DoubleTapGesture as ::core::cmp::PartialEq< ::bevy_input::gestures::DoubleTapGesture, >>::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 @@ -1816,41 +1775,43 @@ pub(crate) fn register_pan_gesture_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::gestures::PanGesture, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::gestures::PanGesture>| { - let output: Val<::bevy_input::gestures::PanGesture> = { - { - let output: Val<::bevy_input::gestures::PanGesture> = - <::bevy_input::gestures::PanGesture as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::gestures::PanGesture>, - other: Ref<::bevy_input::gestures::PanGesture>| { - let output: bool = { - { - let output: bool = - <::bevy_input::gestures::PanGesture as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_input::gestures::PanGesture>| { + let output: Val<::bevy_input::gestures::PanGesture> = { + { + let output: Val<::bevy_input::gestures::PanGesture> = <::bevy_input::gestures::PanGesture as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::gestures::PanGesture>, + other: Ref<::bevy_input::gestures::PanGesture>| + { + let output: bool = { + { + let output: bool = <::bevy_input::gestures::PanGesture as ::core::cmp::PartialEq< ::bevy_input::gestures::PanGesture, >>::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 @@ -1940,6 +1901,121 @@ pub(crate) fn register_button_state_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_gamepad_connection_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_input::gamepad::GamepadConnection, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_input::gamepad::GamepadConnection>| { + let output: Val<::bevy_input::gamepad::GamepadConnection> = { + { + let output: Val<::bevy_input::gamepad::GamepadConnection> = <::bevy_input::gamepad::GamepadConnection as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::gamepad::GamepadConnection>, + other: Ref<::bevy_input::gamepad::GamepadConnection>| + { + let output: bool = { + { + let output: bool = <::bevy_input::gamepad::GamepadConnection as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadConnection, + >>::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::gamepad::GamepadConnection, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_gamepad_input_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_input::gamepad::GamepadInput, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_input::gamepad::GamepadInput>| { + let output: () = { + { + let output: () = <::bevy_input::gamepad::GamepadInput as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_input::gamepad::GamepadInput>| { + let output: Val<::bevy_input::gamepad::GamepadInput> = { + { + let output: Val<::bevy_input::gamepad::GamepadInput> = <::bevy_input::gamepad::GamepadInput as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::gamepad::GamepadInput>, + other: Ref<::bevy_input::gamepad::GamepadInput>| + { + let output: bool = { + { + let output: bool = <::bevy_input::gamepad::GamepadInput as ::core::cmp::PartialEq< + ::bevy_input::gamepad::GamepadInput, + >>::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::gamepad::GamepadInput, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_button_settings_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::gamepad::ButtonSettings, @@ -2341,24 +2417,23 @@ pub(crate) fn register_button_axis_settings_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::gamepad::ButtonAxisSettings, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::gamepad::ButtonAxisSettings>| { - let output: Val<::bevy_input::gamepad::ButtonAxisSettings> = { - { - let output: Val<::bevy_input::gamepad::ButtonAxisSettings> = - <::bevy_input::gamepad::ButtonAxisSettings as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_input::gamepad::ButtonAxisSettings>| { + let output: Val<::bevy_input::gamepad::ButtonAxisSettings> = { + { + let output: Val<::bevy_input::gamepad::ButtonAxisSettings> = <::bevy_input::gamepad::ButtonAxisSettings as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -2450,72 +2525,6 @@ pub(crate) fn register_gamepad_rumble_intensity_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_key_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_input::keyboard::Key, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_input::keyboard::Key>| { - let output: () = { - { - let output: () = <::bevy_input::keyboard::Key as ::core::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_input::keyboard::Key>| { - let output: Val<::bevy_input::keyboard::Key> = { - { - let output: Val<::bevy_input::keyboard::Key> = <::bevy_input::keyboard::Key as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_input::keyboard::Key>, - other: Ref<::bevy_input::keyboard::Key>| - { - let output: bool = { - { - let output: bool = <::bevy_input::keyboard::Key as ::core::cmp::PartialEq< - ::bevy_input::keyboard::Key, - >>::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::keyboard::Key, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} pub(crate) fn register_native_key_code_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::keyboard::NativeKeyCode, @@ -2784,41 +2793,43 @@ pub(crate) fn register_force_touch_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input::touch::ForceTouch, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input::touch::ForceTouch>| { - let output: Val<::bevy_input::touch::ForceTouch> = { - { - let output: Val<::bevy_input::touch::ForceTouch> = - <::bevy_input::touch::ForceTouch as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_input::touch::ForceTouch>, - other: Ref<::bevy_input::touch::ForceTouch>| { - let output: bool = { - { - let output: bool = - <::bevy_input::touch::ForceTouch as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_input::touch::ForceTouch>| { + let output: Val<::bevy_input::touch::ForceTouch> = { + { + let output: Val<::bevy_input::touch::ForceTouch> = <::bevy_input::touch::ForceTouch as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_input::touch::ForceTouch>, + other: Ref<::bevy_input::touch::ForceTouch>| + { + let output: bool = { + { + let output: bool = <::bevy_input::touch::ForceTouch as ::core::cmp::PartialEq< ::bevy_input::touch::ForceTouch, >>::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 @@ -2837,6 +2848,7 @@ impl Plugin for BevyInputScriptingPlugin { register_key_code_functions(&mut world); register_mouse_button_functions(&mut world); register_touch_input_functions(&mut world); + register_key_functions(&mut world); register_keyboard_focus_lost_functions(&mut world); register_keyboard_input_functions(&mut world); register_accumulated_mouse_motion_functions(&mut world); @@ -2847,10 +2859,8 @@ impl Plugin for BevyInputScriptingPlugin { register_gamepad_axis_changed_event_functions(&mut world); register_gamepad_button_changed_event_functions(&mut world); register_gamepad_button_state_changed_event_functions(&mut world); - register_gamepad_connection_functions(&mut world); register_gamepad_connection_event_functions(&mut world); register_gamepad_event_functions(&mut world); - register_gamepad_input_functions(&mut world); register_gamepad_rumble_request_functions(&mut world); register_raw_gamepad_axis_changed_event_functions(&mut world); register_raw_gamepad_button_changed_event_functions(&mut world); @@ -2860,11 +2870,12 @@ impl Plugin for BevyInputScriptingPlugin { register_double_tap_gesture_functions(&mut world); register_pan_gesture_functions(&mut world); register_button_state_functions(&mut world); + register_gamepad_connection_functions(&mut world); + register_gamepad_input_functions(&mut world); register_button_settings_functions(&mut world); register_axis_settings_functions(&mut world); register_button_axis_settings_functions(&mut world); register_gamepad_rumble_intensity_functions(&mut world); - register_key_functions(&mut world); register_native_key_code_functions(&mut world); register_native_key_functions(&mut world); register_mouse_scroll_unit_functions(&mut world); diff --git a/crates/bindings/bevy_input_focus_bms_bindings/Cargo.toml b/crates/bindings/bevy_input_focus_bms_bindings/Cargo.toml index b1fe305da3..2de73b8ef6 100644 --- a/crates/bindings/bevy_input_focus_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_input_focus_bms_bindings/Cargo.toml @@ -17,38 +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.16.1", features = [ - "std", - "bevy_reflect", -], default-features = true } - - -bevy_app = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } - -bevy_ecs = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", - "async_executor", -], default-features = false } - -bevy_input = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } - -bevy_math = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } - -bevy_reflect = { version = "^0.16.1", features = [ - "std", -], default-features = false } - -bevy_window = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } +bevy_input_focus = { version = "0.17.2", features = ["bevy_reflect", "std"], default-features = true} + + +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} + +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_input = { version = "^0.17.2", features = ["bevy_reflect", "smol_str", "std"], default-features = true} + +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} + +bevy_window = { version = "^0.17.2", 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..ee21c555a6 100644 --- a/crates/bindings/bevy_input_focus_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_input_focus_bms_bindings/src/lib.rs @@ -1,15 +1,18 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyInputFocusScriptingPlugin; pub(crate) fn register_input_focus_functions(world: &mut World) { @@ -100,24 +103,23 @@ pub(crate) fn register_input_focus_visible_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input_focus::InputFocusVisible, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input_focus::InputFocusVisible>| { - let output: Val<::bevy_input_focus::InputFocusVisible> = { - { - let output: Val<::bevy_input_focus::InputFocusVisible> = - <::bevy_input_focus::InputFocusVisible as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_input_focus::InputFocusVisible>| { + let output: Val<::bevy_input_focus::InputFocusVisible> = { + { + let output: Val<::bevy_input_focus::InputFocusVisible> = <::bevy_input_focus::InputFocusVisible as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -130,22 +132,23 @@ pub(crate) fn register_auto_focus_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_input_focus::AutoFocus, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_input_focus::AutoFocus>| { - let output: Val<::bevy_input_focus::AutoFocus> = { - { - let output: Val<::bevy_input_focus::AutoFocus> = - <::bevy_input_focus::AutoFocus as ::core::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_input_focus::AutoFocus>| { + let output: Val<::bevy_input_focus::AutoFocus> = { + { + let output: Val<::bevy_input_focus::AutoFocus> = <::bevy_input_focus::AutoFocus as ::core::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry diff --git a/crates/bindings/bevy_light_bms_bindings/Cargo.toml b/crates/bindings/bevy_light_bms_bindings/Cargo.toml new file mode 100644 index 0000000000..e2b6193b93 --- /dev/null +++ b/crates/bindings/bevy_light_bms_bindings/Cargo.toml @@ -0,0 +1,47 @@ +[package] +name = "bevy_light_bms_bindings" +description = "Automatically generated bindings for bevy_light crate" +readme = "README.md" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +keywords.workspace = true +categories.workspace = true + +[dependencies] + + +bevy_mod_scripting_core = { workspace = true } +bevy_mod_scripting_bindings = { workspace = true } +bevy_mod_scripting_derive = { workspace = true } +bevy_light = { version = "0.17.2", features = ["webgl"], default-features = true} + + +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} + +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} + +bevy_camera = { version = "^0.17.2", features = [], default-features = true} + +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} + +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} + +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} + +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} + +bevy_platform = { version = "^0.17.2", features = ["alloc", "serialize", "std"], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} + +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} + +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} + + diff --git a/crates/bindings/bevy_light_bms_bindings/README.md b/crates/bindings/bevy_light_bms_bindings/README.md new file mode 100644 index 0000000000..99a687def2 --- /dev/null +++ b/crates/bindings/bevy_light_bms_bindings/README.md @@ -0,0 +1,4 @@ +# bevy_light bindings +This crate is part of the [bevy_mod_scripting](http://github.com/makspll/bevy_mod_scripting) project. + +The code inside is fully generated via a custom rustc plugin. \ No newline at end of file diff --git a/crates/bindings/bevy_light_bms_bindings/src/lib.rs b/crates/bindings/bevy_light_bms_bindings/src/lib.rs new file mode 100644 index 0000000000..10efa9ee5f --- /dev/null +++ b/crates/bindings/bevy_light_bms_bindings/src/lib.rs @@ -0,0 +1,870 @@ + +#![allow(clippy::all)] +#![allow(unused, deprecated, dead_code)] + + + +use bevy_mod_scripting_bindings::{ + ReflectReference, + function::{ + from::{Ref, Mut, Val}, + namespace::NamespaceBuilder, + }, +}; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; +use bevy_mod_scripting_derive::script_bindings; +pub struct BevyLightScriptingPlugin; +pub(crate) fn register_clustered_decal_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::ClusteredDecal, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::ClusteredDecal>| { + let output: Val<::bevy_light::ClusteredDecal> = { + { + let output: Val<::bevy_light::ClusteredDecal> = <::bevy_light::ClusteredDecal 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::ClusteredDecal, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_ambient_light_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::AmbientLight, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::AmbientLight>| { + let output: Val<::bevy_light::AmbientLight> = { + { + let output: Val<::bevy_light::AmbientLight> = <::bevy_light::AmbientLight 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::AmbientLight, + 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, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::EnvironmentMapLight>| { + let output: Val<::bevy_light::EnvironmentMapLight> = { + { + let output: Val<::bevy_light::EnvironmentMapLight> = <::bevy_light::EnvironmentMapLight 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::EnvironmentMapLight, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_generated_environment_map_light_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::GeneratedEnvironmentMapLight, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::GeneratedEnvironmentMapLight>| { + let output: Val<::bevy_light::GeneratedEnvironmentMapLight> = { + { + let output: Val<::bevy_light::GeneratedEnvironmentMapLight> = <::bevy_light::GeneratedEnvironmentMapLight 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::GeneratedEnvironmentMapLight, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_irradiance_volume_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::IrradianceVolume, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::IrradianceVolume>| { + let output: Val<::bevy_light::IrradianceVolume> = { + { + let output: Val<::bevy_light::IrradianceVolume> = <::bevy_light::IrradianceVolume 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::IrradianceVolume, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_light_probe_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::LightProbe, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::LightProbe>| { + let output: Val<::bevy_light::LightProbe> = { + { + let output: Val<::bevy_light::LightProbe> = <::bevy_light::LightProbe as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "new", + || { + let output: Val<::bevy_light::LightProbe> = { + { + let output: Val<::bevy_light::LightProbe> = ::bevy_light::LightProbe::new() + .into(); + output + } + }; + output + }, + " Creates a new light probe component.", + &[], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_light::LightProbe, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_fog_volume_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::FogVolume, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::FogVolume>| { + let output: Val<::bevy_light::FogVolume> = { + { + let output: Val<::bevy_light::FogVolume> = <::bevy_light::FogVolume 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::FogVolume, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_volumetric_fog_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::VolumetricFog, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::VolumetricFog>| { + let output: Val<::bevy_light::VolumetricFog> = { + { + let output: Val<::bevy_light::VolumetricFog> = <::bevy_light::VolumetricFog 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::VolumetricFog, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_volumetric_light_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::VolumetricLight, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::VolumetricLight>| { + let output: Val<::bevy_light::VolumetricLight> = { + { + let output: Val<::bevy_light::VolumetricLight> = <::bevy_light::VolumetricLight 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::VolumetricLight, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cascade_shadow_config_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::CascadeShadowConfig, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::CascadeShadowConfig>| { + let output: Val<::bevy_light::CascadeShadowConfig> = { + { + let output: Val<::bevy_light::CascadeShadowConfig> = <::bevy_light::CascadeShadowConfig 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::CascadeShadowConfig, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cascades_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::Cascades, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::Cascades>| { + let output: Val<::bevy_light::Cascades> = { + { + let output: Val<::bevy_light::Cascades> = <::bevy_light::Cascades 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::Cascades, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_point_light_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::PointLight, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::PointLight>| { + let output: Val<::bevy_light::PointLight> = { + { + let output: Val<::bevy_light::PointLight> = <::bevy_light::PointLight 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::PointLight, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_point_light_shadow_map_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::PointLightShadowMap, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::PointLightShadowMap>| { + let output: Val<::bevy_light::PointLightShadowMap> = { + { + let output: Val<::bevy_light::PointLightShadowMap> = <::bevy_light::PointLightShadowMap 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::PointLightShadowMap, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_point_light_texture_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::PointLightTexture, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::PointLightTexture>| { + let output: Val<::bevy_light::PointLightTexture> = { + { + let output: Val<::bevy_light::PointLightTexture> = <::bevy_light::PointLightTexture 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::PointLightTexture, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_spot_light_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::SpotLight, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::SpotLight>| { + let output: Val<::bevy_light::SpotLight> = { + { + let output: Val<::bevy_light::SpotLight> = <::bevy_light::SpotLight 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::SpotLight, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_spot_light_texture_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::SpotLightTexture, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::SpotLightTexture>| { + let output: Val<::bevy_light::SpotLightTexture> = { + { + let output: Val<::bevy_light::SpotLightTexture> = <::bevy_light::SpotLightTexture 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::SpotLightTexture, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_directional_light_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::DirectionalLight, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::DirectionalLight>| { + let output: Val<::bevy_light::DirectionalLight> = { + { + let output: Val<::bevy_light::DirectionalLight> = <::bevy_light::DirectionalLight 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::DirectionalLight, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_directional_light_shadow_map_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::DirectionalLightShadowMap, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::DirectionalLightShadowMap>| { + let output: Val<::bevy_light::DirectionalLightShadowMap> = { + { + let output: Val<::bevy_light::DirectionalLightShadowMap> = <::bevy_light::DirectionalLightShadowMap 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::DirectionalLightShadowMap, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_directional_light_texture_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::DirectionalLightTexture, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::DirectionalLightTexture>| { + let output: Val<::bevy_light::DirectionalLightTexture> = { + { + let output: Val<::bevy_light::DirectionalLightTexture> = <::bevy_light::DirectionalLightTexture 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::DirectionalLightTexture, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_not_shadow_caster_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::NotShadowCaster, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::NotShadowCaster>| { + let output: Val<::bevy_light::NotShadowCaster> = { + { + let output: Val<::bevy_light::NotShadowCaster> = <::bevy_light::NotShadowCaster as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_light::NotShadowCaster>, + other: Ref<::bevy_light::NotShadowCaster>| + { + let output: bool = { + { + let output: bool = <::bevy_light::NotShadowCaster as ::std::cmp::PartialEq< + ::bevy_light::NotShadowCaster, + >>::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_light::NotShadowCaster, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_not_shadow_receiver_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::NotShadowReceiver, + >::new(world); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_light::NotShadowReceiver, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_transmitted_shadow_receiver_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::TransmittedShadowReceiver, + >::new(world); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_light::TransmittedShadowReceiver, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_shadow_filtering_method_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::ShadowFilteringMethod, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_light::ShadowFilteringMethod>| { + let output: () = { + { + let output: () = <::bevy_light::ShadowFilteringMethod as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_light::ShadowFilteringMethod>| { + let output: Val<::bevy_light::ShadowFilteringMethod> = { + { + let output: Val<::bevy_light::ShadowFilteringMethod> = <::bevy_light::ShadowFilteringMethod as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_light::ShadowFilteringMethod>, + other: Ref<::bevy_light::ShadowFilteringMethod>| + { + let output: bool = { + { + let output: bool = <::bevy_light::ShadowFilteringMethod as ::std::cmp::PartialEq< + ::bevy_light::ShadowFilteringMethod, + >>::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_light::ShadowFilteringMethod, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cluster_far_z_mode_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::cluster::ClusterFarZMode, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::cluster::ClusterFarZMode>| { + let output: Val<::bevy_light::cluster::ClusterFarZMode> = { + { + let output: Val<::bevy_light::cluster::ClusterFarZMode> = <::bevy_light::cluster::ClusterFarZMode 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::cluster::ClusterFarZMode, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cluster_z_config_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::cluster::ClusterZConfig, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::cluster::ClusterZConfig>| { + let output: Val<::bevy_light::cluster::ClusterZConfig> = { + { + let output: Val<::bevy_light::cluster::ClusterZConfig> = <::bevy_light::cluster::ClusterZConfig 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::cluster::ClusterZConfig, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cluster_config_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::cluster::ClusterConfig, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::cluster::ClusterConfig>| { + let output: Val<::bevy_light::cluster::ClusterConfig> = { + { + let output: Val<::bevy_light::cluster::ClusterConfig> = <::bevy_light::cluster::ClusterConfig 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::cluster::ClusterConfig, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cascade_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_light::cascade::Cascade, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_light::cascade::Cascade>| { + let output: Val<::bevy_light::cascade::Cascade> = { + { + let output: Val<::bevy_light::cascade::Cascade> = <::bevy_light::cascade::Cascade 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::cascade::Cascade, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +impl Plugin for BevyLightScriptingPlugin { + fn build(&self, app: &mut App) { + let mut world = app.world_mut(); + register_clustered_decal_functions(&mut world); + register_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); + register_light_probe_functions(&mut world); + register_fog_volume_functions(&mut world); + register_volumetric_fog_functions(&mut world); + register_volumetric_light_functions(&mut world); + register_cascade_shadow_config_functions(&mut world); + register_cascades_functions(&mut world); + register_point_light_functions(&mut world); + register_point_light_shadow_map_functions(&mut world); + register_point_light_texture_functions(&mut world); + register_spot_light_functions(&mut world); + register_spot_light_texture_functions(&mut world); + register_directional_light_functions(&mut world); + register_directional_light_shadow_map_functions(&mut world); + register_directional_light_texture_functions(&mut world); + register_not_shadow_caster_functions(&mut world); + register_not_shadow_receiver_functions(&mut world); + register_transmitted_shadow_receiver_functions(&mut world); + register_shadow_filtering_method_functions(&mut world); + register_cluster_far_z_mode_functions(&mut world); + register_cluster_z_config_functions(&mut world); + register_cluster_config_functions(&mut world); + register_cascade_functions(&mut world); + } +} diff --git a/crates/bindings/bevy_math_bms_bindings/Cargo.toml b/crates/bindings/bevy_math_bms_bindings/Cargo.toml index 5fcfab24ec..5c53ead352 100644 --- a/crates/bindings/bevy_math_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_math_bms_bindings/Cargo.toml @@ -17,41 +17,21 @@ 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.16.1", features = [ - "std", - "rand", - "curve", - "alloc", - "bevy_reflect", -], default-features = true } +bevy_math = { version = "0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [ - "std", -], default-features = false } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -derive_more = { version = "^1", features = ["std"], default-features = false } +derive_more = { version = "^2", features = ["std"], default-features = false} -glam = { version = "^0.29.3", features = [ - "std", - "rand", -], default-features = false } +glam = { version = "^0.30.1", features = ["rand", "std"], default-features = false} -itertools = { version = "^0.14.0", features = [ - "use_std", - "use_alloc", -], default-features = false } +itertools = { version = "^0.14.0", features = ["use_alloc", "use_std"], default-features = false} -rand = { version = "^0.8", features = [ - "std", - "alloc", -], default-features = false } +rand = { version = "^0.9", features = ["alloc", "std"], default-features = false} -rand_distr = { version = "^0.4.3", features = [ - "std", - "alloc", -], default-features = false } +rand_distr = { version = "^0.5", features = ["alloc", "std"], default-features = false} + +variadics_please = { version = "^1.1", features = [], default-features = true} -smallvec = { version = "^1.11", features = [], default-features = true } -variadics_please = { version = "^1.1", features = [], default-features = true } diff --git a/crates/bindings/bevy_math_bms_bindings/src/lib.rs b/crates/bindings/bevy_math_bms_bindings/src/lib.rs index fff6a798ec..223da5c7b9 100644 --- a/crates/bindings/bevy_math_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_math_bms_bindings/src/lib.rs @@ -1,15 +1,18 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyMathScriptingPlugin; pub(crate) fn register_aspect_ratio_functions(world: &mut World) { @@ -425,7 +428,7 @@ pub(crate) fn register_isometry_2_d_functions(world: &mut World) { ) .register_documented( "from_translation", - |translation: Val<::bevy_math::prelude::Vec2>| { + |translation: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::Isometry2d> = { { let output: Val<::bevy_math::Isometry2d> = ::bevy_math::Isometry2d::from_translation( @@ -495,13 +498,10 @@ pub(crate) fn register_isometry_2_d_functions(world: &mut World) { ) .register_documented( "inverse_transform_point", - | - _self: Ref<::bevy_math::Isometry2d>, - point: Val<::bevy_math::prelude::Vec2>| - { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Ref<::bevy_math::Isometry2d>, point: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::Isometry2d::inverse_transform_point( + let output: Val<::bevy_math::Vec2> = ::bevy_math::Isometry2d::inverse_transform_point( &_self, point.into_inner(), ) @@ -516,11 +516,11 @@ pub(crate) fn register_isometry_2_d_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::Isometry2d>, rhs: Val<::bevy_math::Isometry2d>| { - let output: Val<::bevy_math::Isometry2d> = { + |_self: Val<::bevy_math::Isometry2d>, rhs: Val<::bevy_math::Dir2>| { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::Isometry2d> = <::bevy_math::Isometry2d as ::core::ops::Mul< - ::bevy_math::Isometry2d, + let output: Val<::bevy_math::Dir2> = <::bevy_math::Isometry2d as ::core::ops::Mul< + ::bevy_math::Dir2, >>::mul(_self.into_inner(), rhs.into_inner()) .into(); output @@ -533,11 +533,11 @@ pub(crate) fn register_isometry_2_d_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::Isometry2d>, rhs: Val<::bevy_math::prelude::Dir2>| { - let output: Val<::bevy_math::prelude::Dir2> = { + |_self: Val<::bevy_math::Isometry2d>, rhs: Val<::bevy_math::Isometry2d>| { + let output: Val<::bevy_math::Isometry2d> = { { - let output: Val<::bevy_math::prelude::Dir2> = <::bevy_math::Isometry2d as ::core::ops::Mul< - ::bevy_math::prelude::Dir2, + let output: Val<::bevy_math::Isometry2d> = <::bevy_math::Isometry2d as ::core::ops::Mul< + ::bevy_math::Isometry2d, >>::mul(_self.into_inner(), rhs.into_inner()) .into(); output @@ -550,11 +550,11 @@ pub(crate) fn register_isometry_2_d_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::Isometry2d>, rhs: Val<::bevy_math::prelude::Vec2>| { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Val<::bevy_math::Isometry2d>, rhs: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = <::bevy_math::Isometry2d as ::core::ops::Mul< - ::bevy_math::prelude::Vec2, + let output: Val<::bevy_math::Vec2> = <::bevy_math::Isometry2d as ::core::ops::Mul< + ::bevy_math::Vec2, >>::mul(_self.into_inner(), rhs.into_inner()) .into(); output @@ -567,10 +567,7 @@ pub(crate) fn register_isometry_2_d_functions(world: &mut World) { ) .register_documented( "new", - | - translation: Val<::bevy_math::prelude::Vec2>, - rotation: Val<::bevy_math::Rot2>| - { + |translation: Val<::bevy_math::Vec2>, rotation: Val<::bevy_math::Rot2>| { let output: Val<::bevy_math::Isometry2d> = { { let output: Val<::bevy_math::Isometry2d> = ::bevy_math::Isometry2d::new( @@ -588,13 +585,10 @@ pub(crate) fn register_isometry_2_d_functions(world: &mut World) { ) .register_documented( "transform_point", - | - _self: Ref<::bevy_math::Isometry2d>, - point: Val<::bevy_math::prelude::Vec2>| - { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Ref<::bevy_math::Isometry2d>, point: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::Isometry2d::transform_point( + let output: Val<::bevy_math::Vec2> = ::bevy_math::Isometry2d::transform_point( &_self, point.into_inner(), ) @@ -655,7 +649,7 @@ pub(crate) fn register_isometry_3_d_functions(world: &mut World) { ) .register_documented( "from_rotation", - |rotation: Val<::bevy_math::prelude::Quat>| { + |rotation: Val<::bevy_math::Quat>| { let output: Val<::bevy_math::Isometry3d> = { { let output: Val<::bevy_math::Isometry3d> = ::bevy_math::Isometry3d::from_rotation( @@ -726,11 +720,11 @@ pub(crate) fn register_isometry_3_d_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::Isometry3d>, rhs: Val<::bevy_math::Isometry3d>| { - let output: Val<::bevy_math::Isometry3d> = { + |_self: Val<::bevy_math::Isometry3d>, rhs: Val<::bevy_math::Dir3>| { + let output: Val<::bevy_math::Dir3> = { { - let output: Val<::bevy_math::Isometry3d> = <::bevy_math::Isometry3d as ::core::ops::Mul< - ::bevy_math::Isometry3d, + let output: Val<::bevy_math::Dir3> = <::bevy_math::Isometry3d as ::core::ops::Mul< + ::bevy_math::Dir3, >>::mul(_self.into_inner(), rhs.into_inner()) .into(); output @@ -743,11 +737,11 @@ pub(crate) fn register_isometry_3_d_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::Isometry3d>, rhs: Val<::bevy_math::prelude::Dir3>| { - let output: Val<::bevy_math::prelude::Dir3> = { + |_self: Val<::bevy_math::Isometry3d>, rhs: Val<::bevy_math::Isometry3d>| { + let output: Val<::bevy_math::Isometry3d> = { { - let output: Val<::bevy_math::prelude::Dir3> = <::bevy_math::Isometry3d as ::core::ops::Mul< - ::bevy_math::prelude::Dir3, + let output: Val<::bevy_math::Isometry3d> = <::bevy_math::Isometry3d as ::core::ops::Mul< + ::bevy_math::Isometry3d, >>::mul(_self.into_inner(), rhs.into_inner()) .into(); output @@ -760,11 +754,11 @@ pub(crate) fn register_isometry_3_d_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::Isometry3d>, rhs: Val<::bevy_math::prelude::Vec3>| { - let output: Val<::bevy_math::prelude::Vec3> = { + |_self: Val<::bevy_math::Isometry3d>, rhs: Val<::bevy_math::Vec3>| { + let output: Val<::bevy_math::Vec3> = { { - let output: Val<::bevy_math::prelude::Vec3> = <::bevy_math::Isometry3d as ::core::ops::Mul< - ::bevy_math::prelude::Vec3, + let output: Val<::bevy_math::Vec3> = <::bevy_math::Isometry3d as ::core::ops::Mul< + ::bevy_math::Vec3, >>::mul(_self.into_inner(), rhs.into_inner()) .into(); output @@ -777,11 +771,11 @@ pub(crate) fn register_isometry_3_d_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::Isometry3d>, rhs: Val<::bevy_math::prelude::Vec3A>| { - let output: Val<::bevy_math::prelude::Vec3A> = { + |_self: Val<::bevy_math::Isometry3d>, rhs: Val<::bevy_math::Vec3A>| { + let output: Val<::bevy_math::Vec3A> = { { - let output: Val<::bevy_math::prelude::Vec3A> = <::bevy_math::Isometry3d as ::core::ops::Mul< - ::bevy_math::prelude::Vec3A, + let output: Val<::bevy_math::Vec3A> = <::bevy_math::Isometry3d as ::core::ops::Mul< + ::bevy_math::Vec3A, >>::mul(_self.into_inner(), rhs.into_inner()) .into(); output @@ -801,188 +795,214 @@ 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::prelude::Vec2> = { - { - let output: Val<::bevy_math::prelude::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::prelude::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::prelude::Vec2>, direction: Val<::bevy_math::prelude::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"], - ); + 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>(); + .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::prelude::Vec3> = { - { - let output: Val<::bevy_math::prelude::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::prelude::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::prelude::Vec3>, direction: Val<::bevy_math::prelude::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"], - ); + 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>(); + .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::< @@ -1020,7 +1040,7 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Returns the rotation in degrees in the `(-180, 180]` range.", + " Returns a corresponding rotation angle in degrees in the `(-180, 180]` range.", &["_self"], ) .register_documented( @@ -1037,7 +1057,7 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Returns the rotation in radians in the `(-pi, pi]` range.", + " Returns a corresponding rotation angle in radians in the `(-pi, pi]` range.", &["_self"], ) .register_documented( @@ -1054,7 +1074,7 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Returns the rotation as a fraction of a full 360 degree turn.", + " Returns a corresponding rotation angle as a fraction of a full 360 degree turn in the `(-0.5, 0.5]` range.", &["_self"], ) .register_documented( @@ -1088,7 +1108,7 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Creates a [`Rot2`] from a counterclockwise angle in degrees.\n # Note\n The input rotation will always be clamped to the range `(-180°, 180°]` by design.\n # Example\n ```\n # use bevy_math::Rot2;\n # use approx::assert_relative_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 ```", + " 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( @@ -1140,7 +1160,7 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Creates a [`Rot2`] from the sine and cosine of an angle in radians.\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.", + " 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( @@ -1277,45 +1297,45 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::Rot2>, rhs: Val<::bevy_math::Rot2>| { - let output: Val<::bevy_math::Rot2> = { + |_self: Val<::bevy_math::Rot2>, direction: Val<::bevy_math::Dir2>| { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::Rot2> = <::bevy_math::Rot2 as ::core::ops::Mul< - ::bevy_math::Rot2, - >>::mul(_self.into_inner(), rhs.into_inner()) + let output: Val<::bevy_math::Dir2> = <::bevy_math::Rot2 as ::core::ops::Mul< + ::bevy_math::Dir2, + >>::mul(_self.into_inner(), direction.into_inner()) .into(); output } }; output }, - "", - &["_self", "rhs"], + " Rotates the [`Dir2`] using a [`Rot2`].", + &["_self", "direction"], ) .register_documented( "mul", - |_self: Val<::bevy_math::Rot2>, direction: Val<::bevy_math::prelude::Dir2>| { - let output: Val<::bevy_math::prelude::Dir2> = { + |_self: Val<::bevy_math::Rot2>, rhs: Val<::bevy_math::Rot2>| { + let output: Val<::bevy_math::Rot2> = { { - let output: Val<::bevy_math::prelude::Dir2> = <::bevy_math::Rot2 as ::core::ops::Mul< - ::bevy_math::prelude::Dir2, - >>::mul(_self.into_inner(), direction.into_inner()) + let output: Val<::bevy_math::Rot2> = <::bevy_math::Rot2 as ::core::ops::Mul< + ::bevy_math::Rot2, + >>::mul(_self.into_inner(), rhs.into_inner()) .into(); output } }; output }, - " Rotates the [`Dir2`] using a [`Rot2`].", - &["_self", "direction"], + "", + &["_self", "rhs"], ) .register_documented( "mul", - |_self: Val<::bevy_math::Rot2>, rhs: Val<::bevy_math::prelude::Vec2>| { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Val<::bevy_math::Rot2>, rhs: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = <::bevy_math::Rot2 as ::core::ops::Mul< - ::bevy_math::prelude::Vec2, + let output: Val<::bevy_math::Vec2> = <::bevy_math::Rot2 as ::core::ops::Mul< + ::bevy_math::Vec2, >>::mul(_self.into_inner(), rhs.into_inner()) .into(); output @@ -1376,7 +1396,7 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Creates a [`Rot2`] from a counterclockwise angle in radians.\n # Note\n The input rotation will always be clamped to the range `(-π, π]` by design.\n # Example\n ```\n # use bevy_math::Rot2;\n # use approx::assert_relative_eq;\n # use std::f32::consts::{FRAC_PI_2, PI};\n let rot1 = Rot2::radians(3.0 * FRAC_PI_2);\n let rot2 = Rot2::radians(-FRAC_PI_2);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1, rot2);\n let rot3 = Rot2::radians(PI);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1 * rot1, rot3);\n ```", + " Creates a [`Rot2`] from a counterclockwise angle in radians.\n A negative argument corresponds to a clockwise rotation.\n # Note\n Angles larger than or equal to 2π (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;\n # use std::f32::consts::{FRAC_PI_2, PI};\n let rot1 = Rot2::radians(3.0 * FRAC_PI_2);\n let rot2 = Rot2::radians(-FRAC_PI_2);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1, rot2);\n let rot3 = Rot2::radians(PI);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1 * rot1, rot3);\n // A rotation by 3π and 1π are the same\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(Rot2::radians(3.0 * PI), Rot2::radians(PI));\n ```", &["radians"], ) .register_documented( @@ -1393,7 +1413,7 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Returns the sine and cosine of the rotation angle in radians.", + " Returns the sine and cosine of the rotation angle.", &["_self"], ) .register_documented( @@ -1429,24 +1449,27 @@ pub(crate) fn register_rot_2_functions(world: &mut World) { }; output }, - " Creates a [`Rot2`] from a counterclockwise fraction of a full turn of 360 degrees.\n # Note\n The input rotation will always be clamped to the range `(-50%, 50%]` by design.\n # Example\n ```\n # use bevy_math::Rot2;\n # use approx::assert_relative_eq;\n let rot1 = Rot2::turn_fraction(0.75);\n let rot2 = Rot2::turn_fraction(-0.25);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1, rot2);\n let rot3 = Rot2::turn_fraction(0.5);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1 * rot1, rot3);\n ```", + " Creates a [`Rot2`] from a counterclockwise fraction of a full turn of 360 degrees.\n A negative argument corresponds to a clockwise rotation.\n # Note\n Angles larger than or equal to 1 turn (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;\n let rot1 = Rot2::turn_fraction(0.75);\n let rot2 = Rot2::turn_fraction(-0.25);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1, rot2);\n let rot3 = Rot2::turn_fraction(0.5);\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(rot1 * rot1, rot3);\n // A rotation by 1.5 turns and 0.5 turns are the same\n #[cfg(feature = \"approx\")]\n assert_relative_eq!(Rot2::turn_fraction(1.5), Rot2::turn_fraction(0.5));\n ```", &["fraction"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_math::Rot2, bevy_mod_scripting_bindings::MarkAsGenerated>(); + .register_type_data::< + ::bevy_math::Rot2, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } pub(crate) fn register_dir_2_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::prelude::Dir2, + ::bevy_math::Dir2, >::new(world) .register_documented( "as_vec2", - |_self: Ref<::bevy_math::prelude::Dir2>| { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Ref<::bevy_math::Dir2>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::prelude::Dir2::as_vec2( + let output: Val<::bevy_math::Vec2> = ::bevy_math::Dir2::as_vec2( &_self, ) .into(); @@ -1460,10 +1483,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_math::prelude::Dir2>| { - let output: Val<::bevy_math::prelude::Dir2> = { + |_self: Ref<::bevy_math::Dir2>| { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::prelude::Dir2> = <::bevy_math::prelude::Dir2 as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::Dir2> = <::bevy_math::Dir2 as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1477,14 +1500,11 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_math::prelude::Dir2>, - other: Ref<::bevy_math::prelude::Dir2>| - { + |_self: Ref<::bevy_math::Dir2>, other: Ref<::bevy_math::Dir2>| { let output: bool = { { - let output: bool = <::bevy_math::prelude::Dir2 as ::core::cmp::PartialEq< - ::bevy_math::prelude::Dir2, + let output: bool = <::bevy_math::Dir2 as ::core::cmp::PartialEq< + ::bevy_math::Dir2, >>::eq(&_self, &other) .into(); output @@ -1497,10 +1517,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "fast_renormalize", - |_self: Val<::bevy_math::prelude::Dir2>| { - let output: Val<::bevy_math::prelude::Dir2> = { + |_self: Val<::bevy_math::Dir2>| { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::prelude::Dir2::fast_renormalize( + let output: Val<::bevy_math::Dir2> = ::bevy_math::Dir2::fast_renormalize( _self.into_inner(), ) .into(); @@ -1515,9 +1535,9 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { .register_documented( "from_xy_unchecked", |x: f32, y: f32| { - let output: Val<::bevy_math::prelude::Dir2> = { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::prelude::Dir2::from_xy_unchecked( + let output: Val<::bevy_math::Dir2> = ::bevy_math::Dir2::from_xy_unchecked( x, y, ) @@ -1532,10 +1552,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::prelude::Dir2>, rhs: f32| { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Val<::bevy_math::Dir2>, rhs: f32| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = <::bevy_math::prelude::Dir2 as ::core::ops::Mul< + let output: Val<::bevy_math::Vec2> = <::bevy_math::Dir2 as ::core::ops::Mul< f32, >>::mul(_self.into_inner(), rhs) .into(); @@ -1549,10 +1569,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "neg", - |_self: Val<::bevy_math::prelude::Dir2>| { - let output: Val<::bevy_math::prelude::Dir2> = { + |_self: Val<::bevy_math::Dir2>| { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::prelude::Dir2> = <::bevy_math::prelude::Dir2 as ::core::ops::Neg>::neg( + let output: Val<::bevy_math::Dir2> = <::bevy_math::Dir2 as ::core::ops::Neg>::neg( _self.into_inner(), ) .into(); @@ -1566,10 +1586,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "new_unchecked", - |value: Val<::bevy_math::prelude::Vec2>| { - let output: Val<::bevy_math::prelude::Dir2> = { + |value: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::prelude::Dir2::new_unchecked( + let output: Val<::bevy_math::Dir2> = ::bevy_math::Dir2::new_unchecked( value.into_inner(), ) .into(); @@ -1583,13 +1603,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "rotation_from", - | - _self: Val<::bevy_math::prelude::Dir2>, - other: Val<::bevy_math::prelude::Dir2>| - { + |_self: Val<::bevy_math::Dir2>, other: Val<::bevy_math::Dir2>| { let output: Val<::bevy_math::Rot2> = { { - let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_from( + let output: Val<::bevy_math::Rot2> = ::bevy_math::Dir2::rotation_from( _self.into_inner(), other.into_inner(), ) @@ -1604,10 +1621,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "rotation_from_x", - |_self: Val<::bevy_math::prelude::Dir2>| { + |_self: Val<::bevy_math::Dir2>| { let output: Val<::bevy_math::Rot2> = { { - let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_from_x( + let output: Val<::bevy_math::Rot2> = ::bevy_math::Dir2::rotation_from_x( _self.into_inner(), ) .into(); @@ -1621,10 +1638,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "rotation_from_y", - |_self: Val<::bevy_math::prelude::Dir2>| { + |_self: Val<::bevy_math::Dir2>| { let output: Val<::bevy_math::Rot2> = { { - let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_from_y( + let output: Val<::bevy_math::Rot2> = ::bevy_math::Dir2::rotation_from_y( _self.into_inner(), ) .into(); @@ -1638,13 +1655,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "rotation_to", - | - _self: Val<::bevy_math::prelude::Dir2>, - other: Val<::bevy_math::prelude::Dir2>| - { + |_self: Val<::bevy_math::Dir2>, other: Val<::bevy_math::Dir2>| { let output: Val<::bevy_math::Rot2> = { { - let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_to( + let output: Val<::bevy_math::Rot2> = ::bevy_math::Dir2::rotation_to( _self.into_inner(), other.into_inner(), ) @@ -1659,10 +1673,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "rotation_to_x", - |_self: Val<::bevy_math::prelude::Dir2>| { + |_self: Val<::bevy_math::Dir2>| { let output: Val<::bevy_math::Rot2> = { { - let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_to_x( + let output: Val<::bevy_math::Rot2> = ::bevy_math::Dir2::rotation_to_x( _self.into_inner(), ) .into(); @@ -1676,10 +1690,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "rotation_to_y", - |_self: Val<::bevy_math::prelude::Dir2>| { + |_self: Val<::bevy_math::Dir2>| { let output: Val<::bevy_math::Rot2> = { { - let output: Val<::bevy_math::Rot2> = ::bevy_math::prelude::Dir2::rotation_to_y( + let output: Val<::bevy_math::Rot2> = ::bevy_math::Dir2::rotation_to_y( _self.into_inner(), ) .into(); @@ -1693,14 +1707,10 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { ) .register_documented( "slerp", - | - _self: Val<::bevy_math::prelude::Dir2>, - rhs: Val<::bevy_math::prelude::Dir2>, - s: f32| - { - let output: Val<::bevy_math::prelude::Dir2> = { + |_self: Val<::bevy_math::Dir2>, rhs: Val<::bevy_math::Dir2>, s: f32| { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::prelude::Dir2::slerp( + let output: Val<::bevy_math::Dir2> = ::bevy_math::Dir2::slerp( _self.into_inner(), rhs.into_inner(), s, @@ -1718,20 +1728,20 @@ pub(crate) fn register_dir_2_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::prelude::Dir2, + ::bevy_math::Dir2, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_dir_3_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::prelude::Dir3, + ::bevy_math::Dir3, >::new(world) .register_documented( "as_vec3", - |_self: Ref<::bevy_math::prelude::Dir3>| { - let output: Val<::bevy_math::prelude::Vec3> = { + |_self: Ref<::bevy_math::Dir3>| { + let output: Val<::bevy_math::Vec3> = { { - let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::prelude::Dir3::as_vec3( + let output: Val<::bevy_math::Vec3> = ::bevy_math::Dir3::as_vec3( &_self, ) .into(); @@ -1745,10 +1755,10 @@ pub(crate) fn register_dir_3_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_math::prelude::Dir3>| { - let output: Val<::bevy_math::prelude::Dir3> = { + |_self: Ref<::bevy_math::Dir3>| { + let output: Val<::bevy_math::Dir3> = { { - let output: Val<::bevy_math::prelude::Dir3> = <::bevy_math::prelude::Dir3 as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::Dir3> = <::bevy_math::Dir3 as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1762,14 +1772,11 @@ pub(crate) fn register_dir_3_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_math::prelude::Dir3>, - other: Ref<::bevy_math::prelude::Dir3>| - { + |_self: Ref<::bevy_math::Dir3>, other: Ref<::bevy_math::Dir3>| { let output: bool = { { - let output: bool = <::bevy_math::prelude::Dir3 as ::core::cmp::PartialEq< - ::bevy_math::prelude::Dir3, + let output: bool = <::bevy_math::Dir3 as ::core::cmp::PartialEq< + ::bevy_math::Dir3, >>::eq(&_self, &other) .into(); output @@ -1782,10 +1789,10 @@ pub(crate) fn register_dir_3_functions(world: &mut World) { ) .register_documented( "fast_renormalize", - |_self: Val<::bevy_math::prelude::Dir3>| { - let output: Val<::bevy_math::prelude::Dir3> = { + |_self: Val<::bevy_math::Dir3>| { + let output: Val<::bevy_math::Dir3> = { { - let output: Val<::bevy_math::prelude::Dir3> = ::bevy_math::prelude::Dir3::fast_renormalize( + let output: Val<::bevy_math::Dir3> = ::bevy_math::Dir3::fast_renormalize( _self.into_inner(), ) .into(); @@ -1800,9 +1807,9 @@ pub(crate) fn register_dir_3_functions(world: &mut World) { .register_documented( "from_xyz_unchecked", |x: f32, y: f32, z: f32| { - let output: Val<::bevy_math::prelude::Dir3> = { + let output: Val<::bevy_math::Dir3> = { { - let output: Val<::bevy_math::prelude::Dir3> = ::bevy_math::prelude::Dir3::from_xyz_unchecked( + let output: Val<::bevy_math::Dir3> = ::bevy_math::Dir3::from_xyz_unchecked( x, y, z, @@ -1818,10 +1825,10 @@ pub(crate) fn register_dir_3_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::prelude::Dir3>, rhs: f32| { - let output: Val<::bevy_math::prelude::Vec3> = { + |_self: Val<::bevy_math::Dir3>, rhs: f32| { + let output: Val<::bevy_math::Vec3> = { { - let output: Val<::bevy_math::prelude::Vec3> = <::bevy_math::prelude::Dir3 as ::core::ops::Mul< + let output: Val<::bevy_math::Vec3> = <::bevy_math::Dir3 as ::core::ops::Mul< f32, >>::mul(_self.into_inner(), rhs) .into(); @@ -1835,10 +1842,10 @@ pub(crate) fn register_dir_3_functions(world: &mut World) { ) .register_documented( "neg", - |_self: Val<::bevy_math::prelude::Dir3>| { - let output: Val<::bevy_math::prelude::Dir3> = { + |_self: Val<::bevy_math::Dir3>| { + let output: Val<::bevy_math::Dir3> = { { - let output: Val<::bevy_math::prelude::Dir3> = <::bevy_math::prelude::Dir3 as ::core::ops::Neg>::neg( + let output: Val<::bevy_math::Dir3> = <::bevy_math::Dir3 as ::core::ops::Neg>::neg( _self.into_inner(), ) .into(); @@ -1852,10 +1859,10 @@ pub(crate) fn register_dir_3_functions(world: &mut World) { ) .register_documented( "new_unchecked", - |value: Val<::bevy_math::prelude::Vec3>| { - let output: Val<::bevy_math::prelude::Dir3> = { + |value: Val<::bevy_math::Vec3>| { + let output: Val<::bevy_math::Dir3> = { { - let output: Val<::bevy_math::prelude::Dir3> = ::bevy_math::prelude::Dir3::new_unchecked( + let output: Val<::bevy_math::Dir3> = ::bevy_math::Dir3::new_unchecked( value.into_inner(), ) .into(); @@ -1869,14 +1876,10 @@ pub(crate) fn register_dir_3_functions(world: &mut World) { ) .register_documented( "slerp", - | - _self: Val<::bevy_math::prelude::Dir3>, - rhs: Val<::bevy_math::prelude::Dir3>, - s: f32| - { - let output: Val<::bevy_math::prelude::Dir3> = { + |_self: Val<::bevy_math::Dir3>, rhs: Val<::bevy_math::Dir3>, s: f32| { + let output: Val<::bevy_math::Dir3> = { { - let output: Val<::bevy_math::prelude::Dir3> = ::bevy_math::prelude::Dir3::slerp( + let output: Val<::bevy_math::Dir3> = ::bevy_math::Dir3::slerp( _self.into_inner(), rhs.into_inner(), s, @@ -1894,20 +1897,20 @@ pub(crate) fn register_dir_3_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::prelude::Dir3, + ::bevy_math::Dir3, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_dir_3_a_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::prelude::Dir3A, + ::bevy_math::Dir3A, >::new(world) .register_documented( "as_vec3a", - |_self: Ref<::bevy_math::prelude::Dir3A>| { - let output: Val<::bevy_math::prelude::Vec3A> = { + |_self: Ref<::bevy_math::Dir3A>| { + let output: Val<::bevy_math::Vec3A> = { { - let output: Val<::bevy_math::prelude::Vec3A> = ::bevy_math::prelude::Dir3A::as_vec3a( + let output: Val<::bevy_math::Vec3A> = ::bevy_math::Dir3A::as_vec3a( &_self, ) .into(); @@ -1921,10 +1924,10 @@ pub(crate) fn register_dir_3_a_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_math::prelude::Dir3A>| { - let output: Val<::bevy_math::prelude::Dir3A> = { + |_self: Ref<::bevy_math::Dir3A>| { + let output: Val<::bevy_math::Dir3A> = { { - let output: Val<::bevy_math::prelude::Dir3A> = <::bevy_math::prelude::Dir3A as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::Dir3A> = <::bevy_math::Dir3A as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -1938,14 +1941,11 @@ pub(crate) fn register_dir_3_a_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_math::prelude::Dir3A>, - other: Ref<::bevy_math::prelude::Dir3A>| - { + |_self: Ref<::bevy_math::Dir3A>, other: Ref<::bevy_math::Dir3A>| { let output: bool = { { - let output: bool = <::bevy_math::prelude::Dir3A as ::core::cmp::PartialEq< - ::bevy_math::prelude::Dir3A, + let output: bool = <::bevy_math::Dir3A as ::core::cmp::PartialEq< + ::bevy_math::Dir3A, >>::eq(&_self, &other) .into(); output @@ -1958,10 +1958,10 @@ pub(crate) fn register_dir_3_a_functions(world: &mut World) { ) .register_documented( "fast_renormalize", - |_self: Val<::bevy_math::prelude::Dir3A>| { - let output: Val<::bevy_math::prelude::Dir3A> = { + |_self: Val<::bevy_math::Dir3A>| { + let output: Val<::bevy_math::Dir3A> = { { - let output: Val<::bevy_math::prelude::Dir3A> = ::bevy_math::prelude::Dir3A::fast_renormalize( + let output: Val<::bevy_math::Dir3A> = ::bevy_math::Dir3A::fast_renormalize( _self.into_inner(), ) .into(); @@ -1976,9 +1976,9 @@ pub(crate) fn register_dir_3_a_functions(world: &mut World) { .register_documented( "from_xyz_unchecked", |x: f32, y: f32, z: f32| { - let output: Val<::bevy_math::prelude::Dir3A> = { + let output: Val<::bevy_math::Dir3A> = { { - let output: Val<::bevy_math::prelude::Dir3A> = ::bevy_math::prelude::Dir3A::from_xyz_unchecked( + let output: Val<::bevy_math::Dir3A> = ::bevy_math::Dir3A::from_xyz_unchecked( x, y, z, @@ -1994,10 +1994,10 @@ pub(crate) fn register_dir_3_a_functions(world: &mut World) { ) .register_documented( "mul", - |_self: Val<::bevy_math::prelude::Dir3A>, rhs: f32| { - let output: Val<::bevy_math::prelude::Vec3A> = { + |_self: Val<::bevy_math::Dir3A>, rhs: f32| { + let output: Val<::bevy_math::Vec3A> = { { - let output: Val<::bevy_math::prelude::Vec3A> = <::bevy_math::prelude::Dir3A as ::core::ops::Mul< + let output: Val<::bevy_math::Vec3A> = <::bevy_math::Dir3A as ::core::ops::Mul< f32, >>::mul(_self.into_inner(), rhs) .into(); @@ -2011,10 +2011,10 @@ pub(crate) fn register_dir_3_a_functions(world: &mut World) { ) .register_documented( "neg", - |_self: Val<::bevy_math::prelude::Dir3A>| { - let output: Val<::bevy_math::prelude::Dir3A> = { + |_self: Val<::bevy_math::Dir3A>| { + let output: Val<::bevy_math::Dir3A> = { { - let output: Val<::bevy_math::prelude::Dir3A> = <::bevy_math::prelude::Dir3A as ::core::ops::Neg>::neg( + let output: Val<::bevy_math::Dir3A> = <::bevy_math::Dir3A as ::core::ops::Neg>::neg( _self.into_inner(), ) .into(); @@ -2028,10 +2028,10 @@ pub(crate) fn register_dir_3_a_functions(world: &mut World) { ) .register_documented( "new_unchecked", - |value: Val<::bevy_math::prelude::Vec3A>| { - let output: Val<::bevy_math::prelude::Dir3A> = { + |value: Val<::bevy_math::Vec3A>| { + let output: Val<::bevy_math::Dir3A> = { { - let output: Val<::bevy_math::prelude::Dir3A> = ::bevy_math::prelude::Dir3A::new_unchecked( + let output: Val<::bevy_math::Dir3A> = ::bevy_math::Dir3A::new_unchecked( value.into_inner(), ) .into(); @@ -2045,14 +2045,10 @@ pub(crate) fn register_dir_3_a_functions(world: &mut World) { ) .register_documented( "slerp", - | - _self: Val<::bevy_math::prelude::Dir3A>, - rhs: Val<::bevy_math::prelude::Dir3A>, - s: f32| - { - let output: Val<::bevy_math::prelude::Dir3A> = { + |_self: Val<::bevy_math::Dir3A>, rhs: Val<::bevy_math::Dir3A>, s: f32| { + let output: Val<::bevy_math::Dir3A> = { { - let output: Val<::bevy_math::prelude::Dir3A> = ::bevy_math::prelude::Dir3A::slerp( + let output: Val<::bevy_math::Dir3A> = ::bevy_math::Dir3A::slerp( _self.into_inner(), rhs.into_inner(), s, @@ -2070,20 +2066,20 @@ pub(crate) fn register_dir_3_a_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::prelude::Dir3A, + ::bevy_math::Dir3A, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_i_rect_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::prelude::IRect, + ::bevy_math::IRect, >::new(world) .register_documented( "as_rect", - |_self: Ref<::bevy_math::prelude::IRect>| { - let output: Val<::bevy_math::prelude::Rect> = { + |_self: Ref<::bevy_math::IRect>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::IRect::as_rect( + let output: Val<::bevy_math::Rect> = ::bevy_math::IRect::as_rect( &_self, ) .into(); @@ -2097,10 +2093,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "as_urect", - |_self: Ref<::bevy_math::prelude::IRect>| { - let output: Val<::bevy_math::prelude::URect> = { + |_self: Ref<::bevy_math::IRect>| { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::IRect::as_urect( + let output: Val<::bevy_math::URect> = ::bevy_math::IRect::as_urect( &_self, ) .into(); @@ -2114,10 +2110,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_math::prelude::IRect>| { + |_self: Ref<::bevy_math::IRect>| { let output: () = { { - let output: () = <::bevy_math::prelude::IRect as ::core::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_math::IRect as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -2131,10 +2127,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "center", - |_self: Ref<::bevy_math::prelude::IRect>| { - let output: Val<::bevy_math::prelude::IVec2> = { + |_self: Ref<::bevy_math::IRect>| { + let output: Val<::bevy_math::IVec2> = { { - let output: Val<::bevy_math::prelude::IVec2> = ::bevy_math::prelude::IRect::center( + let output: Val<::bevy_math::IVec2> = ::bevy_math::IRect::center( &_self, ) .into(); @@ -2148,10 +2144,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_math::prelude::IRect>| { - let output: Val<::bevy_math::prelude::IRect> = { + |_self: Ref<::bevy_math::IRect>| { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = <::bevy_math::prelude::IRect as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::IRect> = <::bevy_math::IRect as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -2165,13 +2161,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "contains", - | - _self: Ref<::bevy_math::prelude::IRect>, - point: Val<::bevy_math::prelude::IVec2>| - { + |_self: Ref<::bevy_math::IRect>, point: Val<::bevy_math::IVec2>| { let output: bool = { { - let output: bool = ::bevy_math::prelude::IRect::contains( + let output: bool = ::bevy_math::IRect::contains( &_self, point.into_inner(), ) @@ -2186,14 +2179,11 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_math::prelude::IRect>, - other: Ref<::bevy_math::prelude::IRect>| - { + |_self: Ref<::bevy_math::IRect>, other: Ref<::bevy_math::IRect>| { let output: bool = { { - let output: bool = <::bevy_math::prelude::IRect as ::core::cmp::PartialEq< - ::bevy_math::prelude::IRect, + let output: bool = <::bevy_math::IRect as ::core::cmp::PartialEq< + ::bevy_math::IRect, >>::eq(&_self, &other) .into(); output @@ -2206,13 +2196,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "from_center_half_size", - | - origin: Val<::bevy_math::prelude::IVec2>, - half_size: Val<::bevy_math::prelude::IVec2>| - { - let output: Val<::bevy_math::prelude::IRect> = { + |origin: Val<::bevy_math::IVec2>, half_size: Val<::bevy_math::IVec2>| { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::from_center_half_size( + let output: Val<::bevy_math::IRect> = ::bevy_math::IRect::from_center_half_size( origin.into_inner(), half_size.into_inner(), ) @@ -2227,13 +2214,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "from_center_size", - | - origin: Val<::bevy_math::prelude::IVec2>, - size: Val<::bevy_math::prelude::IVec2>| - { - let output: Val<::bevy_math::prelude::IRect> = { + |origin: Val<::bevy_math::IVec2>, size: Val<::bevy_math::IVec2>| { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::from_center_size( + let output: Val<::bevy_math::IRect> = ::bevy_math::IRect::from_center_size( origin.into_inner(), size.into_inner(), ) @@ -2248,10 +2232,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "from_corners", - |p0: Val<::bevy_math::prelude::IVec2>, p1: Val<::bevy_math::prelude::IVec2>| { - let output: Val<::bevy_math::prelude::IRect> = { + |p0: Val<::bevy_math::IVec2>, p1: Val<::bevy_math::IVec2>| { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::from_corners( + let output: Val<::bevy_math::IRect> = ::bevy_math::IRect::from_corners( p0.into_inner(), p1.into_inner(), ) @@ -2266,10 +2250,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "half_size", - |_self: Ref<::bevy_math::prelude::IRect>| { - let output: Val<::bevy_math::prelude::IVec2> = { + |_self: Ref<::bevy_math::IRect>| { + let output: Val<::bevy_math::IVec2> = { { - let output: Val<::bevy_math::prelude::IVec2> = ::bevy_math::prelude::IRect::half_size( + let output: Val<::bevy_math::IVec2> = ::bevy_math::IRect::half_size( &_self, ) .into(); @@ -2283,11 +2267,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "height", - |_self: Ref<::bevy_math::prelude::IRect>| { + |_self: Ref<::bevy_math::IRect>| { let output: i32 = { { - let output: i32 = ::bevy_math::prelude::IRect::height(&_self) - .into(); + let output: i32 = ::bevy_math::IRect::height(&_self).into(); output } }; @@ -2298,10 +2281,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "inflate", - |_self: Ref<::bevy_math::prelude::IRect>, expansion: i32| { - let output: Val<::bevy_math::prelude::IRect> = { + |_self: Ref<::bevy_math::IRect>, expansion: i32| { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::inflate( + let output: Val<::bevy_math::IRect> = ::bevy_math::IRect::inflate( &_self, expansion, ) @@ -2316,13 +2299,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "intersect", - | - _self: Ref<::bevy_math::prelude::IRect>, - other: Val<::bevy_math::prelude::IRect>| - { - let output: Val<::bevy_math::prelude::IRect> = { + |_self: Ref<::bevy_math::IRect>, other: Val<::bevy_math::IRect>| { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::intersect( + let output: Val<::bevy_math::IRect> = ::bevy_math::IRect::intersect( &_self, other.into_inner(), ) @@ -2337,11 +2317,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "is_empty", - |_self: Ref<::bevy_math::prelude::IRect>| { + |_self: Ref<::bevy_math::IRect>| { let output: bool = { { - let output: bool = ::bevy_math::prelude::IRect::is_empty(&_self) - .into(); + let output: bool = ::bevy_math::IRect::is_empty(&_self).into(); output } }; @@ -2353,9 +2332,9 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { .register_documented( "new", |x0: i32, y0: i32, x1: i32, y1: i32| { - let output: Val<::bevy_math::prelude::IRect> = { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::new( + let output: Val<::bevy_math::IRect> = ::bevy_math::IRect::new( x0, y0, x1, @@ -2372,10 +2351,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "size", - |_self: Ref<::bevy_math::prelude::IRect>| { - let output: Val<::bevy_math::prelude::IVec2> = { + |_self: Ref<::bevy_math::IRect>| { + let output: Val<::bevy_math::IVec2> = { { - let output: Val<::bevy_math::prelude::IVec2> = ::bevy_math::prelude::IRect::size( + let output: Val<::bevy_math::IVec2> = ::bevy_math::IRect::size( &_self, ) .into(); @@ -2389,13 +2368,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "union", - | - _self: Ref<::bevy_math::prelude::IRect>, - other: Val<::bevy_math::prelude::IRect>| - { - let output: Val<::bevy_math::prelude::IRect> = { + |_self: Ref<::bevy_math::IRect>, other: Val<::bevy_math::IRect>| { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::union( + let output: Val<::bevy_math::IRect> = ::bevy_math::IRect::union( &_self, other.into_inner(), ) @@ -2410,13 +2386,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "union_point", - | - _self: Ref<::bevy_math::prelude::IRect>, - other: Val<::bevy_math::prelude::IVec2>| - { - let output: Val<::bevy_math::prelude::IRect> = { + |_self: Ref<::bevy_math::IRect>, other: Val<::bevy_math::IVec2>| { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::IRect::union_point( + let output: Val<::bevy_math::IRect> = ::bevy_math::IRect::union_point( &_self, other.into_inner(), ) @@ -2431,11 +2404,10 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { ) .register_documented( "width", - |_self: Ref<::bevy_math::prelude::IRect>| { + |_self: Ref<::bevy_math::IRect>| { let output: i32 = { { - let output: i32 = ::bevy_math::prelude::IRect::width(&_self) - .into(); + let output: i32 = ::bevy_math::IRect::width(&_self).into(); output } }; @@ -2448,20 +2420,20 @@ pub(crate) fn register_i_rect_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::prelude::IRect, + ::bevy_math::IRect, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_rect_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::prelude::Rect, + ::bevy_math::Rect, >::new(world) .register_documented( "as_irect", - |_self: Ref<::bevy_math::prelude::Rect>| { - let output: Val<::bevy_math::prelude::IRect> = { + |_self: Ref<::bevy_math::Rect>| { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::Rect::as_irect( + let output: Val<::bevy_math::IRect> = ::bevy_math::Rect::as_irect( &_self, ) .into(); @@ -2475,10 +2447,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "as_urect", - |_self: Ref<::bevy_math::prelude::Rect>| { - let output: Val<::bevy_math::prelude::URect> = { + |_self: Ref<::bevy_math::Rect>| { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::Rect::as_urect( + let output: Val<::bevy_math::URect> = ::bevy_math::Rect::as_urect( &_self, ) .into(); @@ -2492,10 +2464,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "center", - |_self: Ref<::bevy_math::prelude::Rect>| { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Ref<::bevy_math::Rect>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::prelude::Rect::center( + let output: Val<::bevy_math::Vec2> = ::bevy_math::Rect::center( &_self, ) .into(); @@ -2509,10 +2481,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_math::prelude::Rect>| { - let output: Val<::bevy_math::prelude::Rect> = { + |_self: Ref<::bevy_math::Rect>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = <::bevy_math::prelude::Rect as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::Rect> = <::bevy_math::Rect as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -2526,13 +2498,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "contains", - | - _self: Ref<::bevy_math::prelude::Rect>, - point: Val<::bevy_math::prelude::Vec2>| - { + |_self: Ref<::bevy_math::Rect>, point: Val<::bevy_math::Vec2>| { let output: bool = { { - let output: bool = ::bevy_math::prelude::Rect::contains( + let output: bool = ::bevy_math::Rect::contains( &_self, point.into_inner(), ) @@ -2547,14 +2516,11 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_math::prelude::Rect>, - other: Ref<::bevy_math::prelude::Rect>| - { + |_self: Ref<::bevy_math::Rect>, other: Ref<::bevy_math::Rect>| { let output: bool = { { - let output: bool = <::bevy_math::prelude::Rect as ::core::cmp::PartialEq< - ::bevy_math::prelude::Rect, + let output: bool = <::bevy_math::Rect as ::core::cmp::PartialEq< + ::bevy_math::Rect, >>::eq(&_self, &other) .into(); output @@ -2567,13 +2533,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "from_center_half_size", - | - origin: Val<::bevy_math::prelude::Vec2>, - half_size: Val<::bevy_math::prelude::Vec2>| - { - let output: Val<::bevy_math::prelude::Rect> = { + |origin: Val<::bevy_math::Vec2>, half_size: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::from_center_half_size( + let output: Val<::bevy_math::Rect> = ::bevy_math::Rect::from_center_half_size( origin.into_inner(), half_size.into_inner(), ) @@ -2588,13 +2551,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "from_center_size", - | - origin: Val<::bevy_math::prelude::Vec2>, - size: Val<::bevy_math::prelude::Vec2>| - { - let output: Val<::bevy_math::prelude::Rect> = { + |origin: Val<::bevy_math::Vec2>, size: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::from_center_size( + let output: Val<::bevy_math::Rect> = ::bevy_math::Rect::from_center_size( origin.into_inner(), size.into_inner(), ) @@ -2609,10 +2569,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "from_corners", - |p0: Val<::bevy_math::prelude::Vec2>, p1: Val<::bevy_math::prelude::Vec2>| { - let output: Val<::bevy_math::prelude::Rect> = { + |p0: Val<::bevy_math::Vec2>, p1: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::from_corners( + let output: Val<::bevy_math::Rect> = ::bevy_math::Rect::from_corners( p0.into_inner(), p1.into_inner(), ) @@ -2627,10 +2587,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "half_size", - |_self: Ref<::bevy_math::prelude::Rect>| { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Ref<::bevy_math::Rect>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::prelude::Rect::half_size( + let output: Val<::bevy_math::Vec2> = ::bevy_math::Rect::half_size( &_self, ) .into(); @@ -2644,11 +2604,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "height", - |_self: Ref<::bevy_math::prelude::Rect>| { + |_self: Ref<::bevy_math::Rect>| { let output: f32 = { { - let output: f32 = ::bevy_math::prelude::Rect::height(&_self) - .into(); + let output: f32 = ::bevy_math::Rect::height(&_self).into(); output } }; @@ -2659,10 +2618,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "inflate", - |_self: Ref<::bevy_math::prelude::Rect>, expansion: f32| { - let output: Val<::bevy_math::prelude::Rect> = { + |_self: Ref<::bevy_math::Rect>, expansion: f32| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::inflate( + let output: Val<::bevy_math::Rect> = ::bevy_math::Rect::inflate( &_self, expansion, ) @@ -2677,13 +2636,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "intersect", - | - _self: Ref<::bevy_math::prelude::Rect>, - other: Val<::bevy_math::prelude::Rect>| - { - let output: Val<::bevy_math::prelude::Rect> = { + |_self: Ref<::bevy_math::Rect>, other: Val<::bevy_math::Rect>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::intersect( + let output: Val<::bevy_math::Rect> = ::bevy_math::Rect::intersect( &_self, other.into_inner(), ) @@ -2698,11 +2654,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "is_empty", - |_self: Ref<::bevy_math::prelude::Rect>| { + |_self: Ref<::bevy_math::Rect>| { let output: bool = { { - let output: bool = ::bevy_math::prelude::Rect::is_empty(&_self) - .into(); + let output: bool = ::bevy_math::Rect::is_empty(&_self).into(); output } }; @@ -2714,9 +2669,9 @@ pub(crate) fn register_rect_functions(world: &mut World) { .register_documented( "new", |x0: f32, y0: f32, x1: f32, y1: f32| { - let output: Val<::bevy_math::prelude::Rect> = { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::new( + let output: Val<::bevy_math::Rect> = ::bevy_math::Rect::new( x0, y0, x1, @@ -2733,13 +2688,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "normalize", - | - _self: Ref<::bevy_math::prelude::Rect>, - other: Val<::bevy_math::prelude::Rect>| - { - let output: Val<::bevy_math::prelude::Rect> = { + |_self: Ref<::bevy_math::Rect>, other: Val<::bevy_math::Rect>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::normalize( + let output: Val<::bevy_math::Rect> = ::bevy_math::Rect::normalize( &_self, other.into_inner(), ) @@ -2754,10 +2706,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "size", - |_self: Ref<::bevy_math::prelude::Rect>| { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Ref<::bevy_math::Rect>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::prelude::Rect::size( + let output: Val<::bevy_math::Vec2> = ::bevy_math::Rect::size( &_self, ) .into(); @@ -2771,13 +2723,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "union", - | - _self: Ref<::bevy_math::prelude::Rect>, - other: Val<::bevy_math::prelude::Rect>| - { - let output: Val<::bevy_math::prelude::Rect> = { + |_self: Ref<::bevy_math::Rect>, other: Val<::bevy_math::Rect>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::union( + let output: Val<::bevy_math::Rect> = ::bevy_math::Rect::union( &_self, other.into_inner(), ) @@ -2792,13 +2741,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "union_point", - | - _self: Ref<::bevy_math::prelude::Rect>, - other: Val<::bevy_math::prelude::Vec2>| - { - let output: Val<::bevy_math::prelude::Rect> = { + |_self: Ref<::bevy_math::Rect>, other: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::Rect::union_point( + let output: Val<::bevy_math::Rect> = ::bevy_math::Rect::union_point( &_self, other.into_inner(), ) @@ -2813,11 +2759,10 @@ pub(crate) fn register_rect_functions(world: &mut World) { ) .register_documented( "width", - |_self: Ref<::bevy_math::prelude::Rect>| { + |_self: Ref<::bevy_math::Rect>| { let output: f32 = { { - let output: f32 = ::bevy_math::prelude::Rect::width(&_self) - .into(); + let output: f32 = ::bevy_math::Rect::width(&_self).into(); output } }; @@ -2830,20 +2775,20 @@ pub(crate) fn register_rect_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::prelude::Rect, + ::bevy_math::Rect, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_u_rect_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::prelude::URect, + ::bevy_math::URect, >::new(world) .register_documented( "as_irect", - |_self: Ref<::bevy_math::prelude::URect>| { - let output: Val<::bevy_math::prelude::IRect> = { + |_self: Ref<::bevy_math::URect>| { + let output: Val<::bevy_math::IRect> = { { - let output: Val<::bevy_math::prelude::IRect> = ::bevy_math::prelude::URect::as_irect( + let output: Val<::bevy_math::IRect> = ::bevy_math::URect::as_irect( &_self, ) .into(); @@ -2857,10 +2802,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "as_rect", - |_self: Ref<::bevy_math::prelude::URect>| { - let output: Val<::bevy_math::prelude::Rect> = { + |_self: Ref<::bevy_math::URect>| { + let output: Val<::bevy_math::Rect> = { { - let output: Val<::bevy_math::prelude::Rect> = ::bevy_math::prelude::URect::as_rect( + let output: Val<::bevy_math::Rect> = ::bevy_math::URect::as_rect( &_self, ) .into(); @@ -2874,10 +2819,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_math::prelude::URect>| { + |_self: Ref<::bevy_math::URect>| { let output: () = { { - let output: () = <::bevy_math::prelude::URect as ::core::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_math::URect as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -2891,10 +2836,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "center", - |_self: Ref<::bevy_math::prelude::URect>| { - let output: Val<::bevy_math::prelude::UVec2> = { + |_self: Ref<::bevy_math::URect>| { + let output: Val<::bevy_math::UVec2> = { { - let output: Val<::bevy_math::prelude::UVec2> = ::bevy_math::prelude::URect::center( + let output: Val<::bevy_math::UVec2> = ::bevy_math::URect::center( &_self, ) .into(); @@ -2908,10 +2853,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_math::prelude::URect>| { - let output: Val<::bevy_math::prelude::URect> = { + |_self: Ref<::bevy_math::URect>| { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = <::bevy_math::prelude::URect as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::URect> = <::bevy_math::URect as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -2925,13 +2870,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "contains", - | - _self: Ref<::bevy_math::prelude::URect>, - point: Val<::bevy_math::prelude::UVec2>| - { + |_self: Ref<::bevy_math::URect>, point: Val<::bevy_math::UVec2>| { let output: bool = { { - let output: bool = ::bevy_math::prelude::URect::contains( + let output: bool = ::bevy_math::URect::contains( &_self, point.into_inner(), ) @@ -2946,14 +2888,11 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_math::prelude::URect>, - other: Ref<::bevy_math::prelude::URect>| - { + |_self: Ref<::bevy_math::URect>, other: Ref<::bevy_math::URect>| { let output: bool = { { - let output: bool = <::bevy_math::prelude::URect as ::core::cmp::PartialEq< - ::bevy_math::prelude::URect, + let output: bool = <::bevy_math::URect as ::core::cmp::PartialEq< + ::bevy_math::URect, >>::eq(&_self, &other) .into(); output @@ -2966,13 +2905,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "from_center_half_size", - | - origin: Val<::bevy_math::prelude::UVec2>, - half_size: Val<::bevy_math::prelude::UVec2>| - { - let output: Val<::bevy_math::prelude::URect> = { + |origin: Val<::bevy_math::UVec2>, half_size: Val<::bevy_math::UVec2>| { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::from_center_half_size( + let output: Val<::bevy_math::URect> = ::bevy_math::URect::from_center_half_size( origin.into_inner(), half_size.into_inner(), ) @@ -2987,13 +2923,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "from_center_size", - | - origin: Val<::bevy_math::prelude::UVec2>, - size: Val<::bevy_math::prelude::UVec2>| - { - let output: Val<::bevy_math::prelude::URect> = { + |origin: Val<::bevy_math::UVec2>, size: Val<::bevy_math::UVec2>| { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::from_center_size( + let output: Val<::bevy_math::URect> = ::bevy_math::URect::from_center_size( origin.into_inner(), size.into_inner(), ) @@ -3008,10 +2941,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "from_corners", - |p0: Val<::bevy_math::prelude::UVec2>, p1: Val<::bevy_math::prelude::UVec2>| { - let output: Val<::bevy_math::prelude::URect> = { + |p0: Val<::bevy_math::UVec2>, p1: Val<::bevy_math::UVec2>| { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::from_corners( + let output: Val<::bevy_math::URect> = ::bevy_math::URect::from_corners( p0.into_inner(), p1.into_inner(), ) @@ -3026,10 +2959,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "half_size", - |_self: Ref<::bevy_math::prelude::URect>| { - let output: Val<::bevy_math::prelude::UVec2> = { + |_self: Ref<::bevy_math::URect>| { + let output: Val<::bevy_math::UVec2> = { { - let output: Val<::bevy_math::prelude::UVec2> = ::bevy_math::prelude::URect::half_size( + let output: Val<::bevy_math::UVec2> = ::bevy_math::URect::half_size( &_self, ) .into(); @@ -3043,11 +2976,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "height", - |_self: Ref<::bevy_math::prelude::URect>| { + |_self: Ref<::bevy_math::URect>| { let output: u32 = { { - let output: u32 = ::bevy_math::prelude::URect::height(&_self) - .into(); + let output: u32 = ::bevy_math::URect::height(&_self).into(); output } }; @@ -3058,10 +2990,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "inflate", - |_self: Ref<::bevy_math::prelude::URect>, expansion: i32| { - let output: Val<::bevy_math::prelude::URect> = { + |_self: Ref<::bevy_math::URect>, expansion: i32| { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::inflate( + let output: Val<::bevy_math::URect> = ::bevy_math::URect::inflate( &_self, expansion, ) @@ -3076,13 +3008,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "intersect", - | - _self: Ref<::bevy_math::prelude::URect>, - other: Val<::bevy_math::prelude::URect>| - { - let output: Val<::bevy_math::prelude::URect> = { + |_self: Ref<::bevy_math::URect>, other: Val<::bevy_math::URect>| { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::intersect( + let output: Val<::bevy_math::URect> = ::bevy_math::URect::intersect( &_self, other.into_inner(), ) @@ -3097,11 +3026,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "is_empty", - |_self: Ref<::bevy_math::prelude::URect>| { + |_self: Ref<::bevy_math::URect>| { let output: bool = { { - let output: bool = ::bevy_math::prelude::URect::is_empty(&_self) - .into(); + let output: bool = ::bevy_math::URect::is_empty(&_self).into(); output } }; @@ -3113,9 +3041,9 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { .register_documented( "new", |x0: u32, y0: u32, x1: u32, y1: u32| { - let output: Val<::bevy_math::prelude::URect> = { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::new( + let output: Val<::bevy_math::URect> = ::bevy_math::URect::new( x0, y0, x1, @@ -3132,10 +3060,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "size", - |_self: Ref<::bevy_math::prelude::URect>| { - let output: Val<::bevy_math::prelude::UVec2> = { + |_self: Ref<::bevy_math::URect>| { + let output: Val<::bevy_math::UVec2> = { { - let output: Val<::bevy_math::prelude::UVec2> = ::bevy_math::prelude::URect::size( + let output: Val<::bevy_math::UVec2> = ::bevy_math::URect::size( &_self, ) .into(); @@ -3149,13 +3077,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "union", - | - _self: Ref<::bevy_math::prelude::URect>, - other: Val<::bevy_math::prelude::URect>| - { - let output: Val<::bevy_math::prelude::URect> = { + |_self: Ref<::bevy_math::URect>, other: Val<::bevy_math::URect>| { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::union( + let output: Val<::bevy_math::URect> = ::bevy_math::URect::union( &_self, other.into_inner(), ) @@ -3170,13 +3095,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "union_point", - | - _self: Ref<::bevy_math::prelude::URect>, - other: Val<::bevy_math::prelude::UVec2>| - { - let output: Val<::bevy_math::prelude::URect> = { + |_self: Ref<::bevy_math::URect>, other: Val<::bevy_math::UVec2>| { + let output: Val<::bevy_math::URect> = { { - let output: Val<::bevy_math::prelude::URect> = ::bevy_math::prelude::URect::union_point( + let output: Val<::bevy_math::URect> = ::bevy_math::URect::union_point( &_self, other.into_inner(), ) @@ -3191,11 +3113,10 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { ) .register_documented( "width", - |_self: Ref<::bevy_math::prelude::URect>| { + |_self: Ref<::bevy_math::URect>| { let output: u32 = { { - let output: u32 = ::bevy_math::prelude::URect::width(&_self) - .into(); + let output: u32 = ::bevy_math::URect::width(&_self).into(); output } }; @@ -3208,18 +3129,21 @@ pub(crate) fn register_u_rect_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::prelude::URect, + ::bevy_math::URect, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_affine_3_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::bevy_math::Affine3>::new( - world, - ); + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::Affine3, + >::new(world); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_math::Affine3, bevy_mod_scripting_bindings::MarkAsGenerated>(); + .register_type_data::< + ::bevy_math::Affine3, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } pub(crate) fn register_aabb_2_d_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< @@ -3261,13 +3185,10 @@ pub(crate) fn register_aabb_2_d_functions(world: &mut World) { ) .register_documented( "closest_point", - | - _self: Ref<::bevy_math::bounding::Aabb2d>, - point: Val<::bevy_math::prelude::Vec2>| - { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Ref<::bevy_math::bounding::Aabb2d>, point: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::bounding::Aabb2d::closest_point( + let output: Val<::bevy_math::Vec2> = ::bevy_math::bounding::Aabb2d::closest_point( &_self, point.into_inner(), ) @@ -3302,10 +3223,7 @@ pub(crate) fn register_aabb_2_d_functions(world: &mut World) { ) .register_documented( "new", - | - center: Val<::bevy_math::prelude::Vec2>, - half_size: Val<::bevy_math::prelude::Vec2>| - { + |center: Val<::bevy_math::Vec2>, half_size: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::bounding::Aabb2d> = { { let output: Val<::bevy_math::bounding::Aabb2d> = ::bevy_math::bounding::Aabb2d::new( @@ -3371,11 +3289,11 @@ pub(crate) fn register_bounding_circle_functions(world: &mut World) { "closest_point", | _self: Ref<::bevy_math::bounding::BoundingCircle>, - point: Val<::bevy_math::prelude::Vec2>| + point: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::bounding::BoundingCircle::closest_point( + let output: Val<::bevy_math::Vec2> = ::bevy_math::bounding::BoundingCircle::closest_point( &_self, point.into_inner(), ) @@ -3410,7 +3328,7 @@ pub(crate) fn register_bounding_circle_functions(world: &mut World) { ) .register_documented( "new", - |center: Val<::bevy_math::prelude::Vec2>, radius: f32| { + |center: Val<::bevy_math::Vec2>, radius: f32| { let output: Val<::bevy_math::bounding::BoundingCircle> = { { let output: Val<::bevy_math::bounding::BoundingCircle> = ::bevy_math::bounding::BoundingCircle::new( @@ -3474,13 +3392,10 @@ pub(crate) fn register_circle_functions(world: &mut World) { ) .register_documented( "closest_point", - | - _self: Ref<::bevy_math::primitives::Circle>, - point: Val<::bevy_math::prelude::Vec2>| - { - let output: Val<::bevy_math::prelude::Vec2> = { + |_self: Ref<::bevy_math::primitives::Circle>, point: Val<::bevy_math::Vec2>| { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Circle::closest_point( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Circle::closest_point( &_self, point.into_inner(), ) @@ -3580,11 +3495,11 @@ pub(crate) fn register_annulus_functions(world: &mut World) { "closest_point", | _self: Ref<::bevy_math::primitives::Annulus>, - point: Val<::bevy_math::prelude::Vec2>| + point: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Annulus::closest_point( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Annulus::closest_point( &_self, point.into_inner(), ) @@ -3731,9 +3646,9 @@ pub(crate) fn register_arc_2_d_functions(world: &mut World) { .register_documented( "chord_midpoint", |_self: Ref<::bevy_math::primitives::Arc2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Arc2d::chord_midpoint( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Arc2d::chord_midpoint( &_self, ) .into(); @@ -3890,9 +3805,9 @@ pub(crate) fn register_arc_2_d_functions(world: &mut World) { .register_documented( "left_endpoint", |_self: Ref<::bevy_math::primitives::Arc2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Arc2d::left_endpoint( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Arc2d::left_endpoint( &_self, ) .into(); @@ -3922,9 +3837,9 @@ pub(crate) fn register_arc_2_d_functions(world: &mut World) { .register_documented( "midpoint", |_self: Ref<::bevy_math::primitives::Arc2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Arc2d::midpoint( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Arc2d::midpoint( &_self, ) .into(); @@ -3957,9 +3872,9 @@ pub(crate) fn register_arc_2_d_functions(world: &mut World) { .register_documented( "right_endpoint", |_self: Ref<::bevy_math::primitives::Arc2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Arc2d::right_endpoint( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Arc2d::right_endpoint( &_self, ) .into(); @@ -3998,71 +3913,78 @@ pub(crate) fn register_capsule_2_d_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_math::primitives::Capsule2d, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::Capsule2d>| { - let output: Val<::bevy_math::primitives::Capsule2d> = { - { - let output: Val<::bevy_math::primitives::Capsule2d> = - <::bevy_math::primitives::Capsule2d as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::primitives::Capsule2d>, - other: Ref<::bevy_math::primitives::Capsule2d>| { - let output: bool = { - { - let output: bool = - <::bevy_math::primitives::Capsule2d as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_math::primitives::Capsule2d>| { + let output: Val<::bevy_math::primitives::Capsule2d> = { + { + let output: Val<::bevy_math::primitives::Capsule2d> = <::bevy_math::primitives::Capsule2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::primitives::Capsule2d>, + other: Ref<::bevy_math::primitives::Capsule2d>| + { + let output: bool = { + { + let output: bool = <::bevy_math::primitives::Capsule2d as ::core::cmp::PartialEq< ::bevy_math::primitives::Capsule2d, >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "new", - |radius: f32, length: f32| { - let output: Val<::bevy_math::primitives::Capsule2d> = { - { - let output: Val<::bevy_math::primitives::Capsule2d> = - ::bevy_math::primitives::Capsule2d::new(radius, length).into(); - output - } - }; - output - }, - " Create a new `Capsule2d` from a radius and length", - &["radius", "length"], - ) - .register_documented( - "to_inner_rectangle", - |_self: Ref<::bevy_math::primitives::Capsule2d>| { - let output: Val<::bevy_math::primitives::Rectangle> = { - { - let output: Val<::bevy_math::primitives::Rectangle> = - ::bevy_math::primitives::Capsule2d::to_inner_rectangle(&_self).into(); - output - } - }; - output - }, - " Get the part connecting the semicircular ends of the capsule as a [`Rectangle`]", - &["_self"], - ); + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "new", + |radius: f32, length: f32| { + let output: Val<::bevy_math::primitives::Capsule2d> = { + { + let output: Val<::bevy_math::primitives::Capsule2d> = ::bevy_math::primitives::Capsule2d::new( + radius, + length, + ) + .into(); + output + } + }; + output + }, + " Create a new `Capsule2d` from a radius and length", + &["radius", "length"], + ) + .register_documented( + "to_inner_rectangle", + |_self: Ref<::bevy_math::primitives::Capsule2d>| { + let output: Val<::bevy_math::primitives::Rectangle> = { + { + let output: Val<::bevy_math::primitives::Rectangle> = ::bevy_math::primitives::Capsule2d::to_inner_rectangle( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the part connecting the semicircular ends of the capsule as a [`Rectangle`]", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -4146,9 +4068,9 @@ pub(crate) fn register_circular_sector_functions(world: &mut World) { .register_documented( "chord_midpoint", |_self: Ref<::bevy_math::primitives::CircularSector>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::CircularSector::chord_midpoint( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::CircularSector::chord_midpoint( &_self, ) .into(); @@ -4420,9 +4342,9 @@ pub(crate) fn register_circular_segment_functions(world: &mut World) { .register_documented( "chord_midpoint", |_self: Ref<::bevy_math::primitives::CircularSegment>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::CircularSegment::chord_midpoint( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::CircularSegment::chord_midpoint( &_self, ) .into(); @@ -4696,7 +4618,7 @@ pub(crate) fn register_ellipse_functions(world: &mut World) { ) .register_documented( "from_size", - |size: Val<::bevy_math::prelude::Vec2>| { + |size: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::primitives::Ellipse> = { { let output: Val<::bevy_math::primitives::Ellipse> = ::bevy_math::primitives::Ellipse::from_size( @@ -4775,41 +4697,43 @@ pub(crate) fn register_line_2_d_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_math::primitives::Line2d, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::Line2d>| { - let output: Val<::bevy_math::primitives::Line2d> = { - { - let output: Val<::bevy_math::primitives::Line2d> = - <::bevy_math::primitives::Line2d as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::primitives::Line2d>, - other: Ref<::bevy_math::primitives::Line2d>| { - let output: bool = { - { - let output: bool = - <::bevy_math::primitives::Line2d as ::core::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_math::primitives::Line2d>| { + let output: Val<::bevy_math::primitives::Line2d> = { + { + let output: Val<::bevy_math::primitives::Line2d> = <::bevy_math::primitives::Line2d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::primitives::Line2d>, + other: Ref<::bevy_math::primitives::Line2d>| + { + let output: bool = { + { + let output: bool = <::bevy_math::primitives::Line2d as ::core::cmp::PartialEq< ::bevy_math::primitives::Line2d, >>::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 @@ -4861,7 +4785,7 @@ pub(crate) fn register_plane_2_d_functions(world: &mut World) { ) .register_documented( "new", - |normal: Val<::bevy_math::prelude::Vec2>| { + |normal: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::primitives::Plane2d> = { { let output: Val<::bevy_math::primitives::Plane2d> = ::bevy_math::primitives::Plane2d::new( @@ -4909,11 +4833,11 @@ pub(crate) fn register_rectangle_functions(world: &mut World) { "closest_point", | _self: Ref<::bevy_math::primitives::Rectangle>, - point: Val<::bevy_math::prelude::Vec2>| + point: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Rectangle::closest_point( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Rectangle::closest_point( &_self, point.into_inner(), ) @@ -4948,10 +4872,7 @@ pub(crate) fn register_rectangle_functions(world: &mut World) { ) .register_documented( "from_corners", - | - point1: Val<::bevy_math::prelude::Vec2>, - point2: Val<::bevy_math::prelude::Vec2>| - { + |point1: Val<::bevy_math::Vec2>, point2: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::primitives::Rectangle> = { { let output: Val<::bevy_math::primitives::Rectangle> = ::bevy_math::primitives::Rectangle::from_corners( @@ -4986,7 +4907,7 @@ pub(crate) fn register_rectangle_functions(world: &mut World) { ) .register_documented( "from_size", - |size: Val<::bevy_math::prelude::Vec2>| { + |size: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::primitives::Rectangle> = { { let output: Val<::bevy_math::primitives::Rectangle> = ::bevy_math::primitives::Rectangle::from_size( @@ -5022,9 +4943,9 @@ pub(crate) fn register_rectangle_functions(world: &mut World) { .register_documented( "size", |_self: Ref<::bevy_math::primitives::Rectangle>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Rectangle::size( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Rectangle::size( &_self, ) .into(); @@ -5272,11 +5193,11 @@ pub(crate) fn register_rhombus_functions(world: &mut World) { "closest_point", | _self: Ref<::bevy_math::primitives::Rhombus>, - point: Val<::bevy_math::prelude::Vec2>| + point: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Rhombus::closest_point( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Rhombus::closest_point( &_self, point.into_inner(), ) @@ -5408,9 +5329,9 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { .register_documented( "center", |_self: Ref<::bevy_math::primitives::Segment2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Segment2d::center( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Segment2d::center( &_self, ) .into(); @@ -5456,12 +5377,33 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "closest_point", + | + _self: Ref<::bevy_math::primitives::Segment2d>, + point: Val<::bevy_math::Vec2>| + { + let output: Val<::bevy_math::Vec2> = { + { + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Segment2d::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the point on the [`Segment2d`] that is closest to the specified `point`.", + &["_self", "point"], + ) .register_documented( "direction", |_self: Ref<::bevy_math::primitives::Segment2d>| { - let output: Val<::bevy_math::prelude::Dir2> = { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::primitives::Segment2d::direction( + let output: Val<::bevy_math::Dir2> = ::bevy_math::primitives::Segment2d::direction( &_self, ) .into(); @@ -5495,7 +5437,7 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { ) .register_documented( "from_direction_and_length", - |direction: Val<::bevy_math::prelude::Dir2>, length: f32| { + |direction: Val<::bevy_math::Dir2>, length: f32| { let output: Val<::bevy_math::primitives::Segment2d> = { { let output: Val<::bevy_math::primitives::Segment2d> = ::bevy_math::primitives::Segment2d::from_direction_and_length( @@ -5531,7 +5473,7 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { ) .register_documented( "from_scaled_direction", - |scaled_direction: Val<::bevy_math::prelude::Vec2>| { + |scaled_direction: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::primitives::Segment2d> = { { let output: Val<::bevy_math::primitives::Segment2d> = ::bevy_math::primitives::Segment2d::from_scaled_direction( @@ -5549,9 +5491,9 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { .register_documented( "left_normal", |_self: Ref<::bevy_math::primitives::Segment2d>| { - let output: Val<::bevy_math::prelude::Dir2> = { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::primitives::Segment2d::left_normal( + let output: Val<::bevy_math::Dir2> = ::bevy_math::primitives::Segment2d::left_normal( &_self, ) .into(); @@ -5599,10 +5541,7 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { ) .register_documented( "new", - | - point1: Val<::bevy_math::prelude::Vec2>, - point2: Val<::bevy_math::prelude::Vec2>| - { + |point1: Val<::bevy_math::Vec2>, point2: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::primitives::Segment2d> = { { let output: Val<::bevy_math::primitives::Segment2d> = ::bevy_math::primitives::Segment2d::new( @@ -5621,9 +5560,9 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { .register_documented( "point1", |_self: Ref<::bevy_math::primitives::Segment2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Segment2d::point1( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Segment2d::point1( &_self, ) .into(); @@ -5638,9 +5577,9 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { .register_documented( "point2", |_self: Ref<::bevy_math::primitives::Segment2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Segment2d::point2( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Segment2d::point2( &_self, ) .into(); @@ -5707,9 +5646,9 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { .register_documented( "right_normal", |_self: Ref<::bevy_math::primitives::Segment2d>| { - let output: Val<::bevy_math::prelude::Dir2> = { + let output: Val<::bevy_math::Dir2> = { { - let output: Val<::bevy_math::prelude::Dir2> = ::bevy_math::primitives::Segment2d::right_normal( + let output: Val<::bevy_math::Dir2> = ::bevy_math::primitives::Segment2d::right_normal( &_self, ) .into(); @@ -5747,7 +5686,7 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { | _self: Ref<::bevy_math::primitives::Segment2d>, rotation: Val<::bevy_math::Rot2>, - point: Val<::bevy_math::prelude::Vec2>| + point: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::primitives::Segment2d> = { { @@ -5789,9 +5728,9 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { .register_documented( "scaled_direction", |_self: Ref<::bevy_math::primitives::Segment2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Segment2d::scaled_direction( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Segment2d::scaled_direction( &_self, ) .into(); @@ -5806,9 +5745,9 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { .register_documented( "scaled_left_normal", |_self: Ref<::bevy_math::primitives::Segment2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Segment2d::scaled_left_normal( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Segment2d::scaled_left_normal( &_self, ) .into(); @@ -5823,9 +5762,9 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { .register_documented( "scaled_right_normal", |_self: Ref<::bevy_math::primitives::Segment2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { + let output: Val<::bevy_math::Vec2> = { { - let output: Val<::bevy_math::prelude::Vec2> = ::bevy_math::primitives::Segment2d::scaled_right_normal( + let output: Val<::bevy_math::Vec2> = ::bevy_math::primitives::Segment2d::scaled_right_normal( &_self, ) .into(); @@ -5841,7 +5780,7 @@ pub(crate) fn register_segment_2_d_functions(world: &mut World) { "translated", | _self: Ref<::bevy_math::primitives::Segment2d>, - translation: Val<::bevy_math::prelude::Vec2>| + translation: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::primitives::Segment2d> = { { @@ -5961,9 +5900,9 @@ pub(crate) fn register_triangle_2_d_functions(world: &mut World) { .register_documented( "new", | - a: Val<::bevy_math::prelude::Vec2>, - b: Val<::bevy_math::prelude::Vec2>, - c: Val<::bevy_math::prelude::Vec2>| + a: Val<::bevy_math::Vec2>, + b: Val<::bevy_math::Vec2>, + c: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::primitives::Triangle2d> = { { @@ -6023,154 +5962,16 @@ pub(crate) fn register_triangle_2_d_functions(world: &mut World) { 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, - >::new(world) - .register_documented( - "bounding_sphere", - |_self: Ref<::bevy_math::bounding::Aabb3d>| { - let output: Val<::bevy_math::bounding::BoundingSphere> = { - { - let output: Val<::bevy_math::bounding::BoundingSphere> = - ::bevy_math::bounding::Aabb3d::bounding_sphere(&_self).into(); - output - } - }; - output - }, - " Computes the smallest [`BoundingSphere`] containing this [`Aabb3d`].", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_math::bounding::Aabb3d>| { - let output: Val<::bevy_math::bounding::Aabb3d> = { - { - let output: Val<::bevy_math::bounding::Aabb3d> = - <::bevy_math::bounding::Aabb3d as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::bounding::Aabb3d>, other: Ref<::bevy_math::bounding::Aabb3d>| { - let output: bool = { - { - let output: bool = <::bevy_math::bounding::Aabb3d as ::core::cmp::PartialEq< - ::bevy_math::bounding::Aabb3d, - >>::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_math::bounding::Aabb3d, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_bounding_sphere_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::bounding::BoundingSphere, - >::new(world) - .register_documented( - "aabb_3d", - |_self: Ref<::bevy_math::bounding::BoundingSphere>| { - let output: Val<::bevy_math::bounding::Aabb3d> = { - { - let output: Val<::bevy_math::bounding::Aabb3d> = - ::bevy_math::bounding::BoundingSphere::aabb_3d(&_self).into(); - output - } - }; - output - }, - " Computes the smallest [`Aabb3d`] containing this [`BoundingSphere`].", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_math::bounding::BoundingSphere>| { - let output: Val<::bevy_math::bounding::BoundingSphere> = { - { - let output: Val<::bevy_math::bounding::BoundingSphere> = - <::bevy_math::bounding::BoundingSphere as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::bounding::BoundingSphere>, - other: Ref<::bevy_math::bounding::BoundingSphere>| { - let output: bool = { - { - let output: bool = - <::bevy_math::bounding::BoundingSphere as ::core::cmp::PartialEq< - ::bevy_math::bounding::BoundingSphere, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "radius", - |_self: Ref<::bevy_math::bounding::BoundingSphere>| { - let output: f32 = { - { - let output: f32 = ::bevy_math::bounding::BoundingSphere::radius(&_self).into(); - output - } - }; - output - }, - " Get the radius of the bounding sphere", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_math::bounding::BoundingSphere, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_sphere_functions(world: &mut World) { +pub(crate) fn register_convex_polygon_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Sphere, + ::bevy_math::primitives::ConvexPolygon, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_math::primitives::Sphere>| { - let output: Val<::bevy_math::primitives::Sphere> = { + |_self: Ref<::bevy_math::primitives::ConvexPolygon>| { + let output: Val<::bevy_math::primitives::ConvexPolygon> = { { - let output: Val<::bevy_math::primitives::Sphere> = <::bevy_math::primitives::Sphere as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::primitives::ConvexPolygon> = <::bevy_math::primitives::ConvexPolygon as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -6183,32 +5984,43 @@ pub(crate) fn register_sphere_functions(world: &mut World) { &["_self"], ) .register_documented( - "closest_point", + "eq", | - _self: Ref<::bevy_math::primitives::Sphere>, - point: Val<::bevy_math::prelude::Vec3>| + _self: Ref<::bevy_math::primitives::ConvexPolygon>, + other: Ref<::bevy_math::primitives::ConvexPolygon>| { - let output: Val<::bevy_math::prelude::Vec3> = { + let output: bool = { { - let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Sphere::closest_point( - &_self, - point.into_inner(), - ) + let output: bool = <::bevy_math::primitives::ConvexPolygon as ::core::cmp::PartialEq< + ::bevy_math::primitives::ConvexPolygon, + >>::eq(&_self, &other) .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"], - ) + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::primitives::ConvexPolygon, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_polygon_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::Polygon, + >::new(world) .register_documented( - "diameter", - |_self: Ref<::bevy_math::primitives::Sphere>| { - let output: f32 = { + "clone", + |_self: Ref<::bevy_math::primitives::Polygon>| { + let output: Val<::bevy_math::primitives::Polygon> = { { - let output: f32 = ::bevy_math::primitives::Sphere::diameter( + let output: Val<::bevy_math::primitives::Polygon> = <::bevy_math::primitives::Polygon as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -6217,19 +6029,19 @@ pub(crate) fn register_sphere_functions(world: &mut World) { }; output }, - " Get the diameter of the sphere", + "", &["_self"], ) .register_documented( "eq", | - _self: Ref<::bevy_math::primitives::Sphere>, - other: Ref<::bevy_math::primitives::Sphere>| + _self: Ref<::bevy_math::primitives::Polygon>, + other: Ref<::bevy_math::primitives::Polygon>| { let output: bool = { { - let output: bool = <::bevy_math::primitives::Sphere as ::core::cmp::PartialEq< - ::bevy_math::primitives::Sphere, + let output: bool = <::bevy_math::primitives::Polygon as ::core::cmp::PartialEq< + ::bevy_math::primitives::Polygon, >>::eq(&_self, &other) .into(); output @@ -6241,12 +6053,12 @@ pub(crate) fn register_sphere_functions(world: &mut World) { &["_self", "other"], ) .register_documented( - "new", - |radius: f32| { - let output: Val<::bevy_math::primitives::Sphere> = { + "is_simple", + |_self: Ref<::bevy_math::primitives::Polygon>| { + let output: bool = { { - let output: Val<::bevy_math::primitives::Sphere> = ::bevy_math::primitives::Sphere::new( - radius, + let output: bool = ::bevy_math::primitives::Polygon::is_simple( + &_self, ) .into(); output @@ -6254,27 +6066,27 @@ pub(crate) fn register_sphere_functions(world: &mut World) { }; output }, - " Create a new [`Sphere`] from a `radius`", - &["radius"], + " Tests if the polygon is simple.\n A polygon is simple if it is not self intersecting and not self tangent.\n As such, no two edges of the polygon may cross each other and each vertex must not lie on another edge.", + &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::primitives::Sphere, + ::bevy_math::primitives::Polygon, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_cuboid_functions(world: &mut World) { +pub(crate) fn register_polyline_2_d_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Cuboid, + ::bevy_math::primitives::Polyline2d, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_math::primitives::Cuboid>| { - let output: Val<::bevy_math::primitives::Cuboid> = { + |_self: Ref<::bevy_math::primitives::Polyline2d>| { + let output: Val<::bevy_math::primitives::Polyline2d> = { { - let output: Val<::bevy_math::primitives::Cuboid> = <::bevy_math::primitives::Cuboid as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::primitives::Polyline2d> = <::bevy_math::primitives::Polyline2d as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -6286,37 +6098,16 @@ pub(crate) fn register_cuboid_functions(world: &mut World) { "", &["_self"], ) - .register_documented( - "closest_point", - | - _self: Ref<::bevy_math::primitives::Cuboid>, - point: Val<::bevy_math::prelude::Vec3>| - { - let output: Val<::bevy_math::prelude::Vec3> = { - { - let output: Val<::bevy_math::prelude::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>| + _self: Ref<::bevy_math::primitives::Polyline2d>, + other: Ref<::bevy_math::primitives::Polyline2d>| { let output: bool = { { - let output: bool = <::bevy_math::primitives::Cuboid as ::core::cmp::PartialEq< - ::bevy_math::primitives::Cuboid, + let output: bool = <::bevy_math::primitives::Polyline2d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Polyline2d, >>::eq(&_self, &other) .into(); output @@ -6328,16 +6119,18 @@ pub(crate) fn register_cuboid_functions(world: &mut World) { &["_self", "other"], ) .register_documented( - "from_corners", + "with_subdivisions", | - point1: Val<::bevy_math::prelude::Vec3>, - point2: Val<::bevy_math::prelude::Vec3>| + start: Val<::bevy_math::Vec2>, + end: Val<::bevy_math::Vec2>, + subdivisions: usize| { - let output: Val<::bevy_math::primitives::Cuboid> = { + let output: Val<::bevy_math::primitives::Polyline2d> = { { - let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_corners( - point1.into_inner(), - point2.into_inner(), + let output: Val<::bevy_math::primitives::Polyline2d> = ::bevy_math::primitives::Polyline2d::with_subdivisions( + start.into_inner(), + end.into_inner(), + subdivisions, ) .into(); output @@ -6345,16 +6138,28 @@ pub(crate) fn register_cuboid_functions(world: &mut World) { }; output }, - " Create a new `Cuboid` from two corner points", - &["point1", "point2"], - ) + " Create a new `Polyline2d` from two endpoints with subdivision points.\n `subdivisions = 0` creates a simple line with just start and end points.\n `subdivisions = 1` adds one point in the middle, creating 2 segments, etc.", + &["start", "end", "subdivisions"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::primitives::Polyline2d, + 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, + >::new(world) .register_documented( - "from_length", - |length: f32| { - let output: Val<::bevy_math::primitives::Cuboid> = { + "bounding_sphere", + |_self: Ref<::bevy_math::bounding::Aabb3d>| { + let output: Val<::bevy_math::bounding::BoundingSphere> = { { - let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_length( - length, + let output: Val<::bevy_math::bounding::BoundingSphere> = ::bevy_math::bounding::Aabb3d::bounding_sphere( + &_self, ) .into(); output @@ -6362,16 +6167,16 @@ 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"], + " Computes the smallest [`BoundingSphere`] containing this [`Aabb3d`].", + &["_self"], ) .register_documented( - "from_size", - |size: Val<::bevy_math::prelude::Vec3>| { - let output: Val<::bevy_math::primitives::Cuboid> = { + "clone", + |_self: Ref<::bevy_math::bounding::Aabb3d>| { + let output: Val<::bevy_math::bounding::Aabb3d> = { { - let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::from_size( - size.into_inner(), + let output: Val<::bevy_math::bounding::Aabb3d> = <::bevy_math::bounding::Aabb3d as ::core::clone::Clone>::clone( + &_self, ) .into(); output @@ -6379,18 +6184,48 @@ pub(crate) fn register_cuboid_functions(world: &mut World) { }; output }, - " Create a new `Cuboid` from a given full size", - &["size"], + "", + &["_self"], ) .register_documented( - "new", - |x_length: f32, y_length: f32, z_length: f32| { - let output: Val<::bevy_math::primitives::Cuboid> = { + "eq", + | + _self: Ref<::bevy_math::bounding::Aabb3d>, + other: Ref<::bevy_math::bounding::Aabb3d>| + { + let output: bool = { { - let output: Val<::bevy_math::primitives::Cuboid> = ::bevy_math::primitives::Cuboid::new( - x_length, - y_length, - z_length, + let output: bool = <::bevy_math::bounding::Aabb3d as ::core::cmp::PartialEq< + ::bevy_math::bounding::Aabb3d, + >>::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_math::bounding::Aabb3d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_bounding_sphere_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::bounding::BoundingSphere, + >::new(world) + .register_documented( + "aabb_3d", + |_self: Ref<::bevy_math::bounding::BoundingSphere>| { + let output: Val<::bevy_math::bounding::Aabb3d> = { + { + let output: Val<::bevy_math::bounding::Aabb3d> = ::bevy_math::bounding::BoundingSphere::aabb_3d( + &_self, ) .into(); output @@ -6398,15 +6233,15 @@ pub(crate) fn register_cuboid_functions(world: &mut World) { }; output }, - " Create a new `Cuboid` from a full x, y, and z length", - &["x_length", "y_length", "z_length"], + " Computes the smallest [`Aabb3d`] containing this [`BoundingSphere`].", + &["_self"], ) .register_documented( - "size", - |_self: Ref<::bevy_math::primitives::Cuboid>| { - let output: Val<::bevy_math::prelude::Vec3> = { + "clone", + |_self: Ref<::bevy_math::bounding::BoundingSphere>| { + let output: Val<::bevy_math::bounding::BoundingSphere> = { { - let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Cuboid::size( + let output: Val<::bevy_math::bounding::BoundingSphere> = <::bevy_math::bounding::BoundingSphere as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -6415,211 +6250,992 @@ pub(crate) fn register_cuboid_functions(world: &mut World) { }; output }, - " Get the size of the cuboid", + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::bounding::BoundingSphere>, + other: Ref<::bevy_math::bounding::BoundingSphere>| + { + let output: bool = { + { + let output: bool = <::bevy_math::bounding::BoundingSphere as ::core::cmp::PartialEq< + ::bevy_math::bounding::BoundingSphere, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "radius", + |_self: Ref<::bevy_math::bounding::BoundingSphere>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::bounding::BoundingSphere::radius( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the radius of the bounding sphere", &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::primitives::Cuboid, + ::bevy_math::bounding::BoundingSphere, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_cylinder_functions(world: &mut World) { +pub(crate) fn register_sphere_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Cylinder, + ::bevy_math::primitives::Sphere, >::new(world) - .register_documented( - "base", - |_self: Ref<::bevy_math::primitives::Cylinder>| { - let output: Val<::bevy_math::primitives::Circle> = { - { - let output: Val<::bevy_math::primitives::Circle> = - ::bevy_math::primitives::Cylinder::base(&_self).into(); - output - } - }; - output - }, - " Get the base of the cylinder as a [`Circle`]", - &["_self"], - ) - .register_documented( - "base_area", - |_self: Ref<::bevy_math::primitives::Cylinder>| { - let output: f32 = { - { - let output: f32 = ::bevy_math::primitives::Cylinder::base_area(&_self).into(); - output - } - }; - output - }, - " Get the surface area of one base of the cylinder", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::Cylinder>| { - let output: Val<::bevy_math::primitives::Cylinder> = { - { - let output: Val<::bevy_math::primitives::Cylinder> = - <::bevy_math::primitives::Cylinder as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::primitives::Cylinder>, - other: Ref<::bevy_math::primitives::Cylinder>| { - let output: bool = { - { - let output: bool = - <::bevy_math::primitives::Cylinder as ::core::cmp::PartialEq< - ::bevy_math::primitives::Cylinder, + .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( - "lateral_area", - |_self: Ref<::bevy_math::primitives::Cylinder>| { - let output: f32 = { - { - let output: f32 = - ::bevy_math::primitives::Cylinder::lateral_area(&_self).into(); - output - } - }; - output - }, - " Get the surface area of the side of the cylinder,\n also known as the lateral area", - &["_self"], - ) - .register_documented( - "new", - |radius: f32, height: f32| { - let output: Val<::bevy_math::primitives::Cylinder> = { - { - let output: Val<::bevy_math::primitives::Cylinder> = - ::bevy_math::primitives::Cylinder::new(radius, height).into(); - output - } - }; - output - }, - " Create a new `Cylinder` from a radius and full height", - &["radius", "height"], - ); + .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::Cylinder, + ::bevy_math::primitives::Sphere, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_capsule_3_d_functions(world: &mut World) { +pub(crate) fn register_cuboid_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Capsule3d, + ::bevy_math::primitives::Cuboid, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::Capsule3d>| { - let output: Val<::bevy_math::primitives::Capsule3d> = { - { - let output: Val<::bevy_math::primitives::Capsule3d> = - <::bevy_math::primitives::Capsule3d as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::primitives::Capsule3d>, - other: Ref<::bevy_math::primitives::Capsule3d>| { - let output: bool = { - { - let output: bool = - <::bevy_math::primitives::Capsule3d as ::core::cmp::PartialEq< - ::bevy_math::primitives::Capsule3d, + .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( - "new", - |radius: f32, length: f32| { - let output: Val<::bevy_math::primitives::Capsule3d> = { - { - let output: Val<::bevy_math::primitives::Capsule3d> = - ::bevy_math::primitives::Capsule3d::new(radius, length).into(); - output - } - }; - output - }, - " Create a new `Capsule3d` from a radius and length", - &["radius", "length"], - ) - .register_documented( - "to_cylinder", - |_self: Ref<::bevy_math::primitives::Capsule3d>| { - let output: Val<::bevy_math::primitives::Cylinder> = { - { - let output: Val<::bevy_math::primitives::Cylinder> = - ::bevy_math::primitives::Capsule3d::to_cylinder(&_self).into(); - output - } - }; - output - }, - " Get the part connecting the hemispherical ends\n of the capsule as a [`Cylinder`]", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_math::primitives::Capsule3d, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_cone_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Cone, - >::new(world) + .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_cylinder_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::Cylinder, + >::new(world) + .register_documented( + "base", + |_self: Ref<::bevy_math::primitives::Cylinder>| { + let output: Val<::bevy_math::primitives::Circle> = { + { + let output: Val<::bevy_math::primitives::Circle> = ::bevy_math::primitives::Cylinder::base( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the base of the cylinder as a [`Circle`]", + &["_self"], + ) + .register_documented( + "base_area", + |_self: Ref<::bevy_math::primitives::Cylinder>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::primitives::Cylinder::base_area( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the surface area of one base of the cylinder", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_math::primitives::Cylinder>| { + let output: Val<::bevy_math::primitives::Cylinder> = { + { + let output: Val<::bevy_math::primitives::Cylinder> = <::bevy_math::primitives::Cylinder as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::primitives::Cylinder>, + other: Ref<::bevy_math::primitives::Cylinder>| + { + let output: bool = { + { + let output: bool = <::bevy_math::primitives::Cylinder as ::core::cmp::PartialEq< + ::bevy_math::primitives::Cylinder, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "lateral_area", + |_self: Ref<::bevy_math::primitives::Cylinder>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::primitives::Cylinder::lateral_area( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the surface area of the side of the cylinder,\n also known as the lateral area", + &["_self"], + ) + .register_documented( + "new", + |radius: f32, height: f32| { + let output: Val<::bevy_math::primitives::Cylinder> = { + { + let output: Val<::bevy_math::primitives::Cylinder> = ::bevy_math::primitives::Cylinder::new( + radius, + height, + ) + .into(); + output + } + }; + output + }, + " Create a new `Cylinder` from a radius and full height", + &["radius", "height"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::primitives::Cylinder, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_capsule_3_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::Capsule3d, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_math::primitives::Capsule3d>| { + let output: Val<::bevy_math::primitives::Capsule3d> = { + { + let output: Val<::bevy_math::primitives::Capsule3d> = <::bevy_math::primitives::Capsule3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::primitives::Capsule3d>, + other: Ref<::bevy_math::primitives::Capsule3d>| + { + let output: bool = { + { + let output: bool = <::bevy_math::primitives::Capsule3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Capsule3d, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "new", + |radius: f32, length: f32| { + let output: Val<::bevy_math::primitives::Capsule3d> = { + { + let output: Val<::bevy_math::primitives::Capsule3d> = ::bevy_math::primitives::Capsule3d::new( + radius, + length, + ) + .into(); + output + } + }; + output + }, + " Create a new `Capsule3d` from a radius and length", + &["radius", "length"], + ) + .register_documented( + "to_cylinder", + |_self: Ref<::bevy_math::primitives::Capsule3d>| { + let output: Val<::bevy_math::primitives::Cylinder> = { + { + let output: Val<::bevy_math::primitives::Cylinder> = ::bevy_math::primitives::Capsule3d::to_cylinder( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the part connecting the hemispherical ends\n of the capsule as a [`Cylinder`]", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::primitives::Capsule3d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_cone_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::Cone, + >::new(world) + .register_documented( + "base", + |_self: Ref<::bevy_math::primitives::Cone>| { + let output: Val<::bevy_math::primitives::Circle> = { + { + let output: Val<::bevy_math::primitives::Circle> = ::bevy_math::primitives::Cone::base( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the base of the cone as a [`Circle`]", + &["_self"], + ) + .register_documented( + "base_area", + |_self: Ref<::bevy_math::primitives::Cone>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::primitives::Cone::base_area( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the surface area of the base of the cone", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_math::primitives::Cone>| { + let output: Val<::bevy_math::primitives::Cone> = { + { + let output: Val<::bevy_math::primitives::Cone> = <::bevy_math::primitives::Cone as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::primitives::Cone>, + other: Ref<::bevy_math::primitives::Cone>| + { + let output: bool = { + { + let output: bool = <::bevy_math::primitives::Cone as ::core::cmp::PartialEq< + ::bevy_math::primitives::Cone, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "lateral_area", + |_self: Ref<::bevy_math::primitives::Cone>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::primitives::Cone::lateral_area( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the surface area of the side of the cone,\n also known as the lateral area", + &["_self"], + ) + .register_documented( + "new", + |radius: f32, height: f32| { + let output: Val<::bevy_math::primitives::Cone> = { + { + let output: Val<::bevy_math::primitives::Cone> = ::bevy_math::primitives::Cone::new( + radius, + height, + ) + .into(); + output + } + }; + output + }, + " Create a new [`Cone`] from a radius and height.", + &["radius", "height"], + ) + .register_documented( + "slant_height", + |_self: Ref<::bevy_math::primitives::Cone>| { + let output: f32 = { + { + let output: f32 = ::bevy_math::primitives::Cone::slant_height( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the slant height of the cone, the length of the line segment\n connecting a point on the base to the apex", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::primitives::Cone, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +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< + ::bevy_math::primitives::ConicalFrustum, + >>::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_math::primitives::ConicalFrustum, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_infinite_plane_3_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::InfinitePlane3d, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_math::primitives::InfinitePlane3d>| { + let output: Val<::bevy_math::primitives::InfinitePlane3d> = { + { + let output: Val<::bevy_math::primitives::InfinitePlane3d> = <::bevy_math::primitives::InfinitePlane3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::primitives::InfinitePlane3d>, + other: Ref<::bevy_math::primitives::InfinitePlane3d>| + { + let output: bool = { + { + let output: bool = <::bevy_math::primitives::InfinitePlane3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::InfinitePlane3d, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "isometry_from_xy", + | + _self: Ref<::bevy_math::primitives::InfinitePlane3d>, + origin: Val<::bevy_math::Vec3>| + { + let output: Val<::bevy_math::Isometry3d> = { + { + let output: Val<::bevy_math::Isometry3d> = ::bevy_math::primitives::InfinitePlane3d::isometry_from_xy( + &_self, + origin.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes an [`Isometry3d`] which transforms points from the XY-plane to this plane with the\n given `origin`.\n ## Guarantees\n * the transformation is a [congruence] meaning it will preserve all distances and angles of\n the transformed geometry\n * uses the least rotation possible to transform the geometry\n * if two geometries are transformed with the same isometry, then the relations between\n them, like distances, are also preserved\n * compared to projections, the transformation is lossless (up to floating point errors)\n reversible\n ## Non-Guarantees\n * the rotation used is generally not unique\n * the orientation of the transformed geometry in the XY plane might be arbitrary, to\n enforce some kind of alignment the user has to use an extra transformation ontop of this\n one\n See [`isometries_xy`] for example usescases.\n [congruence]: https://en.wikipedia.org/wiki/Congruence_(geometry)\n [`isometries_xy`]: `InfinitePlane3d::isometries_xy`", + &["_self", "origin"], + ) + .register_documented( + "isometry_into_xy", + | + _self: Ref<::bevy_math::primitives::InfinitePlane3d>, + origin: Val<::bevy_math::Vec3>| + { + let output: Val<::bevy_math::Isometry3d> = { + { + let output: Val<::bevy_math::Isometry3d> = ::bevy_math::primitives::InfinitePlane3d::isometry_into_xy( + &_self, + origin.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes an [`Isometry3d`] which transforms points from the plane in 3D space with the given\n `origin` to the XY-plane.\n ## Guarantees\n * the transformation is a [congruence] meaning it will preserve all distances and angles of\n the transformed geometry\n * uses the least rotation possible to transform the geometry\n * if two geometries are transformed with the same isometry, then the relations between\n them, like distances, are also preserved\n * compared to projections, the transformation is lossless (up to floating point errors)\n reversible\n ## Non-Guarantees\n * the rotation used is generally not unique\n * the orientation of the transformed geometry in the XY plane might be arbitrary, to\n enforce some kind of alignment the user has to use an extra transformation ontop of this\n one\n See [`isometries_xy`] for example usescases.\n [congruence]: https://en.wikipedia.org/wiki/Congruence_(geometry)\n [`isometries_xy`]: `InfinitePlane3d::isometries_xy`", + &["_self", "origin"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::primitives::InfinitePlane3d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_line_3_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::Line3d, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_math::primitives::Line3d>| { + let output: Val<::bevy_math::primitives::Line3d> = { + { + let output: Val<::bevy_math::primitives::Line3d> = <::bevy_math::primitives::Line3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::primitives::Line3d>, + other: Ref<::bevy_math::primitives::Line3d>| + { + let output: bool = { + { + let output: bool = <::bevy_math::primitives::Line3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Line3d, + >>::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_math::primitives::Line3d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_segment_3_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::Segment3d, + >::new(world) + .register_documented( + "center", + |_self: Ref<::bevy_math::primitives::Segment3d>| { + let output: Val<::bevy_math::Vec3> = { + { + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Segment3d::center( + &_self, + ) + .into(); + output + } + }; + output + }, + " Compute the midpoint between the two endpoints of the line segment.", + &["_self"], + ) + .register_documented( + "centered", + |_self: Ref<::bevy_math::primitives::Segment3d>| { + let output: Val<::bevy_math::primitives::Segment3d> = { + { + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::centered( + &_self, + ) + .into(); + output + } + }; + output + }, + " Compute the segment with its center at the origin, keeping the same direction and length.", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_math::primitives::Segment3d>| { + let output: Val<::bevy_math::primitives::Segment3d> = { + { + let output: Val<::bevy_math::primitives::Segment3d> = <::bevy_math::primitives::Segment3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "closest_point", + | + _self: Ref<::bevy_math::primitives::Segment3d>, + point: Val<::bevy_math::Vec3>| + { + let output: Val<::bevy_math::Vec3> = { + { + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Segment3d::closest_point( + &_self, + point.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the point on the [`Segment3d`] that is closest to the specified `point`.", + &["_self", "point"], + ) + .register_documented( + "direction", + |_self: Ref<::bevy_math::primitives::Segment3d>| { + let output: Val<::bevy_math::Dir3> = { + { + let output: Val<::bevy_math::Dir3> = ::bevy_math::primitives::Segment3d::direction( + &_self, + ) + .into(); + output + } + }; + output + }, + " Compute the normalized direction pointing from the first endpoint to the second endpoint.\n For the non-panicking version, see [`Segment3d::try_direction`].\n # Panics\n Panics if a valid direction could not be computed, for example when the endpoints are coincident, NaN, or infinite.", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::primitives::Segment3d>, + other: Ref<::bevy_math::primitives::Segment3d>| + { + let output: bool = { + { + let output: bool = <::bevy_math::primitives::Segment3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Segment3d, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "from_direction_and_length", + |direction: Val<::bevy_math::Dir3>, length: f32| { + let output: Val<::bevy_math::primitives::Segment3d> = { + { + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::from_direction_and_length( + direction.into_inner(), + length, + ) + .into(); + output + } + }; + output + }, + " Create a new `Segment3d` centered at the origin with the given direction and length.\n The endpoints will be at `-direction * length / 2.0` and `direction * length / 2.0`.", + &["direction", "length"], + ) + .register_documented( + "from_ray_and_length", + |ray: Val<::bevy_math::Ray3d>, length: f32| { + let output: Val<::bevy_math::primitives::Segment3d> = { + { + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::from_ray_and_length( + ray.into_inner(), + length, + ) + .into(); + output + } + }; + output + }, + " Create a new `Segment3d` starting from the origin of the given `ray`,\n going in the direction of the ray for the given `length`.\n The endpoints will be at `ray.origin` and `ray.origin + length * ray.direction`.", + &["ray", "length"], + ) .register_documented( - "base", - |_self: Ref<::bevy_math::primitives::Cone>| { - let output: Val<::bevy_math::primitives::Circle> = { + "from_scaled_direction", + |scaled_direction: Val<::bevy_math::Vec3>| { + let output: Val<::bevy_math::primitives::Segment3d> = { { - let output: Val<::bevy_math::primitives::Circle> = ::bevy_math::primitives::Cone::base( - &_self, + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::from_scaled_direction( + scaled_direction.into_inner(), ) .into(); output @@ -6627,15 +7243,15 @@ pub(crate) fn register_cone_functions(world: &mut World) { }; output }, - " Get the base of the cone as a [`Circle`]", - &["_self"], + " Create a new `Segment3d` centered at the origin from a vector representing\n the direction and length of the line segment.\n The endpoints will be at `-scaled_direction / 2.0` and `scaled_direction / 2.0`.", + &["scaled_direction"], ) .register_documented( - "base_area", - |_self: Ref<::bevy_math::primitives::Cone>| { + "length", + |_self: Ref<::bevy_math::primitives::Segment3d>| { let output: f32 = { { - let output: f32 = ::bevy_math::primitives::Cone::base_area( + let output: f32 = ::bevy_math::primitives::Segment3d::length( &_self, ) .into(); @@ -6644,15 +7260,15 @@ pub(crate) fn register_cone_functions(world: &mut World) { }; output }, - " Get the surface area of the base of the cone", + " Compute the length of the line segment.", &["_self"], ) .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::Cone>| { - let output: Val<::bevy_math::primitives::Cone> = { + "length_squared", + |_self: Ref<::bevy_math::primitives::Segment3d>| { + let output: f32 = { { - let output: Val<::bevy_math::primitives::Cone> = <::bevy_math::primitives::Cone as ::core::clone::Clone>::clone( + let output: f32 = ::bevy_math::primitives::Segment3d::length_squared( &_self, ) .into(); @@ -6661,35 +7277,33 @@ pub(crate) fn register_cone_functions(world: &mut World) { }; output }, - "", + " Compute the squared length of the line segment.", &["_self"], ) .register_documented( - "eq", - | - _self: Ref<::bevy_math::primitives::Cone>, - other: Ref<::bevy_math::primitives::Cone>| - { - let output: bool = { + "new", + |point1: Val<::bevy_math::Vec3>, point2: Val<::bevy_math::Vec3>| { + let output: Val<::bevy_math::primitives::Segment3d> = { { - let output: bool = <::bevy_math::primitives::Cone as ::core::cmp::PartialEq< - ::bevy_math::primitives::Cone, - >>::eq(&_self, &other) + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::new( + point1.into_inner(), + point2.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], + " Create a new `Segment3d` from its endpoints.", + &["point1", "point2"], ) .register_documented( - "lateral_area", - |_self: Ref<::bevy_math::primitives::Cone>| { - let output: f32 = { + "point1", + |_self: Ref<::bevy_math::primitives::Segment3d>| { + let output: Val<::bevy_math::Vec3> = { { - let output: f32 = ::bevy_math::primitives::Cone::lateral_area( + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Segment3d::point1( &_self, ) .into(); @@ -6698,17 +7312,16 @@ pub(crate) fn register_cone_functions(world: &mut World) { }; output }, - " Get the surface area of the side of the cone,\n also known as the lateral area", + " Get the position of the first endpoint of the line segment.", &["_self"], ) .register_documented( - "new", - |radius: f32, height: f32| { - let output: Val<::bevy_math::primitives::Cone> = { + "point2", + |_self: Ref<::bevy_math::primitives::Segment3d>| { + let output: Val<::bevy_math::Vec3> = { { - let output: Val<::bevy_math::primitives::Cone> = ::bevy_math::primitives::Cone::new( - radius, - height, + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Segment3d::point2( + &_self, ) .into(); output @@ -6716,16 +7329,17 @@ pub(crate) fn register_cone_functions(world: &mut World) { }; output }, - " Create a new [`Cone`] from a radius and height.", - &["radius", "height"], + " Get the position of the second endpoint of the line segment.", + &["_self"], ) .register_documented( - "slant_height", - |_self: Ref<::bevy_math::primitives::Cone>| { - let output: f32 = { + "resized", + |_self: Ref<::bevy_math::primitives::Segment3d>, length: f32| { + let output: Val<::bevy_math::primitives::Segment3d> = { { - let output: f32 = ::bevy_math::primitives::Cone::slant_height( + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::resized( &_self, + length, ) .into(); output @@ -6733,77 +7347,16 @@ pub(crate) fn register_cone_functions(world: &mut World) { }; output }, - " Get the slant height of the cone, the length of the line segment\n connecting a point on the base to the apex", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_math::primitives::Cone, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -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< - ::bevy_math::primitives::ConicalFrustum, - >>::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_math::primitives::ConicalFrustum, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_infinite_plane_3_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::InfinitePlane3d, - >::new(world) + " Compute the segment with a new length, keeping the same direction and center.", + &["_self", "length"], + ) .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::InfinitePlane3d>| { - let output: Val<::bevy_math::primitives::InfinitePlane3d> = { + "reverse", + |mut _self: Mut<::bevy_math::primitives::Segment3d>| { + let output: () = { { - let output: Val<::bevy_math::primitives::InfinitePlane3d> = <::bevy_math::primitives::InfinitePlane3d as ::core::clone::Clone>::clone( - &_self, + let output: () = ::bevy_math::primitives::Segment3d::reverse( + &mut _self, ) .into(); output @@ -6811,40 +7364,37 @@ pub(crate) fn register_infinite_plane_3_d_functions(world: &mut World) { }; output }, - "", + " Reverses the direction of the line segment by swapping the endpoints.", &["_self"], ) .register_documented( - "eq", - | - _self: Ref<::bevy_math::primitives::InfinitePlane3d>, - other: Ref<::bevy_math::primitives::InfinitePlane3d>| - { - let output: bool = { + "reversed", + |_self: Val<::bevy_math::primitives::Segment3d>| { + let output: Val<::bevy_math::primitives::Segment3d> = { { - let output: bool = <::bevy_math::primitives::InfinitePlane3d as ::core::cmp::PartialEq< - ::bevy_math::primitives::InfinitePlane3d, - >>::eq(&_self, &other) + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::reversed( + _self.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], + " Returns the line segment with its direction reversed by swapping the endpoints.", + &["_self"], ) .register_documented( - "isometry_from_xy", + "rotated", | - _self: Ref<::bevy_math::primitives::InfinitePlane3d>, - origin: Val<::bevy_math::prelude::Vec3>| + _self: Ref<::bevy_math::primitives::Segment3d>, + rotation: Val<::bevy_math::Quat>| { - let output: Val<::bevy_math::Isometry3d> = { + let output: Val<::bevy_math::primitives::Segment3d> = { { - let output: Val<::bevy_math::Isometry3d> = ::bevy_math::primitives::InfinitePlane3d::isometry_from_xy( + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::rotated( &_self, - origin.into_inner(), + rotation.into_inner(), ) .into(); output @@ -6852,20 +7402,22 @@ pub(crate) fn register_infinite_plane_3_d_functions(world: &mut World) { }; output }, - " Computes an [`Isometry3d`] which transforms points from the XY-plane to this plane with the\n given `origin`.\n ## Guarantees\n * the transformation is a [congruence] meaning it will preserve all distances and angles of\n the transformed geometry\n * uses the least rotation possible to transform the geometry\n * if two geometries are transformed with the same isometry, then the relations between\n them, like distances, are also preserved\n * compared to projections, the transformation is lossless (up to floating point errors)\n reversible\n ## Non-Guarantees\n * the rotation used is generally not unique\n * the orientation of the transformed geometry in the XY plane might be arbitrary, to\n enforce some kind of alignment the user has to use an extra transformation ontop of this\n one\n See [`isometries_xy`] for example usescases.\n [congruence]: https://en.wikipedia.org/wiki/Congruence_(geometry)\n [`isometries_xy`]: `InfinitePlane3d::isometries_xy`", - &["_self", "origin"], + " Compute the segment rotated around the origin by the given rotation.", + &["_self", "rotation"], ) .register_documented( - "isometry_into_xy", + "rotated_around", | - _self: Ref<::bevy_math::primitives::InfinitePlane3d>, - origin: Val<::bevy_math::prelude::Vec3>| + _self: Ref<::bevy_math::primitives::Segment3d>, + rotation: Val<::bevy_math::Quat>, + point: Val<::bevy_math::Vec3>| { - let output: Val<::bevy_math::Isometry3d> = { + let output: Val<::bevy_math::primitives::Segment3d> = { { - let output: Val<::bevy_math::Isometry3d> = ::bevy_math::primitives::InfinitePlane3d::isometry_into_xy( + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::rotated_around( &_self, - origin.into_inner(), + rotation.into_inner(), + point.into_inner(), ) .into(); output @@ -6873,75 +7425,20 @@ pub(crate) fn register_infinite_plane_3_d_functions(world: &mut World) { }; output }, - " Computes an [`Isometry3d`] which transforms points from the plane in 3D space with the given\n `origin` to the XY-plane.\n ## Guarantees\n * the transformation is a [congruence] meaning it will preserve all distances and angles of\n the transformed geometry\n * uses the least rotation possible to transform the geometry\n * if two geometries are transformed with the same isometry, then the relations between\n them, like distances, are also preserved\n * compared to projections, the transformation is lossless (up to floating point errors)\n reversible\n ## Non-Guarantees\n * the rotation used is generally not unique\n * the orientation of the transformed geometry in the XY plane might be arbitrary, to\n enforce some kind of alignment the user has to use an extra transformation ontop of this\n one\n See [`isometries_xy`] for example usescases.\n [congruence]: https://en.wikipedia.org/wiki/Congruence_(geometry)\n [`isometries_xy`]: `InfinitePlane3d::isometries_xy`", - &["_self", "origin"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_math::primitives::InfinitePlane3d, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_line_3_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Line3d, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::Line3d>| { - let output: Val<::bevy_math::primitives::Line3d> = { - { - let output: Val<::bevy_math::primitives::Line3d> = - <::bevy_math::primitives::Line3d as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::primitives::Line3d>, - other: Ref<::bevy_math::primitives::Line3d>| { - let output: bool = { - { - let output: bool = - <::bevy_math::primitives::Line3d as ::core::cmp::PartialEq< - ::bevy_math::primitives::Line3d, - >>::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_math::primitives::Line3d, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_segment_3_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Segment3d, - >::new(world) + " Compute the segment rotated around the given point by the given rotation.", + &["_self", "rotation", "point"], + ) .register_documented( - "center", - |_self: Ref<::bevy_math::primitives::Segment3d>| { - let output: Val<::bevy_math::prelude::Vec3> = { + "rotated_around_center", + | + _self: Ref<::bevy_math::primitives::Segment3d>, + rotation: Val<::bevy_math::Quat>| + { + let output: Val<::bevy_math::primitives::Segment3d> = { { - let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Segment3d::center( + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::rotated_around_center( &_self, + rotation.into_inner(), ) .into(); output @@ -6949,15 +7446,15 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Compute the midpoint between the two endpoints of the line segment.", - &["_self"], + " Compute the segment rotated around its own center.", + &["_self", "rotation"], ) .register_documented( - "centered", + "scaled_direction", |_self: Ref<::bevy_math::primitives::Segment3d>| { - let output: Val<::bevy_math::primitives::Segment3d> = { + let output: Val<::bevy_math::Vec3> = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::centered( + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Segment3d::scaled_direction( &_self, ) .into(); @@ -6966,16 +7463,20 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Compute the segment with its center at the origin, keeping the same direction and length.", + " Compute the vector from the first endpoint to the second endpoint.", &["_self"], ) .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::Segment3d>| { + "translated", + | + _self: Ref<::bevy_math::primitives::Segment3d>, + translation: Val<::bevy_math::Vec3>| + { let output: Val<::bevy_math::primitives::Segment3d> = { { - let output: Val<::bevy_math::primitives::Segment3d> = <::bevy_math::primitives::Segment3d as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::translated( &_self, + translation.into_inner(), ) .into(); output @@ -6983,15 +7484,27 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - "", - &["_self"], - ) + " Compute the segment translated by the given vector.", + &["_self", "translation"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::primitives::Segment3d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_torus_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::Torus, + >::new(world) .register_documented( - "direction", - |_self: Ref<::bevy_math::primitives::Segment3d>| { - let output: Val<::bevy_math::prelude::Dir3> = { + "clone", + |_self: Ref<::bevy_math::primitives::Torus>| { + let output: Val<::bevy_math::primitives::Torus> = { { - let output: Val<::bevy_math::prelude::Dir3> = ::bevy_math::primitives::Segment3d::direction( + let output: Val<::bevy_math::primitives::Torus> = <::bevy_math::primitives::Torus as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -7000,19 +7513,19 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Compute the normalized direction pointing from the first endpoint to the second endpoint.\n For the non-panicking version, see [`Segment3d::try_direction`].\n # Panics\n Panics if a valid direction could not be computed, for example when the endpoints are coincident, NaN, or infinite.", + "", &["_self"], ) .register_documented( "eq", | - _self: Ref<::bevy_math::primitives::Segment3d>, - other: Ref<::bevy_math::primitives::Segment3d>| + _self: Ref<::bevy_math::primitives::Torus>, + other: Ref<::bevy_math::primitives::Torus>| { let output: bool = { { - let output: bool = <::bevy_math::primitives::Segment3d as ::core::cmp::PartialEq< - ::bevy_math::primitives::Segment3d, + let output: bool = <::bevy_math::primitives::Torus as ::core::cmp::PartialEq< + ::bevy_math::primitives::Torus, >>::eq(&_self, &other) .into(); output @@ -7024,13 +7537,12 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { &["_self", "other"], ) .register_documented( - "from_direction_and_length", - |direction: Val<::bevy_math::prelude::Dir3>, length: f32| { - let output: Val<::bevy_math::primitives::Segment3d> = { + "inner_radius", + |_self: Ref<::bevy_math::primitives::Torus>| { + let output: f32 = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::from_direction_and_length( - direction.into_inner(), - length, + let output: f32 = ::bevy_math::primitives::Torus::inner_radius( + &_self, ) .into(); output @@ -7038,17 +7550,17 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Create a new `Segment3d` centered at the origin with the given direction and length.\n The endpoints will be at `-direction * length / 2.0` and `direction * length / 2.0`.", - &["direction", "length"], + " Get the inner radius of the torus.\n For a ring torus, this corresponds to the radius of the hole,\n or `major_radius - minor_radius`", + &["_self"], ) .register_documented( - "from_ray_and_length", - |ray: Val<::bevy_math::Ray3d>, length: f32| { - let output: Val<::bevy_math::primitives::Segment3d> = { + "new", + |inner_radius: f32, outer_radius: f32| { + let output: Val<::bevy_math::primitives::Torus> = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::from_ray_and_length( - ray.into_inner(), - length, + let output: Val<::bevy_math::primitives::Torus> = ::bevy_math::primitives::Torus::new( + inner_radius, + outer_radius, ) .into(); output @@ -7056,16 +7568,16 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Create a new `Segment3d` starting from the origin of the given `ray`,\n going in the direction of the ray for the given `length`.\n The endpoints will be at `ray.origin` and `ray.origin + length * ray.direction`.", - &["ray", "length"], + " Create a new `Torus` from an inner and outer radius.\n The inner radius is the radius of the hole, and the outer radius\n is the radius of the entire object", + &["inner_radius", "outer_radius"], ) .register_documented( - "from_scaled_direction", - |scaled_direction: Val<::bevy_math::prelude::Vec3>| { - let output: Val<::bevy_math::primitives::Segment3d> = { + "outer_radius", + |_self: Ref<::bevy_math::primitives::Torus>| { + let output: f32 = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::from_scaled_direction( - scaled_direction.into_inner(), + let output: f32 = ::bevy_math::primitives::Torus::outer_radius( + &_self, ) .into(); output @@ -7073,15 +7585,27 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Create a new `Segment3d` centered at the origin from a vector representing\n the direction and length of the line segment.\n The endpoints will be at `-scaled_direction / 2.0` and `scaled_direction / 2.0`.", - &["scaled_direction"], - ) + " Get the outer radius of the torus.\n This corresponds to the overall radius of the entire object,\n or `major_radius + minor_radius`", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::primitives::Torus, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_triangle_3_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::Triangle3d, + >::new(world) .register_documented( - "length", - |_self: Ref<::bevy_math::primitives::Segment3d>| { - let output: f32 = { + "centroid", + |_self: Ref<::bevy_math::primitives::Triangle3d>| { + let output: Val<::bevy_math::Vec3> = { { - let output: f32 = ::bevy_math::primitives::Segment3d::length( + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Triangle3d::centroid( &_self, ) .into(); @@ -7090,15 +7614,15 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Compute the length of the line segment.", + " Get the centroid of the triangle.\n This function finds the geometric center of the triangle by averaging the vertices:\n `centroid = (a + b + c) / 3`.", &["_self"], ) .register_documented( - "length_squared", - |_self: Ref<::bevy_math::primitives::Segment3d>| { - let output: f32 = { + "circumcenter", + |_self: Ref<::bevy_math::primitives::Triangle3d>| { + let output: Val<::bevy_math::Vec3> = { { - let output: f32 = ::bevy_math::primitives::Segment3d::length_squared( + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Triangle3d::circumcenter( &_self, ) .into(); @@ -7107,20 +7631,16 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Compute the squared length of the line segment.", + " Get the circumcenter of the triangle.", &["_self"], ) .register_documented( - "new", - | - point1: Val<::bevy_math::prelude::Vec3>, - point2: Val<::bevy_math::prelude::Vec3>| - { - let output: Val<::bevy_math::primitives::Segment3d> = { + "clone", + |_self: Ref<::bevy_math::primitives::Triangle3d>| { + let output: Val<::bevy_math::primitives::Triangle3d> = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::new( - point1.into_inner(), - point2.into_inner(), + let output: Val<::bevy_math::primitives::Triangle3d> = <::bevy_math::primitives::Triangle3d as ::core::clone::Clone>::clone( + &_self, ) .into(); output @@ -7128,32 +7648,35 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Create a new `Segment3d` from its endpoints.", - &["point1", "point2"], + "", + &["_self"], ) .register_documented( - "point1", - |_self: Ref<::bevy_math::primitives::Segment3d>| { - let output: Val<::bevy_math::prelude::Vec3> = { + "eq", + | + _self: Ref<::bevy_math::primitives::Triangle3d>, + other: Ref<::bevy_math::primitives::Triangle3d>| + { + let output: bool = { { - let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Segment3d::point1( - &_self, - ) + let output: bool = <::bevy_math::primitives::Triangle3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Triangle3d, + >>::eq(&_self, &other) .into(); output } }; output }, - " Get the position of the first endpoint of the line segment.", - &["_self"], + "", + &["_self", "other"], ) .register_documented( - "point2", - |_self: Ref<::bevy_math::primitives::Segment3d>| { - let output: Val<::bevy_math::prelude::Vec3> = { + "is_acute", + |_self: Ref<::bevy_math::primitives::Triangle3d>| { + let output: bool = { { - let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Segment3d::point2( + let output: bool = ::bevy_math::primitives::Triangle3d::is_acute( &_self, ) .into(); @@ -7162,17 +7685,16 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Get the position of the second endpoint of the line segment.", + " Checks if the triangle is acute, meaning all angles are less than 90 degrees", &["_self"], ) .register_documented( - "resized", - |_self: Ref<::bevy_math::primitives::Segment3d>, length: f32| { - let output: Val<::bevy_math::primitives::Segment3d> = { + "is_degenerate", + |_self: Ref<::bevy_math::primitives::Triangle3d>| { + let output: bool = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::resized( + let output: bool = ::bevy_math::primitives::Triangle3d::is_degenerate( &_self, - length, ) .into(); output @@ -7180,16 +7702,16 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Compute the segment with a new length, keeping the same direction and center.", - &["_self", "length"], + " Checks if the triangle is degenerate, meaning it has zero area.\n A triangle is degenerate if the cross product of the vectors `ab` and `ac` has a length less than `10e-7`.\n This indicates that the three vertices are collinear or nearly collinear.", + &["_self"], ) .register_documented( - "reverse", - |mut _self: Mut<::bevy_math::primitives::Segment3d>| { - let output: () = { + "is_obtuse", + |_self: Ref<::bevy_math::primitives::Triangle3d>| { + let output: bool = { { - let output: () = ::bevy_math::primitives::Segment3d::reverse( - &mut _self, + let output: bool = ::bevy_math::primitives::Triangle3d::is_obtuse( + &_self, ) .into(); output @@ -7197,16 +7719,22 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Reverses the direction of the line segment by swapping the endpoints.", + " Checks if the triangle is obtuse, meaning one angle is greater than 90 degrees", &["_self"], ) .register_documented( - "reversed", - |_self: Val<::bevy_math::primitives::Segment3d>| { - let output: Val<::bevy_math::primitives::Segment3d> = { + "new", + | + a: Val<::bevy_math::Vec3>, + b: Val<::bevy_math::Vec3>, + c: Val<::bevy_math::Vec3>| + { + let output: Val<::bevy_math::primitives::Triangle3d> = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::reversed( - _self.into_inner(), + let output: Val<::bevy_math::primitives::Triangle3d> = ::bevy_math::primitives::Triangle3d::new( + a.into_inner(), + b.into_inner(), + c.into_inner(), ) .into(); output @@ -7214,20 +7742,16 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Returns the line segment with its direction reversed by swapping the endpoints.", - &["_self"], + " Create a new [`Triangle3d`] from points `a`, `b`, and `c`.", + &["a", "b", "c"], ) .register_documented( - "rotated", - | - _self: Ref<::bevy_math::primitives::Segment3d>, - rotation: Val<::bevy_math::prelude::Quat>| - { - let output: Val<::bevy_math::primitives::Segment3d> = { + "reverse", + |mut _self: Mut<::bevy_math::primitives::Triangle3d>| { + let output: () = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::rotated( - &_self, - rotation.into_inner(), + let output: () = ::bevy_math::primitives::Triangle3d::reverse( + &mut _self, ) .into(); output @@ -7235,22 +7759,16 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Compute the segment rotated around the origin by the given rotation.", - &["_self", "rotation"], + " Reverse the triangle by swapping the first and last vertices.", + &["_self"], ) .register_documented( - "rotated_around", - | - _self: Ref<::bevy_math::primitives::Segment3d>, - rotation: Val<::bevy_math::prelude::Quat>, - point: Val<::bevy_math::prelude::Vec3>| - { - let output: Val<::bevy_math::primitives::Segment3d> = { + "reversed", + |_self: Val<::bevy_math::primitives::Triangle3d>| { + let output: Val<::bevy_math::primitives::Triangle3d> = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::rotated_around( - &_self, - rotation.into_inner(), - point.into_inner(), + let output: Val<::bevy_math::primitives::Triangle3d> = ::bevy_math::primitives::Triangle3d::reversed( + _self.into_inner(), ) .into(); output @@ -7258,20 +7776,28 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Compute the segment rotated around the given point by the given rotation.", - &["_self", "rotation", "point"], - ) + " This triangle but reversed.", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::primitives::Triangle3d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_polyline_3_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::primitives::Polyline3d, + >::new(world) .register_documented( - "rotated_around_center", - | - _self: Ref<::bevy_math::primitives::Segment3d>, - rotation: Val<::bevy_math::prelude::Quat>| - { - let output: Val<::bevy_math::primitives::Segment3d> = { + "clone", + |_self: Ref<::bevy_math::primitives::Polyline3d>| { + let output: Val<::bevy_math::primitives::Polyline3d> = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::rotated_around_center( + let output: Val<::bevy_math::primitives::Polyline3d> = <::bevy_math::primitives::Polyline3d as ::core::clone::Clone>::clone( &_self, - rotation.into_inner(), ) .into(); output @@ -7279,37 +7805,42 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Compute the segment rotated around its own center.", - &["_self", "rotation"], + "", + &["_self"], ) .register_documented( - "scaled_direction", - |_self: Ref<::bevy_math::primitives::Segment3d>| { - let output: Val<::bevy_math::prelude::Vec3> = { + "eq", + | + _self: Ref<::bevy_math::primitives::Polyline3d>, + other: Ref<::bevy_math::primitives::Polyline3d>| + { + let output: bool = { { - let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Segment3d::scaled_direction( - &_self, - ) + let output: bool = <::bevy_math::primitives::Polyline3d as ::core::cmp::PartialEq< + ::bevy_math::primitives::Polyline3d, + >>::eq(&_self, &other) .into(); output } }; output }, - " Compute the vector from the first endpoint to the second endpoint.", - &["_self"], + "", + &["_self", "other"], ) .register_documented( - "translated", + "with_subdivisions", | - _self: Ref<::bevy_math::primitives::Segment3d>, - translation: Val<::bevy_math::prelude::Vec3>| + start: Val<::bevy_math::Vec3>, + end: Val<::bevy_math::Vec3>, + subdivisions: usize| { - let output: Val<::bevy_math::primitives::Segment3d> = { + let output: Val<::bevy_math::primitives::Polyline3d> = { { - let output: Val<::bevy_math::primitives::Segment3d> = ::bevy_math::primitives::Segment3d::translated( - &_self, - translation.into_inner(), + let output: Val<::bevy_math::primitives::Polyline3d> = ::bevy_math::primitives::Polyline3d::with_subdivisions( + start.into_inner(), + end.into_inner(), + subdivisions, ) .into(); output @@ -7317,28 +7848,32 @@ pub(crate) fn register_segment_3_d_functions(world: &mut World) { }; output }, - " Compute the segment translated by the given vector.", - &["_self", "translation"], + " Create a new `Polyline3d` from two endpoints with subdivision points.\n `subdivisions = 0` creates a simple line with just start and end points.\n `subdivisions = 1` adds one point in the middle, creating 2 segments, etc.", + &["start", "end", "subdivisions"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::primitives::Segment3d, + ::bevy_math::primitives::Polyline3d, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_torus_functions(world: &mut World) { +pub(crate) fn register_ray_cast_2_d_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Torus, + ::bevy_math::bounding::RayCast2d, >::new(world) .register_documented( - "clone", - |_self: Ref<::bevy_math::primitives::Torus>| { - let output: Val<::bevy_math::primitives::Torus> = { + "aabb_intersection_at", + | + _self: Ref<::bevy_math::bounding::RayCast2d>, + aabb: Ref<::bevy_math::bounding::Aabb2d>| + { + let output: ::core::option::Option = { { - let output: Val<::bevy_math::primitives::Torus> = <::bevy_math::primitives::Torus as ::core::clone::Clone>::clone( + let output: ::core::option::Option = ::bevy_math::bounding::RayCast2d::aabb_intersection_at( &_self, + &aabb, ) .into(); output @@ -7346,20 +7881,38 @@ pub(crate) fn register_torus_functions(world: &mut World) { }; output }, - "", - &["_self"], + " Get the distance of an intersection with an [`Aabb2d`], if any.", + &["_self", "aabb"], ) .register_documented( - "eq", + "circle_intersection_at", | - _self: Ref<::bevy_math::primitives::Torus>, - other: Ref<::bevy_math::primitives::Torus>| + _self: Ref<::bevy_math::bounding::RayCast2d>, + circle: Ref<::bevy_math::bounding::BoundingCircle>| { - let output: bool = { + let output: ::core::option::Option = { { - let output: bool = <::bevy_math::primitives::Torus as ::core::cmp::PartialEq< - ::bevy_math::primitives::Torus, - >>::eq(&_self, &other) + let output: ::core::option::Option = ::bevy_math::bounding::RayCast2d::circle_intersection_at( + &_self, + &circle, + ) + .into(); + output + } + }; + output + }, + " Get the distance of an intersection with a [`BoundingCircle`], if any.", + &["_self", "circle"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_math::bounding::RayCast2d>| { + let output: Val<::bevy_math::bounding::RayCast2d> = { + { + let output: Val<::bevy_math::bounding::RayCast2d> = <::bevy_math::bounding::RayCast2d as ::core::clone::Clone>::clone( + &_self, + ) .into(); output } @@ -7367,14 +7920,14 @@ pub(crate) fn register_torus_functions(world: &mut World) { output }, "", - &["_self", "other"], + &["_self"], ) .register_documented( - "inner_radius", - |_self: Ref<::bevy_math::primitives::Torus>| { - let output: f32 = { + "direction_recip", + |_self: Ref<::bevy_math::bounding::RayCast2d>| { + let output: Val<::bevy_math::Vec2> = { { - let output: f32 = ::bevy_math::primitives::Torus::inner_radius( + let output: Val<::bevy_math::Vec2> = ::bevy_math::bounding::RayCast2d::direction_recip( &_self, ) .into(); @@ -7383,17 +7936,17 @@ pub(crate) fn register_torus_functions(world: &mut World) { }; output }, - " Get the inner radius of the torus.\n For a ring torus, this corresponds to the radius of the hole,\n or `major_radius - minor_radius`", + " Get the cached multiplicative inverse of the direction of the ray.", &["_self"], ) .register_documented( - "new", - |inner_radius: f32, outer_radius: f32| { - let output: Val<::bevy_math::primitives::Torus> = { + "from_ray", + |ray: Val<::bevy_math::Ray2d>, max: f32| { + let output: Val<::bevy_math::bounding::RayCast2d> = { { - let output: Val<::bevy_math::primitives::Torus> = ::bevy_math::primitives::Torus::new( - inner_radius, - outer_radius, + let output: Val<::bevy_math::bounding::RayCast2d> = ::bevy_math::bounding::RayCast2d::from_ray( + ray.into_inner(), + max, ) .into(); output @@ -7401,16 +7954,22 @@ pub(crate) fn register_torus_functions(world: &mut World) { }; output }, - " Create a new `Torus` from an inner and outer radius.\n The inner radius is the radius of the hole, and the outer radius\n is the radius of the entire object", - &["inner_radius", "outer_radius"], + " Construct a [`RayCast2d`] from a [`Ray2d`] and max distance.", + &["ray", "max"], ) .register_documented( - "outer_radius", - |_self: Ref<::bevy_math::primitives::Torus>| { - let output: f32 = { + "new", + | + origin: Val<::bevy_math::Vec2>, + direction: Val<::bevy_math::Dir2>, + max: f32| + { + let output: Val<::bevy_math::bounding::RayCast2d> = { { - let output: f32 = ::bevy_math::primitives::Torus::outer_radius( - &_self, + let output: Val<::bevy_math::bounding::RayCast2d> = ::bevy_math::bounding::RayCast2d::new( + origin.into_inner(), + direction.into_inner(), + max, ) .into(); output @@ -7418,45 +7977,32 @@ pub(crate) fn register_torus_functions(world: &mut World) { }; output }, - " Get the outer radius of the torus.\n This corresponds to the overall radius of the entire object,\n or `major_radius + minor_radius`", - &["_self"], + " Construct a [`RayCast2d`] from an origin, [`Dir2`], and max distance.", + &["origin", "direction", "max"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::primitives::Torus, + ::bevy_math::bounding::RayCast2d, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_triangle_3_d_functions(world: &mut World) { +pub(crate) fn register_aabb_cast_2_d_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::primitives::Triangle3d, + ::bevy_math::bounding::AabbCast2d, >::new(world) .register_documented( - "centroid", - |_self: Ref<::bevy_math::primitives::Triangle3d>| { - let output: Val<::bevy_math::prelude::Vec3> = { - { - let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Triangle3d::centroid( - &_self, - ) - .into(); - output - } - }; - output - }, - " Get the centroid of the triangle.\n This function finds the geometric center of the triangle by averaging the vertices:\n `centroid = (a + b + c) / 3`.", - &["_self"], - ) - .register_documented( - "circumcenter", - |_self: Ref<::bevy_math::primitives::Triangle3d>| { - let output: Val<::bevy_math::prelude::Vec3> = { + "aabb_collision_at", + | + _self: Ref<::bevy_math::bounding::AabbCast2d>, + aabb: Val<::bevy_math::bounding::Aabb2d>| + { + let output: ::core::option::Option = { { - let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Triangle3d::circumcenter( + let output: ::core::option::Option = ::bevy_math::bounding::AabbCast2d::aabb_collision_at( &_self, + aabb.into_inner(), ) .into(); output @@ -7464,15 +8010,15 @@ pub(crate) fn register_triangle_3_d_functions(world: &mut World) { }; output }, - " Get the circumcenter of the triangle.", - &["_self"], + " Get the distance at which the [`Aabb2d`]s collide, if at all.", + &["_self", "aabb"], ) .register_documented( "clone", - |_self: Ref<::bevy_math::primitives::Triangle3d>| { - let output: Val<::bevy_math::primitives::Triangle3d> = { + |_self: Ref<::bevy_math::bounding::AabbCast2d>| { + let output: Val<::bevy_math::bounding::AabbCast2d> = { { - let output: Val<::bevy_math::primitives::Triangle3d> = <::bevy_math::primitives::Triangle3d as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::bounding::AabbCast2d> = <::bevy_math::bounding::AabbCast2d as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -7485,32 +8031,43 @@ pub(crate) fn register_triangle_3_d_functions(world: &mut World) { &["_self"], ) .register_documented( - "eq", + "from_ray", | - _self: Ref<::bevy_math::primitives::Triangle3d>, - other: Ref<::bevy_math::primitives::Triangle3d>| + aabb: Val<::bevy_math::bounding::Aabb2d>, + ray: Val<::bevy_math::Ray2d>, + max: f32| { - let output: bool = { + let output: Val<::bevy_math::bounding::AabbCast2d> = { { - let output: bool = <::bevy_math::primitives::Triangle3d as ::core::cmp::PartialEq< - ::bevy_math::primitives::Triangle3d, - >>::eq(&_self, &other) + let output: Val<::bevy_math::bounding::AabbCast2d> = ::bevy_math::bounding::AabbCast2d::from_ray( + aabb.into_inner(), + ray.into_inner(), + max, + ) .into(); output } }; output }, - "", - &["_self", "other"], + " Construct an [`AabbCast2d`] from an [`Aabb2d`], [`Ray2d`], and max distance.", + &["aabb", "ray", "max"], ) .register_documented( - "is_acute", - |_self: Ref<::bevy_math::primitives::Triangle3d>| { - let output: bool = { + "new", + | + aabb: Val<::bevy_math::bounding::Aabb2d>, + origin: Val<::bevy_math::Vec2>, + direction: Val<::bevy_math::Dir2>, + max: f32| + { + let output: Val<::bevy_math::bounding::AabbCast2d> = { { - let output: bool = ::bevy_math::primitives::Triangle3d::is_acute( - &_self, + let output: Val<::bevy_math::bounding::AabbCast2d> = ::bevy_math::bounding::AabbCast2d::new( + aabb.into_inner(), + origin.into_inner(), + direction.into_inner(), + max, ) .into(); output @@ -7518,16 +8075,32 @@ pub(crate) fn register_triangle_3_d_functions(world: &mut World) { }; output }, - " Checks if the triangle is acute, meaning all angles are less than 90 degrees", - &["_self"], - ) + " Construct an [`AabbCast2d`] from an [`Aabb2d`], origin, [`Dir2`], and max distance.", + &["aabb", "origin", "direction", "max"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::bounding::AabbCast2d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_bounding_circle_cast_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::bounding::BoundingCircleCast, + >::new(world) .register_documented( - "is_degenerate", - |_self: Ref<::bevy_math::primitives::Triangle3d>| { - let output: bool = { + "circle_collision_at", + | + _self: Ref<::bevy_math::bounding::BoundingCircleCast>, + circle: Val<::bevy_math::bounding::BoundingCircle>| + { + let output: ::core::option::Option = { { - let output: bool = ::bevy_math::primitives::Triangle3d::is_degenerate( + let output: ::core::option::Option = ::bevy_math::bounding::BoundingCircleCast::circle_collision_at( &_self, + circle.into_inner(), ) .into(); output @@ -7535,15 +8108,15 @@ pub(crate) fn register_triangle_3_d_functions(world: &mut World) { }; output }, - " Checks if the triangle is degenerate, meaning it has zero area.\n A triangle is degenerate if the cross product of the vectors `ab` and `ac` has a length less than `10e-7`.\n This indicates that the three vertices are collinear or nearly collinear.", - &["_self"], + " Get the distance at which the [`BoundingCircle`]s collide, if at all.", + &["_self", "circle"], ) .register_documented( - "is_obtuse", - |_self: Ref<::bevy_math::primitives::Triangle3d>| { - let output: bool = { + "clone", + |_self: Ref<::bevy_math::bounding::BoundingCircleCast>| { + let output: Val<::bevy_math::bounding::BoundingCircleCast> = { { - let output: bool = ::bevy_math::primitives::Triangle3d::is_obtuse( + let output: Val<::bevy_math::bounding::BoundingCircleCast> = <::bevy_math::bounding::BoundingCircleCast as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -7552,39 +8125,22 @@ pub(crate) fn register_triangle_3_d_functions(world: &mut World) { }; output }, - " Checks if the triangle is obtuse, meaning one angle is greater than 90 degrees", + "", &["_self"], ) .register_documented( - "new", + "from_ray", | - a: Val<::bevy_math::prelude::Vec3>, - b: Val<::bevy_math::prelude::Vec3>, - c: Val<::bevy_math::prelude::Vec3>| + circle: Val<::bevy_math::bounding::BoundingCircle>, + ray: Val<::bevy_math::Ray2d>, + max: f32| { - let output: Val<::bevy_math::primitives::Triangle3d> = { - { - let output: Val<::bevy_math::primitives::Triangle3d> = ::bevy_math::primitives::Triangle3d::new( - a.into_inner(), - b.into_inner(), - c.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Create a new [`Triangle3d`] from points `a`, `b`, and `c`.", - &["a", "b", "c"], - ) - .register_documented( - "reverse", - |mut _self: Mut<::bevy_math::primitives::Triangle3d>| { - let output: () = { + let output: Val<::bevy_math::bounding::BoundingCircleCast> = { { - let output: () = ::bevy_math::primitives::Triangle3d::reverse( - &mut _self, + let output: Val<::bevy_math::bounding::BoundingCircleCast> = ::bevy_math::bounding::BoundingCircleCast::from_ray( + circle.into_inner(), + ray.into_inner(), + max, ) .into(); output @@ -7592,16 +8148,24 @@ pub(crate) fn register_triangle_3_d_functions(world: &mut World) { }; output }, - " Reverse the triangle by swapping the first and last vertices.", - &["_self"], + " Construct a [`BoundingCircleCast`] from a [`BoundingCircle`], [`Ray2d`], and max distance.", + &["circle", "ray", "max"], ) .register_documented( - "reversed", - |_self: Val<::bevy_math::primitives::Triangle3d>| { - let output: Val<::bevy_math::primitives::Triangle3d> = { + "new", + | + circle: Val<::bevy_math::bounding::BoundingCircle>, + origin: Val<::bevy_math::Vec2>, + direction: Val<::bevy_math::Dir2>, + max: f32| + { + let output: Val<::bevy_math::bounding::BoundingCircleCast> = { { - let output: Val<::bevy_math::primitives::Triangle3d> = ::bevy_math::primitives::Triangle3d::reversed( - _self.into_inner(), + let output: Val<::bevy_math::bounding::BoundingCircleCast> = ::bevy_math::bounding::BoundingCircleCast::new( + circle.into_inner(), + origin.into_inner(), + direction.into_inner(), + max, ) .into(); output @@ -7609,237 +8173,32 @@ pub(crate) fn register_triangle_3_d_functions(world: &mut World) { }; output }, - " This triangle but reversed.", - &["_self"], + " Construct a [`BoundingCircleCast`] from a [`BoundingCircle`], origin, [`Dir2`], and max distance.", + &["circle", "origin", "direction", "max"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::primitives::Triangle3d, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_ray_cast_2_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::bounding::RayCast2d, - >::new(world) - .register_documented( - "aabb_intersection_at", - |_self: Ref<::bevy_math::bounding::RayCast2d>, aabb: Ref<::bevy_math::bounding::Aabb2d>| { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = - ::bevy_math::bounding::RayCast2d::aabb_intersection_at(&_self, &aabb) - .into(); - output - } - }; - output - }, - " Get the distance of an intersection with an [`Aabb2d`], if any.", - &["_self", "aabb"], - ) - .register_documented( - "circle_intersection_at", - |_self: Ref<::bevy_math::bounding::RayCast2d>, - circle: Ref<::bevy_math::bounding::BoundingCircle>| { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = - ::bevy_math::bounding::RayCast2d::circle_intersection_at(&_self, &circle) - .into(); - output - } - }; - output - }, - " Get the distance of an intersection with a [`BoundingCircle`], if any.", - &["_self", "circle"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_math::bounding::RayCast2d>| { - let output: Val<::bevy_math::bounding::RayCast2d> = { - { - let output: Val<::bevy_math::bounding::RayCast2d> = - <::bevy_math::bounding::RayCast2d as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "direction_recip", - |_self: Ref<::bevy_math::bounding::RayCast2d>| { - let output: Val<::bevy_math::prelude::Vec2> = { - { - let output: Val<::bevy_math::prelude::Vec2> = - ::bevy_math::bounding::RayCast2d::direction_recip(&_self).into(); - output - } - }; - output - }, - " Get the cached multiplicative inverse of the direction of the ray.", - &["_self"], - ) - .register_documented( - "from_ray", - |ray: Val<::bevy_math::Ray2d>, max: f32| { - let output: Val<::bevy_math::bounding::RayCast2d> = { - { - let output: Val<::bevy_math::bounding::RayCast2d> = - ::bevy_math::bounding::RayCast2d::from_ray(ray.into_inner(), max).into(); - output - } - }; - output - }, - " Construct a [`RayCast2d`] from a [`Ray2d`] and max distance.", - &["ray", "max"], - ) - .register_documented( - "new", - |origin: Val<::bevy_math::prelude::Vec2>, - direction: Val<::bevy_math::prelude::Dir2>, - max: f32| { - let output: Val<::bevy_math::bounding::RayCast2d> = { - { - let output: Val<::bevy_math::bounding::RayCast2d> = - ::bevy_math::bounding::RayCast2d::new( - origin.into_inner(), - direction.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct a [`RayCast2d`] from an origin, [`Dir2`], and max distance.", - &["origin", "direction", "max"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_math::bounding::RayCast2d, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_aabb_cast_2_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::bounding::AabbCast2d, - >::new(world) - .register_documented( - "aabb_collision_at", - |_self: Ref<::bevy_math::bounding::AabbCast2d>, - aabb: Val<::bevy_math::bounding::Aabb2d>| { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = - ::bevy_math::bounding::AabbCast2d::aabb_collision_at( - &_self, - aabb.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the distance at which the [`Aabb2d`]s collide, if at all.", - &["_self", "aabb"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_math::bounding::AabbCast2d>| { - let output: Val<::bevy_math::bounding::AabbCast2d> = { - { - let output: Val<::bevy_math::bounding::AabbCast2d> = - <::bevy_math::bounding::AabbCast2d as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "from_ray", - |aabb: Val<::bevy_math::bounding::Aabb2d>, ray: Val<::bevy_math::Ray2d>, max: f32| { - let output: Val<::bevy_math::bounding::AabbCast2d> = { - { - let output: Val<::bevy_math::bounding::AabbCast2d> = - ::bevy_math::bounding::AabbCast2d::from_ray( - aabb.into_inner(), - ray.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct an [`AabbCast2d`] from an [`Aabb2d`], [`Ray2d`], and max distance.", - &["aabb", "ray", "max"], - ) - .register_documented( - "new", - |aabb: Val<::bevy_math::bounding::Aabb2d>, - origin: Val<::bevy_math::prelude::Vec2>, - direction: Val<::bevy_math::prelude::Dir2>, - max: f32| { - let output: Val<::bevy_math::bounding::AabbCast2d> = { - { - let output: Val<::bevy_math::bounding::AabbCast2d> = - ::bevy_math::bounding::AabbCast2d::new( - aabb.into_inner(), - origin.into_inner(), - direction.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct an [`AabbCast2d`] from an [`Aabb2d`], origin, [`Dir2`], and max distance.", - &["aabb", "origin", "direction", "max"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_math::bounding::AabbCast2d, + ::bevy_math::bounding::BoundingCircleCast, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_bounding_circle_cast_functions(world: &mut World) { +pub(crate) fn register_ray_cast_3_d_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::bounding::BoundingCircleCast, + ::bevy_math::bounding::RayCast3d, >::new(world) .register_documented( - "circle_collision_at", + "aabb_intersection_at", | - _self: Ref<::bevy_math::bounding::BoundingCircleCast>, - circle: Val<::bevy_math::bounding::BoundingCircle>| + _self: Ref<::bevy_math::bounding::RayCast3d>, + aabb: Ref<::bevy_math::bounding::Aabb3d>| { let output: ::core::option::Option = { { - let output: ::core::option::Option = ::bevy_math::bounding::BoundingCircleCast::circle_collision_at( + let output: ::core::option::Option = ::bevy_math::bounding::RayCast3d::aabb_intersection_at( &_self, - circle.into_inner(), + &aabb, ) .into(); output @@ -7847,15 +8206,15 @@ pub(crate) fn register_bounding_circle_cast_functions(world: &mut World) { }; output }, - " Get the distance at which the [`BoundingCircle`]s collide, if at all.", - &["_self", "circle"], + " Get the distance of an intersection with an [`Aabb3d`], if any.", + &["_self", "aabb"], ) .register_documented( "clone", - |_self: Ref<::bevy_math::bounding::BoundingCircleCast>| { - let output: Val<::bevy_math::bounding::BoundingCircleCast> = { + |_self: Ref<::bevy_math::bounding::RayCast3d>| { + let output: Val<::bevy_math::bounding::RayCast3d> = { { - let output: Val<::bevy_math::bounding::BoundingCircleCast> = <::bevy_math::bounding::BoundingCircleCast as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::bounding::RayCast3d> = <::bevy_math::bounding::RayCast3d as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -7867,17 +8226,29 @@ pub(crate) fn register_bounding_circle_cast_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "direction_recip", + |_self: Ref<::bevy_math::bounding::RayCast3d>| { + let output: Val<::bevy_math::Vec3A> = { + { + let output: Val<::bevy_math::Vec3A> = ::bevy_math::bounding::RayCast3d::direction_recip( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get the cached multiplicative inverse of the direction of the ray.", + &["_self"], + ) .register_documented( "from_ray", - | - circle: Val<::bevy_math::bounding::BoundingCircle>, - ray: Val<::bevy_math::Ray2d>, - max: f32| - { - let output: Val<::bevy_math::bounding::BoundingCircleCast> = { + |ray: Val<::bevy_math::Ray3d>, max: f32| { + let output: Val<::bevy_math::bounding::RayCast3d> = { { - let output: Val<::bevy_math::bounding::BoundingCircleCast> = ::bevy_math::bounding::BoundingCircleCast::from_ray( - circle.into_inner(), + let output: Val<::bevy_math::bounding::RayCast3d> = ::bevy_math::bounding::RayCast3d::from_ray( ray.into_inner(), max, ) @@ -7887,24 +8258,20 @@ pub(crate) fn register_bounding_circle_cast_functions(world: &mut World) { }; output }, - " Construct a [`BoundingCircleCast`] from a [`BoundingCircle`], [`Ray2d`], and max distance.", - &["circle", "ray", "max"], + " Construct a [`RayCast3d`] from a [`Ray3d`] and max distance.", + &["ray", "max"], ) .register_documented( - "new", + "sphere_intersection_at", | - circle: Val<::bevy_math::bounding::BoundingCircle>, - origin: Val<::bevy_math::prelude::Vec2>, - direction: Val<::bevy_math::prelude::Dir2>, - max: f32| + _self: Ref<::bevy_math::bounding::RayCast3d>, + sphere: Ref<::bevy_math::bounding::BoundingSphere>| { - let output: Val<::bevy_math::bounding::BoundingCircleCast> = { + let output: ::core::option::Option = { { - let output: Val<::bevy_math::bounding::BoundingCircleCast> = ::bevy_math::bounding::BoundingCircleCast::new( - circle.into_inner(), - origin.into_inner(), - direction.into_inner(), - max, + let output: ::core::option::Option = ::bevy_math::bounding::RayCast3d::sphere_intersection_at( + &_self, + &sphere, ) .into(); output @@ -7912,102 +8279,11 @@ pub(crate) fn register_bounding_circle_cast_functions(world: &mut World) { }; output }, - " Construct a [`BoundingCircleCast`] from a [`BoundingCircle`], origin, [`Dir2`], and max distance.", - &["circle", "origin", "direction", "max"], + " Get the distance of an intersection with a [`BoundingSphere`], if any.", + &["_self", "sphere"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_math::bounding::BoundingCircleCast, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_ray_cast_3_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::bounding::RayCast3d, - >::new(world) - .register_documented( - "aabb_intersection_at", - |_self: Ref<::bevy_math::bounding::RayCast3d>, aabb: Ref<::bevy_math::bounding::Aabb3d>| { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = - ::bevy_math::bounding::RayCast3d::aabb_intersection_at(&_self, &aabb) - .into(); - output - } - }; - output - }, - " Get the distance of an intersection with an [`Aabb3d`], if any.", - &["_self", "aabb"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_math::bounding::RayCast3d>| { - let output: Val<::bevy_math::bounding::RayCast3d> = { - { - let output: Val<::bevy_math::bounding::RayCast3d> = - <::bevy_math::bounding::RayCast3d as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "direction_recip", - |_self: Ref<::bevy_math::bounding::RayCast3d>| { - let output: Val<::bevy_math::prelude::Vec3A> = { - { - let output: Val<::bevy_math::prelude::Vec3A> = - ::bevy_math::bounding::RayCast3d::direction_recip(&_self).into(); - output - } - }; - output - }, - " Get the cached multiplicative inverse of the direction of the ray.", - &["_self"], - ) - .register_documented( - "from_ray", - |ray: Val<::bevy_math::Ray3d>, max: f32| { - let output: Val<::bevy_math::bounding::RayCast3d> = { - { - let output: Val<::bevy_math::bounding::RayCast3d> = - ::bevy_math::bounding::RayCast3d::from_ray(ray.into_inner(), max).into(); - output - } - }; - output - }, - " Construct a [`RayCast3d`] from a [`Ray3d`] and max distance.", - &["ray", "max"], - ) - .register_documented( - "sphere_intersection_at", - |_self: Ref<::bevy_math::bounding::RayCast3d>, - sphere: Ref<::bevy_math::bounding::BoundingSphere>| { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = - ::bevy_math::bounding::RayCast3d::sphere_intersection_at(&_self, &sphere) - .into(); - output - } - }; - output - }, - " Get the distance of an intersection with a [`BoundingSphere`], if any.", - &["_self", "sphere"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); registry .register_type_data::< ::bevy_math::bounding::RayCast3d, @@ -8018,62 +8294,67 @@ pub(crate) fn register_aabb_cast_3_d_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_math::bounding::AabbCast3d, >::new(world) - .register_documented( - "aabb_collision_at", - |_self: Ref<::bevy_math::bounding::AabbCast3d>, - aabb: Val<::bevy_math::bounding::Aabb3d>| { - let output: ::core::option::Option = { - { - let output: ::core::option::Option = - ::bevy_math::bounding::AabbCast3d::aabb_collision_at( - &_self, - aabb.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Get the distance at which the [`Aabb3d`]s collide, if at all.", - &["_self", "aabb"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_math::bounding::AabbCast3d>| { - let output: Val<::bevy_math::bounding::AabbCast3d> = { - { - let output: Val<::bevy_math::bounding::AabbCast3d> = - <::bevy_math::bounding::AabbCast3d as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "from_ray", - |aabb: Val<::bevy_math::bounding::Aabb3d>, ray: Val<::bevy_math::Ray3d>, max: f32| { - let output: Val<::bevy_math::bounding::AabbCast3d> = { - { - let output: Val<::bevy_math::bounding::AabbCast3d> = - ::bevy_math::bounding::AabbCast3d::from_ray( - aabb.into_inner(), - ray.into_inner(), - max, - ) - .into(); - output - } - }; - output - }, - " Construct an [`AabbCast3d`] from an [`Aabb3d`], [`Ray3d`], and max distance.", - &["aabb", "ray", "max"], - ); + .register_documented( + "aabb_collision_at", + | + _self: Ref<::bevy_math::bounding::AabbCast3d>, + aabb: Val<::bevy_math::bounding::Aabb3d>| + { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::bevy_math::bounding::AabbCast3d::aabb_collision_at( + &_self, + aabb.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Get the distance at which the [`Aabb3d`]s collide, if at all.", + &["_self", "aabb"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_math::bounding::AabbCast3d>| { + let output: Val<::bevy_math::bounding::AabbCast3d> = { + { + let output: Val<::bevy_math::bounding::AabbCast3d> = <::bevy_math::bounding::AabbCast3d as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "from_ray", + | + aabb: Val<::bevy_math::bounding::Aabb3d>, + ray: Val<::bevy_math::Ray3d>, + max: f32| + { + let output: Val<::bevy_math::bounding::AabbCast3d> = { + { + let output: Val<::bevy_math::bounding::AabbCast3d> = ::bevy_math::bounding::AabbCast3d::from_ray( + aabb.into_inner(), + ray.into_inner(), + max, + ) + .into(); + output + } + }; + output + }, + " Construct an [`AabbCast3d`] from an [`Aabb3d`], [`Ray3d`], and max distance.", + &["aabb", "ray", "max"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -8157,14 +8438,14 @@ pub(crate) fn register_bounding_sphere_cast_functions(world: &mut World) { } pub(crate) fn register_interval_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::curve::interval::Interval, + ::bevy_math::curve::Interval, >::new(world) .register_documented( "clamp", - |_self: Val<::bevy_math::curve::interval::Interval>, value: f32| { + |_self: Val<::bevy_math::curve::Interval>, value: f32| { let output: f32 = { { - let output: f32 = ::bevy_math::curve::interval::Interval::clamp( + let output: f32 = ::bevy_math::curve::Interval::clamp( _self.into_inner(), value, ) @@ -8179,10 +8460,10 @@ pub(crate) fn register_interval_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_math::curve::interval::Interval>| { - let output: Val<::bevy_math::curve::interval::Interval> = { + |_self: Ref<::bevy_math::curve::Interval>| { + let output: Val<::bevy_math::curve::Interval> = { { - let output: Val<::bevy_math::curve::interval::Interval> = <::bevy_math::curve::interval::Interval as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::curve::Interval> = <::bevy_math::curve::Interval as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -8196,10 +8477,10 @@ pub(crate) fn register_interval_functions(world: &mut World) { ) .register_documented( "contains", - |_self: Val<::bevy_math::curve::interval::Interval>, item: f32| { + |_self: Val<::bevy_math::curve::Interval>, item: f32| { let output: bool = { { - let output: bool = ::bevy_math::curve::interval::Interval::contains( + let output: bool = ::bevy_math::curve::Interval::contains( _self.into_inner(), item, ) @@ -8215,12 +8496,12 @@ pub(crate) fn register_interval_functions(world: &mut World) { .register_documented( "contains_interval", | - _self: Val<::bevy_math::curve::interval::Interval>, - other: Val<::bevy_math::curve::interval::Interval>| + _self: Val<::bevy_math::curve::Interval>, + other: Val<::bevy_math::curve::Interval>| { let output: bool = { { - let output: bool = ::bevy_math::curve::interval::Interval::contains_interval( + let output: bool = ::bevy_math::curve::Interval::contains_interval( _self.into_inner(), other.into_inner(), ) @@ -8235,10 +8516,10 @@ pub(crate) fn register_interval_functions(world: &mut World) { ) .register_documented( "end", - |_self: Val<::bevy_math::curve::interval::Interval>| { + |_self: Val<::bevy_math::curve::Interval>| { let output: f32 = { { - let output: f32 = ::bevy_math::curve::interval::Interval::end( + let output: f32 = ::bevy_math::curve::Interval::end( _self.into_inner(), ) .into(); @@ -8253,13 +8534,13 @@ pub(crate) fn register_interval_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_math::curve::interval::Interval>, - other: Ref<::bevy_math::curve::interval::Interval>| + _self: Ref<::bevy_math::curve::Interval>, + other: Ref<::bevy_math::curve::Interval>| { let output: bool = { { - let output: bool = <::bevy_math::curve::interval::Interval as ::core::cmp::PartialEq< - ::bevy_math::curve::interval::Interval, + let output: bool = <::bevy_math::curve::Interval as ::core::cmp::PartialEq< + ::bevy_math::curve::Interval, >>::eq(&_self, &other) .into(); output @@ -8272,10 +8553,10 @@ pub(crate) fn register_interval_functions(world: &mut World) { ) .register_documented( "has_finite_end", - |_self: Val<::bevy_math::curve::interval::Interval>| { + |_self: Val<::bevy_math::curve::Interval>| { let output: bool = { { - let output: bool = ::bevy_math::curve::interval::Interval::has_finite_end( + let output: bool = ::bevy_math::curve::Interval::has_finite_end( _self.into_inner(), ) .into(); @@ -8289,10 +8570,10 @@ pub(crate) fn register_interval_functions(world: &mut World) { ) .register_documented( "has_finite_start", - |_self: Val<::bevy_math::curve::interval::Interval>| { + |_self: Val<::bevy_math::curve::Interval>| { let output: bool = { { - let output: bool = ::bevy_math::curve::interval::Interval::has_finite_start( + let output: bool = ::bevy_math::curve::Interval::has_finite_start( _self.into_inner(), ) .into(); @@ -8306,10 +8587,10 @@ pub(crate) fn register_interval_functions(world: &mut World) { ) .register_documented( "is_bounded", - |_self: Val<::bevy_math::curve::interval::Interval>| { + |_self: Val<::bevy_math::curve::Interval>| { let output: bool = { { - let output: bool = ::bevy_math::curve::interval::Interval::is_bounded( + let output: bool = ::bevy_math::curve::Interval::is_bounded( _self.into_inner(), ) .into(); @@ -8323,10 +8604,10 @@ pub(crate) fn register_interval_functions(world: &mut World) { ) .register_documented( "length", - |_self: Val<::bevy_math::curve::interval::Interval>| { + |_self: Val<::bevy_math::curve::Interval>| { let output: f32 = { { - let output: f32 = ::bevy_math::curve::interval::Interval::length( + let output: f32 = ::bevy_math::curve::Interval::length( _self.into_inner(), ) .into(); @@ -8340,10 +8621,10 @@ pub(crate) fn register_interval_functions(world: &mut World) { ) .register_documented( "start", - |_self: Val<::bevy_math::curve::interval::Interval>| { + |_self: Val<::bevy_math::curve::Interval>| { let output: f32 = { { - let output: f32 = ::bevy_math::curve::interval::Interval::start( + let output: f32 = ::bevy_math::curve::Interval::start( _self.into_inner(), ) .into(); @@ -8359,7 +8640,158 @@ pub(crate) fn register_interval_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::curve::interval::Interval, + ::bevy_math::curve::Interval, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_dir_4_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_math::Dir4, + >::new(world) + .register_documented( + "as_vec4", + |_self: Ref<::bevy_math::Dir4>| { + let output: Val<::bevy_math::Vec4> = { + { + let output: Val<::bevy_math::Vec4> = ::bevy_math::Dir4::as_vec4( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the inner [`Vec4`]", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_math::Dir4>| { + let output: Val<::bevy_math::Dir4> = { + { + let output: Val<::bevy_math::Dir4> = <::bevy_math::Dir4 as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_math::Dir4>, other: Ref<::bevy_math::Dir4>| { + let output: bool = { + { + let output: bool = <::bevy_math::Dir4 as ::core::cmp::PartialEq< + ::bevy_math::Dir4, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "fast_renormalize", + |_self: Val<::bevy_math::Dir4>| { + let output: Val<::bevy_math::Dir4> = { + { + let output: Val<::bevy_math::Dir4> = ::bevy_math::Dir4::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.", + &["_self"], + ) + .register_documented( + "from_xyzw_unchecked", + |x: f32, y: f32, z: f32, w: f32| { + let output: Val<::bevy_math::Dir4> = { + { + let output: Val<::bevy_math::Dir4> = ::bevy_math::Dir4::from_xyzw_unchecked( + x, + y, + z, + w, + ) + .into(); + output + } + }; + output + }, + " Create a direction from its `x`, `y`, `z`, and `w` components, assuming the resulting vector is normalized.\n # Warning\n The vector produced from `x`, `y`, `z`, and `w` must be normalized, i.e its length must be `1.0`.", + &["x", "y", "z", "w"], + ) + .register_documented( + "mul", + |_self: Val<::bevy_math::Dir4>, rhs: f32| { + let output: Val<::bevy_math::Vec4> = { + { + let output: Val<::bevy_math::Vec4> = <::bevy_math::Dir4 as ::core::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "neg", + |_self: Val<::bevy_math::Dir4>| { + let output: Val<::bevy_math::Dir4> = { + { + let output: Val<::bevy_math::Dir4> = <::bevy_math::Dir4 as ::core::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "new_unchecked", + |value: Val<::bevy_math::Vec4>| { + let output: Val<::bevy_math::Dir4> = { + { + let output: Val<::bevy_math::Dir4> = ::bevy_math::Dir4::new_unchecked( + value.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Create a [`Dir4`] from a [`Vec4`] that is already normalized.\n # Warning\n `value` must be normalized, i.e its length must be `1.0`.", + &["value"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_math::Dir4, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -8489,8 +8921,10 @@ pub(crate) fn register_float_ord_functions(world: &mut World) { let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_math::FloatOrd, bevy_mod_scripting_bindings::MarkAsGenerated>( - ); + .register_type_data::< + ::bevy_math::FloatOrd, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } pub(crate) fn register_plane_3_d_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< @@ -8535,10 +8969,7 @@ pub(crate) fn register_plane_3_d_functions(world: &mut World) { ) .register_documented( "new", - | - normal: Val<::bevy_math::prelude::Vec3>, - half_size: Val<::bevy_math::prelude::Vec2>| - { + |normal: Val<::bevy_math::Vec3>, half_size: Val<::bevy_math::Vec2>| { let output: Val<::bevy_math::primitives::Plane3d> = { { let output: Val<::bevy_math::primitives::Plane3d> = ::bevy_math::primitives::Plane3d::new( @@ -8569,9 +9000,9 @@ pub(crate) fn register_tetrahedron_functions(world: &mut World) { .register_documented( "centroid", |_self: Ref<::bevy_math::primitives::Tetrahedron>| { - let output: Val<::bevy_math::prelude::Vec3> = { + let output: Val<::bevy_math::Vec3> = { { - let output: Val<::bevy_math::prelude::Vec3> = ::bevy_math::primitives::Tetrahedron::centroid( + let output: Val<::bevy_math::Vec3> = ::bevy_math::primitives::Tetrahedron::centroid( &_self, ) .into(); @@ -8623,10 +9054,10 @@ pub(crate) fn register_tetrahedron_functions(world: &mut World) { .register_documented( "new", | - a: Val<::bevy_math::prelude::Vec3>, - b: Val<::bevy_math::prelude::Vec3>, - c: Val<::bevy_math::prelude::Vec3>, - d: Val<::bevy_math::prelude::Vec3>| + a: Val<::bevy_math::Vec3>, + b: Val<::bevy_math::Vec3>, + c: Val<::bevy_math::Vec3>, + d: Val<::bevy_math::Vec3>| { let output: Val<::bevy_math::primitives::Tetrahedron> = { { @@ -8672,63 +9103,63 @@ pub(crate) fn register_tetrahedron_functions(world: &mut World) { } pub(crate) fn register_ease_function_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::curve::easing::EaseFunction, + ::bevy_math::curve::EaseFunction, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_math::curve::easing::EaseFunction>| { - let output: Val<::bevy_math::curve::easing::EaseFunction> = { - { - let output: Val<::bevy_math::curve::easing::EaseFunction> = - <::bevy_math::curve::easing::EaseFunction as ::core::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_math::curve::easing::EaseFunction>, - other: Ref<::bevy_math::curve::easing::EaseFunction>| { - let output: bool = { - { - let output: bool = - <::bevy_math::curve::easing::EaseFunction as ::core::cmp::PartialEq< - ::bevy_math::curve::easing::EaseFunction, + .register_documented( + "clone", + |_self: Ref<::bevy_math::curve::EaseFunction>| { + let output: Val<::bevy_math::curve::EaseFunction> = { + { + let output: Val<::bevy_math::curve::EaseFunction> = <::bevy_math::curve::EaseFunction as ::core::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_math::curve::EaseFunction>, + other: Ref<::bevy_math::curve::EaseFunction>| + { + let output: bool = { + { + let output: bool = <::bevy_math::curve::EaseFunction as ::core::cmp::PartialEq< + ::bevy_math::curve::EaseFunction, >>::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_math::curve::easing::EaseFunction, + ::bevy_math::curve::EaseFunction, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_jump_at_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_math::curve::easing::JumpAt, + ::bevy_math::curve::JumpAt, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_math::curve::easing::JumpAt>| { + |_self: Ref<::bevy_math::curve::JumpAt>| { let output: () = { { - let output: () = <::bevy_math::curve::easing::JumpAt as ::core::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_math::curve::JumpAt as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -8742,10 +9173,10 @@ pub(crate) fn register_jump_at_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_math::curve::easing::JumpAt>| { - let output: Val<::bevy_math::curve::easing::JumpAt> = { + |_self: Ref<::bevy_math::curve::JumpAt>| { + let output: Val<::bevy_math::curve::JumpAt> = { { - let output: Val<::bevy_math::curve::easing::JumpAt> = <::bevy_math::curve::easing::JumpAt as ::core::clone::Clone>::clone( + let output: Val<::bevy_math::curve::JumpAt> = <::bevy_math::curve::JumpAt as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -8760,13 +9191,13 @@ pub(crate) fn register_jump_at_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_math::curve::easing::JumpAt>, - other: Ref<::bevy_math::curve::easing::JumpAt>| + _self: Ref<::bevy_math::curve::JumpAt>, + other: Ref<::bevy_math::curve::JumpAt>| { let output: bool = { { - let output: bool = <::bevy_math::curve::easing::JumpAt as ::core::cmp::PartialEq< - ::bevy_math::curve::easing::JumpAt, + let output: bool = <::bevy_math::curve::JumpAt as ::core::cmp::PartialEq< + ::bevy_math::curve::JumpAt, >>::eq(&_self, &other) .into(); output @@ -8781,7 +9212,7 @@ pub(crate) fn register_jump_at_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_math::curve::easing::JumpAt, + ::bevy_math::curve::JumpAt, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -8819,6 +9250,9 @@ impl Plugin for BevyMathScriptingPlugin { register_rhombus_functions(&mut world); register_segment_2_d_functions(&mut world); register_triangle_2_d_functions(&mut world); + register_convex_polygon_functions(&mut world); + register_polygon_functions(&mut world); + register_polyline_2_d_functions(&mut world); register_aabb_3_d_functions(&mut world); register_bounding_sphere_functions(&mut world); register_sphere_functions(&mut world); @@ -8832,6 +9266,7 @@ impl Plugin for BevyMathScriptingPlugin { register_segment_3_d_functions(&mut world); register_torus_functions(&mut world); register_triangle_3_d_functions(&mut world); + register_polyline_3_d_functions(&mut world); register_ray_cast_2_d_functions(&mut world); register_aabb_cast_2_d_functions(&mut world); register_bounding_circle_cast_functions(&mut world); @@ -8839,6 +9274,7 @@ impl Plugin for BevyMathScriptingPlugin { register_aabb_cast_3_d_functions(&mut world); register_bounding_sphere_cast_functions(&mut world); register_interval_functions(&mut world); + register_dir_4_functions(&mut world); register_float_ord_functions(&mut world); register_plane_3_d_functions(&mut world); register_tetrahedron_functions(&mut world); diff --git a/crates/bindings/bevy_mesh_bms_bindings/Cargo.toml b/crates/bindings/bevy_mesh_bms_bindings/Cargo.toml index 153e5a66eb..e5d2415af9 100644 --- a/crates/bindings/bevy_mesh_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_mesh_bms_bindings/Cargo.toml @@ -13,36 +13,35 @@ categories.workspace = true [dependencies] -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_mesh = { version = "0.16.1", features = [], default-features = true } +bevy_mesh = { version = "0.17.2", features = [], default-features = true} + +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_derive = { version = "^0.16.1", features = [], default-features = true } +bevy_derive = { version = "^0.17.2", features = [], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.16.1", features = [], default-features = true } +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.16.1", features = [], default-features = true } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_mikktspace = { version = "^0.16.1", features = [ -], default-features = true } +bevy_mikktspace = { version = "^0.17.0-dev", features = [], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +bitflags = { version = "^2.3", features = [], default-features = true} -bitflags = { version = "^2.3", features = [], default-features = true } +bytemuck = { version = "^1.5", features = [], default-features = true} -bytemuck = { version = "^1.5", features = [], default-features = true } +hexasphere = { version = "^16.0", features = [], default-features = true} -hexasphere = { version = "^15.0", features = [], default-features = true } -serde = { version = "^1", 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 c9e7179f3a..f9c7d38e06 100644 --- a/crates/bindings/bevy_mesh_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_mesh_bms_bindings/src/lib.rs @@ -1,27 +1,30 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyMeshScriptingPlugin; -pub(crate) fn register_indices_functions(world: &mut World) { +pub(crate) fn register_morph_weights_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::Indices, + ::bevy_mesh::morph::MorphWeights, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::Indices>| { - let output: Val<::bevy_mesh::Indices> = { + |_self: Ref<::bevy_mesh::morph::MorphWeights>| { + let output: Val<::bevy_mesh::morph::MorphWeights> = { { - let output: Val<::bevy_mesh::Indices> = <::bevy_mesh::Indices as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::morph::MorphWeights> = <::bevy_mesh::morph::MorphWeights as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -32,54 +35,14 @@ pub(crate) fn register_indices_functions(world: &mut World) { }, "", &["_self"], - ) - .register_documented( - "is_empty", - |_self: Ref<::bevy_mesh::Indices>| { - let output: bool = { - { - let output: bool = ::bevy_mesh::Indices::is_empty(&_self).into(); - output - } - }; - output - }, - " Returns `true` if there are no indices.", - &["_self"], - ) - .register_documented( - "len", - |_self: Ref<::bevy_mesh::Indices>| { - let output: usize = { - { - let output: usize = ::bevy_mesh::Indices::len(&_self).into(); - output - } - }; - output - }, - " Returns the number of indices.", - &["_self"], - ) - .register_documented( - "push", - |mut _self: Mut<::bevy_mesh::Indices>, index: u32| { - let output: () = { - { - let output: () = ::bevy_mesh::Indices::push(&mut _self, index) - .into(); - output - } - }; - output - }, - " Add an index. If the index is greater than `u16::MAX`,\n the storage will be converted to `u32`.", - &["_self", "index"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_mesh::Indices, bevy_mod_scripting_bindings::MarkAsGenerated>(); + .register_type_data::< + ::bevy_mesh::morph::MorphWeights, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } pub(crate) fn register_mesh_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< @@ -102,6 +65,23 @@ pub(crate) fn register_mesh_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "compute_area_weighted_normals", + |mut _self: Mut<::bevy_mesh::Mesh>| { + let output: () = { + { + let output: () = ::bevy_mesh::Mesh::compute_area_weighted_normals( + &mut _self, + ) + .into(); + output + } + }; + 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.", + &["_self"], + ) .register_documented( "compute_flat_normals", |mut _self: Mut<::bevy_mesh::Mesh>| { @@ -131,7 +111,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`].\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 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`].=", &["_self"], ) .register_documented( @@ -148,7 +128,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 # 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 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 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.", &["_self"], ) .register_documented( @@ -200,6 +180,23 @@ pub(crate) fn register_mesh_functions(world: &mut World) { " 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.", &["_self"], ) + .register_documented( + "eq", + |_self: Ref<::bevy_mesh::Mesh>, other: Ref<::bevy_mesh::Mesh>| { + let output: bool = { + { + let output: bool = <::bevy_mesh::Mesh as ::std::cmp::PartialEq< + ::bevy_mesh::Mesh, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) .register_documented( "get_vertex_buffer_size", |_self: Ref<::bevy_mesh::Mesh>| { @@ -284,7 +281,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { ) .register_documented( "rotate_by", - |mut _self: Mut<::bevy_mesh::Mesh>, rotation: Val<::bevy_math::Quat>| { + |mut _self: Mut<::bevy_mesh::Mesh>, rotation: Val<::glam::Quat>| { let output: () = { { let output: () = ::bevy_mesh::Mesh::rotate_by( @@ -302,7 +299,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { ) .register_documented( "rotated_by", - |_self: Val<::bevy_mesh::Mesh>, rotation: Val<::bevy_math::Quat>| { + |_self: Val<::bevy_mesh::Mesh>, rotation: Val<::glam::Quat>| { let output: Val<::bevy_mesh::Mesh> = { { let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::rotated_by( @@ -320,7 +317,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { ) .register_documented( "scale_by", - |mut _self: Mut<::bevy_mesh::Mesh>, scale: Val<::bevy_math::Vec3>| { + |mut _self: Mut<::bevy_mesh::Mesh>, scale: Val<::glam::Vec3>| { let output: () = { { let output: () = ::bevy_mesh::Mesh::scale_by( @@ -338,7 +335,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { ) .register_documented( "scaled_by", - |_self: Val<::bevy_mesh::Mesh>, scale: Val<::bevy_math::Vec3>| { + |_self: Val<::bevy_mesh::Mesh>, scale: Val<::glam::Vec3>| { let output: Val<::bevy_mesh::Mesh> = { { let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::scaled_by( @@ -419,7 +416,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { ) .register_documented( "translate_by", - |mut _self: Mut<::bevy_mesh::Mesh>, translation: Val<::bevy_math::Vec3>| { + |mut _self: Mut<::bevy_mesh::Mesh>, translation: Val<::glam::Vec3>| { let output: () = { { let output: () = ::bevy_mesh::Mesh::translate_by( @@ -437,7 +434,7 @@ pub(crate) fn register_mesh_functions(world: &mut World) { ) .register_documented( "translated_by", - |_self: Val<::bevy_mesh::Mesh>, translation: Val<::bevy_math::Vec3>| { + |_self: Val<::bevy_mesh::Mesh>, translation: Val<::glam::Vec3>| { let output: Val<::bevy_mesh::Mesh> = { { let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::translated_by( @@ -453,6 +450,23 @@ pub(crate) fn register_mesh_functions(world: &mut World) { " Translates the vertex positions of the mesh by the given [`Vec3`].\n `Aabb` of entities with modified mesh are not updated automatically.", &["_self", "translation"], ) + .register_documented( + "with_computed_area_weighted_normals", + |_self: Val<::bevy_mesh::Mesh>| { + let output: Val<::bevy_mesh::Mesh> = { + { + let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_computed_area_weighted_normals( + _self.into_inner(), + ) + .into(); + output + } + }; + 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.", + &["_self"], + ) .register_documented( "with_computed_flat_normals", |_self: Val<::bevy_mesh::Mesh>| { @@ -488,12 +502,392 @@ pub(crate) fn register_mesh_functions(world: &mut World) { &["_self"], ) .register_documented( - "with_computed_smooth_normals", - |_self: Val<::bevy_mesh::Mesh>| { - let output: Val<::bevy_mesh::Mesh> = { + "with_computed_smooth_normals", + |_self: Val<::bevy_mesh::Mesh>| { + let output: Val<::bevy_mesh::Mesh> = { + { + let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_computed_smooth_normals( + _self.into_inner(), + ) + .into(); + output + } + }; + 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.", + &["_self"], + ) + .register_documented( + "with_duplicated_vertices", + |_self: Val<::bevy_mesh::Mesh>| { + let output: Val<::bevy_mesh::Mesh> = { + { + let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_duplicated_vertices( + _self.into_inner(), + ) + .into(); + output + } + }; + 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)", + &["_self"], + ) + .register_documented( + "with_inserted_indices", + |_self: Val<::bevy_mesh::Mesh>, indices: Val<::bevy_mesh::Indices>| { + let output: Val<::bevy_mesh::Mesh> = { + { + let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_inserted_indices( + _self.into_inner(), + indices.into_inner(), + ) + .into(); + output + } + }; + 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)", + &["_self", "indices"], + ) + .register_documented( + "with_morph_target_names", + | + _self: Val<::bevy_mesh::Mesh>, + names: ::std::vec::Vec<::std::string::String>| + { + let output: Val<::bevy_mesh::Mesh> = { + { + let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_morph_target_names( + _self.into_inner(), + names, + ) + .into(); + output + } + }; + 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)", + &["_self", "names"], + ) + .register_documented( + "with_removed_indices", + |_self: Val<::bevy_mesh::Mesh>| { + let output: Val<::bevy_mesh::Mesh> = { + { + let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_removed_indices( + _self.into_inner(), + ) + .into(); + output + } + }; + 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)", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_mesh::Mesh, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_mesh_2_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_mesh::Mesh2d, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_mesh::Mesh2d>| { + let output: () = { + { + let output: () = <::bevy_mesh::Mesh2d as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::Mesh2d>| { + let output: Val<::bevy_mesh::Mesh2d> = { + { + let output: Val<::bevy_mesh::Mesh2d> = <::bevy_mesh::Mesh2d as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_mesh::Mesh2d>, other: Ref<::bevy_mesh::Mesh2d>| { + let output: bool = { + { + let output: bool = <::bevy_mesh::Mesh2d as ::std::cmp::PartialEq< + ::bevy_mesh::Mesh2d, + >>::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_mesh::Mesh2d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_mesh_3_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_mesh::Mesh3d, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_mesh::Mesh3d>| { + let output: () = { + { + let output: () = <::bevy_mesh::Mesh3d as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::Mesh3d>| { + let output: Val<::bevy_mesh::Mesh3d> = { + { + let output: Val<::bevy_mesh::Mesh3d> = <::bevy_mesh::Mesh3d as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_mesh::Mesh3d>, other: Ref<::bevy_mesh::Mesh3d>| { + let output: bool = { + { + let output: bool = <::bevy_mesh::Mesh3d as ::std::cmp::PartialEq< + ::bevy_mesh::Mesh3d, + >>::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_mesh::Mesh3d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_mesh_tag_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_mesh::MeshTag, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_mesh::MeshTag>| { + let output: () = { + { + let output: () = <::bevy_mesh::MeshTag as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::MeshTag>| { + let output: Val<::bevy_mesh::MeshTag> = { + { + let output: Val<::bevy_mesh::MeshTag> = <::bevy_mesh::MeshTag as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_mesh::MeshTag>, other: Ref<::bevy_mesh::MeshTag>| { + let output: bool = { + { + let output: bool = <::bevy_mesh::MeshTag as ::std::cmp::PartialEq< + ::bevy_mesh::MeshTag, + >>::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_mesh::MeshTag, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_indices_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_mesh::Indices, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::Indices>| { + let output: Val<::bevy_mesh::Indices> = { + { + let output: Val<::bevy_mesh::Indices> = <::bevy_mesh::Indices as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_mesh::Indices>, other: Ref<::bevy_mesh::Indices>| { + let output: bool = { + { + let output: bool = <::bevy_mesh::Indices as ::std::cmp::PartialEq< + ::bevy_mesh::Indices, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "is_empty", + |_self: Ref<::bevy_mesh::Indices>| { + let output: bool = { + { + let output: bool = ::bevy_mesh::Indices::is_empty(&_self).into(); + output + } + }; + output + }, + " Returns `true` if there are no indices.", + &["_self"], + ) + .register_documented( + "len", + |_self: Ref<::bevy_mesh::Indices>| { + let output: usize = { + { + let output: usize = ::bevy_mesh::Indices::len(&_self).into(); + output + } + }; + output + }, + " Returns the number of indices.", + &["_self"], + ) + .register_documented( + "push", + |mut _self: Mut<::bevy_mesh::Indices>, index: u32| { + let output: () = { + { + let output: () = ::bevy_mesh::Indices::push(&mut _self, index) + .into(); + output + } + }; + output + }, + " Add an index. If the index is greater than `u16::MAX`,\n the storage will be converted to `u32`.", + &["_self", "index"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_mesh::Indices, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_mesh_morph_weights_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_mesh::morph::MeshMorphWeights, + >::new(world) + .register_documented( + "clear_weights", + |mut _self: Mut<::bevy_mesh::morph::MeshMorphWeights>| { + let output: () = { { - let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_computed_smooth_normals( - _self.into_inner(), + let output: () = ::bevy_mesh::morph::MeshMorphWeights::clear_weights( + &mut _self, ) .into(); output @@ -501,16 +895,16 @@ 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 # 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.", + "", &["_self"], ) .register_documented( - "with_duplicated_vertices", - |_self: Val<::bevy_mesh::Mesh>| { - let output: Val<::bevy_mesh::Mesh> = { + "clone", + |_self: Ref<::bevy_mesh::morph::MeshMorphWeights>| { + let output: Val<::bevy_mesh::morph::MeshMorphWeights> = { { - let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_duplicated_vertices( - _self.into_inner(), + let output: Val<::bevy_mesh::morph::MeshMorphWeights> = <::bevy_mesh::morph::MeshMorphWeights as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -518,17 +912,28 @@ 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)", + "", &["_self"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_mesh::morph::MeshMorphWeights, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_circle_mesh_builder_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_mesh::CircleMeshBuilder, + >::new(world) .register_documented( - "with_inserted_indices", - |_self: Val<::bevy_mesh::Mesh>, indices: Val<::bevy_mesh::Indices>| { - let output: Val<::bevy_mesh::Mesh> = { + "clone", + |_self: Ref<::bevy_mesh::CircleMeshBuilder>| { + let output: Val<::bevy_mesh::CircleMeshBuilder> = { { - let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_inserted_indices( - _self.into_inner(), - indices.into_inner(), + let output: Val<::bevy_mesh::CircleMeshBuilder> = <::bevy_mesh::CircleMeshBuilder as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -536,20 +941,17 @@ 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)", - &["_self", "indices"], + "", + &["_self"], ) .register_documented( - "with_morph_target_names", - | - _self: Val<::bevy_mesh::Mesh>, - names: ::std::vec::Vec<::std::string::String>| - { - let output: Val<::bevy_mesh::Mesh> = { + "new", + |radius: f32, resolution: u32| { + let output: Val<::bevy_mesh::CircleMeshBuilder> = { { - let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_morph_target_names( - _self.into_inner(), - names, + let output: Val<::bevy_mesh::CircleMeshBuilder> = ::bevy_mesh::CircleMeshBuilder::new( + radius, + resolution, ) .into(); output @@ -557,16 +959,17 @@ 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)", - &["_self", "names"], + " Creates a new [`CircleMeshBuilder`] from a given radius and vertex count.", + &["radius", "resolution"], ) .register_documented( - "with_removed_indices", - |_self: Val<::bevy_mesh::Mesh>| { - let output: Val<::bevy_mesh::Mesh> = { + "resolution", + |_self: Val<::bevy_mesh::CircleMeshBuilder>, resolution: u32| { + let output: Val<::bevy_mesh::CircleMeshBuilder> = { { - let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::Mesh::with_removed_indices( + let output: Val<::bevy_mesh::CircleMeshBuilder> = ::bevy_mesh::CircleMeshBuilder::resolution( _self.into_inner(), + resolution, ) .into(); output @@ -574,161 +977,27 @@ 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)", - &["_self"], + " Sets the number of vertices used for the circle mesh.", + &["_self", "resolution"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); - registry - .register_type_data::<::bevy_mesh::Mesh, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} -pub(crate) fn register_morph_weights_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::morph::MorphWeights, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_mesh::morph::MorphWeights>| { - let output: Val<::bevy_mesh::morph::MorphWeights> = { - { - let output: Val<::bevy_mesh::morph::MorphWeights> = - <::bevy_mesh::morph::MorphWeights 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_mesh::morph::MorphWeights, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_mesh_morph_weights_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::morph::MeshMorphWeights, - >::new(world) - .register_documented( - "clear_weights", - |mut _self: Mut<::bevy_mesh::morph::MeshMorphWeights>| { - let output: () = { - { - let output: () = - ::bevy_mesh::morph::MeshMorphWeights::clear_weights(&mut _self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_mesh::morph::MeshMorphWeights>| { - let output: Val<::bevy_mesh::morph::MeshMorphWeights> = { - { - let output: Val<::bevy_mesh::morph::MeshMorphWeights> = - <::bevy_mesh::morph::MeshMorphWeights 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_mesh::morph::MeshMorphWeights, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_circle_mesh_builder_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::CircleMeshBuilder, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_mesh::primitives::CircleMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::CircleMeshBuilder> = { - { - let output: Val<::bevy_mesh::primitives::CircleMeshBuilder> = - <::bevy_mesh::primitives::CircleMeshBuilder as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - |radius: f32, resolution: u32| { - let output: Val<::bevy_mesh::primitives::CircleMeshBuilder> = { - { - let output: Val<::bevy_mesh::primitives::CircleMeshBuilder> = - ::bevy_mesh::primitives::CircleMeshBuilder::new(radius, resolution).into(); - output - } - }; - output - }, - " Creates a new [`CircleMeshBuilder`] from a given radius and vertex count.", - &["radius", "resolution"], - ) - .register_documented( - "resolution", - |_self: Val<::bevy_mesh::primitives::CircleMeshBuilder>, resolution: u32| { - let output: Val<::bevy_mesh::primitives::CircleMeshBuilder> = { - { - let output: Val<::bevy_mesh::primitives::CircleMeshBuilder> = - ::bevy_mesh::primitives::CircleMeshBuilder::resolution( - _self.into_inner(), - resolution, - ) - .into(); - output - } - }; - output - }, - " Sets the number of vertices used for the circle mesh.", - &["_self", "resolution"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::CircleMeshBuilder, + ::bevy_mesh::CircleMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_circular_mesh_uv_mode_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::CircularMeshUvMode, + ::bevy_mesh::CircularMeshUvMode, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::CircularMeshUvMode>| { - let output: Val<::bevy_mesh::primitives::CircularMeshUvMode> = { + |_self: Ref<::bevy_mesh::CircularMeshUvMode>| { + let output: Val<::bevy_mesh::CircularMeshUvMode> = { { - let output: Val<::bevy_mesh::primitives::CircularMeshUvMode> = <::bevy_mesh::primitives::CircularMeshUvMode as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::CircularMeshUvMode> = <::bevy_mesh::CircularMeshUvMode as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -743,13 +1012,13 @@ pub(crate) fn register_circular_mesh_uv_mode_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_mesh::primitives::CircularMeshUvMode>, - other: Ref<::bevy_mesh::primitives::CircularMeshUvMode>| + _self: Ref<::bevy_mesh::CircularMeshUvMode>, + other: Ref<::bevy_mesh::CircularMeshUvMode>| { let output: bool = { { - let output: bool = <::bevy_mesh::primitives::CircularMeshUvMode as ::std::cmp::PartialEq< - ::bevy_mesh::primitives::CircularMeshUvMode, + let output: bool = <::bevy_mesh::CircularMeshUvMode as ::std::cmp::PartialEq< + ::bevy_mesh::CircularMeshUvMode, >>::eq(&_self, &other) .into(); output @@ -764,22 +1033,20 @@ pub(crate) fn register_circular_mesh_uv_mode_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::CircularMeshUvMode, + ::bevy_mesh::CircularMeshUvMode, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_circular_sector_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::CircularSectorMeshBuilder, + ::bevy_mesh::CircularSectorMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::CircularSectorMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::CircularSectorMeshBuilder> = { + |_self: Ref<::bevy_mesh::CircularSectorMeshBuilder>| { + let output: Val<::bevy_mesh::CircularSectorMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::CircularSectorMeshBuilder, - > = <::bevy_mesh::primitives::CircularSectorMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::CircularSectorMeshBuilder> = <::bevy_mesh::CircularSectorMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -794,11 +1061,9 @@ pub(crate) fn register_circular_sector_mesh_builder_functions(world: &mut World) .register_documented( "new", |sector: Val<::bevy_math::primitives::CircularSector>| { - let output: Val<::bevy_mesh::primitives::CircularSectorMeshBuilder> = { + let output: Val<::bevy_mesh::CircularSectorMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::CircularSectorMeshBuilder, - > = ::bevy_mesh::primitives::CircularSectorMeshBuilder::new( + let output: Val<::bevy_mesh::CircularSectorMeshBuilder> = ::bevy_mesh::CircularSectorMeshBuilder::new( sector.into_inner(), ) .into(); @@ -812,15 +1077,10 @@ pub(crate) fn register_circular_sector_mesh_builder_functions(world: &mut World) ) .register_documented( "resolution", - | - _self: Val<::bevy_mesh::primitives::CircularSectorMeshBuilder>, - resolution: u32| - { - let output: Val<::bevy_mesh::primitives::CircularSectorMeshBuilder> = { + |_self: Val<::bevy_mesh::CircularSectorMeshBuilder>, resolution: u32| { + let output: Val<::bevy_mesh::CircularSectorMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::CircularSectorMeshBuilder, - > = ::bevy_mesh::primitives::CircularSectorMeshBuilder::resolution( + let output: Val<::bevy_mesh::CircularSectorMeshBuilder> = ::bevy_mesh::CircularSectorMeshBuilder::resolution( _self.into_inner(), resolution, ) @@ -836,14 +1096,12 @@ pub(crate) fn register_circular_sector_mesh_builder_functions(world: &mut World) .register_documented( "uv_mode", | - _self: Val<::bevy_mesh::primitives::CircularSectorMeshBuilder>, - uv_mode: Val<::bevy_mesh::primitives::CircularMeshUvMode>| + _self: Val<::bevy_mesh::CircularSectorMeshBuilder>, + uv_mode: Val<::bevy_mesh::CircularMeshUvMode>| { - let output: Val<::bevy_mesh::primitives::CircularSectorMeshBuilder> = { + let output: Val<::bevy_mesh::CircularSectorMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::CircularSectorMeshBuilder, - > = ::bevy_mesh::primitives::CircularSectorMeshBuilder::uv_mode( + let output: Val<::bevy_mesh::CircularSectorMeshBuilder> = ::bevy_mesh::CircularSectorMeshBuilder::uv_mode( _self.into_inner(), uv_mode.into_inner(), ) @@ -860,22 +1118,20 @@ pub(crate) fn register_circular_sector_mesh_builder_functions(world: &mut World) let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::CircularSectorMeshBuilder, + ::bevy_mesh::CircularSectorMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_circular_segment_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::CircularSegmentMeshBuilder, + ::bevy_mesh::CircularSegmentMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::CircularSegmentMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::CircularSegmentMeshBuilder> = { + |_self: Ref<::bevy_mesh::CircularSegmentMeshBuilder>| { + let output: Val<::bevy_mesh::CircularSegmentMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::CircularSegmentMeshBuilder, - > = <::bevy_mesh::primitives::CircularSegmentMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::CircularSegmentMeshBuilder> = <::bevy_mesh::CircularSegmentMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -890,11 +1146,9 @@ pub(crate) fn register_circular_segment_mesh_builder_functions(world: &mut World .register_documented( "new", |segment: Val<::bevy_math::primitives::CircularSegment>| { - let output: Val<::bevy_mesh::primitives::CircularSegmentMeshBuilder> = { + let output: Val<::bevy_mesh::CircularSegmentMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::CircularSegmentMeshBuilder, - > = ::bevy_mesh::primitives::CircularSegmentMeshBuilder::new( + let output: Val<::bevy_mesh::CircularSegmentMeshBuilder> = ::bevy_mesh::CircularSegmentMeshBuilder::new( segment.into_inner(), ) .into(); @@ -908,15 +1162,10 @@ pub(crate) fn register_circular_segment_mesh_builder_functions(world: &mut World ) .register_documented( "resolution", - | - _self: Val<::bevy_mesh::primitives::CircularSegmentMeshBuilder>, - resolution: u32| - { - let output: Val<::bevy_mesh::primitives::CircularSegmentMeshBuilder> = { + |_self: Val<::bevy_mesh::CircularSegmentMeshBuilder>, resolution: u32| { + let output: Val<::bevy_mesh::CircularSegmentMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::CircularSegmentMeshBuilder, - > = ::bevy_mesh::primitives::CircularSegmentMeshBuilder::resolution( + let output: Val<::bevy_mesh::CircularSegmentMeshBuilder> = ::bevy_mesh::CircularSegmentMeshBuilder::resolution( _self.into_inner(), resolution, ) @@ -932,14 +1181,12 @@ pub(crate) fn register_circular_segment_mesh_builder_functions(world: &mut World .register_documented( "uv_mode", | - _self: Val<::bevy_mesh::primitives::CircularSegmentMeshBuilder>, - uv_mode: Val<::bevy_mesh::primitives::CircularMeshUvMode>| + _self: Val<::bevy_mesh::CircularSegmentMeshBuilder>, + uv_mode: Val<::bevy_mesh::CircularMeshUvMode>| { - let output: Val<::bevy_mesh::primitives::CircularSegmentMeshBuilder> = { + let output: Val<::bevy_mesh::CircularSegmentMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::CircularSegmentMeshBuilder, - > = ::bevy_mesh::primitives::CircularSegmentMeshBuilder::uv_mode( + let output: Val<::bevy_mesh::CircularSegmentMeshBuilder> = ::bevy_mesh::CircularSegmentMeshBuilder::uv_mode( _self.into_inner(), uv_mode.into_inner(), ) @@ -956,22 +1203,49 @@ pub(crate) fn register_circular_segment_mesh_builder_functions(world: &mut World let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::CircularSegmentMeshBuilder, + ::bevy_mesh::CircularSegmentMeshBuilder, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_convex_polygon_mesh_builder_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_mesh::ConvexPolygonMeshBuilder, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::ConvexPolygonMeshBuilder>| { + let output: Val<::bevy_mesh::ConvexPolygonMeshBuilder> = { + { + let output: Val<::bevy_mesh::ConvexPolygonMeshBuilder> = <::bevy_mesh::ConvexPolygonMeshBuilder 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_mesh::ConvexPolygonMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_regular_polygon_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::RegularPolygonMeshBuilder, + ::bevy_mesh::RegularPolygonMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::RegularPolygonMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::RegularPolygonMeshBuilder> = { + |_self: Ref<::bevy_mesh::RegularPolygonMeshBuilder>| { + let output: Val<::bevy_mesh::RegularPolygonMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::RegularPolygonMeshBuilder, - > = <::bevy_mesh::primitives::RegularPolygonMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::RegularPolygonMeshBuilder> = <::bevy_mesh::RegularPolygonMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -986,11 +1260,9 @@ pub(crate) fn register_regular_polygon_mesh_builder_functions(world: &mut World) .register_documented( "new", |circumradius: f32, sides: u32| { - let output: Val<::bevy_mesh::primitives::RegularPolygonMeshBuilder> = { + let output: Val<::bevy_mesh::RegularPolygonMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::RegularPolygonMeshBuilder, - > = ::bevy_mesh::primitives::RegularPolygonMeshBuilder::new( + let output: Val<::bevy_mesh::RegularPolygonMeshBuilder> = ::bevy_mesh::RegularPolygonMeshBuilder::new( circumradius, sides, ) @@ -1007,20 +1279,20 @@ pub(crate) fn register_regular_polygon_mesh_builder_functions(world: &mut World) let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::RegularPolygonMeshBuilder, + ::bevy_mesh::RegularPolygonMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_ellipse_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::EllipseMeshBuilder, + ::bevy_mesh::EllipseMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::EllipseMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::EllipseMeshBuilder> = { + |_self: Ref<::bevy_mesh::EllipseMeshBuilder>| { + let output: Val<::bevy_mesh::EllipseMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::EllipseMeshBuilder> = <::bevy_mesh::primitives::EllipseMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::EllipseMeshBuilder> = <::bevy_mesh::EllipseMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1035,9 +1307,9 @@ pub(crate) fn register_ellipse_mesh_builder_functions(world: &mut World) { .register_documented( "new", |half_width: f32, half_height: f32, resolution: u32| { - let output: Val<::bevy_mesh::primitives::EllipseMeshBuilder> = { + let output: Val<::bevy_mesh::EllipseMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::EllipseMeshBuilder> = ::bevy_mesh::primitives::EllipseMeshBuilder::new( + let output: Val<::bevy_mesh::EllipseMeshBuilder> = ::bevy_mesh::EllipseMeshBuilder::new( half_width, half_height, resolution, @@ -1053,10 +1325,10 @@ pub(crate) fn register_ellipse_mesh_builder_functions(world: &mut World) { ) .register_documented( "resolution", - |_self: Val<::bevy_mesh::primitives::EllipseMeshBuilder>, resolution: u32| { - let output: Val<::bevy_mesh::primitives::EllipseMeshBuilder> = { + |_self: Val<::bevy_mesh::EllipseMeshBuilder>, resolution: u32| { + let output: Val<::bevy_mesh::EllipseMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::EllipseMeshBuilder> = ::bevy_mesh::primitives::EllipseMeshBuilder::resolution( + let output: Val<::bevy_mesh::EllipseMeshBuilder> = ::bevy_mesh::EllipseMeshBuilder::resolution( _self.into_inner(), resolution, ) @@ -1073,20 +1345,49 @@ pub(crate) fn register_ellipse_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::EllipseMeshBuilder, + ::bevy_mesh::EllipseMeshBuilder, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_polyline_2_d_mesh_builder_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_mesh::Polyline2dMeshBuilder, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::Polyline2dMeshBuilder>| { + let output: Val<::bevy_mesh::Polyline2dMeshBuilder> = { + { + let output: Val<::bevy_mesh::Polyline2dMeshBuilder> = <::bevy_mesh::Polyline2dMeshBuilder 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_mesh::Polyline2dMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_annulus_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::AnnulusMeshBuilder, + ::bevy_mesh::AnnulusMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::AnnulusMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::AnnulusMeshBuilder> = { + |_self: Ref<::bevy_mesh::AnnulusMeshBuilder>| { + let output: Val<::bevy_mesh::AnnulusMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::AnnulusMeshBuilder> = <::bevy_mesh::primitives::AnnulusMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::AnnulusMeshBuilder> = <::bevy_mesh::AnnulusMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1101,9 +1402,9 @@ pub(crate) fn register_annulus_mesh_builder_functions(world: &mut World) { .register_documented( "new", |inner_radius: f32, outer_radius: f32, resolution: u32| { - let output: Val<::bevy_mesh::primitives::AnnulusMeshBuilder> = { + let output: Val<::bevy_mesh::AnnulusMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::AnnulusMeshBuilder> = ::bevy_mesh::primitives::AnnulusMeshBuilder::new( + let output: Val<::bevy_mesh::AnnulusMeshBuilder> = ::bevy_mesh::AnnulusMeshBuilder::new( inner_radius, outer_radius, resolution, @@ -1119,10 +1420,10 @@ pub(crate) fn register_annulus_mesh_builder_functions(world: &mut World) { ) .register_documented( "resolution", - |_self: Val<::bevy_mesh::primitives::AnnulusMeshBuilder>, resolution: u32| { - let output: Val<::bevy_mesh::primitives::AnnulusMeshBuilder> = { + |_self: Val<::bevy_mesh::AnnulusMeshBuilder>, resolution: u32| { + let output: Val<::bevy_mesh::AnnulusMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::AnnulusMeshBuilder> = ::bevy_mesh::primitives::AnnulusMeshBuilder::resolution( + let output: Val<::bevy_mesh::AnnulusMeshBuilder> = ::bevy_mesh::AnnulusMeshBuilder::resolution( _self.into_inner(), resolution, ) @@ -1139,20 +1440,20 @@ pub(crate) fn register_annulus_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::AnnulusMeshBuilder, + ::bevy_mesh::AnnulusMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_rhombus_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::RhombusMeshBuilder, + ::bevy_mesh::RhombusMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::RhombusMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::RhombusMeshBuilder> = { + |_self: Ref<::bevy_mesh::RhombusMeshBuilder>| { + let output: Val<::bevy_mesh::RhombusMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::RhombusMeshBuilder> = <::bevy_mesh::primitives::RhombusMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::RhombusMeshBuilder> = <::bevy_mesh::RhombusMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1167,9 +1468,9 @@ pub(crate) fn register_rhombus_mesh_builder_functions(world: &mut World) { .register_documented( "new", |horizontal_diagonal: f32, vertical_diagonal: f32| { - let output: Val<::bevy_mesh::primitives::RhombusMeshBuilder> = { + let output: Val<::bevy_mesh::RhombusMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::RhombusMeshBuilder> = ::bevy_mesh::primitives::RhombusMeshBuilder::new( + let output: Val<::bevy_mesh::RhombusMeshBuilder> = ::bevy_mesh::RhombusMeshBuilder::new( horizontal_diagonal, vertical_diagonal, ) @@ -1186,22 +1487,20 @@ pub(crate) fn register_rhombus_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::RhombusMeshBuilder, + ::bevy_mesh::RhombusMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_triangle_2_d_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::Triangle2dMeshBuilder, + ::bevy_mesh::Triangle2dMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::Triangle2dMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::Triangle2dMeshBuilder> = { + |_self: Ref<::bevy_mesh::Triangle2dMeshBuilder>| { + let output: Val<::bevy_mesh::Triangle2dMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::Triangle2dMeshBuilder, - > = <::bevy_mesh::primitives::Triangle2dMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::Triangle2dMeshBuilder> = <::bevy_mesh::Triangle2dMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1215,16 +1514,10 @@ pub(crate) fn register_triangle_2_d_mesh_builder_functions(world: &mut World) { ) .register_documented( "new", - | - a: Val<::bevy_math::Vec2>, - b: Val<::bevy_math::Vec2>, - c: Val<::bevy_math::Vec2>| - { - let output: Val<::bevy_mesh::primitives::Triangle2dMeshBuilder> = { + |a: Val<::glam::Vec2>, b: Val<::glam::Vec2>, c: Val<::glam::Vec2>| { + let output: Val<::bevy_mesh::Triangle2dMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::Triangle2dMeshBuilder, - > = ::bevy_mesh::primitives::Triangle2dMeshBuilder::new( + let output: Val<::bevy_mesh::Triangle2dMeshBuilder> = ::bevy_mesh::Triangle2dMeshBuilder::new( a.into_inner(), b.into_inner(), c.into_inner(), @@ -1242,20 +1535,20 @@ pub(crate) fn register_triangle_2_d_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::Triangle2dMeshBuilder, + ::bevy_mesh::Triangle2dMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_rectangle_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::RectangleMeshBuilder, + ::bevy_mesh::RectangleMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::RectangleMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::RectangleMeshBuilder> = { + |_self: Ref<::bevy_mesh::RectangleMeshBuilder>| { + let output: Val<::bevy_mesh::RectangleMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::RectangleMeshBuilder> = <::bevy_mesh::primitives::RectangleMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::RectangleMeshBuilder> = <::bevy_mesh::RectangleMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1270,9 +1563,9 @@ pub(crate) fn register_rectangle_mesh_builder_functions(world: &mut World) { .register_documented( "new", |width: f32, height: f32| { - let output: Val<::bevy_mesh::primitives::RectangleMeshBuilder> = { + let output: Val<::bevy_mesh::RectangleMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::RectangleMeshBuilder> = ::bevy_mesh::primitives::RectangleMeshBuilder::new( + let output: Val<::bevy_mesh::RectangleMeshBuilder> = ::bevy_mesh::RectangleMeshBuilder::new( width, height, ) @@ -1289,20 +1582,20 @@ pub(crate) fn register_rectangle_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::RectangleMeshBuilder, + ::bevy_mesh::RectangleMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_capsule_2_d_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::Capsule2dMeshBuilder, + ::bevy_mesh::Capsule2dMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::Capsule2dMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::Capsule2dMeshBuilder> = { + |_self: Ref<::bevy_mesh::Capsule2dMeshBuilder>| { + let output: Val<::bevy_mesh::Capsule2dMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::Capsule2dMeshBuilder> = <::bevy_mesh::primitives::Capsule2dMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::Capsule2dMeshBuilder> = <::bevy_mesh::Capsule2dMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1317,9 +1610,9 @@ pub(crate) fn register_capsule_2_d_mesh_builder_functions(world: &mut World) { .register_documented( "new", |radius: f32, length: f32, resolution: u32| { - let output: Val<::bevy_mesh::primitives::Capsule2dMeshBuilder> = { + let output: Val<::bevy_mesh::Capsule2dMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::Capsule2dMeshBuilder> = ::bevy_mesh::primitives::Capsule2dMeshBuilder::new( + let output: Val<::bevy_mesh::Capsule2dMeshBuilder> = ::bevy_mesh::Capsule2dMeshBuilder::new( radius, length, resolution, @@ -1335,10 +1628,10 @@ pub(crate) fn register_capsule_2_d_mesh_builder_functions(world: &mut World) { ) .register_documented( "resolution", - |_self: Val<::bevy_mesh::primitives::Capsule2dMeshBuilder>, resolution: u32| { - let output: Val<::bevy_mesh::primitives::Capsule2dMeshBuilder> = { + |_self: Val<::bevy_mesh::Capsule2dMeshBuilder>, resolution: u32| { + let output: Val<::bevy_mesh::Capsule2dMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::Capsule2dMeshBuilder> = ::bevy_mesh::primitives::Capsule2dMeshBuilder::resolution( + let output: Val<::bevy_mesh::Capsule2dMeshBuilder> = ::bevy_mesh::Capsule2dMeshBuilder::resolution( _self.into_inner(), resolution, ) @@ -1355,50 +1648,49 @@ pub(crate) fn register_capsule_2_d_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::Capsule2dMeshBuilder, + ::bevy_mesh::Capsule2dMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_capsule_uv_profile_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::CapsuleUvProfile, + ::bevy_mesh::CapsuleUvProfile, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_mesh::primitives::CapsuleUvProfile>| { - let output: Val<::bevy_mesh::primitives::CapsuleUvProfile> = { - { - let output: Val<::bevy_mesh::primitives::CapsuleUvProfile> = - <::bevy_mesh::primitives::CapsuleUvProfile as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::CapsuleUvProfile>| { + let output: Val<::bevy_mesh::CapsuleUvProfile> = { + { + let output: Val<::bevy_mesh::CapsuleUvProfile> = <::bevy_mesh::CapsuleUvProfile 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_mesh::primitives::CapsuleUvProfile, + ::bevy_mesh::CapsuleUvProfile, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_capsule_3_d_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::Capsule3dMeshBuilder, + ::bevy_mesh::Capsule3dMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::Capsule3dMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = { + |_self: Ref<::bevy_mesh::Capsule3dMeshBuilder>| { + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = <::bevy_mesh::primitives::Capsule3dMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = <::bevy_mesh::Capsule3dMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1412,10 +1704,10 @@ pub(crate) fn register_capsule_3_d_mesh_builder_functions(world: &mut World) { ) .register_documented( "latitudes", - |_self: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder>, latitudes: u32| { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = { + |_self: Val<::bevy_mesh::Capsule3dMeshBuilder>, latitudes: u32| { + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = ::bevy_mesh::primitives::Capsule3dMeshBuilder::latitudes( + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = ::bevy_mesh::Capsule3dMeshBuilder::latitudes( _self.into_inner(), latitudes, ) @@ -1430,10 +1722,10 @@ pub(crate) fn register_capsule_3_d_mesh_builder_functions(world: &mut World) { ) .register_documented( "longitudes", - |_self: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder>, longitudes: u32| { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = { + |_self: Val<::bevy_mesh::Capsule3dMeshBuilder>, longitudes: u32| { + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = ::bevy_mesh::primitives::Capsule3dMeshBuilder::longitudes( + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = ::bevy_mesh::Capsule3dMeshBuilder::longitudes( _self.into_inner(), longitudes, ) @@ -1449,9 +1741,9 @@ pub(crate) fn register_capsule_3_d_mesh_builder_functions(world: &mut World) { .register_documented( "new", |radius: f32, height: f32, longitudes: u32, latitudes: u32| { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = { + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = ::bevy_mesh::primitives::Capsule3dMeshBuilder::new( + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = ::bevy_mesh::Capsule3dMeshBuilder::new( radius, height, longitudes, @@ -1468,10 +1760,10 @@ pub(crate) fn register_capsule_3_d_mesh_builder_functions(world: &mut World) { ) .register_documented( "rings", - |_self: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder>, rings: u32| { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = { + |_self: Val<::bevy_mesh::Capsule3dMeshBuilder>, rings: u32| { + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = ::bevy_mesh::primitives::Capsule3dMeshBuilder::rings( + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = ::bevy_mesh::Capsule3dMeshBuilder::rings( _self.into_inner(), rings, ) @@ -1487,12 +1779,12 @@ pub(crate) fn register_capsule_3_d_mesh_builder_functions(world: &mut World) { .register_documented( "uv_profile", | - _self: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder>, - uv_profile: Val<::bevy_mesh::primitives::CapsuleUvProfile>| + _self: Val<::bevy_mesh::Capsule3dMeshBuilder>, + uv_profile: Val<::bevy_mesh::CapsuleUvProfile>| { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = { + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::Capsule3dMeshBuilder> = ::bevy_mesh::primitives::Capsule3dMeshBuilder::uv_profile( + let output: Val<::bevy_mesh::Capsule3dMeshBuilder> = ::bevy_mesh::Capsule3dMeshBuilder::uv_profile( _self.into_inner(), uv_profile.into_inner(), ) @@ -1509,51 +1801,52 @@ pub(crate) fn register_capsule_3_d_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::Capsule3dMeshBuilder, + ::bevy_mesh::Capsule3dMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_cone_anchor_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::ConeAnchor, + ::bevy_mesh::ConeAnchor, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_mesh::primitives::ConeAnchor>| { - let output: Val<::bevy_mesh::primitives::ConeAnchor> = { - { - let output: Val<::bevy_mesh::primitives::ConeAnchor> = - <::bevy_mesh::primitives::ConeAnchor as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::ConeAnchor>| { + let output: Val<::bevy_mesh::ConeAnchor> = { + { + let output: Val<::bevy_mesh::ConeAnchor> = <::bevy_mesh::ConeAnchor 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_mesh::primitives::ConeAnchor, + ::bevy_mesh::ConeAnchor, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_cone_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::ConeMeshBuilder, + ::bevy_mesh::ConeMeshBuilder, >::new(world) .register_documented( "anchor", | - _self: Val<::bevy_mesh::primitives::ConeMeshBuilder>, - anchor: Val<::bevy_mesh::primitives::ConeAnchor>| + _self: Val<::bevy_mesh::ConeMeshBuilder>, + anchor: Val<::bevy_mesh::ConeAnchor>| { - let output: Val<::bevy_mesh::primitives::ConeMeshBuilder> = { + let output: Val<::bevy_mesh::ConeMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::ConeMeshBuilder> = ::bevy_mesh::primitives::ConeMeshBuilder::anchor( + let output: Val<::bevy_mesh::ConeMeshBuilder> = ::bevy_mesh::ConeMeshBuilder::anchor( _self.into_inner(), anchor.into_inner(), ) @@ -1568,10 +1861,10 @@ pub(crate) fn register_cone_mesh_builder_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::ConeMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::ConeMeshBuilder> = { + |_self: Ref<::bevy_mesh::ConeMeshBuilder>| { + let output: Val<::bevy_mesh::ConeMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::ConeMeshBuilder> = <::bevy_mesh::primitives::ConeMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::ConeMeshBuilder> = <::bevy_mesh::ConeMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1586,9 +1879,9 @@ pub(crate) fn register_cone_mesh_builder_functions(world: &mut World) { .register_documented( "new", |radius: f32, height: f32, resolution: u32| { - let output: Val<::bevy_mesh::primitives::ConeMeshBuilder> = { + let output: Val<::bevy_mesh::ConeMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::ConeMeshBuilder> = ::bevy_mesh::primitives::ConeMeshBuilder::new( + let output: Val<::bevy_mesh::ConeMeshBuilder> = ::bevy_mesh::ConeMeshBuilder::new( radius, height, resolution, @@ -1604,10 +1897,10 @@ pub(crate) fn register_cone_mesh_builder_functions(world: &mut World) { ) .register_documented( "resolution", - |_self: Val<::bevy_mesh::primitives::ConeMeshBuilder>, resolution: u32| { - let output: Val<::bevy_mesh::primitives::ConeMeshBuilder> = { + |_self: Val<::bevy_mesh::ConeMeshBuilder>, resolution: u32| { + let output: Val<::bevy_mesh::ConeMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::ConeMeshBuilder> = ::bevy_mesh::primitives::ConeMeshBuilder::resolution( + let output: Val<::bevy_mesh::ConeMeshBuilder> = ::bevy_mesh::ConeMeshBuilder::resolution( _self.into_inner(), resolution, ) @@ -1624,22 +1917,20 @@ pub(crate) fn register_cone_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::ConeMeshBuilder, + ::bevy_mesh::ConeMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_conical_frustum_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::ConicalFrustumMeshBuilder, + ::bevy_mesh::ConicalFrustumMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::ConicalFrustumMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::ConicalFrustumMeshBuilder> = { + |_self: Ref<::bevy_mesh::ConicalFrustumMeshBuilder>| { + let output: Val<::bevy_mesh::ConicalFrustumMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::ConicalFrustumMeshBuilder, - > = <::bevy_mesh::primitives::ConicalFrustumMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::ConicalFrustumMeshBuilder> = <::bevy_mesh::ConicalFrustumMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1654,11 +1945,9 @@ pub(crate) fn register_conical_frustum_mesh_builder_functions(world: &mut World) .register_documented( "new", |radius_top: f32, radius_bottom: f32, height: f32, resolution: u32| { - let output: Val<::bevy_mesh::primitives::ConicalFrustumMeshBuilder> = { + let output: Val<::bevy_mesh::ConicalFrustumMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::ConicalFrustumMeshBuilder, - > = ::bevy_mesh::primitives::ConicalFrustumMeshBuilder::new( + let output: Val<::bevy_mesh::ConicalFrustumMeshBuilder> = ::bevy_mesh::ConicalFrustumMeshBuilder::new( radius_top, radius_bottom, height, @@ -1675,15 +1964,10 @@ pub(crate) fn register_conical_frustum_mesh_builder_functions(world: &mut World) ) .register_documented( "resolution", - | - _self: Val<::bevy_mesh::primitives::ConicalFrustumMeshBuilder>, - resolution: u32| - { - let output: Val<::bevy_mesh::primitives::ConicalFrustumMeshBuilder> = { + |_self: Val<::bevy_mesh::ConicalFrustumMeshBuilder>, resolution: u32| { + let output: Val<::bevy_mesh::ConicalFrustumMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::ConicalFrustumMeshBuilder, - > = ::bevy_mesh::primitives::ConicalFrustumMeshBuilder::resolution( + let output: Val<::bevy_mesh::ConicalFrustumMeshBuilder> = ::bevy_mesh::ConicalFrustumMeshBuilder::resolution( _self.into_inner(), resolution, ) @@ -1698,15 +1982,10 @@ pub(crate) fn register_conical_frustum_mesh_builder_functions(world: &mut World) ) .register_documented( "segments", - | - _self: Val<::bevy_mesh::primitives::ConicalFrustumMeshBuilder>, - segments: u32| - { - let output: Val<::bevy_mesh::primitives::ConicalFrustumMeshBuilder> = { + |_self: Val<::bevy_mesh::ConicalFrustumMeshBuilder>, segments: u32| { + let output: Val<::bevy_mesh::ConicalFrustumMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::ConicalFrustumMeshBuilder, - > = ::bevy_mesh::primitives::ConicalFrustumMeshBuilder::segments( + let output: Val<::bevy_mesh::ConicalFrustumMeshBuilder> = ::bevy_mesh::ConicalFrustumMeshBuilder::segments( _self.into_inner(), segments, ) @@ -1723,83 +2002,81 @@ pub(crate) fn register_conical_frustum_mesh_builder_functions(world: &mut World) let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::ConicalFrustumMeshBuilder, + ::bevy_mesh::ConicalFrustumMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_cuboid_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::CuboidMeshBuilder, + ::bevy_mesh::CuboidMeshBuilder, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_mesh::primitives::CuboidMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::CuboidMeshBuilder> = { - { - let output: Val<::bevy_mesh::primitives::CuboidMeshBuilder> = - <::bevy_mesh::primitives::CuboidMeshBuilder as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::CuboidMeshBuilder>| { + let output: Val<::bevy_mesh::CuboidMeshBuilder> = { + { + let output: Val<::bevy_mesh::CuboidMeshBuilder> = <::bevy_mesh::CuboidMeshBuilder 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_mesh::primitives::CuboidMeshBuilder, + ::bevy_mesh::CuboidMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_cylinder_anchor_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::CylinderAnchor, + ::bevy_mesh::CylinderAnchor, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_mesh::primitives::CylinderAnchor>| { - let output: Val<::bevy_mesh::primitives::CylinderAnchor> = { - { - let output: Val<::bevy_mesh::primitives::CylinderAnchor> = - <::bevy_mesh::primitives::CylinderAnchor as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::CylinderAnchor>| { + let output: Val<::bevy_mesh::CylinderAnchor> = { + { + let output: Val<::bevy_mesh::CylinderAnchor> = <::bevy_mesh::CylinderAnchor 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_mesh::primitives::CylinderAnchor, + ::bevy_mesh::CylinderAnchor, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_cylinder_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::CylinderMeshBuilder, + ::bevy_mesh::CylinderMeshBuilder, >::new(world) .register_documented( "anchor", | - _self: Val<::bevy_mesh::primitives::CylinderMeshBuilder>, - anchor: Val<::bevy_mesh::primitives::CylinderAnchor>| + _self: Val<::bevy_mesh::CylinderMeshBuilder>, + anchor: Val<::bevy_mesh::CylinderAnchor>| { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = { + let output: Val<::bevy_mesh::CylinderMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = ::bevy_mesh::primitives::CylinderMeshBuilder::anchor( + let output: Val<::bevy_mesh::CylinderMeshBuilder> = ::bevy_mesh::CylinderMeshBuilder::anchor( _self.into_inner(), anchor.into_inner(), ) @@ -1814,10 +2091,10 @@ pub(crate) fn register_cylinder_mesh_builder_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::CylinderMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = { + |_self: Ref<::bevy_mesh::CylinderMeshBuilder>| { + let output: Val<::bevy_mesh::CylinderMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = <::bevy_mesh::primitives::CylinderMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::CylinderMeshBuilder> = <::bevy_mesh::CylinderMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1832,9 +2109,9 @@ pub(crate) fn register_cylinder_mesh_builder_functions(world: &mut World) { .register_documented( "new", |radius: f32, height: f32, resolution: u32| { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = { + let output: Val<::bevy_mesh::CylinderMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = ::bevy_mesh::primitives::CylinderMeshBuilder::new( + let output: Val<::bevy_mesh::CylinderMeshBuilder> = ::bevy_mesh::CylinderMeshBuilder::new( radius, height, resolution, @@ -1850,10 +2127,10 @@ pub(crate) fn register_cylinder_mesh_builder_functions(world: &mut World) { ) .register_documented( "resolution", - |_self: Val<::bevy_mesh::primitives::CylinderMeshBuilder>, resolution: u32| { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = { + |_self: Val<::bevy_mesh::CylinderMeshBuilder>, resolution: u32| { + let output: Val<::bevy_mesh::CylinderMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = ::bevy_mesh::primitives::CylinderMeshBuilder::resolution( + let output: Val<::bevy_mesh::CylinderMeshBuilder> = ::bevy_mesh::CylinderMeshBuilder::resolution( _self.into_inner(), resolution, ) @@ -1868,10 +2145,10 @@ pub(crate) fn register_cylinder_mesh_builder_functions(world: &mut World) { ) .register_documented( "segments", - |_self: Val<::bevy_mesh::primitives::CylinderMeshBuilder>, segments: u32| { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = { + |_self: Val<::bevy_mesh::CylinderMeshBuilder>, segments: u32| { + let output: Val<::bevy_mesh::CylinderMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = ::bevy_mesh::primitives::CylinderMeshBuilder::segments( + let output: Val<::bevy_mesh::CylinderMeshBuilder> = ::bevy_mesh::CylinderMeshBuilder::segments( _self.into_inner(), segments, ) @@ -1886,10 +2163,10 @@ pub(crate) fn register_cylinder_mesh_builder_functions(world: &mut World) { ) .register_documented( "without_caps", - |_self: Val<::bevy_mesh::primitives::CylinderMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = { + |_self: Val<::bevy_mesh::CylinderMeshBuilder>| { + let output: Val<::bevy_mesh::CylinderMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::CylinderMeshBuilder> = ::bevy_mesh::primitives::CylinderMeshBuilder::without_caps( + let output: Val<::bevy_mesh::CylinderMeshBuilder> = ::bevy_mesh::CylinderMeshBuilder::without_caps( _self.into_inner(), ) .into(); @@ -1905,20 +2182,20 @@ pub(crate) fn register_cylinder_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::CylinderMeshBuilder, + ::bevy_mesh::CylinderMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_plane_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::PlaneMeshBuilder, + ::bevy_mesh::PlaneMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::PlaneMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = { + |_self: Ref<::bevy_mesh::PlaneMeshBuilder>| { + let output: Val<::bevy_mesh::PlaneMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = <::bevy_mesh::primitives::PlaneMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::PlaneMeshBuilder> = <::bevy_mesh::PlaneMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1933,9 +2210,9 @@ pub(crate) fn register_plane_mesh_builder_functions(world: &mut World) { .register_documented( "from_length", |length: f32| { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = { + let output: Val<::bevy_mesh::PlaneMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = ::bevy_mesh::primitives::PlaneMeshBuilder::from_length( + let output: Val<::bevy_mesh::PlaneMeshBuilder> = ::bevy_mesh::PlaneMeshBuilder::from_length( length, ) .into(); @@ -1949,10 +2226,10 @@ pub(crate) fn register_plane_mesh_builder_functions(world: &mut World) { ) .register_documented( "from_size", - |size: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = { + |size: Val<::glam::Vec2>| { + let output: Val<::bevy_mesh::PlaneMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = ::bevy_mesh::primitives::PlaneMeshBuilder::from_size( + let output: Val<::bevy_mesh::PlaneMeshBuilder> = ::bevy_mesh::PlaneMeshBuilder::from_size( size.into_inner(), ) .into(); @@ -1966,10 +2243,10 @@ pub(crate) fn register_plane_mesh_builder_functions(world: &mut World) { ) .register_documented( "new", - |normal: Val<::bevy_math::Dir3>, size: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = { + |normal: Val<::bevy_math::Dir3>, size: Val<::glam::Vec2>| { + let output: Val<::bevy_mesh::PlaneMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = ::bevy_mesh::primitives::PlaneMeshBuilder::new( + let output: Val<::bevy_mesh::PlaneMeshBuilder> = ::bevy_mesh::PlaneMeshBuilder::new( normal.into_inner(), size.into_inner(), ) @@ -1984,13 +2261,10 @@ pub(crate) fn register_plane_mesh_builder_functions(world: &mut World) { ) .register_documented( "normal", - | - _self: Val<::bevy_mesh::primitives::PlaneMeshBuilder>, - normal: Val<::bevy_math::Dir3>| - { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = { + |_self: Val<::bevy_mesh::PlaneMeshBuilder>, normal: Val<::bevy_math::Dir3>| { + let output: Val<::bevy_mesh::PlaneMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = ::bevy_mesh::primitives::PlaneMeshBuilder::normal( + let output: Val<::bevy_mesh::PlaneMeshBuilder> = ::bevy_mesh::PlaneMeshBuilder::normal( _self.into_inner(), normal.into_inner(), ) @@ -2005,14 +2279,10 @@ pub(crate) fn register_plane_mesh_builder_functions(world: &mut World) { ) .register_documented( "size", - | - _self: Val<::bevy_mesh::primitives::PlaneMeshBuilder>, - width: f32, - height: f32| - { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = { + |_self: Val<::bevy_mesh::PlaneMeshBuilder>, width: f32, height: f32| { + let output: Val<::bevy_mesh::PlaneMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = ::bevy_mesh::primitives::PlaneMeshBuilder::size( + let output: Val<::bevy_mesh::PlaneMeshBuilder> = ::bevy_mesh::PlaneMeshBuilder::size( _self.into_inner(), width, height, @@ -2028,10 +2298,10 @@ pub(crate) fn register_plane_mesh_builder_functions(world: &mut World) { ) .register_documented( "subdivisions", - |_self: Val<::bevy_mesh::primitives::PlaneMeshBuilder>, subdivisions: u32| { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = { + |_self: Val<::bevy_mesh::PlaneMeshBuilder>, subdivisions: u32| { + let output: Val<::bevy_mesh::PlaneMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::PlaneMeshBuilder> = ::bevy_mesh::primitives::PlaneMeshBuilder::subdivisions( + let output: Val<::bevy_mesh::PlaneMeshBuilder> = ::bevy_mesh::PlaneMeshBuilder::subdivisions( _self.into_inner(), subdivisions, ) @@ -2048,48 +2318,49 @@ pub(crate) fn register_plane_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::PlaneMeshBuilder, + ::bevy_mesh::PlaneMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_sphere_kind_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::SphereKind, + ::bevy_mesh::SphereKind, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_mesh::primitives::SphereKind>| { - let output: Val<::bevy_mesh::primitives::SphereKind> = { - { - let output: Val<::bevy_mesh::primitives::SphereKind> = - <::bevy_mesh::primitives::SphereKind as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::SphereKind>| { + let output: Val<::bevy_mesh::SphereKind> = { + { + let output: Val<::bevy_mesh::SphereKind> = <::bevy_mesh::SphereKind 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_mesh::primitives::SphereKind, + ::bevy_mesh::SphereKind, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_sphere_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::SphereMeshBuilder, + ::bevy_mesh::SphereMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::SphereMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::SphereMeshBuilder> = { + |_self: Ref<::bevy_mesh::SphereMeshBuilder>| { + let output: Val<::bevy_mesh::SphereMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::SphereMeshBuilder> = <::bevy_mesh::primitives::SphereMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::SphereMeshBuilder> = <::bevy_mesh::SphereMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2104,12 +2375,12 @@ pub(crate) fn register_sphere_mesh_builder_functions(world: &mut World) { .register_documented( "kind", | - _self: Val<::bevy_mesh::primitives::SphereMeshBuilder>, - kind: Val<::bevy_mesh::primitives::SphereKind>| + _self: Val<::bevy_mesh::SphereMeshBuilder>, + kind: Val<::bevy_mesh::SphereKind>| { - let output: Val<::bevy_mesh::primitives::SphereMeshBuilder> = { + let output: Val<::bevy_mesh::SphereMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::SphereMeshBuilder> = ::bevy_mesh::primitives::SphereMeshBuilder::kind( + let output: Val<::bevy_mesh::SphereMeshBuilder> = ::bevy_mesh::SphereMeshBuilder::kind( _self.into_inner(), kind.into_inner(), ) @@ -2124,10 +2395,10 @@ pub(crate) fn register_sphere_mesh_builder_functions(world: &mut World) { ) .register_documented( "new", - |radius: f32, kind: Val<::bevy_mesh::primitives::SphereKind>| { - let output: Val<::bevy_mesh::primitives::SphereMeshBuilder> = { + |radius: f32, kind: Val<::bevy_mesh::SphereKind>| { + let output: Val<::bevy_mesh::SphereMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::SphereMeshBuilder> = ::bevy_mesh::primitives::SphereMeshBuilder::new( + let output: Val<::bevy_mesh::SphereMeshBuilder> = ::bevy_mesh::SphereMeshBuilder::new( radius, kind.into_inner(), ) @@ -2142,14 +2413,10 @@ pub(crate) fn register_sphere_mesh_builder_functions(world: &mut World) { ) .register_documented( "uv", - | - _self: Ref<::bevy_mesh::primitives::SphereMeshBuilder>, - sectors: u32, - stacks: u32| - { + |_self: Ref<::bevy_mesh::SphereMeshBuilder>, sectors: u32, stacks: u32| { let output: Val<::bevy_mesh::Mesh> = { { - let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::primitives::SphereMeshBuilder::uv( + let output: Val<::bevy_mesh::Mesh> = ::bevy_mesh::SphereMeshBuilder::uv( &_self, sectors, stacks, @@ -2167,22 +2434,20 @@ pub(crate) fn register_sphere_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::SphereMeshBuilder, + ::bevy_mesh::SphereMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_tetrahedron_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::TetrahedronMeshBuilder, + ::bevy_mesh::TetrahedronMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::TetrahedronMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::TetrahedronMeshBuilder> = { + |_self: Ref<::bevy_mesh::TetrahedronMeshBuilder>| { + let output: Val<::bevy_mesh::TetrahedronMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::TetrahedronMeshBuilder, - > = <::bevy_mesh::primitives::TetrahedronMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::TetrahedronMeshBuilder> = <::bevy_mesh::TetrahedronMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2198,20 +2463,20 @@ pub(crate) fn register_tetrahedron_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::TetrahedronMeshBuilder, + ::bevy_mesh::TetrahedronMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_torus_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::TorusMeshBuilder, + ::bevy_mesh::TorusMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::TorusMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::TorusMeshBuilder> = { + |_self: Ref<::bevy_mesh::TorusMeshBuilder>| { + let output: Val<::bevy_mesh::TorusMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::TorusMeshBuilder> = <::bevy_mesh::primitives::TorusMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::TorusMeshBuilder> = <::bevy_mesh::TorusMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2225,10 +2490,10 @@ pub(crate) fn register_torus_mesh_builder_functions(world: &mut World) { ) .register_documented( "major_resolution", - |_self: Val<::bevy_mesh::primitives::TorusMeshBuilder>, resolution: usize| { - let output: Val<::bevy_mesh::primitives::TorusMeshBuilder> = { + |_self: Val<::bevy_mesh::TorusMeshBuilder>, resolution: usize| { + let output: Val<::bevy_mesh::TorusMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::TorusMeshBuilder> = ::bevy_mesh::primitives::TorusMeshBuilder::major_resolution( + let output: Val<::bevy_mesh::TorusMeshBuilder> = ::bevy_mesh::TorusMeshBuilder::major_resolution( _self.into_inner(), resolution, ) @@ -2243,10 +2508,10 @@ pub(crate) fn register_torus_mesh_builder_functions(world: &mut World) { ) .register_documented( "minor_resolution", - |_self: Val<::bevy_mesh::primitives::TorusMeshBuilder>, resolution: usize| { - let output: Val<::bevy_mesh::primitives::TorusMeshBuilder> = { + |_self: Val<::bevy_mesh::TorusMeshBuilder>, resolution: usize| { + let output: Val<::bevy_mesh::TorusMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::TorusMeshBuilder> = ::bevy_mesh::primitives::TorusMeshBuilder::minor_resolution( + let output: Val<::bevy_mesh::TorusMeshBuilder> = ::bevy_mesh::TorusMeshBuilder::minor_resolution( _self.into_inner(), resolution, ) @@ -2262,9 +2527,9 @@ pub(crate) fn register_torus_mesh_builder_functions(world: &mut World) { .register_documented( "new", |inner_radius: f32, outer_radius: f32| { - let output: Val<::bevy_mesh::primitives::TorusMeshBuilder> = { + let output: Val<::bevy_mesh::TorusMeshBuilder> = { { - let output: Val<::bevy_mesh::primitives::TorusMeshBuilder> = ::bevy_mesh::primitives::TorusMeshBuilder::new( + let output: Val<::bevy_mesh::TorusMeshBuilder> = ::bevy_mesh::TorusMeshBuilder::new( inner_radius, outer_radius, ) @@ -2281,22 +2546,20 @@ pub(crate) fn register_torus_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::TorusMeshBuilder, + ::bevy_mesh::TorusMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_triangle_3_d_mesh_builder_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_mesh::primitives::Triangle3dMeshBuilder, + ::bevy_mesh::Triangle3dMeshBuilder, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_mesh::primitives::Triangle3dMeshBuilder>| { - let output: Val<::bevy_mesh::primitives::Triangle3dMeshBuilder> = { + |_self: Ref<::bevy_mesh::Triangle3dMeshBuilder>| { + let output: Val<::bevy_mesh::Triangle3dMeshBuilder> = { { - let output: Val< - ::bevy_mesh::primitives::Triangle3dMeshBuilder, - > = <::bevy_mesh::primitives::Triangle3dMeshBuilder as ::std::clone::Clone>::clone( + let output: Val<::bevy_mesh::Triangle3dMeshBuilder> = <::bevy_mesh::Triangle3dMeshBuilder as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2312,7 +2575,7 @@ pub(crate) fn register_triangle_3_d_mesh_builder_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_mesh::primitives::Triangle3dMeshBuilder, + ::bevy_mesh::Triangle3dMeshBuilder, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -2320,22 +2583,23 @@ pub(crate) fn register_skinned_mesh_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_mesh::skinning::SkinnedMesh, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_mesh::skinning::SkinnedMesh>| { - let output: Val<::bevy_mesh::skinning::SkinnedMesh> = { - { - let output: Val<::bevy_mesh::skinning::SkinnedMesh> = - <::bevy_mesh::skinning::SkinnedMesh as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_mesh::skinning::SkinnedMesh>| { + let output: Val<::bevy_mesh::skinning::SkinnedMesh> = { + { + let output: Val<::bevy_mesh::skinning::SkinnedMesh> = <::bevy_mesh::skinning::SkinnedMesh as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -2347,16 +2611,21 @@ pub(crate) fn register_skinned_mesh_functions(world: &mut World) { impl Plugin for BevyMeshScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); - register_indices_functions(&mut world); - register_mesh_functions(&mut world); register_morph_weights_functions(&mut world); + register_mesh_functions(&mut world); + register_mesh_2_d_functions(&mut world); + register_mesh_3_d_functions(&mut world); + register_mesh_tag_functions(&mut world); + register_indices_functions(&mut world); register_mesh_morph_weights_functions(&mut world); register_circle_mesh_builder_functions(&mut world); register_circular_mesh_uv_mode_functions(&mut world); register_circular_sector_mesh_builder_functions(&mut world); register_circular_segment_mesh_builder_functions(&mut world); + register_convex_polygon_mesh_builder_functions(&mut world); register_regular_polygon_mesh_builder_functions(&mut world); register_ellipse_mesh_builder_functions(&mut world); + register_polyline_2_d_mesh_builder_functions(&mut world); register_annulus_mesh_builder_functions(&mut world); register_rhombus_mesh_builder_functions(&mut world); register_triangle_2_d_mesh_builder_functions(&mut world); diff --git a/crates/bindings/bevy_pbr_bms_bindings/Cargo.toml b/crates/bindings/bevy_pbr_bms_bindings/Cargo.toml index 0f7eea19bd..1e9450c057 100644 --- a/crates/bindings/bevy_pbr_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_pbr_bms_bindings/Cargo.toml @@ -17,51 +17,53 @@ 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.16.1", features = ["webgl"], default-features = true } +bevy_pbr = { version = "0.17.2", features = ["webgl"], default-features = true} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.16.2", features = [], default-features = true } +bevy_camera = { version = "^0.17.2", features = [], default-features = true} -bevy_core_pipeline = { version = "^0.16.1", features = [ -], default-features = true } +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_derive = { version = "^0.16.1", features = [], default-features = true } +bevy_core_pipeline = { version = "^0.17.2", features = ["tonemapping_luts", "webgl"], default-features = true} -bevy_diagnostic = { version = "^0.16.1", features = [ -], default-features = true } +bevy_derive = { version = "^0.17.2", features = [], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } +bevy_diagnostic = { version = "^0.17.2", features = ["std", "sysinfo", "sysinfo_plugin"], default-features = true} -bevy_image = { version = "^0.16.1", features = [], default-features = true } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_math = { version = "^0.16.1", features = [], default-features = true } +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_light = { version = "^0.17.2", features = ["webgl"], default-features = true} -bevy_render = { version = "^0.16.1", features = [], default-features = true } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_window = { version = "^0.16.1", features = [], default-features = true } +bevy_render = { version = "^0.17.2", features = ["multi_threaded", "webgl"], default-features = true} -bitflags = { version = "^2.3", features = [], default-features = true } +bevy_shader = { version = "^0.17.2", features = [], default-features = true} -bytemuck = { version = "^1", features = [], default-features = true } +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -fixedbitset = { version = "^0.5", features = [], default-features = true } +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} -nonmax = { version = "^0.5", features = [], default-features = true } +bitflags = { version = "^2.3", features = [], default-features = true} -offset-allocator = { version = "^0.2", features = [], default-features = true } +bytemuck = { version = "^1", features = [], default-features = true} -radsort = { version = "^0.1", features = [], default-features = true } +fixedbitset = { version = "^0.5", features = [], default-features = true} + +nonmax = { version = "^0.5", features = [], default-features = true} + +offset-allocator = { version = "^0.2", features = [], default-features = true} + +static_assertions = { version = "^1", features = [], default-features = true} -smallvec = { version = "^1.6", features = [], default-features = true } -static_assertions = { version = "^1", 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 efcc781654..fd19d4469a 100644 --- a/crates/bindings/bevy_pbr_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_pbr_bms_bindings/src/lib.rs @@ -1,83 +1,30 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyPbrScriptingPlugin; -pub(crate) fn register_fog_volume_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::FogVolume, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::FogVolume>| { - let output: Val<::bevy_pbr::FogVolume> = { - { - let output: Val<::bevy_pbr::FogVolume> = <::bevy_pbr::FogVolume 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_pbr::FogVolume, bevy_mod_scripting_bindings::MarkAsGenerated>( - ); -} -pub(crate) fn register_volumetric_fog_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::VolumetricFog, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::VolumetricFog>| { - let output: Val<::bevy_pbr::VolumetricFog> = { - { - let output: Val<::bevy_pbr::VolumetricFog> = <::bevy_pbr::VolumetricFog 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_pbr::VolumetricFog, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_volumetric_light_functions(world: &mut World) { +pub(crate) fn register_distance_fog_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::VolumetricLight, + ::bevy_pbr::DistanceFog, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_pbr::VolumetricLight>| { - let output: Val<::bevy_pbr::VolumetricLight> = { + |_self: Ref<::bevy_pbr::DistanceFog>| { + let output: Val<::bevy_pbr::DistanceFog> = { { - let output: Val<::bevy_pbr::VolumetricLight> = <::bevy_pbr::VolumetricLight as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::DistanceFog> = <::bevy_pbr::DistanceFog as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -93,48 +40,20 @@ pub(crate) fn register_volumetric_light_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_pbr::VolumetricLight, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_distance_fog_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::prelude::DistanceFog, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::prelude::DistanceFog>| { - let output: Val<::bevy_pbr::prelude::DistanceFog> = { - { - let output: Val<::bevy_pbr::prelude::DistanceFog> = - <::bevy_pbr::prelude::DistanceFog 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_pbr::prelude::DistanceFog, + ::bevy_pbr::DistanceFog, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_fog_falloff_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::prelude::FogFalloff, + ::bevy_pbr::FogFalloff, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_pbr::prelude::FogFalloff>| { - let output: Val<::bevy_pbr::prelude::FogFalloff> = { + |_self: Ref<::bevy_pbr::FogFalloff>| { + let output: Val<::bevy_pbr::FogFalloff> = { { - let output: Val<::bevy_pbr::prelude::FogFalloff> = <::bevy_pbr::prelude::FogFalloff as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::FogFalloff> = <::bevy_pbr::FogFalloff as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -149,9 +68,9 @@ pub(crate) fn register_fog_falloff_functions(world: &mut World) { .register_documented( "from_visibility", |visibility: f32| { - let output: Val<::bevy_pbr::prelude::FogFalloff> = { + let output: Val<::bevy_pbr::FogFalloff> = { { - let output: Val<::bevy_pbr::prelude::FogFalloff> = ::bevy_pbr::prelude::FogFalloff::from_visibility( + let output: Val<::bevy_pbr::FogFalloff> = ::bevy_pbr::FogFalloff::from_visibility( visibility, ) .into(); @@ -166,9 +85,9 @@ pub(crate) fn register_fog_falloff_functions(world: &mut World) { .register_documented( "from_visibility_color", |visibility: f32, extinction_inscattering_color: Val<::bevy_color::Color>| { - let output: Val<::bevy_pbr::prelude::FogFalloff> = { + let output: Val<::bevy_pbr::FogFalloff> = { { - let output: Val<::bevy_pbr::prelude::FogFalloff> = ::bevy_pbr::prelude::FogFalloff::from_visibility_color( + let output: Val<::bevy_pbr::FogFalloff> = ::bevy_pbr::FogFalloff::from_visibility_color( visibility, extinction_inscattering_color.into_inner(), ) @@ -188,9 +107,9 @@ pub(crate) fn register_fog_falloff_functions(world: &mut World) { extinction_color: Val<::bevy_color::Color>, inscattering_color: Val<::bevy_color::Color>| { - let output: Val<::bevy_pbr::prelude::FogFalloff> = { + let output: Val<::bevy_pbr::FogFalloff> = { { - let output: Val<::bevy_pbr::prelude::FogFalloff> = ::bevy_pbr::prelude::FogFalloff::from_visibility_colors( + let output: Val<::bevy_pbr::FogFalloff> = ::bevy_pbr::FogFalloff::from_visibility_colors( visibility, extinction_color.into_inner(), inscattering_color.into_inner(), @@ -207,9 +126,9 @@ pub(crate) fn register_fog_falloff_functions(world: &mut World) { .register_documented( "from_visibility_contrast", |visibility: f32, contrast_threshold: f32| { - let output: Val<::bevy_pbr::prelude::FogFalloff> = { + let output: Val<::bevy_pbr::FogFalloff> = { { - let output: Val<::bevy_pbr::prelude::FogFalloff> = ::bevy_pbr::prelude::FogFalloff::from_visibility_contrast( + let output: Val<::bevy_pbr::FogFalloff> = ::bevy_pbr::FogFalloff::from_visibility_contrast( visibility, contrast_threshold, ) @@ -229,9 +148,9 @@ pub(crate) fn register_fog_falloff_functions(world: &mut World) { contrast_threshold: f32, extinction_inscattering_color: Val<::bevy_color::Color>| { - let output: Val<::bevy_pbr::prelude::FogFalloff> = { + let output: Val<::bevy_pbr::FogFalloff> = { { - let output: Val<::bevy_pbr::prelude::FogFalloff> = ::bevy_pbr::prelude::FogFalloff::from_visibility_contrast_color( + let output: Val<::bevy_pbr::FogFalloff> = ::bevy_pbr::FogFalloff::from_visibility_contrast_color( visibility, contrast_threshold, extinction_inscattering_color.into_inner(), @@ -253,9 +172,9 @@ pub(crate) fn register_fog_falloff_functions(world: &mut World) { extinction_color: Val<::bevy_color::Color>, inscattering_color: Val<::bevy_color::Color>| { - let output: Val<::bevy_pbr::prelude::FogFalloff> = { + let output: Val<::bevy_pbr::FogFalloff> = { { - let output: Val<::bevy_pbr::prelude::FogFalloff> = ::bevy_pbr::prelude::FogFalloff::from_visibility_contrast_colors( + let output: Val<::bevy_pbr::FogFalloff> = ::bevy_pbr::FogFalloff::from_visibility_contrast_colors( visibility, contrast_threshold, extinction_color.into_inner(), @@ -278,9 +197,9 @@ pub(crate) fn register_fog_falloff_functions(world: &mut World) { .register_documented( "from_visibility_contrast_squared", |visibility: f32, contrast_threshold: f32| { - let output: Val<::bevy_pbr::prelude::FogFalloff> = { + let output: Val<::bevy_pbr::FogFalloff> = { { - let output: Val<::bevy_pbr::prelude::FogFalloff> = ::bevy_pbr::prelude::FogFalloff::from_visibility_contrast_squared( + let output: Val<::bevy_pbr::FogFalloff> = ::bevy_pbr::FogFalloff::from_visibility_contrast_squared( visibility, contrast_threshold, ) @@ -296,9 +215,9 @@ pub(crate) fn register_fog_falloff_functions(world: &mut World) { .register_documented( "from_visibility_squared", |visibility: f32| { - let output: Val<::bevy_pbr::prelude::FogFalloff> = { + let output: Val<::bevy_pbr::FogFalloff> = { { - let output: Val<::bevy_pbr::prelude::FogFalloff> = ::bevy_pbr::prelude::FogFalloff::from_visibility_squared( + let output: Val<::bevy_pbr::FogFalloff> = ::bevy_pbr::FogFalloff::from_visibility_squared( visibility, ) .into(); @@ -315,10 +234,7 @@ pub(crate) fn register_fog_falloff_functions(world: &mut World) { |v: f32, c_t: f32| { let output: f32 = { { - let output: f32 = ::bevy_pbr::prelude::FogFalloff::koschmieder( - v, - c_t, - ) + let output: f32 = ::bevy_pbr::FogFalloff::koschmieder(v, c_t) .into(); output } @@ -332,207 +248,20 @@ pub(crate) fn register_fog_falloff_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_pbr::prelude::FogFalloff, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_ambient_light_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::prelude::AmbientLight, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::prelude::AmbientLight>| { - let output: Val<::bevy_pbr::prelude::AmbientLight> = { - { - let output: Val<::bevy_pbr::prelude::AmbientLight> = - <::bevy_pbr::prelude::AmbientLight 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_pbr::prelude::AmbientLight, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_directional_light_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::prelude::DirectionalLight, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::prelude::DirectionalLight>| { - let output: Val<::bevy_pbr::prelude::DirectionalLight> = { - { - let output: Val<::bevy_pbr::prelude::DirectionalLight> = - <::bevy_pbr::prelude::DirectionalLight 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_pbr::prelude::DirectionalLight, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_point_light_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::prelude::PointLight, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::prelude::PointLight>| { - let output: Val<::bevy_pbr::prelude::PointLight> = { - { - let output: Val<::bevy_pbr::prelude::PointLight> = - <::bevy_pbr::prelude::PointLight 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_pbr::prelude::PointLight, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_spot_light_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::prelude::SpotLight, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::prelude::SpotLight>| { - let output: Val<::bevy_pbr::prelude::SpotLight> = { - { - let output: Val<::bevy_pbr::prelude::SpotLight> = - <::bevy_pbr::prelude::SpotLight 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_pbr::prelude::SpotLight, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_environment_map_light_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::prelude::EnvironmentMapLight, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::prelude::EnvironmentMapLight>| { - let output: Val<::bevy_pbr::prelude::EnvironmentMapLight> = { - { - let output: Val<::bevy_pbr::prelude::EnvironmentMapLight> = - <::bevy_pbr::prelude::EnvironmentMapLight 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_pbr::prelude::EnvironmentMapLight, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_light_probe_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::prelude::LightProbe, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::prelude::LightProbe>| { - let output: Val<::bevy_pbr::prelude::LightProbe> = { - { - let output: Val<::bevy_pbr::prelude::LightProbe> = - <::bevy_pbr::prelude::LightProbe as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "new", - || { - let output: Val<::bevy_pbr::prelude::LightProbe> = { - { - let output: Val<::bevy_pbr::prelude::LightProbe> = - ::bevy_pbr::prelude::LightProbe::new().into(); - output - } - }; - output - }, - " Creates a new light probe component.", - &[], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_pbr::prelude::LightProbe, + ::bevy_pbr::FogFalloff, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_parallax_mapping_method_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::prelude::ParallaxMappingMethod, + ::bevy_pbr::ParallaxMappingMethod, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_pbr::prelude::ParallaxMappingMethod>| { + |_self: Ref<::bevy_pbr::ParallaxMappingMethod>| { let output: () = { { - let output: () = <::bevy_pbr::prelude::ParallaxMappingMethod as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_pbr::ParallaxMappingMethod as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -546,10 +275,10 @@ pub(crate) fn register_parallax_mapping_method_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_pbr::prelude::ParallaxMappingMethod>| { - let output: Val<::bevy_pbr::prelude::ParallaxMappingMethod> = { + |_self: Ref<::bevy_pbr::ParallaxMappingMethod>| { + let output: Val<::bevy_pbr::ParallaxMappingMethod> = { { - let output: Val<::bevy_pbr::prelude::ParallaxMappingMethod> = <::bevy_pbr::prelude::ParallaxMappingMethod as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::ParallaxMappingMethod> = <::bevy_pbr::ParallaxMappingMethod as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -564,13 +293,13 @@ pub(crate) fn register_parallax_mapping_method_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_pbr::prelude::ParallaxMappingMethod>, - other: Ref<::bevy_pbr::prelude::ParallaxMappingMethod>| + _self: Ref<::bevy_pbr::ParallaxMappingMethod>, + other: Ref<::bevy_pbr::ParallaxMappingMethod>| { let output: bool = { { - let output: bool = <::bevy_pbr::prelude::ParallaxMappingMethod as ::std::cmp::PartialEq< - ::bevy_pbr::prelude::ParallaxMappingMethod, + let output: bool = <::bevy_pbr::ParallaxMappingMethod as ::std::cmp::PartialEq< + ::bevy_pbr::ParallaxMappingMethod, >>::eq(&_self, &other) .into(); output @@ -585,76 +314,78 @@ pub(crate) fn register_parallax_mapping_method_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_pbr::prelude::ParallaxMappingMethod, + ::bevy_pbr::ParallaxMappingMethod, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_standard_material_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::prelude::StandardMaterial, + ::bevy_pbr::StandardMaterial, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::prelude::StandardMaterial>| { - let output: Val<::bevy_pbr::prelude::StandardMaterial> = { - { - let output: Val<::bevy_pbr::prelude::StandardMaterial> = - <::bevy_pbr::prelude::StandardMaterial as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "flip", - |mut _self: Mut<::bevy_pbr::prelude::StandardMaterial>, - horizontal: bool, - vertical: bool| { - let output: () = { - { - let output: () = ::bevy_pbr::prelude::StandardMaterial::flip( - &mut _self, horizontal, vertical, - ) - .into(); - output - } - }; - output - }, - " Flip the texture coordinates of the material.", - &["_self", "horizontal", "vertical"], - ) - .register_documented( - "flipped", - |_self: Val<::bevy_pbr::prelude::StandardMaterial>, horizontal: bool, vertical: bool| { - let output: Val<::bevy_pbr::prelude::StandardMaterial> = { - { - let output: Val<::bevy_pbr::prelude::StandardMaterial> = - ::bevy_pbr::prelude::StandardMaterial::flipped( - _self.into_inner(), - horizontal, - vertical, - ) - .into(); - output - } - }; - output - }, - " Consumes the material and returns a material with flipped texture coordinates", - &["_self", "horizontal", "vertical"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_pbr::StandardMaterial>| { + let output: Val<::bevy_pbr::StandardMaterial> = { + { + let output: Val<::bevy_pbr::StandardMaterial> = <::bevy_pbr::StandardMaterial as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "flip", + | + mut _self: Mut<::bevy_pbr::StandardMaterial>, + horizontal: bool, + vertical: bool| + { + let output: () = { + { + let output: () = ::bevy_pbr::StandardMaterial::flip( + &mut _self, + horizontal, + vertical, + ) + .into(); + output + } + }; + output + }, + " Flip the texture coordinates of the material.", + &["_self", "horizontal", "vertical"], + ) + .register_documented( + "flipped", + |_self: Val<::bevy_pbr::StandardMaterial>, horizontal: bool, vertical: bool| { + let output: Val<::bevy_pbr::StandardMaterial> = { + { + let output: Val<::bevy_pbr::StandardMaterial> = ::bevy_pbr::StandardMaterial::flipped( + _self.into_inner(), + horizontal, + vertical, + ) + .into(); + output + } + }; + output + }, + " Consumes the material and returns a material with flipped texture coordinates", + &["_self", "horizontal", "vertical"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_pbr::prelude::StandardMaterial, + ::bevy_pbr::StandardMaterial, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -662,43 +393,43 @@ pub(crate) fn register_screen_space_ambient_occlusion_functions(world: &mut Worl bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::ScreenSpaceAmbientOcclusion, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::ScreenSpaceAmbientOcclusion>| { - let output: Val<::bevy_pbr::ScreenSpaceAmbientOcclusion> = { - { - let output: Val<::bevy_pbr::ScreenSpaceAmbientOcclusion> = - <::bevy_pbr::ScreenSpaceAmbientOcclusion as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_pbr::ScreenSpaceAmbientOcclusion>, - other: Ref<::bevy_pbr::ScreenSpaceAmbientOcclusion>| { - let output: bool = { - { - let output: bool = - <::bevy_pbr::ScreenSpaceAmbientOcclusion as ::std::cmp::PartialEq< + .register_documented( + "clone", + |_self: Ref<::bevy_pbr::ScreenSpaceAmbientOcclusion>| { + let output: Val<::bevy_pbr::ScreenSpaceAmbientOcclusion> = { + { + let output: Val<::bevy_pbr::ScreenSpaceAmbientOcclusion> = <::bevy_pbr::ScreenSpaceAmbientOcclusion as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_pbr::ScreenSpaceAmbientOcclusion>, + other: Ref<::bevy_pbr::ScreenSpaceAmbientOcclusion>| + { + let output: bool = { + { + let output: bool = <::bevy_pbr::ScreenSpaceAmbientOcclusion as ::std::cmp::PartialEq< ::bevy_pbr::ScreenSpaceAmbientOcclusion, >>::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 @@ -710,69 +441,13 @@ pub(crate) fn register_screen_space_ambient_occlusion_functions(world: &mut Worl pub(crate) fn register_screen_space_reflections_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::ScreenSpaceReflections, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::ScreenSpaceReflections>| { - let output: Val<::bevy_pbr::ScreenSpaceReflections> = { - { - let output: Val<::bevy_pbr::ScreenSpaceReflections> = - <::bevy_pbr::ScreenSpaceReflections 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_pbr::ScreenSpaceReflections, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_cascade_shadow_config_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::CascadeShadowConfig, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::CascadeShadowConfig>| { - let output: Val<::bevy_pbr::CascadeShadowConfig> = { - { - let output: Val<::bevy_pbr::CascadeShadowConfig> = - <::bevy_pbr::CascadeShadowConfig 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_pbr::CascadeShadowConfig, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_cascades_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::Cascades, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_pbr::Cascades>| { - let output: Val<::bevy_pbr::Cascades> = { + |_self: Ref<::bevy_pbr::ScreenSpaceReflections>| { + let output: Val<::bevy_pbr::ScreenSpaceReflections> = { { - let output: Val<::bevy_pbr::Cascades> = <::bevy_pbr::Cascades as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::ScreenSpaceReflections> = <::bevy_pbr::ScreenSpaceReflections as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -786,75 +461,22 @@ pub(crate) fn register_cascades_functions(world: &mut World) { ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); - registry - .register_type_data::<::bevy_pbr::Cascades, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} -pub(crate) fn register_cascades_visible_entities_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::CascadesVisibleEntities, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::CascadesVisibleEntities>| { - let output: Val<::bevy_pbr::CascadesVisibleEntities> = { - { - let output: Val<::bevy_pbr::CascadesVisibleEntities> = - <::bevy_pbr::CascadesVisibleEntities 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_pbr::CascadesVisibleEntities, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_visible_mesh_entities_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::VisibleMeshEntities, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::VisibleMeshEntities>| { - let output: Val<::bevy_pbr::VisibleMeshEntities> = { - { - let output: Val<::bevy_pbr::VisibleMeshEntities> = - <::bevy_pbr::VisibleMeshEntities 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_pbr::VisibleMeshEntities, + ::bevy_pbr::ScreenSpaceReflections, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_cluster_config_functions(world: &mut World) { +pub(crate) fn register_default_opaque_renderer_method_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::ClusterConfig, + ::bevy_pbr::DefaultOpaqueRendererMethod, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_pbr::ClusterConfig>| { - let output: Val<::bevy_pbr::ClusterConfig> = { + |_self: Ref<::bevy_pbr::DefaultOpaqueRendererMethod>| { + let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = { { - let output: Val<::bevy_pbr::ClusterConfig> = <::bevy_pbr::ClusterConfig as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = <::bevy_pbr::DefaultOpaqueRendererMethod as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -865,136 +487,44 @@ pub(crate) fn register_cluster_config_functions(world: &mut World) { }, "", &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_pbr::ClusterConfig, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_cubemap_visible_entities_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::CubemapVisibleEntities, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::CubemapVisibleEntities>| { - let output: Val<::bevy_pbr::CubemapVisibleEntities> = { - { - let output: Val<::bevy_pbr::CubemapVisibleEntities> = - <::bevy_pbr::CubemapVisibleEntities as ::std::clone::Clone>::clone(&_self) + ) + .register_documented( + "deferred", + || { + let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = { + { + let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = ::bevy_pbr::DefaultOpaqueRendererMethod::deferred() .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_pbr::CubemapVisibleEntities, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_directional_light_shadow_map_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::DirectionalLightShadowMap, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::DirectionalLightShadowMap>| { - let output: Val<::bevy_pbr::DirectionalLightShadowMap> = { - { - let output: Val<::bevy_pbr::DirectionalLightShadowMap> = - <::bevy_pbr::DirectionalLightShadowMap 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_pbr::DirectionalLightShadowMap, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_not_shadow_caster_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::NotShadowCaster, - >::new(world); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_pbr::NotShadowCaster, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_not_shadow_receiver_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::NotShadowReceiver, - >::new(world); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_pbr::NotShadowReceiver, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_point_light_shadow_map_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::PointLightShadowMap, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::PointLightShadowMap>| { - let output: Val<::bevy_pbr::PointLightShadowMap> = { - { - let output: Val<::bevy_pbr::PointLightShadowMap> = - <::bevy_pbr::PointLightShadowMap as ::std::clone::Clone>::clone(&_self) + output + } + }; + output + }, + "", + &[], + ) + .register_documented( + "forward", + || { + let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = { + { + let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = ::bevy_pbr::DefaultOpaqueRendererMethod::forward() .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_pbr::PointLightShadowMap, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_shadow_filtering_method_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::ShadowFilteringMethod, - >::new(world) + output + } + }; + output + }, + "", + &[], + ) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_pbr::ShadowFilteringMethod>| { + "set_to_deferred", + |mut _self: Mut<::bevy_pbr::DefaultOpaqueRendererMethod>| { let output: () = { { - let output: () = <::bevy_pbr::ShadowFilteringMethod as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, + let output: () = ::bevy_pbr::DefaultOpaqueRendererMethod::set_to_deferred( + &mut _self, ) .into(); output @@ -1006,12 +536,12 @@ pub(crate) fn register_shadow_filtering_method_functions(world: &mut World) { &["_self"], ) .register_documented( - "clone", - |_self: Ref<::bevy_pbr::ShadowFilteringMethod>| { - let output: Val<::bevy_pbr::ShadowFilteringMethod> = { + "set_to_forward", + |mut _self: Mut<::bevy_pbr::DefaultOpaqueRendererMethod>| { + let output: () = { { - let output: Val<::bevy_pbr::ShadowFilteringMethod> = <::bevy_pbr::ShadowFilteringMethod as ::std::clone::Clone>::clone( - &_self, + let output: () = ::bevy_pbr::DefaultOpaqueRendererMethod::set_to_forward( + &mut _self, ) .into(); output @@ -1021,18 +551,27 @@ pub(crate) fn register_shadow_filtering_method_functions(world: &mut World) { }, "", &["_self"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_pbr::DefaultOpaqueRendererMethod, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_wireframe_material_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_pbr::wireframe::WireframeMaterial, + >::new(world) .register_documented( - "eq", - | - _self: Ref<::bevy_pbr::ShadowFilteringMethod>, - other: Ref<::bevy_pbr::ShadowFilteringMethod>| - { - let output: bool = { + "clone", + |_self: Ref<::bevy_pbr::wireframe::WireframeMaterial>| { + let output: Val<::bevy_pbr::wireframe::WireframeMaterial> = { { - let output: bool = <::bevy_pbr::ShadowFilteringMethod as ::std::cmp::PartialEq< - ::bevy_pbr::ShadowFilteringMethod, - >>::eq(&_self, &other) + let output: Val<::bevy_pbr::wireframe::WireframeMaterial> = <::bevy_pbr::wireframe::WireframeMaterial as ::std::clone::Clone>::clone( + &_self, + ) .into(); output } @@ -1040,146 +579,55 @@ pub(crate) fn register_shadow_filtering_method_functions(world: &mut World) { output }, "", - &["_self", "other"], + &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_pbr::ShadowFilteringMethod, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_default_opaque_renderer_method_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::DefaultOpaqueRendererMethod, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::DefaultOpaqueRendererMethod>| { - let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = { - { - let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = - <::bevy_pbr::DefaultOpaqueRendererMethod as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "deferred", - || { - let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = { - { - let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = - ::bevy_pbr::DefaultOpaqueRendererMethod::deferred().into(); - output - } - }; - output - }, - "", - &[], - ) - .register_documented( - "forward", - || { - let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = { - { - let output: Val<::bevy_pbr::DefaultOpaqueRendererMethod> = - ::bevy_pbr::DefaultOpaqueRendererMethod::forward().into(); - output - } - }; - output - }, - "", - &[], - ) - .register_documented( - "set_to_deferred", - |mut _self: Mut<::bevy_pbr::DefaultOpaqueRendererMethod>| { - let output: () = { - { - let output: () = - ::bevy_pbr::DefaultOpaqueRendererMethod::set_to_deferred(&mut _self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "set_to_forward", - |mut _self: Mut<::bevy_pbr::DefaultOpaqueRendererMethod>| { - let output: () = { - { - let output: () = - ::bevy_pbr::DefaultOpaqueRendererMethod::set_to_forward(&mut _self).into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_pbr::DefaultOpaqueRendererMethod, + ::bevy_pbr::wireframe::WireframeMaterial, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_wireframe_material_functions(world: &mut World) { +pub(crate) fn register_wireframe_config_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::wireframe::WireframeMaterial, + ::bevy_pbr::wireframe::WireframeConfig, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::wireframe::WireframeMaterial>| { - let output: Val<::bevy_pbr::wireframe::WireframeMaterial> = { - { - let output: Val<::bevy_pbr::wireframe::WireframeMaterial> = - <::bevy_pbr::wireframe::WireframeMaterial as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_pbr::wireframe::WireframeConfig>| { + let output: Val<::bevy_pbr::wireframe::WireframeConfig> = { + { + let output: Val<::bevy_pbr::wireframe::WireframeConfig> = <::bevy_pbr::wireframe::WireframeConfig 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_pbr::wireframe::WireframeMaterial, + ::bevy_pbr::wireframe::WireframeConfig, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_no_wireframe_functions(world: &mut World) { +pub(crate) fn register_wireframe_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::wireframe::NoWireframe, + ::bevy_pbr::wireframe::Wireframe, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_pbr::wireframe::NoWireframe>| { + |_self: Ref<::bevy_pbr::wireframe::Wireframe>| { let output: () = { { - let output: () = <::bevy_pbr::wireframe::NoWireframe as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_pbr::wireframe::Wireframe as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1193,10 +641,10 @@ pub(crate) fn register_no_wireframe_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_pbr::wireframe::NoWireframe>| { - let output: Val<::bevy_pbr::wireframe::NoWireframe> = { + |_self: Ref<::bevy_pbr::wireframe::Wireframe>| { + let output: Val<::bevy_pbr::wireframe::Wireframe> = { { - let output: Val<::bevy_pbr::wireframe::NoWireframe> = <::bevy_pbr::wireframe::NoWireframe as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::wireframe::Wireframe> = <::bevy_pbr::wireframe::Wireframe as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1211,13 +659,13 @@ pub(crate) fn register_no_wireframe_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_pbr::wireframe::NoWireframe>, - other: Ref<::bevy_pbr::wireframe::NoWireframe>| + _self: Ref<::bevy_pbr::wireframe::Wireframe>, + other: Ref<::bevy_pbr::wireframe::Wireframe>| { let output: bool = { { - let output: bool = <::bevy_pbr::wireframe::NoWireframe as ::std::cmp::PartialEq< - ::bevy_pbr::wireframe::NoWireframe, + let output: bool = <::bevy_pbr::wireframe::Wireframe as ::std::cmp::PartialEq< + ::bevy_pbr::wireframe::Wireframe, >>::eq(&_self, &other) .into(); output @@ -1232,37 +680,7 @@ pub(crate) fn register_no_wireframe_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_pbr::wireframe::NoWireframe, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_wireframe_config_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::wireframe::WireframeConfig, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::wireframe::WireframeConfig>| { - let output: Val<::bevy_pbr::wireframe::WireframeConfig> = { - { - let output: Val<::bevy_pbr::wireframe::WireframeConfig> = - <::bevy_pbr::wireframe::WireframeConfig 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_pbr::wireframe::WireframeConfig, + ::bevy_pbr::wireframe::Wireframe, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -1270,24 +688,23 @@ pub(crate) fn register_wireframe_color_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::wireframe::WireframeColor, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::wireframe::WireframeColor>| { - let output: Val<::bevy_pbr::wireframe::WireframeColor> = { - { - let output: Val<::bevy_pbr::wireframe::WireframeColor> = - <::bevy_pbr::wireframe::WireframeColor as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_pbr::wireframe::WireframeColor>| { + let output: Val<::bevy_pbr::wireframe::WireframeColor> = { + { + let output: Val<::bevy_pbr::wireframe::WireframeColor> = <::bevy_pbr::wireframe::WireframeColor as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -1296,16 +713,16 @@ pub(crate) fn register_wireframe_color_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_wireframe_functions(world: &mut World) { +pub(crate) fn register_no_wireframe_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::wireframe::Wireframe, + ::bevy_pbr::wireframe::NoWireframe, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_pbr::wireframe::Wireframe>| { + |_self: Ref<::bevy_pbr::wireframe::NoWireframe>| { let output: () = { { - let output: () = <::bevy_pbr::wireframe::Wireframe as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_pbr::wireframe::NoWireframe as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -1319,10 +736,10 @@ pub(crate) fn register_wireframe_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_pbr::wireframe::Wireframe>| { - let output: Val<::bevy_pbr::wireframe::Wireframe> = { + |_self: Ref<::bevy_pbr::wireframe::NoWireframe>| { + let output: Val<::bevy_pbr::wireframe::NoWireframe> = { { - let output: Val<::bevy_pbr::wireframe::Wireframe> = <::bevy_pbr::wireframe::Wireframe as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::wireframe::NoWireframe> = <::bevy_pbr::wireframe::NoWireframe as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1337,13 +754,13 @@ pub(crate) fn register_wireframe_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_pbr::wireframe::Wireframe>, - other: Ref<::bevy_pbr::wireframe::Wireframe>| + _self: Ref<::bevy_pbr::wireframe::NoWireframe>, + other: Ref<::bevy_pbr::wireframe::NoWireframe>| { let output: bool = { { - let output: bool = <::bevy_pbr::wireframe::Wireframe as ::std::cmp::PartialEq< - ::bevy_pbr::wireframe::Wireframe, + let output: bool = <::bevy_pbr::wireframe::NoWireframe as ::std::cmp::PartialEq< + ::bevy_pbr::wireframe::NoWireframe, >>::eq(&_self, &other) .into(); output @@ -1358,7 +775,7 @@ pub(crate) fn register_wireframe_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_pbr::wireframe::Wireframe, + ::bevy_pbr::wireframe::NoWireframe, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -1469,48 +886,22 @@ pub(crate) fn register_atmosphere_functions(world: &mut World) { ); 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_atmosphere_settings_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::AtmosphereSettings, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::AtmosphereSettings>| { - let output: Val<::bevy_pbr::AtmosphereSettings> = { - { - let output: Val<::bevy_pbr::AtmosphereSettings> = - <::bevy_pbr::AtmosphereSettings 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_pbr::AtmosphereSettings, + ::bevy_pbr::Atmosphere, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_cluster_far_z_mode_functions(world: &mut World) { +pub(crate) fn register_gpu_atmosphere_settings_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::ClusterFarZMode, + ::bevy_pbr::GpuAtmosphereSettings, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_pbr::ClusterFarZMode>| { - let output: Val<::bevy_pbr::ClusterFarZMode> = { + |_self: Ref<::bevy_pbr::GpuAtmosphereSettings>| { + let output: Val<::bevy_pbr::GpuAtmosphereSettings> = { { - let output: Val<::bevy_pbr::ClusterFarZMode> = <::bevy_pbr::ClusterFarZMode as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::GpuAtmosphereSettings> = <::bevy_pbr::GpuAtmosphereSettings as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1526,20 +917,20 @@ pub(crate) fn register_cluster_far_z_mode_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_pbr::ClusterFarZMode, + ::bevy_pbr::GpuAtmosphereSettings, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_cluster_z_config_functions(world: &mut World) { +pub(crate) fn register_atmosphere_settings_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::ClusterZConfig, + ::bevy_pbr::AtmosphereSettings, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_pbr::ClusterZConfig>| { - let output: Val<::bevy_pbr::ClusterZConfig> = { + |_self: Ref<::bevy_pbr::AtmosphereSettings>| { + let output: Val<::bevy_pbr::AtmosphereSettings> = { { - let output: Val<::bevy_pbr::ClusterZConfig> = <::bevy_pbr::ClusterZConfig as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::AtmosphereSettings> = <::bevy_pbr::AtmosphereSettings as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1555,20 +946,20 @@ pub(crate) fn register_cluster_z_config_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_pbr::ClusterZConfig, + ::bevy_pbr::AtmosphereSettings, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_clustered_decal_functions(world: &mut World) { +pub(crate) fn register_atmosphere_mode_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::decal::clustered::ClusteredDecal, + ::bevy_pbr::AtmosphereMode, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_pbr::decal::clustered::ClusteredDecal>| { - let output: Val<::bevy_pbr::decal::clustered::ClusteredDecal> = { + |_self: Ref<::bevy_pbr::AtmosphereMode>| { + let output: Val<::bevy_pbr::AtmosphereMode> = { { - let output: Val<::bevy_pbr::decal::clustered::ClusteredDecal> = <::bevy_pbr::decal::clustered::ClusteredDecal as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::AtmosphereMode> = <::bevy_pbr::AtmosphereMode as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1584,22 +975,20 @@ pub(crate) fn register_clustered_decal_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_pbr::decal::clustered::ClusteredDecal, + ::bevy_pbr::AtmosphereMode, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_irradiance_volume_functions(world: &mut World) { +pub(crate) fn register_render_visible_mesh_entities_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::irradiance_volume::IrradianceVolume, + ::bevy_pbr::RenderVisibleMeshEntities, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_pbr::irradiance_volume::IrradianceVolume>| { - let output: Val<::bevy_pbr::irradiance_volume::IrradianceVolume> = { + |_self: Ref<::bevy_pbr::RenderVisibleMeshEntities>| { + let output: Val<::bevy_pbr::RenderVisibleMeshEntities> = { { - let output: Val< - ::bevy_pbr::irradiance_volume::IrradianceVolume, - > = <::bevy_pbr::irradiance_volume::IrradianceVolume as ::std::clone::Clone>::clone( + let output: Val<::bevy_pbr::RenderVisibleMeshEntities> = <::bevy_pbr::RenderVisibleMeshEntities as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1613,36 +1002,6 @@ pub(crate) fn register_irradiance_volume_functions(world: &mut World) { ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_pbr::irradiance_volume::IrradianceVolume, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_render_visible_mesh_entities_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::RenderVisibleMeshEntities, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::RenderVisibleMeshEntities>| { - let output: Val<::bevy_pbr::RenderVisibleMeshEntities> = { - { - let output: Val<::bevy_pbr::RenderVisibleMeshEntities> = - <::bevy_pbr::RenderVisibleMeshEntities 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_pbr::RenderVisibleMeshEntities, @@ -1653,24 +1012,23 @@ pub(crate) fn register_render_cubemap_visible_entities_functions(world: &mut Wor bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::RenderCubemapVisibleEntities, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::RenderCubemapVisibleEntities>| { - let output: Val<::bevy_pbr::RenderCubemapVisibleEntities> = { - { - let output: Val<::bevy_pbr::RenderCubemapVisibleEntities> = - <::bevy_pbr::RenderCubemapVisibleEntities as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_pbr::RenderCubemapVisibleEntities>| { + let output: Val<::bevy_pbr::RenderCubemapVisibleEntities> = { + { + let output: Val<::bevy_pbr::RenderCubemapVisibleEntities> = <::bevy_pbr::RenderCubemapVisibleEntities as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -1683,24 +1041,23 @@ pub(crate) fn register_render_cascades_visible_entities_functions(world: &mut Wo bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::RenderCascadesVisibleEntities, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::RenderCascadesVisibleEntities>| { - let output: Val<::bevy_pbr::RenderCascadesVisibleEntities> = { - { - let output: Val<::bevy_pbr::RenderCascadesVisibleEntities> = - <::bevy_pbr::RenderCascadesVisibleEntities as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_pbr::RenderCascadesVisibleEntities>| { + let output: Val<::bevy_pbr::RenderCascadesVisibleEntities> = { + { + let output: Val<::bevy_pbr::RenderCascadesVisibleEntities> = <::bevy_pbr::RenderCascadesVisibleEntities as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -1725,41 +1082,43 @@ pub(crate) fn register_opaque_renderer_method_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::OpaqueRendererMethod, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::OpaqueRendererMethod>| { - let output: Val<::bevy_pbr::OpaqueRendererMethod> = { - { - let output: Val<::bevy_pbr::OpaqueRendererMethod> = - <::bevy_pbr::OpaqueRendererMethod as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_pbr::OpaqueRendererMethod>| { + let output: Val<::bevy_pbr::OpaqueRendererMethod> = { + { + let output: Val<::bevy_pbr::OpaqueRendererMethod> = <::bevy_pbr::OpaqueRendererMethod as ::std::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_pbr::OpaqueRendererMethod>, - other: Ref<::bevy_pbr::OpaqueRendererMethod>| { - let output: bool = { - { - let output: bool = - <::bevy_pbr::OpaqueRendererMethod as ::std::cmp::PartialEq< + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_pbr::OpaqueRendererMethod>, + other: Ref<::bevy_pbr::OpaqueRendererMethod>| + { + let output: bool = { + { + let output: bool = <::bevy_pbr::OpaqueRendererMethod as ::std::cmp::PartialEq< ::bevy_pbr::OpaqueRendererMethod, >>::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 @@ -1768,42 +1127,6 @@ pub(crate) fn register_opaque_renderer_method_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_cascade_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::bevy_pbr::Cascade>::new( - world, - ) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::Cascade>| { - let output: Val<::bevy_pbr::Cascade> = { - { - let output: Val<::bevy_pbr::Cascade> = - <::bevy_pbr::Cascade 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_pbr::Cascade, bevy_mod_scripting_bindings::MarkAsGenerated>(); -} -pub(crate) fn register_transmitted_shadow_receiver_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_pbr::TransmittedShadowReceiver, - >::new(world); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_pbr::TransmittedShadowReceiver, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} pub(crate) fn register_lightmap_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::Lightmap, @@ -1828,28 +1151,32 @@ pub(crate) fn register_lightmap_functions(world: &mut World) { let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_pbr::Lightmap, bevy_mod_scripting_bindings::MarkAsGenerated>(); + .register_type_data::< + ::bevy_pbr::Lightmap, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } pub(crate) fn register_material_binding_id_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::MaterialBindingId, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::MaterialBindingId>| { - let output: Val<::bevy_pbr::MaterialBindingId> = { - { - let output: Val<::bevy_pbr::MaterialBindingId> = - <::bevy_pbr::MaterialBindingId as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_pbr::MaterialBindingId>| { + let output: Val<::bevy_pbr::MaterialBindingId> = { + { + let output: Val<::bevy_pbr::MaterialBindingId> = <::bevy_pbr::MaterialBindingId as ::std::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + output + } + }; + output + }, + "", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -1862,41 +1189,43 @@ pub(crate) fn register_material_bind_group_slot_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::MaterialBindGroupSlot, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_pbr::MaterialBindGroupSlot>| { - let output: Val<::bevy_pbr::MaterialBindGroupSlot> = { - { - let output: Val<::bevy_pbr::MaterialBindGroupSlot> = - <::bevy_pbr::MaterialBindGroupSlot as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_pbr::MaterialBindGroupSlot>| { + let output: Val<::bevy_pbr::MaterialBindGroupSlot> = { + { + let output: Val<::bevy_pbr::MaterialBindGroupSlot> = <::bevy_pbr::MaterialBindGroupSlot as ::std::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_pbr::MaterialBindGroupSlot>, - other: Ref<::bevy_pbr::MaterialBindGroupSlot>| { - let output: bool = { - { - let output: bool = - <::bevy_pbr::MaterialBindGroupSlot as ::std::cmp::PartialEq< + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_pbr::MaterialBindGroupSlot>, + other: Ref<::bevy_pbr::MaterialBindGroupSlot>| + { + let output: bool = { + { + let output: bool = <::bevy_pbr::MaterialBindGroupSlot as ::std::cmp::PartialEq< ::bevy_pbr::MaterialBindGroupSlot, >>::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 @@ -2029,10 +1358,14 @@ pub(crate) fn register_uv_channel_functions(world: &mut World) { let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_pbr::UvChannel, bevy_mod_scripting_bindings::MarkAsGenerated>( - ); + .register_type_data::< + ::bevy_pbr::UvChannel, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } -pub(crate) fn register_screen_space_ambient_occlusion_quality_level_functions(world: &mut World) { +pub(crate) fn register_screen_space_ambient_occlusion_quality_level_functions( + world: &mut World, +) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_pbr::ScreenSpaceAmbientOcclusionQualityLevel, >::new(world) @@ -2103,52 +1436,28 @@ pub(crate) fn register_screen_space_ambient_occlusion_quality_level_functions(wo impl Plugin for BevyPbrScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); - register_fog_volume_functions(&mut world); - register_volumetric_fog_functions(&mut world); - register_volumetric_light_functions(&mut world); register_distance_fog_functions(&mut world); register_fog_falloff_functions(&mut world); - register_ambient_light_functions(&mut world); - register_directional_light_functions(&mut world); - register_point_light_functions(&mut world); - register_spot_light_functions(&mut world); - register_environment_map_light_functions(&mut world); - register_light_probe_functions(&mut world); register_parallax_mapping_method_functions(&mut world); register_standard_material_functions(&mut world); register_screen_space_ambient_occlusion_functions(&mut world); register_screen_space_reflections_functions(&mut world); - register_cascade_shadow_config_functions(&mut world); - register_cascades_functions(&mut world); - register_cascades_visible_entities_functions(&mut world); - register_visible_mesh_entities_functions(&mut world); - register_cluster_config_functions(&mut world); - register_cubemap_visible_entities_functions(&mut world); - register_directional_light_shadow_map_functions(&mut world); - register_not_shadow_caster_functions(&mut world); - register_not_shadow_receiver_functions(&mut world); - register_point_light_shadow_map_functions(&mut world); - register_shadow_filtering_method_functions(&mut world); register_default_opaque_renderer_method_functions(&mut world); register_wireframe_material_functions(&mut world); - register_no_wireframe_functions(&mut world); register_wireframe_config_functions(&mut world); - register_wireframe_color_functions(&mut world); register_wireframe_functions(&mut world); + 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_cluster_far_z_mode_functions(&mut world); - register_cluster_z_config_functions(&mut world); - register_clustered_decal_functions(&mut world); - register_irradiance_volume_functions(&mut world); + register_atmosphere_mode_functions(&mut world); register_render_visible_mesh_entities_functions(&mut world); register_render_cubemap_visible_entities_functions(&mut world); register_render_cascades_visible_entities_functions(&mut world); register_forward_decal_functions(&mut world); register_opaque_renderer_method_functions(&mut world); - register_cascade_functions(&mut world); - register_transmitted_shadow_receiver_functions(&mut world); register_lightmap_functions(&mut world); register_material_binding_id_functions(&mut world); register_material_bind_group_slot_functions(&mut world); diff --git a/crates/bindings/bevy_picking_bms_bindings/Cargo.toml b/crates/bindings/bevy_picking_bms_bindings/Cargo.toml index e8463f8076..697f762d14 100644 --- a/crates/bindings/bevy_picking_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_picking_bms_bindings/Cargo.toml @@ -17,37 +17,35 @@ 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.16.1", features = [ - "bevy_mesh_picking_backend", -], default-features = true } +bevy_picking = { version = "0.17.2", features = ["bevy_mesh_picking_backend"], default-features = true} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_derive = { version = "^0.16.1", features = [], default-features = true } +bevy_camera = { version = "^0.17.2", features = [], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } +bevy_derive = { version = "^0.17.2", features = [], default-features = true} -bevy_input = { version = "^0.16.1", features = [], default-features = true } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_math = { version = "^0.16.1", features = [], default-features = true } +bevy_input = { version = "^0.17.2", features = ["bevy_reflect", "smol_str", "std"], default-features = true} -bevy_mesh = { version = "^0.16.1", features = [], default-features = true } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} -bevy_render = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_time = { version = "^0.16.1", features = [], default-features = true } +bevy_time = { version = "^0.17.2", features = ["bevy_reflect", "std"], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +bevy_window = { version = "^0.17.2", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} -bevy_window = { version = "^0.16.1", features = [], default-features = true } +crossbeam-channel = { version = "^0.5", features = [], default-features = true} + +uuid = { version = "^1.13.1", features = [], default-features = true} -crossbeam-channel = { version = "^0.5", features = [], default-features = true } -uuid = { version = "^1.13.1", features = [], default-features = true } diff --git a/crates/bindings/bevy_picking_bms_bindings/src/lib.rs b/crates/bindings/bevy_picking_bms_bindings/src/lib.rs index 0a336cf46c..8cbcbc17b1 100644 --- a/crates/bindings/bevy_picking_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_picking_bms_bindings/src/lib.rs @@ -1,31 +1,30 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyPickingScriptingPlugin; -pub(crate) fn register_ray_cast_backfaces_functions(world: &mut World) { +pub(crate) fn register_release_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::mesh_picking::ray_cast::RayCastBackfaces, + ::bevy_picking::events::Release, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_picking::mesh_picking::ray_cast::RayCastBackfaces>| { - let output: Val< - ::bevy_picking::mesh_picking::ray_cast::RayCastBackfaces, - > = { + |_self: Ref<::bevy_picking::events::Release>| { + let output: Val<::bevy_picking::events::Release> = { { - let output: Val< - ::bevy_picking::mesh_picking::ray_cast::RayCastBackfaces, - > = <::bevy_picking::mesh_picking::ray_cast::RayCastBackfaces as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::events::Release> = <::bevy_picking::events::Release as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -36,29 +35,45 @@ pub(crate) fn register_ray_cast_backfaces_functions(world: &mut World) { }, "", &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::events::Release>, + other: Ref<::bevy_picking::events::Release>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::events::Release as ::std::cmp::PartialEq< + ::bevy_picking::events::Release, + >>::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_picking::mesh_picking::ray_cast::RayCastBackfaces, + ::bevy_picking::events::Release, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_ray_cast_visibility_functions(world: &mut World) { +pub(crate) fn register_ray_cast_backfaces_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::mesh_picking::ray_cast::RayCastVisibility, + ::bevy_picking::prelude::RayCastBackfaces, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_picking::mesh_picking::ray_cast::RayCastVisibility>| { - let output: Val< - ::bevy_picking::mesh_picking::ray_cast::RayCastVisibility, - > = { + |_self: Ref<::bevy_picking::prelude::RayCastBackfaces>| { + let output: Val<::bevy_picking::prelude::RayCastBackfaces> = { { - let output: Val< - ::bevy_picking::mesh_picking::ray_cast::RayCastVisibility, - > = <::bevy_picking::mesh_picking::ray_cast::RayCastVisibility as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::prelude::RayCastBackfaces> = <::bevy_picking::prelude::RayCastBackfaces as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -74,22 +89,20 @@ pub(crate) fn register_ray_cast_visibility_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::mesh_picking::ray_cast::RayCastVisibility, + ::bevy_picking::prelude::RayCastBackfaces, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_mesh_picking_camera_functions(world: &mut World) { +pub(crate) fn register_ray_cast_visibility_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::mesh_picking::MeshPickingCamera, + ::bevy_picking::prelude::RayCastVisibility, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_picking::mesh_picking::MeshPickingCamera>| { - let output: Val<::bevy_picking::mesh_picking::MeshPickingCamera> = { + |_self: Ref<::bevy_picking::prelude::RayCastVisibility>| { + let output: Val<::bevy_picking::prelude::RayCastVisibility> = { { - let output: Val< - ::bevy_picking::mesh_picking::MeshPickingCamera, - > = <::bevy_picking::mesh_picking::MeshPickingCamera as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::prelude::RayCastVisibility> = <::bevy_picking::prelude::RayCastVisibility as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -105,34 +118,22 @@ pub(crate) fn register_mesh_picking_camera_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::mesh_picking::MeshPickingCamera, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_mesh_picking_settings_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::mesh_picking::MeshPickingSettings, - >::new(world); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_picking::mesh_picking::MeshPickingSettings, + ::bevy_picking::prelude::RayCastVisibility, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_pointer_input_plugin_functions(world: &mut World) { +pub(crate) fn register_mesh_picking_camera_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::input::prelude::PointerInputPlugin, + ::bevy_picking::mesh_picking::MeshPickingCamera, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_picking::input::prelude::PointerInputPlugin>| { - let output: Val<::bevy_picking::input::prelude::PointerInputPlugin> = { + |_self: Ref<::bevy_picking::mesh_picking::MeshPickingCamera>| { + let output: Val<::bevy_picking::mesh_picking::MeshPickingCamera> = { { let output: Val< - ::bevy_picking::input::prelude::PointerInputPlugin, - > = <::bevy_picking::input::prelude::PointerInputPlugin as ::std::clone::Clone>::clone( + ::bevy_picking::mesh_picking::MeshPickingCamera, + > = <::bevy_picking::mesh_picking::MeshPickingCamera as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -148,7 +149,19 @@ pub(crate) fn register_pointer_input_plugin_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::input::prelude::PointerInputPlugin, + ::bevy_picking::mesh_picking::MeshPickingCamera, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_mesh_picking_settings_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::mesh_picking::MeshPickingSettings, + >::new(world); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_picking::mesh_picking::MeshPickingSettings, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -220,14 +233,14 @@ pub(crate) fn register_pointer_button_functions(world: &mut World) { } pub(crate) fn register_pickable_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::backend::prelude::Pickable, + ::bevy_picking::Pickable, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_picking::backend::prelude::Pickable>| { + |_self: Ref<::bevy_picking::Pickable>| { let output: () = { { - let output: () = <::bevy_picking::backend::prelude::Pickable as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_picking::Pickable as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -241,10 +254,10 @@ pub(crate) fn register_pickable_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_picking::backend::prelude::Pickable>| { - let output: Val<::bevy_picking::backend::prelude::Pickable> = { + |_self: Ref<::bevy_picking::Pickable>| { + let output: Val<::bevy_picking::Pickable> = { { - let output: Val<::bevy_picking::backend::prelude::Pickable> = <::bevy_picking::backend::prelude::Pickable as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::Pickable> = <::bevy_picking::Pickable as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -258,14 +271,11 @@ pub(crate) fn register_pickable_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_picking::backend::prelude::Pickable>, - other: Ref<::bevy_picking::backend::prelude::Pickable>| - { + |_self: Ref<::bevy_picking::Pickable>, other: Ref<::bevy_picking::Pickable>| { let output: bool = { { - let output: bool = <::bevy_picking::backend::prelude::Pickable as ::std::cmp::PartialEq< - ::bevy_picking::backend::prelude::Pickable, + let output: bool = <::bevy_picking::Pickable as ::std::cmp::PartialEq< + ::bevy_picking::Pickable, >>::eq(&_self, &other) .into(); output @@ -280,37 +290,36 @@ pub(crate) fn register_pickable_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::backend::prelude::Pickable, + ::bevy_picking::Pickable, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_picking_plugin_functions(world: &mut World) { +pub(crate) fn register_picking_settings_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::prelude::PickingPlugin, + ::bevy_picking::PickingSettings, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::prelude::PickingPlugin>| { - let output: Val<::bevy_picking::prelude::PickingPlugin> = { - { - let output: Val<::bevy_picking::prelude::PickingPlugin> = - <::bevy_picking::prelude::PickingPlugin as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_picking::PickingSettings>| { + let output: Val<::bevy_picking::PickingSettings> = { + { + let output: Val<::bevy_picking::PickingSettings> = <::bevy_picking::PickingSettings 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_picking::prelude::PickingPlugin, + ::bevy_picking::PickingSettings, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -380,7 +389,7 @@ pub(crate) fn register_pointer_input_functions(world: &mut World) { .register_documented( "new", | - pointer_id: Val<::bevy_picking::backend::prelude::PointerId>, + pointer_id: Val<::bevy_picking::pointer::PointerId>, location: Val<::bevy_picking::pointer::Location>, action: Val<::bevy_picking::pointer::PointerAction>| { @@ -410,14 +419,14 @@ pub(crate) fn register_pointer_input_functions(world: &mut World) { } pub(crate) fn register_pointer_hits_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::backend::prelude::PointerHits, + ::bevy_picking::backend::PointerHits, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_picking::backend::prelude::PointerHits>| { - let output: Val<::bevy_picking::backend::prelude::PointerHits> = { + |_self: Ref<::bevy_picking::backend::PointerHits>| { + let output: Val<::bevy_picking::backend::PointerHits> = { { - let output: Val<::bevy_picking::backend::prelude::PointerHits> = <::bevy_picking::backend::prelude::PointerHits as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::backend::PointerHits> = <::bevy_picking::backend::PointerHits as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -433,37 +442,20 @@ pub(crate) fn register_pointer_hits_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::backend::prelude::PointerHits, + ::bevy_picking::backend::PointerHits, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_picking_interaction_functions(world: &mut World) { +pub(crate) fn register_cancel_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::hover::PickingInteraction, + ::bevy_picking::events::Cancel, >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_picking::hover::PickingInteraction>| { - let output: () = { - { - let output: () = <::bevy_picking::hover::PickingInteraction as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) .register_documented( "clone", - |_self: Ref<::bevy_picking::hover::PickingInteraction>| { - let output: Val<::bevy_picking::hover::PickingInteraction> = { + |_self: Ref<::bevy_picking::events::Cancel>| { + let output: Val<::bevy_picking::events::Cancel> = { { - let output: Val<::bevy_picking::hover::PickingInteraction> = <::bevy_picking::hover::PickingInteraction as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::events::Cancel> = <::bevy_picking::events::Cancel as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -478,13 +470,13 @@ pub(crate) fn register_picking_interaction_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_picking::hover::PickingInteraction>, - other: Ref<::bevy_picking::hover::PickingInteraction>| + _self: Ref<::bevy_picking::events::Cancel>, + other: Ref<::bevy_picking::events::Cancel>| { let output: bool = { { - let output: bool = <::bevy_picking::hover::PickingInteraction as ::std::cmp::PartialEq< - ::bevy_picking::hover::PickingInteraction, + let output: bool = <::bevy_picking::events::Cancel as ::std::cmp::PartialEq< + ::bevy_picking::events::Cancel, >>::eq(&_self, &other) .into(); output @@ -499,20 +491,20 @@ pub(crate) fn register_picking_interaction_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::hover::PickingInteraction, + ::bevy_picking::events::Cancel, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_pointer_id_functions(world: &mut World) { +pub(crate) fn register_click_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::backend::prelude::PointerId, + ::bevy_picking::events::Click, >::new(world) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_picking::backend::prelude::PointerId>| { - let output: () = { + "clone", + |_self: Ref<::bevy_picking::events::Click>| { + let output: Val<::bevy_picking::events::Click> = { { - let output: () = <::bevy_picking::backend::prelude::PointerId as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::bevy_picking::events::Click> = <::bevy_picking::events::Click as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -524,12 +516,44 @@ pub(crate) fn register_pointer_id_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::events::Click>, + other: Ref<::bevy_picking::events::Click>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::events::Click as ::std::cmp::PartialEq< + ::bevy_picking::events::Click, + >>::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_picking::events::Click, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_press_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::events::Press, + >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_picking::backend::prelude::PointerId>| { - let output: Val<::bevy_picking::backend::prelude::PointerId> = { + |_self: Ref<::bevy_picking::events::Press>| { + let output: Val<::bevy_picking::events::Press> = { { - let output: Val<::bevy_picking::backend::prelude::PointerId> = <::bevy_picking::backend::prelude::PointerId as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::events::Press> = <::bevy_picking::events::Press as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -544,13 +568,13 @@ pub(crate) fn register_pointer_id_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_picking::backend::prelude::PointerId>, - other: Ref<::bevy_picking::backend::prelude::PointerId>| + _self: Ref<::bevy_picking::events::Press>, + other: Ref<::bevy_picking::events::Press>| { let output: bool = { { - let output: bool = <::bevy_picking::backend::prelude::PointerId as ::std::cmp::PartialEq< - ::bevy_picking::backend::prelude::PointerId, + let output: bool = <::bevy_picking::events::Press as ::std::cmp::PartialEq< + ::bevy_picking::events::Press, >>::eq(&_self, &other) .into(); output @@ -560,13 +584,25 @@ pub(crate) fn register_pointer_id_functions(world: &mut World) { }, "", &["_self", "other"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_picking::events::Press, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_drag_drop_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::events::DragDrop, + >::new(world) .register_documented( - "get_touch_id", - |_self: Ref<::bevy_picking::backend::prelude::PointerId>| { - let output: ::std::option::Option = { + "clone", + |_self: Ref<::bevy_picking::events::DragDrop>| { + let output: Val<::bevy_picking::events::DragDrop> = { { - let output: ::std::option::Option = ::bevy_picking::backend::prelude::PointerId::get_touch_id( + let output: Val<::bevy_picking::events::DragDrop> = <::bevy_picking::events::DragDrop as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -575,32 +611,47 @@ pub(crate) fn register_pointer_id_functions(world: &mut World) { }; output }, - " Returns the touch id if the pointer is a touch input.", + "", &["_self"], ) .register_documented( - "is_custom", - |_self: Ref<::bevy_picking::backend::prelude::PointerId>| { + "eq", + | + _self: Ref<::bevy_picking::events::DragDrop>, + other: Ref<::bevy_picking::events::DragDrop>| + { let output: bool = { { - let output: bool = ::bevy_picking::backend::prelude::PointerId::is_custom( - &_self, - ) + let output: bool = <::bevy_picking::events::DragDrop as ::std::cmp::PartialEq< + ::bevy_picking::events::DragDrop, + >>::eq(&_self, &other) .into(); output } }; output }, - " Returns true if the pointer is a custom input.", - &["_self"], - ) + "", + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_picking::events::DragDrop, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_drag_end_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::events::DragEnd, + >::new(world) .register_documented( - "is_mouse", - |_self: Ref<::bevy_picking::backend::prelude::PointerId>| { - let output: bool = { + "clone", + |_self: Ref<::bevy_picking::events::DragEnd>| { + let output: Val<::bevy_picking::events::DragEnd> = { { - let output: bool = ::bevy_picking::backend::prelude::PointerId::is_mouse( + let output: Val<::bevy_picking::events::DragEnd> = <::bevy_picking::events::DragEnd as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -609,46 +660,47 @@ pub(crate) fn register_pointer_id_functions(world: &mut World) { }; output }, - " Returns true if the pointer is the mouse.", + "", &["_self"], ) .register_documented( - "is_touch", - |_self: Ref<::bevy_picking::backend::prelude::PointerId>| { + "eq", + | + _self: Ref<::bevy_picking::events::DragEnd>, + other: Ref<::bevy_picking::events::DragEnd>| + { let output: bool = { { - let output: bool = ::bevy_picking::backend::prelude::PointerId::is_touch( - &_self, - ) + let output: bool = <::bevy_picking::events::DragEnd as ::std::cmp::PartialEq< + ::bevy_picking::events::DragEnd, + >>::eq(&_self, &other) .into(); output } }; output }, - " Returns true if the pointer is a touch input.", - &["_self"], + "", + &["_self", "other"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::backend::prelude::PointerId, + ::bevy_picking::events::DragEnd, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_pointer_location_functions(world: &mut World) { +pub(crate) fn register_drag_enter_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::backend::prelude::PointerLocation, + ::bevy_picking::events::DragEnter, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_picking::backend::prelude::PointerLocation>| { - let output: Val<::bevy_picking::backend::prelude::PointerLocation> = { + |_self: Ref<::bevy_picking::events::DragEnter>| { + let output: Val<::bevy_picking::events::DragEnter> = { { - let output: Val< - ::bevy_picking::backend::prelude::PointerLocation, - > = <::bevy_picking::backend::prelude::PointerLocation as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::events::DragEnter> = <::bevy_picking::events::DragEnter as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -663,13 +715,13 @@ pub(crate) fn register_pointer_location_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_picking::backend::prelude::PointerLocation>, - other: Ref<::bevy_picking::backend::prelude::PointerLocation>| + _self: Ref<::bevy_picking::events::DragEnter>, + other: Ref<::bevy_picking::events::DragEnter>| { let output: bool = { { - let output: bool = <::bevy_picking::backend::prelude::PointerLocation as ::std::cmp::PartialEq< - ::bevy_picking::backend::prelude::PointerLocation, + let output: bool = <::bevy_picking::events::DragEnter as ::std::cmp::PartialEq< + ::bevy_picking::events::DragEnter, >>::eq(&_self, &other) .into(); output @@ -679,44 +731,25 @@ pub(crate) fn register_pointer_location_functions(world: &mut World) { }, "", &["_self", "other"], - ) - .register_documented( - "new", - |location: Val<::bevy_picking::pointer::Location>| { - let output: Val<::bevy_picking::backend::prelude::PointerLocation> = { - { - let output: Val< - ::bevy_picking::backend::prelude::PointerLocation, - > = ::bevy_picking::backend::prelude::PointerLocation::new( - location.into_inner(), - ) - .into(); - output - } - }; - output - }, - "Returns a [`PointerLocation`] associated with the given location", - &["location"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::backend::prelude::PointerLocation, + ::bevy_picking::events::DragEnter, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_pointer_press_functions(world: &mut World) { +pub(crate) fn register_drag_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::pointer::PointerPress, + ::bevy_picking::events::Drag, >::new(world) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_picking::pointer::PointerPress>| { - let output: () = { + "clone", + |_self: Ref<::bevy_picking::events::Drag>| { + let output: Val<::bevy_picking::events::Drag> = { { - let output: () = <::bevy_picking::pointer::PointerPress as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::bevy_picking::events::Drag> = <::bevy_picking::events::Drag as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -729,13 +762,16 @@ pub(crate) fn register_pointer_press_functions(world: &mut World) { &["_self"], ) .register_documented( - "clone", - |_self: Ref<::bevy_picking::pointer::PointerPress>| { - let output: Val<::bevy_picking::pointer::PointerPress> = { + "eq", + | + _self: Ref<::bevy_picking::events::Drag>, + other: Ref<::bevy_picking::events::Drag>| + { + let output: bool = { { - let output: Val<::bevy_picking::pointer::PointerPress> = <::bevy_picking::pointer::PointerPress as ::std::clone::Clone>::clone( - &_self, - ) + let output: bool = <::bevy_picking::events::Drag as ::std::cmp::PartialEq< + ::bevy_picking::events::Drag, + >>::eq(&_self, &other) .into(); output } @@ -743,18 +779,47 @@ pub(crate) fn register_pointer_press_functions(world: &mut World) { output }, "", - &["_self"], - ) - .register_documented( + &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_picking::events::Drag, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_drag_leave_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::events::DragLeave, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_picking::events::DragLeave>| { + let output: Val<::bevy_picking::events::DragLeave> = { + { + let output: Val<::bevy_picking::events::DragLeave> = <::bevy_picking::events::DragLeave as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( "eq", | - _self: Ref<::bevy_picking::pointer::PointerPress>, - other: Ref<::bevy_picking::pointer::PointerPress>| + _self: Ref<::bevy_picking::events::DragLeave>, + other: Ref<::bevy_picking::events::DragLeave>| { let output: bool = { { - let output: bool = <::bevy_picking::pointer::PointerPress as ::std::cmp::PartialEq< - ::bevy_picking::pointer::PointerPress, + let output: bool = <::bevy_picking::events::DragLeave as ::std::cmp::PartialEq< + ::bevy_picking::events::DragLeave, >>::eq(&_self, &other) .into(); output @@ -764,13 +829,25 @@ pub(crate) fn register_pointer_press_functions(world: &mut World) { }, "", &["_self", "other"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_picking::events::DragLeave, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_drag_over_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::events::DragOver, + >::new(world) .register_documented( - "is_any_pressed", - |_self: Ref<::bevy_picking::pointer::PointerPress>| { - let output: bool = { + "clone", + |_self: Ref<::bevy_picking::events::DragOver>| { + let output: Val<::bevy_picking::events::DragOver> = { { - let output: bool = ::bevy_picking::pointer::PointerPress::is_any_pressed( + let output: Val<::bevy_picking::events::DragOver> = <::bevy_picking::events::DragOver as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -779,15 +856,47 @@ pub(crate) fn register_pointer_press_functions(world: &mut World) { }; output }, - " Returns true if any pointer button is pressed.", + "", &["_self"], ) .register_documented( - "is_middle_pressed", - |_self: Ref<::bevy_picking::pointer::PointerPress>| { + "eq", + | + _self: Ref<::bevy_picking::events::DragOver>, + other: Ref<::bevy_picking::events::DragOver>| + { let output: bool = { { - let output: bool = ::bevy_picking::pointer::PointerPress::is_middle_pressed( + let output: bool = <::bevy_picking::events::DragOver as ::std::cmp::PartialEq< + ::bevy_picking::events::DragOver, + >>::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_picking::events::DragOver, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_drag_start_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::events::DragStart, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_picking::events::DragStart>| { + let output: Val<::bevy_picking::events::DragStart> = { + { + let output: Val<::bevy_picking::events::DragStart> = <::bevy_picking::events::DragStart as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -796,15 +905,47 @@ pub(crate) fn register_pointer_press_functions(world: &mut World) { }; output }, - " Returns true if the middle (tertiary) pointer button is pressed.", + "", &["_self"], ) .register_documented( - "is_primary_pressed", - |_self: Ref<::bevy_picking::pointer::PointerPress>| { + "eq", + | + _self: Ref<::bevy_picking::events::DragStart>, + other: Ref<::bevy_picking::events::DragStart>| + { let output: bool = { { - let output: bool = ::bevy_picking::pointer::PointerPress::is_primary_pressed( + let output: bool = <::bevy_picking::events::DragStart as ::std::cmp::PartialEq< + ::bevy_picking::events::DragStart, + >>::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_picking::events::DragStart, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_move_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::events::Move, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_picking::events::Move>| { + let output: Val<::bevy_picking::events::Move> = { + { + let output: Val<::bevy_picking::events::Move> = <::bevy_picking::events::Move as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -813,44 +954,47 @@ pub(crate) fn register_pointer_press_functions(world: &mut World) { }; output }, - " Returns true if the primary pointer button is pressed.", + "", &["_self"], ) .register_documented( - "is_secondary_pressed", - |_self: Ref<::bevy_picking::pointer::PointerPress>| { + "eq", + | + _self: Ref<::bevy_picking::events::Move>, + other: Ref<::bevy_picking::events::Move>| + { let output: bool = { { - let output: bool = ::bevy_picking::pointer::PointerPress::is_secondary_pressed( - &_self, - ) + let output: bool = <::bevy_picking::events::Move as ::std::cmp::PartialEq< + ::bevy_picking::events::Move, + >>::eq(&_self, &other) .into(); output } }; output }, - " Returns true if the secondary pointer button is pressed.", - &["_self"], + "", + &["_self", "other"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::pointer::PointerPress, + ::bevy_picking::events::Move, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_pointer_interaction_functions(world: &mut World) { +pub(crate) fn register_out_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::pointer::PointerInteraction, + ::bevy_picking::events::Out, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_picking::pointer::PointerInteraction>| { - let output: Val<::bevy_picking::pointer::PointerInteraction> = { + |_self: Ref<::bevy_picking::events::Out>| { + let output: Val<::bevy_picking::events::Out> = { { - let output: Val<::bevy_picking::pointer::PointerInteraction> = <::bevy_picking::pointer::PointerInteraction as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::events::Out> = <::bevy_picking::events::Out as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -861,25 +1005,45 @@ pub(crate) fn register_pointer_interaction_functions(world: &mut World) { }, "", &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::events::Out>, + other: Ref<::bevy_picking::events::Out>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::events::Out as ::std::cmp::PartialEq< + ::bevy_picking::events::Out, + >>::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_picking::pointer::PointerInteraction, + ::bevy_picking::events::Out, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_ray_id_functions(world: &mut World) { +pub(crate) fn register_over_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::backend::ray::RayId, + ::bevy_picking::events::Over, >::new(world) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_picking::backend::ray::RayId>| { - let output: () = { + "clone", + |_self: Ref<::bevy_picking::events::Over>| { + let output: Val<::bevy_picking::events::Over> = { { - let output: () = <::bevy_picking::backend::ray::RayId as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::bevy_picking::events::Over> = <::bevy_picking::events::Over as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -891,12 +1055,44 @@ pub(crate) fn register_ray_id_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::events::Over>, + other: Ref<::bevy_picking::events::Over>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::events::Over as ::std::cmp::PartialEq< + ::bevy_picking::events::Over, + >>::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_picking::events::Over, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_scroll_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::events::Scroll, + >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_picking::backend::ray::RayId>| { - let output: Val<::bevy_picking::backend::ray::RayId> = { + |_self: Ref<::bevy_picking::events::Scroll>| { + let output: Val<::bevy_picking::events::Scroll> = { { - let output: Val<::bevy_picking::backend::ray::RayId> = <::bevy_picking::backend::ray::RayId as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::events::Scroll> = <::bevy_picking::events::Scroll as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -911,13 +1107,13 @@ pub(crate) fn register_ray_id_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_picking::backend::ray::RayId>, - other: Ref<::bevy_picking::backend::ray::RayId>| + _self: Ref<::bevy_picking::events::Scroll>, + other: Ref<::bevy_picking::events::Scroll>| { let output: bool = { { - let output: bool = <::bevy_picking::backend::ray::RayId as ::std::cmp::PartialEq< - ::bevy_picking::backend::ray::RayId, + let output: bool = <::bevy_picking::events::Scroll as ::std::cmp::PartialEq< + ::bevy_picking::events::Scroll, >>::eq(&_self, &other) .into(); output @@ -927,551 +1123,668 @@ pub(crate) fn register_ray_id_functions(world: &mut World) { }, "", &["_self", "other"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_picking::events::Scroll, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_hit_data_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::backend::HitData, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_picking::backend::HitData>| { + let output: Val<::bevy_picking::backend::HitData> = { + { + let output: Val<::bevy_picking::backend::HitData> = <::bevy_picking::backend::HitData as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], ) .register_documented( - "new", + "eq", | - camera: Val<::bevy_ecs::entity::Entity>, - pointer: Val<::bevy_picking::backend::prelude::PointerId>| + _self: Ref<::bevy_picking::backend::HitData>, + other: Ref<::bevy_picking::backend::HitData>| { - let output: Val<::bevy_picking::backend::ray::RayId> = { + let output: bool = { { - let output: Val<::bevy_picking::backend::ray::RayId> = ::bevy_picking::backend::ray::RayId::new( - camera.into_inner(), - pointer.into_inner(), - ) + let output: bool = <::bevy_picking::backend::HitData as ::std::cmp::PartialEq< + ::bevy_picking::backend::HitData, + >>::eq(&_self, &other) .into(); output } }; output }, - " Construct a [`RayId`].", - &["camera", "pointer"], + "", + &["_self", "other"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::backend::ray::RayId, + ::bevy_picking::backend::HitData, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_cancel_functions(world: &mut World) { +pub(crate) fn register_pointer_id_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::Cancel, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::Cancel>| { - let output: Val<::bevy_picking::events::Cancel> = { - { - let output: Val<::bevy_picking::events::Cancel> = - <::bevy_picking::events::Cancel as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::Cancel>, other: Ref<::bevy_picking::events::Cancel>| { - let output: bool = { - { - let output: bool = <::bevy_picking::events::Cancel as ::std::cmp::PartialEq< - ::bevy_picking::events::Cancel, - >>::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_picking::events::Cancel, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_click_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::Click, + ::bevy_picking::pointer::PointerId, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::Click>| { - let output: Val<::bevy_picking::events::Click> = { - { - let output: Val<::bevy_picking::events::Click> = - <::bevy_picking::events::Click as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::Click>, other: Ref<::bevy_picking::events::Click>| { - let output: bool = { - { - let output: bool = <::bevy_picking::events::Click as ::std::cmp::PartialEq< - ::bevy_picking::events::Click, - >>::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_picking::events::Click, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_pressed_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::Pressed, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::Pressed>| { - let output: Val<::bevy_picking::events::Pressed> = { - { - let output: Val<::bevy_picking::events::Pressed> = - <::bevy_picking::events::Pressed as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::Pressed>, - other: Ref<::bevy_picking::events::Pressed>| { - let output: bool = { - { - let output: bool = <::bevy_picking::events::Pressed as ::std::cmp::PartialEq< - ::bevy_picking::events::Pressed, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_picking::pointer::PointerId>| { + let output: () = { + { + let output: () = <::bevy_picking::pointer::PointerId as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_picking::pointer::PointerId>| { + let output: Val<::bevy_picking::pointer::PointerId> = { + { + let output: Val<::bevy_picking::pointer::PointerId> = <::bevy_picking::pointer::PointerId as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::pointer::PointerId>, + other: Ref<::bevy_picking::pointer::PointerId>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::pointer::PointerId as ::std::cmp::PartialEq< + ::bevy_picking::pointer::PointerId, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "get_touch_id", + |_self: Ref<::bevy_picking::pointer::PointerId>| { + let output: ::std::option::Option = { + { + let output: ::std::option::Option = ::bevy_picking::pointer::PointerId::get_touch_id( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the touch id if the pointer is a touch input.", + &["_self"], + ) + .register_documented( + "is_custom", + |_self: Ref<::bevy_picking::pointer::PointerId>| { + let output: bool = { + { + let output: bool = ::bevy_picking::pointer::PointerId::is_custom( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns true if the pointer is a custom input.", + &["_self"], + ) + .register_documented( + "is_mouse", + |_self: Ref<::bevy_picking::pointer::PointerId>| { + let output: bool = { + { + let output: bool = ::bevy_picking::pointer::PointerId::is_mouse( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns true if the pointer is the mouse.", + &["_self"], + ) + .register_documented( + "is_touch", + |_self: Ref<::bevy_picking::pointer::PointerId>| { + let output: bool = { + { + let output: bool = ::bevy_picking::pointer::PointerId::is_touch( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns true if the pointer is a touch input.", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::events::Pressed, + ::bevy_picking::pointer::PointerId, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_drag_drop_functions(world: &mut World) { +pub(crate) fn register_pointer_location_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::DragDrop, + ::bevy_picking::pointer::PointerLocation, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::DragDrop>| { - let output: Val<::bevy_picking::events::DragDrop> = { - { - let output: Val<::bevy_picking::events::DragDrop> = - <::bevy_picking::events::DragDrop as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::DragDrop>, - other: Ref<::bevy_picking::events::DragDrop>| { - let output: bool = { - { - let output: bool = - <::bevy_picking::events::DragDrop as ::std::cmp::PartialEq< - ::bevy_picking::events::DragDrop, + .register_documented( + "clone", + |_self: Ref<::bevy_picking::pointer::PointerLocation>| { + let output: Val<::bevy_picking::pointer::PointerLocation> = { + { + let output: Val<::bevy_picking::pointer::PointerLocation> = <::bevy_picking::pointer::PointerLocation as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::pointer::PointerLocation>, + other: Ref<::bevy_picking::pointer::PointerLocation>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::pointer::PointerLocation as ::std::cmp::PartialEq< + ::bevy_picking::pointer::PointerLocation, >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "new", + |location: Val<::bevy_picking::pointer::Location>| { + let output: Val<::bevy_picking::pointer::PointerLocation> = { + { + let output: Val<::bevy_picking::pointer::PointerLocation> = ::bevy_picking::pointer::PointerLocation::new( + location.into_inner(), + ) + .into(); + output + } + }; + output + }, + "Returns a [`PointerLocation`] associated with the given location", + &["location"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::events::DragDrop, + ::bevy_picking::pointer::PointerLocation, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_drag_end_functions(world: &mut World) { +pub(crate) fn register_ray_id_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::DragEnd, + ::bevy_picking::backend::ray::RayId, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::DragEnd>| { - let output: Val<::bevy_picking::events::DragEnd> = { - { - let output: Val<::bevy_picking::events::DragEnd> = - <::bevy_picking::events::DragEnd as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::DragEnd>, - other: Ref<::bevy_picking::events::DragEnd>| { - let output: bool = { - { - let output: bool = <::bevy_picking::events::DragEnd as ::std::cmp::PartialEq< - ::bevy_picking::events::DragEnd, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_picking::backend::ray::RayId>| { + let output: () = { + { + let output: () = <::bevy_picking::backend::ray::RayId as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_picking::backend::ray::RayId>| { + let output: Val<::bevy_picking::backend::ray::RayId> = { + { + let output: Val<::bevy_picking::backend::ray::RayId> = <::bevy_picking::backend::ray::RayId as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::backend::ray::RayId>, + other: Ref<::bevy_picking::backend::ray::RayId>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::backend::ray::RayId as ::std::cmp::PartialEq< + ::bevy_picking::backend::ray::RayId, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "new", + | + camera: Val<::bevy_ecs::entity::Entity>, + pointer: Val<::bevy_picking::pointer::PointerId>| + { + let output: Val<::bevy_picking::backend::ray::RayId> = { + { + let output: Val<::bevy_picking::backend::ray::RayId> = ::bevy_picking::backend::ray::RayId::new( + camera.into_inner(), + pointer.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Construct a [`RayId`].", + &["camera", "pointer"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::events::DragEnd, + ::bevy_picking::backend::ray::RayId, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_drag_enter_functions(world: &mut World) { +pub(crate) fn register_location_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::DragEnter, + ::bevy_picking::pointer::Location, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::DragEnter>| { - let output: Val<::bevy_picking::events::DragEnter> = { - { - let output: Val<::bevy_picking::events::DragEnter> = - <::bevy_picking::events::DragEnter as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::DragEnter>, - other: Ref<::bevy_picking::events::DragEnter>| { - let output: bool = { - { - let output: bool = - <::bevy_picking::events::DragEnter as ::std::cmp::PartialEq< - ::bevy_picking::events::DragEnter, + .register_documented( + "clone", + |_self: Ref<::bevy_picking::pointer::Location>| { + let output: Val<::bevy_picking::pointer::Location> = { + { + let output: Val<::bevy_picking::pointer::Location> = <::bevy_picking::pointer::Location as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::pointer::Location>, + other: Ref<::bevy_picking::pointer::Location>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::pointer::Location as ::std::cmp::PartialEq< + ::bevy_picking::pointer::Location, >>::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_picking::events::DragEnter, + ::bevy_picking::pointer::Location, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_drag_functions(world: &mut World) { +pub(crate) fn register_pointer_action_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::Drag, + ::bevy_picking::pointer::PointerAction, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::Drag>| { - let output: Val<::bevy_picking::events::Drag> = { - { - let output: Val<::bevy_picking::events::Drag> = - <::bevy_picking::events::Drag as ::std::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::Drag>, other: Ref<::bevy_picking::events::Drag>| { - let output: bool = { - { - let output: bool = <::bevy_picking::events::Drag as ::std::cmp::PartialEq< - ::bevy_picking::events::Drag, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_picking::pointer::PointerAction>| { + let output: Val<::bevy_picking::pointer::PointerAction> = { + { + let output: Val<::bevy_picking::pointer::PointerAction> = <::bevy_picking::pointer::PointerAction 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_picking::events::Drag, + ::bevy_picking::pointer::PointerAction, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_drag_leave_functions(world: &mut World) { +pub(crate) fn register_drag_entry_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::DragLeave, + ::bevy_picking::events::DragEntry, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::DragLeave>| { - let output: Val<::bevy_picking::events::DragLeave> = { - { - let output: Val<::bevy_picking::events::DragLeave> = - <::bevy_picking::events::DragLeave as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::DragLeave>, - other: Ref<::bevy_picking::events::DragLeave>| { - let output: bool = { - { - let output: bool = - <::bevy_picking::events::DragLeave as ::std::cmp::PartialEq< - ::bevy_picking::events::DragLeave, + .register_documented( + "clone", + |_self: Ref<::bevy_picking::events::DragEntry>| { + let output: Val<::bevy_picking::events::DragEntry> = { + { + let output: Val<::bevy_picking::events::DragEntry> = <::bevy_picking::events::DragEntry as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::events::DragEntry>, + other: Ref<::bevy_picking::events::DragEntry>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::events::DragEntry as ::std::cmp::PartialEq< + ::bevy_picking::events::DragEntry, >>::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_picking::events::DragLeave, + ::bevy_picking::events::DragEntry, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_drag_over_functions(world: &mut World) { +pub(crate) fn register_pointer_interaction_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::DragOver, + ::bevy_picking::pointer::PointerInteraction, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::DragOver>| { - let output: Val<::bevy_picking::events::DragOver> = { - { - let output: Val<::bevy_picking::events::DragOver> = - <::bevy_picking::events::DragOver as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::DragOver>, - other: Ref<::bevy_picking::events::DragOver>| { - let output: bool = { - { - let output: bool = - <::bevy_picking::events::DragOver as ::std::cmp::PartialEq< - ::bevy_picking::events::DragOver, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_picking::pointer::PointerInteraction>| { + let output: Val<::bevy_picking::pointer::PointerInteraction> = { + { + let output: Val<::bevy_picking::pointer::PointerInteraction> = <::bevy_picking::pointer::PointerInteraction 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_picking::events::DragOver, + ::bevy_picking::pointer::PointerInteraction, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_drag_start_functions(world: &mut World) { +pub(crate) fn register_pointer_press_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::DragStart, + ::bevy_picking::pointer::PointerPress, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::DragStart>| { - let output: Val<::bevy_picking::events::DragStart> = { - { - let output: Val<::bevy_picking::events::DragStart> = - <::bevy_picking::events::DragStart as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::DragStart>, - other: Ref<::bevy_picking::events::DragStart>| { - let output: bool = { - { - let output: bool = - <::bevy_picking::events::DragStart as ::std::cmp::PartialEq< - ::bevy_picking::events::DragStart, + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_picking::pointer::PointerPress>| { + let output: () = { + { + let output: () = <::bevy_picking::pointer::PointerPress as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_picking::pointer::PointerPress>| { + let output: Val<::bevy_picking::pointer::PointerPress> = { + { + let output: Val<::bevy_picking::pointer::PointerPress> = <::bevy_picking::pointer::PointerPress as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::pointer::PointerPress>, + other: Ref<::bevy_picking::pointer::PointerPress>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::pointer::PointerPress as ::std::cmp::PartialEq< + ::bevy_picking::pointer::PointerPress, >>::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_picking::events::DragStart, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_move_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::Move, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::Move>| { - let output: Val<::bevy_picking::events::Move> = { - { - let output: Val<::bevy_picking::events::Move> = - <::bevy_picking::events::Move as ::std::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::Move>, other: Ref<::bevy_picking::events::Move>| { - let output: bool = { - { - let output: bool = <::bevy_picking::events::Move as ::std::cmp::PartialEq< - ::bevy_picking::events::Move, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "is_any_pressed", + |_self: Ref<::bevy_picking::pointer::PointerPress>| { + let output: bool = { + { + let output: bool = ::bevy_picking::pointer::PointerPress::is_any_pressed( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns true if any pointer button is pressed.", + &["_self"], + ) + .register_documented( + "is_middle_pressed", + |_self: Ref<::bevy_picking::pointer::PointerPress>| { + let output: bool = { + { + let output: bool = ::bevy_picking::pointer::PointerPress::is_middle_pressed( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns true if the middle (tertiary) pointer button is pressed.", + &["_self"], + ) + .register_documented( + "is_primary_pressed", + |_self: Ref<::bevy_picking::pointer::PointerPress>| { + let output: bool = { + { + let output: bool = ::bevy_picking::pointer::PointerPress::is_primary_pressed( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns true if the primary pointer button is pressed.", + &["_self"], + ) + .register_documented( + "is_secondary_pressed", + |_self: Ref<::bevy_picking::pointer::PointerPress>| { + let output: bool = { + { + let output: bool = ::bevy_picking::pointer::PointerPress::is_secondary_pressed( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns true if the secondary pointer button is pressed.", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::events::Move, + ::bevy_picking::pointer::PointerPress, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_out_functions(world: &mut World) { +pub(crate) fn register_picking_interaction_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::Out, + ::bevy_picking::hover::PickingInteraction, >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_picking::hover::PickingInteraction>| { + let output: () = { + { + let output: () = <::bevy_picking::hover::PickingInteraction as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) .register_documented( "clone", - |_self: Ref<::bevy_picking::events::Out>| { - let output: Val<::bevy_picking::events::Out> = { + |_self: Ref<::bevy_picking::hover::PickingInteraction>| { + let output: Val<::bevy_picking::hover::PickingInteraction> = { { - let output: Val<::bevy_picking::events::Out> = <::bevy_picking::events::Out as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::hover::PickingInteraction> = <::bevy_picking::hover::PickingInteraction as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1486,13 +1799,13 @@ pub(crate) fn register_out_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_picking::events::Out>, - other: Ref<::bevy_picking::events::Out>| + _self: Ref<::bevy_picking::hover::PickingInteraction>, + other: Ref<::bevy_picking::hover::PickingInteraction>| { let output: bool = { { - let output: bool = <::bevy_picking::events::Out as ::std::cmp::PartialEq< - ::bevy_picking::events::Out, + let output: bool = <::bevy_picking::hover::PickingInteraction as ::std::cmp::PartialEq< + ::bevy_picking::hover::PickingInteraction, >>::eq(&_self, &other) .into(); output @@ -1507,333 +1820,184 @@ pub(crate) fn register_out_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::events::Out, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_over_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::Over, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::Over>| { - let output: Val<::bevy_picking::events::Over> = { - { - let output: Val<::bevy_picking::events::Over> = - <::bevy_picking::events::Over as ::std::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::Over>, other: Ref<::bevy_picking::events::Over>| { - let output: bool = { - { - let output: bool = <::bevy_picking::events::Over as ::std::cmp::PartialEq< - ::bevy_picking::events::Over, - >>::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_picking::events::Over, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_released_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::Released, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::Released>| { - let output: Val<::bevy_picking::events::Released> = { - { - let output: Val<::bevy_picking::events::Released> = - <::bevy_picking::events::Released as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::Released>, - other: Ref<::bevy_picking::events::Released>| { - let output: bool = { - { - let output: bool = - <::bevy_picking::events::Released as ::std::cmp::PartialEq< - ::bevy_picking::events::Released, - >>::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_picking::events::Released, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_scroll_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::Scroll, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::Scroll>| { - let output: Val<::bevy_picking::events::Scroll> = { - { - let output: Val<::bevy_picking::events::Scroll> = - <::bevy_picking::events::Scroll as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::Scroll>, other: Ref<::bevy_picking::events::Scroll>| { - let output: bool = { - { - let output: bool = <::bevy_picking::events::Scroll as ::std::cmp::PartialEq< - ::bevy_picking::events::Scroll, - >>::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_picking::events::Scroll, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_hit_data_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::backend::prelude::HitData, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::backend::prelude::HitData>| { - let output: Val<::bevy_picking::backend::prelude::HitData> = { - { - let output: Val<::bevy_picking::backend::prelude::HitData> = - <::bevy_picking::backend::prelude::HitData as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::backend::prelude::HitData>, - other: Ref<::bevy_picking::backend::prelude::HitData>| { - let output: bool = { - { - let output: bool = - <::bevy_picking::backend::prelude::HitData as ::std::cmp::PartialEq< - ::bevy_picking::backend::prelude::HitData, - >>::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_picking::backend::prelude::HitData, + ::bevy_picking::hover::PickingInteraction, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_location_functions(world: &mut World) { +pub(crate) fn register_hovered_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::pointer::Location, + ::bevy_picking::hover::Hovered, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::pointer::Location>| { - let output: Val<::bevy_picking::pointer::Location> = { - { - let output: Val<::bevy_picking::pointer::Location> = - <::bevy_picking::pointer::Location as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::pointer::Location>, - other: Ref<::bevy_picking::pointer::Location>| { - let output: bool = { - { - let output: bool = - <::bevy_picking::pointer::Location as ::std::cmp::PartialEq< - ::bevy_picking::pointer::Location, + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_picking::hover::Hovered>| { + let output: () = { + { + let output: () = <::bevy_picking::hover::Hovered as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_picking::hover::Hovered>| { + let output: Val<::bevy_picking::hover::Hovered> = { + { + let output: Val<::bevy_picking::hover::Hovered> = <::bevy_picking::hover::Hovered as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::hover::Hovered>, + other: Ref<::bevy_picking::hover::Hovered>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::hover::Hovered as ::std::cmp::PartialEq< + ::bevy_picking::hover::Hovered, >>::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_picking::pointer::Location, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_pointer_action_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::pointer::PointerAction, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::pointer::PointerAction>| { - let output: Val<::bevy_picking::pointer::PointerAction> = { - { - let output: Val<::bevy_picking::pointer::PointerAction> = - <::bevy_picking::pointer::PointerAction as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "get", + |_self: Ref<::bevy_picking::hover::Hovered>| { + let output: bool = { + { + let output: bool = ::bevy_picking::hover::Hovered::get(&_self) + .into(); + output + } + }; + output + }, + " Get whether the entity is currently hovered.", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::pointer::PointerAction, + ::bevy_picking::hover::Hovered, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_drag_entry_functions(world: &mut World) { +pub(crate) fn register_directly_hovered_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::events::DragEntry, + ::bevy_picking::hover::DirectlyHovered, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_picking::events::DragEntry>| { - let output: Val<::bevy_picking::events::DragEntry> = { - { - let output: Val<::bevy_picking::events::DragEntry> = - <::bevy_picking::events::DragEntry as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_picking::events::DragEntry>, - other: Ref<::bevy_picking::events::DragEntry>| { - let output: bool = { - { - let output: bool = - <::bevy_picking::events::DragEntry as ::std::cmp::PartialEq< - ::bevy_picking::events::DragEntry, + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_picking::hover::DirectlyHovered>| { + let output: () = { + { + let output: () = <::bevy_picking::hover::DirectlyHovered as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_picking::hover::DirectlyHovered>| { + let output: Val<::bevy_picking::hover::DirectlyHovered> = { + { + let output: Val<::bevy_picking::hover::DirectlyHovered> = <::bevy_picking::hover::DirectlyHovered as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_picking::hover::DirectlyHovered>, + other: Ref<::bevy_picking::hover::DirectlyHovered>| + { + let output: bool = { + { + let output: bool = <::bevy_picking::hover::DirectlyHovered as ::std::cmp::PartialEq< + ::bevy_picking::hover::DirectlyHovered, >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "get", + |_self: Ref<::bevy_picking::hover::DirectlyHovered>| { + let output: bool = { + { + let output: bool = ::bevy_picking::hover::DirectlyHovered::get( + &_self, + ) + .into(); + output + } + }; + output + }, + " Get whether the entity is currently hovered.", + &["_self"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::events::DragEntry, + ::bevy_picking::hover::DirectlyHovered, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_simplified_mesh_functions(world: &mut World) { +pub(crate) fn register_pointer_input_settings_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh, + ::bevy_picking::input::PointerInputSettings, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh>| { - let output: Val< - ::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh, - > = { + |_self: Ref<::bevy_picking::input::PointerInputSettings>| { + let output: Val<::bevy_picking::input::PointerInputSettings> = { { - let output: Val< - ::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh, - > = <::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh as ::std::clone::Clone>::clone( + let output: Val<::bevy_picking::input::PointerInputSettings> = <::bevy_picking::input::PointerInputSettings as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -1849,7 +2013,7 @@ pub(crate) fn register_simplified_mesh_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh, + ::bevy_picking::input::PointerInputSettings, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -1915,6 +2079,39 @@ pub(crate) fn register_backfaces_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_simplified_mesh_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh>| { + let output: Val< + ::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh, + > = { + { + let output: Val< + ::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh, + > = <::bevy_picking::mesh_picking::ray_cast::SimplifiedMesh 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_picking::mesh_picking::ray_cast::SimplifiedMesh, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_press_direction_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_picking::pointer::PressDirection, @@ -1984,25 +2181,19 @@ pub(crate) fn register_press_direction_functions(world: &mut World) { impl Plugin for BevyPickingScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); + register_release_functions(&mut world); register_ray_cast_backfaces_functions(&mut world); register_ray_cast_visibility_functions(&mut world); register_mesh_picking_camera_functions(&mut world); register_mesh_picking_settings_functions(&mut world); - register_pointer_input_plugin_functions(&mut world); register_pointer_button_functions(&mut world); register_pickable_functions(&mut world); - register_picking_plugin_functions(&mut world); + register_picking_settings_functions(&mut world); register_pointer_input_functions(&mut world); register_pointer_hits_functions(&mut world); - register_picking_interaction_functions(&mut world); - register_pointer_id_functions(&mut world); - register_pointer_location_functions(&mut world); - register_pointer_press_functions(&mut world); - register_pointer_interaction_functions(&mut world); - register_ray_id_functions(&mut world); register_cancel_functions(&mut world); register_click_functions(&mut world); - register_pressed_functions(&mut world); + register_press_functions(&mut world); register_drag_drop_functions(&mut world); register_drag_end_functions(&mut world); register_drag_enter_functions(&mut world); @@ -2013,15 +2204,23 @@ impl Plugin for BevyPickingScriptingPlugin { register_move_functions(&mut world); register_out_functions(&mut world); register_over_functions(&mut world); - register_released_functions(&mut world); register_scroll_functions(&mut world); register_hit_data_functions(&mut world); + register_pointer_id_functions(&mut world); + register_pointer_location_functions(&mut world); + register_ray_id_functions(&mut world); register_location_functions(&mut world); register_pointer_action_functions(&mut world); register_drag_entry_functions(&mut world); - register_simplified_mesh_functions(&mut world); + register_pointer_interaction_functions(&mut world); + register_pointer_press_functions(&mut world); + register_picking_interaction_functions(&mut world); + register_hovered_functions(&mut world); + register_directly_hovered_functions(&mut world); + register_pointer_input_settings_functions(&mut world); register_ray_mesh_hit_functions(&mut world); register_backfaces_functions(&mut world); + register_simplified_mesh_functions(&mut world); register_press_direction_functions(&mut world); } } diff --git a/crates/bindings/bevy_post_process_bms_bindings/Cargo.toml b/crates/bindings/bevy_post_process_bms_bindings/Cargo.toml new file mode 100644 index 0000000000..9b6096c2d2 --- /dev/null +++ b/crates/bindings/bevy_post_process_bms_bindings/Cargo.toml @@ -0,0 +1,59 @@ +[package] +name = "bevy_post_process_bms_bindings" +description = "Automatically generated bindings for bevy_post_process crate" +readme = "README.md" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +keywords.workspace = true +categories.workspace = true + +[dependencies] + + +bevy_mod_scripting_core = { workspace = true } +bevy_mod_scripting_bindings = { workspace = true } +bevy_mod_scripting_derive = { workspace = true } +bevy_post_process = { version = "0.17.2", features = [], default-features = true} + + +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} + +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} + +bevy_camera = { version = "^0.17.2", features = [], default-features = true} + +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} + +bevy_core_pipeline = { version = "^0.17.2", features = ["tonemapping_luts", "webgl"], default-features = true} + +bevy_derive = { version = "^0.17.2", features = [], default-features = true} + +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} + +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} + +bevy_render = { version = "^0.17.2", features = ["multi_threaded", "webgl"], default-features = true} + +bevy_shader = { version = "^0.17.2", features = [], default-features = true} + +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} + +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} + +bevy_window = { version = "^0.17.2", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} + +bitflags = { version = "^2.3", features = [], default-features = true} + +nonmax = { version = "^0.5", features = [], default-features = true} + +radsort = { version = "^0.1", features = [], default-features = true} + + diff --git a/crates/bindings/bevy_post_process_bms_bindings/README.md b/crates/bindings/bevy_post_process_bms_bindings/README.md new file mode 100644 index 0000000000..b59cbf9db5 --- /dev/null +++ b/crates/bindings/bevy_post_process_bms_bindings/README.md @@ -0,0 +1,4 @@ +# bevy_post_process bindings +This crate is part of the [bevy_mod_scripting](http://github.com/makspll/bevy_mod_scripting) project. + +The code inside is fully generated via a custom rustc plugin. \ No newline at end of file diff --git a/crates/bindings/bevy_post_process_bms_bindings/src/lib.rs b/crates/bindings/bevy_post_process_bms_bindings/src/lib.rs new file mode 100644 index 0000000000..676f86d74b --- /dev/null +++ b/crates/bindings/bevy_post_process_bms_bindings/src/lib.rs @@ -0,0 +1,365 @@ + +#![allow(clippy::all)] +#![allow(unused, deprecated, dead_code)] + + + +use bevy_mod_scripting_bindings::{ + ReflectReference, + function::{ + from::{Ref, Mut, Val}, + namespace::NamespaceBuilder, + }, +}; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; +use bevy_mod_scripting_derive::script_bindings; +pub struct BevyPostProcessScriptingPlugin; +pub(crate) fn register_auto_exposure_compensation_curve_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_post_process::auto_exposure::AutoExposureCompensationCurve, + >::new(world) + .register_documented( + "clone", + | + _self: Ref< + ::bevy_post_process::auto_exposure::AutoExposureCompensationCurve, + >| + { + let output: Val< + ::bevy_post_process::auto_exposure::AutoExposureCompensationCurve, + > = { + { + let output: Val< + ::bevy_post_process::auto_exposure::AutoExposureCompensationCurve, + > = <::bevy_post_process::auto_exposure::AutoExposureCompensationCurve 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_post_process::auto_exposure::AutoExposureCompensationCurve, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_auto_exposure_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_post_process::auto_exposure::AutoExposure, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_post_process::auto_exposure::AutoExposure>| { + let output: Val<::bevy_post_process::auto_exposure::AutoExposure> = { + { + let output: Val< + ::bevy_post_process::auto_exposure::AutoExposure, + > = <::bevy_post_process::auto_exposure::AutoExposure 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_post_process::auto_exposure::AutoExposure, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_bloom_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_post_process::bloom::Bloom, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_post_process::bloom::Bloom>| { + let output: Val<::bevy_post_process::bloom::Bloom> = { + { + let output: Val<::bevy_post_process::bloom::Bloom> = <::bevy_post_process::bloom::Bloom 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_post_process::bloom::Bloom, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_bloom_composite_mode_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_post_process::bloom::BloomCompositeMode, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_post_process::bloom::BloomCompositeMode>| { + let output: () = { + { + let output: () = <::bevy_post_process::bloom::BloomCompositeMode as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_post_process::bloom::BloomCompositeMode>| { + let output: Val<::bevy_post_process::bloom::BloomCompositeMode> = { + { + let output: Val< + ::bevy_post_process::bloom::BloomCompositeMode, + > = <::bevy_post_process::bloom::BloomCompositeMode as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_post_process::bloom::BloomCompositeMode>, + other: Ref<::bevy_post_process::bloom::BloomCompositeMode>| + { + let output: bool = { + { + let output: bool = <::bevy_post_process::bloom::BloomCompositeMode as ::std::cmp::PartialEq< + ::bevy_post_process::bloom::BloomCompositeMode, + >>::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_post_process::bloom::BloomCompositeMode, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_bloom_prefilter_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_post_process::bloom::BloomPrefilter, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_post_process::bloom::BloomPrefilter>| { + let output: Val<::bevy_post_process::bloom::BloomPrefilter> = { + { + let output: Val<::bevy_post_process::bloom::BloomPrefilter> = <::bevy_post_process::bloom::BloomPrefilter 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_post_process::bloom::BloomPrefilter, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_depth_of_field_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_post_process::dof::DepthOfField, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_post_process::dof::DepthOfField>| { + let output: Val<::bevy_post_process::dof::DepthOfField> = { + { + let output: Val<::bevy_post_process::dof::DepthOfField> = <::bevy_post_process::dof::DepthOfField 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_post_process::dof::DepthOfField, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_depth_of_field_mode_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_post_process::dof::DepthOfFieldMode, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_post_process::dof::DepthOfFieldMode>| { + let output: Val<::bevy_post_process::dof::DepthOfFieldMode> = { + { + let output: Val<::bevy_post_process::dof::DepthOfFieldMode> = <::bevy_post_process::dof::DepthOfFieldMode as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_post_process::dof::DepthOfFieldMode>, + other: Ref<::bevy_post_process::dof::DepthOfFieldMode>| + { + let output: bool = { + { + let output: bool = <::bevy_post_process::dof::DepthOfFieldMode as ::std::cmp::PartialEq< + ::bevy_post_process::dof::DepthOfFieldMode, + >>::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_post_process::dof::DepthOfFieldMode, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_chromatic_aberration_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_post_process::effect_stack::ChromaticAberration, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_post_process::effect_stack::ChromaticAberration>| { + let output: Val< + ::bevy_post_process::effect_stack::ChromaticAberration, + > = { + { + let output: Val< + ::bevy_post_process::effect_stack::ChromaticAberration, + > = <::bevy_post_process::effect_stack::ChromaticAberration 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_post_process::effect_stack::ChromaticAberration, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_motion_blur_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_post_process::motion_blur::MotionBlur, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_post_process::motion_blur::MotionBlur>| { + let output: Val<::bevy_post_process::motion_blur::MotionBlur> = { + { + let output: Val<::bevy_post_process::motion_blur::MotionBlur> = <::bevy_post_process::motion_blur::MotionBlur 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_post_process::motion_blur::MotionBlur, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +impl Plugin for BevyPostProcessScriptingPlugin { + fn build(&self, app: &mut App) { + let mut world = app.world_mut(); + register_auto_exposure_compensation_curve_functions(&mut world); + register_auto_exposure_functions(&mut world); + register_bloom_functions(&mut world); + register_bloom_composite_mode_functions(&mut world); + register_bloom_prefilter_functions(&mut world); + register_depth_of_field_functions(&mut world); + register_depth_of_field_mode_functions(&mut world); + register_chromatic_aberration_functions(&mut world); + register_motion_blur_functions(&mut world); + } +} diff --git a/crates/bindings/bevy_reflect_bms_bindings/Cargo.toml b/crates/bindings/bevy_reflect_bms_bindings/Cargo.toml index 4bf85cf9fb..825d0daa6c 100644 --- a/crates/bindings/bevy_reflect_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_reflect_bms_bindings/Cargo.toml @@ -17,45 +17,31 @@ 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.16.1", features = [ - "glam", - "uuid", - "smol_str", - "std", - "smallvec", - "debug", - "debug_stack", -], default-features = true } +bevy_reflect = { version = "0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -assert_type_match = { version = "^0.1.1", features = [ -], default-features = true } +assert_type_match = { version = "^0.1.1", features = [], default-features = true} -bevy_platform = { version = "^0.16.1", features = [ - "std", -], default-features = false } +bevy_platform = { version = "^0.17.2", features = ["alloc", "serialize", "std"], default-features = true} -bevy_ptr = { version = "^0.16.1", features = [], default-features = true } +bevy_ptr = { version = "^0.17.2", features = [], default-features = true} -bevy_reflect_derive = { version = "^0.16.1", features = [ -], default-features = true } +bevy_reflect_derive = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory"], default-features = true} -bevy_utils = { version = "^0.16.1", features = [ - "std", -], default-features = false } +downcast-rs = { version = "^2", features = ["std"], default-features = false} -downcast-rs = { version = "^2", features = ["std"], default-features = false } +erased-serde = { version = "^0.4", 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.29.3", features = ["std"], default-features = false } +inventory = { version = "^0.3", features = [], default-features = true} -serde = { version = "^1", features = ["std"], default-features = false } +serde = { version = "^1", features = ["std"], default-features = false} -smol_str = { version = "^0.2.0", features = ["std"], default-features = false } +smol_str = { version = "^0.2.0", features = ["std"], default-features = false} + +uuid = { version = "^1.13.1", features = ["std"], default-features = false} + +variadics_please = { version = "^1.1", features = [], default-features = true} -uuid = { version = "^1.13.1", features = ["std"], default-features = false } -variadics_please = { version = "^1.1", features = [], default-features = true } diff --git a/crates/bindings/bevy_reflect_bms_bindings/src/lib.rs b/crates/bindings/bevy_reflect_bms_bindings/src/lib.rs index 109a9035d3..14955f8b95 100644 --- a/crates/bindings/bevy_reflect_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_reflect_bms_bindings/src/lib.rs @@ -58,6 +58,52 @@ pub(crate) fn register_atomic_bool_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } +pub(crate) fn register_atomic_i_8_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::core::sync::atomic::AtomicI8, + >::new(world) + .register_documented( + "into_inner", + |_self: Val<::core::sync::atomic::AtomicI8>| { + let output: i8 = { + { + let output: i8 = ::core::sync::atomic::AtomicI8::into_inner( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicI8;\nlet some_var = AtomicI8::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", + &["_self"], + ) + .register_documented( + "new", + |v: i8| { + let output: Val<::core::sync::atomic::AtomicI8> = { + { + let output: Val<::core::sync::atomic::AtomicI8> = ::core::sync::atomic::AtomicI8::new( + v, + ) + .into(); + output + } + }; + output + }, + " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicI8;\nlet atomic_forty_two = AtomicI8::new(42);\n ```", + &["v"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::core::sync::atomic::AtomicI8, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} pub(crate) fn register_atomic_i_16_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::core::sync::atomic::AtomicI16, @@ -196,16 +242,16 @@ pub(crate) fn register_atomic_i_64_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_atomic_i_8_functions(world: &mut World) { +pub(crate) fn register_atomic_isize_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicI8, + ::core::sync::atomic::AtomicIsize, >::new(world) .register_documented( "into_inner", - |_self: Val<::core::sync::atomic::AtomicI8>| { - let output: i8 = { + |_self: Val<::core::sync::atomic::AtomicIsize>| { + let output: isize = { { - let output: i8 = ::core::sync::atomic::AtomicI8::into_inner( + let output: isize = ::core::sync::atomic::AtomicIsize::into_inner( _self.into_inner(), ) .into(); @@ -214,15 +260,15 @@ pub(crate) fn register_atomic_i_8_functions(world: &mut World) { }; output }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicI8;\nlet some_var = AtomicI8::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", + " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicIsize;\nlet some_var = AtomicIsize::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", &["_self"], ) .register_documented( "new", - |v: i8| { - let output: Val<::core::sync::atomic::AtomicI8> = { + |v: isize| { + let output: Val<::core::sync::atomic::AtomicIsize> = { { - let output: Val<::core::sync::atomic::AtomicI8> = ::core::sync::atomic::AtomicI8::new( + let output: Val<::core::sync::atomic::AtomicIsize> = ::core::sync::atomic::AtomicIsize::new( v, ) .into(); @@ -231,27 +277,27 @@ pub(crate) fn register_atomic_i_8_functions(world: &mut World) { }; output }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicI8;\nlet atomic_forty_two = AtomicI8::new(42);\n ```", + " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicIsize;\nlet atomic_forty_two = AtomicIsize::new(42);\n ```", &["v"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::core::sync::atomic::AtomicI8, + ::core::sync::atomic::AtomicIsize, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_atomic_isize_functions(world: &mut World) { +pub(crate) fn register_atomic_u_8_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicIsize, + ::core::sync::atomic::AtomicU8, >::new(world) .register_documented( "into_inner", - |_self: Val<::core::sync::atomic::AtomicIsize>| { - let output: isize = { + |_self: Val<::core::sync::atomic::AtomicU8>| { + let output: u8 = { { - let output: isize = ::core::sync::atomic::AtomicIsize::into_inner( + let output: u8 = ::core::sync::atomic::AtomicU8::into_inner( _self.into_inner(), ) .into(); @@ -260,15 +306,15 @@ pub(crate) fn register_atomic_isize_functions(world: &mut World) { }; output }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicIsize;\nlet some_var = AtomicIsize::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", + " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicU8;\nlet some_var = AtomicU8::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", &["_self"], ) .register_documented( "new", - |v: isize| { - let output: Val<::core::sync::atomic::AtomicIsize> = { + |v: u8| { + let output: Val<::core::sync::atomic::AtomicU8> = { { - let output: Val<::core::sync::atomic::AtomicIsize> = ::core::sync::atomic::AtomicIsize::new( + let output: Val<::core::sync::atomic::AtomicU8> = ::core::sync::atomic::AtomicU8::new( v, ) .into(); @@ -277,14 +323,14 @@ pub(crate) fn register_atomic_isize_functions(world: &mut World) { }; output }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicIsize;\nlet atomic_forty_two = AtomicIsize::new(42);\n ```", + " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicU8;\nlet atomic_forty_two = AtomicU8::new(42);\n ```", &["v"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::core::sync::atomic::AtomicIsize, + ::core::sync::atomic::AtomicU8, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -426,52 +472,6 @@ pub(crate) fn register_atomic_u_64_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_atomic_u_8_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::core::sync::atomic::AtomicU8, - >::new(world) - .register_documented( - "into_inner", - |_self: Val<::core::sync::atomic::AtomicU8>| { - let output: u8 = { - { - let output: u8 = ::core::sync::atomic::AtomicU8::into_inner( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Consumes the atomic and returns the contained value.\n This is safe because passing `self` by value guarantees that no other threads are\n concurrently accessing the atomic data.\n # Examples\n ```\nuse std::sync::atomic::AtomicU8;\nlet some_var = AtomicU8::new(5);\n assert_eq!(some_var.into_inner(), 5);\n ```", - &["_self"], - ) - .register_documented( - "new", - |v: u8| { - let output: Val<::core::sync::atomic::AtomicU8> = { - { - let output: Val<::core::sync::atomic::AtomicU8> = ::core::sync::atomic::AtomicU8::new( - v, - ) - .into(); - output - } - }; - output - }, - " Creates a new atomic integer.\n # Examples\n ```\nuse std::sync::atomic::AtomicU8;\nlet atomic_forty_two = AtomicU8::new(42);\n ```", - &["v"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::core::sync::atomic::AtomicU8, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} pub(crate) fn register_atomic_usize_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::core::sync::atomic::AtomicUsize, @@ -1418,6 +1418,23 @@ pub(crate) fn register_quat_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two quaternions contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "add", + |_self: Val<::glam::Quat>, rhs: Ref<::glam::Quat>| { + let output: Val<::glam::Quat> = { + { + let output: Val<::glam::Quat> = <::glam::Quat as ::core::ops::Add< + &::glam::Quat, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "add", |_self: Val<::glam::Quat>, rhs: Val<::glam::Quat>| { @@ -1975,6 +1992,131 @@ pub(crate) fn register_quat_functions(world: &mut World) { " Performs a linear interpolation between `self` and `rhs` based on\n the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s`\n is `1.0`, the result will be equal to `rhs`.\n # Panics\n Will panic if `self` or `end` are not normalized when `glam_assert` is enabled.", &["_self", "end", "s"], ) + .register_documented( + "look_at_lh", + |eye: Val<::glam::Vec3>, center: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Quat> = { + { + let output: Val<::glam::Quat> = ::glam::Quat::look_at_lh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a left-handed view matrix using a camera position, a focal point, and an up\n direction.\n For a left-handed view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["eye", "center", "up"], + ) + .register_documented( + "look_at_rh", + |eye: Val<::glam::Vec3>, center: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Quat> = { + { + let output: Val<::glam::Quat> = ::glam::Quat::look_at_rh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed view matrix using a camera position, an up direction, and a focal\n point.\n For a right-handed view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["eye", "center", "up"], + ) + .register_documented( + "look_to_lh", + |dir: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Quat> = { + { + let output: Val<::glam::Quat> = ::glam::Quat::look_to_lh( + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a quaterion rotation from a facing direction and an up direction.\n For a left-handed view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["dir", "up"], + ) + .register_documented( + "look_to_rh", + |dir: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Quat> = { + { + let output: Val<::glam::Quat> = ::glam::Quat::look_to_rh( + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a quaterion rotation from facing direction and an up direction.\n For a right-handed view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `dir` and `up` are not normalized when `glam_assert` is enabled.", + &["dir", "up"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Quat>, rhs: Ref<::glam::Quat>| { + let output: Val<::glam::Quat> = { + { + let output: Val<::glam::Quat> = <::glam::Quat as ::core::ops::Mul< + &::glam::Quat, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Quat>, rhs: Ref<::glam::Vec3>| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = <::glam::Quat as ::core::ops::Mul< + &::glam::Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Quat>, rhs: Ref<::glam::Vec3A>| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = <::glam::Quat as ::core::ops::Mul< + &::glam::Vec3A, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::Quat>, rhs: Val<::glam::Quat>| { @@ -2169,6 +2311,23 @@ pub(crate) fn register_quat_functions(world: &mut World) { " Performs a spherical linear interpolation between `self` and `end`\n based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s`\n is `1.0`, the result will be equal to `end`.\n # Panics\n Will panic if `self` or `end` are not normalized when `glam_assert` is enabled.", &["_self", "end", "s"], ) + .register_documented( + "sub", + |_self: Val<::glam::Quat>, rhs: Ref<::glam::Quat>| { + let output: Val<::glam::Quat> = { + { + let output: Val<::glam::Quat> = <::glam::Quat as ::core::ops::Sub< + &::glam::Quat, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "sub", |_self: Val<::glam::Quat>, rhs: Val<::glam::Quat>| { @@ -2575,7 +2734,7 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { }; output }, - " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", + " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", &["_self", "min", "max"], ) .register_documented( @@ -3163,7 +3322,7 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -3264,7 +3423,7 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for maxNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -3279,7 +3438,24 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { }; output }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", + " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "max_position", + |_self: Val<::glam::Vec3>| { + let output: usize = { + { + let output: usize = ::glam::Vec3::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", &["_self"], ) .register_documented( @@ -3315,7 +3491,7 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for minNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -3330,7 +3506,24 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { }; output }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", + " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "min_position", + |_self: Val<::glam::Vec3>| { + let output: usize = { + { + let output: usize = ::glam::Vec3::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", &["_self"], ) .register_documented( @@ -3468,7 +3661,7 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { }; output }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", + " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n # Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", &["_self"], ) .register_documented( @@ -3719,6 +3912,98 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n [Euclidean division]: f32::rem_euclid", &["_self", "rhs"], ) + .register_documented( + "rotate_axis", + |_self: Val<::glam::Vec3>, axis: Val<::glam::Vec3>, angle: f32| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3::rotate_axis( + _self.into_inner(), + axis.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around `axis` by `angle` (in radians).\n The axis must be a unit vector.\n # Panics\n Will panic if `axis` is not normalized when `glam_assert` is enabled.", + &["_self", "axis", "angle"], + ) + .register_documented( + "rotate_towards", + |_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>, max_angle: f32| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3::rotate_towards( + _self.into_inner(), + rhs.into_inner(), + max_angle, + ) + .into(); + output + } + }; + output + }, + " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be parallel to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.", + &["_self", "rhs", "max_angle"], + ) + .register_documented( + "rotate_x", + |_self: Val<::glam::Vec3>, angle: f32| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3::rotate_x( + _self.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around the x axis by `angle` (in radians).", + &["_self", "angle"], + ) + .register_documented( + "rotate_y", + |_self: Val<::glam::Vec3>, angle: f32| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3::rotate_y( + _self.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around the y axis by `angle` (in radians).", + &["_self", "angle"], + ) + .register_documented( + "rotate_z", + |_self: Val<::glam::Vec3>, angle: f32| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3::rotate_z( + _self.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around the z axis by `angle` (in radians).", + &["_self", "angle"], + ) .register_documented( "round", |_self: Val<::glam::Vec3>| { @@ -3776,6 +4061,25 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { " Returns a vector with elements representing the sign of `self`.\n - `1.0` if the number is positive, `+0.0` or `INFINITY`\n - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n - `NAN` if the number is `NAN`", &["_self"], ) + .register_documented( + "slerp", + |_self: Val<::glam::Vec3>, rhs: Val<::glam::Vec3>, s: f32| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3::slerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .into(); + output + } + }; + output + }, + " Performs a spherical 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( "splat", |v: f32| { @@ -3852,7 +4156,24 @@ pub(crate) fn register_vec_3_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", + &["_self"], + ) + .register_documented( + "to_vec3a", + |_self: Val<::glam::Vec3>| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3::to_vec3a( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", &["_self"], ) .register_documented( @@ -4308,6 +4629,42 @@ pub(crate) fn register_i_vec_2_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>| { + let output: u32 = { + { + let output: u32 = ::glam::IVec2::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::IVec2::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u32::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -4675,7 +5032,7 @@ pub(crate) fn register_i_vec_2_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -4695,6 +5052,24 @@ pub(crate) fn register_i_vec_2_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>| { + let output: u32 = { + { + let output: u32 = ::glam::IVec2::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u32::MAX`].\n See also [`checked_manhattan_distance`][IVec2::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>| { @@ -4710,7 +5085,7 @@ pub(crate) fn register_i_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -4728,6 +5103,23 @@ pub(crate) fn register_i_vec_2_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::IVec2>| { + let output: usize = { + { + let output: usize = ::glam::IVec2::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::IVec2>, rhs: Val<::glam::IVec2>| { @@ -4743,7 +5135,7 @@ pub(crate) fn register_i_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -4761,6 +5153,23 @@ pub(crate) fn register_i_vec_2_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::IVec2>| { + let output: usize = { + { + let output: usize = ::glam::IVec2::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::IVec2>, rhs: Ref<::glam::IVec2>| { @@ -4962,7 +5371,7 @@ pub(crate) fn register_i_vec_2_functions(world: &mut World) { }; output }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", + " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.\n This can be used to rotate by 90 degree increments, e.g. `[sin(90), cos(90)` = `[1, 0]` or\n `[sin(180), cos(180)]` = `[0, -1]`.", &["_self", "rhs"], ) .register_documented( @@ -5189,7 +5598,7 @@ pub(crate) fn register_i_vec_2_functions(world: &mut World) { }; output }, - " `[x, y]`", + " Converts `self` to `[x, y]`", &["_self"], ) .register_documented( @@ -5591,6 +6000,42 @@ pub(crate) fn register_i_vec_3_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>| { + let output: u32 = { + { + let output: u32 = ::glam::IVec3::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::IVec3::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u32::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -5976,7 +6421,7 @@ pub(crate) fn register_i_vec_3_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -5996,6 +6441,24 @@ pub(crate) fn register_i_vec_3_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>| { + let output: u32 = { + { + let output: u32 = ::glam::IVec3::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u32::MAX`].\n See also [`checked_manhattan_distance`][IVec3::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>| { @@ -6011,7 +6474,7 @@ pub(crate) fn register_i_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -6029,6 +6492,23 @@ pub(crate) fn register_i_vec_3_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::IVec3>| { + let output: usize = { + { + let output: usize = ::glam::IVec3::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::IVec3>, rhs: Val<::glam::IVec3>| { @@ -6044,7 +6524,7 @@ pub(crate) fn register_i_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -6062,6 +6542,23 @@ pub(crate) fn register_i_vec_3_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::IVec3>| { + let output: usize = { + { + let output: usize = ::glam::IVec3::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::IVec3>, rhs: Ref<::glam::IVec3>| { @@ -6438,7 +6935,7 @@ pub(crate) fn register_i_vec_3_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", &["_self"], ) .register_documented( @@ -6860,6 +7357,42 @@ pub(crate) fn register_i_vec_4_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>| { + let output: u32 = { + { + let output: u32 = ::glam::IVec4::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::IVec4::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u32::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -7209,7 +7742,7 @@ pub(crate) fn register_i_vec_4_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -7229,6 +7762,24 @@ pub(crate) fn register_i_vec_4_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>| { + let output: u32 = { + { + let output: u32 = ::glam::IVec4::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u32::MAX`].\n See also [`checked_manhattan_distance`][IVec4::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>| { @@ -7244,7 +7795,7 @@ pub(crate) fn register_i_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -7262,6 +7813,23 @@ pub(crate) fn register_i_vec_4_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::IVec4>| { + let output: usize = { + { + let output: usize = ::glam::IVec4::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::IVec4>, rhs: Val<::glam::IVec4>| { @@ -7277,7 +7845,7 @@ pub(crate) fn register_i_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -7295,6 +7863,23 @@ pub(crate) fn register_i_vec_4_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::IVec4>| { + let output: usize = { + { + let output: usize = ::glam::IVec4::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::IVec4>, rhs: Ref<::glam::IVec4>| { @@ -7671,7 +8256,7 @@ pub(crate) fn register_i_vec_4_functions(world: &mut World) { }; output }, - " `[x, y, z, w]`", + " Converts `self` to `[x, y, z, w]`", &["_self"], ) .register_documented( @@ -8109,6 +8694,42 @@ pub(crate) fn register_i_8_vec_2_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>| { + let output: u8 = { + { + let output: u8 = ::glam::I8Vec2::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::I8Vec2::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u8::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -8476,7 +9097,7 @@ pub(crate) fn register_i_8_vec_2_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -8496,6 +9117,24 @@ pub(crate) fn register_i_8_vec_2_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>| { + let output: u8 = { + { + let output: u8 = ::glam::I8Vec2::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u8::MAX`].\n See also [`checked_manhattan_distance`][I8Vec2::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>| { @@ -8511,7 +9150,7 @@ pub(crate) fn register_i_8_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -8529,6 +9168,23 @@ pub(crate) fn register_i_8_vec_2_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::I8Vec2>| { + let output: usize = { + { + let output: usize = ::glam::I8Vec2::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::I8Vec2>, rhs: Val<::glam::I8Vec2>| { @@ -8544,7 +9200,7 @@ pub(crate) fn register_i_8_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -8562,6 +9218,23 @@ pub(crate) fn register_i_8_vec_2_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::I8Vec2>| { + let output: usize = { + { + let output: usize = ::glam::I8Vec2::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::I8Vec2>, rhs: Ref<::glam::I8Vec2>| { @@ -8764,7 +9437,7 @@ pub(crate) fn register_i_8_vec_2_functions(world: &mut World) { }; output }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", + " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.\n This can be used to rotate by 90 degree increments, e.g. `[sin(90), cos(90)` = `[1, 0]` or\n `[sin(180), cos(180)]` = `[0, -1]`.", &["_self", "rhs"], ) .register_documented( @@ -8992,7 +9665,7 @@ pub(crate) fn register_i_8_vec_2_functions(world: &mut World) { }; output }, - " `[x, y]`", + " Converts `self` to `[x, y]`", &["_self"], ) .register_documented( @@ -9392,6 +10065,42 @@ pub(crate) fn register_i_8_vec_3_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>| { + let output: u8 = { + { + let output: u8 = ::glam::I8Vec3::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::I8Vec3::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u8::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -9777,7 +10486,7 @@ pub(crate) fn register_i_8_vec_3_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -9797,6 +10506,24 @@ pub(crate) fn register_i_8_vec_3_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>| { + let output: u8 = { + { + let output: u8 = ::glam::I8Vec3::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u8::MAX`].\n See also [`checked_manhattan_distance`][I8Vec3::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>| { @@ -9812,7 +10539,7 @@ pub(crate) fn register_i_8_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -9830,6 +10557,23 @@ pub(crate) fn register_i_8_vec_3_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::I8Vec3>| { + let output: usize = { + { + let output: usize = ::glam::I8Vec3::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::I8Vec3>, rhs: Val<::glam::I8Vec3>| { @@ -9845,7 +10589,7 @@ pub(crate) fn register_i_8_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -9863,6 +10607,23 @@ pub(crate) fn register_i_8_vec_3_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::I8Vec3>| { + let output: usize = { + { + let output: usize = ::glam::I8Vec3::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::I8Vec3>, rhs: Ref<::glam::I8Vec3>| { @@ -10240,7 +11001,7 @@ pub(crate) fn register_i_8_vec_3_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", &["_self"], ) .register_documented( @@ -10660,6 +11421,42 @@ pub(crate) fn register_i_8_vec_4_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>| { + let output: u8 = { + { + let output: u8 = ::glam::I8Vec4::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::I8Vec4::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u8::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -11009,7 +11806,7 @@ pub(crate) fn register_i_8_vec_4_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -11029,6 +11826,24 @@ pub(crate) fn register_i_8_vec_4_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>| { + let output: u8 = { + { + let output: u8 = ::glam::I8Vec4::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u8::MAX`].\n See also [`checked_manhattan_distance`][I8Vec4::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>| { @@ -11044,7 +11859,7 @@ pub(crate) fn register_i_8_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -11062,6 +11877,23 @@ pub(crate) fn register_i_8_vec_4_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::I8Vec4>| { + let output: usize = { + { + let output: usize = ::glam::I8Vec4::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::I8Vec4>, rhs: Val<::glam::I8Vec4>| { @@ -11077,7 +11909,7 @@ pub(crate) fn register_i_8_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -11095,6 +11927,23 @@ pub(crate) fn register_i_8_vec_4_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::I8Vec4>| { + let output: usize = { + { + let output: usize = ::glam::I8Vec4::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::I8Vec4>, rhs: Ref<::glam::I8Vec4>| { @@ -11472,7 +12321,7 @@ pub(crate) fn register_i_8_vec_4_functions(world: &mut World) { }; output }, - " `[x, y, z, w]`", + " Converts `self` to `[x, y, z, w]`", &["_self"], ) .register_documented( @@ -11916,6 +12765,42 @@ pub(crate) fn register_i_16_vec_2_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::I16Vec2>, rhs: Val<::glam::I16Vec2>| { + let output: u16 = { + { + let output: u16 = ::glam::I16Vec2::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::I16Vec2>, rhs: Val<::glam::I16Vec2>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::I16Vec2::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u16::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -12285,7 +13170,7 @@ pub(crate) fn register_i_16_vec_2_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -12305,6 +13190,24 @@ pub(crate) fn register_i_16_vec_2_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::I16Vec2>, rhs: Val<::glam::I16Vec2>| { + let output: u16 = { + { + let output: u16 = ::glam::I16Vec2::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u16::MAX`].\n See also [`checked_manhattan_distance`][I16Vec2::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::I16Vec2>, rhs: Val<::glam::I16Vec2>| { @@ -12320,7 +13223,7 @@ pub(crate) fn register_i_16_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -12340,6 +13243,23 @@ pub(crate) fn register_i_16_vec_2_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::I16Vec2>| { + let output: usize = { + { + let output: usize = ::glam::I16Vec2::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::I16Vec2>, rhs: Val<::glam::I16Vec2>| { @@ -12355,7 +13275,7 @@ pub(crate) fn register_i_16_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -12375,6 +13295,23 @@ pub(crate) fn register_i_16_vec_2_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::I16Vec2>| { + let output: usize = { + { + let output: usize = ::glam::I16Vec2::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::I16Vec2>, rhs: Ref<::glam::I16Vec2>| { @@ -12577,7 +13514,7 @@ pub(crate) fn register_i_16_vec_2_functions(world: &mut World) { }; output }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", + " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.\n This can be used to rotate by 90 degree increments, e.g. `[sin(90), cos(90)` = `[1, 0]` or\n `[sin(180), cos(180)]` = `[0, -1]`.", &["_self", "rhs"], ) .register_documented( @@ -12805,7 +13742,7 @@ pub(crate) fn register_i_16_vec_2_functions(world: &mut World) { }; output }, - " `[x, y]`", + " Converts `self` to `[x, y]`", &["_self"], ) .register_documented( @@ -13213,6 +14150,42 @@ pub(crate) fn register_i_16_vec_3_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::I16Vec3>, rhs: Val<::glam::I16Vec3>| { + let output: u16 = { + { + let output: u16 = ::glam::I16Vec3::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::I16Vec3>, rhs: Val<::glam::I16Vec3>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::I16Vec3::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u16::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -13600,7 +14573,7 @@ pub(crate) fn register_i_16_vec_3_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -13620,6 +14593,24 @@ pub(crate) fn register_i_16_vec_3_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::I16Vec3>, rhs: Val<::glam::I16Vec3>| { + let output: u16 = { + { + let output: u16 = ::glam::I16Vec3::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u16::MAX`].\n See also [`checked_manhattan_distance`][I16Vec3::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::I16Vec3>, rhs: Val<::glam::I16Vec3>| { @@ -13635,7 +14626,7 @@ pub(crate) fn register_i_16_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -13655,6 +14646,23 @@ pub(crate) fn register_i_16_vec_3_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::I16Vec3>| { + let output: usize = { + { + let output: usize = ::glam::I16Vec3::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::I16Vec3>, rhs: Val<::glam::I16Vec3>| { @@ -13670,7 +14678,7 @@ pub(crate) fn register_i_16_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -13690,6 +14698,23 @@ pub(crate) fn register_i_16_vec_3_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::I16Vec3>| { + let output: usize = { + { + let output: usize = ::glam::I16Vec3::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::I16Vec3>, rhs: Ref<::glam::I16Vec3>| { @@ -14067,7 +15092,7 @@ pub(crate) fn register_i_16_vec_3_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", &["_self"], ) .register_documented( @@ -14493,6 +15518,42 @@ pub(crate) fn register_i_16_vec_4_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::I16Vec4>, rhs: Val<::glam::I16Vec4>| { + let output: u16 = { + { + let output: u16 = ::glam::I16Vec4::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::I16Vec4>, rhs: Val<::glam::I16Vec4>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::I16Vec4::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u16::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -14844,7 +15905,7 @@ pub(crate) fn register_i_16_vec_4_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -14864,6 +15925,24 @@ pub(crate) fn register_i_16_vec_4_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::I16Vec4>, rhs: Val<::glam::I16Vec4>| { + let output: u16 = { + { + let output: u16 = ::glam::I16Vec4::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u16::MAX`].\n See also [`checked_manhattan_distance`][I16Vec4::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::I16Vec4>, rhs: Val<::glam::I16Vec4>| { @@ -14879,7 +15958,7 @@ pub(crate) fn register_i_16_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -14899,6 +15978,23 @@ pub(crate) fn register_i_16_vec_4_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::I16Vec4>| { + let output: usize = { + { + let output: usize = ::glam::I16Vec4::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::I16Vec4>, rhs: Val<::glam::I16Vec4>| { @@ -14914,7 +16010,7 @@ pub(crate) fn register_i_16_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -14934,6 +16030,23 @@ pub(crate) fn register_i_16_vec_4_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::I16Vec4>| { + let output: usize = { + { + let output: usize = ::glam::I16Vec4::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::I16Vec4>, rhs: Ref<::glam::I16Vec4>| { @@ -15316,7 +16429,7 @@ pub(crate) fn register_i_16_vec_4_functions(world: &mut World) { }; output }, - " `[x, y, z, w]`", + " Converts `self` to `[x, y, z, w]`", &["_self"], ) .register_documented( @@ -15760,6 +16873,42 @@ pub(crate) fn register_i_64_vec_2_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::I64Vec2>, rhs: Val<::glam::I64Vec2>| { + let output: u64 = { + { + let output: u64 = ::glam::I64Vec2::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::I64Vec2>, rhs: Val<::glam::I64Vec2>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::I64Vec2::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u64::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -16129,7 +17278,7 @@ pub(crate) fn register_i_64_vec_2_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -16149,6 +17298,24 @@ pub(crate) fn register_i_64_vec_2_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::I64Vec2>, rhs: Val<::glam::I64Vec2>| { + let output: u64 = { + { + let output: u64 = ::glam::I64Vec2::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u64::MAX`].\n See also [`checked_manhattan_distance`][I64Vec2::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::I64Vec2>, rhs: Val<::glam::I64Vec2>| { @@ -16164,7 +17331,7 @@ pub(crate) fn register_i_64_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -16184,6 +17351,23 @@ pub(crate) fn register_i_64_vec_2_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::I64Vec2>| { + let output: usize = { + { + let output: usize = ::glam::I64Vec2::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::I64Vec2>, rhs: Val<::glam::I64Vec2>| { @@ -16199,7 +17383,7 @@ pub(crate) fn register_i_64_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -16219,6 +17403,23 @@ pub(crate) fn register_i_64_vec_2_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::I64Vec2>| { + let output: usize = { + { + let output: usize = ::glam::I64Vec2::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::I64Vec2>, rhs: Ref<::glam::I64Vec2>| { @@ -16421,7 +17622,7 @@ pub(crate) fn register_i_64_vec_2_functions(world: &mut World) { }; output }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", + " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.\n This can be used to rotate by 90 degree increments, e.g. `[sin(90), cos(90)` = `[1, 0]` or\n `[sin(180), cos(180)]` = `[0, -1]`.", &["_self", "rhs"], ) .register_documented( @@ -16649,7 +17850,7 @@ pub(crate) fn register_i_64_vec_2_functions(world: &mut World) { }; output }, - " `[x, y]`", + " Converts `self` to `[x, y]`", &["_self"], ) .register_documented( @@ -17057,6 +18258,42 @@ pub(crate) fn register_i_64_vec_3_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::I64Vec3>, rhs: Val<::glam::I64Vec3>| { + let output: u64 = { + { + let output: u64 = ::glam::I64Vec3::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::I64Vec3>, rhs: Val<::glam::I64Vec3>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::I64Vec3::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u64::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -17444,7 +18681,7 @@ pub(crate) fn register_i_64_vec_3_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -17464,6 +18701,24 @@ pub(crate) fn register_i_64_vec_3_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::I64Vec3>, rhs: Val<::glam::I64Vec3>| { + let output: u64 = { + { + let output: u64 = ::glam::I64Vec3::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u64::MAX`].\n See also [`checked_manhattan_distance`][I64Vec3::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::I64Vec3>, rhs: Val<::glam::I64Vec3>| { @@ -17479,7 +18734,7 @@ pub(crate) fn register_i_64_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -17499,6 +18754,23 @@ pub(crate) fn register_i_64_vec_3_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::I64Vec3>| { + let output: usize = { + { + let output: usize = ::glam::I64Vec3::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::I64Vec3>, rhs: Val<::glam::I64Vec3>| { @@ -17514,7 +18786,7 @@ pub(crate) fn register_i_64_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -17534,6 +18806,23 @@ pub(crate) fn register_i_64_vec_3_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::I64Vec3>| { + let output: usize = { + { + let output: usize = ::glam::I64Vec3::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::I64Vec3>, rhs: Ref<::glam::I64Vec3>| { @@ -17911,7 +19200,7 @@ pub(crate) fn register_i_64_vec_3_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", &["_self"], ) .register_documented( @@ -18337,6 +19626,42 @@ pub(crate) fn register_i_64_vec_4_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::I64Vec4>, rhs: Val<::glam::I64Vec4>| { + let output: u64 = { + { + let output: u64 = ::glam::I64Vec4::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::I64Vec4>, rhs: Val<::glam::I64Vec4>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::I64Vec4::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u64::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -18688,7 +20013,7 @@ pub(crate) fn register_i_64_vec_4_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -18708,6 +20033,24 @@ pub(crate) fn register_i_64_vec_4_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::I64Vec4>, rhs: Val<::glam::I64Vec4>| { + let output: u64 = { + { + let output: u64 = ::glam::I64Vec4::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u64::MAX`].\n See also [`checked_manhattan_distance`][I64Vec4::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::I64Vec4>, rhs: Val<::glam::I64Vec4>| { @@ -18723,7 +20066,7 @@ pub(crate) fn register_i_64_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -18743,6 +20086,23 @@ pub(crate) fn register_i_64_vec_4_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::I64Vec4>| { + let output: usize = { + { + let output: usize = ::glam::I64Vec4::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::I64Vec4>, rhs: Val<::glam::I64Vec4>| { @@ -18758,7 +20118,7 @@ pub(crate) fn register_i_64_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -18778,6 +20138,23 @@ pub(crate) fn register_i_64_vec_4_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::I64Vec4>| { + let output: usize = { + { + let output: usize = ::glam::I64Vec4::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::I64Vec4>, rhs: Ref<::glam::I64Vec4>| { @@ -19160,7 +20537,7 @@ pub(crate) fn register_i_64_vec_4_functions(world: &mut World) { }; output }, - " `[x, y, z, w]`", + " Converts `self` to `[x, y, z, w]`", &["_self"], ) .register_documented( @@ -19583,6 +20960,42 @@ pub(crate) fn register_u_vec_2_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>| { + let output: u32 = { + { + let output: u32 = ::glam::UVec2::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::UVec2::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u32::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -19917,6 +21330,24 @@ pub(crate) fn register_u_vec_2_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>| { + let output: u32 = { + { + let output: u32 = ::glam::UVec2::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u32::MAX`].\n See also [`checked_manhattan_distance`][UVec2::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>| { @@ -19932,7 +21363,7 @@ pub(crate) fn register_u_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -19950,6 +21381,23 @@ pub(crate) fn register_u_vec_2_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::UVec2>| { + let output: usize = { + { + let output: usize = ::glam::UVec2::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::UVec2>, rhs: Val<::glam::UVec2>| { @@ -19965,7 +21413,7 @@ pub(crate) fn register_u_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -19983,6 +21431,23 @@ pub(crate) fn register_u_vec_2_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::UVec2>| { + let output: usize = { + { + let output: usize = ::glam::UVec2::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::UVec2>, rhs: Ref<::glam::UVec2>| { @@ -20288,7 +21753,7 @@ pub(crate) fn register_u_vec_2_functions(world: &mut World) { }; output }, - " `[x, y]`", + " Converts `self` to `[x, y]`", &["_self"], ) .register_documented( @@ -20655,6 +22120,42 @@ pub(crate) fn register_u_vec_3_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>| { + let output: u32 = { + { + let output: u32 = ::glam::UVec3::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::UVec3::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u32::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -21007,6 +22508,24 @@ pub(crate) fn register_u_vec_3_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>| { + let output: u32 = { + { + let output: u32 = ::glam::UVec3::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u32::MAX`].\n See also [`checked_manhattan_distance`][UVec3::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>| { @@ -21022,7 +22541,7 @@ pub(crate) fn register_u_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -21040,6 +22559,23 @@ pub(crate) fn register_u_vec_3_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::UVec3>| { + let output: usize = { + { + let output: usize = ::glam::UVec3::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::UVec3>, rhs: Val<::glam::UVec3>| { @@ -21055,7 +22591,7 @@ pub(crate) fn register_u_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -21073,6 +22609,23 @@ pub(crate) fn register_u_vec_3_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::UVec3>| { + let output: usize = { + { + let output: usize = ::glam::UVec3::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::UVec3>, rhs: Ref<::glam::UVec3>| { @@ -21379,7 +22932,7 @@ pub(crate) fn register_u_vec_3_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", &["_self"], ) .register_documented( @@ -21766,6 +23319,42 @@ pub(crate) fn register_u_vec_4_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>| { + let output: u32 = { + { + let output: u32 = ::glam::UVec4::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::UVec4::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u32::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -22082,6 +23671,24 @@ pub(crate) fn register_u_vec_4_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>| { + let output: u32 = { + { + let output: u32 = ::glam::UVec4::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u32::MAX`].\n See also [`checked_manhattan_distance`][UVec4::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>| { @@ -22097,7 +23704,7 @@ pub(crate) fn register_u_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -22115,6 +23722,23 @@ pub(crate) fn register_u_vec_4_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::UVec4>| { + let output: usize = { + { + let output: usize = ::glam::UVec4::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::UVec4>, rhs: Val<::glam::UVec4>| { @@ -22130,7 +23754,7 @@ pub(crate) fn register_u_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -22148,6 +23772,23 @@ pub(crate) fn register_u_vec_4_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::UVec4>| { + let output: usize = { + { + let output: usize = ::glam::UVec4::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::UVec4>, rhs: Ref<::glam::UVec4>| { @@ -22454,7 +24095,7 @@ pub(crate) fn register_u_vec_4_functions(world: &mut World) { }; output }, - " `[x, y, z, w]`", + " Converts `self` to `[x, y, z, w]`", &["_self"], ) .register_documented( @@ -22857,6 +24498,42 @@ pub(crate) fn register_u_8_vec_2_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>| { + let output: u8 = { + { + let output: u8 = ::glam::U8Vec2::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::U8Vec2::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u8::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -23191,6 +24868,24 @@ pub(crate) fn register_u_8_vec_2_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>| { + let output: u8 = { + { + let output: u8 = ::glam::U8Vec2::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u8::MAX`].\n See also [`checked_manhattan_distance`][U8Vec2::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>| { @@ -23206,7 +24901,7 @@ pub(crate) fn register_u_8_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -23224,6 +24919,23 @@ pub(crate) fn register_u_8_vec_2_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::U8Vec2>| { + let output: usize = { + { + let output: usize = ::glam::U8Vec2::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::U8Vec2>, rhs: Val<::glam::U8Vec2>| { @@ -23239,7 +24951,7 @@ pub(crate) fn register_u_8_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -23257,6 +24969,23 @@ pub(crate) fn register_u_8_vec_2_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::U8Vec2>| { + let output: usize = { + { + let output: usize = ::glam::U8Vec2::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::U8Vec2>, rhs: Ref<::glam::U8Vec2>| { @@ -23564,7 +25293,7 @@ pub(crate) fn register_u_8_vec_2_functions(world: &mut World) { }; output }, - " `[x, y]`", + " Converts `self` to `[x, y]`", &["_self"], ) .register_documented( @@ -23929,6 +25658,42 @@ pub(crate) fn register_u_8_vec_3_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>| { + let output: u8 = { + { + let output: u8 = ::glam::U8Vec3::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::U8Vec3::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u8::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -24281,6 +26046,24 @@ pub(crate) fn register_u_8_vec_3_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>| { + let output: u8 = { + { + let output: u8 = ::glam::U8Vec3::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u8::MAX`].\n See also [`checked_manhattan_distance`][U8Vec3::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>| { @@ -24296,7 +26079,7 @@ pub(crate) fn register_u_8_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -24314,6 +26097,23 @@ pub(crate) fn register_u_8_vec_3_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::U8Vec3>| { + let output: usize = { + { + let output: usize = ::glam::U8Vec3::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::U8Vec3>, rhs: Val<::glam::U8Vec3>| { @@ -24329,7 +26129,7 @@ pub(crate) fn register_u_8_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -24347,6 +26147,23 @@ pub(crate) fn register_u_8_vec_3_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::U8Vec3>| { + let output: usize = { + { + let output: usize = ::glam::U8Vec3::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::U8Vec3>, rhs: Ref<::glam::U8Vec3>| { @@ -24654,7 +26471,7 @@ pub(crate) fn register_u_8_vec_3_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", &["_self"], ) .register_documented( @@ -25039,6 +26856,42 @@ pub(crate) fn register_u_8_vec_4_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>| { + let output: u8 = { + { + let output: u8 = ::glam::U8Vec4::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::U8Vec4::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u8::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -25355,6 +27208,24 @@ pub(crate) fn register_u_8_vec_4_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>| { + let output: u8 = { + { + let output: u8 = ::glam::U8Vec4::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u8::MAX`].\n See also [`checked_manhattan_distance`][U8Vec4::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>| { @@ -25370,7 +27241,7 @@ pub(crate) fn register_u_8_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -25388,6 +27259,23 @@ pub(crate) fn register_u_8_vec_4_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::U8Vec4>| { + let output: usize = { + { + let output: usize = ::glam::U8Vec4::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::U8Vec4>, rhs: Val<::glam::U8Vec4>| { @@ -25403,7 +27291,7 @@ pub(crate) fn register_u_8_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -25421,6 +27309,23 @@ pub(crate) fn register_u_8_vec_4_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::U8Vec4>| { + let output: usize = { + { + let output: usize = ::glam::U8Vec4::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::U8Vec4>, rhs: Ref<::glam::U8Vec4>| { @@ -25728,7 +27633,7 @@ pub(crate) fn register_u_8_vec_4_functions(world: &mut World) { }; output }, - " `[x, y, z, w]`", + " Converts `self` to `[x, y, z, w]`", &["_self"], ) .register_documented( @@ -26137,6 +28042,42 @@ pub(crate) fn register_u_16_vec_2_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::U16Vec2>, rhs: Val<::glam::U16Vec2>| { + let output: u16 = { + { + let output: u16 = ::glam::U16Vec2::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::U16Vec2>, rhs: Val<::glam::U16Vec2>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::U16Vec2::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u16::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -26473,6 +28414,24 @@ pub(crate) fn register_u_16_vec_2_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::U16Vec2>, rhs: Val<::glam::U16Vec2>| { + let output: u16 = { + { + let output: u16 = ::glam::U16Vec2::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u16::MAX`].\n See also [`checked_manhattan_distance`][U16Vec2::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::U16Vec2>, rhs: Val<::glam::U16Vec2>| { @@ -26488,7 +28447,7 @@ pub(crate) fn register_u_16_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -26508,6 +28467,23 @@ pub(crate) fn register_u_16_vec_2_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::U16Vec2>| { + let output: usize = { + { + let output: usize = ::glam::U16Vec2::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::U16Vec2>, rhs: Val<::glam::U16Vec2>| { @@ -26523,7 +28499,7 @@ pub(crate) fn register_u_16_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -26543,6 +28519,23 @@ pub(crate) fn register_u_16_vec_2_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::U16Vec2>| { + let output: usize = { + { + let output: usize = ::glam::U16Vec2::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::U16Vec2>, rhs: Ref<::glam::U16Vec2>| { @@ -26850,7 +28843,7 @@ pub(crate) fn register_u_16_vec_2_functions(world: &mut World) { }; output }, - " `[x, y]`", + " Converts `self` to `[x, y]`", &["_self"], ) .register_documented( @@ -27223,6 +29216,42 @@ pub(crate) fn register_u_16_vec_3_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::U16Vec3>, rhs: Val<::glam::U16Vec3>| { + let output: u16 = { + { + let output: u16 = ::glam::U16Vec3::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::U16Vec3>, rhs: Val<::glam::U16Vec3>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::U16Vec3::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u16::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -27577,6 +29606,24 @@ pub(crate) fn register_u_16_vec_3_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::U16Vec3>, rhs: Val<::glam::U16Vec3>| { + let output: u16 = { + { + let output: u16 = ::glam::U16Vec3::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u16::MAX`].\n See also [`checked_manhattan_distance`][U16Vec3::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::U16Vec3>, rhs: Val<::glam::U16Vec3>| { @@ -27592,7 +29639,7 @@ pub(crate) fn register_u_16_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -27612,6 +29659,23 @@ pub(crate) fn register_u_16_vec_3_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::U16Vec3>| { + let output: usize = { + { + let output: usize = ::glam::U16Vec3::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::U16Vec3>, rhs: Val<::glam::U16Vec3>| { @@ -27627,7 +29691,7 @@ pub(crate) fn register_u_16_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -27647,6 +29711,23 @@ pub(crate) fn register_u_16_vec_3_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::U16Vec3>| { + let output: usize = { + { + let output: usize = ::glam::U16Vec3::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::U16Vec3>, rhs: Ref<::glam::U16Vec3>| { @@ -27954,7 +30035,7 @@ pub(crate) fn register_u_16_vec_3_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", &["_self"], ) .register_documented( @@ -28345,6 +30426,42 @@ pub(crate) fn register_u_16_vec_4_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::U16Vec4>, rhs: Val<::glam::U16Vec4>| { + let output: u16 = { + { + let output: u16 = ::glam::U16Vec4::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::U16Vec4>, rhs: Val<::glam::U16Vec4>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::U16Vec4::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u16::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -28663,6 +30780,24 @@ pub(crate) fn register_u_16_vec_4_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::U16Vec4>, rhs: Val<::glam::U16Vec4>| { + let output: u16 = { + { + let output: u16 = ::glam::U16Vec4::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u16::MAX`].\n See also [`checked_manhattan_distance`][U16Vec4::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::U16Vec4>, rhs: Val<::glam::U16Vec4>| { @@ -28678,7 +30813,7 @@ pub(crate) fn register_u_16_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -28698,6 +30833,23 @@ pub(crate) fn register_u_16_vec_4_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::U16Vec4>| { + let output: usize = { + { + let output: usize = ::glam::U16Vec4::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::U16Vec4>, rhs: Val<::glam::U16Vec4>| { @@ -28713,7 +30865,7 @@ pub(crate) fn register_u_16_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -28733,6 +30885,23 @@ pub(crate) fn register_u_16_vec_4_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::U16Vec4>| { + let output: usize = { + { + let output: usize = ::glam::U16Vec4::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::U16Vec4>, rhs: Ref<::glam::U16Vec4>| { @@ -29045,7 +31214,7 @@ pub(crate) fn register_u_16_vec_4_functions(world: &mut World) { }; output }, - " `[x, y, z, w]`", + " Converts `self` to `[x, y, z, w]`", &["_self"], ) .register_documented( @@ -29454,6 +31623,42 @@ pub(crate) fn register_u_64_vec_2_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::U64Vec2>, rhs: Val<::glam::U64Vec2>| { + let output: u64 = { + { + let output: u64 = ::glam::U64Vec2::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::U64Vec2>, rhs: Val<::glam::U64Vec2>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::U64Vec2::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u64::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -29790,6 +31995,24 @@ pub(crate) fn register_u_64_vec_2_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::U64Vec2>, rhs: Val<::glam::U64Vec2>| { + let output: u64 = { + { + let output: u64 = ::glam::U64Vec2::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u64::MAX`].\n See also [`checked_manhattan_distance`][U64Vec2::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::U64Vec2>, rhs: Val<::glam::U64Vec2>| { @@ -29805,7 +32028,7 @@ pub(crate) fn register_u_64_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -29825,6 +32048,23 @@ pub(crate) fn register_u_64_vec_2_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::U64Vec2>| { + let output: usize = { + { + let output: usize = ::glam::U64Vec2::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::U64Vec2>, rhs: Val<::glam::U64Vec2>| { @@ -29840,7 +32080,7 @@ pub(crate) fn register_u_64_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -29860,6 +32100,23 @@ pub(crate) fn register_u_64_vec_2_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::U64Vec2>| { + let output: usize = { + { + let output: usize = ::glam::U64Vec2::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::U64Vec2>, rhs: Ref<::glam::U64Vec2>| { @@ -30167,7 +32424,7 @@ pub(crate) fn register_u_64_vec_2_functions(world: &mut World) { }; output }, - " `[x, y]`", + " Converts `self` to `[x, y]`", &["_self"], ) .register_documented( @@ -30540,6 +32797,42 @@ pub(crate) fn register_u_64_vec_3_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::U64Vec3>, rhs: Val<::glam::U64Vec3>| { + let output: u64 = { + { + let output: u64 = ::glam::U64Vec3::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::U64Vec3>, rhs: Val<::glam::U64Vec3>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::U64Vec3::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u64::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -30894,6 +33187,24 @@ pub(crate) fn register_u_64_vec_3_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::U64Vec3>, rhs: Val<::glam::U64Vec3>| { + let output: u64 = { + { + let output: u64 = ::glam::U64Vec3::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u64::MAX`].\n See also [`checked_manhattan_distance`][U64Vec3::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::U64Vec3>, rhs: Val<::glam::U64Vec3>| { @@ -30909,7 +33220,7 @@ pub(crate) fn register_u_64_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -30929,6 +33240,23 @@ pub(crate) fn register_u_64_vec_3_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::U64Vec3>| { + let output: usize = { + { + let output: usize = ::glam::U64Vec3::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::U64Vec3>, rhs: Val<::glam::U64Vec3>| { @@ -30944,7 +33272,7 @@ pub(crate) fn register_u_64_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -30964,6 +33292,23 @@ pub(crate) fn register_u_64_vec_3_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::U64Vec3>| { + let output: usize = { + { + let output: usize = ::glam::U64Vec3::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::U64Vec3>, rhs: Ref<::glam::U64Vec3>| { @@ -31271,7 +33616,7 @@ pub(crate) fn register_u_64_vec_3_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", &["_self"], ) .register_documented( @@ -31662,6 +34007,42 @@ pub(crate) fn register_u_64_vec_4_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "chebyshev_distance", + |_self: Val<::glam::U64Vec4>, rhs: Val<::glam::U64Vec4>| { + let output: u64 = { + { + let output: u64 = ::glam::U64Vec4::chebyshev_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [chebyshev distance] between two points.\n [chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance", + &["_self", "rhs"], + ) + .register_documented( + "checked_manhattan_distance", + |_self: Val<::glam::U64Vec4>, rhs: Val<::glam::U64Vec4>| { + let output: ::core::option::Option = { + { + let output: ::core::option::Option = ::glam::U64Vec4::checked_manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n This will returns [`None`] if the result is greater than [`u64::MAX`].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "clamp", | @@ -31980,6 +34361,24 @@ pub(crate) fn register_u_64_vec_4_functions(world: &mut World) { " Computes the squared length of `self`.", &["_self"], ) + .register_documented( + "manhattan_distance", + |_self: Val<::glam::U64Vec4>, rhs: Val<::glam::U64Vec4>| { + let output: u64 = { + { + let output: u64 = ::glam::U64Vec4::manhattan_distance( + _self.into_inner(), + rhs.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Computes the [manhattan distance] between two points.\n # Overflow\n This method may overflow if the result is greater than [`u64::MAX`].\n See also [`checked_manhattan_distance`][U64Vec4::checked_manhattan_distance].\n [manhattan distance]: https://en.wikipedia.org/wiki/Taxicab_geometry", + &["_self", "rhs"], + ) .register_documented( "max", |_self: Val<::glam::U64Vec4>, rhs: Val<::glam::U64Vec4>| { @@ -31995,7 +34394,7 @@ pub(crate) fn register_u_64_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -32015,6 +34414,23 @@ pub(crate) fn register_u_64_vec_4_functions(world: &mut World) { " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", &["_self"], ) + .register_documented( + "max_position", + |_self: Val<::glam::U64Vec4>| { + let output: usize = { + { + let output: usize = ::glam::U64Vec4::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", + &["_self"], + ) .register_documented( "min", |_self: Val<::glam::U64Vec4>, rhs: Val<::glam::U64Vec4>| { @@ -32030,7 +34446,7 @@ pub(crate) fn register_u_64_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.", &["_self", "rhs"], ) .register_documented( @@ -32050,6 +34466,23 @@ pub(crate) fn register_u_64_vec_4_functions(world: &mut World) { " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", &["_self"], ) + .register_documented( + "min_position", + |_self: Val<::glam::U64Vec4>| { + let output: usize = { + { + let output: usize = ::glam::U64Vec4::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", + &["_self"], + ) .register_documented( "mul", |_self: Val<::glam::U64Vec4>, rhs: Ref<::glam::U64Vec4>| { @@ -32362,7 +34795,7 @@ pub(crate) fn register_u_64_vec_4_functions(world: &mut World) { }; output }, - " `[x, y, z, w]`", + " Converts `self` to `[x, y, z, w]`", &["_self"], ) .register_documented( @@ -32851,7 +35284,7 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { }; output }, - " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", + " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", &["_self", "min", "max"], ) .register_documented( @@ -33436,7 +35869,7 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -33537,7 +35970,7 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for maxNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -33552,7 +35985,24 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { }; output }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", + " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "max_position", + |_self: Val<::glam::Vec2>| { + let output: usize = { + { + let output: usize = ::glam::Vec2::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", &["_self"], ) .register_documented( @@ -33588,7 +36038,7 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for minNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -33603,7 +36053,24 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { }; output }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", + " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "min_position", + |_self: Val<::glam::Vec2>| { + let output: usize = { + { + let output: usize = ::glam::Vec2::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", &["_self"], ) .register_documented( @@ -33740,7 +36207,7 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { }; output }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", + " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n # Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", &["_self"], ) .register_documented( @@ -34041,7 +36508,7 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { }; output }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", + " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.\n This can be used in conjunction with the [`from_angle()`][Self::from_angle()] method, e.g.\n `Vec2::from_angle(PI).rotate(Vec2::Y)` will create the vector `[-1, 0]`\n and rotate [`Vec2::Y`] around it returning `-Vec2::Y`.", &["_self", "rhs"], ) .register_documented( @@ -34060,7 +36527,7 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { }; output }, - " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be equal to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.", + " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be parallel to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.", &["_self", "rhs", "max_angle"], ) .register_documented( @@ -34211,7 +36678,7 @@ pub(crate) fn register_vec_2_functions(world: &mut World) { }; output }, - " `[x, y]`", + " Converts `self` to `[x, y]`", &["_self"], ) .register_documented( @@ -34598,7 +37065,7 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { }; output }, - " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", + " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", &["_self", "min", "max"], ) .register_documented( @@ -35203,7 +37670,7 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -35304,7 +37771,7 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for maxNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -35319,7 +37786,24 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { }; output }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", + " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "max_position", + |_self: Val<::glam::Vec3A>| { + let output: usize = { + { + let output: usize = ::glam::Vec3A::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", &["_self"], ) .register_documented( @@ -35355,7 +37839,7 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for minNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -35370,7 +37854,24 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { }; output }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", + " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "min_position", + |_self: Val<::glam::Vec3A>| { + let output: usize = { + { + let output: usize = ::glam::Vec3A::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", &["_self"], ) .register_documented( @@ -35508,7 +38009,7 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { }; output }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", + " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n # Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", &["_self"], ) .register_documented( @@ -35759,6 +38260,98 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n [Euclidean division]: f32::rem_euclid", &["_self", "rhs"], ) + .register_documented( + "rotate_axis", + |_self: Val<::glam::Vec3A>, axis: Val<::glam::Vec3A>, angle: f32| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::rotate_axis( + _self.into_inner(), + axis.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around `axis` by `angle` (in radians).\n The axis must be a unit vector.\n # Panics\n Will panic if `axis` is not normalized when `glam_assert` is enabled.", + &["_self", "axis", "angle"], + ) + .register_documented( + "rotate_towards", + |_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>, max_angle: f32| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::rotate_towards( + _self.into_inner(), + rhs.into_inner(), + max_angle, + ) + .into(); + output + } + }; + output + }, + " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be parallel to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.", + &["_self", "rhs", "max_angle"], + ) + .register_documented( + "rotate_x", + |_self: Val<::glam::Vec3A>, angle: f32| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::rotate_x( + _self.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around the x axis by `angle` (in radians).", + &["_self", "angle"], + ) + .register_documented( + "rotate_y", + |_self: Val<::glam::Vec3A>, angle: f32| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::rotate_y( + _self.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around the y axis by `angle` (in radians).", + &["_self", "angle"], + ) + .register_documented( + "rotate_z", + |_self: Val<::glam::Vec3A>, angle: f32| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::rotate_z( + _self.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around the z axis by `angle` (in radians).", + &["_self", "angle"], + ) .register_documented( "round", |_self: Val<::glam::Vec3A>| { @@ -35816,6 +38409,25 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { " Returns a vector with elements representing the sign of `self`.\n - `1.0` if the number is positive, `+0.0` or `INFINITY`\n - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n - `NAN` if the number is `NAN`", &["_self"], ) + .register_documented( + "slerp", + |_self: Val<::glam::Vec3A>, rhs: Val<::glam::Vec3A>, s: f32| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = ::glam::Vec3A::slerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .into(); + output + } + }; + output + }, + " Performs a spherical 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( "splat", |v: f32| { @@ -35892,7 +38504,24 @@ pub(crate) fn register_vec_3_a_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", + &["_self"], + ) + .register_documented( + "to_vec3", + |_self: Val<::glam::Vec3A>| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = ::glam::Vec3A::to_vec3( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", &["_self"], ) .register_documented( @@ -36254,7 +38883,7 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { }; output }, - " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", + " Component-wise clamping of values, similar to [`f32::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", &["_self", "min", "max"], ) .register_documented( @@ -36806,7 +39435,7 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -36907,7 +39536,7 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for maxNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -36922,7 +39551,24 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { }; output }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", + " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "max_position", + |_self: Val<::glam::Vec4>| { + let output: usize = { + { + let output: usize = ::glam::Vec4::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", &["_self"], ) .register_documented( @@ -36958,7 +39604,7 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for minNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -36973,7 +39619,24 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { }; output }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", + " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "min_position", + |_self: Val<::glam::Vec4>| { + let output: usize = { + { + let output: usize = ::glam::Vec4::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", &["_self"], ) .register_documented( @@ -37111,7 +39774,7 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { }; output }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", + " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n # Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", &["_self"], ) .register_documented( @@ -37495,7 +40158,7 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { }; output }, - " `[x, y, z, w]`", + " Converts `self` to `[x, y, z, w]`", &["_self"], ) .register_documented( @@ -37529,7 +40192,7 @@ pub(crate) fn register_vec_4_functions(world: &mut World) { }; output }, - " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].\n To truncate to [`Vec3A`] use [`Vec3A::from()`].", + " Creates a 3D vector from the `x`, `y` and `z` elements of `self`, discarding `w`.\n Truncation to [`Vec3`] may also be performed by using [`self.xyz()`][crate::swizzles::Vec4Swizzles::xyz()].\n To truncate to [`Vec3A`] use [`Vec3A::from_vec4()`].", &["_self"], ) .register_documented( @@ -38443,7 +41106,7 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { }; output }, - " Component-wise clamping of values, similar to [`f64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", + " Component-wise clamping of values, similar to [`f64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", &["_self", "min", "max"], ) .register_documented( @@ -39028,7 +41691,7 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 2 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -39129,7 +41792,7 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for maxNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -39144,7 +41807,24 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { }; output }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", + " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "max_position", + |_self: Val<::glam::DVec2>| { + let output: usize = { + { + let output: usize = ::glam::DVec2::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", &["_self"], ) .register_documented( @@ -39180,7 +41860,7 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for minNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -39195,7 +41875,24 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { }; output }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", + " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "min_position", + |_self: Val<::glam::DVec2>| { + let output: usize = { + { + let output: usize = ::glam::DVec2::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", &["_self"], ) .register_documented( @@ -39332,7 +42029,7 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { }; output }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", + " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n # Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", &["_self"], ) .register_documented( @@ -39633,7 +42330,7 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { }; output }, - " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.", + " Returns `rhs` rotated by the angle of `self`. If `self` is normalized,\n then this just rotation. This is what you usually want. Otherwise,\n it will be like a rotation with a multiplication by `self`'s length.\n This can be used in conjunction with the [`from_angle()`][Self::from_angle()] method, e.g.\n `DVec2::from_angle(PI).rotate(DVec2::Y)` will create the vector `[-1, 0]`\n and rotate [`DVec2::Y`] around it returning `-DVec2::Y`.", &["_self", "rhs"], ) .register_documented( @@ -39652,7 +42349,7 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { }; output }, - " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be equal to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.", + " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be parallel to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.", &["_self", "rhs", "max_angle"], ) .register_documented( @@ -39803,7 +42500,7 @@ pub(crate) fn register_d_vec_2_functions(world: &mut World) { }; output }, - " `[x, y]`", + " Converts `self` to `[x, y]`", &["_self"], ) .register_documented( @@ -40205,7 +42902,7 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { }; output }, - " Component-wise clamping of values, similar to [`f64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", + " Component-wise clamping of values, similar to [`f64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", &["_self", "min", "max"], ) .register_documented( @@ -40793,7 +43490,7 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -40894,7 +43591,7 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for maxNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -40909,7 +43606,24 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { }; output }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", + " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "max_position", + |_self: Val<::glam::DVec3>| { + let output: usize = { + { + let output: usize = ::glam::DVec3::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", &["_self"], ) .register_documented( @@ -40945,7 +43659,7 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for minNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -40960,7 +43674,24 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { }; output }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", + " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "min_position", + |_self: Val<::glam::DVec3>| { + let output: usize = { + { + let output: usize = ::glam::DVec3::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", &["_self"], ) .register_documented( @@ -41098,7 +43829,7 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { }; output }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", + " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n # Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", &["_self"], ) .register_documented( @@ -41349,6 +44080,98 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { " Returns the element-wise remainder of [Euclidean division] of `self` by `rhs`.\n [Euclidean division]: f64::rem_euclid", &["_self", "rhs"], ) + .register_documented( + "rotate_axis", + |_self: Val<::glam::DVec3>, axis: Val<::glam::DVec3>, angle: f64| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec3::rotate_axis( + _self.into_inner(), + axis.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around `axis` by `angle` (in radians).\n The axis must be a unit vector.\n # Panics\n Will panic if `axis` is not normalized when `glam_assert` is enabled.", + &["_self", "axis", "angle"], + ) + .register_documented( + "rotate_towards", + |_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>, max_angle: f64| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec3::rotate_towards( + _self.into_inner(), + rhs.into_inner(), + max_angle, + ) + .into(); + output + } + }; + output + }, + " Rotates towards `rhs` up to `max_angle` (in radians).\n When `max_angle` is `0.0`, the result will be equal to `self`. When `max_angle` is equal to\n `self.angle_between(rhs)`, the result will be parallel to `rhs`. If `max_angle` is negative,\n rotates towards the exact opposite of `rhs`. Will not go past the target.", + &["_self", "rhs", "max_angle"], + ) + .register_documented( + "rotate_x", + |_self: Val<::glam::DVec3>, angle: f64| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec3::rotate_x( + _self.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around the x axis by `angle` (in radians).", + &["_self", "angle"], + ) + .register_documented( + "rotate_y", + |_self: Val<::glam::DVec3>, angle: f64| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec3::rotate_y( + _self.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around the y axis by `angle` (in radians).", + &["_self", "angle"], + ) + .register_documented( + "rotate_z", + |_self: Val<::glam::DVec3>, angle: f64| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec3::rotate_z( + _self.into_inner(), + angle, + ) + .into(); + output + } + }; + output + }, + " Rotates around the z axis by `angle` (in radians).", + &["_self", "angle"], + ) .register_documented( "round", |_self: Val<::glam::DVec3>| { @@ -41406,6 +44229,25 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { " Returns a vector with elements representing the sign of `self`.\n - `1.0` if the number is positive, `+0.0` or `INFINITY`\n - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY`\n - `NAN` if the number is `NAN`", &["_self"], ) + .register_documented( + "slerp", + |_self: Val<::glam::DVec3>, rhs: Val<::glam::DVec3>, s: f64| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = ::glam::DVec3::slerp( + _self.into_inner(), + rhs.into_inner(), + s, + ) + .into(); + output + } + }; + output + }, + " Performs a spherical 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( "splat", |v: f64| { @@ -41482,7 +44324,7 @@ pub(crate) fn register_d_vec_3_functions(world: &mut World) { }; output }, - " `[x, y, z]`", + " Converts `self` to `[x, y, z]`", &["_self"], ) .register_documented( @@ -41852,7 +44694,7 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { }; output }, - " Component-wise clamping of values, similar to [`f64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", + " Component-wise clamping of values, similar to [`f64::clamp`].\n Each element in `min` must be less-or-equal to the corresponding element in `max`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.\n # Panics\n Will panic if `min` is greater than `max` when `glam_assert` is enabled.", &["_self", "min", "max"], ) .register_documented( @@ -42404,7 +45246,7 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { }; output }, - " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.", + " Returns a bitmask with the lowest 4 bits set to the sign bits from the elements of `self`.\n A negative element results in a `1` bit and a positive element in a `0` bit. Element `x` goes\n into the first lowest bit, element `y` into the second, etc.\n An element is negative if it has a negative sign, including -0.0, NaNs with negative sign\n bit and negative infinity.", &["_self"], ) .register_documented( @@ -42505,7 +45347,7 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.max(rhs.x), self.y.max(rhs.y), ..]`.", + " Returns a vector containing the maximum values for each element of `self` and `rhs`.\n In other words this computes `[max(self.x, rhs.x), max(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for maxNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -42520,7 +45362,24 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { }; output }, - " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.", + " Returns the horizontal maximum of `self`.\n In other words this computes `max(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "max_position", + |_self: Val<::glam::DVec4>| { + let output: usize = { + { + let output: usize = ::glam::DVec4::max_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first maximum element of `self`.", &["_self"], ) .register_documented( @@ -42556,7 +45415,7 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { }; output }, - " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[self.x.min(rhs.x), self.y.min(rhs.y), ..]`.", + " Returns a vector containing the minimum values for each element of `self` and `rhs`.\n In other words this computes `[min(x, rhs.x), min(self.y, rhs.y), ..]`.\n NaN propogation does not follow IEEE 754-2008 semantics for minNum and may differ on\n different SIMD architectures.", &["_self", "rhs"], ) .register_documented( @@ -42571,7 +45430,24 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { }; output }, - " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.", + " Returns the horizontal minimum of `self`.\n In other words this computes `min(x, y, ..)`.\n NaN propogation does not follow IEEE 754-2008 semantics and may differ on\n different SIMD architectures.", + &["_self"], + ) + .register_documented( + "min_position", + |_self: Val<::glam::DVec4>| { + let output: usize = { + { + let output: usize = ::glam::DVec4::min_position( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the index of the first minimum element of `self`.", &["_self"], ) .register_documented( @@ -42709,7 +45585,7 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { }; output }, - " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", + " Returns `self` normalized to length 1.0.\n For valid results, `self` must be finite and _not_ of length zero, nor very close to zero.\n See also [`Self::try_normalize()`] and [`Self::normalize_or_zero()`].\n # Panics\n Will panic if the resulting normalized vector is not finite when `glam_assert` is enabled.", &["_self"], ) .register_documented( @@ -43093,7 +45969,7 @@ pub(crate) fn register_d_vec_4_functions(world: &mut World) { }; output }, - " `[x, y, z, w]`", + " Converts `self` to `[x, y, z, w]`", &["_self"], ) .register_documented( @@ -43243,6 +46119,23 @@ pub(crate) fn register_mat_2_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "add", + |_self: Val<::glam::Mat2>, rhs: Ref<::glam::Mat2>| { + let output: Val<::glam::Mat2> = { + { + let output: Val<::glam::Mat2> = <::glam::Mat2 as ::core::ops::Add< + &::glam::Mat2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "add", |_self: Val<::glam::Mat2>, rhs: Val<::glam::Mat2>| { @@ -43574,6 +46467,40 @@ pub(crate) fn register_mat_2_functions(world: &mut World) { " Returns `true` if any elements are `NaN`.", &["_self"], ) + .register_documented( + "mul", + |_self: Val<::glam::Mat2>, rhs: Ref<::glam::Mat2>| { + let output: Val<::glam::Mat2> = { + { + let output: Val<::glam::Mat2> = <::glam::Mat2 as ::core::ops::Mul< + &::glam::Mat2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat2>, rhs: Ref<::glam::Vec2>| { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::Vec2> = <::glam::Mat2 as ::core::ops::Mul< + &::glam::Vec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::Mat2>, rhs: Val<::glam::Mat2>| { @@ -43711,6 +46638,23 @@ pub(crate) fn register_mat_2_functions(world: &mut World) { " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 1.", &["_self", "index"], ) + .register_documented( + "sub", + |_self: Val<::glam::Mat2>, rhs: Ref<::glam::Mat2>| { + let output: Val<::glam::Mat2> = { + { + let output: Val<::glam::Mat2> = <::glam::Mat2 as ::core::ops::Sub< + &::glam::Mat2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "sub", |_self: Val<::glam::Mat2>, rhs: Val<::glam::Mat2>| { @@ -43834,6 +46778,23 @@ pub(crate) fn register_mat_3_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "add", + |_self: Val<::glam::Mat3>, rhs: Ref<::glam::Mat3>| { + let output: Val<::glam::Mat3> = { + { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Add< + &::glam::Mat3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "add", |_self: Val<::glam::Mat3>, rhs: Val<::glam::Mat3>| { @@ -44292,6 +47253,148 @@ pub(crate) fn register_mat_3_functions(world: &mut World) { " Returns `true` if any elements are `NaN`.", &["_self"], ) + .register_documented( + "look_at_lh", + |eye: Val<::glam::Vec3>, center: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Mat3> = { + { + let output: Val<::glam::Mat3> = ::glam::Mat3::look_at_lh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a left-handed view matrix using a camera position, a focal point and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["eye", "center", "up"], + ) + .register_documented( + "look_at_rh", + |eye: Val<::glam::Vec3>, center: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Mat3> = { + { + let output: Val<::glam::Mat3> = ::glam::Mat3::look_at_rh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed view matrix using a camera position, a focal point and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["eye", "center", "up"], + ) + .register_documented( + "look_to_lh", + |dir: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Mat3> = { + { + let output: Val<::glam::Mat3> = ::glam::Mat3::look_to_lh( + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a left-handed view matrix using a facing direction and an up direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `dir` or `up` are not normalized when `glam_assert` is enabled.", + &["dir", "up"], + ) + .register_documented( + "look_to_rh", + |dir: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Mat3> = { + { + let output: Val<::glam::Mat3> = ::glam::Mat3::look_to_rh( + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed view matrix using a facing direction and an up direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `dir` or `up` are not normalized when `glam_assert` is enabled.", + &["dir", "up"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat3>, rhs: Ref<::glam::Affine2>| { + let output: Val<::glam::Mat3> = { + { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Mul< + &::glam::Affine2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat3>, rhs: Ref<::glam::Mat3>| { + let output: Val<::glam::Mat3> = { + { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Mul< + &::glam::Mat3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat3>, rhs: Ref<::glam::Vec3>| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = <::glam::Mat3 as ::core::ops::Mul< + &::glam::Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat3>, rhs: Ref<::glam::Vec3A>| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = <::glam::Mat3 as ::core::ops::Mul< + &::glam::Vec3A, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::Mat3>, rhs: Val<::glam::Affine2>| { @@ -44481,6 +47584,23 @@ pub(crate) fn register_mat_3_functions(world: &mut World) { " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 2.", &["_self", "index"], ) + .register_documented( + "sub", + |_self: Val<::glam::Mat3>, rhs: Ref<::glam::Mat3>| { + let output: Val<::glam::Mat3> = { + { + let output: Val<::glam::Mat3> = <::glam::Mat3 as ::core::ops::Sub< + &::glam::Mat3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "sub", |_self: Val<::glam::Mat3>, rhs: Val<::glam::Mat3>| { @@ -44659,6 +47779,23 @@ pub(crate) fn register_mat_3_a_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "add", + |_self: Val<::glam::Mat3A>, rhs: Ref<::glam::Mat3A>| { + let output: Val<::glam::Mat3A> = { + { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Add< + &::glam::Mat3A, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "add", |_self: Val<::glam::Mat3A>, rhs: Val<::glam::Mat3A>| { @@ -45120,6 +48257,148 @@ pub(crate) fn register_mat_3_a_functions(world: &mut World) { " Returns `true` if any elements are `NaN`.", &["_self"], ) + .register_documented( + "look_at_lh", + |eye: Val<::glam::Vec3>, center: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Mat3A> = { + { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::look_at_lh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a left-handed view matrix using a camera position, a focal point and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["eye", "center", "up"], + ) + .register_documented( + "look_at_rh", + |eye: Val<::glam::Vec3>, center: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Mat3A> = { + { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::look_at_rh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed view matrix using a camera position, a focal point and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["eye", "center", "up"], + ) + .register_documented( + "look_to_lh", + |dir: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Mat3A> = { + { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::look_to_lh( + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a left-handed view matrix using a facing direction and an up direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `dir` or `up` are not normalized when `glam_assert` is enabled.", + &["dir", "up"], + ) + .register_documented( + "look_to_rh", + |dir: Val<::glam::Vec3>, up: Val<::glam::Vec3>| { + let output: Val<::glam::Mat3A> = { + { + let output: Val<::glam::Mat3A> = ::glam::Mat3A::look_to_rh( + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed view matrix using a facing direction and an up direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `dir` or `up` are not normalized when `glam_assert` is enabled.", + &["dir", "up"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat3A>, rhs: Ref<::glam::Affine2>| { + let output: Val<::glam::Mat3A> = { + { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Mul< + &::glam::Affine2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat3A>, rhs: Ref<::glam::Mat3A>| { + let output: Val<::glam::Mat3A> = { + { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Mul< + &::glam::Mat3A, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat3A>, rhs: Ref<::glam::Vec3>| { + let output: Val<::glam::Vec3> = { + { + let output: Val<::glam::Vec3> = <::glam::Mat3A as ::core::ops::Mul< + &::glam::Vec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat3A>, rhs: Ref<::glam::Vec3A>| { + let output: Val<::glam::Vec3A> = { + { + let output: Val<::glam::Vec3A> = <::glam::Mat3A as ::core::ops::Mul< + &::glam::Vec3A, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::Mat3A>, rhs: Val<::glam::Affine2>| { @@ -45312,6 +48591,23 @@ pub(crate) fn register_mat_3_a_functions(world: &mut World) { " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 2.", &["_self", "index"], ) + .register_documented( + "sub", + |_self: Val<::glam::Mat3A>, rhs: Ref<::glam::Mat3A>| { + let output: Val<::glam::Mat3A> = { + { + let output: Val<::glam::Mat3A> = <::glam::Mat3A as ::core::ops::Sub< + &::glam::Mat3A, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "sub", |_self: Val<::glam::Mat3A>, rhs: Val<::glam::Mat3A>| { @@ -45489,6 +48785,23 @@ pub(crate) fn register_mat_4_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "add", + |_self: Val<::glam::Mat4>, rhs: Ref<::glam::Mat4>| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Add< + &::glam::Mat4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "add", |_self: Val<::glam::Mat4>, rhs: Val<::glam::Mat4>| { @@ -45734,6 +49047,24 @@ pub(crate) fn register_mat_4_functions(world: &mut World) { " Creates an affine transformation matrix from the given 3x3 linear transformation\n matrix.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", &["m"], ) + .register_documented( + "from_mat3_translation", + |mat3: Val<::glam::Mat3>, translation: Val<::glam::Vec3>| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = ::glam::Mat4::from_mat3_translation( + mat3.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates an affine transformation matrics from a 3x3 matrix (expressing scale, shear and\n rotation) and a translation vector.\n Equivalent to `Mat4::from_translation(translation) * Mat4::from_mat3(mat3)`", + &["mat3", "translation"], + ) .register_documented( "from_mat3a", |m: Val<::glam::Mat3A>| { @@ -45894,6 +49225,72 @@ pub(crate) fn register_mat_4_functions(world: &mut World) { " Creates an affine transformation matrix from the given 3D `translation`.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", &["translation"], ) + .register_documented( + "frustum_lh", + |left: f32, right: f32, bottom: f32, top: f32, z_near: f32, z_far: f32| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = ::glam::Mat4::frustum_lh( + left, + right, + bottom, + top, + z_near, + z_far, + ) + .into(); + output + } + }; + output + }, + " Creates a left-handed perspective projection matrix with `[0,1]` depth range.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", + &["left", "right", "bottom", "top", "z_near", "z_far"], + ) + .register_documented( + "frustum_rh", + |left: f32, right: f32, bottom: f32, top: f32, z_near: f32, z_far: f32| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = ::glam::Mat4::frustum_rh( + left, + right, + bottom, + top, + z_near, + z_far, + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed perspective projection matrix with `[0,1]` depth range.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", + &["left", "right", "bottom", "top", "z_near", "z_far"], + ) + .register_documented( + "frustum_rh_gl", + |left: f32, right: f32, bottom: f32, top: f32, z_near: f32, z_far: f32| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = ::glam::Mat4::frustum_rh_gl( + left, + right, + bottom, + top, + z_near, + z_far, + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed perspective projection matrix with [-1,1] depth range.\n This is the same as the OpenGL `glFrustum` function.\n See ", + &["left", "right", "bottom", "top", "z_near", "z_far"], + ) .register_documented( "inverse", |_self: Ref<::glam::Mat4>| { @@ -45953,7 +49350,7 @@ pub(crate) fn register_mat_4_functions(world: &mut World) { }; output }, - " Creates a left-handed view matrix using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + " Creates a left-handed view matrix using a camera position, a focal points and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", &["eye", "center", "up"], ) .register_documented( @@ -45972,7 +49369,7 @@ pub(crate) fn register_mat_4_functions(world: &mut World) { }; output }, - " Creates a right-handed view matrix using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + " Creates a right-handed view matrix using a camera position, a focal point, and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", &["eye", "center", "up"], ) .register_documented( @@ -45991,7 +49388,7 @@ pub(crate) fn register_mat_4_functions(world: &mut World) { }; output }, - " Creates a left-handed view matrix using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.", + " Creates a left-handed view matrix using a camera position, a facing direction and an up\n direction\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `dir` or `up` are not normalized when `glam_assert` is enabled.", &["eye", "dir", "up"], ) .register_documented( @@ -46010,9 +49407,60 @@ pub(crate) fn register_mat_4_functions(world: &mut World) { }; output }, - " Creates a right-handed view matrix using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.", + " Creates a right-handed view matrix using a camera position, a facing direction, and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `dir` or `up` are not normalized when `glam_assert` is enabled.", &["eye", "dir", "up"], ) + .register_documented( + "mul", + |_self: Val<::glam::Mat4>, rhs: Ref<::glam::Affine3A>| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Mul< + &::glam::Affine3A, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat4>, rhs: Ref<::glam::Mat4>| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Mul< + &::glam::Mat4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Mat4>, rhs: Ref<::glam::Vec4>| { + let output: Val<::glam::Vec4> = { + { + let output: Val<::glam::Vec4> = <::glam::Mat4 as ::core::ops::Mul< + &::glam::Vec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::Mat4>, rhs: Val<::glam::Affine3A>| { @@ -46405,6 +49853,23 @@ pub(crate) fn register_mat_4_functions(world: &mut World) { " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 3.", &["_self", "index"], ) + .register_documented( + "sub", + |_self: Val<::glam::Mat4>, rhs: Ref<::glam::Mat4>| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = <::glam::Mat4 as ::core::ops::Sub< + &::glam::Mat4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "sub", |_self: Val<::glam::Mat4>, rhs: Val<::glam::Mat4>| { @@ -46619,6 +50084,23 @@ pub(crate) fn register_d_mat_2_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "add", + |_self: Val<::glam::DMat2>, rhs: Ref<::glam::DMat2>| { + let output: Val<::glam::DMat2> = { + { + let output: Val<::glam::DMat2> = <::glam::DMat2 as ::core::ops::Add< + &::glam::DMat2, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "add", |_self: Val<::glam::DMat2>, rhs: Val<::glam::DMat2>| { @@ -46917,6 +50399,40 @@ pub(crate) fn register_d_mat_2_functions(world: &mut World) { " Returns `true` if any elements are `NaN`.", &["_self"], ) + .register_documented( + "mul", + |_self: Val<::glam::DMat2>, rhs: Ref<::glam::DMat2>| { + let output: Val<::glam::DMat2> = { + { + let output: Val<::glam::DMat2> = <::glam::DMat2 as ::core::ops::Mul< + &::glam::DMat2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::DMat2>, rhs: Ref<::glam::DVec2>| { + let output: Val<::glam::DVec2> = { + { + let output: Val<::glam::DVec2> = <::glam::DMat2 as ::core::ops::Mul< + &::glam::DVec2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::DMat2>, rhs: Val<::glam::DMat2>| { @@ -47057,6 +50573,23 @@ pub(crate) fn register_d_mat_2_functions(world: &mut World) { " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 1.", &["_self", "index"], ) + .register_documented( + "sub", + |_self: Val<::glam::DMat2>, rhs: Ref<::glam::DMat2>| { + let output: Val<::glam::DMat2> = { + { + let output: Val<::glam::DMat2> = <::glam::DMat2 as ::core::ops::Sub< + &::glam::DMat2, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "sub", |_self: Val<::glam::DMat2>, rhs: Val<::glam::DMat2>| { @@ -47181,6 +50714,23 @@ pub(crate) fn register_d_mat_3_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "add", + |_self: Val<::glam::DMat3>, rhs: Ref<::glam::DMat3>| { + let output: Val<::glam::DMat3> = { + { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Add< + &::glam::DMat3, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "add", |_self: Val<::glam::DMat3>, rhs: Val<::glam::DMat3>| { @@ -47642,6 +51192,139 @@ pub(crate) fn register_d_mat_3_functions(world: &mut World) { " Returns `true` if any elements are `NaN`.", &["_self"], ) + .register_documented( + "look_at_lh", + | + eye: Val<::glam::DVec3>, + center: Val<::glam::DVec3>, + up: Val<::glam::DVec3>| + { + let output: Val<::glam::DMat3> = { + { + let output: Val<::glam::DMat3> = ::glam::DMat3::look_at_lh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a left-handed view matrix using a camera position, a focal point and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["eye", "center", "up"], + ) + .register_documented( + "look_at_rh", + | + eye: Val<::glam::DVec3>, + center: Val<::glam::DVec3>, + up: Val<::glam::DVec3>| + { + let output: Val<::glam::DMat3> = { + { + let output: Val<::glam::DMat3> = ::glam::DMat3::look_at_rh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed view matrix using a camera position, a focal point and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["eye", "center", "up"], + ) + .register_documented( + "look_to_lh", + |dir: Val<::glam::DVec3>, up: Val<::glam::DVec3>| { + let output: Val<::glam::DMat3> = { + { + let output: Val<::glam::DMat3> = ::glam::DMat3::look_to_lh( + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a left-handed view matrix using a facing direction and an up direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `dir` or `up` are not normalized when `glam_assert` is enabled.", + &["dir", "up"], + ) + .register_documented( + "look_to_rh", + |dir: Val<::glam::DVec3>, up: Val<::glam::DVec3>| { + let output: Val<::glam::DMat3> = { + { + let output: Val<::glam::DMat3> = ::glam::DMat3::look_to_rh( + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed view matrix using a facing direction and an up direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `dir` or `up` are not normalized when `glam_assert` is enabled.", + &["dir", "up"], + ) + .register_documented( + "mul", + |_self: Val<::glam::DMat3>, rhs: Ref<::glam::DAffine2>| { + let output: Val<::glam::DMat3> = { + { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Mul< + &::glam::DAffine2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::DMat3>, rhs: Ref<::glam::DMat3>| { + let output: Val<::glam::DMat3> = { + { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Mul< + &::glam::DMat3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::DMat3>, rhs: Ref<::glam::DVec3>| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = <::glam::DMat3 as ::core::ops::Mul< + &::glam::DVec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::DMat3>, rhs: Val<::glam::DAffine2>| { @@ -47799,6 +51482,23 @@ pub(crate) fn register_d_mat_3_functions(world: &mut World) { " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 2.", &["_self", "index"], ) + .register_documented( + "sub", + |_self: Val<::glam::DMat3>, rhs: Ref<::glam::DMat3>| { + let output: Val<::glam::DMat3> = { + { + let output: Val<::glam::DMat3> = <::glam::DMat3 as ::core::ops::Sub< + &::glam::DMat3, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "sub", |_self: Val<::glam::DMat3>, rhs: Val<::glam::DMat3>| { @@ -47977,6 +51677,23 @@ pub(crate) fn register_d_mat_4_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two matrices contain similar elements. It works best\n when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "add", + |_self: Val<::glam::DMat4>, rhs: Ref<::glam::DMat4>| { + let output: Val<::glam::DMat4> = { + { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Add< + &::glam::DMat4, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "add", |_self: Val<::glam::DMat4>, rhs: Val<::glam::DMat4>| { @@ -48225,6 +51942,24 @@ pub(crate) fn register_d_mat_4_functions(world: &mut World) { " Creates an affine transformation matrix from the given 3x3 linear transformation\n matrix.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", &["m"], ) + .register_documented( + "from_mat3_translation", + |mat3: Val<::glam::DMat3>, translation: Val<::glam::DVec3>| { + let output: Val<::glam::DMat4> = { + { + let output: Val<::glam::DMat4> = ::glam::DMat4::from_mat3_translation( + mat3.into_inner(), + translation.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates an affine transformation matrics from a 3x3 matrix (expressing scale, shear and\n rotation) and a translation vector.\n Equivalent to `DMat4::from_translation(translation) * DMat4::from_mat3(mat3)`", + &["mat3", "translation"], + ) .register_documented( "from_quat", |rotation: Val<::glam::DQuat>| { @@ -48368,6 +52103,72 @@ pub(crate) fn register_d_mat_4_functions(world: &mut World) { " Creates an affine transformation matrix from the given 3D `translation`.\n The resulting matrix can be used to transform 3D points and vectors. See\n [`Self::transform_point3()`] and [`Self::transform_vector3()`].", &["translation"], ) + .register_documented( + "frustum_lh", + |left: f64, right: f64, bottom: f64, top: f64, z_near: f64, z_far: f64| { + let output: Val<::glam::DMat4> = { + { + let output: Val<::glam::DMat4> = ::glam::DMat4::frustum_lh( + left, + right, + bottom, + top, + z_near, + z_far, + ) + .into(); + output + } + }; + output + }, + " Creates a left-handed perspective projection matrix with `[0,1]` depth range.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", + &["left", "right", "bottom", "top", "z_near", "z_far"], + ) + .register_documented( + "frustum_rh", + |left: f64, right: f64, bottom: f64, top: f64, z_near: f64, z_far: f64| { + let output: Val<::glam::DMat4> = { + { + let output: Val<::glam::DMat4> = ::glam::DMat4::frustum_rh( + left, + right, + bottom, + top, + z_near, + z_far, + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed perspective projection matrix with `[0,1]` depth range.\n # Panics\n Will panic if `z_near` or `z_far` are less than or equal to zero when `glam_assert` is\n enabled.", + &["left", "right", "bottom", "top", "z_near", "z_far"], + ) + .register_documented( + "frustum_rh_gl", + |left: f64, right: f64, bottom: f64, top: f64, z_near: f64, z_far: f64| { + let output: Val<::glam::DMat4> = { + { + let output: Val<::glam::DMat4> = ::glam::DMat4::frustum_rh_gl( + left, + right, + bottom, + top, + z_near, + z_far, + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed perspective projection matrix with [-1,1] depth range.\n This is the same as the OpenGL `glFrustum` function.\n See ", + &["left", "right", "bottom", "top", "z_near", "z_far"], + ) .register_documented( "inverse", |_self: Ref<::glam::DMat4>| { @@ -48431,7 +52232,7 @@ pub(crate) fn register_d_mat_4_functions(world: &mut World) { }; output }, - " Creates a left-handed view matrix using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + " Creates a left-handed view matrix using a camera position, a focal points and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", &["eye", "center", "up"], ) .register_documented( @@ -48454,7 +52255,7 @@ pub(crate) fn register_d_mat_4_functions(world: &mut World) { }; output }, - " Creates a right-handed view matrix using a camera position, an up direction, and a focal\n point.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + " Creates a right-handed view matrix using a camera position, a focal point, and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", &["eye", "center", "up"], ) .register_documented( @@ -48473,7 +52274,7 @@ pub(crate) fn register_d_mat_4_functions(world: &mut World) { }; output }, - " Creates a left-handed view matrix using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.", + " Creates a left-handed view matrix using a camera position, a facing direction and an up\n direction\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `dir` or `up` are not normalized when `glam_assert` is enabled.", &["eye", "dir", "up"], ) .register_documented( @@ -48492,9 +52293,60 @@ pub(crate) fn register_d_mat_4_functions(world: &mut World) { }; output }, - " Creates a right-handed view matrix using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.", + " Creates a right-handed view matrix using a camera position, a facing direction, and an up\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `dir` or `up` are not normalized when `glam_assert` is enabled.", &["eye", "dir", "up"], ) + .register_documented( + "mul", + |_self: Val<::glam::DMat4>, rhs: Ref<::glam::DAffine3>| { + let output: Val<::glam::DMat4> = { + { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Mul< + &::glam::DAffine3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::DMat4>, rhs: Ref<::glam::DMat4>| { + let output: Val<::glam::DMat4> = { + { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Mul< + &::glam::DMat4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::DMat4>, rhs: Ref<::glam::DVec4>| { + let output: Val<::glam::DVec4> = { + { + let output: Val<::glam::DVec4> = <::glam::DMat4 as ::core::ops::Mul< + &::glam::DVec4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::DMat4>, rhs: Val<::glam::DAffine3>| { @@ -48872,6 +52724,23 @@ pub(crate) fn register_d_mat_4_functions(world: &mut World) { " Returns the matrix row for the given `index`.\n # Panics\n Panics if `index` is greater than 3.", &["_self", "index"], ) + .register_documented( + "sub", + |_self: Val<::glam::DMat4>, rhs: Ref<::glam::DMat4>| { + let output: Val<::glam::DMat4> = { + { + let output: Val<::glam::DMat4> = <::glam::DMat4 as ::core::ops::Sub< + &::glam::DMat4, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "sub", |_self: Val<::glam::DMat4>, rhs: Val<::glam::DMat4>| { @@ -49035,6 +52904,23 @@ pub(crate) fn register_affine_2_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two 3x4 matrices contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "as_daffine2", + |_self: Ref<::glam::Affine2>| { + let output: Val<::glam::DAffine2> = { + { + let output: Val<::glam::DAffine2> = ::glam::Affine2::as_daffine2( + &_self, + ) + .into(); + output + } + }; + output + }, + " Casts all elements of `self` to `f64`.", + &["_self"], + ) .register_documented( "clone", |_self: Ref<::glam::Affine2>| { @@ -49294,6 +53180,57 @@ pub(crate) fn register_affine_2_functions(world: &mut World) { " Returns `true` if any elements are `NaN`.", &["_self"], ) + .register_documented( + "mul", + |_self: Val<::glam::Affine2>, rhs: Ref<::glam::Affine2>| { + let output: Val<::glam::Affine2> = { + { + let output: Val<::glam::Affine2> = <::glam::Affine2 as ::core::ops::Mul< + &::glam::Affine2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Affine2>, rhs: Ref<::glam::Mat3>| { + let output: Val<::glam::Mat3> = { + { + let output: Val<::glam::Mat3> = <::glam::Affine2 as ::core::ops::Mul< + &::glam::Mat3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Affine2>, rhs: Ref<::glam::Mat3A>| { + let output: Val<::glam::Mat3A> = { + { + let output: Val<::glam::Mat3A> = <::glam::Affine2 as ::core::ops::Mul< + &::glam::Mat3A, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::Affine2>, rhs: Val<::glam::Affine2>| { @@ -49444,6 +53381,23 @@ pub(crate) fn register_affine_3_a_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two 3x4 matrices contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "as_daffine3", + |_self: Ref<::glam::Affine3A>| { + let output: Val<::glam::DAffine3> = { + { + let output: Val<::glam::DAffine3> = ::glam::Affine3A::as_daffine3( + &_self, + ) + .into(); + output + } + }; + output + }, + " Casts all elements of `self` to `f64`.", + &["_self"], + ) .register_documented( "clone", |_self: Ref<::glam::Affine3A>| { @@ -49837,6 +53791,40 @@ pub(crate) fn register_affine_3_a_functions(world: &mut World) { " Creates a right-handed view transform using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.", &["eye", "dir", "up"], ) + .register_documented( + "mul", + |_self: Val<::glam::Affine3A>, rhs: Ref<::glam::Affine3A>| { + let output: Val<::glam::Affine3A> = { + { + let output: Val<::glam::Affine3A> = <::glam::Affine3A as ::core::ops::Mul< + &::glam::Affine3A, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::Affine3A>, rhs: Ref<::glam::Mat4>| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = <::glam::Affine3A as ::core::ops::Mul< + &::glam::Mat4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::Affine3A>, rhs: Val<::glam::Affine3A>| { @@ -50006,6 +53994,23 @@ pub(crate) fn register_d_affine_2_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two 3x4 matrices contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "as_affine2", + |_self: Ref<::glam::DAffine2>| { + let output: Val<::glam::Affine2> = { + { + let output: Val<::glam::Affine2> = ::glam::DAffine2::as_affine2( + &_self, + ) + .into(); + output + } + }; + output + }, + " Casts all elements of `self` to `f32`.", + &["_self"], + ) .register_documented( "clone", |_self: Ref<::glam::DAffine2>| { @@ -50248,6 +54253,40 @@ pub(crate) fn register_d_affine_2_functions(world: &mut World) { " Returns `true` if any elements are `NaN`.", &["_self"], ) + .register_documented( + "mul", + |_self: Val<::glam::DAffine2>, rhs: Ref<::glam::DAffine2>| { + let output: Val<::glam::DAffine2> = { + { + let output: Val<::glam::DAffine2> = <::glam::DAffine2 as ::core::ops::Mul< + &::glam::DAffine2, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::DAffine2>, rhs: Ref<::glam::DMat3>| { + let output: Val<::glam::DMat3> = { + { + let output: Val<::glam::DMat3> = <::glam::DAffine2 as ::core::ops::Mul< + &::glam::DMat3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::DAffine2>, rhs: Val<::glam::DAffine2>| { @@ -50381,6 +54420,23 @@ pub(crate) fn register_d_affine_3_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two 3x4 matrices contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "as_affine3a", + |_self: Ref<::glam::DAffine3>| { + let output: Val<::glam::Affine3A> = { + { + let output: Val<::glam::Affine3A> = ::glam::DAffine3::as_affine3a( + &_self, + ) + .into(); + output + } + }; + output + }, + " Casts all elements of `self` to `f32`.", + &["_self"], + ) .register_documented( "clone", |_self: Ref<::glam::DAffine3>| { @@ -50782,6 +54838,40 @@ pub(crate) fn register_d_affine_3_functions(world: &mut World) { " Creates a right-handed view transform using a camera position, an up direction, and a facing\n direction.\n For a view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.", &["eye", "dir", "up"], ) + .register_documented( + "mul", + |_self: Val<::glam::DAffine3>, rhs: Ref<::glam::DAffine3>| { + let output: Val<::glam::DAffine3> = { + { + let output: Val<::glam::DAffine3> = <::glam::DAffine3 as ::core::ops::Mul< + &::glam::DAffine3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::DAffine3>, rhs: Ref<::glam::DMat4>| { + let output: Val<::glam::DMat4> = { + { + let output: Val<::glam::DMat4> = <::glam::DAffine3 as ::core::ops::Mul< + &::glam::DMat4, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::DAffine3>, rhs: Val<::glam::DAffine3>| { @@ -50911,6 +55001,23 @@ pub(crate) fn register_d_quat_functions(world: &mut World) { " Returns true if the absolute difference of all elements between `self` and `rhs`\n is less than or equal to `max_abs_diff`.\n This can be used to compare if two quaternions contain similar elements. It works\n best when comparing with a known value. The `max_abs_diff` that should be used used\n depends on the values being compared against.\n For more see\n [comparing floating point numbers](https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/).", &["_self", "rhs", "max_abs_diff"], ) + .register_documented( + "add", + |_self: Val<::glam::DQuat>, rhs: Ref<::glam::DQuat>| { + let output: Val<::glam::DQuat> = { + { + let output: Val<::glam::DQuat> = <::glam::DQuat as ::core::ops::Add< + &::glam::DQuat, + >>::add(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "add", |_self: Val<::glam::DQuat>, rhs: Val<::glam::DQuat>| { @@ -51453,6 +55560,122 @@ pub(crate) fn register_d_quat_functions(world: &mut World) { " Performs a linear interpolation between `self` and `rhs` based on\n the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s`\n is `1.0`, the result will be equal to `rhs`.\n # Panics\n Will panic if `self` or `end` are not normalized when `glam_assert` is enabled.", &["_self", "end", "s"], ) + .register_documented( + "look_at_lh", + | + eye: Val<::glam::DVec3>, + center: Val<::glam::DVec3>, + up: Val<::glam::DVec3>| + { + let output: Val<::glam::DQuat> = { + { + let output: Val<::glam::DQuat> = ::glam::DQuat::look_at_lh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a left-handed view matrix using a camera position, a focal point, and an up\n direction.\n For a left-handed view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["eye", "center", "up"], + ) + .register_documented( + "look_at_rh", + | + eye: Val<::glam::DVec3>, + center: Val<::glam::DVec3>, + up: Val<::glam::DVec3>| + { + let output: Val<::glam::DQuat> = { + { + let output: Val<::glam::DQuat> = ::glam::DQuat::look_at_rh( + eye.into_inner(), + center.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a right-handed view matrix using a camera position, an up direction, and a focal\n point.\n For a right-handed view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["eye", "center", "up"], + ) + .register_documented( + "look_to_lh", + |dir: Val<::glam::DVec3>, up: Val<::glam::DVec3>| { + let output: Val<::glam::DQuat> = { + { + let output: Val<::glam::DQuat> = ::glam::DQuat::look_to_lh( + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a quaterion rotation from a facing direction and an up direction.\n For a left-handed view coordinate system with `+X=right`, `+Y=up` and `+Z=forward`.\n # Panics\n Will panic if `up` is not normalized when `glam_assert` is enabled.", + &["dir", "up"], + ) + .register_documented( + "look_to_rh", + |dir: Val<::glam::DVec3>, up: Val<::glam::DVec3>| { + let output: Val<::glam::DQuat> = { + { + let output: Val<::glam::DQuat> = ::glam::DQuat::look_to_rh( + dir.into_inner(), + up.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a quaterion rotation from facing direction and an up direction.\n For a right-handed view coordinate system with `+X=right`, `+Y=up` and `+Z=back`.\n # Panics\n Will panic if `dir` and `up` are not normalized when `glam_assert` is enabled.", + &["dir", "up"], + ) + .register_documented( + "mul", + |_self: Val<::glam::DQuat>, rhs: Ref<::glam::DQuat>| { + let output: Val<::glam::DQuat> = { + { + let output: Val<::glam::DQuat> = <::glam::DQuat as ::core::ops::Mul< + &::glam::DQuat, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "mul", + |_self: Val<::glam::DQuat>, rhs: Ref<::glam::DVec3>| { + let output: Val<::glam::DVec3> = { + { + let output: Val<::glam::DVec3> = <::glam::DQuat as ::core::ops::Mul< + &::glam::DVec3, + >>::mul(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "mul", |_self: Val<::glam::DQuat>, rhs: Val<::glam::DQuat>| { @@ -51612,6 +55835,23 @@ pub(crate) fn register_d_quat_functions(world: &mut World) { " Performs a spherical linear interpolation between `self` and `end`\n based on the value `s`.\n When `s` is `0.0`, the result will be equal to `self`. When `s`\n is `1.0`, the result will be equal to `end`.\n # Panics\n Will panic if `self` or `end` are not normalized when `glam_assert` is enabled.", &["_self", "end", "s"], ) + .register_documented( + "sub", + |_self: Val<::glam::DQuat>, rhs: Ref<::glam::DQuat>| { + let output: Val<::glam::DQuat> = { + { + let output: Val<::glam::DQuat> = <::glam::DQuat as ::core::ops::Sub< + &::glam::DQuat, + >>::sub(_self.into_inner(), &rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "sub", |_self: Val<::glam::DQuat>, rhs: Val<::glam::DQuat>| { @@ -52256,6 +56496,23 @@ pub(crate) fn register_uuid_functions(world: &mut World) { " A buffer that can be used for `encode_...` calls, that is\n guaranteed to be long enough for any of the format adapters.\n # Examples\n ```\n # use uuid::Uuid;\n let uuid = Uuid::nil();\n assert_eq!(\n uuid.simple().encode_lower(&mut Uuid::encode_buffer()),\n \"00000000000000000000000000000000\"\n );\n assert_eq!(\n uuid.hyphenated()\n .encode_lower(&mut Uuid::encode_buffer()),\n \"00000000-0000-0000-0000-000000000000\"\n );\n assert_eq!(\n uuid.urn().encode_lower(&mut Uuid::encode_buffer()),\n \"urn:uuid:00000000-0000-0000-0000-000000000000\"\n );\n ```", &[], ) + .register_documented( + "eq", + |_self: Ref<::uuid::Uuid>, other: Ref<::uuid::NonNilUuid>| { + let output: bool = { + { + let output: bool = <::uuid::Uuid as ::core::cmp::PartialEq< + ::uuid::NonNilUuid, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) .register_documented( "eq", |_self: Ref<::uuid::Uuid>, other: Ref<::uuid::Uuid>| { @@ -52501,19 +56758,110 @@ pub(crate) fn register_uuid_functions(world: &mut World) { let mut registry = registry.write(); registry.register_type_data::<::uuid::Uuid, bevy_mod_scripting_bindings::MarkAsGenerated>(); } +pub(crate) fn register_non_nil_uuid_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::<::uuid::NonNilUuid>::new( + world, + ) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::uuid::NonNilUuid>| { + let output: () = { + { + let output: () = + <::uuid::NonNilUuid as ::core::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::uuid::NonNilUuid>| { + let output: Val<::uuid::NonNilUuid> = { + { + let output: Val<::uuid::NonNilUuid> = + <::uuid::NonNilUuid as ::core::clone::Clone>::clone(&_self).into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::uuid::NonNilUuid>, other: Ref<::uuid::NonNilUuid>| { + let output: bool = { + { + let output: bool = <::uuid::NonNilUuid as ::core::cmp::PartialEq< + ::uuid::NonNilUuid, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "eq", + |_self: Ref<::uuid::NonNilUuid>, other: Ref<::uuid::Uuid>| { + let output: bool = { + { + let output: bool = <::uuid::NonNilUuid as ::core::cmp::PartialEq< + ::uuid::Uuid, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "get", + |_self: Val<::uuid::NonNilUuid>| { + let output: Val<::uuid::Uuid> = { + { + let output: Val<::uuid::Uuid> = + ::uuid::NonNilUuid::get(_self.into_inner()).into(); + output + } + }; + output + }, + " Get the underlying [`Uuid`] value.", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::<::uuid::NonNilUuid, bevy_mod_scripting_bindings::MarkAsGenerated>(); +} impl Plugin for BevyReflectScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); register_atomic_bool_functions(&mut world); + register_atomic_i_8_functions(&mut world); register_atomic_i_16_functions(&mut world); register_atomic_i_32_functions(&mut world); register_atomic_i_64_functions(&mut world); - register_atomic_i_8_functions(&mut world); register_atomic_isize_functions(&mut world); + register_atomic_u_8_functions(&mut world); register_atomic_u_16_functions(&mut world); register_atomic_u_32_functions(&mut world); register_atomic_u_64_functions(&mut world); - register_atomic_u_8_functions(&mut world); register_atomic_usize_functions(&mut world); register_duration_functions(&mut world); register_instant_functions(&mut world); @@ -52572,5 +56920,6 @@ impl Plugin for BevyReflectScriptingPlugin { register_b_vec_4_a_functions(&mut world); register_smol_str_functions(&mut world); register_uuid_functions(&mut world); + register_non_nil_uuid_functions(&mut world); } } diff --git a/crates/bindings/bevy_render_bms_bindings/Cargo.toml b/crates/bindings/bevy_render_bms_bindings/Cargo.toml index 30a4d8186f..798290eb69 100644 --- a/crates/bindings/bevy_render_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_render_bms_bindings/Cargo.toml @@ -17,96 +17,75 @@ 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.16.1", features = [ - "hdr", - "ktx2", - "multi_threaded", - "webgl", -], default-features = true } +bevy_render = { version = "0.17.2", features = ["multi_threaded", "webgl"], default-features = true} -async-channel = { version = "^2.3.0", features = [], default-features = true } +async-channel = { version = "^2.3.0", features = [], default-features = true} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.16.2", features = [], default-features = true } +bevy_camera = { version = "^0.17.2", features = [], default-features = true} -bevy_derive = { version = "^0.16.1", features = [], default-features = true } +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_diagnostic = { version = "^0.16.1", features = [ -], default-features = true } +bevy_derive = { version = "^0.17.2", features = [], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } +bevy_diagnostic = { version = "^0.17.2", features = ["std", "sysinfo", "sysinfo_plugin"], default-features = true} -bevy_encase_derive = { version = "^0.16.1", features = [ -], default-features = true } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.16.1", features = [ - "hdr", - "ktx2", -], default-features = false } +bevy_encase_derive = { version = "^0.17.2", features = [], default-features = true} -bevy_math = { version = "^0.16.1", features = [], default-features = true } +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_mesh = { version = "^0.16.1", features = [], default-features = true } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} -bevy_render_macros = { version = "^0.16.1", features = [ -], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_tasks = { version = "^0.16.1", features = [ - "multi_threaded", - "multi_threaded", -], default-features = false } +bevy_render_macros = { version = "^0.17.2", features = [], default-features = true} -bevy_time = { version = "^0.16.1", features = [], default-features = true } +bevy_shader = { version = "^0.17.2", features = [], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +bevy_tasks = { version = "^0.17.2", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +bevy_time = { version = "^0.17.2", features = ["bevy_reflect", "std"], default-features = true} -bevy_window = { version = "^0.16.1", features = [], default-features = true } +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bitflags = { version = "^2", features = [], default-features = true } +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} -bytemuck = { version = "^1.5", features = [], default-features = true } +bevy_window = { version = "^0.17.2", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} -codespan-reporting = { version = "^0.11.0", features = [ -], default-features = true } +bitflags = { version = "^2", features = [], default-features = true} -encase = { version = "^0.10", features = [], default-features = true } +bytemuck = { version = "^1.5", features = [], default-features = true} -fixedbitset = { version = "^0.5", features = [], default-features = true } +encase = { version = "^0.11", features = [], default-features = true} -futures-lite = { version = "^2.0.1", features = [], default-features = true } +fixedbitset = { version = "^0.5", features = [], default-features = true} -indexmap = { version = "^2", 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", features = [], default-features = true} -ktx2 = { version = "^0.3.0", features = [], default-features = true } +naga = { version = "^26", features = [], default-features = true} -naga = { version = "^24", features = [], default-features = true } +nonmax = { version = "^0.5", features = [], default-features = true} -naga_oil = { version = "^0.17", features = [], default-features = true } +offset-allocator = { version = "^0.2", features = [], default-features = true} -nonmax = { version = "^0.5", features = [], default-features = true } +send_wrapper = { version = "^0.6.0", features = [], default-features = true} -offset-allocator = { version = "^0.2", features = [], default-features = true } +variadics_please = { version = "^1.1", features = [], default-features = true} -send_wrapper = { version = "^0.6.0", features = [], default-features = true } +wasm-bindgen = { version = "^0.2", features = [], default-features = true} -serde = { version = "^1", features = [], default-features = true } +web-sys = { version = "^0.3.67", features = [], default-features = true} -smallvec = { version = "^1.11", features = [], default-features = true } +wgpu = { version = "^26", features = ["webgl"], default-features = false} -variadics_please = { version = "^1.1", features = [], default-features = true } -wasm-bindgen = { version = "^0.2", features = [], default-features = true } - -web-sys = { version = "^0.3.67", features = [], default-features = true } - -wgpu = { version = "^24", features = ["webgl"], default-features = false } diff --git a/crates/bindings/bevy_render_bms_bindings/src/lib.rs b/crates/bindings/bevy_render_bms_bindings/src/lib.rs index 497e919fb5..646fc37c29 100644 --- a/crates/bindings/bevy_render_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_render_bms_bindings/src/lib.rs @@ -1,55 +1,61 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyRenderScriptingPlugin; pub(crate) fn register_alpha_mode_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_render::alpha::AlphaMode, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::alpha::AlphaMode>| { - let output: Val<::bevy_render::alpha::AlphaMode> = { - { - let output: Val<::bevy_render::alpha::AlphaMode> = - <::bevy_render::alpha::AlphaMode as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_render::alpha::AlphaMode>| { + let output: Val<::bevy_render::alpha::AlphaMode> = { + { + let output: Val<::bevy_render::alpha::AlphaMode> = <::bevy_render::alpha::AlphaMode as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_render::alpha::AlphaMode>, + other: Ref<::bevy_render::alpha::AlphaMode>| + { + let output: bool = { + { + let output: bool = <::bevy_render::alpha::AlphaMode as ::std::cmp::PartialEq< + ::bevy_render::alpha::AlphaMode, + >>::eq(&_self, &other) .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_render::alpha::AlphaMode>, - other: Ref<::bevy_render::alpha::AlphaMode>| { - let output: bool = { - { - let output: bool = <::bevy_render::alpha::AlphaMode as ::std::cmp::PartialEq< - ::bevy_render::alpha::AlphaMode, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + output + } + }; + output + }, + "", + &["_self", "other"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry @@ -58,16 +64,16 @@ pub(crate) fn register_alpha_mode_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_camera_functions(world: &mut World) { +pub(crate) fn register_msaa_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::Camera, + ::bevy_render::view::Msaa, >::new(world) .register_documented( - "clip_from_view", - |_self: Ref<::bevy_render::camera::Camera>| { - let output: Val<::bevy_math::Mat4> = { + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_render::view::Msaa>| { + let output: () = { { - let output: Val<::bevy_math::Mat4> = ::bevy_render::camera::Camera::clip_from_view( + let output: () = <::bevy_render::view::Msaa as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -76,15 +82,15 @@ pub(crate) fn register_camera_functions(world: &mut World) { }; output }, - " The projection matrix computed using this camera's [`CameraProjection`].", + "", &["_self"], ) .register_documented( "clone", - |_self: Ref<::bevy_render::camera::Camera>| { - let output: Val<::bevy_render::camera::Camera> = { + |_self: Ref<::bevy_render::view::Msaa>| { + let output: Val<::bevy_render::view::Msaa> = { { - let output: Val<::bevy_render::camera::Camera> = <::bevy_render::camera::Camera as ::std::clone::Clone>::clone( + let output: Val<::bevy_render::view::Msaa> = <::bevy_render::view::Msaa as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -97,31 +103,32 @@ pub(crate) fn register_camera_functions(world: &mut World) { &["_self"], ) .register_documented( - "depth_ndc_to_view_z", - |_self: Ref<::bevy_render::camera::Camera>, ndc_depth: f32| { - let output: f32 = { + "eq", + | + _self: Ref<::bevy_render::view::Msaa>, + other: Ref<::bevy_render::view::Msaa>| + { + let output: bool = { { - let output: f32 = ::bevy_render::camera::Camera::depth_ndc_to_view_z( - &_self, - ndc_depth, - ) + let output: bool = <::bevy_render::view::Msaa as ::std::cmp::PartialEq< + ::bevy_render::view::Msaa, + >>::eq(&_self, &other) .into(); output } }; output }, - " Converts the depth in Normalized Device Coordinates\n to linear view z for perspective projections.\n Note: Depth values in front of the camera will be negative as -z is forward", - &["_self", "ndc_depth"], + "", + &["_self", "other"], ) .register_documented( - "depth_ndc_to_view_z_2d", - |_self: Ref<::bevy_render::camera::Camera>, ndc_depth: f32| { - let output: f32 = { + "from_samples", + |samples: u32| { + let output: Val<::bevy_render::view::Msaa> = { { - let output: f32 = ::bevy_render::camera::Camera::depth_ndc_to_view_z_2d( - &_self, - ndc_depth, + let output: Val<::bevy_render::view::Msaa> = ::bevy_render::view::Msaa::from_samples( + samples, ) .into(); output @@ -129,17 +136,15 @@ pub(crate) fn register_camera_functions(world: &mut World) { }; output }, - " Converts the depth in Normalized Device Coordinates\n to linear view z for orthographic projections.\n Note: Depth values in front of the camera will be negative as -z is forward", - &["_self", "ndc_depth"], + "", + &["samples"], ) .register_documented( - "target_scaling_factor", - |_self: Ref<::bevy_render::camera::Camera>| { - let output: ::std::option::Option = { + "samples", + |_self: Ref<::bevy_render::view::Msaa>| { + let output: u32 = { { - let output: ::std::option::Option = ::bevy_render::camera::Camera::target_scaling_factor( - &_self, - ) + let output: u32 = ::bevy_render::view::Msaa::samples(&_self) .into(); output } @@ -153,78 +158,37 @@ pub(crate) fn register_camera_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_render::camera::Camera, + ::bevy_render::view::Msaa, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_clear_color_functions(world: &mut World) { +pub(crate) fn register_main_entity_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::ClearColor, + ::bevy_render::sync_world::MainEntity, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::ClearColor>| { - let output: Val<::bevy_render::camera::ClearColor> = { - { - let output: Val<::bevy_render::camera::ClearColor> = - <::bevy_render::camera::ClearColor as ::std::clone::Clone>::clone(&_self) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_render::sync_world::MainEntity>| { + let output: () = { + { + let output: () = <::bevy_render::sync_world::MainEntity as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::camera::ClearColor, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_clear_color_config_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::ClearColorConfig, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::ClearColorConfig>| { - let output: Val<::bevy_render::camera::ClearColorConfig> = { - { - let output: Val<::bevy_render::camera::ClearColorConfig> = - <::bevy_render::camera::ClearColorConfig 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_render::camera::ClearColorConfig, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_orthographic_projection_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::OrthographicProjection, - >::new(world) + output + } + }; + output + }, + "", + &["_self"], + ) .register_documented( "clone", - |_self: Ref<::bevy_render::camera::OrthographicProjection>| { - let output: Val<::bevy_render::camera::OrthographicProjection> = { + |_self: Ref<::bevy_render::sync_world::MainEntity>| { + let output: Val<::bevy_render::sync_world::MainEntity> = { { - let output: Val<::bevy_render::camera::OrthographicProjection> = <::bevy_render::camera::OrthographicProjection as ::std::clone::Clone>::clone( + let output: Val<::bevy_render::sync_world::MainEntity> = <::bevy_render::sync_world::MainEntity as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -237,53 +201,68 @@ pub(crate) fn register_orthographic_projection_functions(world: &mut World) { &["_self"], ) .register_documented( - "default_2d", - || { - let output: Val<::bevy_render::camera::OrthographicProjection> = { + "eq", + | + _self: Ref<::bevy_render::sync_world::MainEntity>, + other: Ref<::bevy_render::sync_world::MainEntity>| + { + let output: bool = { { - let output: Val<::bevy_render::camera::OrthographicProjection> = ::bevy_render::camera::OrthographicProjection::default_2d() + let output: bool = <::bevy_render::sync_world::MainEntity as ::std::cmp::PartialEq< + ::bevy_render::sync_world::MainEntity, + >>::eq(&_self, &other) .into(); output } }; output }, - " Returns the default orthographic projection for a 2D context.\n The near plane is set to a negative value so that the camera can still\n render the scene when using positive z coordinates to order foreground elements.", - &[], + "", + &["_self", "other"], ) .register_documented( - "default_3d", - || { - let output: Val<::bevy_render::camera::OrthographicProjection> = { + "id", + |_self: Ref<::bevy_render::sync_world::MainEntity>| { + let output: Val<::bevy_ecs::entity::Entity> = { { - let output: Val<::bevy_render::camera::OrthographicProjection> = ::bevy_render::camera::OrthographicProjection::default_3d() + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_render::sync_world::MainEntity::id( + &_self, + ) .into(); output } }; output }, - " Returns the default orthographic projection for a 3D context.\n The near plane is set to 0.0 so that the camera doesn't render\n objects that are behind it.", - &[], + "", + &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_render::camera::OrthographicProjection, + ::bevy_render::sync_world::MainEntity, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_perspective_projection_functions(world: &mut World) { +pub(crate) fn register_occlusion_culling_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::PerspectiveProjection, + ::bevy_render::experimental::occlusion_culling::OcclusionCulling, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_render::camera::PerspectiveProjection>| { - let output: Val<::bevy_render::camera::PerspectiveProjection> = { + | + _self: Ref< + ::bevy_render::experimental::occlusion_culling::OcclusionCulling, + >| + { + let output: Val< + ::bevy_render::experimental::occlusion_culling::OcclusionCulling, + > = { { - let output: Val<::bevy_render::camera::PerspectiveProjection> = <::bevy_render::camera::PerspectiveProjection as ::std::clone::Clone>::clone( + let output: Val< + ::bevy_render::experimental::occlusion_culling::OcclusionCulling, + > = <::bevy_render::experimental::occlusion_culling::OcclusionCulling as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -299,48 +278,20 @@ pub(crate) fn register_perspective_projection_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_render::camera::PerspectiveProjection, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_projection_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::Projection, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::Projection>| { - let output: Val<::bevy_render::camera::Projection> = { - { - let output: Val<::bevy_render::camera::Projection> = - <::bevy_render::camera::Projection 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_render::camera::Projection, + ::bevy_render::experimental::occlusion_culling::OcclusionCulling, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_mesh_2_d_functions(world: &mut World) { +pub(crate) fn register_render_entity_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::mesh::Mesh2d, + ::bevy_render::sync_world::RenderEntity, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::mesh::Mesh2d>| { + |_self: Ref<::bevy_render::sync_world::RenderEntity>| { let output: () = { { - let output: () = <::bevy_render::mesh::Mesh2d as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_render::sync_world::RenderEntity as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -354,10 +305,10 @@ pub(crate) fn register_mesh_2_d_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_render::mesh::Mesh2d>| { - let output: Val<::bevy_render::mesh::Mesh2d> = { + |_self: Ref<::bevy_render::sync_world::RenderEntity>| { + let output: Val<::bevy_render::sync_world::RenderEntity> = { { - let output: Val<::bevy_render::mesh::Mesh2d> = <::bevy_render::mesh::Mesh2d as ::std::clone::Clone>::clone( + let output: Val<::bevy_render::sync_world::RenderEntity> = <::bevy_render::sync_world::RenderEntity as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -372,13 +323,13 @@ pub(crate) fn register_mesh_2_d_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_render::mesh::Mesh2d>, - other: Ref<::bevy_render::mesh::Mesh2d>| + _self: Ref<::bevy_render::sync_world::RenderEntity>, + other: Ref<::bevy_render::sync_world::RenderEntity>| { let output: bool = { { - let output: bool = <::bevy_render::mesh::Mesh2d as ::std::cmp::PartialEq< - ::bevy_render::mesh::Mesh2d, + let output: bool = <::bevy_render::sync_world::RenderEntity as ::std::cmp::PartialEq< + ::bevy_render::sync_world::RenderEntity, >>::eq(&_self, &other) .into(); output @@ -388,25 +339,42 @@ pub(crate) fn register_mesh_2_d_functions(world: &mut World) { }, "", &["_self", "other"], + ) + .register_documented( + "id", + |_self: Ref<::bevy_render::sync_world::RenderEntity>| { + let output: Val<::bevy_ecs::entity::Entity> = { + { + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_render::sync_world::RenderEntity::id( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_render::mesh::Mesh2d, + ::bevy_render::sync_world::RenderEntity, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_mesh_3_d_functions(world: &mut World) { +pub(crate) fn register_sync_to_render_world_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::mesh::Mesh3d, + ::bevy_render::sync_world::SyncToRenderWorld, >::new(world) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::mesh::Mesh3d>| { - let output: () = { + "clone", + |_self: Ref<::bevy_render::sync_world::SyncToRenderWorld>| { + let output: Val<::bevy_render::sync_world::SyncToRenderWorld> = { { - let output: () = <::bevy_render::mesh::Mesh3d as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::bevy_render::sync_world::SyncToRenderWorld> = <::bevy_render::sync_world::SyncToRenderWorld as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -417,13 +385,25 @@ pub(crate) fn register_mesh_3_d_functions(world: &mut World) { }, "", &["_self"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_render::sync_world::SyncToRenderWorld, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_color_grading_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_render::view::ColorGrading, + >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_render::mesh::Mesh3d>| { - let output: Val<::bevy_render::mesh::Mesh3d> = { + |_self: Ref<::bevy_render::view::ColorGrading>| { + let output: Val<::bevy_render::view::ColorGrading> = { { - let output: Val<::bevy_render::mesh::Mesh3d> = <::bevy_render::mesh::Mesh3d as ::std::clone::Clone>::clone( + let output: Val<::bevy_render::view::ColorGrading> = <::bevy_render::view::ColorGrading as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -436,43 +416,44 @@ pub(crate) fn register_mesh_3_d_functions(world: &mut World) { &["_self"], ) .register_documented( - "eq", + "with_identical_sections", | - _self: Ref<::bevy_render::mesh::Mesh3d>, - other: Ref<::bevy_render::mesh::Mesh3d>| + global: Val<::bevy_render::view::ColorGradingGlobal>, + section: Val<::bevy_render::view::ColorGradingSection>| { - let output: bool = { + let output: Val<::bevy_render::view::ColorGrading> = { { - let output: bool = <::bevy_render::mesh::Mesh3d as ::std::cmp::PartialEq< - ::bevy_render::mesh::Mesh3d, - >>::eq(&_self, &other) + let output: Val<::bevy_render::view::ColorGrading> = ::bevy_render::view::ColorGrading::with_identical_sections( + global.into_inner(), + section.into_inner(), + ) .into(); output } }; output }, - "", - &["_self", "other"], + " Creates a new [`ColorGrading`] instance in which shadows, midtones, and\n highlights all have the same set of color grading values.", + &["global", "section"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_render::mesh::Mesh3d, + ::bevy_render::view::ColorGrading, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_inherited_visibility_functions(world: &mut World) { +pub(crate) fn register_hdr_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::visibility::InheritedVisibility, + ::bevy_render::view::Hdr, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::view::visibility::InheritedVisibility>| { + |_self: Ref<::bevy_render::view::Hdr>| { let output: () = { { - let output: () = <::bevy_render::view::visibility::InheritedVisibility as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_render::view::Hdr as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -486,12 +467,10 @@ pub(crate) fn register_inherited_visibility_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_render::view::visibility::InheritedVisibility>| { - let output: Val<::bevy_render::view::visibility::InheritedVisibility> = { + |_self: Ref<::bevy_render::view::Hdr>| { + let output: Val<::bevy_render::view::Hdr> = { { - let output: Val< - ::bevy_render::view::visibility::InheritedVisibility, - > = <::bevy_render::view::visibility::InheritedVisibility as ::std::clone::Clone>::clone( + let output: Val<::bevy_render::view::Hdr> = <::bevy_render::view::Hdr as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -505,14 +484,11 @@ pub(crate) fn register_inherited_visibility_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_render::view::visibility::InheritedVisibility>, - other: Ref<::bevy_render::view::visibility::InheritedVisibility>| - { + |_self: Ref<::bevy_render::view::Hdr>, other: Ref<::bevy_render::view::Hdr>| { let output: bool = { { - let output: bool = <::bevy_render::view::visibility::InheritedVisibility as ::std::cmp::PartialEq< - ::bevy_render::view::visibility::InheritedVisibility, + let output: bool = <::bevy_render::view::Hdr as ::std::cmp::PartialEq< + ::bevy_render::view::Hdr, >>::eq(&_self, &other) .into(); output @@ -522,14 +498,26 @@ pub(crate) fn register_inherited_visibility_functions(world: &mut World) { }, "", &["_self", "other"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_render::view::Hdr, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_render_visible_entities_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_render::view::RenderVisibleEntities, + >::new(world) .register_documented( - "get", - |_self: Val<::bevy_render::view::visibility::InheritedVisibility>| { - let output: bool = { + "clone", + |_self: Ref<::bevy_render::view::RenderVisibleEntities>| { + let output: Val<::bevy_render::view::RenderVisibleEntities> = { { - let output: bool = ::bevy_render::view::visibility::InheritedVisibility::get( - _self.into_inner(), + let output: Val<::bevy_render::view::RenderVisibleEntities> = <::bevy_render::view::RenderVisibleEntities as ::std::clone::Clone>::clone( + &_self, ) .into(); output @@ -537,27 +525,27 @@ pub(crate) fn register_inherited_visibility_functions(world: &mut World) { }; output }, - " Returns `true` if the entity is visible in the hierarchy.\n Otherwise, returns `false`.", + "", &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_render::view::visibility::InheritedVisibility, + ::bevy_render::view::RenderVisibleEntities, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_msaa_functions(world: &mut World) { +pub(crate) fn register_camera_render_graph_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::Msaa, + ::bevy_render::camera::CameraRenderGraph, >::new(world) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::view::Msaa>| { - let output: () = { + "clone", + |_self: Ref<::bevy_render::camera::CameraRenderGraph>| { + let output: Val<::bevy_render::camera::CameraRenderGraph> = { { - let output: () = <::bevy_render::view::Msaa as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::bevy_render::camera::CameraRenderGraph> = <::bevy_render::camera::CameraRenderGraph as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -568,13 +556,25 @@ pub(crate) fn register_msaa_functions(world: &mut World) { }, "", &["_self"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_render::camera::CameraRenderGraph, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_temporal_jitter_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_render::camera::TemporalJitter, + >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_render::view::Msaa>| { - let output: Val<::bevy_render::view::Msaa> = { + |_self: Ref<::bevy_render::camera::TemporalJitter>| { + let output: Val<::bevy_render::camera::TemporalJitter> = { { - let output: Val<::bevy_render::view::Msaa> = <::bevy_render::view::Msaa as ::std::clone::Clone>::clone( + let output: Val<::bevy_render::camera::TemporalJitter> = <::bevy_render::camera::TemporalJitter as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -587,16 +587,19 @@ pub(crate) fn register_msaa_functions(world: &mut World) { &["_self"], ) .register_documented( - "eq", + "jitter_projection", | - _self: Ref<::bevy_render::view::Msaa>, - other: Ref<::bevy_render::view::Msaa>| + _self: Ref<::bevy_render::camera::TemporalJitter>, + mut clip_from_view: Mut<::glam::Mat4>, + view_size: Val<::glam::Vec2>| { - let output: bool = { + let output: () = { { - let output: bool = <::bevy_render::view::Msaa as ::std::cmp::PartialEq< - ::bevy_render::view::Msaa, - >>::eq(&_self, &other) + let output: () = ::bevy_render::camera::TemporalJitter::jitter_projection( + &_self, + &mut clip_from_view, + view_size.into_inner(), + ) .into(); output } @@ -604,1506 +607,26 @@ pub(crate) fn register_msaa_functions(world: &mut World) { output }, "", - &["_self", "other"], - ) - .register_documented( - "from_samples", - |samples: u32| { - let output: Val<::bevy_render::view::Msaa> = { - { - let output: Val<::bevy_render::view::Msaa> = ::bevy_render::view::Msaa::from_samples( - samples, - ) - .into(); - output - } - }; - output - }, - "", - &["samples"], - ) - .register_documented( - "samples", - |_self: Ref<::bevy_render::view::Msaa>| { - let output: u32 = { - { - let output: u32 = ::bevy_render::view::Msaa::samples(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::view::Msaa, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_view_visibility_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::visibility::ViewVisibility, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::view::visibility::ViewVisibility>| { - let output: () = { - { - let output: () = <::bevy_render::view::visibility::ViewVisibility as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_render::view::visibility::ViewVisibility>| { - let output: Val<::bevy_render::view::visibility::ViewVisibility> = { - { - let output: Val< - ::bevy_render::view::visibility::ViewVisibility, - > = <::bevy_render::view::visibility::ViewVisibility as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_render::view::visibility::ViewVisibility>, - other: Ref<::bevy_render::view::visibility::ViewVisibility>| - { - let output: bool = { - { - let output: bool = <::bevy_render::view::visibility::ViewVisibility as ::std::cmp::PartialEq< - ::bevy_render::view::visibility::ViewVisibility, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "get", - |_self: Val<::bevy_render::view::visibility::ViewVisibility>| { - let output: bool = { - { - let output: bool = ::bevy_render::view::visibility::ViewVisibility::get( - _self.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns `true` if the entity is visible in any view.\n Otherwise, returns `false`.", - &["_self"], - ) - .register_documented( - "set", - |mut _self: Mut<::bevy_render::view::visibility::ViewVisibility>| { - let output: () = { - { - let output: () = ::bevy_render::view::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(); - registry - .register_type_data::< - ::bevy_render::view::visibility::ViewVisibility, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_visibility_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::visibility::Visibility, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::view::visibility::Visibility>| { - let output: () = { - { - let output: () = <::bevy_render::view::visibility::Visibility as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_render::view::visibility::Visibility>| { - let output: Val<::bevy_render::view::visibility::Visibility> = { - { - let output: Val<::bevy_render::view::visibility::Visibility> = <::bevy_render::view::visibility::Visibility as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_render::view::visibility::Visibility>, - other: Ref<::bevy_render::view::visibility::Visibility>| - { - let output: bool = { - { - let output: bool = <::bevy_render::view::visibility::Visibility as ::std::cmp::PartialEq< - ::bevy_render::view::visibility::Visibility, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "toggle_inherited_hidden", - |mut _self: Mut<::bevy_render::view::visibility::Visibility>| { - let output: () = { - { - let output: () = ::bevy_render::view::visibility::Visibility::toggle_inherited_hidden( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Toggles between `Visibility::Inherited` and `Visibility::Hidden`.\n If the value is `Visibility::Visible`, it remains unaffected.", - &["_self"], - ) - .register_documented( - "toggle_inherited_visible", - |mut _self: Mut<::bevy_render::view::visibility::Visibility>| { - let output: () = { - { - let output: () = ::bevy_render::view::visibility::Visibility::toggle_inherited_visible( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Toggles between `Visibility::Inherited` and `Visibility::Visible`.\n If the value is `Visibility::Hidden`, it remains unaffected.", - &["_self"], - ) - .register_documented( - "toggle_visible_hidden", - |mut _self: Mut<::bevy_render::view::visibility::Visibility>| { - let output: () = { - { - let output: () = ::bevy_render::view::visibility::Visibility::toggle_visible_hidden( - &mut _self, - ) - .into(); - output - } - }; - output - }, - " Toggles between `Visibility::Visible` and `Visibility::Hidden`.\n If the value is `Visibility::Inherited`, it remains unaffected.", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::view::visibility::Visibility, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_sync_to_render_world_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::sync_world::SyncToRenderWorld, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::sync_world::SyncToRenderWorld>| { - let output: Val<::bevy_render::sync_world::SyncToRenderWorld> = { - { - let output: Val<::bevy_render::sync_world::SyncToRenderWorld> = <::bevy_render::sync_world::SyncToRenderWorld 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_render::sync_world::SyncToRenderWorld, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_aabb_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::primitives::Aabb, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::primitives::Aabb>| { - let output: Val<::bevy_render::primitives::Aabb> = { - { - let output: Val<::bevy_render::primitives::Aabb> = - <::bevy_render::primitives::Aabb as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_render::primitives::Aabb>, - other: Ref<::bevy_render::primitives::Aabb>| { - let output: bool = { - { - let output: bool = <::bevy_render::primitives::Aabb as ::std::cmp::PartialEq< - ::bevy_render::primitives::Aabb, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "from_min_max", - |minimum: Val<::bevy_math::Vec3>, maximum: Val<::bevy_math::Vec3>| { - let output: Val<::bevy_render::primitives::Aabb> = { - { - let output: Val<::bevy_render::primitives::Aabb> = - ::bevy_render::primitives::Aabb::from_min_max( - minimum.into_inner(), - maximum.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["minimum", "maximum"], - ) - .register_documented( - "max", - |_self: Ref<::bevy_render::primitives::Aabb>| { - let output: Val<::bevy_math::Vec3A> = { - { - let output: Val<::bevy_math::Vec3A> = - ::bevy_render::primitives::Aabb::max(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "min", - |_self: Ref<::bevy_render::primitives::Aabb>| { - let output: Val<::bevy_math::Vec3A> = { - { - let output: Val<::bevy_math::Vec3A> = - ::bevy_render::primitives::Aabb::min(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "relative_radius", - |_self: Ref<::bevy_render::primitives::Aabb>, - p_normal: Ref<::bevy_math::Vec3A>, - world_from_local: Ref<::bevy_math::Mat3A>| { - let output: f32 = { - { - let output: f32 = ::bevy_render::primitives::Aabb::relative_radius( - &_self, - &p_normal, - &world_from_local, - ) - .into(); - output - } - }; - output - }, - " Calculate the relative radius of the AABB with respect to a plane", - &["_self", "p_normal", "world_from_local"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::primitives::Aabb, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_cascades_frusta_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::primitives::CascadesFrusta, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::primitives::CascadesFrusta>| { - let output: Val<::bevy_render::primitives::CascadesFrusta> = { - { - let output: Val<::bevy_render::primitives::CascadesFrusta> = - <::bevy_render::primitives::CascadesFrusta 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_render::primitives::CascadesFrusta, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_cubemap_frusta_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::primitives::CubemapFrusta, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::primitives::CubemapFrusta>| { - let output: Val<::bevy_render::primitives::CubemapFrusta> = { - { - let output: Val<::bevy_render::primitives::CubemapFrusta> = - <::bevy_render::primitives::CubemapFrusta 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_render::primitives::CubemapFrusta, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_frustum_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::primitives::Frustum, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::primitives::Frustum>| { - let output: Val<::bevy_render::primitives::Frustum> = { - { - let output: Val<::bevy_render::primitives::Frustum> = <::bevy_render::primitives::Frustum as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "contains_aabb", - | - _self: Ref<::bevy_render::primitives::Frustum>, - aabb: Ref<::bevy_render::primitives::Aabb>, - world_from_local: Ref<::bevy_math::Affine3A>| - { - let output: bool = { - { - let output: bool = ::bevy_render::primitives::Frustum::contains_aabb( - &_self, - &aabb, - &world_from_local, - ) - .into(); - output - } - }; - 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)", - &["_self", "aabb", "world_from_local"], - ) - .register_documented( - "from_clip_from_world", - |clip_from_world: Ref<::bevy_math::Mat4>| { - let output: Val<::bevy_render::primitives::Frustum> = { - { - let output: Val<::bevy_render::primitives::Frustum> = ::bevy_render::primitives::Frustum::from_clip_from_world( - &clip_from_world, - ) - .into(); - output - } - }; - output - }, - " Returns a frustum derived from `clip_from_world`.", - &["clip_from_world"], - ) - .register_documented( - "from_clip_from_world_custom_far", - | - clip_from_world: Ref<::bevy_math::Mat4>, - view_translation: Ref<::bevy_math::Vec3>, - view_backward: Ref<::bevy_math::Vec3>, - far: f32| - { - let output: Val<::bevy_render::primitives::Frustum> = { - { - let output: Val<::bevy_render::primitives::Frustum> = ::bevy_render::primitives::Frustum::from_clip_from_world_custom_far( - &clip_from_world, - &view_translation, - &view_backward, - far, - ) - .into(); - output - } - }; - output - }, - " Returns a frustum derived from `clip_from_world`,\n but with a custom far plane.", - &["clip_from_world", "view_translation", "view_backward", "far"], - ) - .register_documented( - "intersects_obb", - | - _self: Ref<::bevy_render::primitives::Frustum>, - aabb: Ref<::bevy_render::primitives::Aabb>, - world_from_local: Ref<::bevy_math::Affine3A>, - intersect_near: bool, - intersect_far: bool| - { - let output: bool = { - { - let output: bool = ::bevy_render::primitives::Frustum::intersects_obb( - &_self, - &aabb, - &world_from_local, - intersect_near, - intersect_far, - ) - .into(); - output - } - }; - output - }, - " Checks if an Oriented Bounding Box (obb) intersects the frustum.", - &["_self", "aabb", "world_from_local", "intersect_near", "intersect_far"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::primitives::Frustum, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_occlusion_culling_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::experimental::occlusion_culling::OcclusionCulling, - >::new(world) - .register_documented( - "clone", - | - _self: Ref< - ::bevy_render::experimental::occlusion_culling::OcclusionCulling, - >| - { - let output: Val< - ::bevy_render::experimental::occlusion_culling::OcclusionCulling, - > = { - { - let output: Val< - ::bevy_render::experimental::occlusion_culling::OcclusionCulling, - > = <::bevy_render::experimental::occlusion_culling::OcclusionCulling 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_render::experimental::occlusion_culling::OcclusionCulling, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_camera_render_graph_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::CameraRenderGraph, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::CameraRenderGraph>| { - let output: Val<::bevy_render::camera::CameraRenderGraph> = { - { - let output: Val<::bevy_render::camera::CameraRenderGraph> = - <::bevy_render::camera::CameraRenderGraph 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_render::camera::CameraRenderGraph, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_camera_main_texture_usages_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::CameraMainTextureUsages, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::CameraMainTextureUsages>| { - let output: Val<::bevy_render::camera::CameraMainTextureUsages> = { - { - let output: Val< - ::bevy_render::camera::CameraMainTextureUsages, - > = <::bevy_render::camera::CameraMainTextureUsages 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_render::camera::CameraMainTextureUsages, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_exposure_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::Exposure, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::Exposure>| { - let output: Val<::bevy_render::camera::Exposure> = { - { - let output: Val<::bevy_render::camera::Exposure> = <::bevy_render::camera::Exposure as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "exposure", - |_self: Ref<::bevy_render::camera::Exposure>| { - let output: f32 = { - { - let output: f32 = ::bevy_render::camera::Exposure::exposure( - &_self, - ) - .into(); - output - } - }; - output - }, - " Converts EV100 values to exposure values.\n ", - &["_self"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::camera::Exposure, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_temporal_jitter_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::TemporalJitter, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::TemporalJitter>| { - let output: Val<::bevy_render::camera::TemporalJitter> = { - { - let output: Val<::bevy_render::camera::TemporalJitter> = - <::bevy_render::camera::TemporalJitter as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "jitter_projection", - |_self: Ref<::bevy_render::camera::TemporalJitter>, - mut clip_from_view: Mut<::bevy_math::Mat4>, - view_size: Val<::bevy_math::Vec2>| { - let output: () = { - { - let output: () = ::bevy_render::camera::TemporalJitter::jitter_projection( - &_self, - &mut clip_from_view, - view_size.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self", "clip_from_view", "view_size"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::camera::TemporalJitter, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_mip_bias_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::MipBias, - >::new(world); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::camera::MipBias, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_manual_texture_view_handle_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::ManualTextureViewHandle, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::camera::ManualTextureViewHandle>| { - let output: () = { - { - let output: () = <::bevy_render::camera::ManualTextureViewHandle as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::ManualTextureViewHandle>| { - let output: Val<::bevy_render::camera::ManualTextureViewHandle> = { - { - let output: Val< - ::bevy_render::camera::ManualTextureViewHandle, - > = <::bevy_render::camera::ManualTextureViewHandle as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_render::camera::ManualTextureViewHandle>, - other: Ref<::bevy_render::camera::ManualTextureViewHandle>| - { - let output: bool = { - { - let output: bool = <::bevy_render::camera::ManualTextureViewHandle as ::std::cmp::PartialEq< - ::bevy_render::camera::ManualTextureViewHandle, - >>::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_render::camera::ManualTextureViewHandle, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_color_grading_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::ColorGrading, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::view::ColorGrading>| { - let output: Val<::bevy_render::view::ColorGrading> = { - { - let output: Val<::bevy_render::view::ColorGrading> = <::bevy_render::view::ColorGrading as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "with_identical_sections", - | - global: Val<::bevy_render::view::ColorGradingGlobal>, - section: Val<::bevy_render::view::ColorGradingSection>| - { - let output: Val<::bevy_render::view::ColorGrading> = { - { - let output: Val<::bevy_render::view::ColorGrading> = ::bevy_render::view::ColorGrading::with_identical_sections( - global.into_inner(), - section.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Creates a new [`ColorGrading`] instance in which shadows, midtones, and\n highlights all have the same set of color grading values.", - &["global", "section"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::view::ColorGrading, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_render_layers_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::visibility::RenderLayers, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::view::visibility::RenderLayers>| { - let output: () = { - { - let output: () = <::bevy_render::view::visibility::RenderLayers as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_render::view::visibility::RenderLayers>| { - let output: Val<::bevy_render::view::visibility::RenderLayers> = { - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = <::bevy_render::view::visibility::RenderLayers as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_render::view::visibility::RenderLayers>, - other: Ref<::bevy_render::view::visibility::RenderLayers>| - { - let output: bool = { - { - let output: bool = <::bevy_render::view::visibility::RenderLayers as ::std::cmp::PartialEq< - ::bevy_render::view::visibility::RenderLayers, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ) - .register_documented( - "intersection", - | - _self: Ref<::bevy_render::view::visibility::RenderLayers>, - other: Ref<::bevy_render::view::visibility::RenderLayers>| - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = { - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = ::bevy_render::view::visibility::RenderLayers::intersection( - &_self, - &other, - ) - .into(); - output - } - }; - output - }, - " Returns the set of [layers](Layer) shared by two instances of [`RenderLayers`].\n This corresponds to the `self & other` operation.", - &["_self", "other"], - ) - .register_documented( - "intersects", - | - _self: Ref<::bevy_render::view::visibility::RenderLayers>, - other: Ref<::bevy_render::view::visibility::RenderLayers>| - { - let output: bool = { - { - let output: bool = ::bevy_render::view::visibility::RenderLayers::intersects( - &_self, - &other, - ) - .into(); - output - } - }; - output - }, - " Determine if a `RenderLayers` intersects another.\n `RenderLayers`s intersect if they share any common layers.\n A `RenderLayers` with no layers will not match any other\n `RenderLayers`, even another with no layers.", - &["_self", "other"], - ) - .register_documented( - "layer", - |n: usize| { - let output: Val<::bevy_render::view::visibility::RenderLayers> = { - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = ::bevy_render::view::visibility::RenderLayers::layer( - n, - ) - .into(); - output - } - }; - output - }, - " Create a new `RenderLayers` belonging to the given layer.\n This `const` constructor is limited to `size_of::()` layers.\n If you need to support an arbitrary number of layers, use [`with`](RenderLayers::with)\n or [`from_layers`](RenderLayers::from_layers).", - &["n"], - ) - .register_documented( - "none", - || { - let output: Val<::bevy_render::view::visibility::RenderLayers> = { - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = ::bevy_render::view::visibility::RenderLayers::none() - .into(); - output - } - }; - output - }, - " Create a new `RenderLayers` that belongs to no layers.\n This is distinct from [`RenderLayers::default`], which belongs to the first layer.", - &[], - ) - .register_documented( - "symmetric_difference", - | - _self: Ref<::bevy_render::view::visibility::RenderLayers>, - other: Ref<::bevy_render::view::visibility::RenderLayers>| - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = { - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = ::bevy_render::view::visibility::RenderLayers::symmetric_difference( - &_self, - &other, - ) - .into(); - output - } - }; - output - }, - " Returns all [layers](Layer) included in exactly one of the instances of [`RenderLayers`].\n This corresponds to the \"exclusive or\" (XOR) operation: `self ^ other`.", - &["_self", "other"], - ) - .register_documented( - "union", - | - _self: Ref<::bevy_render::view::visibility::RenderLayers>, - other: Ref<::bevy_render::view::visibility::RenderLayers>| - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = { - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = ::bevy_render::view::visibility::RenderLayers::union( - &_self, - &other, - ) - .into(); - output - } - }; - output - }, - " Returns all [layers](Layer) included in either instance of [`RenderLayers`].\n This corresponds to the `self | other` operation.", - &["_self", "other"], - ) - .register_documented( - "with", - |_self: Val<::bevy_render::view::visibility::RenderLayers>, layer: usize| { - let output: Val<::bevy_render::view::visibility::RenderLayers> = { - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = ::bevy_render::view::visibility::RenderLayers::with( - _self.into_inner(), - layer, - ) - .into(); - output - } - }; - output - }, - " Add the given layer.\n This may be called multiple times to allow an entity to belong\n to multiple rendering layers.", - &["_self", "layer"], - ) - .register_documented( - "without", - |_self: Val<::bevy_render::view::visibility::RenderLayers>, layer: usize| { - let output: Val<::bevy_render::view::visibility::RenderLayers> = { - { - let output: Val<::bevy_render::view::visibility::RenderLayers> = ::bevy_render::view::visibility::RenderLayers::without( - _self.into_inner(), - layer, - ) - .into(); - output - } - }; - output - }, - " Removes the given rendering layer.", - &["_self", "layer"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::view::visibility::RenderLayers, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_render_visible_entities_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::visibility::RenderVisibleEntities, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::view::visibility::RenderVisibleEntities>| { - let output: Val< - ::bevy_render::view::visibility::RenderVisibleEntities, - > = { - { - let output: Val< - ::bevy_render::view::visibility::RenderVisibleEntities, - > = <::bevy_render::view::visibility::RenderVisibleEntities 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_render::view::visibility::RenderVisibleEntities, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_visible_entities_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::visibility::VisibleEntities, - >::new(world) - .register_documented( - "clear", - | - mut _self: Mut<::bevy_render::view::visibility::VisibleEntities>, - type_id: Val<::std::any::TypeId>| - { - let output: () = { - { - let output: () = ::bevy_render::view::visibility::VisibleEntities::clear( - &mut _self, - type_id.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self", "type_id"], - ) - .register_documented( - "clear_all", - |mut _self: Mut<::bevy_render::view::visibility::VisibleEntities>| { - let output: () = { - { - let output: () = ::bevy_render::view::visibility::VisibleEntities::clear_all( - &mut _self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_render::view::visibility::VisibleEntities>| { - let output: Val<::bevy_render::view::visibility::VisibleEntities> = { - { - let output: Val< - ::bevy_render::view::visibility::VisibleEntities, - > = <::bevy_render::view::visibility::VisibleEntities as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "is_empty", - | - _self: Ref<::bevy_render::view::visibility::VisibleEntities>, - type_id: Val<::std::any::TypeId>| - { - let output: bool = { - { - let output: bool = ::bevy_render::view::visibility::VisibleEntities::is_empty( - &_self, - type_id.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self", "type_id"], - ) - .register_documented( - "len", - | - _self: Ref<::bevy_render::view::visibility::VisibleEntities>, - type_id: Val<::std::any::TypeId>| - { - let output: usize = { - { - let output: usize = ::bevy_render::view::visibility::VisibleEntities::len( - &_self, - type_id.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self", "type_id"], - ) - .register_documented( - "push", - | - mut _self: Mut<::bevy_render::view::visibility::VisibleEntities>, - entity: Val<::bevy_ecs::entity::Entity>, - type_id: Val<::std::any::TypeId>| - { - let output: () = { - { - let output: () = ::bevy_render::view::visibility::VisibleEntities::push( - &mut _self, - entity.into_inner(), - type_id.into_inner(), - ) - .into(); - output - } - }; - output - }, - "", - &["_self", "entity", "type_id"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::view::visibility::VisibleEntities, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_viewport_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::Viewport, - >::new(world) - .register_documented( - "clamp_to_size", - | - mut _self: Mut<::bevy_render::camera::Viewport>, - size: Val<::bevy_math::UVec2>| - { - let output: () = { - { - let output: () = ::bevy_render::camera::Viewport::clamp_to_size( - &mut _self, - size.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Cut the viewport rectangle so that it lies inside a rectangle of the\n given size.\n If either of the viewport's position coordinates lies outside the given\n dimensions, it will be moved just inside first. If either of the given\n dimensions is zero, the position and size of the viewport rectangle will\n both be set to zero in that dimension.", - &["_self", "size"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::Viewport>| { - let output: Val<::bevy_render::camera::Viewport> = { - { - let output: Val<::bevy_render::camera::Viewport> = <::bevy_render::camera::Viewport 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_render::camera::Viewport, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_sub_camera_view_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::SubCameraView, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::SubCameraView>| { - let output: Val<::bevy_render::camera::SubCameraView> = { - { - let output: Val<::bevy_render::camera::SubCameraView> = - <::bevy_render::camera::SubCameraView as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_render::camera::SubCameraView>, - other: Ref<::bevy_render::camera::SubCameraView>| { - let output: bool = { - { - let output: bool = - <::bevy_render::camera::SubCameraView as ::std::cmp::PartialEq< - ::bevy_render::camera::SubCameraView, - >>::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_render::camera::SubCameraView, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_render_target_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::RenderTarget, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::RenderTarget>| { - let output: Val<::bevy_render::camera::RenderTarget> = { - { - let output: Val<::bevy_render::camera::RenderTarget> = - <::bevy_render::camera::RenderTarget 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_render::camera::RenderTarget, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_image_render_target_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::ImageRenderTarget, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::camera::ImageRenderTarget>| { - let output: () = { - { - let output: () = <::bevy_render::camera::ImageRenderTarget as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::ImageRenderTarget>| { - let output: Val<::bevy_render::camera::ImageRenderTarget> = { - { - let output: Val<::bevy_render::camera::ImageRenderTarget> = <::bevy_render::camera::ImageRenderTarget as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_render::camera::ImageRenderTarget>, - other: Ref<::bevy_render::camera::ImageRenderTarget>| - { - let output: bool = { - { - let output: bool = <::bevy_render::camera::ImageRenderTarget as ::std::cmp::PartialEq< - ::bevy_render::camera::ImageRenderTarget, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], + &["_self", "clip_from_view", "view_size"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_render::camera::ImageRenderTarget, + ::bevy_render::camera::TemporalJitter, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_normalized_render_target_functions(world: &mut World) { +pub(crate) fn register_mip_bias_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::NormalizedRenderTarget, + ::bevy_render::camera::MipBias, >::new(world) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::camera::NormalizedRenderTarget>| { - let output: () = { + "clone", + |_self: Ref<::bevy_render::camera::MipBias>| { + let output: Val<::bevy_render::camera::MipBias> = { { - let output: () = <::bevy_render::camera::NormalizedRenderTarget as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::bevy_render::camera::MipBias> = <::bevy_render::camera::MipBias as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2114,13 +637,25 @@ pub(crate) fn register_normalized_render_target_functions(world: &mut World) { }, "", &["_self"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_render::camera::MipBias, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_globals_uniform_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_render::globals::GlobalsUniform, + >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_render::camera::NormalizedRenderTarget>| { - let output: Val<::bevy_render::camera::NormalizedRenderTarget> = { + |_self: Ref<::bevy_render::globals::GlobalsUniform>| { + let output: Val<::bevy_render::globals::GlobalsUniform> = { { - let output: Val<::bevy_render::camera::NormalizedRenderTarget> = <::bevy_render::camera::NormalizedRenderTarget as ::std::clone::Clone>::clone( + let output: Val<::bevy_render::globals::GlobalsUniform> = <::bevy_render::globals::GlobalsUniform as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2131,117 +666,9 @@ pub(crate) fn register_normalized_render_target_functions(world: &mut World) { }, "", &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_render::camera::NormalizedRenderTarget>, - other: Ref<::bevy_render::camera::NormalizedRenderTarget>| - { - let output: bool = { - { - let output: bool = <::bevy_render::camera::NormalizedRenderTarget as ::std::cmp::PartialEq< - ::bevy_render::camera::NormalizedRenderTarget, - >>::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_render::camera::NormalizedRenderTarget, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_custom_projection_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::CustomProjection, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::CustomProjection>| { - let output: Val<::bevy_render::camera::CustomProjection> = { - { - let output: Val<::bevy_render::camera::CustomProjection> = - <::bevy_render::camera::CustomProjection 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_render::camera::CustomProjection, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_scaling_mode_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::camera::ScalingMode, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::camera::ScalingMode>| { - let output: Val<::bevy_render::camera::ScalingMode> = { - { - let output: Val<::bevy_render::camera::ScalingMode> = - <::bevy_render::camera::ScalingMode 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_render::camera::ScalingMode, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_globals_uniform_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::globals::GlobalsUniform, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::globals::GlobalsUniform>| { - let output: Val<::bevy_render::globals::GlobalsUniform> = { - { - let output: Val<::bevy_render::globals::GlobalsUniform> = - <::bevy_render::globals::GlobalsUniform 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_render::globals::GlobalsUniform, @@ -2271,10 +698,7 @@ pub(crate) fn register_shader_storage_buffer_functions(world: &mut World) { ) .register_documented( "with_size", - | - size: usize, - asset_usage: Val<::bevy_render::render_asset::RenderAssetUsages>| - { + |size: usize, asset_usage: Val<::bevy_asset::RenderAssetUsages>| { let output: Val<::bevy_render::storage::ShaderStorageBuffer> = { { let output: Val<::bevy_render::storage::ShaderStorageBuffer> = ::bevy_render::storage::ShaderStorageBuffer::with_size( @@ -2310,84 +734,18 @@ pub(crate) fn register_readback_complete_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_mesh_tag_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::mesh::MeshTag, - >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_render::mesh::MeshTag>| { - let output: () = { - { - let output: () = <::bevy_render::mesh::MeshTag as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "clone", - |_self: Ref<::bevy_render::mesh::MeshTag>| { - let output: Val<::bevy_render::mesh::MeshTag> = { - { - let output: Val<::bevy_render::mesh::MeshTag> = <::bevy_render::mesh::MeshTag as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - | - _self: Ref<::bevy_render::mesh::MeshTag>, - other: Ref<::bevy_render::mesh::MeshTag>| - { - let output: bool = { - { - let output: bool = <::bevy_render::mesh::MeshTag as ::std::cmp::PartialEq< - ::bevy_render::mesh::MeshTag, - >>::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_render::mesh::MeshTag, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_visibility_class_functions(world: &mut World) { +pub(crate) fn register_temporary_render_entity_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::visibility::VisibilityClass, + ::bevy_render::sync_world::TemporaryRenderEntity, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_render::view::visibility::VisibilityClass>| { - let output: Val<::bevy_render::view::visibility::VisibilityClass> = { + |_self: Ref<::bevy_render::sync_world::TemporaryRenderEntity>| { + let output: Val<::bevy_render::sync_world::TemporaryRenderEntity> = { { let output: Val< - ::bevy_render::view::visibility::VisibilityClass, - > = <::bevy_render::view::visibility::VisibilityClass as ::std::clone::Clone>::clone( + ::bevy_render::sync_world::TemporaryRenderEntity, + > = <::bevy_render::sync_world::TemporaryRenderEntity as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2403,22 +761,20 @@ pub(crate) fn register_visibility_class_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_render::view::visibility::VisibilityClass, + ::bevy_render::sync_world::TemporaryRenderEntity, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_temporary_render_entity_functions(world: &mut World) { +pub(crate) fn register_color_grading_global_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::sync_world::TemporaryRenderEntity, + ::bevy_render::view::ColorGradingGlobal, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_render::sync_world::TemporaryRenderEntity>| { - let output: Val<::bevy_render::sync_world::TemporaryRenderEntity> = { + |_self: Ref<::bevy_render::view::ColorGradingGlobal>| { + let output: Val<::bevy_render::view::ColorGradingGlobal> = { { - let output: Val< - ::bevy_render::sync_world::TemporaryRenderEntity, - > = <::bevy_render::sync_world::TemporaryRenderEntity as ::std::clone::Clone>::clone( + let output: Val<::bevy_render::view::ColorGradingGlobal> = <::bevy_render::view::ColorGradingGlobal as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2432,48 +788,6 @@ pub(crate) fn register_temporary_render_entity_functions(world: &mut World) { ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::sync_world::TemporaryRenderEntity, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_no_frustum_culling_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::visibility::NoFrustumCulling, - >::new(world); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::view::visibility::NoFrustumCulling, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_color_grading_global_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::ColorGradingGlobal, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::view::ColorGradingGlobal>| { - let output: Val<::bevy_render::view::ColorGradingGlobal> = { - { - let output: Val<::bevy_render::view::ColorGradingGlobal> = - <::bevy_render::view::ColorGradingGlobal 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_render::view::ColorGradingGlobal, @@ -2484,83 +798,12 @@ pub(crate) fn register_color_grading_section_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< ::bevy_render::view::ColorGradingSection, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_render::view::ColorGradingSection>| { - let output: Val<::bevy_render::view::ColorGradingSection> = { - { - let output: Val<::bevy_render::view::ColorGradingSection> = - <::bevy_render::view::ColorGradingSection as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_render::view::ColorGradingSection>, - other: Ref<::bevy_render::view::ColorGradingSection>| { - let output: bool = { - { - let output: bool = - <::bevy_render::view::ColorGradingSection as ::std::cmp::PartialEq< - ::bevy_render::view::ColorGradingSection, - >>::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_render::view::ColorGradingSection, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_visibility_range_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::visibility::VisibilityRange, - >::new(world) - .register_documented( - "abrupt", - |start: f32, end: f32| { - let output: Val<::bevy_render::view::visibility::VisibilityRange> = { - { - let output: Val< - ::bevy_render::view::visibility::VisibilityRange, - > = ::bevy_render::view::visibility::VisibilityRange::abrupt( - start, - end, - ) - .into(); - output - } - }; - output - }, - " Creates a new *abrupt* visibility range, with no crossfade.\n There will be no crossfade; the object will immediately vanish if the\n camera is closer than `start` units or farther than `end` units from the\n model.\n The `start` value must be less than or equal to the `end` value.", - &["start", "end"], - ) .register_documented( "clone", - |_self: Ref<::bevy_render::view::visibility::VisibilityRange>| { - let output: Val<::bevy_render::view::visibility::VisibilityRange> = { + |_self: Ref<::bevy_render::view::ColorGradingSection>| { + let output: Val<::bevy_render::view::ColorGradingSection> = { { - let output: Val< - ::bevy_render::view::visibility::VisibilityRange, - > = <::bevy_render::view::visibility::VisibilityRange as ::std::clone::Clone>::clone( + let output: Val<::bevy_render::view::ColorGradingSection> = <::bevy_render::view::ColorGradingSection as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -2575,13 +818,13 @@ pub(crate) fn register_visibility_range_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_render::view::visibility::VisibilityRange>, - other: Ref<::bevy_render::view::visibility::VisibilityRange>| + _self: Ref<::bevy_render::view::ColorGradingSection>, + other: Ref<::bevy_render::view::ColorGradingSection>| { let output: bool = { { - let output: bool = <::bevy_render::view::visibility::VisibilityRange as ::std::cmp::PartialEq< - ::bevy_render::view::visibility::VisibilityRange, + let output: bool = <::bevy_render::view::ColorGradingSection as ::std::cmp::PartialEq< + ::bevy_render::view::ColorGradingSection, >>::eq(&_self, &other) .into(); output @@ -2591,35 +834,53 @@ pub(crate) fn register_visibility_range_functions(world: &mut World) { }, "", &["_self", "other"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_render::view::ColorGradingSection, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_screenshot_captured_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_render::view::screenshot::ScreenshotCaptured, + >::new(world); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_render::view::screenshot::ScreenshotCaptured, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_screenshot_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_render::view::screenshot::Screenshot, + >::new(world) .register_documented( - "is_abrupt", - |_self: Ref<::bevy_render::view::visibility::VisibilityRange>| { - let output: bool = { + "primary_window", + || { + let output: Val<::bevy_render::view::screenshot::Screenshot> = { { - let output: bool = ::bevy_render::view::visibility::VisibilityRange::is_abrupt( - &_self, - ) + let output: Val<::bevy_render::view::screenshot::Screenshot> = ::bevy_render::view::screenshot::Screenshot::primary_window() .into(); output } }; output }, - " Returns true if both the start and end transitions for this range are\n abrupt: that is, there is no crossfading.", - &["_self"], + " Capture a screenshot of the primary window, if one exists.", + &[], ) .register_documented( - "is_culled", - | - _self: Ref<::bevy_render::view::visibility::VisibilityRange>, - camera_distance: f32| - { - let output: bool = { + "texture_view", + |texture_view: Val<::bevy_camera::ManualTextureViewHandle>| { + let output: Val<::bevy_render::view::screenshot::Screenshot> = { { - let output: bool = ::bevy_render::view::visibility::VisibilityRange::is_culled( - &_self, - camera_distance, + let output: Val<::bevy_render::view::screenshot::Screenshot> = ::bevy_render::view::screenshot::Screenshot::texture_view( + texture_view.into_inner(), ) .into(); output @@ -2627,20 +888,16 @@ pub(crate) fn register_visibility_range_functions(world: &mut World) { }; output }, - " Returns true if the object is completely invisible, given a camera\n `camera_distance` units away.\n This is equivalent to `!VisibilityRange::is_visible_at_all()`.", - &["_self", "camera_distance"], + " Capture a screenshot of the provided manual texture view.", + &["texture_view"], ) .register_documented( - "is_visible_at_all", - | - _self: Ref<::bevy_render::view::visibility::VisibilityRange>, - camera_distance: f32| - { - let output: bool = { + "window", + |window: Val<::bevy_ecs::entity::Entity>| { + let output: Val<::bevy_render::view::screenshot::Screenshot> = { { - let output: bool = ::bevy_render::view::visibility::VisibilityRange::is_visible_at_all( - &_self, - camera_distance, + let output: Val<::bevy_render::view::screenshot::Screenshot> = ::bevy_render::view::screenshot::Screenshot::window( + window.into_inner(), ) .into(); output @@ -2648,90 +905,14 @@ pub(crate) fn register_visibility_range_functions(world: &mut World) { }; output }, - " Returns true if the object will be visible at all, given a camera\n `camera_distance` units away.\n Any amount of visibility, even with the heaviest dithering applied, is\n considered visible according to this check.", - &["_self", "camera_distance"], + " Capture a screenshot of the provided window entity.", + &["window"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_render::view::visibility::VisibilityRange, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_screenshot_captured_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::window::screenshot::ScreenshotCaptured, - >::new(world); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::view::window::screenshot::ScreenshotCaptured, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_screenshot_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_render::view::window::screenshot::Screenshot, - >::new(world) - .register_documented( - "primary_window", - || { - let output: Val<::bevy_render::view::window::screenshot::Screenshot> = { - { - let output: Val<::bevy_render::view::window::screenshot::Screenshot> = - ::bevy_render::view::window::screenshot::Screenshot::primary_window() - .into(); - output - } - }; - output - }, - " Capture a screenshot of the primary window, if one exists.", - &[], - ) - .register_documented( - "texture_view", - |texture_view: Val<::bevy_render::camera::ManualTextureViewHandle>| { - let output: Val<::bevy_render::view::window::screenshot::Screenshot> = { - { - let output: Val<::bevy_render::view::window::screenshot::Screenshot> = - ::bevy_render::view::window::screenshot::Screenshot::texture_view( - texture_view.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Capture a screenshot of the provided manual texture view.", - &["texture_view"], - ) - .register_documented( - "window", - |window: Val<::bevy_ecs::entity::Entity>| { - let output: Val<::bevy_render::view::window::screenshot::Screenshot> = { - { - let output: Val<::bevy_render::view::window::screenshot::Screenshot> = - ::bevy_render::view::window::screenshot::Screenshot::window( - window.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Capture a screenshot of the provided window entity.", - &["window"], - ); - let registry = world.get_resource_or_init::(); - let mut registry = registry.write(); - registry - .register_type_data::< - ::bevy_render::view::window::screenshot::Screenshot, + ::bevy_render::view::screenshot::Screenshot, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -2739,51 +920,23 @@ impl Plugin for BevyRenderScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); register_alpha_mode_functions(&mut world); - register_camera_functions(&mut world); - register_clear_color_functions(&mut world); - register_clear_color_config_functions(&mut world); - register_orthographic_projection_functions(&mut world); - register_perspective_projection_functions(&mut world); - register_projection_functions(&mut world); - register_mesh_2_d_functions(&mut world); - register_mesh_3_d_functions(&mut world); - register_inherited_visibility_functions(&mut world); register_msaa_functions(&mut world); - register_view_visibility_functions(&mut world); - register_visibility_functions(&mut world); - register_sync_to_render_world_functions(&mut world); - register_aabb_functions(&mut world); - register_cascades_frusta_functions(&mut world); - register_cubemap_frusta_functions(&mut world); - register_frustum_functions(&mut world); + register_main_entity_functions(&mut world); register_occlusion_culling_functions(&mut world); + register_render_entity_functions(&mut world); + register_sync_to_render_world_functions(&mut world); + register_color_grading_functions(&mut world); + register_hdr_functions(&mut world); + register_render_visible_entities_functions(&mut world); register_camera_render_graph_functions(&mut world); - register_camera_main_texture_usages_functions(&mut world); - register_exposure_functions(&mut world); register_temporal_jitter_functions(&mut world); register_mip_bias_functions(&mut world); - register_manual_texture_view_handle_functions(&mut world); - register_color_grading_functions(&mut world); - register_render_layers_functions(&mut world); - register_render_visible_entities_functions(&mut world); - register_visible_entities_functions(&mut world); - register_viewport_functions(&mut world); - register_sub_camera_view_functions(&mut world); - register_render_target_functions(&mut world); - register_image_render_target_functions(&mut world); - register_normalized_render_target_functions(&mut world); - register_custom_projection_functions(&mut world); - register_scaling_mode_functions(&mut world); register_globals_uniform_functions(&mut world); register_shader_storage_buffer_functions(&mut world); register_readback_complete_functions(&mut world); - register_mesh_tag_functions(&mut world); - register_visibility_class_functions(&mut world); register_temporary_render_entity_functions(&mut world); - register_no_frustum_culling_functions(&mut world); register_color_grading_global_functions(&mut world); register_color_grading_section_functions(&mut world); - register_visibility_range_functions(&mut world); register_screenshot_captured_functions(&mut world); register_screenshot_functions(&mut world); } diff --git a/crates/bindings/bevy_scene_bms_bindings/Cargo.toml b/crates/bindings/bevy_scene_bms_bindings/Cargo.toml index 257402def5..0967671b81 100644 --- a/crates/bindings/bevy_scene_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_scene_bms_bindings/Cargo.toml @@ -17,37 +17,29 @@ 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.16.1", features = [ - "bevy_render", - "serialize", -], default-features = true } +bevy_scene = { version = "0.17.2", features = ["serialize"], default-features = true} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_derive = { version = "^0.16.1", features = [], default-features = true } +bevy_camera = { version = "^0.17.2", features = [], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [ - "serialize", -], default-features = false } +bevy_derive = { version = "^0.17.2", features = [], default-features = true} -bevy_platform = { version = "^0.16.1", features = [ - "serialize", -], default-features = false } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_platform = { version = "^0.17.2", features = ["alloc", "serialize", "std"], default-features = true} -bevy_render = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} + +serde = { version = "^1.0", features = [], default-features = true} + +uuid = { version = "^1.13.1", features = ["serde"], default-features = false} -serde = { version = "^1.0", features = [], default-features = true } -uuid = { version = "^1.13.1", features = [ - "serde", - "serde", -], default-features = false } diff --git a/crates/bindings/bevy_scene_bms_bindings/src/lib.rs b/crates/bindings/bevy_scene_bms_bindings/src/lib.rs index 3ca1da2c6e..20fa0b4e58 100644 --- a/crates/bindings/bevy_scene_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_scene_bms_bindings/src/lib.rs @@ -1,27 +1,30 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevySceneScriptingPlugin; pub(crate) fn register_dynamic_scene_root_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_scene::prelude::DynamicSceneRoot, + ::bevy_scene::DynamicSceneRoot, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_scene::prelude::DynamicSceneRoot>| { + |_self: Ref<::bevy_scene::DynamicSceneRoot>| { let output: () = { { - let output: () = <::bevy_scene::prelude::DynamicSceneRoot as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_scene::DynamicSceneRoot as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -35,10 +38,10 @@ pub(crate) fn register_dynamic_scene_root_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_scene::prelude::DynamicSceneRoot>| { - let output: Val<::bevy_scene::prelude::DynamicSceneRoot> = { + |_self: Ref<::bevy_scene::DynamicSceneRoot>| { + let output: Val<::bevy_scene::DynamicSceneRoot> = { { - let output: Val<::bevy_scene::prelude::DynamicSceneRoot> = <::bevy_scene::prelude::DynamicSceneRoot as ::std::clone::Clone>::clone( + let output: Val<::bevy_scene::DynamicSceneRoot> = <::bevy_scene::DynamicSceneRoot as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -53,13 +56,13 @@ pub(crate) fn register_dynamic_scene_root_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_scene::prelude::DynamicSceneRoot>, - other: Ref<::bevy_scene::prelude::DynamicSceneRoot>| + _self: Ref<::bevy_scene::DynamicSceneRoot>, + other: Ref<::bevy_scene::DynamicSceneRoot>| { let output: bool = { { - let output: bool = <::bevy_scene::prelude::DynamicSceneRoot as ::std::cmp::PartialEq< - ::bevy_scene::prelude::DynamicSceneRoot, + let output: bool = <::bevy_scene::DynamicSceneRoot as ::std::cmp::PartialEq< + ::bevy_scene::DynamicSceneRoot, >>::eq(&_self, &other) .into(); output @@ -74,20 +77,20 @@ pub(crate) fn register_dynamic_scene_root_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_scene::prelude::DynamicSceneRoot, + ::bevy_scene::DynamicSceneRoot, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_scene_root_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_scene::prelude::SceneRoot, + ::bevy_scene::SceneRoot, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_scene::prelude::SceneRoot>| { + |_self: Ref<::bevy_scene::SceneRoot>| { let output: () = { { - let output: () = <::bevy_scene::prelude::SceneRoot as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_scene::SceneRoot as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -101,10 +104,10 @@ pub(crate) fn register_scene_root_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_scene::prelude::SceneRoot>| { - let output: Val<::bevy_scene::prelude::SceneRoot> = { + |_self: Ref<::bevy_scene::SceneRoot>| { + let output: Val<::bevy_scene::SceneRoot> = { { - let output: Val<::bevy_scene::prelude::SceneRoot> = <::bevy_scene::prelude::SceneRoot as ::std::clone::Clone>::clone( + let output: Val<::bevy_scene::SceneRoot> = <::bevy_scene::SceneRoot as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -118,14 +121,11 @@ pub(crate) fn register_scene_root_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_scene::prelude::SceneRoot>, - other: Ref<::bevy_scene::prelude::SceneRoot>| - { + |_self: Ref<::bevy_scene::SceneRoot>, other: Ref<::bevy_scene::SceneRoot>| { let output: bool = { { - let output: bool = <::bevy_scene::prelude::SceneRoot as ::std::cmp::PartialEq< - ::bevy_scene::prelude::SceneRoot, + let output: bool = <::bevy_scene::SceneRoot as ::std::cmp::PartialEq< + ::bevy_scene::SceneRoot, >>::eq(&_self, &other) .into(); output @@ -140,7 +140,7 @@ pub(crate) fn register_scene_root_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_scene::prelude::SceneRoot, + ::bevy_scene::SceneRoot, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } diff --git a/crates/bindings/bevy_sprite_bms_bindings/Cargo.toml b/crates/bindings/bevy_sprite_bms_bindings/Cargo.toml index 5df1ed4c40..86a4241cb6 100644 --- a/crates/bindings/bevy_sprite_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_sprite_bms_bindings/Cargo.toml @@ -17,49 +17,37 @@ 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.16.1", features = [ - "bevy_picking", - "bevy_window", - "bevy_sprite_picking_backend", - "webgl", -], default-features = true } +bevy_sprite = { version = "0.17.2", features = ["bevy_picking", "bevy_sprite_picking_backend", "bevy_text", "bevy_window"], default-features = true} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.16.2", features = [], default-features = true } +bevy_camera = { version = "^0.17.2", features = [], default-features = true} -bevy_core_pipeline = { version = "^0.16.1", features = [ -], default-features = true } +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_derive = { version = "^0.16.1", features = [], default-features = true } +bevy_derive = { version = "^0.17.2", features = [], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.16.1", features = [], default-features = true } +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_math = { version = "^0.16.1", features = [], default-features = true } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_picking = { version = "^0.16.1", features = [], default-features = true } +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_picking = { version = "^0.17.2", features = ["bevy_mesh_picking_backend"], default-features = true} -bevy_render = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +bevy_text = { version = "^0.17.2", features = ["default_font"], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} -bevy_window = { version = "^0.16.1", features = [], default-features = true } +bevy_window = { version = "^0.17.2", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} -bitflags = { version = "^2.3", features = [], default-features = true } +radsort = { version = "^0.1", features = [], default-features = true} -bytemuck = { version = "^1", features = [], default-features = true } -fixedbitset = { version = "^0.5", features = [], default-features = true } - -nonmax = { version = "^0.5", features = [], 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 2595f269c4..a6fddab100 100644 --- a/crates/bindings/bevy_sprite_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_sprite_bms_bindings/src/lib.rs @@ -1,27 +1,30 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevySpriteScriptingPlugin; pub(crate) fn register_sprite_picking_camera_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::prelude::SpritePickingCamera, + ::bevy_sprite::SpritePickingCamera, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_sprite::prelude::SpritePickingCamera>| { - let output: Val<::bevy_sprite::prelude::SpritePickingCamera> = { + |_self: Ref<::bevy_sprite::SpritePickingCamera>| { + let output: Val<::bevy_sprite::SpritePickingCamera> = { { - let output: Val<::bevy_sprite::prelude::SpritePickingCamera> = <::bevy_sprite::prelude::SpritePickingCamera as ::std::clone::Clone>::clone( + let output: Val<::bevy_sprite::SpritePickingCamera> = <::bevy_sprite::SpritePickingCamera as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -37,105 +40,136 @@ pub(crate) fn register_sprite_picking_camera_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_sprite::prelude::SpritePickingCamera, + ::bevy_sprite::SpritePickingCamera, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_sprite_picking_mode_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::prelude::SpritePickingMode, + ::bevy_sprite::SpritePickingMode, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_sprite::prelude::SpritePickingMode>| { - let output: Val<::bevy_sprite::prelude::SpritePickingMode> = { - { - let output: Val<::bevy_sprite::prelude::SpritePickingMode> = - <::bevy_sprite::prelude::SpritePickingMode as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_sprite::SpritePickingMode>| { + let output: Val<::bevy_sprite::SpritePickingMode> = { + { + let output: Val<::bevy_sprite::SpritePickingMode> = <::bevy_sprite::SpritePickingMode 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_sprite::prelude::SpritePickingMode, + ::bevy_sprite::SpritePickingMode, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_sprite_picking_settings_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::prelude::SpritePickingSettings, + ::bevy_sprite::SpritePickingSettings, >::new(world); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_sprite::prelude::SpritePickingSettings, + ::bevy_sprite::SpritePickingSettings, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_text_2_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite::Text2d, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite::Text2d>| { + let output: Val<::bevy_sprite::Text2d> = { + { + let output: Val<::bevy_sprite::Text2d> = <::bevy_sprite::Text2d 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_sprite::Text2d, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_sprite_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::prelude::Sprite, + ::bevy_sprite::Sprite, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_sprite::prelude::Sprite>| { - let output: Val<::bevy_sprite::prelude::Sprite> = { - { - let output: Val<::bevy_sprite::prelude::Sprite> = - <::bevy_sprite::prelude::Sprite as ::std::clone::Clone>::clone(&_self) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite::Sprite>| { + let output: Val<::bevy_sprite::Sprite> = { + { + let output: Val<::bevy_sprite::Sprite> = <::bevy_sprite::Sprite as ::std::clone::Clone>::clone( + &_self, + ) .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "sized", - |custom_size: Val<::bevy_math::Vec2>| { - let output: Val<::bevy_sprite::prelude::Sprite> = { - { - let output: Val<::bevy_sprite::prelude::Sprite> = - ::bevy_sprite::prelude::Sprite::sized(custom_size.into_inner()).into(); - output - } - }; - output - }, - " Create a Sprite with a custom size", - &["custom_size"], - ); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "sized", + |custom_size: Val<::glam::Vec2>| { + let output: Val<::bevy_sprite::Sprite> = { + { + let output: Val<::bevy_sprite::Sprite> = ::bevy_sprite::Sprite::sized( + custom_size.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Create a Sprite with a custom size", + &["custom_size"], + ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_sprite::prelude::Sprite, + ::bevy_sprite::Sprite, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_sprite_image_mode_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::prelude::SpriteImageMode, + ::bevy_sprite::SpriteImageMode, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_sprite::prelude::SpriteImageMode>| { - let output: Val<::bevy_sprite::prelude::SpriteImageMode> = { + |_self: Ref<::bevy_sprite::SpriteImageMode>| { + let output: Val<::bevy_sprite::SpriteImageMode> = { { - let output: Val<::bevy_sprite::prelude::SpriteImageMode> = <::bevy_sprite::prelude::SpriteImageMode as ::std::clone::Clone>::clone( + let output: Val<::bevy_sprite::SpriteImageMode> = <::bevy_sprite::SpriteImageMode as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -150,13 +184,13 @@ pub(crate) fn register_sprite_image_mode_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_sprite::prelude::SpriteImageMode>, - other: Ref<::bevy_sprite::prelude::SpriteImageMode>| + _self: Ref<::bevy_sprite::SpriteImageMode>, + other: Ref<::bevy_sprite::SpriteImageMode>| { let output: bool = { { - let output: bool = <::bevy_sprite::prelude::SpriteImageMode as ::std::cmp::PartialEq< - ::bevy_sprite::prelude::SpriteImageMode, + let output: bool = <::bevy_sprite::SpriteImageMode as ::std::cmp::PartialEq< + ::bevy_sprite::SpriteImageMode, >>::eq(&_self, &other) .into(); output @@ -169,10 +203,10 @@ pub(crate) fn register_sprite_image_mode_functions(world: &mut World) { ) .register_documented( "uses_slices", - |_self: Ref<::bevy_sprite::prelude::SpriteImageMode>| { + |_self: Ref<::bevy_sprite::SpriteImageMode>| { let output: bool = { { - let output: bool = ::bevy_sprite::prelude::SpriteImageMode::uses_slices( + let output: bool = ::bevy_sprite::SpriteImageMode::uses_slices( &_self, ) .into(); @@ -188,20 +222,37 @@ pub(crate) fn register_sprite_image_mode_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_sprite::prelude::SpriteImageMode, + ::bevy_sprite::SpriteImageMode, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_border_rect_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::prelude::BorderRect, + ::bevy_sprite::BorderRect, >::new(world) + .register_documented( + "add", + |_self: Val<::bevy_sprite::BorderRect>, rhs: Val<::bevy_sprite::BorderRect>| { + let output: Val<::bevy_sprite::BorderRect> = { + { + let output: Val<::bevy_sprite::BorderRect> = <::bevy_sprite::BorderRect as ::std::ops::Add< + ::bevy_sprite::BorderRect, + >>::add(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "all", |extent: f32| { - let output: Val<::bevy_sprite::prelude::BorderRect> = { + let output: Val<::bevy_sprite::BorderRect> = { { - let output: Val<::bevy_sprite::prelude::BorderRect> = ::bevy_sprite::prelude::BorderRect::all( + let output: Val<::bevy_sprite::BorderRect> = ::bevy_sprite::BorderRect::all( extent, ) .into(); @@ -216,9 +267,9 @@ pub(crate) fn register_border_rect_functions(world: &mut World) { .register_documented( "axes", |horizontal: f32, vertical: f32| { - let output: Val<::bevy_sprite::prelude::BorderRect> = { + let output: Val<::bevy_sprite::BorderRect> = { { - let output: Val<::bevy_sprite::prelude::BorderRect> = ::bevy_sprite::prelude::BorderRect::axes( + let output: Val<::bevy_sprite::BorderRect> = ::bevy_sprite::BorderRect::axes( horizontal, vertical, ) @@ -233,10 +284,10 @@ pub(crate) fn register_border_rect_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_sprite::prelude::BorderRect>| { - let output: Val<::bevy_sprite::prelude::BorderRect> = { + |_self: Ref<::bevy_sprite::BorderRect>| { + let output: Val<::bevy_sprite::BorderRect> = { { - let output: Val<::bevy_sprite::prelude::BorderRect> = <::bevy_sprite::prelude::BorderRect as ::std::clone::Clone>::clone( + let output: Val<::bevy_sprite::BorderRect> = <::bevy_sprite::BorderRect as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -248,16 +299,33 @@ pub(crate) fn register_border_rect_functions(world: &mut World) { "", &["_self"], ) + .register_documented( + "div", + |_self: Val<::bevy_sprite::BorderRect>, rhs: f32| { + let output: Val<::bevy_sprite::BorderRect> = { + { + let output: Val<::bevy_sprite::BorderRect> = <::bevy_sprite::BorderRect as ::std::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) .register_documented( "eq", | - _self: Ref<::bevy_sprite::prelude::BorderRect>, - other: Ref<::bevy_sprite::prelude::BorderRect>| + _self: Ref<::bevy_sprite::BorderRect>, + other: Ref<::bevy_sprite::BorderRect>| { let output: bool = { { - let output: bool = <::bevy_sprite::prelude::BorderRect as ::std::cmp::PartialEq< - ::bevy_sprite::prelude::BorderRect, + let output: bool = <::bevy_sprite::BorderRect as ::std::cmp::PartialEq< + ::bevy_sprite::BorderRect, >>::eq(&_self, &other) .into(); output @@ -267,217 +335,59 @@ pub(crate) fn register_border_rect_functions(world: &mut World) { }, "", &["_self", "other"], + ) + .register_documented( + "mul", + |_self: Val<::bevy_sprite::BorderRect>, rhs: f32| { + let output: Val<::bevy_sprite::BorderRect> = { + { + let output: Val<::bevy_sprite::BorderRect> = <::bevy_sprite::BorderRect as ::std::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "sub", + |_self: Val<::bevy_sprite::BorderRect>, rhs: Val<::bevy_sprite::BorderRect>| { + let output: Val<::bevy_sprite::BorderRect> = { + { + let output: Val<::bevy_sprite::BorderRect> = <::bevy_sprite::BorderRect as ::std::ops::Sub< + ::bevy_sprite::BorderRect, + >>::sub(_self.into_inner(), rhs.into_inner()) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_sprite::prelude::BorderRect, + ::bevy_sprite::BorderRect, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_slice_scale_mode_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::prelude::SliceScaleMode, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_sprite::prelude::SliceScaleMode>| { - let output: Val<::bevy_sprite::prelude::SliceScaleMode> = { - { - let output: Val<::bevy_sprite::prelude::SliceScaleMode> = - <::bevy_sprite::prelude::SliceScaleMode as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_sprite::prelude::SliceScaleMode>, - other: Ref<::bevy_sprite::prelude::SliceScaleMode>| { - let output: bool = { - { - let output: bool = - <::bevy_sprite::prelude::SliceScaleMode as ::std::cmp::PartialEq< - ::bevy_sprite::prelude::SliceScaleMode, - >>::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_sprite::prelude::SliceScaleMode, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_texture_slicer_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::prelude::TextureSlicer, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_sprite::prelude::TextureSlicer>| { - let output: Val<::bevy_sprite::prelude::TextureSlicer> = { - { - let output: Val<::bevy_sprite::prelude::TextureSlicer> = - <::bevy_sprite::prelude::TextureSlicer as ::std::clone::Clone>::clone( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_sprite::prelude::TextureSlicer>, - other: Ref<::bevy_sprite::prelude::TextureSlicer>| { - let output: bool = { - { - let output: bool = - <::bevy_sprite::prelude::TextureSlicer as ::std::cmp::PartialEq< - ::bevy_sprite::prelude::TextureSlicer, - >>::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_sprite::prelude::TextureSlicer, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_color_material_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::prelude::ColorMaterial, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_sprite::prelude::ColorMaterial>| { - let output: Val<::bevy_sprite::prelude::ColorMaterial> = { - { - let output: Val<::bevy_sprite::prelude::ColorMaterial> = - <::bevy_sprite::prelude::ColorMaterial 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_sprite::prelude::ColorMaterial, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_scaling_mode_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::prelude::ScalingMode, + ::bevy_sprite::SliceScaleMode, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_sprite::prelude::ScalingMode>| { - let output: Val<::bevy_sprite::prelude::ScalingMode> = { - { - let output: Val<::bevy_sprite::prelude::ScalingMode> = - <::bevy_sprite::prelude::ScalingMode as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_sprite::prelude::ScalingMode>, - other: Ref<::bevy_sprite::prelude::ScalingMode>| { - let output: bool = { - { - let output: bool = - <::bevy_sprite::prelude::ScalingMode as ::std::cmp::PartialEq< - ::bevy_sprite::prelude::ScalingMode, - >>::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_sprite::prelude::ScalingMode, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_anchor_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::Anchor, - >::new(world) - .register_documented( - "as_vec", - |_self: Ref<::bevy_sprite::Anchor>| { - let output: Val<::bevy_math::Vec2> = { - { - let output: Val<::bevy_math::Vec2> = ::bevy_sprite::Anchor::as_vec( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) .register_documented( "clone", - |_self: Ref<::bevy_sprite::Anchor>| { - let output: Val<::bevy_sprite::Anchor> = { + |_self: Ref<::bevy_sprite::SliceScaleMode>| { + let output: Val<::bevy_sprite::SliceScaleMode> = { { - let output: Val<::bevy_sprite::Anchor> = <::bevy_sprite::Anchor as ::std::clone::Clone>::clone( + let output: Val<::bevy_sprite::SliceScaleMode> = <::bevy_sprite::SliceScaleMode as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -491,11 +401,14 @@ pub(crate) fn register_anchor_functions(world: &mut World) { ) .register_documented( "eq", - |_self: Ref<::bevy_sprite::Anchor>, other: Ref<::bevy_sprite::Anchor>| { + | + _self: Ref<::bevy_sprite::SliceScaleMode>, + other: Ref<::bevy_sprite::SliceScaleMode>| + { let output: bool = { { - let output: bool = <::bevy_sprite::Anchor as ::std::cmp::PartialEq< - ::bevy_sprite::Anchor, + let output: bool = <::bevy_sprite::SliceScaleMode as ::std::cmp::PartialEq< + ::bevy_sprite::SliceScaleMode, >>::eq(&_self, &other) .into(); output @@ -509,19 +422,21 @@ pub(crate) fn register_anchor_functions(world: &mut World) { let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_sprite::Anchor, bevy_mod_scripting_bindings::MarkAsGenerated>( - ); + .register_type_data::< + ::bevy_sprite::SliceScaleMode, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } -pub(crate) fn register_alpha_mode_2_d_functions(world: &mut World) { +pub(crate) fn register_texture_slicer_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::AlphaMode2d, + ::bevy_sprite::TextureSlicer, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_sprite::AlphaMode2d>| { - let output: Val<::bevy_sprite::AlphaMode2d> = { + |_self: Ref<::bevy_sprite::TextureSlicer>| { + let output: Val<::bevy_sprite::TextureSlicer> = { { - let output: Val<::bevy_sprite::AlphaMode2d> = <::bevy_sprite::AlphaMode2d as ::std::clone::Clone>::clone( + let output: Val<::bevy_sprite::TextureSlicer> = <::bevy_sprite::TextureSlicer as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -536,13 +451,13 @@ pub(crate) fn register_alpha_mode_2_d_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_sprite::AlphaMode2d>, - other: Ref<::bevy_sprite::AlphaMode2d>| + _self: Ref<::bevy_sprite::TextureSlicer>, + other: Ref<::bevy_sprite::TextureSlicer>| { let output: bool = { { - let output: bool = <::bevy_sprite::AlphaMode2d as ::std::cmp::PartialEq< - ::bevy_sprite::AlphaMode2d, + let output: bool = <::bevy_sprite::TextureSlicer as ::std::cmp::PartialEq< + ::bevy_sprite::TextureSlicer, >>::eq(&_self, &other) .into(); output @@ -557,65 +472,20 @@ pub(crate) fn register_alpha_mode_2_d_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_sprite::AlphaMode2d, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_wireframe_2_d_material_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::Wireframe2dMaterial, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_sprite::Wireframe2dMaterial>| { - let output: Val<::bevy_sprite::Wireframe2dMaterial> = { - { - let output: Val<::bevy_sprite::Wireframe2dMaterial> = - <::bevy_sprite::Wireframe2dMaterial 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_sprite::Wireframe2dMaterial, + ::bevy_sprite::TextureSlicer, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_no_wireframe_2_d_functions(world: &mut World) { +pub(crate) fn register_scaling_mode_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::NoWireframe2d, + ::bevy_sprite::ScalingMode, >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_sprite::NoWireframe2d>| { - let output: () = { - { - let output: () = <::bevy_sprite::NoWireframe2d as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) .register_documented( "clone", - |_self: Ref<::bevy_sprite::NoWireframe2d>| { - let output: Val<::bevy_sprite::NoWireframe2d> = { + |_self: Ref<::bevy_sprite::ScalingMode>| { + let output: Val<::bevy_sprite::ScalingMode> = { { - let output: Val<::bevy_sprite::NoWireframe2d> = <::bevy_sprite::NoWireframe2d as ::std::clone::Clone>::clone( + let output: Val<::bevy_sprite::ScalingMode> = <::bevy_sprite::ScalingMode as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -630,13 +500,13 @@ pub(crate) fn register_no_wireframe_2_d_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_sprite::NoWireframe2d>, - other: Ref<::bevy_sprite::NoWireframe2d>| + _self: Ref<::bevy_sprite::ScalingMode>, + other: Ref<::bevy_sprite::ScalingMode>| { let output: bool = { { - let output: bool = <::bevy_sprite::NoWireframe2d as ::std::cmp::PartialEq< - ::bevy_sprite::NoWireframe2d, + let output: bool = <::bevy_sprite::ScalingMode as ::std::cmp::PartialEq< + ::bevy_sprite::ScalingMode, >>::eq(&_self, &other) .into(); output @@ -651,76 +521,20 @@ pub(crate) fn register_no_wireframe_2_d_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_sprite::NoWireframe2d, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_wireframe_2_d_config_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::Wireframe2dConfig, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_sprite::Wireframe2dConfig>| { - let output: Val<::bevy_sprite::Wireframe2dConfig> = { - { - let output: Val<::bevy_sprite::Wireframe2dConfig> = - <::bevy_sprite::Wireframe2dConfig 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_sprite::Wireframe2dConfig, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_wireframe_2_d_color_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::Wireframe2dColor, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_sprite::Wireframe2dColor>| { - let output: Val<::bevy_sprite::Wireframe2dColor> = { - { - let output: Val<::bevy_sprite::Wireframe2dColor> = - <::bevy_sprite::Wireframe2dColor 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_sprite::Wireframe2dColor, + ::bevy_sprite::ScalingMode, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_wireframe_2_d_functions(world: &mut World) { +pub(crate) fn register_anchor_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::Wireframe2d, + ::bevy_sprite::Anchor, >::new(world) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_sprite::Wireframe2d>| { - let output: () = { + "as_vec", + |_self: Ref<::bevy_sprite::Anchor>| { + let output: Val<::glam::Vec2> = { { - let output: () = <::bevy_sprite::Wireframe2d as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::glam::Vec2> = ::bevy_sprite::Anchor::as_vec( &_self, ) .into(); @@ -734,10 +548,10 @@ pub(crate) fn register_wireframe_2_d_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_sprite::Wireframe2d>| { - let output: Val<::bevy_sprite::Wireframe2d> = { + |_self: Ref<::bevy_sprite::Anchor>| { + let output: Val<::bevy_sprite::Anchor> = { { - let output: Val<::bevy_sprite::Wireframe2d> = <::bevy_sprite::Wireframe2d as ::std::clone::Clone>::clone( + let output: Val<::bevy_sprite::Anchor> = <::bevy_sprite::Anchor as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -751,14 +565,11 @@ pub(crate) fn register_wireframe_2_d_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_sprite::Wireframe2d>, - other: Ref<::bevy_sprite::Wireframe2d>| - { + |_self: Ref<::bevy_sprite::Anchor>, other: Ref<::bevy_sprite::Anchor>| { let output: bool = { { - let output: bool = <::bevy_sprite::Wireframe2d as ::std::cmp::PartialEq< - ::bevy_sprite::Wireframe2d, + let output: bool = <::bevy_sprite::Anchor as ::std::cmp::PartialEq< + ::bevy_sprite::Anchor, >>::eq(&_self, &other) .into(); output @@ -773,37 +584,20 @@ pub(crate) fn register_wireframe_2_d_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_sprite::Wireframe2d, + ::bevy_sprite::Anchor, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_mesh_2_d_wireframe_functions(world: &mut World) { +pub(crate) fn register_text_2_d_shadow_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_sprite::Mesh2dWireframe, + ::bevy_sprite::Text2dShadow, >::new(world) - .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_sprite::Mesh2dWireframe>| { - let output: () = { - { - let output: () = <::bevy_sprite::Mesh2dWireframe as ::std::cmp::Eq>::assert_receiver_is_total_eq( - &_self, - ) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) .register_documented( "clone", - |_self: Ref<::bevy_sprite::Mesh2dWireframe>| { - let output: Val<::bevy_sprite::Mesh2dWireframe> = { + |_self: Ref<::bevy_sprite::Text2dShadow>| { + let output: Val<::bevy_sprite::Text2dShadow> = { { - let output: Val<::bevy_sprite::Mesh2dWireframe> = <::bevy_sprite::Mesh2dWireframe as ::std::clone::Clone>::clone( + let output: Val<::bevy_sprite::Text2dShadow> = <::bevy_sprite::Text2dShadow as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -818,13 +612,13 @@ pub(crate) fn register_mesh_2_d_wireframe_functions(world: &mut World) { .register_documented( "eq", | - _self: Ref<::bevy_sprite::Mesh2dWireframe>, - other: Ref<::bevy_sprite::Mesh2dWireframe>| + _self: Ref<::bevy_sprite::Text2dShadow>, + other: Ref<::bevy_sprite::Text2dShadow>| { let output: bool = { { - let output: bool = <::bevy_sprite::Mesh2dWireframe as ::std::cmp::PartialEq< - ::bevy_sprite::Mesh2dWireframe, + let output: bool = <::bevy_sprite::Text2dShadow as ::std::cmp::PartialEq< + ::bevy_sprite::Text2dShadow, >>::eq(&_self, &other) .into(); output @@ -839,7 +633,7 @@ pub(crate) fn register_mesh_2_d_wireframe_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_sprite::Mesh2dWireframe, + ::bevy_sprite::Text2dShadow, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -849,20 +643,14 @@ impl Plugin for BevySpriteScriptingPlugin { register_sprite_picking_camera_functions(&mut world); register_sprite_picking_mode_functions(&mut world); register_sprite_picking_settings_functions(&mut world); + register_text_2_d_functions(&mut world); register_sprite_functions(&mut world); register_sprite_image_mode_functions(&mut world); register_border_rect_functions(&mut world); register_slice_scale_mode_functions(&mut world); register_texture_slicer_functions(&mut world); - register_color_material_functions(&mut world); register_scaling_mode_functions(&mut world); register_anchor_functions(&mut world); - register_alpha_mode_2_d_functions(&mut world); - register_wireframe_2_d_material_functions(&mut world); - register_no_wireframe_2_d_functions(&mut world); - register_wireframe_2_d_config_functions(&mut world); - register_wireframe_2_d_color_functions(&mut world); - register_wireframe_2_d_functions(&mut world); - register_mesh_2_d_wireframe_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 new file mode 100644 index 0000000000..26b137bab4 --- /dev/null +++ b/crates/bindings/bevy_sprite_render_bms_bindings/Cargo.toml @@ -0,0 +1,65 @@ +[package] +name = "bevy_sprite_render_bms_bindings" +description = "Automatically generated bindings for bevy_sprite_render crate" +readme = "README.md" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +keywords.workspace = true +categories.workspace = true + +[dependencies] + + +bevy_mod_scripting_core = { workspace = true } +bevy_mod_scripting_bindings = { workspace = true } +bevy_mod_scripting_derive = { workspace = true } +bevy_sprite_render = { version = "0.17.2", features = ["bevy_text", "webgl"], default-features = true} + + +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} + +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} + +bevy_camera = { version = "^0.17.2", features = [], default-features = true} + +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} + +bevy_core_pipeline = { version = "^0.17.2", features = ["tonemapping_luts", "webgl"], default-features = true} + +bevy_derive = { version = "^0.17.2", features = [], default-features = true} + +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} + +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} + +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} + +bevy_render = { version = "^0.17.2", features = ["multi_threaded", "webgl"], default-features = true} + +bevy_shader = { version = "^0.17.2", features = [], default-features = true} + +bevy_sprite = { version = "^0.17.2", features = ["bevy_picking", "bevy_sprite_picking_backend", "bevy_text", "bevy_window"], default-features = true} + +bevy_text = { version = "^0.17.2", features = ["default_font"], default-features = true} + +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} + +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} + +bitflags = { version = "^2.3", features = [], default-features = true} + +bytemuck = { version = "^1", features = [], default-features = true} + +fixedbitset = { version = "^0.5", features = [], default-features = true} + +nonmax = { version = "^0.5", features = [], default-features = true} + + diff --git a/crates/bindings/bevy_sprite_render_bms_bindings/README.md b/crates/bindings/bevy_sprite_render_bms_bindings/README.md new file mode 100644 index 0000000000..034c4fe8e2 --- /dev/null +++ b/crates/bindings/bevy_sprite_render_bms_bindings/README.md @@ -0,0 +1,4 @@ +# bevy_sprite_render bindings +This crate is part of the [bevy_mod_scripting](http://github.com/makspll/bevy_mod_scripting) project. + +The code inside is fully generated via a custom rustc plugin. \ No newline at end of file diff --git a/crates/bindings/bevy_sprite_render_bms_bindings/src/lib.rs b/crates/bindings/bevy_sprite_render_bms_bindings/src/lib.rs new file mode 100644 index 0000000000..fa23fd1250 --- /dev/null +++ b/crates/bindings/bevy_sprite_render_bms_bindings/src/lib.rs @@ -0,0 +1,534 @@ + +#![allow(clippy::all)] +#![allow(unused, deprecated, dead_code)] + + + +use bevy_mod_scripting_bindings::{ + ReflectReference, + function::{ + from::{Ref, Mut, Val}, + namespace::NamespaceBuilder, + }, +}; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; +use bevy_mod_scripting_derive::script_bindings; +pub struct BevySpriteRenderScriptingPlugin; +pub(crate) fn register_color_material_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::ColorMaterial, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::ColorMaterial>| { + let output: Val<::bevy_sprite_render::ColorMaterial> = { + { + let output: Val<::bevy_sprite_render::ColorMaterial> = <::bevy_sprite_render::ColorMaterial 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_sprite_render::ColorMaterial, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_alpha_mode_2_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::AlphaMode2d, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::AlphaMode2d>| { + let output: Val<::bevy_sprite_render::AlphaMode2d> = { + { + let output: Val<::bevy_sprite_render::AlphaMode2d> = <::bevy_sprite_render::AlphaMode2d as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_sprite_render::AlphaMode2d>, + other: Ref<::bevy_sprite_render::AlphaMode2d>| + { + let output: bool = { + { + let output: bool = <::bevy_sprite_render::AlphaMode2d as ::std::cmp::PartialEq< + ::bevy_sprite_render::AlphaMode2d, + >>::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_sprite_render::AlphaMode2d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_wireframe_2_d_material_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::Wireframe2dMaterial, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::Wireframe2dMaterial>| { + let output: Val<::bevy_sprite_render::Wireframe2dMaterial> = { + { + let output: Val<::bevy_sprite_render::Wireframe2dMaterial> = <::bevy_sprite_render::Wireframe2dMaterial 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_sprite_render::Wireframe2dMaterial, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_wireframe_2_d_config_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::Wireframe2dConfig, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::Wireframe2dConfig>| { + let output: Val<::bevy_sprite_render::Wireframe2dConfig> = { + { + let output: Val<::bevy_sprite_render::Wireframe2dConfig> = <::bevy_sprite_render::Wireframe2dConfig 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_sprite_render::Wireframe2dConfig, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_wireframe_2_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::Wireframe2d, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_sprite_render::Wireframe2d>| { + let output: () = { + { + let output: () = <::bevy_sprite_render::Wireframe2d as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::Wireframe2d>| { + let output: Val<::bevy_sprite_render::Wireframe2d> = { + { + let output: Val<::bevy_sprite_render::Wireframe2d> = <::bevy_sprite_render::Wireframe2d as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_sprite_render::Wireframe2d>, + other: Ref<::bevy_sprite_render::Wireframe2d>| + { + let output: bool = { + { + let output: bool = <::bevy_sprite_render::Wireframe2d as ::std::cmp::PartialEq< + ::bevy_sprite_render::Wireframe2d, + >>::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_sprite_render::Wireframe2d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_wireframe_2_d_color_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::Wireframe2dColor, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::Wireframe2dColor>| { + let output: Val<::bevy_sprite_render::Wireframe2dColor> = { + { + let output: Val<::bevy_sprite_render::Wireframe2dColor> = <::bevy_sprite_render::Wireframe2dColor 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_sprite_render::Wireframe2dColor, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_no_wireframe_2_d_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::NoWireframe2d, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_sprite_render::NoWireframe2d>| { + let output: () = { + { + let output: () = <::bevy_sprite_render::NoWireframe2d as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::NoWireframe2d>| { + let output: Val<::bevy_sprite_render::NoWireframe2d> = { + { + let output: Val<::bevy_sprite_render::NoWireframe2d> = <::bevy_sprite_render::NoWireframe2d as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_sprite_render::NoWireframe2d>, + other: Ref<::bevy_sprite_render::NoWireframe2d>| + { + let output: bool = { + { + let output: bool = <::bevy_sprite_render::NoWireframe2d as ::std::cmp::PartialEq< + ::bevy_sprite_render::NoWireframe2d, + >>::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_sprite_render::NoWireframe2d, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_mesh_2_d_wireframe_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::Mesh2dWireframe, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_sprite_render::Mesh2dWireframe>| { + let output: () = { + { + let output: () = <::bevy_sprite_render::Mesh2dWireframe as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::Mesh2dWireframe>| { + let output: Val<::bevy_sprite_render::Mesh2dWireframe> = { + { + let output: Val<::bevy_sprite_render::Mesh2dWireframe> = <::bevy_sprite_render::Mesh2dWireframe as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_sprite_render::Mesh2dWireframe>, + other: Ref<::bevy_sprite_render::Mesh2dWireframe>| + { + let output: bool = { + { + let output: bool = <::bevy_sprite_render::Mesh2dWireframe as ::std::cmp::PartialEq< + ::bevy_sprite_render::Mesh2dWireframe, + >>::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_sprite_render::Mesh2dWireframe, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_tilemap_chunk_mesh_cache_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::TilemapChunkMeshCache, + >::new(world); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_sprite_render::TilemapChunkMeshCache, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_tilemap_chunk_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::TilemapChunk, + >::new(world) + .register_documented( + "calculate_tile_transform", + | + _self: Ref<::bevy_sprite_render::TilemapChunk>, + position: Val<::glam::UVec2>| + { + let output: Val<::bevy_transform::components::Transform> = { + { + let output: Val<::bevy_transform::components::Transform> = ::bevy_sprite_render::TilemapChunk::calculate_tile_transform( + &_self, + position.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["_self", "position"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::TilemapChunk>| { + let output: Val<::bevy_sprite_render::TilemapChunk> = { + { + let output: Val<::bevy_sprite_render::TilemapChunk> = <::bevy_sprite_render::TilemapChunk 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_sprite_render::TilemapChunk, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_tile_data_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::TileData, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::TileData>| { + let output: Val<::bevy_sprite_render::TileData> = { + { + let output: Val<::bevy_sprite_render::TileData> = <::bevy_sprite_render::TileData as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "from_tileset_index", + |tileset_index: u16| { + let output: Val<::bevy_sprite_render::TileData> = { + { + let output: Val<::bevy_sprite_render::TileData> = ::bevy_sprite_render::TileData::from_tileset_index( + tileset_index, + ) + .into(); + output + } + }; + output + }, + " Creates a new `TileData` with the given tileset index and default values.", + &["tileset_index"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_sprite_render::TileData, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_tilemap_chunk_tile_data_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_sprite_render::TilemapChunkTileData, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_sprite_render::TilemapChunkTileData>| { + let output: Val<::bevy_sprite_render::TilemapChunkTileData> = { + { + let output: Val<::bevy_sprite_render::TilemapChunkTileData> = <::bevy_sprite_render::TilemapChunkTileData 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_sprite_render::TilemapChunkTileData, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +impl Plugin for BevySpriteRenderScriptingPlugin { + fn build(&self, app: &mut App) { + let mut world = app.world_mut(); + register_color_material_functions(&mut world); + register_alpha_mode_2_d_functions(&mut world); + register_wireframe_2_d_material_functions(&mut world); + register_wireframe_2_d_config_functions(&mut world); + register_wireframe_2_d_functions(&mut world); + register_wireframe_2_d_color_functions(&mut world); + register_no_wireframe_2_d_functions(&mut world); + register_mesh_2_d_wireframe_functions(&mut world); + register_tilemap_chunk_mesh_cache_functions(&mut world); + register_tilemap_chunk_functions(&mut world); + register_tile_data_functions(&mut world); + register_tilemap_chunk_tile_data_functions(&mut world); + } +} diff --git a/crates/bindings/bevy_text_bms_bindings/Cargo.toml b/crates/bindings/bevy_text_bms_bindings/Cargo.toml index af777c7000..17799c5f8c 100644 --- a/crates/bindings/bevy_text_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_text_bms_bindings/Cargo.toml @@ -17,45 +17,33 @@ 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.16.1", features = [ - "default_font", -], default-features = true } +bevy_text = { version = "0.17.2", features = ["default_font"], default-features = true} -bevy_app = { version = "^0.16.1", features = [], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_asset = { version = "^0.16.1", features = [], default-features = true } +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} -bevy_color = { version = "^0.16.2", features = [], default-features = true } +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} -bevy_derive = { version = "^0.16.1", features = [], default-features = true } +bevy_derive = { version = "^0.17.2", features = [], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [], default-features = true } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} -bevy_image = { version = "^0.16.1", features = [], default-features = true } +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} -bevy_log = { version = "^0.16.1", features = [], default-features = true } +bevy_log = { version = "^0.17.2", features = [], default-features = true} -bevy_math = { version = "^0.16.1", features = [], default-features = true } +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} -bevy_reflect = { version = "^0.16.1", features = [], default-features = true } +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_render = { version = "^0.16.1", features = [], default-features = true } +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} -bevy_sprite = { version = "^0.16.1", features = [], default-features = true } +cosmic-text = { version = "^0.14", features = [], default-features = true} -bevy_transform = { version = "^0.16.1", features = [], default-features = true } +serde = { version = "^1", features = [], default-features = true} -bevy_utils = { version = "^0.16.1", features = [], default-features = true } +sys-locale = { version = "^0.3.0", features = [], default-features = true} -bevy_window = { version = "^0.16.1", features = [], default-features = true } -cosmic-text = { version = "^0.13", features = [], default-features = true } - -serde = { version = "^1", features = [], default-features = true } - -smallvec = { version = "^1.13", features = [], default-features = true } - -sys-locale = { version = "^0.3.0", features = [], default-features = true } - -unicode-bidi = { version = "^0.3.13", 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 bb61288940..ea0f7a8b7d 100644 --- a/crates/bindings/bevy_text_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_text_bms_bindings/src/lib.rs @@ -1,27 +1,30 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyTextScriptingPlugin; -pub(crate) fn register_justify_text_functions(world: &mut World) { +pub(crate) fn register_justify_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::prelude::JustifyText, + ::bevy_text::Justify, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_text::prelude::JustifyText>| { + |_self: Ref<::bevy_text::Justify>| { let output: () = { { - let output: () = <::bevy_text::prelude::JustifyText as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_text::Justify as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -35,10 +38,10 @@ pub(crate) fn register_justify_text_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_text::prelude::JustifyText>| { - let output: Val<::bevy_text::prelude::JustifyText> = { + |_self: Ref<::bevy_text::Justify>| { + let output: Val<::bevy_text::Justify> = { { - let output: Val<::bevy_text::prelude::JustifyText> = <::bevy_text::prelude::JustifyText as ::std::clone::Clone>::clone( + let output: Val<::bevy_text::Justify> = <::bevy_text::Justify as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -52,14 +55,11 @@ pub(crate) fn register_justify_text_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_text::prelude::JustifyText>, - other: Ref<::bevy_text::prelude::JustifyText>| - { + |_self: Ref<::bevy_text::Justify>, other: Ref<::bevy_text::Justify>| { let output: bool = { { - let output: bool = <::bevy_text::prelude::JustifyText as ::std::cmp::PartialEq< - ::bevy_text::prelude::JustifyText, + let output: bool = <::bevy_text::Justify as ::std::cmp::PartialEq< + ::bevy_text::Justify, >>::eq(&_self, &other) .into(); output @@ -74,20 +74,20 @@ pub(crate) fn register_justify_text_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_text::prelude::JustifyText, + ::bevy_text::Justify, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_line_break_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::prelude::LineBreak, + ::bevy_text::LineBreak, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_text::prelude::LineBreak>| { + |_self: Ref<::bevy_text::LineBreak>| { let output: () = { { - let output: () = <::bevy_text::prelude::LineBreak as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_text::LineBreak as ::std::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -101,10 +101,10 @@ pub(crate) fn register_line_break_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_text::prelude::LineBreak>| { - let output: Val<::bevy_text::prelude::LineBreak> = { + |_self: Ref<::bevy_text::LineBreak>| { + let output: Val<::bevy_text::LineBreak> = { { - let output: Val<::bevy_text::prelude::LineBreak> = <::bevy_text::prelude::LineBreak as ::std::clone::Clone>::clone( + let output: Val<::bevy_text::LineBreak> = <::bevy_text::LineBreak as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -118,14 +118,11 @@ pub(crate) fn register_line_break_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_text::prelude::LineBreak>, - other: Ref<::bevy_text::prelude::LineBreak>| - { + |_self: Ref<::bevy_text::LineBreak>, other: Ref<::bevy_text::LineBreak>| { let output: bool = { { - let output: bool = <::bevy_text::prelude::LineBreak as ::std::cmp::PartialEq< - ::bevy_text::prelude::LineBreak, + let output: bool = <::bevy_text::LineBreak as ::std::cmp::PartialEq< + ::bevy_text::LineBreak, >>::eq(&_self, &other) .into(); output @@ -140,194 +137,189 @@ pub(crate) fn register_line_break_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_text::prelude::LineBreak, - bevy_mod_scripting_bindings::MarkAsGenerated, - >(); -} -pub(crate) fn register_text_2_d_functions(world: &mut World) { - bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::prelude::Text2d, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_text::prelude::Text2d>| { - let output: Val<::bevy_text::prelude::Text2d> = { - { - let output: Val<::bevy_text::prelude::Text2d> = - <::bevy_text::prelude::Text2d 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::prelude::Text2d, + ::bevy_text::LineBreak, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_text_color_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::prelude::TextColor, + ::bevy_text::TextColor, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_text::prelude::TextColor>| { - let output: Val<::bevy_text::prelude::TextColor> = { - { - let output: Val<::bevy_text::prelude::TextColor> = - <::bevy_text::prelude::TextColor as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "eq", - |_self: Ref<::bevy_text::prelude::TextColor>, - other: Ref<::bevy_text::prelude::TextColor>| { - let output: bool = { - { - let output: bool = <::bevy_text::prelude::TextColor as ::std::cmp::PartialEq< - ::bevy_text::prelude::TextColor, - >>::eq(&_self, &other) - .into(); - output - } - }; - output - }, - "", - &["_self", "other"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_text::TextColor>| { + let output: Val<::bevy_text::TextColor> = { + { + let output: Val<::bevy_text::TextColor> = <::bevy_text::TextColor as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_text::TextColor>, other: Ref<::bevy_text::TextColor>| { + let output: bool = { + { + let output: bool = <::bevy_text::TextColor as ::std::cmp::PartialEq< + ::bevy_text::TextColor, + >>::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::prelude::TextColor, + ::bevy_text::TextColor, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_text_font_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::prelude::TextFont, + ::bevy_text::TextFont, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_text::prelude::TextFont>| { - let output: Val<::bevy_text::prelude::TextFont> = { - { - let output: Val<::bevy_text::prelude::TextFont> = - <::bevy_text::prelude::TextFont as ::std::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ) - .register_documented( - "from_font_size", - |font_size: f32| { - let output: Val<::bevy_text::prelude::TextFont> = { - { - let output: Val<::bevy_text::prelude::TextFont> = - ::bevy_text::prelude::TextFont::from_font_size(font_size).into(); - output - } - }; - output - }, - " Returns a new [`TextFont`] with the specified font size.", - &["font_size"], - ) - .register_documented( - "with_font_size", - |_self: Val<::bevy_text::prelude::TextFont>, font_size: f32| { - let output: Val<::bevy_text::prelude::TextFont> = { - { - let output: Val<::bevy_text::prelude::TextFont> = - ::bevy_text::prelude::TextFont::with_font_size( - _self.into_inner(), - font_size, - ) - .into(); - output - } - }; - output - }, - " Returns this [`TextFont`] with the specified font size.", - &["_self", "font_size"], - ) - .register_documented( - "with_font_smoothing", - |_self: Val<::bevy_text::prelude::TextFont>, - font_smoothing: Val<::bevy_text::FontSmoothing>| { - let output: Val<::bevy_text::prelude::TextFont> = { - { - let output: Val<::bevy_text::prelude::TextFont> = - ::bevy_text::prelude::TextFont::with_font_smoothing( - _self.into_inner(), - font_smoothing.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns this [`TextFont`] with the specified [`FontSmoothing`].", - &["_self", "font_smoothing"], - ) - .register_documented( - "with_line_height", - |_self: Val<::bevy_text::prelude::TextFont>, line_height: Val<::bevy_text::LineHeight>| { - let output: Val<::bevy_text::prelude::TextFont> = { - { - let output: Val<::bevy_text::prelude::TextFont> = - ::bevy_text::prelude::TextFont::with_line_height( - _self.into_inner(), - line_height.into_inner(), - ) - .into(); - output - } - }; - output - }, - " Returns this [`TextFont`] with the specified [`LineHeight`].", - &["_self", "line_height"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_text::TextFont>| { + let output: Val<::bevy_text::TextFont> = { + { + let output: Val<::bevy_text::TextFont> = <::bevy_text::TextFont as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_text::TextFont>, other: Ref<::bevy_text::TextFont>| { + let output: bool = { + { + let output: bool = <::bevy_text::TextFont as ::std::cmp::PartialEq< + ::bevy_text::TextFont, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "from_font_size", + |font_size: f32| { + let output: Val<::bevy_text::TextFont> = { + { + let output: Val<::bevy_text::TextFont> = ::bevy_text::TextFont::from_font_size( + font_size, + ) + .into(); + output + } + }; + output + }, + " Returns a new [`TextFont`] with the specified font size.", + &["font_size"], + ) + .register_documented( + "with_font_size", + |_self: Val<::bevy_text::TextFont>, font_size: f32| { + let output: Val<::bevy_text::TextFont> = { + { + let output: Val<::bevy_text::TextFont> = ::bevy_text::TextFont::with_font_size( + _self.into_inner(), + font_size, + ) + .into(); + output + } + }; + output + }, + " Returns this [`TextFont`] with the specified font size.", + &["_self", "font_size"], + ) + .register_documented( + "with_font_smoothing", + | + _self: Val<::bevy_text::TextFont>, + font_smoothing: Val<::bevy_text::FontSmoothing>| + { + let output: Val<::bevy_text::TextFont> = { + { + let output: Val<::bevy_text::TextFont> = ::bevy_text::TextFont::with_font_smoothing( + _self.into_inner(), + font_smoothing.into_inner(), + ) + .into(); + output + } + }; + output + }, + " 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(); registry .register_type_data::< - ::bevy_text::prelude::TextFont, + ::bevy_text::TextFont, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_text_layout_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::prelude::TextLayout, + ::bevy_text::TextLayout, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_text::prelude::TextLayout>| { - let output: Val<::bevy_text::prelude::TextLayout> = { + |_self: Ref<::bevy_text::TextLayout>| { + let output: Val<::bevy_text::TextLayout> = { { - let output: Val<::bevy_text::prelude::TextLayout> = <::bevy_text::prelude::TextLayout as ::std::clone::Clone>::clone( + let output: Val<::bevy_text::TextLayout> = <::bevy_text::TextLayout as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -341,13 +333,10 @@ pub(crate) fn register_text_layout_functions(world: &mut World) { ) .register_documented( "new", - | - justify: Val<::bevy_text::prelude::JustifyText>, - linebreak: Val<::bevy_text::prelude::LineBreak>| - { - let output: Val<::bevy_text::prelude::TextLayout> = { + |justify: Val<::bevy_text::Justify>, linebreak: Val<::bevy_text::LineBreak>| { + let output: Val<::bevy_text::TextLayout> = { { - let output: Val<::bevy_text::prelude::TextLayout> = ::bevy_text::prelude::TextLayout::new( + let output: Val<::bevy_text::TextLayout> = ::bevy_text::TextLayout::new( justify.into_inner(), linebreak.into_inner(), ) @@ -362,10 +351,10 @@ pub(crate) fn register_text_layout_functions(world: &mut World) { ) .register_documented( "new_with_justify", - |justify: Val<::bevy_text::prelude::JustifyText>| { - let output: Val<::bevy_text::prelude::TextLayout> = { + |justify: Val<::bevy_text::Justify>| { + let output: Val<::bevy_text::TextLayout> = { { - let output: Val<::bevy_text::prelude::TextLayout> = ::bevy_text::prelude::TextLayout::new_with_justify( + let output: Val<::bevy_text::TextLayout> = ::bevy_text::TextLayout::new_with_justify( justify.into_inner(), ) .into(); @@ -374,15 +363,15 @@ pub(crate) fn register_text_layout_functions(world: &mut World) { }; output }, - " Makes a new [`TextLayout`] with the specified [`JustifyText`].", + " Makes a new [`TextLayout`] with the specified [`Justify`].", &["justify"], ) .register_documented( "new_with_linebreak", - |linebreak: Val<::bevy_text::prelude::LineBreak>| { - let output: Val<::bevy_text::prelude::TextLayout> = { + |linebreak: Val<::bevy_text::LineBreak>| { + let output: Val<::bevy_text::TextLayout> = { { - let output: Val<::bevy_text::prelude::TextLayout> = ::bevy_text::prelude::TextLayout::new_with_linebreak( + let output: Val<::bevy_text::TextLayout> = ::bevy_text::TextLayout::new_with_linebreak( linebreak.into_inner(), ) .into(); @@ -397,9 +386,9 @@ pub(crate) fn register_text_layout_functions(world: &mut World) { .register_documented( "new_with_no_wrap", || { - let output: Val<::bevy_text::prelude::TextLayout> = { + let output: Val<::bevy_text::TextLayout> = { { - let output: Val<::bevy_text::prelude::TextLayout> = ::bevy_text::prelude::TextLayout::new_with_no_wrap() + let output: Val<::bevy_text::TextLayout> = ::bevy_text::TextLayout::new_with_no_wrap() .into(); output } @@ -411,13 +400,10 @@ pub(crate) fn register_text_layout_functions(world: &mut World) { ) .register_documented( "with_justify", - | - _self: Val<::bevy_text::prelude::TextLayout>, - justify: Val<::bevy_text::prelude::JustifyText>| - { - let output: Val<::bevy_text::prelude::TextLayout> = { + |_self: Val<::bevy_text::TextLayout>, justify: Val<::bevy_text::Justify>| { + let output: Val<::bevy_text::TextLayout> = { { - let output: Val<::bevy_text::prelude::TextLayout> = ::bevy_text::prelude::TextLayout::with_justify( + let output: Val<::bevy_text::TextLayout> = ::bevy_text::TextLayout::with_justify( _self.into_inner(), justify.into_inner(), ) @@ -427,18 +413,18 @@ pub(crate) fn register_text_layout_functions(world: &mut World) { }; output }, - " Returns this [`TextLayout`] with the specified [`JustifyText`].", + " Returns this [`TextLayout`] with the specified [`Justify`].", &["_self", "justify"], ) .register_documented( "with_linebreak", | - _self: Val<::bevy_text::prelude::TextLayout>, - linebreak: Val<::bevy_text::prelude::LineBreak>| + _self: Val<::bevy_text::TextLayout>, + linebreak: Val<::bevy_text::LineBreak>| { - let output: Val<::bevy_text::prelude::TextLayout> = { + let output: Val<::bevy_text::TextLayout> = { { - let output: Val<::bevy_text::prelude::TextLayout> = ::bevy_text::prelude::TextLayout::with_linebreak( + let output: Val<::bevy_text::TextLayout> = ::bevy_text::TextLayout::with_linebreak( _self.into_inner(), linebreak.into_inner(), ) @@ -453,10 +439,10 @@ pub(crate) fn register_text_layout_functions(world: &mut World) { ) .register_documented( "with_no_wrap", - |_self: Val<::bevy_text::prelude::TextLayout>| { - let output: Val<::bevy_text::prelude::TextLayout> = { + |_self: Val<::bevy_text::TextLayout>| { + let output: Val<::bevy_text::TextLayout> = { { - let output: Val<::bevy_text::prelude::TextLayout> = ::bevy_text::prelude::TextLayout::with_no_wrap( + let output: Val<::bevy_text::TextLayout> = ::bevy_text::TextLayout::with_no_wrap( _self.into_inner(), ) .into(); @@ -472,48 +458,20 @@ pub(crate) fn register_text_layout_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_text::prelude::TextLayout, + ::bevy_text::TextLayout, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_text_span_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::prelude::TextSpan, - >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_text::prelude::TextSpan>| { - let output: Val<::bevy_text::prelude::TextSpan> = { - { - let output: Val<::bevy_text::prelude::TextSpan> = - <::bevy_text::prelude::TextSpan 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::prelude::TextSpan, - 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, + ::bevy_text::TextSpan, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_text::LineHeight>| { - let output: Val<::bevy_text::LineHeight> = { + |_self: Ref<::bevy_text::TextSpan>| { + let output: Val<::bevy_text::TextSpan> = { { - let output: Val<::bevy_text::LineHeight> = <::bevy_text::LineHeight as ::std::clone::Clone>::clone( + let output: Val<::bevy_text::TextSpan> = <::bevy_text::TextSpan as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -529,7 +487,7 @@ pub(crate) fn register_line_height_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_text::LineHeight, + ::bevy_text::TextSpan, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -614,16 +572,33 @@ pub(crate) fn register_text_bounds_functions(world: &mut World) { bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_computed_text_block_functions(world: &mut World) { +pub(crate) fn register_font_smoothing_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::ComputedTextBlock, + ::bevy_text::FontSmoothing, >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_text::FontSmoothing>| { + let output: () = { + { + let output: () = <::bevy_text::FontSmoothing as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) .register_documented( "clone", - |_self: Ref<::bevy_text::ComputedTextBlock>| { - let output: Val<::bevy_text::ComputedTextBlock> = { + |_self: Ref<::bevy_text::FontSmoothing>| { + let output: Val<::bevy_text::FontSmoothing> = { { - let output: Val<::bevy_text::ComputedTextBlock> = <::bevy_text::ComputedTextBlock as ::std::clone::Clone>::clone( + let output: Val<::bevy_text::FontSmoothing> = <::bevy_text::FontSmoothing as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -636,11 +611,43 @@ pub(crate) fn register_computed_text_block_functions(world: &mut World) { &["_self"], ) .register_documented( - "needs_rerender", - |_self: Ref<::bevy_text::ComputedTextBlock>| { + "eq", + | + _self: Ref<::bevy_text::FontSmoothing>, + other: Ref<::bevy_text::FontSmoothing>| + { let output: bool = { { - let output: bool = ::bevy_text::ComputedTextBlock::needs_rerender( + let output: bool = <::bevy_text::FontSmoothing as ::std::cmp::PartialEq< + ::bevy_text::FontSmoothing, + >>::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::FontSmoothing, + 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(); @@ -649,27 +656,27 @@ pub(crate) fn register_computed_text_block_functions(world: &mut World) { }; output }, - " Indicates if the text needs to be refreshed in [`TextLayoutInfo`].\n Updated automatically by [`detect_text_needs_rerender`] and cleared\n by [`TextPipeline`](crate::TextPipeline) methods.", + "", &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_text::ComputedTextBlock, + ::bevy_text::GlyphAtlasLocation, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_text_entity_functions(world: &mut World) { +pub(crate) fn register_glyph_atlas_info_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::TextEntity, + ::bevy_text::GlyphAtlasInfo, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_text::TextEntity>| { - let output: Val<::bevy_text::TextEntity> = { + |_self: Ref<::bevy_text::GlyphAtlasInfo>| { + let output: Val<::bevy_text::GlyphAtlasInfo> = { { - let output: Val<::bevy_text::TextEntity> = <::bevy_text::TextEntity as ::std::clone::Clone>::clone( + let output: Val<::bevy_text::GlyphAtlasInfo> = <::bevy_text::GlyphAtlasInfo as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -685,20 +692,20 @@ pub(crate) fn register_text_entity_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_text::TextEntity, + ::bevy_text::GlyphAtlasInfo, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_font_smoothing_functions(world: &mut World) { +pub(crate) fn register_positioned_glyph_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::FontSmoothing, + ::bevy_text::PositionedGlyph, >::new(world) .register_documented( - "assert_receiver_is_total_eq", - |_self: Ref<::bevy_text::FontSmoothing>| { - let output: () = { + "clone", + |_self: Ref<::bevy_text::PositionedGlyph>| { + let output: Val<::bevy_text::PositionedGlyph> = { { - let output: () = <::bevy_text::FontSmoothing as ::std::cmp::Eq>::assert_receiver_is_total_eq( + let output: Val<::bevy_text::PositionedGlyph> = <::bevy_text::PositionedGlyph as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -709,13 +716,25 @@ pub(crate) fn register_font_smoothing_functions(world: &mut World) { }, "", &["_self"], - ) + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_text::PositionedGlyph, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_computed_text_block_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_text::ComputedTextBlock, + >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_text::FontSmoothing>| { - let output: Val<::bevy_text::FontSmoothing> = { + |_self: Ref<::bevy_text::ComputedTextBlock>| { + let output: Val<::bevy_text::ComputedTextBlock> = { { - let output: Val<::bevy_text::FontSmoothing> = <::bevy_text::FontSmoothing as ::std::clone::Clone>::clone( + let output: Val<::bevy_text::ComputedTextBlock> = <::bevy_text::ComputedTextBlock as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -728,71 +747,69 @@ pub(crate) fn register_font_smoothing_functions(world: &mut World) { &["_self"], ) .register_documented( - "eq", - | - _self: Ref<::bevy_text::FontSmoothing>, - other: Ref<::bevy_text::FontSmoothing>| - { + "needs_rerender", + |_self: Ref<::bevy_text::ComputedTextBlock>| { let output: bool = { { - let output: bool = <::bevy_text::FontSmoothing as ::std::cmp::PartialEq< - ::bevy_text::FontSmoothing, - >>::eq(&_self, &other) + let output: bool = ::bevy_text::ComputedTextBlock::needs_rerender( + &_self, + ) .into(); output } }; output }, - "", - &["_self", "other"], + " Indicates if the text needs to be refreshed in [`TextLayoutInfo`].\n Updated automatically by [`detect_text_needs_rerender`] and cleared\n by [`TextPipeline`](crate::TextPipeline) methods.", + &["_self"], ); let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry .register_type_data::< - ::bevy_text::FontSmoothing, + ::bevy_text::ComputedTextBlock, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_glyph_atlas_location_functions(world: &mut World) { +pub(crate) fn register_text_entity_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::GlyphAtlasLocation, + ::bevy_text::TextEntity, >::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"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_text::TextEntity>| { + let output: Val<::bevy_text::TextEntity> = { + { + let output: Val<::bevy_text::TextEntity> = <::bevy_text::TextEntity 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_text::TextEntity, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_glyph_atlas_info_functions(world: &mut World) { +pub(crate) fn register_text_layout_info_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::GlyphAtlasInfo, + ::bevy_text::TextLayoutInfo, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_text::GlyphAtlasInfo>| { - let output: Val<::bevy_text::GlyphAtlasInfo> = { + |_self: Ref<::bevy_text::TextLayoutInfo>| { + let output: Val<::bevy_text::TextLayoutInfo> = { { - let output: Val<::bevy_text::GlyphAtlasInfo> = <::bevy_text::GlyphAtlasInfo as ::std::clone::Clone>::clone( + let output: Val<::bevy_text::TextLayoutInfo> = <::bevy_text::TextLayoutInfo as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -808,47 +825,66 @@ pub(crate) fn register_glyph_atlas_info_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_text::GlyphAtlasInfo, + ::bevy_text::TextLayoutInfo, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_positioned_glyph_functions(world: &mut World) { +pub(crate) fn register_line_height_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::PositionedGlyph, + ::bevy_text::LineHeight, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_text::PositionedGlyph>| { - let output: Val<::bevy_text::PositionedGlyph> = { - { - let output: Val<::bevy_text::PositionedGlyph> = - <::bevy_text::PositionedGlyph as ::std::clone::Clone>::clone(&_self).into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .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::PositionedGlyph, + ::bevy_text::LineHeight, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } -pub(crate) fn register_text_layout_info_functions(world: &mut World) { +pub(crate) fn register_text_background_color_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_text::TextLayoutInfo, + ::bevy_text::TextBackgroundColor, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_text::TextLayoutInfo>| { - let output: Val<::bevy_text::TextLayoutInfo> = { + |_self: Ref<::bevy_text::TextBackgroundColor>| { + let output: Val<::bevy_text::TextBackgroundColor> = { { - let output: Val<::bevy_text::TextLayoutInfo> = <::bevy_text::TextLayoutInfo as ::std::clone::Clone>::clone( + let output: Val<::bevy_text::TextBackgroundColor> = <::bevy_text::TextBackgroundColor as ::std::clone::Clone>::clone( &_self, ) .into(); @@ -859,33 +895,53 @@ pub(crate) fn register_text_layout_info_functions(world: &mut World) { }, "", &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_text::TextBackgroundColor>, + other: Ref<::bevy_text::TextBackgroundColor>| + { + let output: bool = { + { + let output: bool = <::bevy_text::TextBackgroundColor as ::std::cmp::PartialEq< + ::bevy_text::TextBackgroundColor, + >>::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::TextLayoutInfo, + ::bevy_text::TextBackgroundColor, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } impl Plugin for BevyTextScriptingPlugin { fn build(&self, app: &mut App) { let mut world = app.world_mut(); - register_justify_text_functions(&mut world); + register_justify_functions(&mut world); register_line_break_functions(&mut world); - register_text_2_d_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_line_height_functions(&mut world); register_text_bounds_functions(&mut world); - register_computed_text_block_functions(&mut world); - register_text_entity_functions(&mut world); register_font_smoothing_functions(&mut world); register_glyph_atlas_location_functions(&mut world); register_glyph_atlas_info_functions(&mut world); register_positioned_glyph_functions(&mut world); + register_computed_text_block_functions(&mut world); + register_text_entity_functions(&mut world); register_text_layout_info_functions(&mut world); + register_line_height_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 3fd6513518..3021e4479a 100644 --- a/crates/bindings/bevy_time_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_time_bms_bindings/Cargo.toml @@ -17,26 +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.16.1", features = [ - "std", - "bevy_reflect", -], default-features = true } +bevy_time = { version = "0.17.2", features = ["bevy_reflect", "std"], default-features = true} -bevy_app = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = true } +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} -bevy_ecs = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_platform = { version = "^0.17.2", features = ["alloc", "serialize", "std"], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} -bevy_platform = { version = "^0.16.1", features = [ - "std", -], default-features = false } -bevy_reflect = { version = "^0.16.1", features = [ - "std", -], default-features = false } diff --git a/crates/bindings/bevy_time_bms_bindings/src/lib.rs b/crates/bindings/bevy_time_bms_bindings/src/lib.rs index 744f6fb367..bfeb9fd13f 100644 --- a/crates/bindings/bevy_time_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_time_bms_bindings/src/lib.rs @@ -1,27 +1,30 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyTimeScriptingPlugin; pub(crate) fn register_fixed_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_time::prelude::Fixed, + ::bevy_time::Fixed, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_time::prelude::Fixed>| { - let output: Val<::bevy_time::prelude::Fixed> = { + |_self: Ref<::bevy_time::Fixed>| { + let output: Val<::bevy_time::Fixed> = { { - let output: Val<::bevy_time::prelude::Fixed> = <::bevy_time::prelude::Fixed as ::core::clone::Clone>::clone( + let output: Val<::bevy_time::Fixed> = <::bevy_time::Fixed as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -37,20 +40,20 @@ pub(crate) fn register_fixed_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_time::prelude::Fixed, + ::bevy_time::Fixed, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_real_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_time::prelude::Real, + ::bevy_time::Real, >::new(world) .register_documented( "clone", - |_self: Ref<::bevy_time::prelude::Real>| { - let output: Val<::bevy_time::prelude::Real> = { + |_self: Ref<::bevy_time::Real>| { + let output: Val<::bevy_time::Real> = { { - let output: Val<::bevy_time::prelude::Real> = <::bevy_time::prelude::Real as ::core::clone::Clone>::clone( + let output: Val<::bevy_time::Real> = <::bevy_time::Real as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -66,20 +69,20 @@ pub(crate) fn register_real_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_time::prelude::Real, + ::bevy_time::Real, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_timer_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_time::prelude::Timer, + ::bevy_time::Timer, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: () = { { - let output: () = <::bevy_time::prelude::Timer as ::core::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_time::Timer as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -93,10 +96,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_time::prelude::Timer>| { - let output: Val<::bevy_time::prelude::Timer> = { + |_self: Ref<::bevy_time::Timer>| { + let output: Val<::bevy_time::Timer> = { { - let output: Val<::bevy_time::prelude::Timer> = <::bevy_time::prelude::Timer as ::core::clone::Clone>::clone( + let output: Val<::bevy_time::Timer> = <::bevy_time::Timer as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -110,10 +113,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "duration", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: Val<::core::time::Duration> = { { - let output: Val<::core::time::Duration> = ::bevy_time::prelude::Timer::duration( + let output: Val<::core::time::Duration> = ::bevy_time::Timer::duration( &_self, ) .into(); @@ -127,10 +130,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "elapsed", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: Val<::core::time::Duration> = { { - let output: Val<::core::time::Duration> = ::bevy_time::prelude::Timer::elapsed( + let output: Val<::core::time::Duration> = ::bevy_time::Timer::elapsed( &_self, ) .into(); @@ -144,12 +147,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "elapsed_secs", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: f32 = { { - let output: f32 = ::bevy_time::prelude::Timer::elapsed_secs( - &_self, - ) + let output: f32 = ::bevy_time::Timer::elapsed_secs(&_self) .into(); output } @@ -161,12 +162,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "elapsed_secs_f64", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: f64 = { { - let output: f64 = ::bevy_time::prelude::Timer::elapsed_secs_f64( - &_self, - ) + let output: f64 = ::bevy_time::Timer::elapsed_secs_f64(&_self) .into(); output } @@ -178,14 +177,11 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_time::prelude::Timer>, - other: Ref<::bevy_time::prelude::Timer>| - { + |_self: Ref<::bevy_time::Timer>, other: Ref<::bevy_time::Timer>| { let output: bool = { { - let output: bool = <::bevy_time::prelude::Timer as ::core::cmp::PartialEq< - ::bevy_time::prelude::Timer, + let output: bool = <::bevy_time::Timer as ::core::cmp::PartialEq< + ::bevy_time::Timer, >>::eq(&_self, &other) .into(); output @@ -196,13 +192,26 @@ pub(crate) fn register_timer_functions(world: &mut World) { "", &["_self", "other"], ) + .register_documented( + "finish", + |mut _self: Mut<::bevy_time::Timer>| { + let output: () = { + { + let output: () = ::bevy_time::Timer::finish(&mut _self).into(); + output + } + }; + 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::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: bool = { { - let output: bool = ::bevy_time::prelude::Timer::finished(&_self) - .into(); + let output: bool = ::bevy_time::Timer::finished(&_self).into(); output } }; @@ -213,11 +222,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "fraction", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: f32 = { { - let output: f32 = ::bevy_time::prelude::Timer::fraction(&_self) - .into(); + let output: f32 = ::bevy_time::Timer::fraction(&_self).into(); output } }; @@ -228,12 +236,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "fraction_remaining", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: f32 = { { - let output: f32 = ::bevy_time::prelude::Timer::fraction_remaining( - &_self, - ) + let output: f32 = ::bevy_time::Timer::fraction_remaining(&_self) .into(); output } @@ -245,10 +251,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "from_seconds", - |duration: f32, mode: Val<::bevy_time::prelude::TimerMode>| { - let output: Val<::bevy_time::prelude::Timer> = { + |duration: f32, mode: Val<::bevy_time::TimerMode>| { + let output: Val<::bevy_time::Timer> = { { - let output: Val<::bevy_time::prelude::Timer> = ::bevy_time::prelude::Timer::from_seconds( + let output: Val<::bevy_time::Timer> = ::bevy_time::Timer::from_seconds( duration, mode.into_inner(), ) @@ -261,14 +267,41 @@ pub(crate) fn register_timer_functions(world: &mut World) { " Creates a new timer with a given duration in seconds.\n # Example\n ```\n # use bevy_time::*;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n ```", &["duration", "mode"], ) + .register_documented( + "is_finished", + |_self: Ref<::bevy_time::Timer>| { + let output: bool = { + { + let output: bool = ::bevy_time::Timer::is_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.is_finished());\n timer_once.tick(Duration::from_secs_f32(0.5));\n assert!(timer_once.is_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.is_finished());\n timer_repeating.tick(Duration::from_secs_f32(0.8));\n assert!(!timer_repeating.is_finished());\n timer_repeating.tick(Duration::from_secs_f32(0.6));\n assert!(timer_repeating.is_finished());\n ```", + &["_self"], + ) + .register_documented( + "is_paused", + |_self: Ref<::bevy_time::Timer>| { + let output: bool = { + { + let output: bool = ::bevy_time::Timer::is_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.is_paused());\n timer.pause();\n assert!(timer.is_paused());\n timer.unpause();\n assert!(!timer.is_paused());\n ```", + &["_self"], + ) .register_documented( "just_finished", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: bool = { { - let output: bool = ::bevy_time::prelude::Timer::just_finished( - &_self, - ) + let output: bool = ::bevy_time::Timer::just_finished(&_self) .into(); output } @@ -280,10 +313,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "mode", - |_self: Ref<::bevy_time::prelude::Timer>| { - let output: Val<::bevy_time::prelude::TimerMode> = { + |_self: Ref<::bevy_time::Timer>| { + let output: Val<::bevy_time::TimerMode> = { { - let output: Val<::bevy_time::prelude::TimerMode> = ::bevy_time::prelude::Timer::mode( + let output: Val<::bevy_time::TimerMode> = ::bevy_time::Timer::mode( &_self, ) .into(); @@ -297,13 +330,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "new", - | - duration: Val<::core::time::Duration>, - mode: Val<::bevy_time::prelude::TimerMode>| - { - let output: Val<::bevy_time::prelude::Timer> = { + |duration: Val<::core::time::Duration>, mode: Val<::bevy_time::TimerMode>| { + let output: Val<::bevy_time::Timer> = { { - let output: Val<::bevy_time::prelude::Timer> = ::bevy_time::prelude::Timer::new( + let output: Val<::bevy_time::Timer> = ::bevy_time::Timer::new( duration.into_inner(), mode.into_inner(), ) @@ -318,11 +348,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "pause", - |mut _self: Mut<::bevy_time::prelude::Timer>| { + |mut _self: Mut<::bevy_time::Timer>| { let output: () = { { - let output: () = ::bevy_time::prelude::Timer::pause(&mut _self) - .into(); + let output: () = ::bevy_time::Timer::pause(&mut _self).into(); output } }; @@ -333,11 +362,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "paused", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: bool = { { - let output: bool = ::bevy_time::prelude::Timer::paused(&_self) - .into(); + let output: bool = ::bevy_time::Timer::paused(&_self).into(); output } }; @@ -348,10 +376,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "remaining", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: Val<::core::time::Duration> = { { - let output: Val<::core::time::Duration> = ::bevy_time::prelude::Timer::remaining( + let output: Val<::core::time::Duration> = ::bevy_time::Timer::remaining( &_self, ) .into(); @@ -365,12 +393,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "remaining_secs", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: f32 = { { - let output: f32 = ::bevy_time::prelude::Timer::remaining_secs( - &_self, - ) + let output: f32 = ::bevy_time::Timer::remaining_secs(&_self) .into(); output } @@ -382,28 +408,24 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "reset", - |mut _self: Mut<::bevy_time::prelude::Timer>| { + |mut _self: Mut<::bevy_time::Timer>| { let output: () = { { - let output: () = ::bevy_time::prelude::Timer::reset(&mut _self) - .into(); + let output: () = ::bevy_time::Timer::reset(&mut _self).into(); output } }; output }, - " Resets the timer. The reset doesn't affect the `paused` state of the timer.\n See also [`Stopwatch::reset`](Stopwatch::reset).\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.tick(Duration::from_secs_f32(1.5));\n timer.reset();\n assert!(!timer.finished());\n assert!(!timer.just_finished());\n assert_eq!(timer.elapsed_secs(), 0.0);\n ```", + " Resets the timer. The reset doesn't affect the `paused` state of the timer.\n See also [`Stopwatch::reset`](Stopwatch::reset).\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.tick(Duration::from_secs_f32(1.5));\n timer.reset();\n assert!(!timer.is_finished());\n assert!(!timer.just_finished());\n assert_eq!(timer.elapsed_secs(), 0.0);\n ```", &["_self"], ) .register_documented( "set_duration", - | - mut _self: Mut<::bevy_time::prelude::Timer>, - duration: Val<::core::time::Duration>| - { + |mut _self: Mut<::bevy_time::Timer>, duration: Val<::core::time::Duration>| { let output: () = { { - let output: () = ::bevy_time::prelude::Timer::set_duration( + let output: () = ::bevy_time::Timer::set_duration( &mut _self, duration.into_inner(), ) @@ -418,13 +440,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "set_elapsed", - | - mut _self: Mut<::bevy_time::prelude::Timer>, - time: Val<::core::time::Duration>| - { + |mut _self: Mut<::bevy_time::Timer>, time: Val<::core::time::Duration>| { let output: () = { { - let output: () = ::bevy_time::prelude::Timer::set_elapsed( + let output: () = ::bevy_time::Timer::set_elapsed( &mut _self, time.into_inner(), ) @@ -434,18 +453,15 @@ pub(crate) fn register_timer_functions(world: &mut World) { }; output }, - " Sets the elapsed time of the timer without any other considerations.\n See also [`Stopwatch::set`](Stopwatch::set).\n #\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n timer.set_elapsed(Duration::from_secs(2));\n assert_eq!(timer.elapsed(), Duration::from_secs(2));\n // the timer is not finished even if the elapsed time is greater than the duration.\n assert!(!timer.finished());\n ```", + " Sets the elapsed time of the timer without any other considerations.\n See also [`Stopwatch::set`](Stopwatch::set).\n #\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut timer = Timer::from_seconds(1.0, TimerMode::Once);\n timer.set_elapsed(Duration::from_secs(2));\n assert_eq!(timer.elapsed(), Duration::from_secs(2));\n // the timer is not finished even if the elapsed time is greater than the duration.\n assert!(!timer.is_finished());\n ```", &["_self", "time"], ) .register_documented( "set_mode", - | - mut _self: Mut<::bevy_time::prelude::Timer>, - mode: Val<::bevy_time::prelude::TimerMode>| - { + |mut _self: Mut<::bevy_time::Timer>, mode: Val<::bevy_time::TimerMode>| { let output: () = { { - let output: () = ::bevy_time::prelude::Timer::set_mode( + let output: () = ::bevy_time::Timer::set_mode( &mut _self, mode.into_inner(), ) @@ -460,10 +476,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "times_finished_this_tick", - |_self: Ref<::bevy_time::prelude::Timer>| { + |_self: Ref<::bevy_time::Timer>| { let output: u32 = { { - let output: u32 = ::bevy_time::prelude::Timer::times_finished_this_tick( + let output: u32 = ::bevy_time::Timer::times_finished_this_tick( &_self, ) .into(); @@ -477,11 +493,10 @@ pub(crate) fn register_timer_functions(world: &mut World) { ) .register_documented( "unpause", - |mut _self: Mut<::bevy_time::prelude::Timer>| { + |mut _self: Mut<::bevy_time::Timer>| { let output: () = { { - let output: () = ::bevy_time::prelude::Timer::unpause(&mut _self) - .into(); + let output: () = ::bevy_time::Timer::unpause(&mut _self).into(); output } }; @@ -494,20 +509,20 @@ pub(crate) fn register_timer_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_time::prelude::Timer, + ::bevy_time::Timer, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_timer_mode_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_time::prelude::TimerMode, + ::bevy_time::TimerMode, >::new(world) .register_documented( "assert_receiver_is_total_eq", - |_self: Ref<::bevy_time::prelude::TimerMode>| { + |_self: Ref<::bevy_time::TimerMode>| { let output: () = { { - let output: () = <::bevy_time::prelude::TimerMode as ::core::cmp::Eq>::assert_receiver_is_total_eq( + let output: () = <::bevy_time::TimerMode as ::core::cmp::Eq>::assert_receiver_is_total_eq( &_self, ) .into(); @@ -521,10 +536,10 @@ pub(crate) fn register_timer_mode_functions(world: &mut World) { ) .register_documented( "clone", - |_self: Ref<::bevy_time::prelude::TimerMode>| { - let output: Val<::bevy_time::prelude::TimerMode> = { + |_self: Ref<::bevy_time::TimerMode>| { + let output: Val<::bevy_time::TimerMode> = { { - let output: Val<::bevy_time::prelude::TimerMode> = <::bevy_time::prelude::TimerMode as ::core::clone::Clone>::clone( + let output: Val<::bevy_time::TimerMode> = <::bevy_time::TimerMode as ::core::clone::Clone>::clone( &_self, ) .into(); @@ -538,14 +553,11 @@ pub(crate) fn register_timer_mode_functions(world: &mut World) { ) .register_documented( "eq", - | - _self: Ref<::bevy_time::prelude::TimerMode>, - other: Ref<::bevy_time::prelude::TimerMode>| - { + |_self: Ref<::bevy_time::TimerMode>, other: Ref<::bevy_time::TimerMode>| { let output: bool = { { - let output: bool = <::bevy_time::prelude::TimerMode as ::core::cmp::PartialEq< - ::bevy_time::prelude::TimerMode, + let output: bool = <::bevy_time::TimerMode as ::core::cmp::PartialEq< + ::bevy_time::TimerMode, >>::eq(&_self, &other) .into(); output @@ -560,35 +572,36 @@ pub(crate) fn register_timer_mode_functions(world: &mut World) { let mut registry = registry.write(); registry .register_type_data::< - ::bevy_time::prelude::TimerMode, + ::bevy_time::TimerMode, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } pub(crate) fn register_virtual_functions(world: &mut World) { bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< - ::bevy_time::prelude::Virtual, + ::bevy_time::Virtual, >::new(world) - .register_documented( - "clone", - |_self: Ref<::bevy_time::prelude::Virtual>| { - let output: Val<::bevy_time::prelude::Virtual> = { - { - let output: Val<::bevy_time::prelude::Virtual> = - <::bevy_time::prelude::Virtual as ::core::clone::Clone>::clone(&_self) - .into(); - output - } - }; - output - }, - "", - &["_self"], - ); + .register_documented( + "clone", + |_self: Ref<::bevy_time::Virtual>| { + let output: Val<::bevy_time::Virtual> = { + { + let output: Val<::bevy_time::Virtual> = <::bevy_time::Virtual 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_time::prelude::Virtual, + ::bevy_time::Virtual, bevy_mod_scripting_bindings::MarkAsGenerated, >(); } @@ -792,8 +805,10 @@ pub(crate) fn register_stopwatch_functions(world: &mut World) { let registry = world.get_resource_or_init::(); let mut registry = registry.write(); registry - .register_type_data::<::bevy_time::Stopwatch, bevy_mod_scripting_bindings::MarkAsGenerated>( - ); + .register_type_data::< + ::bevy_time::Stopwatch, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); } impl Plugin for BevyTimeScriptingPlugin { fn build(&self, app: &mut App) { diff --git a/crates/bindings/bevy_transform_bms_bindings/Cargo.toml b/crates/bindings/bevy_transform_bms_bindings/Cargo.toml index 6ca5d9c4f7..0f934d12bb 100644 --- a/crates/bindings/bevy_transform_bms_bindings/Cargo.toml +++ b/crates/bindings/bevy_transform_bms_bindings/Cargo.toml @@ -17,40 +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.16.1", features = [ - "std", - "bevy-support", - "bevy_reflect", - "async_executor", - "alloc", - "bevy_log", -], default-features = true } - - -bevy_app = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } - -bevy_ecs = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } - -bevy_math = { version = "^0.16.1", features = [ - "std", - "bevy_reflect", -], default-features = false } - -bevy_reflect = { version = "^0.16.1", features = [ - "std", -], default-features = false } - -bevy_tasks = { version = "^0.16.1", features = [ - "std", - "async_executor", -], default-features = false } - -bevy_utils = { version = "^0.16.1", features = [ - "std", -], default-features = false } +bevy_transform = { version = "0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} + + +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} + +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} + +bevy_tasks = { version = "^0.17.2", features = ["async_executor", "futures-lite", "multi_threaded"], default-features = true} + +bevy_utils = { version = "^0.17.2", features = ["debug", "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 93df8ca88b..429839d86c 100644 --- a/crates/bindings/bevy_transform_bms_bindings/src/lib.rs +++ b/crates/bindings/bevy_transform_bms_bindings/src/lib.rs @@ -1,15 +1,18 @@ + #![allow(clippy::all)] #![allow(unused, deprecated, dead_code)] -use bevy_app::{App, Plugin}; -use bevy_ecs::prelude::*; + + use bevy_mod_scripting_bindings::{ ReflectReference, function::{ - from::{Mut, Ref, Val}, + from::{Ref, Mut, Val}, namespace::NamespaceBuilder, }, }; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; use bevy_mod_scripting_derive::script_bindings; pub struct BevyTransformScriptingPlugin; pub(crate) fn register_global_transform_functions(world: &mut World) { @@ -19,9 +22,9 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { .register_documented( "affine", |_self: Ref<::bevy_transform::components::GlobalTransform>| { - let output: Val<::bevy_math::Affine3A> = { + let output: Val<::glam::Affine3A> = { { - let output: Val<::bevy_math::Affine3A> = ::bevy_transform::components::GlobalTransform::affine( + let output: Val<::glam::Affine3A> = ::bevy_transform::components::GlobalTransform::affine( &_self, ) .into(); @@ -67,23 +70,6 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { "", &["_self"], ) - .register_documented( - "compute_matrix", - |_self: Ref<::bevy_transform::components::GlobalTransform>| { - let output: Val<::bevy_math::Mat4> = { - { - let output: Val<::bevy_math::Mat4> = ::bevy_transform::components::GlobalTransform::compute_matrix( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the 3d affine transformation matrix as a [`Mat4`].", - &["_self"], - ) .register_documented( "compute_transform", |_self: Ref<::bevy_transform::components::GlobalTransform>| { @@ -174,7 +160,7 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { ) .register_documented( "from_rotation", - |rotation: Val<::bevy_math::Quat>| { + |rotation: Val<::glam::Quat>| { let output: Val<::bevy_transform::components::GlobalTransform> = { { let output: Val<::bevy_transform::components::GlobalTransform> = ::bevy_transform::components::GlobalTransform::from_rotation( @@ -191,7 +177,7 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { ) .register_documented( "from_scale", - |scale: Val<::bevy_math::Vec3>| { + |scale: Val<::glam::Vec3>| { let output: Val<::bevy_transform::components::GlobalTransform> = { { let output: Val<::bevy_transform::components::GlobalTransform> = ::bevy_transform::components::GlobalTransform::from_scale( @@ -208,7 +194,7 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { ) .register_documented( "from_translation", - |translation: Val<::bevy_math::Vec3>| { + |translation: Val<::glam::Vec3>| { let output: Val<::bevy_transform::components::GlobalTransform> = { { let output: Val<::bevy_transform::components::GlobalTransform> = ::bevy_transform::components::GlobalTransform::from_translation( @@ -263,13 +249,13 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { "mul", | _self: Val<::bevy_transform::components::GlobalTransform>, - value: Val<::bevy_math::Vec3>| + global_transform: Val<::bevy_transform::components::GlobalTransform>| { - let output: Val<::bevy_math::Vec3> = { + let output: Val<::bevy_transform::components::GlobalTransform> = { { - let output: Val<::bevy_math::Vec3> = <::bevy_transform::components::GlobalTransform as ::core::ops::Mul< - ::bevy_math::Vec3, - >>::mul(_self.into_inner(), value.into_inner()) + let output: Val<::bevy_transform::components::GlobalTransform> = <::bevy_transform::components::GlobalTransform as ::core::ops::Mul< + ::bevy_transform::components::GlobalTransform, + >>::mul(_self.into_inner(), global_transform.into_inner()) .into(); output } @@ -277,19 +263,19 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { output }, "", - &["_self", "value"], + &["_self", "global_transform"], ) .register_documented( "mul", | _self: Val<::bevy_transform::components::GlobalTransform>, - global_transform: Val<::bevy_transform::components::GlobalTransform>| + transform: Val<::bevy_transform::components::Transform>| { let output: Val<::bevy_transform::components::GlobalTransform> = { { let output: Val<::bevy_transform::components::GlobalTransform> = <::bevy_transform::components::GlobalTransform as ::core::ops::Mul< - ::bevy_transform::components::GlobalTransform, - >>::mul(_self.into_inner(), global_transform.into_inner()) + ::bevy_transform::components::Transform, + >>::mul(_self.into_inner(), transform.into_inner()) .into(); output } @@ -297,19 +283,19 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { output }, "", - &["_self", "global_transform"], + &["_self", "transform"], ) .register_documented( "mul", | _self: Val<::bevy_transform::components::GlobalTransform>, - transform: Val<::bevy_transform::components::Transform>| + value: Val<::glam::Vec3>| { - let output: Val<::bevy_transform::components::GlobalTransform> = { + let output: Val<::glam::Vec3> = { { - let output: Val<::bevy_transform::components::GlobalTransform> = <::bevy_transform::components::GlobalTransform as ::core::ops::Mul< - ::bevy_transform::components::Transform, - >>::mul(_self.into_inner(), transform.into_inner()) + let output: Val<::glam::Vec3> = <::bevy_transform::components::GlobalTransform as ::core::ops::Mul< + ::glam::Vec3, + >>::mul(_self.into_inner(), value.into_inner()) .into(); output } @@ -317,7 +303,7 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { output }, "", - &["_self", "transform"], + &["_self", "value"], ) .register_documented( "mul_transform", @@ -344,7 +330,7 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { "radius_vec3a", | _self: Ref<::bevy_transform::components::GlobalTransform>, - extents: Val<::bevy_math::Vec3A>| + extents: Val<::glam::Vec3A>| { let output: f32 = { { @@ -379,7 +365,7 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { }; output }, - " Returns the [`Transform`] `self` would have if it was a child of an entity\n with the `parent` [`GlobalTransform`].\n This is useful if you want to \"reparent\" an [`Entity`](bevy_ecs::entity::Entity).\n Say you have an entity `e1` that you want to turn into a child of `e2`,\n but you want `e1` to keep the same global transform, even after re-parenting. You would use:\n ```\n # use bevy_transform::prelude::{GlobalTransform, Transform};\n # use bevy_ecs::prelude::{Entity, Query, Component, Commands};\n #[derive(Component)]\n struct ToReparent {\n new_parent: Entity,\n }\n fn reparent_system(\n mut commands: Commands,\n mut targets: Query<(&mut Transform, Entity, &GlobalTransform, &ToReparent)>,\n transforms: Query<&GlobalTransform>,\n ) {\n for (mut transform, entity, initial, to_reparent) in targets.iter_mut() {\n if let Ok(parent_transform) = transforms.get(to_reparent.new_parent) {\n *transform = initial.reparented_to(parent_transform);\n commands.entity(entity)\n .remove::()\n .set_parent(to_reparent.new_parent);\n }\n }\n }\n ```\n The transform is expected to be non-degenerate and without shearing, or the output\n will be invalid.", + " Returns the [`Transform`] `self` would have if it was a child of an entity\n with the `parent` [`GlobalTransform`].\n This is useful if you want to \"reparent\" an [`Entity`](bevy_ecs::entity::Entity).\n Say you have an entity `e1` that you want to turn into a child of `e2`,\n but you want `e1` to keep the same global transform, even after re-parenting. You would use:\n ```\n # use bevy_transform::prelude::{GlobalTransform, Transform};\n # use bevy_ecs::prelude::{Entity, Query, Component, Commands, ChildOf};\n #[derive(Component)]\n struct ToReparent {\n new_parent: Entity,\n }\n fn reparent_system(\n mut commands: Commands,\n mut targets: Query<(&mut Transform, Entity, &GlobalTransform, &ToReparent)>,\n transforms: Query<&GlobalTransform>,\n ) {\n for (mut transform, entity, initial, to_reparent) in targets.iter_mut() {\n if let Ok(parent_transform) = transforms.get(to_reparent.new_parent) {\n *transform = initial.reparented_to(parent_transform);\n commands.entity(entity)\n .remove::()\n .insert(ChildOf(to_reparent.new_parent));\n }\n }\n }\n ```\n The transform is expected to be non-degenerate and without shearing, or the output\n will be invalid.", &["_self", "parent"], ) .register_documented( @@ -402,9 +388,9 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { .register_documented( "rotation", |_self: Ref<::bevy_transform::components::GlobalTransform>| { - let output: Val<::bevy_math::Quat> = { + let output: Val<::glam::Quat> = { { - let output: Val<::bevy_math::Quat> = ::bevy_transform::components::GlobalTransform::rotation( + let output: Val<::glam::Quat> = ::bevy_transform::components::GlobalTransform::rotation( &_self, ) .into(); @@ -419,9 +405,9 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { .register_documented( "scale", |_self: Ref<::bevy_transform::components::GlobalTransform>| { - let output: Val<::bevy_math::Vec3> = { + let output: Val<::glam::Vec3> = { { - let output: Val<::bevy_math::Vec3> = ::bevy_transform::components::GlobalTransform::scale( + let output: Val<::glam::Vec3> = ::bevy_transform::components::GlobalTransform::scale( &_self, ) .into(); @@ -447,18 +433,35 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { }; output }, - " Returns the isometric part of the transformation as an [isometry]. Any scaling done by the\n transformation will be ignored.\n The transform is expected to be non-degenerate and without shearing, or the output\n will be invalid.\n [isometry]: Isometry3d", + " Computes a Scale-Rotation-Translation decomposition of the transformation and returns\n the isometric part as an [isometry]. Any scaling done by the transformation will be ignored.\n Note: this is a somewhat costly and lossy conversion.\n The transform is expected to be non-degenerate and without shearing, or the output\n will be invalid.\n [isometry]: Isometry3d", + &["_self"], + ) + .register_documented( + "to_matrix", + |_self: Ref<::bevy_transform::components::GlobalTransform>| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = ::bevy_transform::components::GlobalTransform::to_matrix( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the 3d affine transformation matrix as a [`Mat4`].", &["_self"], ) .register_documented( "transform_point", | _self: Ref<::bevy_transform::components::GlobalTransform>, - point: Val<::bevy_math::Vec3>| + point: Val<::glam::Vec3>| { - let output: Val<::bevy_math::Vec3> = { + let output: Val<::glam::Vec3> = { { - let output: Val<::bevy_math::Vec3> = ::bevy_transform::components::GlobalTransform::transform_point( + let output: Val<::glam::Vec3> = ::bevy_transform::components::GlobalTransform::transform_point( &_self, point.into_inner(), ) @@ -474,9 +477,9 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { .register_documented( "translation", |_self: Ref<::bevy_transform::components::GlobalTransform>| { - let output: Val<::bevy_math::Vec3> = { + let output: Val<::glam::Vec3> = { { - let output: Val<::bevy_math::Vec3> = ::bevy_transform::components::GlobalTransform::translation( + let output: Val<::glam::Vec3> = ::bevy_transform::components::GlobalTransform::translation( &_self, ) .into(); @@ -491,9 +494,9 @@ pub(crate) fn register_global_transform_functions(world: &mut World) { .register_documented( "translation_vec3a", |_self: Ref<::bevy_transform::components::GlobalTransform>| { - let output: Val<::bevy_math::Vec3A> = { + let output: Val<::glam::Vec3A> = { { - let output: Val<::bevy_math::Vec3A> = ::bevy_transform::components::GlobalTransform::translation_vec3a( + let output: Val<::glam::Vec3A> = ::bevy_transform::components::GlobalTransform::translation_vec3a( &_self, ) .into(); @@ -571,26 +574,9 @@ pub(crate) fn register_transform_functions(world: &mut World) { .register_documented( "compute_affine", |_self: Ref<::bevy_transform::components::Transform>| { - let output: Val<::bevy_math::Affine3A> = { + let output: Val<::glam::Affine3A> = { { - let output: Val<::bevy_math::Affine3A> = ::bevy_transform::components::Transform::compute_affine( - &_self, - ) - .into(); - output - } - }; - output - }, - " Returns the 3d affine transformation matrix from this transforms translation,\n rotation, and scale.", - &["_self"], - ) - .register_documented( - "compute_matrix", - |_self: Ref<::bevy_transform::components::Transform>| { - let output: Val<::bevy_math::Mat4> = { - { - let output: Val<::bevy_math::Mat4> = ::bevy_transform::components::Transform::compute_matrix( + let output: Val<::glam::Affine3A> = ::bevy_transform::components::Transform::compute_affine( &_self, ) .into(); @@ -675,7 +661,7 @@ pub(crate) fn register_transform_functions(world: &mut World) { ) .register_documented( "from_matrix", - |world_from_local: Val<::bevy_math::Mat4>| { + |world_from_local: Val<::glam::Mat4>| { let output: Val<::bevy_transform::components::Transform> = { { let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::from_matrix( @@ -692,7 +678,7 @@ pub(crate) fn register_transform_functions(world: &mut World) { ) .register_documented( "from_rotation", - |rotation: Val<::bevy_math::Quat>| { + |rotation: Val<::glam::Quat>| { let output: Val<::bevy_transform::components::Transform> = { { let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::from_rotation( @@ -709,7 +695,7 @@ pub(crate) fn register_transform_functions(world: &mut World) { ) .register_documented( "from_scale", - |scale: Val<::bevy_math::Vec3>| { + |scale: Val<::glam::Vec3>| { let output: Val<::bevy_transform::components::Transform> = { { let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::from_scale( @@ -726,7 +712,7 @@ pub(crate) fn register_transform_functions(world: &mut World) { ) .register_documented( "from_translation", - |translation: Val<::bevy_math::Vec3>| { + |translation: Val<::glam::Vec3>| { let output: Val<::bevy_transform::components::Transform> = { { let output: Val<::bevy_transform::components::Transform> = ::bevy_transform::components::Transform::from_translation( @@ -849,13 +835,13 @@ pub(crate) fn register_transform_functions(world: &mut World) { "mul", | _self: Val<::bevy_transform::components::Transform>, - value: Val<::bevy_math::Vec3>| + global_transform: Val<::bevy_transform::components::GlobalTransform>| { - let output: Val<::bevy_math::Vec3> = { + let output: Val<::bevy_transform::components::GlobalTransform> = { { - let output: Val<::bevy_math::Vec3> = <::bevy_transform::components::Transform as ::core::ops::Mul< - ::bevy_math::Vec3, - >>::mul(_self.into_inner(), value.into_inner()) + let output: Val<::bevy_transform::components::GlobalTransform> = <::bevy_transform::components::Transform as ::core::ops::Mul< + ::bevy_transform::components::GlobalTransform, + >>::mul(_self.into_inner(), global_transform.into_inner()) .into(); output } @@ -863,19 +849,19 @@ pub(crate) fn register_transform_functions(world: &mut World) { output }, "", - &["_self", "value"], + &["_self", "global_transform"], ) .register_documented( "mul", | _self: Val<::bevy_transform::components::Transform>, - global_transform: Val<::bevy_transform::components::GlobalTransform>| + transform: Val<::bevy_transform::components::Transform>| { - let output: Val<::bevy_transform::components::GlobalTransform> = { + let output: Val<::bevy_transform::components::Transform> = { { - let output: Val<::bevy_transform::components::GlobalTransform> = <::bevy_transform::components::Transform as ::core::ops::Mul< - ::bevy_transform::components::GlobalTransform, - >>::mul(_self.into_inner(), global_transform.into_inner()) + let output: Val<::bevy_transform::components::Transform> = <::bevy_transform::components::Transform as ::core::ops::Mul< + ::bevy_transform::components::Transform, + >>::mul(_self.into_inner(), transform.into_inner()) .into(); output } @@ -883,19 +869,19 @@ pub(crate) fn register_transform_functions(world: &mut World) { output }, "", - &["_self", "global_transform"], + &["_self", "transform"], ) .register_documented( "mul", | _self: Val<::bevy_transform::components::Transform>, - transform: Val<::bevy_transform::components::Transform>| + value: Val<::glam::Vec3>| { - let output: Val<::bevy_transform::components::Transform> = { + let output: Val<::glam::Vec3> = { { - let output: Val<::bevy_transform::components::Transform> = <::bevy_transform::components::Transform as ::core::ops::Mul< - ::bevy_transform::components::Transform, - >>::mul(_self.into_inner(), transform.into_inner()) + let output: Val<::glam::Vec3> = <::bevy_transform::components::Transform as ::core::ops::Mul< + ::glam::Vec3, + >>::mul(_self.into_inner(), value.into_inner()) .into(); output } @@ -903,7 +889,7 @@ pub(crate) fn register_transform_functions(world: &mut World) { output }, "", - &["_self", "transform"], + &["_self", "value"], ) .register_documented( "mul_transform", @@ -947,7 +933,7 @@ pub(crate) fn register_transform_functions(world: &mut World) { "rotate", | mut _self: Mut<::bevy_transform::components::Transform>, - rotation: Val<::bevy_math::Quat>| + rotation: Val<::glam::Quat>| { let output: () = { { @@ -968,8 +954,8 @@ pub(crate) fn register_transform_functions(world: &mut World) { "rotate_around", | mut _self: Mut<::bevy_transform::components::Transform>, - point: Val<::bevy_math::Vec3>, - rotation: Val<::bevy_math::Quat>| + point: Val<::glam::Vec3>, + rotation: Val<::glam::Quat>| { let output: () = { { @@ -1014,7 +1000,7 @@ pub(crate) fn register_transform_functions(world: &mut World) { "rotate_local", | mut _self: Mut<::bevy_transform::components::Transform>, - rotation: Val<::bevy_math::Quat>| + rotation: Val<::glam::Quat>| { let output: () = { { @@ -1179,15 +1165,32 @@ pub(crate) fn register_transform_functions(world: &mut World) { " Get the [isometry] defined by this transform's rotation and translation, ignoring scale.\n [isometry]: Isometry3d", &["_self"], ) + .register_documented( + "to_matrix", + |_self: Ref<::bevy_transform::components::Transform>| { + let output: Val<::glam::Mat4> = { + { + let output: Val<::glam::Mat4> = ::bevy_transform::components::Transform::to_matrix( + &_self, + ) + .into(); + output + } + }; + output + }, + " Computes the 3d affine transformation matrix from this transform's translation,\n rotation, and scale.", + &["_self"], + ) .register_documented( "transform_point", | _self: Ref<::bevy_transform::components::Transform>, - point: Val<::bevy_math::Vec3>| + point: Val<::glam::Vec3>| { - let output: Val<::bevy_math::Vec3> = { + let output: Val<::glam::Vec3> = { { - let output: Val<::bevy_math::Vec3> = ::bevy_transform::components::Transform::transform_point( + let output: Val<::glam::Vec3> = ::bevy_transform::components::Transform::transform_point( &_self, point.into_inner(), ) @@ -1204,8 +1207,8 @@ pub(crate) fn register_transform_functions(world: &mut World) { "translate_around", | mut _self: Mut<::bevy_transform::components::Transform>, - point: Val<::bevy_math::Vec3>, - rotation: Val<::bevy_math::Quat>| + point: Val<::glam::Vec3>, + rotation: Val<::glam::Quat>| { let output: () = { { @@ -1244,7 +1247,7 @@ pub(crate) fn register_transform_functions(world: &mut World) { "with_rotation", | _self: Val<::bevy_transform::components::Transform>, - rotation: Val<::bevy_math::Quat>| + rotation: Val<::glam::Quat>| { let output: Val<::bevy_transform::components::Transform> = { { @@ -1265,7 +1268,7 @@ pub(crate) fn register_transform_functions(world: &mut World) { "with_scale", | _self: Val<::bevy_transform::components::Transform>, - scale: Val<::bevy_math::Vec3>| + scale: Val<::glam::Vec3>| { let output: Val<::bevy_transform::components::Transform> = { { @@ -1286,7 +1289,7 @@ pub(crate) fn register_transform_functions(world: &mut World) { "with_translation", | _self: Val<::bevy_transform::components::Transform>, - translation: Val<::bevy_math::Vec3>| + translation: Val<::glam::Vec3>| { let output: Val<::bevy_transform::components::Transform> = { { diff --git a/crates/bindings/bevy_ui_bms_bindings/Cargo.toml b/crates/bindings/bevy_ui_bms_bindings/Cargo.toml new file mode 100644 index 0000000000..01ff25454e --- /dev/null +++ b/crates/bindings/bevy_ui_bms_bindings/Cargo.toml @@ -0,0 +1,63 @@ +[package] +name = "bevy_ui_bms_bindings" +description = "Automatically generated bindings for bevy_ui crate" +readme = "README.md" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +keywords.workspace = true +categories.workspace = true + +[dependencies] + + +bevy_mod_scripting_core = { workspace = true } +bevy_mod_scripting_bindings = { workspace = true } +bevy_mod_scripting_derive = { workspace = true } +bevy_ui = { version = "0.17.2", features = ["bevy_picking", "bevy_ui_picking_backend"], default-features = true} + + +accesskit = { version = "^0.21", features = [], default-features = true} + +bevy_a11y = { version = "^0.17.2", features = ["bevy_reflect", "std"], default-features = true} + +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} + +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} + +bevy_camera = { version = "^0.17.2", features = [], default-features = true} + +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} + +bevy_derive = { version = "^0.17.2", features = [], default-features = true} + +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} + +bevy_input = { version = "^0.17.2", features = ["bevy_reflect", "smol_str", "std"], default-features = true} + +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} + +bevy_picking = { version = "^0.17.2", features = ["bevy_mesh_picking_backend"], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} + +bevy_sprite = { version = "^0.17.2", features = ["bevy_picking", "bevy_sprite_picking_backend", "bevy_text", "bevy_window"], default-features = true} + +bevy_text = { version = "^0.17.2", features = ["default_font"], default-features = true} + +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} + +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} + +bevy_window = { version = "^0.17.2", features = ["bevy_asset", "bevy_image", "bevy_reflect", "custom_cursor", "std"], default-features = true} + +taffy = { version = "^0.7", features = [], default-features = true} + +uuid = { version = "^1.1", features = [], default-features = true} + + diff --git a/crates/bindings/bevy_ui_bms_bindings/README.md b/crates/bindings/bevy_ui_bms_bindings/README.md new file mode 100644 index 0000000000..0edceffbab --- /dev/null +++ b/crates/bindings/bevy_ui_bms_bindings/README.md @@ -0,0 +1,4 @@ +# bevy_ui bindings +This crate is part of the [bevy_mod_scripting](http://github.com/makspll/bevy_mod_scripting) project. + +The code inside is fully generated via a custom rustc plugin. \ No newline at end of file diff --git a/crates/bindings/bevy_ui_bms_bindings/src/lib.rs b/crates/bindings/bevy_ui_bms_bindings/src/lib.rs new file mode 100644 index 0000000000..519a6de1d3 --- /dev/null +++ b/crates/bindings/bevy_ui_bms_bindings/src/lib.rs @@ -0,0 +1,6198 @@ + +#![allow(clippy::all)] +#![allow(unused, deprecated, dead_code)] + + + +use bevy_mod_scripting_bindings::{ + ReflectReference, + function::{ + from::{Ref, Mut, Val}, + namespace::NamespaceBuilder, + }, +}; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; +use bevy_mod_scripting_derive::script_bindings; +pub struct BevyUiScriptingPlugin; +pub(crate) fn register_display_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::Display, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::Display>| { + let output: () = { + { + let output: () = <::bevy_ui::Display as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::Display>| { + let output: Val<::bevy_ui::Display> = { + { + let output: Val<::bevy_ui::Display> = <::bevy_ui::Display as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::Display>, other: Ref<::bevy_ui::Display>| { + let output: bool = { + { + let output: bool = <::bevy_ui::Display as ::std::cmp::PartialEq< + ::bevy_ui::Display, + >>::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::Display, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_ui_picking_camera_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::picking_backend::UiPickingCamera, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::picking_backend::UiPickingCamera>| { + let output: Val<::bevy_ui::picking_backend::UiPickingCamera> = { + { + let output: Val<::bevy_ui::picking_backend::UiPickingCamera> = <::bevy_ui::picking_backend::UiPickingCamera 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::picking_backend::UiPickingCamera, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_ui_picking_settings_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::picking_backend::UiPickingSettings, + >::new(world); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::picking_backend::UiPickingSettings, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_text_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::widget::Text, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::widget::Text>| { + let output: Val<::bevy_ui::widget::Text> = { + { + let output: Val<::bevy_ui::widget::Text> = <::bevy_ui::widget::Text as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::widget::Text>, other: Ref<::bevy_ui::widget::Text>| { + let output: bool = { + { + let output: bool = <::bevy_ui::widget::Text as ::std::cmp::PartialEq< + ::bevy_ui::widget::Text, + >>::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::widget::Text, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_text_shadow_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::widget::TextShadow, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::widget::TextShadow>| { + let output: Val<::bevy_ui::widget::TextShadow> = { + { + let output: Val<::bevy_ui::widget::TextShadow> = <::bevy_ui::widget::TextShadow as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::widget::TextShadow>, + other: Ref<::bevy_ui::widget::TextShadow>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::widget::TextShadow as ::std::cmp::PartialEq< + ::bevy_ui::widget::TextShadow, + >>::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::widget::TextShadow, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_button_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::widget::Button, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::widget::Button>| { + let output: () = { + { + let output: () = <::bevy_ui::widget::Button as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::widget::Button>| { + let output: Val<::bevy_ui::widget::Button> = { + { + let output: Val<::bevy_ui::widget::Button> = <::bevy_ui::widget::Button as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::widget::Button>, + other: Ref<::bevy_ui::widget::Button>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::widget::Button as ::std::cmp::PartialEq< + ::bevy_ui::widget::Button, + >>::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::widget::Button, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_image_node_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::widget::ImageNode, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::widget::ImageNode>| { + let output: Val<::bevy_ui::widget::ImageNode> = { + { + let output: Val<::bevy_ui::widget::ImageNode> = <::bevy_ui::widget::ImageNode as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "solid_color", + |color: Val<::bevy_color::Color>| { + let output: Val<::bevy_ui::widget::ImageNode> = { + { + let output: Val<::bevy_ui::widget::ImageNode> = ::bevy_ui::widget::ImageNode::solid_color( + color.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Create a solid color [`ImageNode`].\n This is primarily useful for debugging / mocking the extents of your image.", + &["color"], + ) + .register_documented( + "with_color", + |_self: Val<::bevy_ui::widget::ImageNode>, color: Val<::bevy_color::Color>| { + let output: Val<::bevy_ui::widget::ImageNode> = { + { + let output: Val<::bevy_ui::widget::ImageNode> = ::bevy_ui::widget::ImageNode::with_color( + _self.into_inner(), + color.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Set the color tint", + &["_self", "color"], + ) + .register_documented( + "with_flip_x", + |_self: Val<::bevy_ui::widget::ImageNode>| { + let output: Val<::bevy_ui::widget::ImageNode> = { + { + let output: Val<::bevy_ui::widget::ImageNode> = ::bevy_ui::widget::ImageNode::with_flip_x( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Flip the image along its x-axis", + &["_self"], + ) + .register_documented( + "with_flip_y", + |_self: Val<::bevy_ui::widget::ImageNode>| { + let output: Val<::bevy_ui::widget::ImageNode> = { + { + let output: Val<::bevy_ui::widget::ImageNode> = ::bevy_ui::widget::ImageNode::with_flip_y( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Flip the image along its y-axis", + &["_self"], + ) + .register_documented( + "with_mode", + | + _self: Val<::bevy_ui::widget::ImageNode>, + mode: Val<::bevy_ui::widget::NodeImageMode>| + { + let output: Val<::bevy_ui::widget::ImageNode> = { + { + let output: Val<::bevy_ui::widget::ImageNode> = ::bevy_ui::widget::ImageNode::with_mode( + _self.into_inner(), + mode.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["_self", "mode"], + ) + .register_documented( + "with_rect", + |_self: Val<::bevy_ui::widget::ImageNode>, rect: Val<::bevy_math::Rect>| { + let output: Val<::bevy_ui::widget::ImageNode> = { + { + let output: Val<::bevy_ui::widget::ImageNode> = ::bevy_ui::widget::ImageNode::with_rect( + _self.into_inner(), + rect.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["_self", "rect"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::widget::ImageNode, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_label_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::widget::Label, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::widget::Label>| { + let output: Val<::bevy_ui::widget::Label> = { + { + let output: Val<::bevy_ui::widget::Label> = <::bevy_ui::widget::Label 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::Label, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_node_image_mode_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::widget::NodeImageMode, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::widget::NodeImageMode>| { + let output: Val<::bevy_ui::widget::NodeImageMode> = { + { + let output: Val<::bevy_ui::widget::NodeImageMode> = <::bevy_ui::widget::NodeImageMode as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::widget::NodeImageMode>, + other: Ref<::bevy_ui::widget::NodeImageMode>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::widget::NodeImageMode as ::std::cmp::PartialEq< + ::bevy_ui::widget::NodeImageMode, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "uses_slices", + |_self: Ref<::bevy_ui::widget::NodeImageMode>| { + let output: bool = { + { + let output: bool = ::bevy_ui::widget::NodeImageMode::uses_slices( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns true if this mode uses slices internally ([`NodeImageMode::Sliced`] or [`NodeImageMode::Tiled`])", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::widget::NodeImageMode, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_viewport_node_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::widget::ViewportNode, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::widget::ViewportNode>| { + let output: Val<::bevy_ui::widget::ViewportNode> = { + { + let output: Val<::bevy_ui::widget::ViewportNode> = <::bevy_ui::widget::ViewportNode as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "new", + |camera: Val<::bevy_ecs::entity::Entity>| { + let output: Val<::bevy_ui::widget::ViewportNode> = { + { + let output: Val<::bevy_ui::widget::ViewportNode> = ::bevy_ui::widget::ViewportNode::new( + camera.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a new [`ViewportNode`] with a given `camera`.", + &["camera"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::widget::ViewportNode, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_interaction_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::Interaction, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::Interaction>| { + let output: () = { + { + let output: () = <::bevy_ui::Interaction as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::Interaction>| { + let output: Val<::bevy_ui::Interaction> = { + { + let output: Val<::bevy_ui::Interaction> = <::bevy_ui::Interaction as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::Interaction>, other: Ref<::bevy_ui::Interaction>| { + let output: bool = { + { + let output: bool = <::bevy_ui::Interaction as ::std::cmp::PartialEq< + ::bevy_ui::Interaction, + >>::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::Interaction, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_ui_scale_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::UiScale, + >::new(world); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::UiScale, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_computed_ui_target_camera_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::ComputedUiTargetCamera, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::ComputedUiTargetCamera>| { + let output: Val<::bevy_ui::ComputedUiTargetCamera> = { + { + let output: Val<::bevy_ui::ComputedUiTargetCamera> = <::bevy_ui::ComputedUiTargetCamera as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::ComputedUiTargetCamera>, + other: Ref<::bevy_ui::ComputedUiTargetCamera>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::ComputedUiTargetCamera as ::std::cmp::PartialEq< + ::bevy_ui::ComputedUiTargetCamera, + >>::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::ComputedUiTargetCamera, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_computed_ui_render_target_info_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::ComputedUiRenderTargetInfo, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::ComputedUiRenderTargetInfo>| { + let output: Val<::bevy_ui::ComputedUiRenderTargetInfo> = { + { + let output: Val<::bevy_ui::ComputedUiRenderTargetInfo> = <::bevy_ui::ComputedUiRenderTargetInfo as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::ComputedUiRenderTargetInfo>, + other: Ref<::bevy_ui::ComputedUiRenderTargetInfo>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::ComputedUiRenderTargetInfo as ::std::cmp::PartialEq< + ::bevy_ui::ComputedUiRenderTargetInfo, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "logical_size", + |_self: Ref<::bevy_ui::ComputedUiRenderTargetInfo>| { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::Vec2> = ::bevy_ui::ComputedUiRenderTargetInfo::logical_size( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the size of the target camera's viewport in logical pixels.", + &["_self"], + ) + .register_documented( + "physical_size", + |_self: Ref<::bevy_ui::ComputedUiRenderTargetInfo>| { + let output: Val<::glam::UVec2> = { + { + let output: Val<::glam::UVec2> = ::bevy_ui::ComputedUiRenderTargetInfo::physical_size( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the size of the target camera's viewport in physical pixels.", + &["_self"], + ) + .register_documented( + "scale_factor", + |_self: Ref<::bevy_ui::ComputedUiRenderTargetInfo>| { + let output: f32 = { + { + let output: f32 = ::bevy_ui::ComputedUiRenderTargetInfo::scale_factor( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::ComputedUiRenderTargetInfo, + 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( + "fixed_size", + |size: Val<::glam::Vec2>| { + let output: Val<::bevy_ui::ContentSize> = { + { + let output: Val<::bevy_ui::ContentSize> = ::bevy_ui::ContentSize::fixed_size( + size.into_inner(), + ) + .into(); + output + } + }; + 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) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::CalculatedClip>| { + let output: Val<::bevy_ui::CalculatedClip> = { + { + let output: Val<::bevy_ui::CalculatedClip> = <::bevy_ui::CalculatedClip 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::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: () = { + { + let output: () = <::bevy_ui::OverflowAxis as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::OverflowAxis>| { + let output: Val<::bevy_ui::OverflowAxis> = { + { + let output: Val<::bevy_ui::OverflowAxis> = <::bevy_ui::OverflowAxis as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::OverflowAxis>, other: Ref<::bevy_ui::OverflowAxis>| { + let output: bool = { + { + let output: bool = <::bevy_ui::OverflowAxis as ::std::cmp::PartialEq< + ::bevy_ui::OverflowAxis, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .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: () = { + { + let output: () = <::bevy_ui::UiTargetCamera as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::UiTargetCamera>| { + let output: Val<::bevy_ui::UiTargetCamera> = { + { + let output: Val<::bevy_ui::UiTargetCamera> = <::bevy_ui::UiTargetCamera as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "entity", + |_self: Ref<::bevy_ui::UiTargetCamera>| { + let output: Val<::bevy_ecs::entity::Entity> = { + { + let output: Val<::bevy_ecs::entity::Entity> = ::bevy_ui::UiTargetCamera::entity( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::UiTargetCamera>, + other: Ref<::bevy_ui::UiTargetCamera>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::UiTargetCamera as ::std::cmp::PartialEq< + ::bevy_ui::UiTargetCamera, + >>::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::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", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_sprite::BorderRect> = { + { + let output: Val<::bevy_sprite::BorderRect> = ::bevy_ui::ComputedNode::border( + &_self, + ) + .into(); + output + } + }; + 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`).", + &["_self"], + ) + .register_documented( + "border_radius", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_ui::ResolvedBorderRadius> = { + { + 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<::glam::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_sprite::BorderRect> = { + { + let output: Val<::bevy_sprite::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<::glam::Vec2> = { + { + let output: Val<::glam::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( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the inverse of the scale factor for this node.\n To convert from physical coordinates to logical coordinates multiply by this value.", + &["_self"], + ) + .register_documented( + "is_empty", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: bool = { + { + let output: bool = ::bevy_ui::ComputedNode::is_empty(&_self) + .into(); + output + } + }; + output + }, + " Check if the node is empty.\n A node is considered empty if it has a zero or negative extent along either of its axes.", + &["_self"], + ) + .register_documented( + "outline_offset", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: f32 = { + { + let output: f32 = ::bevy_ui::ComputedNode::outline_offset(&_self) + .into(); + output + } + }; + output + }, + " Returns the amount of space between the outline and the edge of the node in physical pixels.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", + &["_self"], + ) + .register_documented( + "outline_radius", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_ui::ResolvedBorderRadius> = { + { + let output: Val<::bevy_ui::ResolvedBorderRadius> = ::bevy_ui::ComputedNode::outline_radius( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the border radius for each corner of the outline\n An outline's border radius is derived from the node's border-radius\n so that the outline wraps the border equally at all points.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", + &["_self"], + ) + .register_documented( + "outline_width", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: f32 = { + { + let output: f32 = ::bevy_ui::ComputedNode::outline_width(&_self) + .into(); + output + } + }; + output + }, + " Returns the thickness of the UI node's outline in physical pixels.\n If this value is negative or `0.` then no outline will be rendered.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", + &["_self"], + ) + .register_documented( + "outlined_node_size", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::Vec2> = ::bevy_ui::ComputedNode::outlined_node_size( + &_self, + ) + .into(); + output + } + }; + output + }, + " Returns the size of the node when including its outline.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", + &["_self"], + ) + .register_documented( + "padding", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::bevy_sprite::BorderRect> = { + { + let output: Val<::bevy_sprite::BorderRect> = ::bevy_ui::ComputedNode::padding( + &_self, + ) + .into(); + output + } + }; + output + }, + " 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( + "resolve_clip_rect", + | + _self: Ref<::bevy_ui::ComputedNode>, + overflow: Val<::bevy_ui::Overflow>, + overflow_clip_margin: Val<::bevy_ui::OverflowClipMargin>| + { + let output: Val<::bevy_math::Rect> = { + { + let output: Val<::bevy_math::Rect> = ::bevy_ui::ComputedNode::resolve_clip_rect( + &_self, + overflow.into_inner(), + overflow_clip_margin.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Resolve the node's clipping rect in local space", + &["_self", "overflow", "overflow_clip_margin"], + ) + .register_documented( + "size", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::Vec2> = ::bevy_ui::ComputedNode::size( + &_self, + ) + .into(); + output + } + }; + output + }, + " The calculated node size as width and height in physical pixels.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", + &["_self"], + ) + .register_documented( + "stack_index", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: u32 = { + { + let output: u32 = ::bevy_ui::ComputedNode::stack_index(&_self) + .into(); + output + } + }; + output + }, + " The order of the node in the UI layout.\n Nodes with a higher stack index are drawn on top of and receive interactions before nodes with lower stack indices.\n Automatically calculated in [`UiSystems::Stack`](super::UiSystems::Stack).", + &["_self"], + ) + .register_documented( + "unrounded_size", + |_self: Ref<::bevy_ui::ComputedNode>| { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::Vec2> = ::bevy_ui::ComputedNode::unrounded_size( + &_self, + ) + .into(); + output + } + }; + output + }, + " The calculated node size as width and height in physical pixels before rounding.\n Automatically calculated by [`ui_layout_system`](`super::layout::ui_layout_system`).", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::ComputedNode, + 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( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::OverflowClipBox>| { + let output: () = { + { + let output: () = <::bevy_ui::OverflowClipBox as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::OverflowClipBox>| { + let output: Val<::bevy_ui::OverflowClipBox> = { + { + let output: Val<::bevy_ui::OverflowClipBox> = <::bevy_ui::OverflowClipBox as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::OverflowClipBox>, + other: Ref<::bevy_ui::OverflowClipBox>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::OverflowClipBox as ::std::cmp::PartialEq< + ::bevy_ui::OverflowClipBox, + >>::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::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: () = { + { + let output: () = <::bevy_ui::FocusPolicy as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::FocusPolicy>| { + let output: Val<::bevy_ui::FocusPolicy> = { + { + let output: Val<::bevy_ui::FocusPolicy> = <::bevy_ui::FocusPolicy as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::FocusPolicy>, other: Ref<::bevy_ui::FocusPolicy>| { + let output: bool = { + { + let output: bool = <::bevy_ui::FocusPolicy as ::std::cmp::PartialEq< + ::bevy_ui::FocusPolicy, + >>::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::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<::glam::UVec2> = { + { + let output: Val<::glam::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<::glam::Vec2>| { + let output: Val<::bevy_ui::UiPosition> = { + { + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::anchor( + anchor.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Position at the given normalized anchor point", + &["anchor"], + ) + .register_documented( + "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::UiPosition> = ::bevy_ui::UiPosition::at( + _self.into_inner(), + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a position from self with the given `x` and `y` coordinates", + &["_self", "x", "y"], + ) + .register_documented( + "at_percent", + |_self: Val<::bevy_ui::UiPosition>, x: f32, y: f32| { + let output: Val<::bevy_ui::UiPosition> = { + { + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_percent( + _self.into_inner(), + x, + y, + ) + .into(); + output + } + }; + output + }, + " Creates a percentage position from self with the given `x` and `y` coordinates", + &["_self", "x", "y"], + ) + .register_documented( + "at_px", + |_self: Val<::bevy_ui::UiPosition>, x: f32, y: f32| { + let output: Val<::bevy_ui::UiPosition> = { + { + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_px( + _self.into_inner(), + x, + y, + ) + .into(); + output + } + }; + output + }, + " Creates a position in logical pixels from self with the given `x` and `y` coordinates", + &["_self", "x", "y"], + ) + .register_documented( + "at_x", + |_self: Val<::bevy_ui::UiPosition>, x: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { + { + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_x( + _self.into_inner(), + x.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a position from self with the given `x` coordinate", + &["_self", "x"], + ) + .register_documented( + "at_y", + |_self: Val<::bevy_ui::UiPosition>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiPosition> = { + { + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::at_y( + _self.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a position from self with the given `y` coordinate", + &["_self", "y"], + ) + .register_documented( + "bottom", + |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::bottom( + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Position relative to the bottom edge", + &["x", "y"], + ) + .register_documented( + "bottom_left", + |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::bottom_left( + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Position relative to the bottom-left corner", + &["x", "y"], + ) + .register_documented( + "bottom_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::bottom_right( + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Position relative to the bottom-right corner", + &["x", "y"], + ) + .register_documented( + "center", + |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::center( + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Position relative to the center", + &["x", "y"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::UiPosition>| { + let output: Val<::bevy_ui::UiPosition> = { + { + let output: Val<::bevy_ui::UiPosition> = <::bevy_ui::UiPosition as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::UiPosition>, other: Ref<::bevy_ui::UiPosition>| { + let output: bool = { + { + let output: bool = <::bevy_ui::UiPosition as ::std::cmp::PartialEq< + ::bevy_ui::UiPosition, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "left", + |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::left( + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Position relative to the left edge", + &["x", "y"], + ) + .register_documented( + "new", + |anchor: Val<::glam::Vec2>, 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::new( + anchor.into_inner(), + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Create a new position", + &["anchor", "x", "y"], + ) + .register_documented( + "resolve", + | + _self: Val<::bevy_ui::UiPosition>, + scale_factor: f32, + physical_size: Val<::glam::Vec2>, + physical_target_size: Val<::glam::Vec2>| + { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::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: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::top( + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Position relative to the top edge", + &["x", "y"], + ) + .register_documented( + "top_left", + |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::top_left( + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Position relative to the top-left corner", + &["x", "y"], + ) + .register_documented( + "top_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::top_right( + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Position relative to the top-right corner", + &["x", "y"], + ) + .register_documented( + "with_anchor", + |_self: Val<::bevy_ui::UiPosition>, anchor: Val<::glam::Vec2>| { + let output: Val<::bevy_ui::UiPosition> = { + { + let output: Val<::bevy_ui::UiPosition> = ::bevy_ui::UiPosition::with_anchor( + _self.into_inner(), + anchor.into_inner(), + ) + .into(); + output + } + }; + output + }, + " 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( + "all", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::all( + _self.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "bottom", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::bottom( + _self.into_inner(), + ) + .into(); + output + } + }; + 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::Val>| { + let output: Val<::bevy_ui::Val> = { + { + let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "div", + |_self: Val<::bevy_ui::Val>, rhs: f32| { + let output: Val<::bevy_ui::Val> = { + { + let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::ops::Div< + f32, + >>::div(_self.into_inner(), rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::Val>, other: Ref<::bevy_ui::Val>| { + let output: bool = { + { + let output: bool = <::bevy_ui::Val as ::std::cmp::PartialEq< + ::bevy_ui::Val, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "horizontal", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::horizontal( + _self.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "left", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::left( + _self.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "mul", + |_self: Val<::bevy_ui::Val>, rhs: f32| { + let output: Val<::bevy_ui::Val> = { + { + let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::ops::Mul< + f32, + >>::mul(_self.into_inner(), rhs) + .into(); + output + } + }; + output + }, + "", + &["_self", "rhs"], + ) + .register_documented( + "neg", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::Val> = { + { + let output: Val<::bevy_ui::Val> = <::bevy_ui::Val as ::std::ops::Neg>::neg( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "right", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::right( + _self.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "top", + |_self: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::top( + _self.into_inner(), + ) + .into(); + output + } + }; + 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> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::Val::vertical( + _self.into_inner(), + ) + .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) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::ColorStop>| { + let output: Val<::bevy_ui::ColorStop> = { + { + let output: Val<::bevy_ui::ColorStop> = <::bevy_ui::ColorStop as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::ColorStop>, other: Ref<::bevy_ui::ColorStop>| { + let output: bool = { + { + let output: bool = <::bevy_ui::ColorStop as ::std::cmp::PartialEq< + ::bevy_ui::ColorStop, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_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::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) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::AngularColorStop>| { + let output: Val<::bevy_ui::AngularColorStop> = { + { + let output: Val<::bevy_ui::AngularColorStop> = <::bevy_ui::AngularColorStop as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::AngularColorStop>, + other: Ref<::bevy_ui::AngularColorStop>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::AngularColorStop as ::std::cmp::PartialEq< + ::bevy_ui::AngularColorStop, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "with_hint", + |_self: Val<::bevy_ui::AngularColorStop>, hint: f32| { + let output: Val<::bevy_ui::AngularColorStop> = { + { + let output: Val<::bevy_ui::AngularColorStop> = ::bevy_ui::AngularColorStop::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::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( + "clone", + |_self: Ref<::bevy_ui::LinearGradient>| { + let output: Val<::bevy_ui::LinearGradient> = { + { + let output: Val<::bevy_ui::LinearGradient> = <::bevy_ui::LinearGradient as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::LinearGradient>, + other: Ref<::bevy_ui::LinearGradient>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::LinearGradient as ::std::cmp::PartialEq< + ::bevy_ui::LinearGradient, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "in_color_space", + | + _self: Val<::bevy_ui::LinearGradient>, + color_space: Val<::bevy_ui::InterpolationColorSpace>| + { + let output: Val<::bevy_ui::LinearGradient> = { + { + let output: Val<::bevy_ui::LinearGradient> = ::bevy_ui::LinearGradient::in_color_space( + _self.into_inner(), + color_space.into_inner(), + ) + .into(); + output + } + }; + 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) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::InterpolationColorSpace>| { + let output: () = { + { + let output: () = <::bevy_ui::InterpolationColorSpace as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::InterpolationColorSpace>| { + let output: Val<::bevy_ui::InterpolationColorSpace> = { + { + let output: Val<::bevy_ui::InterpolationColorSpace> = <::bevy_ui::InterpolationColorSpace as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::InterpolationColorSpace>, + other: Ref<::bevy_ui::InterpolationColorSpace>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::InterpolationColorSpace as ::std::cmp::PartialEq< + ::bevy_ui::InterpolationColorSpace, + >>::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::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( + "clone", + |_self: Ref<::bevy_ui::RadialGradient>| { + let output: Val<::bevy_ui::RadialGradient> = { + { + let output: Val<::bevy_ui::RadialGradient> = <::bevy_ui::RadialGradient as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::RadialGradient>, + other: Ref<::bevy_ui::RadialGradient>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::RadialGradient as ::std::cmp::PartialEq< + ::bevy_ui::RadialGradient, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "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::RadialGradient> = ::bevy_ui::RadialGradient::in_color_space( + _self.into_inner(), + color_space.into_inner(), + ) + .into(); + output + } + }; + 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<::glam::Vec2>, + scale_factor: f32, + physical_size: Val<::glam::Vec2>, + physical_target_size: Val<::glam::Vec2>| + { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::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) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::ConicGradient>| { + let output: Val<::bevy_ui::ConicGradient> = { + { + let output: Val<::bevy_ui::ConicGradient> = <::bevy_ui::ConicGradient as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::ConicGradient>, other: Ref<::bevy_ui::ConicGradient>| { + let output: bool = { + { + let output: bool = <::bevy_ui::ConicGradient as ::std::cmp::PartialEq< + ::bevy_ui::ConicGradient, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "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::ConicGradient> = ::bevy_ui::ConicGradient::in_color_space( + _self.into_inner(), + color_space.into_inner(), + ) + .into(); + output + } + }; + output + }, + "", + &["_self", "color_space"], + ) + .register_documented( + "with_position", + |_self: Val<::bevy_ui::ConicGradient>, position: Val<::bevy_ui::UiPosition>| { + let output: Val<::bevy_ui::ConicGradient> = { + { + let output: Val<::bevy_ui::ConicGradient> = ::bevy_ui::ConicGradient::with_position( + _self.into_inner(), + position.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Sets the position of the gradient", + &["_self", "position"], + ) + .register_documented( + "with_start", + |_self: Val<::bevy_ui::ConicGradient>, start: f32| { + let output: Val<::bevy_ui::ConicGradient> = { + { + let output: Val<::bevy_ui::ConicGradient> = ::bevy_ui::ConicGradient::with_start( + _self.into_inner(), + start, + ) + .into(); + output + } + }; + output + }, + " 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( + "clone", + |_self: Ref<::bevy_ui::BorderGradient>| { + let output: Val<::bevy_ui::BorderGradient> = { + { + let output: Val<::bevy_ui::BorderGradient> = <::bevy_ui::BorderGradient as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::BorderGradient>, + other: Ref<::bevy_ui::BorderGradient>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::BorderGradient as ::std::cmp::PartialEq< + ::bevy_ui::BorderGradient, + >>::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::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( + "clone", + |_self: Ref<::bevy_ui::Val2>| { + let output: Val<::bevy_ui::Val2> = { + { + let output: Val<::bevy_ui::Val2> = <::bevy_ui::Val2 as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::Val2>, other: Ref<::bevy_ui::Val2>| { + let output: bool = { + { + let output: bool = <::bevy_ui::Val2 as ::std::cmp::PartialEq< + ::bevy_ui::Val2, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "new", + |x: Val<::bevy_ui::Val>, y: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::Val2> = { + { + let output: Val<::bevy_ui::Val2> = ::bevy_ui::Val2::new( + x.into_inner(), + y.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a new [`Val2`]", + &["x", "y"], + ) + .register_documented( + "percent", + |x: f32, y: f32| { + let output: Val<::bevy_ui::Val2> = { + { + let output: Val<::bevy_ui::Val2> = ::bevy_ui::Val2::percent(x, y) + .into(); + output + } + }; + output + }, + " Creates a new [`Val2`] where both components are percentage values", + &["x", "y"], + ) + .register_documented( + "px", + |x: f32, y: f32| { + let output: Val<::bevy_ui::Val2> = { + { + let output: Val<::bevy_ui::Val2> = ::bevy_ui::Val2::px(x, y) + .into(); + output + } + }; + output + }, + " Creates a new [`Val2`] where both components are in logical pixels", + &["x", "y"], + ) + .register_documented( + "resolve", + | + _self: Ref<::bevy_ui::Val2>, + scale_factor: f32, + base_size: Val<::glam::Vec2>, + viewport_size: Val<::glam::Vec2>| + { + let output: Val<::glam::Vec2> = { + { + let output: Val<::glam::Vec2> = ::bevy_ui::Val2::resolve( + &_self, + scale_factor, + base_size.into_inner(), + viewport_size.into_inner(), + ) + .into(); + output + } + }; + 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"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::Val2, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_ui_transform_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::UiTransform, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::UiTransform>| { + let output: Val<::bevy_ui::UiTransform> = { + { + let output: Val<::bevy_ui::UiTransform> = <::bevy_ui::UiTransform as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "compute_affine", + | + _self: Ref<::bevy_ui::UiTransform>, + scale_factor: f32, + base_size: Val<::glam::Vec2>, + target_size: Val<::glam::Vec2>| + { + let output: Val<::glam::Affine2> = { + { + let output: Val<::glam::Affine2> = ::bevy_ui::UiTransform::compute_affine( + &_self, + scale_factor, + base_size.into_inner(), + target_size.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::UiTransform>, other: Ref<::bevy_ui::UiTransform>| { + let output: bool = { + { + let output: bool = <::bevy_ui::UiTransform as ::std::cmp::PartialEq< + ::bevy_ui::UiTransform, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "from_rotation", + |rotation: Val<::bevy_math::Rot2>| { + let output: Val<::bevy_ui::UiTransform> = { + { + let output: Val<::bevy_ui::UiTransform> = ::bevy_ui::UiTransform::from_rotation( + rotation.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a UI transform representing a rotation.", + &["rotation"], + ) + .register_documented( + "from_scale", + |scale: Val<::glam::Vec2>| { + let output: Val<::bevy_ui::UiTransform> = { + { + let output: Val<::bevy_ui::UiTransform> = ::bevy_ui::UiTransform::from_scale( + scale.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Creates a UI transform representing a scaling.", + &["scale"], + ) + .register_documented( + "from_translation", + |translation: Val<::bevy_ui::Val2>| { + let output: Val<::bevy_ui::UiTransform> = { + { + let output: Val<::bevy_ui::UiTransform> = ::bevy_ui::UiTransform::from_translation( + translation.into_inner(), + ) + .into(); + output + } + }; + output + }, + " 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( + "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> = { + { + let output: Val<::bevy_ui::UiRect> = <::bevy_ui::UiRect as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::UiRect>, other: Ref<::bevy_ui::UiRect>| { + let output: bool = { + { + 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 + } + }; + 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"], + ) + .register_documented( + "left", + |left: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::left( + left.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .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> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::new( + left.into_inner(), + right.into_inner(), + top.into_inner(), + bottom.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "percent", + |left: f32, right: f32, top: f32, bottom: f32| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::percent( + left, + right, + top, + bottom, + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "px", + |left: f32, right: f32, top: f32, bottom: f32| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::px( + left, + right, + top, + bottom, + ) + .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"], + ) + .register_documented( + "right", + |right: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::right( + right.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "top", + |top: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::top( + top.into_inner(), + ) + .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"], + ) + .register_documented( + "vertical", + |value: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::vertical( + value.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "with_bottom", + |_self: Val<::bevy_ui::UiRect>, bottom: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_bottom( + _self.into_inner(), + bottom.into_inner(), + ) + .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"], + ) + .register_documented( + "with_left", + |_self: Val<::bevy_ui::UiRect>, left: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::UiRect> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_left( + _self.into_inner(), + left.into_inner(), + ) + .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"], + ) + .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> = { + { + let output: Val<::bevy_ui::UiRect> = ::bevy_ui::UiRect::with_top( + _self.into_inner(), + top.into_inner(), + ) + .into(); + output + } + }; + 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"], + ); + 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_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: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::bottom_right( + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Sets the radius for the bottom right corner.\n Remaining corners will be right-angled.", + &["radius"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::BorderRadius>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = <::bevy_ui::BorderRadius as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::BorderRadius>, other: Ref<::bevy_ui::BorderRadius>| { + let output: bool = { + { + let output: bool = <::bevy_ui::BorderRadius as ::std::cmp::PartialEq< + ::bevy_ui::BorderRadius, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "left", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::left( + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Sets the radii for the top left and bottom left corners.\n Remaining corners will be right-angled.", + &["radius"], + ) + .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> = { + { + 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 + } + }; + output + }, + "", + &["top_left", "top_right", "bottom_right", "bottom_left"], + ) + .register_documented( + "percent", + |top_left: f32, top_right: f32, bottom_right: f32, bottom_left: f32| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::percent( + top_left, + top_right, + bottom_right, + bottom_left, + ) + .into(); + output + } + }; + output + }, + " Sets the radii to percentage values.", + &["top_left", "top_right", "bottom_right", "bottom_left"], + ) + .register_documented( + "px", + |top_left: f32, top_right: f32, bottom_right: f32, bottom_left: f32| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::px( + top_left, + top_right, + bottom_right, + bottom_left, + ) + .into(); + output + } + }; + output + }, + " Sets the radii to logical pixel values.", + &["top_left", "top_right", "bottom_right", "bottom_left"], + ) + .register_documented( + "resolve", + | + _self: Ref<::bevy_ui::BorderRadius>, + scale_factor: f32, + node_size: Val<::glam::Vec2>, + viewport_size: Val<::glam::Vec2>| + { + let output: Val<::bevy_ui::ResolvedBorderRadius> = { + { + let output: Val<::bevy_ui::ResolvedBorderRadius> = ::bevy_ui::BorderRadius::resolve( + &_self, + scale_factor, + node_size.into_inner(), + viewport_size.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "resolve_single_corner", + | + radius: Val<::bevy_ui::Val>, + scale_factor: f32, + min_length: f32, + viewport_size: Val<::glam::Vec2>| + { + let output: f32 = { + { + let output: f32 = ::bevy_ui::BorderRadius::resolve_single_corner( + radius.into_inner(), + scale_factor, + min_length, + viewport_size.into_inner(), + ) + .into(); + output + } + }; + 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"], + ) + .register_documented( + "right", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::right( + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Sets the radii for the top right and bottom right corners.\n Remaining corners will be right-angled.", + &["radius"], + ) + .register_documented( + "top", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::top( + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Sets the radii for the top left and top right corners.\n Remaining corners will be right-angled.", + &["radius"], + ) + .register_documented( + "top_left", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::top_left( + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Sets the radius for the top left corner.\n Remaining corners will be right-angled.", + &["radius"], + ) + .register_documented( + "top_right", + |radius: Val<::bevy_ui::Val>| { + let output: Val<::bevy_ui::BorderRadius> = { + { + let output: Val<::bevy_ui::BorderRadius> = ::bevy_ui::BorderRadius::top_right( + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Sets the radius for the top right corner.\n Remaining corners will be right-angled.", + &["radius"], + ) + .register_documented( + "with_bottom", + |_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_bottom( + _self.into_inner(), + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the [`BorderRadius`] with its `bottom_left` and `bottom_right` fields set to the given value.", + &["_self", "radius"], + ) + .register_documented( + "with_bottom_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_bottom_left( + _self.into_inner(), + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the [`BorderRadius`] with its `bottom_left` field set to the given value.", + &["_self", "radius"], + ) + .register_documented( + "with_bottom_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_bottom_right( + _self.into_inner(), + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the [`BorderRadius`] with its `bottom_right` field set to the given value.", + &["_self", "radius"], + ) + .register_documented( + "with_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_left( + _self.into_inner(), + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the [`BorderRadius`] with its `top_left` and `bottom_left` fields set to the given value.", + &["_self", "radius"], + ) + .register_documented( + "with_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_right( + _self.into_inner(), + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the [`BorderRadius`] with its `top_right` and `bottom_right` fields set to the given value.", + &["_self", "radius"], + ) + .register_documented( + "with_top", + |_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( + _self.into_inner(), + radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " 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 + }, + " 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"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::BorderRadius, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_layout_config_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::LayoutConfig, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::LayoutConfig>| { + let output: Val<::bevy_ui::LayoutConfig> = { + { + let output: Val<::bevy_ui::LayoutConfig> = <::bevy_ui::LayoutConfig as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::LayoutConfig>, other: Ref<::bevy_ui::LayoutConfig>| { + let output: bool = { + { + let output: bool = <::bevy_ui::LayoutConfig as ::std::cmp::PartialEq< + ::bevy_ui::LayoutConfig, + >>::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::LayoutConfig, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_outline_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::Outline, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::Outline>| { + let output: Val<::bevy_ui::Outline> = { + { + let output: Val<::bevy_ui::Outline> = <::bevy_ui::Outline as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::Outline>, other: Ref<::bevy_ui::Outline>| { + let output: bool = { + { + let output: bool = <::bevy_ui::Outline as ::std::cmp::PartialEq< + ::bevy_ui::Outline, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "new", + | + width: Val<::bevy_ui::Val>, + offset: Val<::bevy_ui::Val>, + color: Val<::bevy_color::Color>| + { + let output: Val<::bevy_ui::Outline> = { + { + let output: Val<::bevy_ui::Outline> = ::bevy_ui::Outline::new( + width.into_inner(), + offset.into_inner(), + color.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Create a new outline", + &["width", "offset", "color"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::Outline, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_scroll_position_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::ScrollPosition, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::ScrollPosition>| { + let output: Val<::bevy_ui::ScrollPosition> = { + { + let output: Val<::bevy_ui::ScrollPosition> = <::bevy_ui::ScrollPosition 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::ScrollPosition, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_position_type_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::PositionType, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::PositionType>| { + let output: () = { + { + let output: () = <::bevy_ui::PositionType as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::PositionType>| { + let output: Val<::bevy_ui::PositionType> = { + { + let output: Val<::bevy_ui::PositionType> = <::bevy_ui::PositionType as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::PositionType>, other: Ref<::bevy_ui::PositionType>| { + let output: bool = { + { + let output: bool = <::bevy_ui::PositionType as ::std::cmp::PartialEq< + ::bevy_ui::PositionType, + >>::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::PositionType, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_align_self_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::AlignSelf, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::AlignSelf>| { + let output: () = { + { + let output: () = <::bevy_ui::AlignSelf as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::AlignSelf>| { + let output: Val<::bevy_ui::AlignSelf> = { + { + let output: Val<::bevy_ui::AlignSelf> = <::bevy_ui::AlignSelf as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::AlignSelf>, other: Ref<::bevy_ui::AlignSelf>| { + let output: bool = { + { + let output: bool = <::bevy_ui::AlignSelf as ::std::cmp::PartialEq< + ::bevy_ui::AlignSelf, + >>::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::AlignSelf, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_repeated_grid_track_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::RepeatedGridTrack, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::RepeatedGridTrack>| { + let output: Val<::bevy_ui::RepeatedGridTrack> = { + { + let output: Val<::bevy_ui::RepeatedGridTrack> = <::bevy_ui::RepeatedGridTrack as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::RepeatedGridTrack>, + other: Ref<::bevy_ui::RepeatedGridTrack>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::RepeatedGridTrack as ::std::cmp::PartialEq< + ::bevy_ui::RepeatedGridTrack, + >>::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::RepeatedGridTrack, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_align_content_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::AlignContent, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::AlignContent>| { + let output: () = { + { + let output: () = <::bevy_ui::AlignContent as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::AlignContent>| { + let output: Val<::bevy_ui::AlignContent> = { + { + let output: Val<::bevy_ui::AlignContent> = <::bevy_ui::AlignContent as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::AlignContent>, other: Ref<::bevy_ui::AlignContent>| { + let output: bool = { + { + let output: bool = <::bevy_ui::AlignContent as ::std::cmp::PartialEq< + ::bevy_ui::AlignContent, + >>::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::AlignContent, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_align_items_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::AlignItems, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::AlignItems>| { + let output: () = { + { + let output: () = <::bevy_ui::AlignItems as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::AlignItems>| { + let output: Val<::bevy_ui::AlignItems> = { + { + let output: Val<::bevy_ui::AlignItems> = <::bevy_ui::AlignItems as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::AlignItems>, other: Ref<::bevy_ui::AlignItems>| { + let output: bool = { + { + let output: bool = <::bevy_ui::AlignItems as ::std::cmp::PartialEq< + ::bevy_ui::AlignItems, + >>::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::AlignItems, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_box_sizing_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::BoxSizing, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::BoxSizing>| { + let output: () = { + { + let output: () = <::bevy_ui::BoxSizing as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::BoxSizing>| { + let output: Val<::bevy_ui::BoxSizing> = { + { + let output: Val<::bevy_ui::BoxSizing> = <::bevy_ui::BoxSizing as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::BoxSizing>, other: Ref<::bevy_ui::BoxSizing>| { + let output: bool = { + { + let output: bool = <::bevy_ui::BoxSizing as ::std::cmp::PartialEq< + ::bevy_ui::BoxSizing, + >>::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::BoxSizing, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_flex_direction_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::FlexDirection, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::FlexDirection>| { + let output: () = { + { + let output: () = <::bevy_ui::FlexDirection as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::FlexDirection>| { + let output: Val<::bevy_ui::FlexDirection> = { + { + let output: Val<::bevy_ui::FlexDirection> = <::bevy_ui::FlexDirection as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::FlexDirection>, other: Ref<::bevy_ui::FlexDirection>| { + let output: bool = { + { + let output: bool = <::bevy_ui::FlexDirection as ::std::cmp::PartialEq< + ::bevy_ui::FlexDirection, + >>::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::FlexDirection, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_flex_wrap_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::FlexWrap, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::FlexWrap>| { + let output: () = { + { + let output: () = <::bevy_ui::FlexWrap as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::FlexWrap>| { + let output: Val<::bevy_ui::FlexWrap> = { + { + let output: Val<::bevy_ui::FlexWrap> = <::bevy_ui::FlexWrap as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::FlexWrap>, other: Ref<::bevy_ui::FlexWrap>| { + let output: bool = { + { + let output: bool = <::bevy_ui::FlexWrap as ::std::cmp::PartialEq< + ::bevy_ui::FlexWrap, + >>::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::FlexWrap, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_grid_auto_flow_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::GridAutoFlow, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::GridAutoFlow>| { + let output: () = { + { + let output: () = <::bevy_ui::GridAutoFlow as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::GridAutoFlow>| { + let output: Val<::bevy_ui::GridAutoFlow> = { + { + let output: Val<::bevy_ui::GridAutoFlow> = <::bevy_ui::GridAutoFlow as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::GridAutoFlow>, other: Ref<::bevy_ui::GridAutoFlow>| { + let output: bool = { + { + let output: bool = <::bevy_ui::GridAutoFlow as ::std::cmp::PartialEq< + ::bevy_ui::GridAutoFlow, + >>::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::GridAutoFlow, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_grid_placement_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::GridPlacement, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::GridPlacement>| { + let output: () = { + { + let output: () = <::bevy_ui::GridPlacement as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "auto", + || { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::auto() + .into(); + output + } + }; + output + }, + " Place the grid item automatically (letting the `span` default to `1`).", + &[], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::GridPlacement>| { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = <::bevy_ui::GridPlacement as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "end", + |end: i16| { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::end( + end, + ) + .into(); + output + } + }; + output + }, + " Place the grid item specifying the `end` grid line (letting the `span` default to `1`).\n # Panics\n Panics if `end` is `0`.", + &["end"], + ) + .register_documented( + "end_span", + |end: i16, span: u16| { + let output: Val<::bevy_ui::GridPlacement> = { + { + let output: Val<::bevy_ui::GridPlacement> = ::bevy_ui::GridPlacement::end_span( + end, + span, + ) + .into(); + output + } + }; + output + }, + " Place the grid item specifying the `end` grid line and how many tracks it should `span`.\n # Panics\n Panics if `end` or `span` is `0`.", + &["end", "span"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::GridPlacement>, other: Ref<::bevy_ui::GridPlacement>| { + let output: bool = { + { + let output: bool = <::bevy_ui::GridPlacement as ::std::cmp::PartialEq< + ::bevy_ui::GridPlacement, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "get_end", + |_self: Val<::bevy_ui::GridPlacement>| { + let output: ::std::option::Option = { + { + let output: ::std::option::Option = ::bevy_ui::GridPlacement::get_end( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns the grid line at which the item should end, or `None` if not set.", + &["_self"], + ) + .register_documented( + "get_span", + |_self: Val<::bevy_ui::GridPlacement>| { + let output: ::std::option::Option = { + { + let output: ::std::option::Option = ::bevy_ui::GridPlacement::get_span( + _self.into_inner(), + ) + .into(); + output + } + }; + output + }, + " Returns span for this grid item, or `None` if not set.", + &["_self"], + ) + .register_documented( + "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_overflow_clip_margin_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::OverflowClipMargin, + >::new(world) + .register_documented( + "border_box", + || { + let output: Val<::bevy_ui::OverflowClipMargin> = { + { + let output: Val<::bevy_ui::OverflowClipMargin> = ::bevy_ui::OverflowClipMargin::border_box() + .into(); + output + } + }; + output + }, + " Clip any content that overflows outside the border box", + &[], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::OverflowClipMargin>| { + let output: Val<::bevy_ui::OverflowClipMargin> = { + { + let output: Val<::bevy_ui::OverflowClipMargin> = <::bevy_ui::OverflowClipMargin as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "content_box", + || { + let output: Val<::bevy_ui::OverflowClipMargin> = { + { + let output: Val<::bevy_ui::OverflowClipMargin> = ::bevy_ui::OverflowClipMargin::content_box() + .into(); + output + } + }; + output + }, + " Clip any content that overflows outside the content box", + &[], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::OverflowClipMargin>, + other: Ref<::bevy_ui::OverflowClipMargin>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::OverflowClipMargin as ::std::cmp::PartialEq< + ::bevy_ui::OverflowClipMargin, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "padding_box", + || { + let output: Val<::bevy_ui::OverflowClipMargin> = { + { + let output: Val<::bevy_ui::OverflowClipMargin> = ::bevy_ui::OverflowClipMargin::padding_box() + .into(); + output + } + }; + output + }, + " Clip any content that overflows outside the padding box", + &[], + ) + .register_documented( + "with_margin", + |_self: Val<::bevy_ui::OverflowClipMargin>, margin: f32| { + let output: Val<::bevy_ui::OverflowClipMargin> = { + { + let output: Val<::bevy_ui::OverflowClipMargin> = ::bevy_ui::OverflowClipMargin::with_margin( + _self.into_inner(), + margin, + ) + .into(); + output + } + }; + output + }, + " Add a margin on each edge of the visual box in logical pixels.\n The width of the margin will be zero if a negative value is set.", + &["_self", "margin"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::OverflowClipMargin, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_global_z_index_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::GlobalZIndex, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::GlobalZIndex>| { + let output: () = { + { + let output: () = <::bevy_ui::GlobalZIndex as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::GlobalZIndex>| { + let output: Val<::bevy_ui::GlobalZIndex> = { + { + let output: Val<::bevy_ui::GlobalZIndex> = <::bevy_ui::GlobalZIndex as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::GlobalZIndex>, other: Ref<::bevy_ui::GlobalZIndex>| { + let output: bool = { + { + let output: bool = <::bevy_ui::GlobalZIndex as ::std::cmp::PartialEq< + ::bevy_ui::GlobalZIndex, + >>::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::GlobalZIndex, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_z_index_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::ZIndex, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui::ZIndex>| { + let output: () = { + { + let output: () = <::bevy_ui::ZIndex as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::ZIndex>| { + let output: Val<::bevy_ui::ZIndex> = { + { + let output: Val<::bevy_ui::ZIndex> = <::bevy_ui::ZIndex as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::ZIndex>, other: Ref<::bevy_ui::ZIndex>| { + let output: bool = { + { + let output: bool = <::bevy_ui::ZIndex as ::std::cmp::PartialEq< + ::bevy_ui::ZIndex, + >>::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::ZIndex, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_resolved_border_radius_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::ResolvedBorderRadius, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::ResolvedBorderRadius>| { + let output: Val<::bevy_ui::ResolvedBorderRadius> = { + { + let output: Val<::bevy_ui::ResolvedBorderRadius> = <::bevy_ui::ResolvedBorderRadius as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::ResolvedBorderRadius>, + other: Ref<::bevy_ui::ResolvedBorderRadius>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::ResolvedBorderRadius as ::std::cmp::PartialEq< + ::bevy_ui::ResolvedBorderRadius, + >>::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::ResolvedBorderRadius, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_background_color_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::BackgroundColor, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::BackgroundColor>| { + let output: Val<::bevy_ui::BackgroundColor> = { + { + let output: Val<::bevy_ui::BackgroundColor> = <::bevy_ui::BackgroundColor as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui::BackgroundColor>, + other: Ref<::bevy_ui::BackgroundColor>| + { + let output: bool = { + { + let output: bool = <::bevy_ui::BackgroundColor as ::std::cmp::PartialEq< + ::bevy_ui::BackgroundColor, + >>::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::BackgroundColor, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_border_color_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::BorderColor, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::BorderColor>| { + let output: Val<::bevy_ui::BorderColor> = { + { + let output: Val<::bevy_ui::BorderColor> = <::bevy_ui::BorderColor as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::BorderColor>, other: Ref<::bevy_ui::BorderColor>| { + let output: bool = { + { + let output: bool = <::bevy_ui::BorderColor as ::std::cmp::PartialEq< + ::bevy_ui::BorderColor, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "is_fully_transparent", + |_self: Ref<::bevy_ui::BorderColor>| { + let output: bool = { + { + let output: bool = ::bevy_ui::BorderColor::is_fully_transparent( + &_self, + ) + .into(); + output + } + }; + output + }, + " Check if all contained border colors are transparent", + &["_self"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::BorderColor, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_box_shadow_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::BoxShadow, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::BoxShadow>| { + let output: Val<::bevy_ui::BoxShadow> = { + { + let output: Val<::bevy_ui::BoxShadow> = <::bevy_ui::BoxShadow as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::BoxShadow>, other: Ref<::bevy_ui::BoxShadow>| { + let output: bool = { + { + let output: bool = <::bevy_ui::BoxShadow as ::std::cmp::PartialEq< + ::bevy_ui::BoxShadow, + >>::eq(&_self, &other) + .into(); + output + } + }; + output + }, + "", + &["_self", "other"], + ) + .register_documented( + "new", + | + color: Val<::bevy_color::Color>, + x_offset: Val<::bevy_ui::Val>, + y_offset: Val<::bevy_ui::Val>, + spread_radius: Val<::bevy_ui::Val>, + blur_radius: Val<::bevy_ui::Val>| + { + let output: Val<::bevy_ui::BoxShadow> = { + { + let output: Val<::bevy_ui::BoxShadow> = ::bevy_ui::BoxShadow::new( + color.into_inner(), + x_offset.into_inner(), + y_offset.into_inner(), + spread_radius.into_inner(), + blur_radius.into_inner(), + ) + .into(); + output + } + }; + output + }, + " A single drop shadow", + &["color", "x_offset", "y_offset", "spread_radius", "blur_radius"], + ); + let registry = world.get_resource_or_init::(); + let mut registry = registry.write(); + registry + .register_type_data::< + ::bevy_ui::BoxShadow, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_shadow_style_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui::ShadowStyle, + >::new(world) + .register_documented( + "clone", + |_self: Ref<::bevy_ui::ShadowStyle>| { + let output: Val<::bevy_ui::ShadowStyle> = { + { + let output: Val<::bevy_ui::ShadowStyle> = <::bevy_ui::ShadowStyle as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + |_self: Ref<::bevy_ui::ShadowStyle>, other: Ref<::bevy_ui::ShadowStyle>| { + let output: bool = { + { + let output: bool = <::bevy_ui::ShadowStyle as ::std::cmp::PartialEq< + ::bevy_ui::ShadowStyle, + >>::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::ShadowStyle, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +impl Plugin for BevyUiScriptingPlugin { + fn build(&self, app: &mut App) { + let mut world = app.world_mut(); + register_display_functions(&mut world); + register_ui_picking_camera_functions(&mut world); + register_ui_picking_settings_functions(&mut world); + register_text_functions(&mut world); + register_text_shadow_functions(&mut world); + register_button_functions(&mut world); + register_image_node_functions(&mut world); + register_label_functions(&mut world); + register_node_image_mode_functions(&mut world); + register_viewport_node_functions(&mut world); + register_interaction_functions(&mut world); + 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_ui_global_transform_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); + register_text_node_flags_functions(&mut world); + register_ui_position_functions(&mut world); + register_val_functions(&mut world); + register_color_stop_functions(&mut world); + register_angular_color_stop_functions(&mut world); + register_linear_gradient_functions(&mut world); + register_interpolation_color_space_functions(&mut world); + register_radial_gradient_functions(&mut world); + register_radial_gradient_shape_functions(&mut world); + register_conic_gradient_functions(&mut world); + register_gradient_functions(&mut world); + register_background_gradient_functions(&mut world); + register_border_gradient_functions(&mut world); + register_val_2_functions(&mut world); + 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_layout_config_functions(&mut world); + register_outline_functions(&mut world); + register_scroll_position_functions(&mut world); + register_position_type_functions(&mut world); + register_align_self_functions(&mut world); + register_repeated_grid_track_functions(&mut world); + register_align_content_functions(&mut world); + register_align_items_functions(&mut world); + register_box_sizing_functions(&mut world); + register_flex_direction_functions(&mut world); + register_flex_wrap_functions(&mut world); + register_grid_auto_flow_functions(&mut world); + register_grid_placement_functions(&mut world); + register_grid_track_functions(&mut world); + register_grid_track_repetition_functions(&mut world); + register_justify_content_functions(&mut world); + register_justify_items_functions(&mut world); + register_justify_self_functions(&mut world); + register_max_track_sizing_function_functions(&mut world); + register_min_track_sizing_function_functions(&mut world); + register_overflow_functions(&mut world); + register_overflow_clip_margin_functions(&mut world); + register_global_z_index_functions(&mut world); + register_z_index_functions(&mut world); + register_resolved_border_radius_functions(&mut world); + register_background_color_functions(&mut world); + register_border_color_functions(&mut world); + register_box_shadow_functions(&mut world); + register_shadow_style_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 new file mode 100644 index 0000000000..6aabdf0336 --- /dev/null +++ b/crates/bindings/bevy_ui_render_bms_bindings/Cargo.toml @@ -0,0 +1,63 @@ +[package] +name = "bevy_ui_render_bms_bindings" +description = "Automatically generated bindings for bevy_ui_render crate" +readme = "README.md" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +keywords.workspace = true +categories.workspace = true + +[dependencies] + + +bevy_mod_scripting_core = { workspace = true } +bevy_mod_scripting_bindings = { workspace = true } +bevy_mod_scripting_derive = { workspace = true } +bevy_ui_render = { version = "0.17.2", features = [], default-features = true} + + +bevy_app = { version = "^0.17.2", features = ["bevy_reflect", "error_panic_hook", "reflect_auto_register", "std"], default-features = true} + +bevy_asset = { version = "^0.17.2", features = ["file_watcher", "multi_threaded", "notify-debouncer-full", "watch"], default-features = true} + +bevy_camera = { version = "^0.17.2", features = [], default-features = true} + +bevy_color = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "encase", "std", "wgpu-types"], default-features = true} + +bevy_core_pipeline = { version = "^0.17.2", features = ["tonemapping_luts", "webgl"], default-features = true} + +bevy_derive = { version = "^0.17.2", features = [], default-features = true} + +bevy_ecs = { version = "^0.17.2", features = ["async_executor", "backtrace", "bevy_reflect", "multi_threaded", "reflect_auto_register", "serialize", "std"], default-features = true} + +bevy_image = { version = "^0.17.2", features = ["bevy_reflect", "hdr", "ktx2", "png", "zstd", "zstd_rust"], default-features = true} + +bevy_math = { version = "^0.17.2", features = ["alloc", "bevy_reflect", "curve", "rand", "std"], default-features = true} + +bevy_mesh = { version = "^0.17.2", features = [], default-features = true} + +bevy_reflect = { version = "^0.17.2", features = ["auto_register", "auto_register_inventory", "debug", "debug_stack", "glam", "smallvec", "smol_str", "std", "uuid"], default-features = true} + +bevy_render = { version = "^0.17.2", features = ["multi_threaded", "webgl"], default-features = true} + +bevy_shader = { version = "^0.17.2", features = [], default-features = true} + +bevy_sprite = { version = "^0.17.2", features = ["bevy_picking", "bevy_sprite_picking_backend", "bevy_text", "bevy_window"], default-features = true} + +bevy_sprite_render = { version = "^0.17.2", features = ["bevy_text", "webgl"], default-features = true} + +bevy_text = { version = "^0.17.2", features = ["default_font"], default-features = true} + +bevy_transform = { version = "^0.17.2", features = ["alloc", "async_executor", "bevy-support", "bevy_log", "bevy_reflect", "std"], default-features = true} + +bevy_ui = { version = "^0.17.2", features = ["bevy_picking", "bevy_ui_picking_backend"], default-features = true} + +bevy_utils = { version = "^0.17.2", features = ["debug", "parallel"], default-features = true} + +bytemuck = { version = "^1.5", features = [], default-features = true} + + diff --git a/crates/bindings/bevy_ui_render_bms_bindings/README.md b/crates/bindings/bevy_ui_render_bms_bindings/README.md new file mode 100644 index 0000000000..e8b83f801e --- /dev/null +++ b/crates/bindings/bevy_ui_render_bms_bindings/README.md @@ -0,0 +1,4 @@ +# bevy_ui_render bindings +This crate is part of the [bevy_mod_scripting](http://github.com/makspll/bevy_mod_scripting) project. + +The code inside is fully generated via a custom rustc plugin. \ No newline at end of file diff --git a/crates/bindings/bevy_ui_render_bms_bindings/src/lib.rs b/crates/bindings/bevy_ui_render_bms_bindings/src/lib.rs new file mode 100644 index 0000000000..d2db5cee1f --- /dev/null +++ b/crates/bindings/bevy_ui_render_bms_bindings/src/lib.rs @@ -0,0 +1,156 @@ + +#![allow(clippy::all)] +#![allow(unused, deprecated, dead_code)] + + + +use bevy_mod_scripting_bindings::{ + ReflectReference, + function::{ + from::{Ref, Mut, Val}, + namespace::NamespaceBuilder, + }, +}; +use bevy_ecs::prelude::*; +use bevy_app::{App, Plugin}; +use bevy_mod_scripting_derive::script_bindings; +pub struct BevyUiRenderScriptingPlugin; +pub(crate) fn register_box_shadow_samples_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui_render::BoxShadowSamples, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui_render::BoxShadowSamples>| { + let output: () = { + { + let output: () = <::bevy_ui_render::BoxShadowSamples as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui_render::BoxShadowSamples>| { + let output: Val<::bevy_ui_render::BoxShadowSamples> = { + { + let output: Val<::bevy_ui_render::BoxShadowSamples> = <::bevy_ui_render::BoxShadowSamples as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui_render::BoxShadowSamples>, + other: Ref<::bevy_ui_render::BoxShadowSamples>| + { + let output: bool = { + { + let output: bool = <::bevy_ui_render::BoxShadowSamples as ::std::cmp::PartialEq< + ::bevy_ui_render::BoxShadowSamples, + >>::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_render::BoxShadowSamples, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +pub(crate) fn register_ui_anti_alias_functions(world: &mut World) { + bevy_mod_scripting_bindings::function::namespace::NamespaceBuilder::< + ::bevy_ui_render::UiAntiAlias, + >::new(world) + .register_documented( + "assert_receiver_is_total_eq", + |_self: Ref<::bevy_ui_render::UiAntiAlias>| { + let output: () = { + { + let output: () = <::bevy_ui_render::UiAntiAlias as ::std::cmp::Eq>::assert_receiver_is_total_eq( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "clone", + |_self: Ref<::bevy_ui_render::UiAntiAlias>| { + let output: Val<::bevy_ui_render::UiAntiAlias> = { + { + let output: Val<::bevy_ui_render::UiAntiAlias> = <::bevy_ui_render::UiAntiAlias as ::std::clone::Clone>::clone( + &_self, + ) + .into(); + output + } + }; + output + }, + "", + &["_self"], + ) + .register_documented( + "eq", + | + _self: Ref<::bevy_ui_render::UiAntiAlias>, + other: Ref<::bevy_ui_render::UiAntiAlias>| + { + let output: bool = { + { + let output: bool = <::bevy_ui_render::UiAntiAlias as ::std::cmp::PartialEq< + ::bevy_ui_render::UiAntiAlias, + >>::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_render::UiAntiAlias, + bevy_mod_scripting_bindings::MarkAsGenerated, + >(); +} +impl Plugin for BevyUiRenderScriptingPlugin { + fn build(&self, app: &mut App) { + let mut world = app.world_mut(); + register_box_shadow_samples_functions(&mut world); + register_ui_anti_alias_functions(&mut world); + } +} diff --git a/crates/languages/bevy_mod_scripting_lua/src/lib.rs b/crates/languages/bevy_mod_scripting_lua/src/lib.rs index 43090ee3ed..161eeb99c4 100644 --- a/crates/languages/bevy_mod_scripting_lua/src/lib.rs +++ b/crates/languages/bevy_mod_scripting_lua/src/lib.rs @@ -355,6 +355,7 @@ pub fn lua_handler( let out = handler .call::(input) .map_err(IntoInteropError::to_bms_error)?; + Ok(out.into()) } @@ -397,7 +398,7 @@ impl IntoMluaError for InteropError { } #[cfg(test)] mod test { - use ::bevy_asset::{AssetId, AssetIndex, Handle}; + use ::bevy_asset::Handle; use bevy_mod_scripting_asset::LanguageExtensions; use mlua::Value; @@ -407,8 +408,8 @@ mod test { fn test_reload_doesnt_overwrite_old_context() { let lua = Lua::new(); let mut old_ctxt = LuaContext(lua.clone()); - let handle = Handle::Weak(AssetId::from(AssetIndex::from_bits(0))); - let context_key = ScriptAttachment::EntityScript(Entity::from_raw(1), handle); + let handle = Handle::default(); + let context_key = ScriptAttachment::EntityScript(Entity::from_raw_u32(1).unwrap(), handle); let world_id = WorldId::new().unwrap(); LuaScriptingPlugin::set_world_local_config( world_id, diff --git a/crates/testing_crates/script_integration_test_harness/src/lib.rs b/crates/testing_crates/script_integration_test_harness/src/lib.rs index 03367008d5..d492848c7b 100644 --- a/crates/testing_crates/script_integration_test_harness/src/lib.rs +++ b/crates/testing_crates/script_integration_test_harness/src/lib.rs @@ -9,7 +9,7 @@ use std::{ use ::{ bevy_app::{App, Plugin, PostUpdate, Startup, Update}, - bevy_asset::{AssetPath, AssetServer, Handle, LoadState}, + bevy_asset::{AssetPath, AssetServer, LoadState}, bevy_ecs::{ component::Component, resource::Resource, schedule::IntoScheduleConfigs, system::Command, world::FromWorld, @@ -204,7 +204,7 @@ pub fn run_lua_benchmark( let plugin = make_test_lua_plugin(); run_plugin_benchmark( plugin, - script_id, + script_id.to_string(), label, criterion, |ctxt, _runtime, label, criterion| { @@ -235,7 +235,7 @@ pub fn run_rhai_benchmark( let plugin = make_test_rhai_plugin(); run_plugin_benchmark( plugin, - script_id, + script_id.to_string(), label, criterion, |ctxt, runtime, label, criterion| { @@ -318,7 +318,7 @@ where .clone(); let guard = WorldGuard::new_exclusive(app.world_mut()); - let context_key = ScriptAttachment::EntityScript(entity, Handle::Weak(script_id)); + let context_key = ScriptAttachment::EntityScript(entity, script_handle.clone()); let script_contexts = script_contexts.read(); let ctxt_arc = script_contexts.get_context(&context_key).unwrap(); @@ -332,7 +332,7 @@ where ThreadWorldContainer .set_context(ThreadScriptContext { world: guard.clone(), - attachment: ScriptAttachment::StaticScript(Handle::Weak(script_id)), + attachment: ScriptAttachment::StaticScript(script_handle), }) .map_err(|e| format!("{e:#?}"))?; // Pass the locked context to the closure for benchmarking its Lua (or generic) part diff --git a/crates/testing_crates/script_integration_test_harness/src/parse.rs b/crates/testing_crates/script_integration_test_harness/src/parse.rs index 6c1c12daea..95a7bc2a6a 100644 --- a/crates/testing_crates/script_integration_test_harness/src/parse.rs +++ b/crates/testing_crates/script_integration_test_harness/src/parse.rs @@ -15,7 +15,7 @@ use bevy_mod_scripting_script::ScriptAttachment; use crate::scenario::{SCENARIO_SELF_LANGUAGE_NAME, ScenarioContext, ScenarioStep}; -#[derive(Debug, Clone, serde::Deserialize, serde::Serialize, PartialEq, Eq)] +#[derive(Debug, Clone, Hash, serde::Deserialize, serde::Serialize, PartialEq, Eq)] pub enum ScenarioSchedule { Startup, Update, @@ -214,11 +214,11 @@ impl ScenarioStepSerialized { ScenarioRecipients::AllScripts => Recipients::AllScripts, ScenarioRecipients::AllContexts => Recipients::AllContexts, ScenarioRecipients::EntityScript { entity, script } => Recipients::ScriptEntity( - context.get_script_handle(&script)?.id(), + context.get_script_handle(&script)?, context.get_entity(&entity)?, ), ScenarioRecipients::StaticScript { script } => { - Recipients::StaticScript(context.get_script_handle(&script)?.id()) + Recipients::StaticScript(context.get_script_handle(&script)?) } }) } 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 9523806819..e78413684d 100644 --- a/crates/testing_crates/script_integration_test_harness/src/scenario.rs +++ b/crates/testing_crates/script_integration_test_harness/src/scenario.rs @@ -9,17 +9,13 @@ use ::{ bevy_app::App, bevy_asset::{AssetEvent, Handle, LoadState}, bevy_ecs::{ - entity::Entity, - event::{Event, EventCursor, Events}, - schedule::ScheduleLabel, - system::Command, - system::IntoSystem, - world::World, + entity::Entity, schedule::ScheduleLabel, system::Command, system::IntoSystem, world::World, }, }; use anyhow::{Context, Error, anyhow}; -use bevy_app::{DynEq, FixedUpdate, Last, PostUpdate, Startup, Update}; +use bevy_app::{FixedUpdate, Last, PostUpdate, Startup, Update}; use bevy_asset::{AssetServer, Assets}; +use bevy_ecs::message::{Message, MessageCursor, Messages}; use bevy_log::info; use bevy_mod_scripting_asset::{Language, LanguageExtensions, ScriptAsset}; use bevy_mod_scripting_bindings::ScriptValue; @@ -157,19 +153,19 @@ pub struct ScenarioContext { #[derive(Debug, Clone, Default)] pub struct InterestingEventWatcher { pub events: Vec<(String, usize)>, - pub asset_event_cursor: EventCursor>, - pub script_attached_events_cursor: EventCursor, - pub script_detached_events_cursor: EventCursor, - pub script_response_cursor: EventCursor, + pub asset_event_cursor: MessageCursor>, + pub script_attached_events_cursor: MessageCursor, + pub script_detached_events_cursor: MessageCursor, + pub script_response_cursor: MessageCursor, pub script_responses_queue: VecDeque, } impl InterestingEventWatcher { pub fn log_events(&mut self, step_no: usize, world: &World) { - let asset_events = world.resource::>>(); - let script_attached_events = world.resource::>(); - let script_detached_events = world.resource::>(); - let script_responses = world.resource::>(); + let asset_events = world.resource::>>(); + let script_attached_events = world.resource::>(); + let script_detached_events = world.resource::>(); + let script_responses = world.resource::>(); let mut tracked_with_id = Vec::default(); for (event, id) in self.asset_event_cursor.read_with_id(asset_events) { tracked_with_id.push((id.id, format!("AssetEvent : {event:?}"))); @@ -295,26 +291,6 @@ impl ScheduleLabel for ScenarioSchedule { ScenarioSchedule::Last => Last.dyn_clone(), } } - - fn as_dyn_eq(&self) -> &dyn DynEq { - match self { - ScenarioSchedule::Startup => Startup.as_dyn_eq(), - ScenarioSchedule::Update => Update.as_dyn_eq(), - ScenarioSchedule::FixedUpdate => FixedUpdate.as_dyn_eq(), - ScenarioSchedule::PostUpdate => PostUpdate.as_dyn_eq(), - ScenarioSchedule::Last => Last.as_dyn_eq(), - } - } - - fn dyn_hash(&self, state: &mut dyn ::core::hash::Hasher) { - match self { - ScenarioSchedule::Startup => Startup.dyn_hash(state), - ScenarioSchedule::Update => Update.dyn_hash(state), - ScenarioSchedule::FixedUpdate => FixedUpdate.dyn_hash(state), - ScenarioSchedule::PostUpdate => PostUpdate.dyn_hash(state), - ScenarioSchedule::Last => Last.dyn_hash(state), - } - } } #[derive(Debug)] @@ -432,7 +408,7 @@ impl ScenarioStep { /// Will execute the app update loop until an event of type `T` is received or we timeout. pub fn execute_until_event< - T: Event + Clone, + T: Message + Clone, E, F: Fn(&T) -> bool, G: Fn(&World) -> Option, @@ -442,11 +418,11 @@ impl ScenarioStep { filter: F, early_exit: G, ) -> Result, E>, Error> { - let mut event_cursor = EventCursor::::default(); + let mut event_cursor = MessageCursor::::default(); loop { { let world = app.world_mut(); - let events = world.resource::>(); + let events = world.resource::>(); let events = event_cursor .read(events) @@ -636,7 +612,7 @@ impl ScenarioStep { ); } ScenarioStep::EmitScriptCallbackEvent { event } => { - app.world_mut().send_event(event.clone()); + app.world_mut().write_message(event.clone()); } ScenarioStep::AssertCallbackSuccess { label, @@ -690,7 +666,7 @@ impl ScenarioStep { .iter_mut() .find_map(|(name, handle)| { if handle.id() == script.id() { - *handle = handle.clone_weak(); + *handle = handle.clone(); Some(name.clone()) } else { None diff --git a/crates/testing_crates/script_integration_test_harness/src/test_functions.rs b/crates/testing_crates/script_integration_test_harness/src/test_functions.rs index 1070b3eaba..e1c57eb552 100644 --- a/crates/testing_crates/script_integration_test_harness/src/test_functions.rs +++ b/crates/testing_crates/script_integration_test_harness/src/test_functions.rs @@ -79,7 +79,7 @@ pub fn register_test_functions(world: &mut App) { let mut allocator = allocator.write(); ReflectReference::new_allocated( - c.unwrap_or(Entity::from_raw(9999)), + c.unwrap_or(Entity::from_raw_u32(9999).unwrap()), &mut allocator, ) }) diff --git a/crates/testing_crates/test_utils/Cargo.toml b/crates/testing_crates/test_utils/Cargo.toml index a474cedc0b..1ba427a83e 100644 --- a/crates/testing_crates/test_utils/Cargo.toml +++ b/crates/testing_crates/test_utils/Cargo.toml @@ -12,6 +12,9 @@ bevy_log = { workspace = true, default-features = false, features = [] } bevy_diagnostic = { workspace = true, default-features = false, features = [] } bevy_reflect = { workspace = true, default-features = false, features = [] } bevy_time = { workspace = true, default-features = false, features = [] } +bevy_utils = { workspace = true, default-features = false, features = [ + "debug", +] } [lib] diff --git a/crates/testing_crates/test_utils/src/test_data.rs b/crates/testing_crates/test_utils/src/test_data.rs index e48e940556..4f253dd44f 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 = 0; +pub(crate) const TEST_ENTITY_ID_START: u32 = 1; pub trait GetTestComponentId { fn test_component_id() -> ComponentId; @@ -292,7 +292,7 @@ macro_rules! impl_test_component_ids { impl GetTestEntityId for $comp_type { fn test_entity_id() -> Entity { - Entity::from_raw(TEST_ENTITY_ID_START + $comp_id) + Entity::from_raw_u32(TEST_ENTITY_ID_START + $comp_id).unwrap() } } )* @@ -306,13 +306,17 @@ macro_rules! impl_test_component_ids { pub(crate) fn init_all_components(world: &mut World, registry: &mut TypeRegistry) { $( + // world + // .components() + // .iter_registered() + // .for_each(|c| println!("--> {:?}", c)); world.register_component::<$comp_type>(); registry.register::<$comp_type>(); 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.generation(), 1, "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)); )* $( world.insert_resource::<$res_type>(<$res_type>::init()); @@ -338,8 +342,8 @@ macro_rules! impl_test_component_ids { }; } -impl_test_component_ids!( - [ TestComponent => 0, +impl_test_component_ids!([ + TestComponent => 0, CompWithFromWorld => 1, CompWithDefault => 2, CompWithDefaultAndComponentData => 3, @@ -362,6 +366,21 @@ fn init_world(world: &mut World, init: let type_registry = world.get_resource_or_init::().clone(); let mut type_registry_guard = type_registry.0.write(); + // bevy now spawns an ineternal component `bevy_ecs::event::EventWrapperComponent` + // when an entity with a component is inserted :shrug:, make that happen early + #[derive(Component)] + pub struct Dummy; + world.register_component::(); + world.spawn((Dummy,)); + + if world.components().len() > TEST_COMPONENT_ID_START { + panic!("world has more components than the first test component ID requires") + } + + if world.entities().len() > TEST_ENTITY_ID_START { + panic!("world has more entities than the first test component ID requires") + } + while world.components().len() < TEST_COMPONENT_ID_START { unsafe { world.register_component_with_descriptor(ComponentDescriptor::new_with_layout( diff --git a/crates/testing_crates/test_utils/src/test_plugin.rs b/crates/testing_crates/test_utils/src/test_plugin.rs index f0c36ea096..f33a5c6274 100644 --- a/crates/testing_crates/test_utils/src/test_plugin.rs +++ b/crates/testing_crates/test_utils/src/test_plugin.rs @@ -62,8 +62,12 @@ macro_rules! make_test_plugin { #[derive(Default, std::fmt::Debug)] struct TestRuntime { - pub invocations: - parking_lot::Mutex, Option<$ident::script::ScriptId>)>>, + pub invocations: parking_lot::Mutex< + Vec<( + Option, + Option>, + )>, + >, } #[derive(Default, std::fmt::Debug, Clone)] diff --git a/examples/game_of_life.rs b/examples/game_of_life.rs index 14d82ef684..d5a73f4cd3 100644 --- a/examples/game_of_life.rs +++ b/examples/game_of_life.rs @@ -3,15 +3,13 @@ use std::time::Duration; use bevy::{ + asset::RenderAssetUsages, diagnostic::LogDiagnosticsPlugin, image::ImageSampler, log::LogPlugin, prelude::*, reflect::Reflect, - render::{ - render_asset::RenderAssetUsages, - render_resource::{Extent3d, TextureDimension, TextureFormat}, - }, + render::render_resource::{Extent3d, TextureDimension, TextureFormat}, window::{PrimaryWindow, WindowResized}, }; use bevy_console::{AddConsoleCommand, ConsoleCommand, ConsoleOpen, ConsolePlugin, make_layer}; @@ -20,7 +18,6 @@ use bevy_mod_scripting_bindings::AllocatorDiagnosticPlugin; use clap::Parser; // CONSOLE SETUP - fn console_app(app: &mut App) -> &mut App { // forward logs to the console app.add_plugins(( @@ -28,6 +25,7 @@ fn console_app(app: &mut App) -> &mut App { level: bevy::log::Level::INFO, filter: "error,game_of_life=info".to_owned(), custom_layer: make_layer, + ..Default::default() }), ConsolePlugin, )) @@ -115,7 +113,6 @@ pub enum GameOfLifeCommand { // ------------- GAME OF LIFE fn game_of_life_app(app: &mut App) -> &mut App { app.insert_resource(Time::::from_seconds(UPDATE_FREQUENCY.into())) - // .add_plugins(BMSPlugin.set(LuaScriptingPlugin::default().enable_context_sharing())) .add_plugins(BMSPlugin) .register_type::() .register_type::() @@ -177,6 +174,7 @@ pub fn register_script_functions(app: &mut App) -> &mut App { app } +// drawing based on https://github.com/bevyengine/bevy/blob/main/examples/2d/cpu_draw.rs pub fn init_game_of_life_state( mut commands: Commands, mut assets: ResMut>, @@ -195,18 +193,11 @@ pub fn init_game_of_life_state( ); image.sampler = ImageSampler::nearest(); + let handle = assets.add(image); commands.spawn(Camera2d); commands - .spawn(Sprite { - image: assets.add(image), - custom_size: Some(Vec2::new( - settings.display_grid_dimensions.0 as f32, - settings.display_grid_dimensions.1 as f32, - )), - color: Color::srgb(1.0, 0.388, 0.278), // TOMATO - ..Default::default() - }) + .spawn(Sprite::from_image(handle)) .insert(LifeState { cells: vec![ 0u8; @@ -276,21 +267,21 @@ callback_labels!( ); /// Sends events allowing scripts to drive update logic -pub fn send_on_update(mut events: EventWriter) { - events.send(ScriptCallbackEvent::new_for_all_scripts(OnUpdate, vec![])); +pub fn send_on_update(mut events: MessageWriter) { + events.write(ScriptCallbackEvent::new_for_all_scripts(OnUpdate, vec![])); } pub fn send_on_click( buttons: Res>, q_windows: Query<&Window, With>, - mut events: EventWriter, + mut events: MessageWriter, ) { if buttons.just_pressed(MouseButton::Left) { let window = q_windows.single(); let pos = window.unwrap().cursor_position().unwrap_or_default(); let x = pos.x as u32; let y = pos.y as u32; - events.send(ScriptCallbackEvent::new_for_all_scripts( + events.write(ScriptCallbackEvent::new_for_all_scripts( OnClick, vec![ ScriptValue::Integer(x as i64), diff --git a/examples/run_script.rs b/examples/run_script.rs index 63098a69f6..87efad05c5 100644 --- a/examples/run_script.rs +++ b/examples/run_script.rs @@ -48,12 +48,12 @@ fn add_logging(app: &mut App) { }); } -pub fn info_on_asset_event() -> impl FnMut(EventReader>) { +pub fn info_on_asset_event() -> impl FnMut(MessageReader>) { // The events need to be consumed, so that there are no false positives on subsequent // calls of the run condition. Simply checking `is_empty` would not be enough. // PERF: note that `count` is efficient (not actually looping/iterating), // due to Bevy having a specialized implementation for events. - move |mut reader: EventReader>| { + move |mut reader: MessageReader>| { for event in reader.read() { match event { AssetEvent::Modified { .. } => (), diff --git a/makefile b/makefile index 11927a5baf..8fd3a7c73e 100644 --- a/makefile +++ b/makefile @@ -63,10 +63,10 @@ clean_bevy: cd ${BEVY_PATH} && cargo clean generate_bevy: - cd ${BEVY_PATH} && cargo +${NIGHTLY_VERSION} bevy-api-gen generate --output ${OUTPUT_PATH} --template-args '{ "self_is_bms_lua": true}' --features ${GEN_BEVY_FEATURES} -vv + cd ${BEVY_PATH} && cargo +${NIGHTLY_VERSION} bevy-api-gen generate --output ${OUTPUT_PATH} --features ${GEN_BEVY_FEATURES} -vv collect_bevy: - cd ${BEVY_PATH} && cargo +${NIGHTLY_VERSION} bevy-api-gen collect --output ${OUTPUT_PATH} --template-args '{ "self_is_bms_lua": true}' + cd ${BEVY_PATH} && cargo +${NIGHTLY_VERSION} bevy-api-gen collect --output ${OUTPUT_PATH} deletion_confirmation: @echo -n "This action will delete ALL files in directories: '${GENERATED_SRC_PATH}' amd ${OUTPUT_PATH} (y/N) " diff --git a/xtask/src/args.rs b/xtask/src/args.rs new file mode 100644 index 0000000000..d34bc6a03a --- /dev/null +++ b/xtask/src/args.rs @@ -0,0 +1,86 @@ +use std::path::PathBuf; + +use crate::features::Features; +use clap::Parser; + +#[derive(Debug, Parser, Clone)] +pub struct GlobalArgs { + #[clap(long, short, global = true, value_parser=clap::value_parser!(Features), value_name=Features::to_placeholder(), default_value=Features::default().to_string(),required = false)] + pub features: Features, + + #[clap( + long, + global = true, + default_value = "false", + help = "Enable coverage collection for cargo commands" + )] + pub coverage: bool, + + #[clap(skip)] + pub override_workspace_dir: Option, + + #[clap(skip)] + pub override_toolchain: Option, + + #[clap( + long, + short, + global = true, + value_name = "PROFILE", + help = "The cargo profile to use for commands that support it" + )] + pub profile: Option, + + #[clap( + long, + global = true, + value_name = "JOBS", + help = "The number of parallel jobs to run at most" + )] + pub jobs: Option, +} + +impl GlobalArgs { + pub fn with_max_jobs(self, jobs: usize) -> Self { + Self { + jobs: Some(jobs), + ..self + } + } + + pub fn with_coverage(self) -> Self { + Self { + coverage: true, + ..self + } + } + + pub fn without_coverage(self) -> Self { + Self { + coverage: false, + ..self + } + } + + pub fn with_workspace_dir(self, dir: PathBuf) -> Self { + Self { + override_workspace_dir: Some(dir), + ..self + } + } + + pub fn with_toolchain(self, toolchain: String) -> Self { + Self { + override_toolchain: Some(toolchain), + ..self + } + } + + pub fn with_features(self, features: Features) -> Self { + Self { features, ..self } + } + + pub fn with_profile(self, profile: Option) -> Self { + Self { profile, ..self } + } +} diff --git a/xtask/src/codegen.rs b/xtask/src/codegen.rs new file mode 100644 index 0000000000..46f5fc5a03 --- /dev/null +++ b/xtask/src/codegen.rs @@ -0,0 +1,147 @@ +use anyhow::Result; +use cargo_metadata::semver::Version; +use std::path::PathBuf; + +use log::info; + +use crate::{ + args::GlobalArgs, codegen_crate_dir, main_workspace_cargo_metadata, read_rust_toolchain, + relative_workspace_dir, run_system_command, workspace_dir, +}; + +pub struct CodegenSettings { + pub bevy_repo_app_settings: GlobalArgs, + pub main_workspace_app_settings: GlobalArgs, + pub bevy_version: Version, + pub bevy_dir: PathBuf, + pub output_dir: PathBuf, + pub bevy_features: Vec, + pub template_args: String, + pub bms_bindings_path: PathBuf, +} + +pub fn prepare_codegen( + app_settings: GlobalArgs, + output_dir: Option, + bevy_features: Vec, +) -> Result { + let main_workspace_app_settings = app_settings; + let bevy_dir = relative_workspace_dir(&main_workspace_app_settings, "target/codegen/bevy")?; + let bevy_target_dir = bevy_dir.join("target"); + // clear the bevy target dir if it exists + info!("Clearing bevy target dir: {bevy_target_dir:?}"); + if bevy_target_dir.exists() { + std::fs::remove_dir_all(&bevy_target_dir)?; + } + + info!("Cleaning output dir: {output_dir:?}"); + let output_dir = if let Some(output_dir) = output_dir { + // safety measure + let output_dir = relative_workspace_dir(&main_workspace_app_settings, output_dir)?; + if output_dir.exists() && output_dir.to_string_lossy().contains("target") { + std::fs::remove_dir_all(&output_dir)?; + } + std::fs::create_dir_all(&output_dir)?; + output_dir + } else { + Default::default() + }; + + let api_gen_dir = codegen_crate_dir(&main_workspace_app_settings)?; + let codegen_toolchain = read_rust_toolchain(&api_gen_dir); + let codegen_app_settings = main_workspace_app_settings + .clone() + .with_workspace_dir(api_gen_dir.clone()); + // .with_toolchain(codegen_toolchain.clone()); // don't think it's needed, the rust toolchain file sorts that out + + let bevy_repo_app_settings = main_workspace_app_settings + .clone() + .with_workspace_dir(bevy_dir.clone()) + .with_toolchain(codegen_toolchain.clone()); + + // run cargo install + log::info!("Running bevy_api_gen against toolchain: {codegen_toolchain}"); + run_system_command( + &codegen_app_settings, + "cargo", + "Failed to install bevy_api_gen", + vec!["install", "--path", "."], + None, + false, + )?; + + let metadata = main_workspace_cargo_metadata()?; + + let bevy_version = metadata + .packages + .iter() + .filter_map(|p| (p.name.as_str() == "bevy").then_some(&p.version)) + .max() + .expect("could not find bevy package in metadata"); + log::info!("Using bevy version {bevy_version}"); + + // create directories if they don't already exist + std::fs::create_dir_all(&bevy_dir)?; + + // git clone bevy repo + let _ = run_system_command( + &bevy_repo_app_settings, + "git", + "Failed to clone bevy repo", + vec![ + "clone", + "https://github.com/bevyengine/bevy", + "--branch", + format!("v{}", &bevy_version).as_str(), + "--depth", + "1", + ".", + ], + None, + false, + ); + + // fetch the tags + run_system_command( + &bevy_repo_app_settings, + "git", + "Failed to fetch bevy tags", + vec!["fetch", "--tags"], + Some(&bevy_dir), + false, + )?; + + // checkout the version tag + run_system_command( + &bevy_repo_app_settings, + "git", + "Failed to checkout bevy tag", + vec!["checkout", format!("v{}", &bevy_version).as_str()], + Some(&bevy_dir), + false, + )?; + + // run bevy_api_gen + + // nothing in template args for now. + let template_args = CodegenTemplateArgs {}; + + let template_args = serde_json::to_string(&template_args)?; + let bms_bindings_path = workspace_dir(&main_workspace_app_settings)? + .join("crates/bevy_mod_scripting_bindings") + .to_path_buf(); + + Ok(CodegenSettings { + bevy_repo_app_settings: bevy_repo_app_settings, + main_workspace_app_settings: main_workspace_app_settings, + bevy_version: bevy_version.clone(), + bevy_dir: bevy_dir, + output_dir: output_dir, + bevy_features, + template_args, + bms_bindings_path, + }) +} + +#[derive(Debug, Clone, serde::Serialize)] +pub struct CodegenTemplateArgs {} diff --git a/xtask/src/command.rs b/xtask/src/command.rs new file mode 100644 index 0000000000..6f2259a9ea --- /dev/null +++ b/xtask/src/command.rs @@ -0,0 +1,198 @@ +use anyhow::{Context, Result, bail}; +use log::info; +use std::{ + ffi::OsStr, + path::{Path, PathBuf}, + process::{Command, Output}, +}; + +use crate::GlobalArgs; + +pub fn run_system_command>>( + app_settings: &GlobalArgs, + command: &str, + context: &str, + add_args: I, + dir: Option<&Path>, + capture_streams_in_output: bool, +) -> Result { + info!("Running system command: {command}"); + + let working_dir = match dir { + Some(d) => relative_workspace_dir(app_settings, d)?, + None => workspace_dir(app_settings)?, + }; + + let mut cmd = Command::new(command); + cmd.args(add_args).current_dir(working_dir); + + if !capture_streams_in_output { + cmd.stdout(std::process::Stdio::inherit()) + .stderr(std::process::Stdio::inherit()); + } + + info!("Using command: {cmd:?}"); + + let output = cmd.output(); + if capture_streams_in_output { + info!("Command status: {:?}", output.as_ref().map(|o| o.status)); + } else { + info!("Command output: {output:?}"); + } + + let output = output.with_context(|| context.to_owned())?; + match output.status.code() { + Some(0) => Ok(output), + _ => bail!( + "{} failed with exit code: {}", + context, + output.status.code().unwrap_or(-1) + ), + } +} + +pub fn run_workspace_command>>( + app_settings: &GlobalArgs, + command: &str, + context: &str, + add_args: I, + dir: Option<&Path>, + capture_streams_in_output: bool, +) -> Result { + let coverage_mode = if app_settings.coverage { + "with coverage" + } else { + Default::default() + }; + + info!("Running workspace command {coverage_mode}: {command}"); + + let mut args = vec![]; + + if let Some(ref toolchain) = app_settings.override_toolchain { + args.push(format!("+{toolchain}")); + } + + args.push(command.to_owned()); + + if command != "fmt" && command != "bms-codegen" && command != "install" { + // fmt doesn't care about features, workspaces or profiles + if command != "run" { + args.push("--workspace".to_owned()); + + if let Some(profile) = app_settings.profile.as_ref() { + let use_profile = if profile == "ephemeral-build" && app_settings.coverage { + // use special profile for coverage as it needs debug information + // but also don't want it too slow + "ephemeral-coverage" + } else { + profile + }; + + if !app_settings.coverage { + args.push("--profile".to_owned()); + args.push(use_profile.to_owned()); + } + + if let Some(jobs) = app_settings.jobs { + args.push("--jobs".to_owned()); + args.push(jobs.to_string()); + } + } + } + + args.extend(app_settings.features.to_cargo_args()); + } + + args.extend(add_args.into_iter().map(|s| { + s.as_ref() + .to_str() + .expect("invalid command argument") + .to_owned() + })); + + let working_dir = match dir { + Some(d) => relative_workspace_dir(app_settings, d)?, + None => workspace_dir(app_settings)?, + }; + + let mut cmd = Command::new("cargo"); + cmd.args(args).current_dir(working_dir); + + if !capture_streams_in_output { + cmd.stdout(std::process::Stdio::inherit()) + .stderr(std::process::Stdio::inherit()); + } + + info!("Using command: {cmd:?}"); + + let output = cmd.output().with_context(|| context.to_owned())?; + match output.status.code() { + Some(0) => Ok(output), + _ => bail!( + "{} failed with exit code: {}. Features: {}. output {output:?}", + context, + output.status.code().unwrap_or(-1), + app_settings.features + ), + } +} + +/// Reads the metadata from the main workspace +pub fn main_workspace_cargo_metadata() -> Result { + let cargo_manifest_path = std::env::var("MAIN_CARGO_MANIFEST_PATH").unwrap(); + let path = PathBuf::from(cargo_manifest_path); + let parent_dir = path.parent().unwrap().parent().unwrap().join("Cargo.toml"); + let mut cmd = cargo_metadata::MetadataCommand::new(); + cmd.manifest_path(parent_dir.to_string_lossy().to_string()); + let out = cmd.exec()?; + Ok(out) +} + +pub fn workspace_dir(app_settings: &GlobalArgs) -> Result { + if let Some(dir) = &app_settings.override_workspace_dir { + return Ok(dir.into()); + } + + let metadata = main_workspace_cargo_metadata()?; + let workspace_root = metadata.workspace_root; + Ok(workspace_root.into()) +} + +pub fn codegen_crate_dir(app_settings: &GlobalArgs) -> Result { + let workspace_dir = workspace_dir(app_settings)?; + Ok(workspace_dir.join("codegen")) +} + +pub fn relative_workspace_dir>( + app_settings: &GlobalArgs, + dir: P, +) -> Result { + let workspace_dir = workspace_dir(app_settings)?; + Ok(workspace_dir.join(dir)) +} + +/// reads rust-toolchain.toml file at the given directory and returns the toolchain string +pub fn read_rust_toolchain(path: &Path) -> String { + let rust_toolchain_path = path.join("rust-toolchain.toml"); + + let rust_toolchain = + std::fs::read_to_string(rust_toolchain_path).expect("Could not read rust_toolchain.toml"); + + // parse the toml file + let toml: toml::Value = + toml::from_str(&rust_toolchain).expect("Could not parse rust_toolchain.toml"); + + let toolchain = toml + .get("toolchain") + .expect("Could not find toolchain in rust_toolchain.toml"); + let channel = toolchain + .get("channel") + .expect("Could not find channel in rust_toolchain.toml"); + let channel = channel + .as_str() + .expect("Channel in rust_toolchain.toml is not a string"); + + // set the toolchain + channel.to_string() +} diff --git a/xtask/src/features.rs b/xtask/src/features.rs new file mode 100644 index 0000000000..28ff1487e2 --- /dev/null +++ b/xtask/src/features.rs @@ -0,0 +1,293 @@ +use std::{ + collections::{HashMap, HashSet}, + str::FromStr, +}; + +use itertools::Itertools; +use strum::VariantNames; + +#[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + strum::EnumString, + strum::EnumIter, + strum::Display, + strum::VariantNames, + strum::VariantArray, +)] +#[strum(serialize_all = "snake_case")] +pub enum Feature { + // bindings + CoreFunctions, + BevyEcsBindings, + BevyInputBindings, + BevyMathBindings, + BevyReflectBindings, + BevyTimeBindings, + BevyTransformBindings, + BevyColorBindings, + BevyCorePipelineBindings, + BevyA11yBindings, + BevyAnimationBindings, + BevyAssetBindings, + BevyGizmosBindings, + BevyGltfBindings, + BevyImageBindings, + BevyInputFocusBindings, + BevyMeshBindings, + BevyPbrBindings, + BevyPickingBindings, + BevyRenderBindings, + BevySceneBindings, + BevySpriteBindings, + BevyTextBindings, + + // Ladfile + LuaLanguageServerFiles, + + // Lua + Lua51, + Lua52, + Lua53, + Lua54, + Luajit, + Luajit52, + Luau, + UnsafeLuaModules, + MluaSerialize, + MluaMacros, + MluaAsync, + // Rhai, + Rhai, + // Rune + // Rune, + + // Profiling + ProfileWithTracy, +} + +#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, strum::EnumIter)] +pub enum FeatureGroup { + LuaExclusive, + RhaiExclusive, + // RuneExclusive, + ForExternalCrate, + BMSFeature, + BMSFeatureNotInPowerset, +} + +impl FeatureGroup { + pub fn default_feature(self) -> Feature { + match self { + FeatureGroup::LuaExclusive => Feature::Lua54, + FeatureGroup::RhaiExclusive => Feature::Rhai, + // FeatureGroup::RuneExclusive => Feature::Rune, + _ => panic!("No default feature for non-exclusive group"), + } + } + + pub fn is_exclusive(self) -> bool { + matches!( + self, + FeatureGroup::LuaExclusive | FeatureGroup::RhaiExclusive // | FeatureGroup::RuneExclusive + ) + } +} + +trait IntoFeatureGroup { + fn to_feature_group(self) -> FeatureGroup; +} + +impl IntoFeatureGroup for Feature { + fn to_feature_group(self) -> FeatureGroup { + match self { + Feature::Lua51 + | Feature::Lua52 + | Feature::Lua53 + | Feature::Lua54 + | Feature::Luajit + | Feature::Luajit52 + | Feature::Luau => FeatureGroup::LuaExclusive, + Feature::Rhai => FeatureGroup::RhaiExclusive, + // Feature::Rune => FeatureGroup::RuneExclusive, + Feature::MluaAsync + | Feature::MluaMacros + | Feature::MluaSerialize + | Feature::UnsafeLuaModules => FeatureGroup::ForExternalCrate, + Feature::BevyEcsBindings + | Feature::BevyInputBindings + | Feature::BevyMathBindings + | Feature::BevyReflectBindings + | Feature::BevyTimeBindings + | Feature::BevyTransformBindings + | Feature::BevyColorBindings + | Feature::BevyCorePipelineBindings + | Feature::BevyA11yBindings + | Feature::BevyAnimationBindings + | Feature::BevyAssetBindings + | Feature::BevyGizmosBindings + | Feature::BevyGltfBindings + | Feature::BevyImageBindings + | Feature::BevyInputFocusBindings + | Feature::BevyMeshBindings + | Feature::BevyPbrBindings + | Feature::BevyPickingBindings + | Feature::BevyRenderBindings + | Feature::BevySceneBindings + | Feature::BevySpriteBindings + | Feature::BevyTextBindings => FeatureGroup::BMSFeatureNotInPowerset, + Feature::CoreFunctions + | Feature::ProfileWithTracy + | Feature::LuaLanguageServerFiles => FeatureGroup::BMSFeature, // don't use wildcard here, we want to be explicit + } + } +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Features(pub HashSet); + +impl Default for Features { + fn default() -> Self { + // should be kept up to date with the default feature + lua54 on top of anything that is handy to run locally every time + Features::new(vec![ + Feature::Lua54, + Feature::Rhai, + Feature::CoreFunctions, + Feature::BevyEcsBindings, + Feature::BevyInputBindings, + Feature::BevyMathBindings, + Feature::BevyReflectBindings, + Feature::BevyTimeBindings, + Feature::BevyTransformBindings, + Feature::BevyColorBindings, + Feature::BevyCorePipelineBindings, + Feature::LuaLanguageServerFiles, + ]) + } +} + +impl Features { + pub fn new>(features: I) -> Self { + Self(features.into_iter().collect()) + } + + /// Returns all features except the exclusive ones which are not the default + pub fn all_features() -> Self { + // remove exclusive features which are not the default + Self( + ::VARIANTS + .iter() + .filter(|f| { + let group = f.to_feature_group(); + (!group.is_exclusive()) || (**f == group.default_feature()) + }) + .cloned() + .collect(), + ) + } + + pub fn display_no_default(self) -> String { + let default_features = Self::default().0; + + let excluded_default_features = default_features + .difference(&self.0) + .map(|f| format!("-{f}")) + .collect::>(); + + let excluded_non_powerset_features = self + .0 + .iter() + .filter(|f| matches!(f.to_feature_group(), FeatureGroup::BMSFeatureNotInPowerset)) + .map(|f| f.to_string()) + .collect::>(); + + let mut features = self + .0 + .into_iter() + .filter(|f| { + !default_features.contains(f) + && !excluded_non_powerset_features.contains(&f.to_string()) + }) + .map(|f| f.to_string()) + .collect::>(); + + features.sort(); + excluded_default_features + .into_iter() + .chain(features) + .chain(std::iter::once(format!( + "+{} bindings", + excluded_non_powerset_features.len() + ))) + .collect::>() + .join(",") + } + + pub fn without(self, feature: Feature) -> Self { + Self(self.0.into_iter().filter(|f| *f != feature).collect()) + } + + pub fn to_cargo_args(&self) -> Vec { + if self.0.is_empty() { + vec![] + } else { + vec![ + "--no-default-features".to_owned(), + "--features".to_owned(), + self.to_string(), + ] + } + } + + pub fn to_placeholder() -> clap::builder::Str { + format!("[{}]", Feature::VARIANTS.join("|")).into() + } + + pub fn split_by_group(&self) -> HashMap> { + let mut groups = HashMap::new(); + for feature in &self.0 { + let group = feature.to_feature_group(); + groups.entry(group).or_insert_with(Vec::new).push(*feature); + } + groups + } +} + +impl std::fmt::Display for Features { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + // exclude default features + for (i, feature) in self.0.iter().sorted().enumerate() { + if i > 0 { + write!(f, ",")?; + } + write!(f, "{feature}")?; + } + std::result::Result::Ok(()) + } +} + +impl From for Features { + fn from(s: String) -> Self { + if s.is_empty() { + return Self::new(vec![]); + } + + let features = s + .trim() + .split(',') + .map(|f| { + Feature::from_str(f).unwrap_or_else(|_| { + eprintln!("Unknown feature: '{f}'"); + std::process::exit(1); + }) + }) + .collect(); + Self(features) + } +} diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs index 06faa395f9..c14779312b 100644 --- a/xtask/src/lib.rs +++ b/xtask/src/lib.rs @@ -1,5 +1,13 @@ -mod binding_crate; -mod codegen_meta; +pub(crate) mod args; +pub(crate) mod binding_crate; +pub(crate) mod codegen; +pub(crate) mod codegen_meta; +pub(crate) mod command; +pub(crate) mod features; +pub use args::*; pub use binding_crate::*; +pub use codegen::*; pub use codegen_meta::*; +pub use command::*; +pub use features::*; diff --git a/xtask/src/main.rs b/xtask/src/main.rs index e598e57bce..491d187b97 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -1,6 +1,6 @@ use std::{ - collections::{HashMap, HashSet}, - ffi::{OsStr, OsString}, + collections::HashMap, + ffi::OsString, io::Write, path::{Path, PathBuf}, process::{Command, Output}, @@ -14,293 +14,11 @@ use json_comments::StripComments; use log::*; use serde::{Deserialize, Serialize}; use strum::{IntoEnumIterator, VariantNames}; -use xtask::{BindingCrate, Meta}; - -#[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - strum::EnumString, - strum::EnumIter, - strum::Display, - strum::VariantNames, - strum::VariantArray, -)] -#[strum(serialize_all = "snake_case")] -enum Feature { - // bindings - CoreFunctions, - BevyEcsBindings, - BevyInputBindings, - BevyMathBindings, - BevyReflectBindings, - BevyTimeBindings, - BevyTransformBindings, - BevyColorBindings, - BevyCorePipelineBindings, - BevyA11yBindings, - BevyAnimationBindings, - BevyAssetBindings, - BevyGizmosBindings, - BevyGltfBindings, - BevyImageBindings, - BevyInputFocusBindings, - BevyMeshBindings, - BevyPbrBindings, - BevyPickingBindings, - BevyRenderBindings, - BevySceneBindings, - BevySpriteBindings, - BevyTextBindings, - - // Ladfile - LuaLanguageServerFiles, - - // Lua - Lua51, - Lua52, - Lua53, - Lua54, - Luajit, - Luajit52, - Luau, - UnsafeLuaModules, - MluaSerialize, - MluaMacros, - MluaAsync, - // Rhai, - Rhai, - // Rune - // Rune, - - // Profiling - ProfileWithTracy, -} - -#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, strum::EnumIter)] -enum FeatureGroup { - LuaExclusive, - RhaiExclusive, - // RuneExclusive, - ForExternalCrate, - BMSFeature, - BMSFeatureNotInPowerset, -} - -impl FeatureGroup { - fn default_feature(self) -> Feature { - match self { - FeatureGroup::LuaExclusive => Feature::Lua54, - FeatureGroup::RhaiExclusive => Feature::Rhai, - // FeatureGroup::RuneExclusive => Feature::Rune, - _ => panic!("No default feature for non-exclusive group"), - } - } - - fn is_exclusive(self) -> bool { - matches!( - self, - FeatureGroup::LuaExclusive | FeatureGroup::RhaiExclusive // | FeatureGroup::RuneExclusive - ) - } -} - -trait IntoFeatureGroup { - fn to_feature_group(self) -> FeatureGroup; -} - -impl IntoFeatureGroup for Feature { - fn to_feature_group(self) -> FeatureGroup { - match self { - Feature::Lua51 - | Feature::Lua52 - | Feature::Lua53 - | Feature::Lua54 - | Feature::Luajit - | Feature::Luajit52 - | Feature::Luau => FeatureGroup::LuaExclusive, - Feature::Rhai => FeatureGroup::RhaiExclusive, - // Feature::Rune => FeatureGroup::RuneExclusive, - Feature::MluaAsync - | Feature::MluaMacros - | Feature::MluaSerialize - | Feature::UnsafeLuaModules => FeatureGroup::ForExternalCrate, - Feature::BevyEcsBindings - | Feature::BevyInputBindings - | Feature::BevyMathBindings - | Feature::BevyReflectBindings - | Feature::BevyTimeBindings - | Feature::BevyTransformBindings - | Feature::BevyColorBindings - | Feature::BevyCorePipelineBindings - | Feature::BevyA11yBindings - | Feature::BevyAnimationBindings - | Feature::BevyAssetBindings - | Feature::BevyGizmosBindings - | Feature::BevyGltfBindings - | Feature::BevyImageBindings - | Feature::BevyInputFocusBindings - | Feature::BevyMeshBindings - | Feature::BevyPbrBindings - | Feature::BevyPickingBindings - | Feature::BevyRenderBindings - | Feature::BevySceneBindings - | Feature::BevySpriteBindings - | Feature::BevyTextBindings => FeatureGroup::BMSFeatureNotInPowerset, - Feature::CoreFunctions - | Feature::ProfileWithTracy - | Feature::LuaLanguageServerFiles => FeatureGroup::BMSFeature, // don't use wildcard here, we want to be explicit - } - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -struct Features(HashSet); - -impl Default for Features { - fn default() -> Self { - // should be kept up to date with the default feature + lua54 on top of anything that is handy to run locally every time - Features::new(vec![ - Feature::Lua54, - Feature::Rhai, - Feature::CoreFunctions, - Feature::BevyEcsBindings, - Feature::BevyInputBindings, - Feature::BevyMathBindings, - Feature::BevyReflectBindings, - Feature::BevyTimeBindings, - Feature::BevyTransformBindings, - Feature::BevyColorBindings, - Feature::BevyCorePipelineBindings, - Feature::LuaLanguageServerFiles, - ]) - } -} - -impl Features { - fn new>(features: I) -> Self { - Self(features.into_iter().collect()) - } - - /// Returns all features except the exclusive ones which are not the default - fn all_features() -> Self { - // remove exclusive features which are not the default - Self( - ::VARIANTS - .iter() - .filter(|f| { - let group = f.to_feature_group(); - (!group.is_exclusive()) || (**f == group.default_feature()) - }) - .cloned() - .collect(), - ) - } - - fn display_no_default(self) -> String { - let default_features = Self::default().0; - - let excluded_default_features = default_features - .difference(&self.0) - .map(|f| format!("-{f}")) - .collect::>(); - - let excluded_non_powerset_features = self - .0 - .iter() - .filter(|f| matches!(f.to_feature_group(), FeatureGroup::BMSFeatureNotInPowerset)) - .map(|f| f.to_string()) - .collect::>(); - - let mut features = self - .0 - .into_iter() - .filter(|f| { - !default_features.contains(f) - && !excluded_non_powerset_features.contains(&f.to_string()) - }) - .map(|f| f.to_string()) - .collect::>(); - - features.sort(); - excluded_default_features - .into_iter() - .chain(features) - .chain(std::iter::once(format!( - "+{} bindings", - excluded_non_powerset_features.len() - ))) - .collect::>() - .join(",") - } - - fn without(self, feature: Feature) -> Self { - Self(self.0.into_iter().filter(|f| *f != feature).collect()) - } - - fn to_cargo_args(&self) -> Vec { - if self.0.is_empty() { - vec![] - } else { - vec![ - "--no-default-features".to_owned(), - "--features".to_owned(), - self.to_string(), - ] - } - } - - fn to_placeholder() -> clap::builder::Str { - format!("[{}]", Feature::VARIANTS.join("|")).into() - } - - fn split_by_group(&self) -> HashMap> { - let mut groups = HashMap::new(); - for feature in &self.0 { - let group = feature.to_feature_group(); - groups.entry(group).or_insert_with(Vec::new).push(*feature); - } - groups - } -} - -impl std::fmt::Display for Features { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - // exclude default features - for (i, feature) in self.0.iter().sorted().enumerate() { - if i > 0 { - write!(f, ",")?; - } - write!(f, "{feature}")?; - } - std::result::Result::Ok(()) - } -} - -impl From for Features { - fn from(s: String) -> Self { - if s.is_empty() { - return Self::new(vec![]); - } - - let features = s - .trim() - .split(',') - .map(|f| { - Feature::from_str(f).unwrap_or_else(|_| { - eprintln!("Unknown feature: '{f}'"); - std::process::exit(1); - }) - }) - .collect(); - Self(features) - } -} +use xtask::{ + BindingCrate, Feature, FeatureGroup, Features, GlobalArgs, Meta, codegen_crate_dir, + main_workspace_cargo_metadata, prepare_codegen, read_rust_toolchain, relative_workspace_dir, + run_system_command, run_workspace_command, workspace_dir, +}; /// Enumerates the binaries available in the project and their paths #[derive( @@ -439,12 +157,18 @@ impl App { Xtasks::Codegen { output_dir, bevy_features, + list_only, } => { - cmd.arg("codegen") + let cmd = cmd + .arg("codegen") .arg("--output-dir") .arg(output_dir) .arg("--bevy-features") .arg(bevy_features.join(",")); + + if list_only { + cmd.arg("--list-only"); + } } Xtasks::Example { example } => { cmd.arg("example").arg(example); @@ -517,88 +241,6 @@ impl App { } } -#[derive(Debug, Parser, Clone)] -struct GlobalArgs { - #[clap(long, short, global = true, value_parser=clap::value_parser!(Features), value_name=Features::to_placeholder(), default_value=Features::default().to_string(),required = false)] - features: Features, - - #[clap( - long, - global = true, - default_value = "false", - help = "Enable coverage collection for cargo commands" - )] - coverage: bool, - - #[clap(skip)] - override_workspace_dir: Option, - - #[clap(skip)] - override_toolchain: Option, - - #[clap( - long, - short, - global = true, - value_name = "PROFILE", - help = "The cargo profile to use for commands that support it" - )] - profile: Option, - - #[clap( - long, - global = true, - value_name = "JOBS", - help = "The number of parallel jobs to run at most" - )] - jobs: Option, -} - -impl GlobalArgs { - pub fn with_max_jobs(self, jobs: usize) -> Self { - Self { - jobs: Some(jobs), - ..self - } - } - - pub fn with_coverage(self) -> Self { - Self { - coverage: true, - ..self - } - } - - pub fn without_coverage(self) -> Self { - Self { - coverage: false, - ..self - } - } - - pub fn with_workspace_dir(self, dir: PathBuf) -> Self { - Self { - override_workspace_dir: Some(dir), - ..self - } - } - - pub fn with_toolchain(self, toolchain: String) -> Self { - Self { - override_toolchain: Some(toolchain), - ..self - } - } - - pub fn with_features(self, features: Features) -> Self { - Self { features, ..self } - } - - pub fn with_profile(self, profile: Option) -> Self { - Self { profile, ..self } - } -} - #[derive( Debug, Clone, @@ -647,10 +289,6 @@ impl Macro { format!("[{}]", Macro::VARIANTS.join("|")).into() } } -#[derive(Debug, Clone, serde::Serialize)] -struct CodegenTemplateArgs { - self_is_bms_lua: bool, -} fn fetch_default_bevy_features() -> String { let try_dirs = vec![".", "../"]; @@ -754,6 +392,10 @@ enum Xtasks { help = "The features to enable for the bevy crate" )] bevy_features: Vec, + + /// If set will not generate but instead print out type and debug information from the bevy crate + #[clap(long)] + list_only: bool, }, /// Build the main workspace, and then run all tests Test { @@ -869,7 +511,14 @@ impl Xtasks { Xtasks::Codegen { output_dir, bevy_features, - } => Self::codegen(app_settings, output_dir, bevy_features), + list_only, + } => { + if list_only { + Self::codegen_list(app_settings, output_dir, bevy_features) + } else { + Self::codegen(app_settings, output_dir, bevy_features) + } + } Xtasks::Install { binary } => Self::install(app_settings, binary), Xtasks::Bencher { publish } => Self::bencher(app_settings, publish), Xtasks::Bench { @@ -884,40 +533,6 @@ impl Xtasks { Ok("".into()) } - /// Reads the metadata from the main workspace - fn main_workspace_cargo_metadata() -> Result { - let cargo_manifest_path = std::env::var("MAIN_CARGO_MANIFEST_PATH").unwrap(); - let path = PathBuf::from(cargo_manifest_path); - let parent_dir = path.parent().unwrap().parent().unwrap().join("Cargo.toml"); - let mut cmd = cargo_metadata::MetadataCommand::new(); - cmd.manifest_path(parent_dir.to_string_lossy().to_string()); - let out = cmd.exec()?; - Ok(out) - } - - fn workspace_dir(app_settings: &GlobalArgs) -> Result { - if let Some(dir) = &app_settings.override_workspace_dir { - return Ok(dir.into()); - } - - let metadata = Self::main_workspace_cargo_metadata()?; - let workspace_root = metadata.workspace_root; - Ok(workspace_root.into()) - } - - fn codegen_crate_dir(app_settings: &GlobalArgs) -> Result { - let workspace_dir = Self::workspace_dir(app_settings)?; - Ok(workspace_dir.join("codegen")) - } - - fn relative_workspace_dir>( - app_settings: &GlobalArgs, - dir: P, - ) -> Result { - let workspace_dir = Self::workspace_dir(app_settings)?; - Ok(workspace_dir.join(dir)) - } - fn append_rustflags(flag: &str) { let rustflags = std::env::var("RUSTFLAGS").unwrap_or_default(); let mut flags = rustflags.split(' ').collect::>(); @@ -926,136 +541,6 @@ impl Xtasks { unsafe { std::env::set_var("RUSTFLAGS", flags) }; } - fn run_system_command>>( - app_settings: &GlobalArgs, - command: &str, - context: &str, - add_args: I, - dir: Option<&Path>, - capture_streams_in_output: bool, - ) -> Result { - info!("Running system command: {command}"); - - let working_dir = match dir { - Some(d) => Self::relative_workspace_dir(app_settings, d)?, - None => Self::workspace_dir(app_settings)?, - }; - - let mut cmd = Command::new(command); - cmd.args(add_args).current_dir(working_dir); - - if !capture_streams_in_output { - cmd.stdout(std::process::Stdio::inherit()) - .stderr(std::process::Stdio::inherit()); - } - - info!("Using command: {cmd:?}"); - - let output = cmd.output(); - if capture_streams_in_output { - info!("Command status: {:?}", output.as_ref().map(|o| o.status)); - } else { - info!("Command output: {output:?}"); - } - - let output = output.with_context(|| context.to_owned())?; - match output.status.code() { - Some(0) => Ok(output), - _ => bail!( - "{} failed with exit code: {}", - context, - output.status.code().unwrap_or(-1) - ), - } - } - - fn run_workspace_command>>( - app_settings: &GlobalArgs, - command: &str, - context: &str, - add_args: I, - dir: Option<&Path>, - capture_streams_in_output: bool, - ) -> Result { - let coverage_mode = if app_settings.coverage { - "with coverage" - } else { - Default::default() - }; - - info!("Running workspace command {coverage_mode}: {command}"); - - let mut args = vec![]; - - if let Some(ref toolchain) = app_settings.override_toolchain { - args.push(format!("+{toolchain}")); - } - - args.push(command.to_owned()); - - if command != "fmt" && command != "bms-codegen" && command != "install" { - // fmt doesn't care about features, workspaces or profiles - if command != "run" { - args.push("--workspace".to_owned()); - - if let Some(profile) = app_settings.profile.as_ref() { - let use_profile = if profile == "ephemeral-build" && app_settings.coverage { - // use special profile for coverage as it needs debug information - // but also don't want it too slow - "ephemeral-coverage" - } else { - profile - }; - - if !app_settings.coverage { - args.push("--profile".to_owned()); - args.push(use_profile.to_owned()); - } - - if let Some(jobs) = app_settings.jobs { - args.push("--jobs".to_owned()); - args.push(jobs.to_string()); - } - } - } - - args.extend(app_settings.features.to_cargo_args()); - } - - args.extend(add_args.into_iter().map(|s| { - s.as_ref() - .to_str() - .expect("invalid command argument") - .to_owned() - })); - - let working_dir = match dir { - Some(d) => Self::relative_workspace_dir(app_settings, d)?, - None => Self::workspace_dir(app_settings)?, - }; - - let mut cmd = Command::new("cargo"); - cmd.args(args).current_dir(working_dir); - - if !capture_streams_in_output { - cmd.stdout(std::process::Stdio::inherit()) - .stderr(std::process::Stdio::inherit()); - } - - info!("Using command: {cmd:?}"); - - let output = cmd.output().with_context(|| context.to_owned())?; - match output.status.code() { - Some(0) => Ok(output), - _ => bail!( - "{} failed with exit code: {}. Features: {}. output {output:?}", - context, - output.status.code().unwrap_or(-1), - app_settings.features - ), - } - } - fn build(timings: bool, app_settings: GlobalArgs) -> Result<()> { // build workspace using the given features let mut args = vec!["--all-targets", "--examples"]; @@ -1063,7 +548,7 @@ impl Xtasks { args.push("--timings"); } - Self::run_workspace_command( + run_workspace_command( &app_settings, "build", "Failed to build workspace", @@ -1088,7 +573,7 @@ impl Xtasks { clippy_args.extend(vec!["--", "-D", "warnings"]); } - Self::run_workspace_command( + run_workspace_command( &app_settings, "clippy", "Failed to run clippy", @@ -1102,7 +587,7 @@ impl Xtasks { } // run cargo fmt checks - Self::run_workspace_command( + run_workspace_command( &app_settings, "fmt", "Failed to run cargo fmt", @@ -1115,12 +600,12 @@ impl Xtasks { } fn check_codegen_workspace(app_settings: GlobalArgs, ide_mode: bool) -> Result<()> { - let toolchain = Self::read_rust_toolchain(&Self::codegen_crate_dir(&app_settings)?); + let toolchain = read_rust_toolchain(&codegen_crate_dir(&app_settings)?); // set the working directory to the codegen crate let app_settings = app_settings .clone() - .with_workspace_dir(Self::codegen_crate_dir(&app_settings)?) + .with_workspace_dir(codegen_crate_dir(&app_settings)?) .with_toolchain(toolchain) .with_features(Features::new(vec![])); // TODO: support features for codegen crate if any @@ -1134,7 +619,7 @@ impl Xtasks { clippy_args.extend(vec!["--all-targets", "--", "-D", "warnings"]); } - Self::run_workspace_command( + run_workspace_command( &app_settings, "clippy", "Failed to run clippy on codegen crate", @@ -1148,176 +633,85 @@ impl Xtasks { Ok(()) } - /// reads rust-toolchain.toml file at the given directory and returns the toolchain string - fn read_rust_toolchain(path: &Path) -> String { - let rust_toolchain_path = path.join("rust-toolchain.toml"); - - let rust_toolchain = std::fs::read_to_string(rust_toolchain_path) - .expect("Could not read rust_toolchain.toml"); - - // parse the toml file - let toml: toml::Value = - toml::from_str(&rust_toolchain).expect("Could not parse rust_toolchain.toml"); - - let toolchain = toml - .get("toolchain") - .expect("Could not find toolchain in rust_toolchain.toml"); - let channel = toolchain - .get("channel") - .expect("Could not find channel in rust_toolchain.toml"); - let channel = channel - .as_str() - .expect("Channel in rust_toolchain.toml is not a string"); - - // set the toolchain - channel.to_string() - } - - fn codegen( + fn codegen_list( app_settings: GlobalArgs, output_dir: PathBuf, bevy_features: Vec, ) -> Result<()> { - let main_workspace_app_settings = app_settings; - let output_dir = Self::relative_workspace_dir(&main_workspace_app_settings, output_dir)?; - let bevy_dir = - Self::relative_workspace_dir(&main_workspace_app_settings, "target/codegen/bevy")?; - let bevy_target_dir = bevy_dir.join("target"); - // clear the bevy target dir if it exists - info!("Clearing bevy target dir: {bevy_target_dir:?}"); - if bevy_target_dir.exists() { - std::fs::remove_dir_all(&bevy_target_dir)?; - } - - info!("Cleaning output dir: {output_dir:?}"); - // safety measure - if output_dir.exists() && output_dir.to_string_lossy().contains("target") { - std::fs::remove_dir_all(&output_dir)?; - } - - let api_gen_dir = Self::codegen_crate_dir(&main_workspace_app_settings)?; - let codegen_app_settings = main_workspace_app_settings - .clone() - .with_workspace_dir(api_gen_dir.clone()); - - let bevy_repo_app_settings = main_workspace_app_settings - .clone() - .with_workspace_dir(bevy_dir.clone()) - .with_toolchain(Self::read_rust_toolchain(&api_gen_dir)); - - // run cargo install - Self::run_system_command( - &codegen_app_settings, - "cargo", - "Failed to install bevy_api_gen", - vec!["install", "--path", "."], - None, - false, - )?; - - let metadata = Self::main_workspace_cargo_metadata()?; - let bevy_version = metadata - .packages - .iter() - .find(|p| p.name.as_str() == "bevy") - .expect("Could not find bevy package in metadata") - .version - .clone(); - // create directories if they don't already exist - std::fs::create_dir_all(&bevy_dir)?; - std::fs::create_dir_all(&output_dir)?; - - // git clone bevy repo - let _ = Self::run_system_command( - &bevy_repo_app_settings, - "git", - "Failed to clone bevy repo", + let settings = prepare_codegen(app_settings, Some(output_dir), bevy_features)?; + run_workspace_command( + &settings.bevy_repo_app_settings, + "bms-codegen", + "Failed to run bms-codegen generate", vec![ - "clone", - "https://github.com/bevyengine/bevy", - "--branch", - format!("v{bevy_version}").as_str(), - "--depth", - "1", - ".", + "list-types", + "--bms-bindings-path", + settings.bms_bindings_path.to_str().unwrap(), + "--output", + settings.output_dir.to_str().unwrap(), + "--template-args", + settings.template_args.as_str(), + "--features", + settings.bevy_features.join(",").as_str(), + "-v", ], - None, - false, - ); - - // fetch the tags - Self::run_system_command( - &bevy_repo_app_settings, - "git", - "Failed to fetch bevy tags", - vec!["fetch", "--tags"], - Some(&bevy_dir), + Some(&settings.bevy_dir), false, )?; + Ok(()) + } - // checkout the version tag - Self::run_system_command( - &bevy_repo_app_settings, - "git", - "Failed to checkout bevy tag", - vec!["checkout", format!("v{bevy_version}").as_str()], - Some(&bevy_dir), - false, - )?; - - // run bevy_api_gen - let template_args = CodegenTemplateArgs { - self_is_bms_lua: true, - }; - - let template_args = serde_json::to_string(&template_args)?; - let bms_bindings_path = Self::workspace_dir(&main_workspace_app_settings)? - .join("crates/bevy_mod_scripting_bindings") - .to_path_buf(); + fn codegen( + app_settings: GlobalArgs, + output_dir: PathBuf, + bevy_features: Vec, + ) -> Result<()> { + let settings = prepare_codegen(app_settings, Some(output_dir), bevy_features)?; - Self::run_workspace_command( - &bevy_repo_app_settings, + run_workspace_command( + &settings.bevy_repo_app_settings, "bms-codegen", "Failed to run bms-codegen generate", vec![ "generate", "--bms-bindings-path", - bms_bindings_path.to_str().unwrap(), + settings.bms_bindings_path.to_str().unwrap(), "--output", - output_dir.to_str().unwrap(), + settings.output_dir.to_str().unwrap(), "--template-args", - template_args.as_str(), + settings.template_args.as_str(), "--features", - bevy_features.join(",").as_str(), + settings.bevy_features.join(",").as_str(), "-v", ], - Some(&bevy_dir), + Some(&settings.bevy_dir), false, )?; // collect - Self::run_workspace_command( - &bevy_repo_app_settings, + run_workspace_command( + &settings.bevy_repo_app_settings, "bms-codegen", "Failed to run bms-codegen generate", vec![ "collect", "--bms-bindings-path", - bms_bindings_path.to_str().unwrap(), + settings.bms_bindings_path.to_str().unwrap(), "--output", - output_dir.to_str().unwrap(), + settings.output_dir.to_str().unwrap(), "--template-args", - template_args.as_str(), + settings.template_args.as_str(), "-v", ], - Some(&bevy_dir), + Some(&settings.bevy_dir), false, )?; // now expand the macros and replace the files in place // by running cargo expand --features crate_name and capturing the output - let generated_crates = (std::fs::read_dir(&output_dir)?).collect::, _>>()?; + let generated_crates = + (std::fs::read_dir(&settings.output_dir)?).collect::, _>>()?; let crate_names = generated_crates .iter() .filter(|s| { @@ -1332,7 +726,7 @@ impl Xtasks { // finally, generate the bindings crate code and move the code in there // get the version from the bevy workspace manifest - let manifest = Self::main_workspace_cargo_metadata()?; + let manifest = main_workspace_cargo_metadata()?; let version = manifest .packages .iter() @@ -1346,7 +740,7 @@ impl Xtasks { .expect("Could not find bevy_mod_scripting package in metadata"); // find features in the corresponding meta file .json under "features" key - let meta_path = output_dir.join(format!("{entry}.json")); + let meta_path = settings.output_dir.join(format!("{entry}.json")); let meta: Meta = serde_json::from_reader( std::fs::File::open(&meta_path) .with_context(|| format!("opening meta file {meta_path:?}"))?, @@ -1359,8 +753,8 @@ impl Xtasks { meta.version, meta.dependencies, ); - let path = Self::relative_workspace_dir( - &main_workspace_app_settings, + let path = relative_workspace_dir( + &settings.main_workspace_app_settings, format!("crates/bindings/{entry}_bms_bindings/"), )?; krate.generate_in_dir(&path)?; @@ -1375,15 +769,16 @@ impl Xtasks { dest_path.parent().unwrap() ) })?; - std::fs::copy(output_dir.join(format!("{entry}.rs")), &dest_path).with_context( - || format!("copying generated binding file to bindings crate: {dest_path:?}"), - )?; + std::fs::copy(settings.output_dir.join(format!("{entry}.rs")), &dest_path) + .with_context(|| { + format!("copying generated binding file to bindings crate: {dest_path:?}") + })?; // finally expand the macros inside let args = vec![String::from("expand")]; - let expand_cmd = Self::run_system_command( - &main_workspace_app_settings, + let expand_cmd = run_system_command( + &settings.main_workspace_app_settings, "cargo", "pre-expanding generated code", args, @@ -1441,9 +836,9 @@ impl Xtasks { // copy the `/assets/bindings.lad.json` file to it's path in the book let ladfile_path = - Self::relative_workspace_dir(&app_settings, "assets/definitions/bindings.lad.json")?; + relative_workspace_dir(&app_settings, "assets/definitions/bindings.lad.json")?; let destination_path = - Self::relative_workspace_dir(&app_settings, "docs/src/ladfiles/bindings.lad.json")?; + relative_workspace_dir(&app_settings, "docs/src/ladfiles/bindings.lad.json")?; info!("Copying generated ladfile from: {ladfile_path:?} to: {destination_path:?}"); std::fs::create_dir_all(destination_path.parent().unwrap())?; @@ -1452,7 +847,7 @@ impl Xtasks { if !no_rust_docs { info!("Building rust docs"); - let metadata = Self::main_workspace_cargo_metadata()?; + let metadata = main_workspace_cargo_metadata()?; let package = metadata .packages @@ -1494,7 +889,7 @@ impl Xtasks { if open { args.push("--open"); } - Self::run_workspace_command( + run_workspace_command( &app_settings, "doc", "Failed to build crates.io docs", @@ -1508,7 +903,7 @@ impl Xtasks { info!("Building mdbook docs"); let args = if !open { vec!["build"] } else { vec!["serve"] }; - Self::run_system_command( + run_system_command( &app_settings, "mdbook", "Failed to build or serve mdbook docs", @@ -1544,7 +939,7 @@ impl Xtasks { vec![] }; - let output = Self::run_workspace_command( + let output = run_workspace_command( // run with just lua54 &app_settings.with_features(features), "bench", @@ -1561,7 +956,7 @@ impl Xtasks { fn bencher(app_settings: GlobalArgs, publish: bool) -> Result<()> { // // first of all figure out which branch we're on // // run // git rev-parse --abbrev-ref HEAD - let workspace_dir = Self::workspace_dir(&app_settings).unwrap(); + let workspace_dir = workspace_dir(&app_settings).unwrap(); let command = Command::new("git") .args(["rev-parse", "--abbrev-ref", "HEAD"]) .current_dir(workspace_dir.clone()) @@ -1827,7 +1222,7 @@ impl Xtasks { test_args.push("--no-fail-fast".to_owned()) } - Self::run_workspace_command( + run_workspace_command( &app_settings, "test", "Failed to run tests", @@ -1838,7 +1233,7 @@ impl Xtasks { // generate coverage report and lcov file if app_settings.coverage { - Self::run_system_command( + run_system_command( &app_settings, "grcov", "Generating html coverage report", @@ -1861,7 +1256,7 @@ impl Xtasks { false, )?; - Self::run_system_command( + run_system_command( &app_settings, "grcov", "Failed to generate coverage report", @@ -2009,9 +1404,9 @@ impl Xtasks { if cfg!(target_os = "linux") { let sudo = if !is_root::is_root() { "sudo" } else { "" }; let install_cmd = format!( - "{sudo} apt-get update && {sudo} apt-get install --no-install-recommends -y libasound2-dev libudev-dev" + "{sudo} apt-get update && {sudo} apt-get install --no-install-recommends -y libasound2-dev libudev-dev libwayland-dev" ); - Self::run_system_command( + run_system_command( &app_settings, "sh", "Failed to install Linux dependencies", @@ -2024,7 +1419,7 @@ impl Xtasks { // install bencher // linux curl --proto '=https' --tlsv1.2 -sSfL https://bencher.dev/download/install-cli.sh | sh // windows irm https://bencher.dev/download/install-cli.ps1 | iex - Self::run_system_command( + run_system_command( &app_settings, "cargo", "Failed to install bencher", @@ -2042,7 +1437,7 @@ impl Xtasks { false, )?; // install cargo mdbook - Self::run_system_command( + run_system_command( &app_settings, "cargo", "Failed to install mdbook", @@ -2052,7 +1447,7 @@ impl Xtasks { )?; // install mdbook-mermaid - Self::run_system_command( + run_system_command( &app_settings, "cargo", "Failed to install mdbook", @@ -2062,7 +1457,7 @@ impl Xtasks { )?; // install grcov - Self::run_system_command( + run_system_command( &app_settings, "cargo", "Failed to install grcov", @@ -2072,7 +1467,7 @@ impl Xtasks { )?; // install cargo expand - Self::run_system_command( + run_system_command( &app_settings, "cargo", "Failed to install cargo expand", @@ -2082,8 +1477,8 @@ impl Xtasks { )?; // install nightly toolchaing for bevy api gen - let toolchain = Self::read_rust_toolchain(&Self::codegen_crate_dir(&app_settings)?); - Self::run_system_command( + let toolchain = read_rust_toolchain(&codegen_crate_dir(&app_settings)?); + run_system_command( &app_settings, "rustup", "Failed to install nightly toolchain", @@ -2103,7 +1498,7 @@ impl Xtasks { ]; // install components for the stable and nightly toolchains - Self::run_system_command( + run_system_command( &app_settings, "rustup", "Failed to install rust components", @@ -2113,7 +1508,7 @@ impl Xtasks { )?; // add components on nightly toolchain - Self::run_system_command( + run_system_command( &app_settings, "rustup", "Failed to install nightly components", @@ -2130,7 +1525,7 @@ impl Xtasks { let vscode_settings = include_str!("../templates/settings.json.tera"); let mut tera = tera::Tera::default(); let mut context = tera::Context::new(); - let workspace_dir = Self::workspace_dir(&app_settings)?; + let workspace_dir = workspace_dir(&app_settings)?; let json_workspace_dir = serde_json::to_string(&workspace_dir)?; // make sure this works as a json string context.insert("dir", &json_workspace_dir.trim_matches('\"')); @@ -2138,7 +1533,7 @@ impl Xtasks { let templated_settings_json = Self::read_json_with_comments(templated_settings.as_bytes()) .with_context(|| "reading templated vscode settings")?; - let vscode_dir = Self::relative_workspace_dir(&app_settings, ".vscode")?; + let vscode_dir = relative_workspace_dir(&app_settings, ".vscode")?; std::fs::create_dir_all(&vscode_dir)?; let vscode_settings_path = vscode_dir.join("settings.json"); @@ -2193,12 +1588,12 @@ impl Xtasks { // path = "examples/docgen.rs" // required-features = [] - // let metadata = Self::main_workspace_cargo_metadata()?; + // let metadata = main_workspace_cargo_metadata()?; // let metadata = &metadata.root_package().unwrap().targets; // println!("{metadata:#?}"); // run the example - Self::run_workspace_command( + run_workspace_command( &app_settings, "run", "Failed to run example", @@ -2212,8 +1607,8 @@ impl Xtasks { fn install(app_settings: GlobalArgs, binary: Binary) -> std::result::Result<(), Error> { // run cargo install --path - let binary_path = Self::relative_workspace_dir(&app_settings, binary.path())?; - Self::run_system_command( + let binary_path = relative_workspace_dir(&app_settings, binary.path())?; + run_system_command( &app_settings, "cargo", "Failed to install binary", @@ -2233,9 +1628,13 @@ fn pop_cargo_env() -> Result<()> { let env = std::env::vars().collect::>(); // RUSTUP TOOLCHAIN exclude is a temporary fix, it might make deving the api codegen crate not work let exclude_list = ["CARGO_HOME"]; + let include_list = []; //"LD_LIBRARY_PATH" for (key, value) in env.iter() { - if key.starts_with("CARGO_") && !exclude_list.contains(&(key.as_str())) { + let key_str = &(key.as_str()); + if (include_list.contains(key_str) || key.starts_with("CARGO_")) + && !exclude_list.contains(key_str) + { let new_key = format!("MAIN_{key}"); unsafe { std::env::set_var(new_key, value) }; unsafe { std::env::remove_var(key) };