From aef9efe8df5866856896c517ef3a18bc7ace2f34 Mon Sep 17 00:00:00 2001 From: makspll Date: Sat, 22 Feb 2025 03:12:21 +0000 Subject: [PATCH 1/6] feat: create `ScriptingDocgenPlugin` to allow exporting `LAD` files + export BMS bindings --- .gitignore | 4 +- Cargo.toml | 6 + assets/scripts/bevy_api.lua | 159 - assets/scripts/complex_game_loop.lua | 17 - assets/scripts/console_integration.lua | 12 - assets/scripts/console_integration.rhai | 13 - assets/scripts/coroutines.lua | 23 - assets/scripts/dynamic_queries.lua | 23 - assets/scripts/dynamic_queries.rhai | 11 - assets/scripts/event_recipients.lua | 6 - assets/scripts/event_recipients.rune | 3 - assets/scripts/minimal.rune | 3 - assets/scripts/multiple_events_rhai.rhai | 16 - assets/scripts/runtime_error.lua | 3 - crates/bevy_mod_scripting_core/Cargo.toml | 1 - .../bevy_mod_scripting_core/src/docgen/mod.rs | 1 + crates/ladfile_builder/Cargo.toml | 1 + crates/ladfile_builder/src/lib.rs | 1 + crates/ladfile_builder/src/plugin.rs | 114 + crates/xtask/src/main.rs | 109 +- docs/book.toml | 2 + docs/src/SUMMARY.md | 1 + docs/src/ladfiles/bindings.lad.json | 71948 ++++++++++++++++ examples/docgen.rs | 20 + 24 files changed, 72205 insertions(+), 292 deletions(-) delete mode 100644 assets/scripts/bevy_api.lua delete mode 100644 assets/scripts/complex_game_loop.lua delete mode 100644 assets/scripts/console_integration.lua delete mode 100644 assets/scripts/console_integration.rhai delete mode 100644 assets/scripts/coroutines.lua delete mode 100644 assets/scripts/dynamic_queries.lua delete mode 100644 assets/scripts/dynamic_queries.rhai delete mode 100644 assets/scripts/event_recipients.lua delete mode 100644 assets/scripts/event_recipients.rune delete mode 100644 assets/scripts/minimal.rune delete mode 100644 assets/scripts/multiple_events_rhai.rhai delete mode 100644 assets/scripts/runtime_error.lua create mode 100644 crates/ladfile_builder/src/plugin.rs create mode 100644 docs/src/ladfiles/bindings.lad.json create mode 100644 examples/docgen.rs diff --git a/.gitignore b/.gitignore index 524c94e669..306a353545 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,6 @@ Cargo.lock assets/scripts/tlconfig.lua **.log **build/ -.html \ No newline at end of file +.html + +/assets/**/*.lad.json \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index ee94dddfd2..8b1bc182bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,6 +77,7 @@ rand = "0.8.5" bevy_console = "0.13" # rhai-rand = "0.1" ansi-parser = "0.9" +ladfile_builder = { path = "crates/ladfile_builder", version = "0.2.0" } [workspace] members = [ @@ -134,6 +135,11 @@ required-features = [ "bevy/multi_threaded", ] +[[example]] +name = "docgen" +path = "examples/docgen.rs" +required-features = [] + [workspace.lints.clippy] panic = "deny" unwrap_used = "deny" diff --git a/assets/scripts/bevy_api.lua b/assets/scripts/bevy_api.lua deleted file mode 100644 index 7cb343b34a..0000000000 --- a/assets/scripts/bevy_api.lua +++ /dev/null @@ -1,159 +0,0 @@ -function table_to_string(t) - local result = "[" - for k,v in pairs(t) do - result = result .. string.format("%s:%s,",k,v) - end - return result .. "]" -end - - -function on_event() - -- send exit event, to finish after one call - world.exit() - - print(entity) - print(script) - print(world) - - -- print(world.hello(entity, entity)) - -- print(world.test_vec({entity, entity})[1]) - - - local my_component_type = world.get_type_by_name("MyComponent") - print("MyComponent type: ", my_component_type:short_name()) - - local comp = world.get_component(entity, my_component_type) - print("Before script: ", comp:print_value()) - - print("\noption") - -- print(comp:get("option_usize")) - print(comp.option_usize) - comp.option_usize = 69 - print(comp.option_usize) - comp.option_usize = nil - print(comp.option_usize) - print("\nvec") - -- print(table_to_string(comp.vec_of_usize)) - comp.vec_of_usize = {42,69,72} - print(comp.vec_of_usize:print_value()) - comp.vec_of_usize[1] = 612312312 - print(comp.vec_of_usize:print_value()) - -- print(table_to_string(comp.vec_of_usize)) - -- comp.vec_of_usize[1] = 0 - -- print(comp.vec_of_usize[2]) - -- print(table_to_string(comp.vec_of_usize)) - -- comp.vec_of_usize = {} - -- print(table_to_string(comp.vec_of_usize)) - -- comp.vec_of_usize = comp.vec_of_usize2 - -- print(table_to_string(comp.vec_of_usize)) - -- comp.vec_of_usize = comp.vec_of_usize - -- print(table_to_string(comp.vec_of_usize)) - -- comp.vec_of_usize:insert(1, 42) - -- print(table_to_string(comp.vec_of_usize)) - - -- print("\nmap") - -- -- print(comp.map_of_strings["key"]) - -- comp.map_of_strings:insert("key2", "value") - -- -- print(comp.map_of_strings["key2"]) - - - - -- print("============") - - -- -- vec's and matrices have custom __index and __newindex overrides - -- print("comp.vec2 before: ", comp.vec2) - -- comp.vec2[1] = 69 - -- print("comp.vec2 after: ", comp.vec2) - - -- -- Option's get converted to nil or the value inside - -- print("comp.option_vec3 before: ", comp.option_vec3) - -- comp.option_vec3 = Vec3.new(2,1,3) - -- print("comp.option_vec3 after: ", comp.option_vec3) - - -- -- reflection via index is indexed starting at 1, unlike in Rust to match Lua's indexing - -- print("comp.option_vec3[1] before: ", comp.option_vec3[1]) - -- comp.option_vec3[1] = 5 - -- print("comp.option_vec3[1] after: ", comp.option_vec3[1]) - - -- print("============") - - -- -- Vec references get converted to a custom proxy `LuaVec` which is - -- -- also assignable via lua tables - - -- print("comp.vec_of_option_bools before: ", table_to_string(comp.vec_of_option_bools)) - -- comp.vec_of_option_bools = {true,false,true} - -- print("comp.vec_of_option_bools after assignment: ", table_to_string(comp.vec_of_option_bools)) - - -- print("comp.vec_of_option_bools[1] before: ", comp.vec_of_option_bools[1]) - -- comp.vec_of_option_bools[1] = false - -- print("comp.vec_of_option_bools[1] after: ", comp.vec_of_option_bools[1]) - - -- -- there are some additional methods available on LuaVec proxies imitating the Vec api - -- print("comp.vec_of_option_bools before insert: ", table_to_string(comp.vec_of_option_bools)) - -- comp.vec_of_option_bools:insert(1,nil) - -- print("comp.vec_of_option_bools after insert: ", table_to_string(comp.vec_of_option_bools)) - - - - -- print("comp.vec_of_option_bools before push: ", table_to_string(comp.vec_of_option_bools)) - -- comp.vec_of_option_bools:push(false) - -- print("comp.vec_of_option_bools after push: ", table_to_string(comp.vec_of_option_bools)) - - -- print("comp.vec_of_option_bools len after push: ", #comp.vec_of_option_bools) - - -- print("comp.vec_of_option_bools before pop: ", table_to_string(comp.vec_of_option_bools)) - -- print(comp.vec_of_option_bools:pop():print_value()) - -- print("comp.vec_of_option_bools after pop: ", table_to_string(comp.vec_of_option_bools)) - - -- print("the pairs inside comp.vec_of_option_bools: ") - -- for k,v in pairs(comp.vec_of_option_bools) do - -- print(string.format(" - %s:%s",k,v)) - -- end - - - -- comp.vec_of_option_bools:clear() - -- print("comp.vec_of_option_bools after clear: ", table_to_string(comp.vec_of_option_bools)) - -- print("comp.vec_of_option_bools len after clear: ", #comp.vec_of_option_bools) - - -- print("============") - - -- print(Vec3.new(0,1,0) + Vec3.new(1,0,0)) - -- print(Vec3.new(0,1,0):any_orthonormal_vector()) - -- print(comp.mat3[1]) - -- print(Vec3.new(0,1,0):any_orthonormal_vector() + comp.mat3[1]) - -- local complex_vec_op = Vec3.new(0,1,0):any_orthonormal_vector() + comp.mat3[1] - -- print("(0,1,0).any_orthonormal_vector() + mat3.x_axis is: ", complex_vec_op) - - -- local new_mat3 = Mat3.from_cols(Vec3.new(1,0,0),Vec3.new(0,1,0),Vec3.new(0,0,-1)) - -- print("new_mat3 is:", new_mat3) - - -- comp.vec2 = comp.vec2 + comp.vec2 - -- print("A") - -- comp.usize = comp.vec2:min_element() - - -- print("B") - -- comp.f32 = comp.f32 + comp.f32 + comp.vec2:min_element() - -- print("C") - -- comp.vec2 = Vec2.new(2,1) - -- print("D") - -- comp.quat = Quat.from_xyzw(3,2,1,4) - -- print("E") - -- comp.mat3[1] = Vec3.new(69,69,69) - -- print("F") - - - -- world.exit() - -- do return end - -- print("============") - - -- -- this is an example of something impossible to achieve with plain bevy reflection under the hood - -- comp.mat3[1][1] = 42 - - -- -- now let's retrieve these again to see if we actually changed their values permanently - -- comp = world.get_component(entity,my_component_type) - - -- print("After script:") - -- print(comp) - - -- world.exit() -end \ No newline at end of file diff --git a/assets/scripts/complex_game_loop.lua b/assets/scripts/complex_game_loop.lua deleted file mode 100644 index b5e1b880e4..0000000000 --- a/assets/scripts/complex_game_loop.lua +++ /dev/null @@ -1,17 +0,0 @@ - - -function on_pre_physics(id) - print("on_pre_physics, Handling:") - print(string.format("\t-> id: %d",id)) -end - -function on_post_physics(id) - print("on_post_physics, Handling:") - print(string.format("\t-> id: %d",id)) -end - - -function on_post_update(id) - print("on_post_update, Handling:") - print(string.format("\t-> id: %d",id)) -end diff --git a/assets/scripts/console_integration.lua b/assets/scripts/console_integration.lua deleted file mode 100644 index 2c6527c5c8..0000000000 --- a/assets/scripts/console_integration.lua +++ /dev/null @@ -1,12 +0,0 @@ -local a = 0 - -function on_update() - - if a % 100 == 0 then - -- print_to_console() is defined in console_integration.rs - -- by the api provider - print_to_console(string.format("%d, entity index:%d", a, entity:index())) - end - - a = a + 1 -end \ No newline at end of file diff --git a/assets/scripts/console_integration.rhai b/assets/scripts/console_integration.rhai deleted file mode 100644 index 04fcf60c6d..0000000000 --- a/assets/scripts/console_integration.rhai +++ /dev/null @@ -1,13 +0,0 @@ - -fn on_update(){ - - if !("a" in state){ - state.a = 0; - } - - if (state.a % 100) == 0 { - print_to_console(world,`${state.a}, entity:${ entity_id(entity)}`); - } - - state.a = state.a + 1; -} \ No newline at end of file diff --git a/assets/scripts/coroutines.lua b/assets/scripts/coroutines.lua deleted file mode 100644 index 728dd03daf..0000000000 --- a/assets/scripts/coroutines.lua +++ /dev/null @@ -1,23 +0,0 @@ -local my_routine; - -function on_update() - if my_routine == nil then - my_routine = coroutine.create(function() - local starttime = os.time() - local endtime = starttime + 5 - while os.time() < endtime do - print(os.date("waiting %H:%M:%S", os.time())) - coroutine.yield() - end - - print(os.date("finished! %H:%M:%S", os.time())) - end) - else - if coroutine.status(my_routine) ~= "dead" then - coroutine.resume(my_routine) - else - print("Couroutine has finished, no longer running") - world.exit() - end - end -end diff --git a/assets/scripts/dynamic_queries.lua b/assets/scripts/dynamic_queries.lua deleted file mode 100644 index a12c8e4a5e..0000000000 --- a/assets/scripts/dynamic_queries.lua +++ /dev/null @@ -1,23 +0,0 @@ -local component_a = world.get_type_by_name("ComponentA") -local component_b = world.get_type_by_name("ComponentB") -local component_c = world.get_type_by_name("ComponentC") - -print("Querying for entities with component_a and without component_c") -for entity, c in world.query(component_a):without(component_c):iter() do - print("Entity with index: " .. entity:index() .. " component: " .. tostring(c)) -end - -print("Querying for entities with component_b and without component_a") -for entity, c in world.query(component_b):without(component_a):iter() do - print("Entity with index: " .. entity:index() .. " component: " .. tostring(c)) -end - -print("Querying for all components at once") -for entity, c1,c2,c3 in world.query(component_a, component_b, component_c):iter() do - print("Entity with index: " .. entity:index()) - print("\tComponentA: " .. tostring(c1)) - print("\tComponentB: " .. tostring(c2)) - print("\tComponentC: " .. tostring(c3)) -end - -world.exit() \ No newline at end of file diff --git a/assets/scripts/dynamic_queries.rhai b/assets/scripts/dynamic_queries.rhai deleted file mode 100644 index 73701d7b05..0000000000 --- a/assets/scripts/dynamic_queries.rhai +++ /dev/null @@ -1,11 +0,0 @@ -fn on_event() { - let component_a = world.get_type_by_name("ComponentA"); - let component_b = world.get_type_by_name("ComponentB"); - let component_c = world.get_type_by_name("ComponentC"); - - // Use with_components/without_components, as the word `with` is - // reserved in rhai - for results in world.query([component_a]).with_components([component_b]).without_components([component_c]) { - print(results.Entity); - } -} diff --git a/assets/scripts/event_recipients.lua b/assets/scripts/event_recipients.lua deleted file mode 100644 index b846a742ae..0000000000 --- a/assets/scripts/event_recipients.lua +++ /dev/null @@ -1,6 +0,0 @@ -function on_event(id) - print(string.format("on_event, script_id: %s, Handling:", script_id)) - print(string.format("\t-> id : %d", id)) - print(string.format("\t-> entity : %s", entity)) - -end diff --git a/assets/scripts/event_recipients.rune b/assets/scripts/event_recipients.rune deleted file mode 100644 index e3b58056e5..0000000000 --- a/assets/scripts/event_recipients.rune +++ /dev/null @@ -1,3 +0,0 @@ -pub fn on_event(id) { - info(`id: ${id}`); -} diff --git a/assets/scripts/minimal.rune b/assets/scripts/minimal.rune deleted file mode 100644 index 4b905ac493..0000000000 --- a/assets/scripts/minimal.rune +++ /dev/null @@ -1,3 +0,0 @@ -pub fn on_event() { - print_fancy("Hello, World!"); -} diff --git a/assets/scripts/multiple_events_rhai.rhai b/assets/scripts/multiple_events_rhai.rhai deleted file mode 100644 index bc7c6680ac..0000000000 --- a/assets/scripts/multiple_events_rhai.rhai +++ /dev/null @@ -1,16 +0,0 @@ -fn on_init(name) { - print(`Hello World! From "${name}" in Init`); - - let parent = world.get_parent(entity); - if parent == () { - print(`Parent doesn't exist`); - } else { - print(`Parent exists`); - } -} - -fn on_update(name, delta) { - print(`Hello World! From "${name}" in Update: ${delta}`); - - world.despawn_recursive(entity); -} \ No newline at end of file diff --git a/assets/scripts/runtime_error.lua b/assets/scripts/runtime_error.lua deleted file mode 100644 index 2fc595710a..0000000000 --- a/assets/scripts/runtime_error.lua +++ /dev/null @@ -1,3 +0,0 @@ -function on_update() - print(string.format("%d","a")) -end \ No newline at end of file diff --git a/crates/bevy_mod_scripting_core/Cargo.toml b/crates/bevy_mod_scripting_core/Cargo.toml index c36561d628..7545c82b8c 100644 --- a/crates/bevy_mod_scripting_core/Cargo.toml +++ b/crates/bevy_mod_scripting_core/Cargo.toml @@ -44,7 +44,6 @@ derivative = "2.2" profiling = { workspace = true } bevy_mod_scripting_derive = { workspace = true } - [dev-dependencies] test_utils = { workspace = true } tokio = { version = "1", features = ["rt", "macros"] } diff --git a/crates/bevy_mod_scripting_core/src/docgen/mod.rs b/crates/bevy_mod_scripting_core/src/docgen/mod.rs index e74e969692..1918070cdb 100644 --- a/crates/bevy_mod_scripting_core/src/docgen/mod.rs +++ b/crates/bevy_mod_scripting_core/src/docgen/mod.rs @@ -1,3 +1,4 @@ //! Documentation generation for scripting languages. + pub mod info; pub mod typed_through; diff --git a/crates/ladfile_builder/Cargo.toml b/crates/ladfile_builder/Cargo.toml index 5d77b2ad0b..f72d45a8bc 100644 --- a/crates/ladfile_builder/Cargo.toml +++ b/crates/ladfile_builder/Cargo.toml @@ -15,6 +15,7 @@ readme = "readme.md" [dependencies] bevy_mod_scripting_core = { workspace = true } # I don't think bevy has a top level feature for this :C +bevy = { workspace = true } bevy_reflect = { version = "0.15.2", features = ["documentation"] } ladfile = { version = "0.2.0", path = "../ladfile" } regex = "1.11" diff --git a/crates/ladfile_builder/src/lib.rs b/crates/ladfile_builder/src/lib.rs index 39c4f3f18b..6cffd6967d 100644 --- a/crates/ladfile_builder/src/lib.rs +++ b/crates/ladfile_builder/src/lib.rs @@ -1,4 +1,5 @@ //! Parsing definitions for the LAD (Language Agnostic Decleration) file format. +pub mod plugin; use bevy_mod_scripting_core::{ bindings::{ diff --git a/crates/ladfile_builder/src/plugin.rs b/crates/ladfile_builder/src/plugin.rs new file mode 100644 index 0000000000..3590f90627 --- /dev/null +++ b/crates/ladfile_builder/src/plugin.rs @@ -0,0 +1,114 @@ +//! Plugins for bevy which allow generating ladfiles at startup + +use std::path::PathBuf; + +use bevy::{ + app::{App, Plugin, Startup}, + ecs::{ + reflect::AppTypeRegistry, + system::{Res, Resource}, + }, +}; +use bevy_mod_scripting_core::bindings::function::{ + namespace::Namespace, script_function::AppScriptFunctionRegistry, +}; + +use crate::LadFileBuilder; + +/// Plugin which enables the generation of LAD files at runtime for the purposes of creating documentation and other goodies. +/// +/// When added, will automatically generate a LAD file on the Startup schedule +pub struct ScriptingDocgenPlugin(LadFileSettings); + +#[derive(Resource, Clone)] +/// Stores the settings for the generated Ladfile +pub struct LadFileSettings { + /// The path at which to generate the LAD file. If relative, will be relative from the assets directory + /// The extension should be `json.lad` + /// + /// By default this will be `assets/bindings.lad.json` + pub path: PathBuf, + /// The description to use for the LAD file, by default it's empty + pub description: &'static str, + + /// Whether to pretty print the output JSON. By default this is true (slay) + pub pretty: bool, +} + +impl Default for ScriptingDocgenPlugin { + fn default() -> Self { + Self(LadFileSettings { + path: PathBuf::from("bindings.lad.json"), + description: "", + pretty: true, + }) + } +} + +impl ScriptingDocgenPlugin { + /// Create a new instance of the plugin with the given path + pub fn new(path: PathBuf, description: &'static str, pretty: bool) -> Self { + Self(LadFileSettings { + path, + description, + pretty, + }) + } +} + +fn generate_lad_file( + type_registry: Res, + function_registry: Res, + settings: Res, +) { + let type_registry = type_registry.read(); + let function_registry = function_registry.read(); + let mut builder = LadFileBuilder::new(&type_registry); + builder + .set_description(settings.description) + .set_sorted(true); + + // first of all, iterate over all the types and register them + for registration in type_registry.iter() { + let type_info = registration.type_info(); + builder.add_type_info(type_info); + + // find functions on the namespace + for (_, function) in + function_registry.iter_namespace(Namespace::OnType(type_info.type_id())) + { + builder.add_function_info(function.info.clone()); + } + } + + let file = builder.build(); + + let mut path = PathBuf::from("assets"); + path.push(settings.path.clone()); + + // generate + let file = match ladfile::serialize_lad_file(&file, settings.pretty) { + Ok(file) => file, + Err(e) => { + bevy::log::error!("Error serializing LAD file: {}", e); + return; + } + }; + + // save + match std::fs::write(&path, file) { + Ok(_) => { + bevy::log::info!("Successfully generated LAD file at {:?}", path); + } + Err(e) => { + bevy::log::error!("Error saving LAD file to {:?}: {}", path, e); + } + } +} + +impl Plugin for ScriptingDocgenPlugin { + fn build(&self, app: &mut App) { + app.insert_resource(self.0.clone()); + app.add_systems(Startup, generate_lad_file); + } +} diff --git a/crates/xtask/src/main.rs b/crates/xtask/src/main.rs index 759b4307a9..bfcd94aba7 100644 --- a/crates/xtask/src/main.rs +++ b/crates/xtask/src/main.rs @@ -202,6 +202,35 @@ impl From for Features { } } +/// Enumerates the binaries available in the project and their paths +#[derive( + Debug, + Clone, + PartialEq, + Eq, + PartialOrd, + Ord, + strum::EnumString, + strum::AsRefStr, + strum::VariantNames, +)] +#[strum(serialize_all = "snake_case")] +enum Binary { + MdbookPreprocessor, +} + +impl Binary { + pub fn path(self) -> PathBuf { + PathBuf::from(match self { + Binary::MdbookPreprocessor => "./crates/lad_backends/mdbook_lad_preprocessor/", + }) + } + + pub fn to_placeholder() -> clap::builder::Str { + format!("[{}]", Binary::VARIANTS.join("|")).into() + } +} + #[derive( Debug, Clone, @@ -306,6 +335,12 @@ impl App { .arg("--bevy-features") .arg(bevy_features.join(",")); } + Xtasks::Example { example } => { + cmd.arg("example").arg(example); + } + Xtasks::Install { binary } => { + cmd.arg("install").arg(binary.as_ref()); + } } cmd @@ -507,6 +542,20 @@ enum Xtasks { )] kind: CheckKind, }, + /// Run the example with the given name + Example { + /// The example to run + example: String, + }, + /// Installs a binary produced by the workspace + Install { + /// The binary to install + #[clap( + value_parser=clap::value_parser!(Binary), + value_name=Binary::to_placeholder(), + )] + binary: Binary, + }, /// Build the rust crates.io docs as well as any other docs Docs { /// Open in browser @@ -584,6 +633,7 @@ impl Xtasks { Xtasks::Test { name, package } => Self::test(app_settings, package, name), Xtasks::CiCheck => Self::cicd(app_settings), Xtasks::Init => Self::init(app_settings), + Xtasks::Example { example } => Self::example(app_settings, example), Xtasks::Macros { macro_name } => match macro_name { Macro::ScriptTests => { let mut settings = app_settings.clone(); @@ -628,6 +678,7 @@ impl Xtasks { output_dir, bevy_features, } => Self::codegen(app_settings, output_dir, bevy_features), + Xtasks::Install { binary } => Self::install(app_settings, binary), }?; Ok("".into()) @@ -731,7 +782,8 @@ impl Xtasks { args.push(command.to_owned()); - if command != "fmt" && command != "bevy-api-gen" { + if command != "fmt" && command != "bevy-api-gen" && command != "run" && command != "install" + { // fmt doesn't care about features, workspaces or profiles args.push("--workspace".to_owned()); @@ -1038,6 +1090,23 @@ impl Xtasks { fn docs(mut app_settings: GlobalArgs, open: bool, no_rust_docs: bool) -> Result<()> { // find [package.metadata."docs.rs"] key in Cargo.toml if !no_rust_docs { + info!("installing mdbook ladfile preprocessor binary"); + Self::install(app_settings.clone(), Binary::MdbookPreprocessor)?; + + info!("Running docgen example to generate ladfiles"); + Self::example(app_settings.clone(), "docgen".to_owned())?; + + // copy the `/assets/bindings.lad.json` file to it's path in the book + let ladfile_path = + Self::relative_workspace_dir(&app_settings, "assets/bindings.lad.json")?; + let destination_path = + Self::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())?; + std::fs::copy(ladfile_path, destination_path) + .with_context(|| "copying generated ladfile")?; + info!("Building rust docs"); let metadata = Self::main_workspace_cargo_metadata()?; @@ -1405,6 +1474,44 @@ impl Xtasks { warn!("Could not merge json, overrides and target are not objects"); } } + + fn example(app_settings: GlobalArgs, example: String) -> std::result::Result<(), Error> { + // find the required features for the example named this in the cargo.toml of the main workspace + // the keys look like + // [[example]] + // name = "docgen" + // path = "examples/docgen.rs" + // required-features = [] + + // let metadata = Self::main_workspace_cargo_metadata()?; + // let metadata = &metadata.root_package().unwrap().targets; + // println!("{metadata:#?}"); + + // run the example + Self::run_workspace_command( + &app_settings, + "run", + "Failed to run example", + vec!["--example", example.as_str()], + None, + )?; + + Ok(()) + } + + 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( + &app_settings, + "cargo", + "Failed to install binary", + vec!["install", "--path", binary_path.to_str().unwrap()], + None, + )?; + + Ok(()) + } } /// Because we are likely already runnnig in the context of a cargo invocation, diff --git a/docs/book.toml b/docs/book.toml index dd964e129a..bace71420b 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -10,3 +10,5 @@ description = "Documentation for the Bevy Scripting library" additional-js = ["multi-code-block.js"] git-repository-url = "https://github.com/makspll/bevy_mod_scripting" edit-url-template = "https://github.com/makspll/bevy_mod_scripting/edit/main/docs/{path}" + +[preprocessor.lad-preprocessor] diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 23f2f54492..809cbea631 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -23,6 +23,7 @@ - [ScriptQueryBuilder](./ScriptingReference/script-query-builder.md) - [ScriptQueryResult](./ScriptingReference/script-query-result.md) - [Core Callbacks](./ScriptingReference/core-callbacks.md) +- [:construction: Generated Docs](./ladfiles/bindings.lad.json) # Developing BMS diff --git a/docs/src/ladfiles/bindings.lad.json b/docs/src/ladfiles/bindings.lad.json new file mode 100644 index 0000000000..47ddd139e2 --- /dev/null +++ b/docs/src/ladfiles/bindings.lad.json @@ -0,0 +1,71948 @@ +{ + "version": "0.2.0", + "globals": {}, + "types": { + "()": { + "identifier": "", + "path": "()", + "layout": null + }, + "FunctionCallContext": { + "identifier": "FunctionCallContext", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::function::script_function::FunctionCallContext", + "documentation": " The caller context when calling a script function.\n Functions can choose to react to caller preferences such as converting 1-indexed numbers to 0-indexed numbers", + "layout": null + }, + "ReflectReference": { + "identifier": "ReflectReference", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::reference::ReflectReference", + "documentation": " An accessor to a `dyn PartialReflect` struct, stores a base ID of the type and a reflection path\n safe to build but to reflect on the value inside you need to ensure aliasing rules are upheld", + "associated_functions": [ + "ReflectReference::clear", + "ReflectReference::display_ref", + "ReflectReference::display_value", + "ReflectReference::functions", + "ReflectReference::get", + "ReflectReference::insert", + "ReflectReference::iter", + "ReflectReference::len", + "ReflectReference::pop", + "ReflectReference::push", + "ReflectReference::remove", + "ReflectReference::set" + ], + "layout": { + "kind": "Struct", + "name": "ReflectReference" + } + }, + "String": { + "identifier": "String", + "crate": "alloc", + "path": "alloc::string::String", + "layout": null + }, + "[[f32; 2]; 2]": { + "identifier": "", + "path": "[[f32; 2]; 2]", + "layout": null + }, + "[[f32; 2]; 3]": { + "identifier": "", + "path": "[[f32; 2]; 3]", + "layout": null + }, + "[[f32; 3]; 3]": { + "identifier": "", + "path": "[[f32; 3]; 3]", + "layout": null + }, + "[[f32; 3]; 4]": { + "identifier": "", + "path": "[[f32; 3]; 4]", + "layout": null + }, + "[[f32; 4]; 4]": { + "identifier": "", + "path": "[[f32; 4]; 4]", + "layout": null + }, + "[[f64; 2]; 2]": { + "identifier": "", + "path": "[[f64; 2]; 2]", + "layout": null + }, + "[[f64; 2]; 3]": { + "identifier": "", + "path": "[[f64; 2]; 3]", + "layout": null + }, + "[[f64; 3]; 3]": { + "identifier": "", + "path": "[[f64; 3]; 3]", + "layout": null + }, + "[[f64; 3]; 4]": { + "identifier": "", + "path": "[[f64; 3]; 4]", + "layout": null + }, + "[[f64; 4]; 4]": { + "identifier": "", + "path": "[[f64; 4]; 4]", + "layout": null + }, + "[bool; 2]": { + "identifier": "", + "path": "[bool; 2]", + "layout": null + }, + "[bool; 3]": { + "identifier": "", + "path": "[bool; 3]", + "layout": null + }, + "[bool; 4]": { + "identifier": "", + "path": "[bool; 4]", + "layout": null + }, + "[f32; 12]": { + "identifier": "", + "path": "[f32; 12]", + "layout": null + }, + "[f32; 16]": { + "identifier": "", + "path": "[f32; 16]", + "layout": null + }, + "[f32; 2]": { + "identifier": "", + "path": "[f32; 2]", + "layout": null + }, + "[f32; 3]": { + "identifier": "", + "path": "[f32; 3]", + "layout": null + }, + "[f32; 4]": { + "identifier": "", + "path": "[f32; 4]", + "layout": null + }, + "[f32; 6]": { + "identifier": "", + "path": "[f32; 6]", + "layout": null + }, + "[f32; 9]": { + "identifier": "", + "path": "[f32; 9]", + "layout": null + }, + "[f64; 12]": { + "identifier": "", + "path": "[f64; 12]", + "layout": null + }, + "[f64; 16]": { + "identifier": "", + "path": "[f64; 16]", + "layout": null + }, + "[f64; 2]": { + "identifier": "", + "path": "[f64; 2]", + "layout": null + }, + "[f64; 3]": { + "identifier": "", + "path": "[f64; 3]", + "layout": null + }, + "[f64; 4]": { + "identifier": "", + "path": "[f64; 4]", + "layout": null + }, + "[f64; 6]": { + "identifier": "", + "path": "[f64; 6]", + "layout": null + }, + "[f64; 9]": { + "identifier": "", + "path": "[f64; 9]", + "layout": null + }, + "[glam::Vec2; 3]": { + "identifier": "", + "path": "[glam::Vec2; 3]", + "layout": null + }, + "[glam::Vec3; 3]": { + "identifier": "", + "path": "[glam::Vec3; 3]", + "layout": null + }, + "[glam::Vec3; 4]": { + "identifier": "", + "path": "[glam::Vec3; 4]", + "layout": null + }, + "[i32; 2]": { + "identifier": "", + "path": "[i32; 2]", + "layout": null + }, + "[i32; 3]": { + "identifier": "", + "path": "[i32; 3]", + "layout": null + }, + "[i32; 4]": { + "identifier": "", + "path": "[i32; 4]", + "layout": null + }, + "[i64; 2]": { + "identifier": "", + "path": "[i64; 2]", + "layout": null + }, + "[i64; 3]": { + "identifier": "", + "path": "[i64; 3]", + "layout": null + }, + "[i64; 4]": { + "identifier": "", + "path": "[i64; 4]", + "layout": null + }, + "[u32; 2]": { + "identifier": "", + "path": "[u32; 2]", + "layout": null + }, + "[u32; 3]": { + "identifier": "", + "path": "[u32; 3]", + "layout": null + }, + "[u32; 4]": { + "identifier": "", + "path": "[u32; 4]", + "layout": null + }, + "[u64; 2]": { + "identifier": "", + "path": "[u64; 2]", + "layout": null + }, + "[u64; 3]": { + "identifier": "", + "path": "[u64; 3]", + "layout": null + }, + "[u64; 4]": { + "identifier": "", + "path": "[u64; 4]", + "layout": null + }, + "[u8; 16]": { + "identifier": "", + "path": "[u8; 16]", + "layout": null + }, + "[u8; 45]": { + "identifier": "", + "path": "[u8; 45]", + "layout": null + }, + "[u8; 6]": { + "identifier": "", + "path": "[u8; 6]", + "layout": null + }, + "alloc::borrow::Cow": { + "identifier": "Cow", + "crate": "alloc", + "path": "alloc::borrow::Cow", + "layout": null + }, + "alloc::sync::Arc": { + "identifier": "Arc", + "crate": "alloc", + "path": "alloc::sync::Arc", + "layout": null + }, + "alloc::vec::Vec>": { + "identifier": "Vec", + "crate": "alloc", + "path": "alloc::vec::Vec>", + "generics": [ + { + "type_id": "bevy_mod_scripting_core::bindings::function::from::Val", + "name": "T" + } + ], + "layout": null + }, + "alloc::vec::Vec>": { + "identifier": "Vec", + "crate": "alloc", + "path": "alloc::vec::Vec>", + "generics": [ + { + "type_id": "bevy_mod_scripting_core::bindings::function::from::Val", + "name": "T" + } + ], + "layout": null + }, + "alloc::vec::Vec>": { + "identifier": "Vec", + "crate": "alloc", + "path": "alloc::vec::Vec>", + "generics": [ + { + "type_id": "bevy_mod_scripting_core::bindings::function::from::Val", + "name": "T" + } + ], + "layout": null + }, + "alloc::vec::Vec": { + "identifier": "Vec", + "crate": "alloc", + "path": "alloc::vec::Vec", + "generics": [ + { + "type_id": "ReflectReference", + "name": "T" + } + ], + "layout": null + }, + "alloc::vec::Vec": { + "identifier": "Vec", + "crate": "alloc", + "path": "alloc::vec::Vec", + "generics": [ + { + "type_id": "bevy_mod_scripting_core::docgen::info::FunctionArgInfo", + "name": "T" + } + ], + "layout": null + }, + "bevy_asset::assets::AssetIndex": { + "identifier": "AssetIndex", + "crate": "bevy_asset", + "path": "bevy_asset::assets::AssetIndex", + "documentation": " A generational runtime-only identifier for a specific [`Asset`] stored in [`Assets`]. This is optimized for efficient runtime\n usage and is not suitable for identifying assets across app runs.", + "layout": { + "kind": "Struct", + "name": "AssetIndex", + "fields": [ + { + "name": "generation", + "type": "u32" + }, + { + "name": "index", + "type": "u32" + } + ] + } + }, + "bevy_asset::handle::Handle<()>": { + "identifier": "Handle", + "crate": "bevy_asset", + "path": "bevy_asset::handle::Handle<()>", + "generics": [ + { + "type_id": "()", + "name": "A" + } + ], + "documentation": " A strong or weak handle to a specific [`Asset`]. If a [`Handle`] is [`Handle::Strong`], the [`Asset`] will be kept\n alive until the [`Handle`] is dropped. If a [`Handle`] is [`Handle::Weak`], it does not necessarily reference a live [`Asset`],\n nor will it keep assets alive.\n\n [`Handle`] can be cloned. If a [`Handle::Strong`] is cloned, the referenced [`Asset`] will not be freed until _all_ instances\n of the [`Handle`] are dropped.\n\n [`Handle::Strong`] also provides access to useful [`Asset`] metadata, such as the [`AssetPath`] (if it exists).", + "layout": [ + { + "kind": "TupleStruct", + "name": "Strong", + "fields": [ + { + "type": "alloc::sync::Arc" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Weak", + "fields": [ + { + "type": "bevy_asset::id::AssetId<()>" + } + ] + } + ] + }, + "bevy_asset::handle::Handle": { + "identifier": "Handle", + "crate": "bevy_asset", + "path": "bevy_asset::handle::Handle", + "generics": [ + { + "type_id": "TypeId(0xaab38a889af3127605b1e6168583131a)", + "name": "A" + } + ], + "documentation": " A strong or weak handle to a specific [`Asset`]. If a [`Handle`] is [`Handle::Strong`], the [`Asset`] will be kept\n alive until the [`Handle`] is dropped. If a [`Handle`] is [`Handle::Weak`], it does not necessarily reference a live [`Asset`],\n nor will it keep assets alive.\n\n [`Handle`] can be cloned. If a [`Handle::Strong`] is cloned, the referenced [`Asset`] will not be freed until _all_ instances\n of the [`Handle`] are dropped.\n\n [`Handle::Strong`] also provides access to useful [`Asset`] metadata, such as the [`AssetPath`] (if it exists).", + "layout": [ + { + "kind": "TupleStruct", + "name": "Strong", + "fields": [ + { + "type": "alloc::sync::Arc" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Weak", + "fields": [ + { + "type": "bevy_asset::id::AssetId" + } + ] + } + ] + }, + "bevy_asset::handle::Handle": { + "identifier": "Handle", + "crate": "bevy_asset", + "path": "bevy_asset::handle::Handle", + "generics": [ + { + "type_id": "TypeId(0xbae6a1edf252d17a1d593e8aa22f9741)", + "name": "A" + } + ], + "documentation": " A strong or weak handle to a specific [`Asset`]. If a [`Handle`] is [`Handle::Strong`], the [`Asset`] will be kept\n alive until the [`Handle`] is dropped. If a [`Handle`] is [`Handle::Weak`], it does not necessarily reference a live [`Asset`],\n nor will it keep assets alive.\n\n [`Handle`] can be cloned. If a [`Handle::Strong`] is cloned, the referenced [`Asset`] will not be freed until _all_ instances\n of the [`Handle`] are dropped.\n\n [`Handle::Strong`] also provides access to useful [`Asset`] metadata, such as the [`AssetPath`] (if it exists).", + "layout": [ + { + "kind": "TupleStruct", + "name": "Strong", + "fields": [ + { + "type": "alloc::sync::Arc" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Weak", + "fields": [ + { + "type": "bevy_asset::id::AssetId" + } + ] + } + ] + }, + "bevy_asset::id::AssetId<()>": { + "identifier": "AssetId", + "crate": "bevy_asset", + "path": "bevy_asset::id::AssetId<()>", + "generics": [ + { + "type_id": "()", + "name": "A" + } + ], + "documentation": " A unique runtime-only identifier for an [`Asset`]. This is cheap to [`Copy`]/[`Clone`] and is not directly tied to the\n lifetime of the Asset. This means it _can_ point to an [`Asset`] that no longer exists.\n\n For an identifier tied to the lifetime of an asset, see [`Handle`](`crate::Handle`).\n\n For an \"untyped\" / \"generic-less\" id, see [`UntypedAssetId`].", + "layout": [ + { + "kind": "Struct", + "name": "Index", + "fields": [ + { + "name": "index", + "type": "bevy_asset::assets::AssetIndex" + } + ] + }, + { + "kind": "Struct", + "name": "Uuid", + "fields": [ + { + "name": "uuid", + "type": "uuid::Uuid" + } + ] + } + ] + }, + "bevy_asset::id::AssetId": { + "identifier": "AssetId", + "crate": "bevy_asset", + "path": "bevy_asset::id::AssetId", + "generics": [ + { + "type_id": "TypeId(0xaab38a889af3127605b1e6168583131a)", + "name": "A" + } + ], + "documentation": " A unique runtime-only identifier for an [`Asset`]. This is cheap to [`Copy`]/[`Clone`] and is not directly tied to the\n lifetime of the Asset. This means it _can_ point to an [`Asset`] that no longer exists.\n\n For an identifier tied to the lifetime of an asset, see [`Handle`](`crate::Handle`).\n\n For an \"untyped\" / \"generic-less\" id, see [`UntypedAssetId`].", + "layout": [ + { + "kind": "Struct", + "name": "Index", + "fields": [ + { + "name": "index", + "type": "bevy_asset::assets::AssetIndex" + } + ] + }, + { + "kind": "Struct", + "name": "Uuid", + "fields": [ + { + "name": "uuid", + "type": "uuid::Uuid" + } + ] + } + ] + }, + "bevy_asset::id::AssetId": { + "identifier": "AssetId", + "crate": "bevy_asset", + "path": "bevy_asset::id::AssetId", + "generics": [ + { + "type_id": "TypeId(0xbae6a1edf252d17a1d593e8aa22f9741)", + "name": "A" + } + ], + "documentation": " A unique runtime-only identifier for an [`Asset`]. This is cheap to [`Copy`]/[`Clone`] and is not directly tied to the\n lifetime of the Asset. This means it _can_ point to an [`Asset`] that no longer exists.\n\n For an identifier tied to the lifetime of an asset, see [`Handle`](`crate::Handle`).\n\n For an \"untyped\" / \"generic-less\" id, see [`UntypedAssetId`].", + "layout": [ + { + "kind": "Struct", + "name": "Index", + "fields": [ + { + "name": "index", + "type": "bevy_asset::assets::AssetIndex" + } + ] + }, + { + "kind": "Struct", + "name": "Uuid", + "fields": [ + { + "name": "uuid", + "type": "uuid::Uuid" + } + ] + } + ] + }, + "bevy_asset::path::AssetPath": { + "identifier": "AssetPath", + "crate": "bevy_asset", + "path": "bevy_asset::path::AssetPath", + "documentation": " Represents a path to an asset in a \"virtual filesystem\".\n\n Asset paths consist of three main parts:\n * [`AssetPath::source`]: The name of the [`AssetSource`](crate::io::AssetSource) to load the asset from.\n This is optional. If one is not set the default source will be used (which is the `assets` folder by default).\n * [`AssetPath::path`]: The \"virtual filesystem path\" pointing to an asset source file.\n * [`AssetPath::label`]: An optional \"named sub asset\". When assets are loaded, they are\n allowed to load \"sub assets\" of any type, which are identified by a named \"label\".\n\n Asset paths are generally constructed (and visualized) as strings:\n\n ```no_run\n # use bevy_asset::{Asset, AssetServer, Handle};\n # use bevy_reflect::TypePath;\n #\n # #[derive(Asset, TypePath, Default)]\n # struct Mesh;\n #\n # #[derive(Asset, TypePath, Default)]\n # struct Scene;\n #\n # let asset_server: AssetServer = panic!();\n // This loads the `my_scene.scn` base asset from the default asset source.\n let scene: Handle = asset_server.load(\"my_scene.scn\");\n\n // This loads the `PlayerMesh` labeled asset from the `my_scene.scn` base asset in the default asset source.\n let mesh: Handle = asset_server.load(\"my_scene.scn#PlayerMesh\");\n\n // This loads the `my_scene.scn` base asset from a custom 'remote' asset source.\n let scene: Handle = asset_server.load(\"remote://my_scene.scn\");\n ```\n\n [`AssetPath`] implements [`From`] for `&'static str`, `&'static Path`, and `&'a String`,\n which allows us to optimize the static cases.\n This means that the common case of `asset_server.load(\"my_scene.scn\")` when it creates and\n clones internal owned [`AssetPaths`](AssetPath).\n This also means that you should use [`AssetPath::parse`] in cases where `&str` is the explicit type.", + "layout": null + }, + "bevy_core::name::Name": { + "identifier": "Name", + "crate": "bevy_core", + "path": "bevy_core::name::Name", + "documentation": " Component used to identify an entity. Stores a hash for faster comparisons.\n\n The hash is eagerly re-computed upon each update to the name.\n\n [`Name`] should not be treated as a globally unique identifier for entities,\n as multiple entities can have the same name. [`Entity`] should be\n used instead as the default unique identifier.", + "associated_functions": [ + "bevy_core::name::Name::clone", + "bevy_core::name::Name::eq" + ], + "layout": { + "kind": "Struct", + "name": "Name", + "fields": [ + { + "name": "hash", + "type": "u64" + }, + { + "name": "name", + "type": "alloc::borrow::Cow" + } + ] + } + }, + "bevy_ecs::component::ComponentId": { + "identifier": "ComponentId", + "crate": "bevy_ecs", + "path": "bevy_ecs::component::ComponentId", + "documentation": " A value which uniquely identifies the type of a [`Component`] or [`Resource`] within a\n [`World`].\n\n Each time a new `Component` type is registered within a `World` using\n e.g. [`World::register_component`] or [`World::register_component_with_descriptor`]\n or a Resource with e.g. [`World::init_resource`],\n a corresponding `ComponentId` is created to track it.\n\n While the distinction between `ComponentId` and [`TypeId`] may seem superficial, breaking them\n into two separate but related concepts allows components to exist outside of Rust's type system.\n Each Rust type registered as a `Component` will have a corresponding `ComponentId`, but additional\n `ComponentId`s may exist in a `World` to track components which cannot be\n represented as Rust types for scripting or other advanced use-cases.\n\n A `ComponentId` is tightly coupled to its parent `World`. Attempting to use a `ComponentId` from\n one `World` to access the metadata of a `Component` in a different `World` is undefined behavior\n and must not be attempted.\n\n Given a type `T` which implements [`Component`], the `ComponentId` for `T` can be retrieved\n from a `World` using [`World::component_id()`] or via [`Components::component_id()`]. Access\n to the `ComponentId` for a [`Resource`] is available via [`Components::resource_id()`].", + "associated_functions": [ + "bevy_ecs::component::ComponentId::assert_receiver_is_total_eq", + "bevy_ecs::component::ComponentId::clone", + "bevy_ecs::component::ComponentId::eq", + "bevy_ecs::component::ComponentId::index", + "bevy_ecs::component::ComponentId::new" + ], + "layout": { + "kind": "TupleStruct", + "name": "ComponentId", + "fields": [ + { + "type": "usize" + } + ] + } + }, + "bevy_ecs::component::ComponentTicks": { + "identifier": "ComponentTicks", + "crate": "bevy_ecs", + "path": "bevy_ecs::component::ComponentTicks", + "documentation": " Records when a component or resource was added and when it was last mutably dereferenced (or added).", + "associated_functions": [ + "bevy_ecs::component::ComponentTicks::clone", + "bevy_ecs::component::ComponentTicks::is_added", + "bevy_ecs::component::ComponentTicks::is_changed", + "bevy_ecs::component::ComponentTicks::new", + "bevy_ecs::component::ComponentTicks::set_changed" + ], + "layout": { + "kind": "Struct", + "name": "ComponentTicks", + "fields": [ + { + "name": "added", + "type": "bevy_ecs::component::Tick" + }, + { + "name": "changed", + "type": "bevy_ecs::component::Tick" + } + ] + } + }, + "bevy_ecs::component::Tick": { + "identifier": "Tick", + "crate": "bevy_ecs", + "path": "bevy_ecs::component::Tick", + "documentation": " A value that tracks when a system ran relative to other systems.\n This is used to power change detection.\n\n *Note* that a system that hasn't been run yet has a `Tick` of 0.", + "associated_functions": [ + "bevy_ecs::component::Tick::assert_receiver_is_total_eq", + "bevy_ecs::component::Tick::clone", + "bevy_ecs::component::Tick::eq", + "bevy_ecs::component::Tick::get", + "bevy_ecs::component::Tick::is_newer_than", + "bevy_ecs::component::Tick::new", + "bevy_ecs::component::Tick::set" + ], + "layout": { + "kind": "Struct", + "name": "Tick", + "fields": [ + { + "name": "tick", + "type": "u32" + } + ] + } + }, + "bevy_ecs::entity::Entity": { + "identifier": "Entity", + "crate": "bevy_ecs", + "path": "bevy_ecs::entity::Entity", + "documentation": " Lightweight identifier of an [entity](crate::entity).\n\n The identifier is implemented using a [generational index]: a combination of an index and a generation.\n This allows fast insertion after data removal in an array while minimizing loss of spatial locality.\n\n These identifiers are only valid on the [`World`] it's sourced from. Attempting to use an `Entity` to\n fetch entity components or metadata from a different world will either fail or return unexpected results.\n\n [generational index]: https://lucassardois.medium.com/generational-indices-guide-8e3c5f7fd594\n\n # Stability warning\n For all intents and purposes, `Entity` should be treated as an opaque identifier. The internal bit\n representation is liable to change from release to release as are the behaviors or performance\n characteristics of any of its trait implementations (i.e. `Ord`, `Hash`, etc.). This means that changes in\n `Entity`'s representation, though made readable through various functions on the type, are not considered\n breaking changes under [SemVer].\n\n In particular, directly serializing with `Serialize` and `Deserialize` make zero guarantee of long\n term wire format compatibility. Changes in behavior will cause serialized `Entity` values persisted\n to long term storage (i.e. disk, databases, etc.) will fail to deserialize upon being updated.\n\n # Usage\n\n This data type is returned by iterating a `Query` that has `Entity` as part of its query fetch type parameter ([learn more]).\n It can also be obtained by calling [`EntityCommands::id`] or [`EntityWorldMut::id`].\n\n ```\n # use bevy_ecs::prelude::*;\n # #[derive(Component)]\n # struct SomeComponent;\n fn setup(mut commands: Commands) {\n // Calling `spawn` returns `EntityCommands`.\n let entity = commands.spawn(SomeComponent).id();\n }\n\n fn exclusive_system(world: &mut World) {\n // Calling `spawn` returns `EntityWorldMut`.\n let entity = world.spawn(SomeComponent).id();\n }\n #\n # bevy_ecs::system::assert_is_system(setup);\n # bevy_ecs::system::assert_is_system(exclusive_system);\n ```\n\n It can be used to refer to a specific entity to apply [`EntityCommands`], or to call [`Query::get`] (or similar methods) to access its components.\n\n ```\n # use bevy_ecs::prelude::*;\n #\n # #[derive(Component)]\n # struct Expired;\n #\n fn dispose_expired_food(mut commands: Commands, query: Query>) {\n for food_entity in &query {\n commands.entity(food_entity).despawn();\n }\n }\n #\n # bevy_ecs::system::assert_is_system(dispose_expired_food);\n ```\n\n [learn more]: crate::system::Query#entity-id-access\n [`EntityCommands::id`]: crate::system::EntityCommands::id\n [`EntityWorldMut::id`]: crate::world::EntityWorldMut::id\n [`EntityCommands`]: crate::system::EntityCommands\n [`Query::get`]: crate::system::Query::get\n [`World`]: crate::world::World\n [SemVer]: https://semver.org/", + "associated_functions": [ + "bevy_ecs::entity::Entity::clone", + "bevy_ecs::entity::Entity::eq", + "bevy_ecs::entity::Entity::from_bits", + "bevy_ecs::entity::Entity::from_raw", + "bevy_ecs::entity::Entity::generation", + "bevy_ecs::entity::Entity::index", + "bevy_ecs::entity::Entity::to_bits" + ], + "layout": null + }, + "bevy_ecs::entity::hash::EntityHash": { + "identifier": "EntityHash", + "crate": "bevy_ecs", + "path": "bevy_ecs::entity::hash::EntityHash", + "documentation": " A [`BuildHasher`] that results in a [`EntityHasher`].", + "associated_functions": [ + "bevy_ecs::entity::hash::EntityHash::clone" + ], + "layout": { + "kind": "Struct", + "name": "EntityHash" + } + }, + "bevy_ecs::identifier::Identifier": { + "identifier": "Identifier", + "crate": "bevy_ecs", + "path": "bevy_ecs::identifier::Identifier", + "documentation": " A unified identifier for all entity and similar IDs.\n\n Has the same size as a `u64` integer, but the layout is split between a 32-bit low\n segment, a 31-bit high segment, and the significant bit reserved as type flags to denote\n entity kinds.", + "associated_functions": [ + "bevy_ecs::identifier::Identifier::clone", + "bevy_ecs::identifier::Identifier::eq", + "bevy_ecs::identifier::Identifier::from_bits", + "bevy_ecs::identifier::Identifier::low", + "bevy_ecs::identifier::Identifier::masked_high", + "bevy_ecs::identifier::Identifier::to_bits" + ], + "layout": null + }, + "bevy_ecs::removal_detection::RemovedComponentEntity": { + "identifier": "RemovedComponentEntity", + "crate": "bevy_ecs", + "path": "bevy_ecs::removal_detection::RemovedComponentEntity", + "documentation": " Wrapper around [`Entity`] for [`RemovedComponents`].\n Internally, `RemovedComponents` uses these as an `Events`.", + "associated_functions": [ + "bevy_ecs::removal_detection::RemovedComponentEntity::clone" + ], + "layout": { + "kind": "TupleStruct", + "name": "RemovedComponentEntity", + "fields": [ + { + "type": "bevy_ecs::entity::Entity" + } + ] + } + }, + "bevy_ecs::system::system_registry::SystemIdMarker": { + "identifier": "SystemIdMarker", + "crate": "bevy_ecs", + "path": "bevy_ecs::system::system_registry::SystemIdMarker", + "documentation": " Marker [`Component`](bevy_ecs::component::Component) for identifying [`SystemId`] [`Entity`]s.", + "layout": { + "kind": "Struct", + "name": "SystemIdMarker" + } + }, + "bevy_ecs::world::component_constants::OnAdd": { + "identifier": "OnAdd", + "crate": "bevy_ecs", + "path": "bevy_ecs::world::component_constants::OnAdd", + "documentation": " Trigger emitted when a component is added to an entity. See [`crate::component::ComponentHooks::on_add`]\n for more information.", + "layout": { + "kind": "Struct", + "name": "OnAdd" + } + }, + "bevy_ecs::world::component_constants::OnInsert": { + "identifier": "OnInsert", + "crate": "bevy_ecs", + "path": "bevy_ecs::world::component_constants::OnInsert", + "documentation": " Trigger emitted when a component is inserted onto an entity. See [`crate::component::ComponentHooks::on_insert`]\n for more information.", + "layout": { + "kind": "Struct", + "name": "OnInsert" + } + }, + "bevy_ecs::world::component_constants::OnRemove": { + "identifier": "OnRemove", + "crate": "bevy_ecs", + "path": "bevy_ecs::world::component_constants::OnRemove", + "documentation": " Trigger emitted when a component is removed from an entity. See [`crate::component::ComponentHooks::on_remove`]\n for more information.", + "layout": { + "kind": "Struct", + "name": "OnRemove" + } + }, + "bevy_ecs::world::component_constants::OnReplace": { + "identifier": "OnReplace", + "crate": "bevy_ecs", + "path": "bevy_ecs::world::component_constants::OnReplace", + "documentation": " Trigger emitted when a component is replaced on an entity. See [`crate::component::ComponentHooks::on_replace`]\n for more information.", + "layout": { + "kind": "Struct", + "name": "OnReplace" + } + }, + "bevy_hierarchy::components::children::Children": { + "identifier": "Children", + "crate": "bevy_hierarchy", + "path": "bevy_hierarchy::components::children::Children", + "documentation": " Contains references to the child entities of this entity.\n\n Each child must contain a [`Parent`] component that points back to this entity.\n This component rarely needs to be created manually,\n consider using higher level utilities like [`BuildChildren::with_children`]\n which are safer and easier to use.\n\n See [`HierarchyQueryExt`] for hierarchy related methods on [`Query`].\n\n [`HierarchyQueryExt`]: crate::query_extension::HierarchyQueryExt\n [`Query`]: bevy_ecs::system::Query\n [`Parent`]: crate::components::parent::Parent\n [`BuildChildren::with_children`]: crate::child_builder::BuildChildren::with_children", + "associated_functions": [ + "bevy_hierarchy::components::children::Children::swap" + ], + "layout": { + "kind": "TupleStruct", + "name": "Children", + "fields": [ + { + "type": "smallvec::SmallVec<[bevy_ecs::entity::Entity; 8]>" + } + ] + } + }, + "bevy_hierarchy::components::parent::Parent": { + "identifier": "Parent", + "crate": "bevy_hierarchy", + "path": "bevy_hierarchy::components::parent::Parent", + "documentation": " Holds a reference to the parent entity of this entity.\n This component should only be present on entities that actually have a parent entity.\n\n Parent entity must have this entity stored in its [`Children`] component.\n It is hard to set up parent/child relationships manually,\n consider using higher level utilities like [`BuildChildren::with_children`].\n\n See [`HierarchyQueryExt`] for hierarchy related methods on [`Query`].\n\n [`HierarchyQueryExt`]: crate::query_extension::HierarchyQueryExt\n [`Query`]: bevy_ecs::system::Query\n [`Children`]: super::children::Children\n [`BuildChildren::with_children`]: crate::child_builder::BuildChildren::with_children", + "associated_functions": [ + "bevy_hierarchy::components::parent::Parent::assert_receiver_is_total_eq", + "bevy_hierarchy::components::parent::Parent::eq", + "bevy_hierarchy::components::parent::Parent::get" + ], + "layout": { + "kind": "TupleStruct", + "name": "Parent", + "fields": [ + { + "type": "bevy_ecs::entity::Entity" + } + ] + } + }, + "bevy_hierarchy::events::HierarchyEvent": { + "identifier": "HierarchyEvent", + "crate": "bevy_hierarchy", + "path": "bevy_hierarchy::events::HierarchyEvent", + "documentation": " An [`Event`] that is fired whenever there is a change in the world's hierarchy.\n\n [`Event`]: bevy_ecs::event::Event", + "associated_functions": [ + "bevy_hierarchy::events::HierarchyEvent::assert_receiver_is_total_eq", + "bevy_hierarchy::events::HierarchyEvent::clone", + "bevy_hierarchy::events::HierarchyEvent::eq" + ], + "layout": [ + { + "kind": "Struct", + "name": "ChildAdded", + "fields": [ + { + "name": "child", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "parent", + "type": "bevy_ecs::entity::Entity" + } + ] + }, + { + "kind": "Struct", + "name": "ChildRemoved", + "fields": [ + { + "name": "child", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "parent", + "type": "bevy_ecs::entity::Entity" + } + ] + }, + { + "kind": "Struct", + "name": "ChildMoved", + "fields": [ + { + "name": "child", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "previous_parent", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "new_parent", + "type": "bevy_ecs::entity::Entity" + } + ] + } + ] + }, + "bevy_input::ButtonState": { + "identifier": "ButtonState", + "crate": "bevy_input", + "path": "bevy_input::ButtonState", + "documentation": " The current \"press\" state of an element", + "associated_functions": [ + "bevy_input::ButtonState::assert_receiver_is_total_eq", + "bevy_input::ButtonState::clone", + "bevy_input::ButtonState::eq", + "bevy_input::ButtonState::is_pressed" + ], + "layout": [ + { + "kind": "Unit", + "name": "Pressed" + }, + { + "kind": "Unit", + "name": "Released" + } + ] + }, + "bevy_input::axis::Axis": { + "identifier": "Axis", + "crate": "bevy_input", + "path": "bevy_input::axis::Axis", + "generics": [ + { + "type_id": "bevy_input::gamepad::GamepadInput", + "name": "T" + } + ], + "documentation": " Stores the position data of the input devices of type `T`.\n\n The values are stored as `f32`s, using [`Axis::set`].\n Use [`Axis::get`] to retrieve the value clamped between [`Axis::MIN`] and [`Axis::MAX`]\n inclusive, or unclamped using [`Axis::get_unclamped`].", + "layout": { + "kind": "Struct", + "name": "Axis", + "fields": [ + { + "name": "axis_data", + "type": "bevy_utils::hashbrown::HashMap" + } + ] + } + }, + "bevy_input::button_input::ButtonInput": { + "identifier": "ButtonInput", + "crate": "bevy_input", + "path": "bevy_input::button_input::ButtonInput", + "generics": [ + { + "type_id": "bevy_input::gamepad::GamepadButton", + "name": "T" + } + ], + "documentation": " A \"press-able\" input of type `T`.\n\n ## Usage\n\n This type can be used as a resource to keep the current state of an input, by reacting to\n events from the input. For a given input value:\n\n * [`ButtonInput::pressed`] will return `true` between a press and a release event.\n * [`ButtonInput::just_pressed`] will return `true` for one frame after a press event.\n * [`ButtonInput::just_released`] will return `true` for one frame after a release event.\n\n ## Multiple systems\n\n In case multiple systems are checking for [`ButtonInput::just_pressed`] or [`ButtonInput::just_released`]\n but only one should react, for example when modifying a\n [`Resource`], you should consider clearing the input state, either by:\n\n * Using [`ButtonInput::clear_just_pressed`] or [`ButtonInput::clear_just_released`] instead.\n * Calling [`ButtonInput::clear`] or [`ButtonInput::reset`] immediately after the state change.\n\n ## Performance\n\n For all operations, the following conventions are used:\n - **n** is the number of stored inputs.\n - **m** is the number of input arguments passed to the method.\n - **\\***-suffix denotes an amortized cost.\n - **~**-suffix denotes an expected cost.\n\n See Rust's [std::collections doc on performance](https://doc.rust-lang.org/std/collections/index.html#performance) for more details on the conventions used here.\n\n | **[`ButtonInput`] operations** | **Computational complexity** |\n |-----------------------------------|------------------------------------|\n | [`ButtonInput::any_just_pressed`] | *O*(m)~ |\n | [`ButtonInput::any_just_released`] | *O*(m)~ |\n | [`ButtonInput::any_pressed`] | *O*(m)~ |\n | [`ButtonInput::get_just_pressed`] | *O*(n) |\n | [`ButtonInput::get_just_released`] | *O*(n) |\n | [`ButtonInput::get_pressed`] | *O*(n) |\n | [`ButtonInput::just_pressed`] | *O*(1)~ |\n | [`ButtonInput::just_released`] | *O*(1)~ |\n | [`ButtonInput::pressed`] | *O*(1)~ |\n | [`ButtonInput::press`] | *O*(1)~* |\n | [`ButtonInput::release`] | *O*(1)~* |\n | [`ButtonInput::release_all`] | *O*(n)~* |\n | [`ButtonInput::clear_just_pressed`] | *O*(1)~ |\n | [`ButtonInput::clear_just_released`] | *O*(1)~ |\n | [`ButtonInput::reset_all`] | *O*(n) |\n | [`ButtonInput::clear`] | *O*(n) |\n\n ## Window focus\n\n `ButtonInput` is tied to window focus. For example, if the user holds a button\n while the window loses focus, [`ButtonInput::just_released`] will be triggered. Similarly if the window\n regains focus, [`ButtonInput::just_pressed`] will be triggered.\n\n `ButtonInput` is independent of window focus.\n\n ## Examples\n\n Reading and checking against the current set of pressed buttons:\n ```no_run\n # use bevy_app::{App, NoopPluginGroup as DefaultPlugins, Update};\n # use bevy_ecs::{prelude::{IntoSystemConfigs, Res, Resource, resource_changed}, schedule::Condition};\n # use bevy_input::{ButtonInput, prelude::{KeyCode, MouseButton}};\n\n fn main() {\n App::new()\n .add_plugins(DefaultPlugins)\n .add_systems(\n Update,\n print_mouse.run_if(resource_changed::>),\n )\n .add_systems(\n Update,\n print_keyboard.run_if(resource_changed::>),\n )\n .run();\n }\n\n fn print_mouse(mouse: Res>) {\n println!(\"Mouse: {:?}\", mouse.get_pressed().collect::>());\n }\n\n fn print_keyboard(keyboard: Res>) {\n if keyboard.any_pressed([KeyCode::ControlLeft, KeyCode::ControlRight])\n && keyboard.any_pressed([KeyCode::AltLeft, KeyCode::AltRight])\n && keyboard.any_pressed([KeyCode::ShiftLeft, KeyCode::ShiftRight])\n && keyboard.any_pressed([KeyCode::SuperLeft, KeyCode::SuperRight])\n && keyboard.pressed(KeyCode::KeyL)\n {\n println!(\"On Windows this opens LinkedIn.\");\n } else {\n println!(\"keyboard: {:?}\", keyboard.get_pressed().collect::>());\n }\n }\n ```\n\n ## Note\n\n When adding this resource for a new input type, you should:\n\n * Call the [`ButtonInput::press`] method for each press event.\n * Call the [`ButtonInput::release`] method for each release event.\n * Call the [`ButtonInput::clear`] method at each frame start, before processing events.\n\n Note: Calling `clear` from a [`ResMut`] will trigger change detection.\n It may be preferable to use [`DetectChangesMut::bypass_change_detection`]\n to avoid causing the resource to always be marked as changed.\n\n [`ResMut`]: bevy_ecs::system::ResMut\n [`DetectChangesMut::bypass_change_detection`]: bevy_ecs::change_detection::DetectChangesMut::bypass_change_detection", + "layout": { + "kind": "Struct", + "name": "ButtonInput", + "fields": [ + { + "name": "pressed", + "type": "bevy_utils::hashbrown::HashSet" + }, + { + "name": "just_pressed", + "type": "bevy_utils::hashbrown::HashSet" + }, + { + "name": "just_released", + "type": "bevy_utils::hashbrown::HashSet" + } + ] + } + }, + "bevy_input::gamepad::AxisSettings": { + "identifier": "AxisSettings", + "crate": "bevy_input", + "path": "bevy_input::gamepad::AxisSettings", + "documentation": " Settings for a [`GamepadAxis`].\n\n It is used inside the [`GamepadSettings`] to define the sensitivity range and\n threshold for an axis.\n Values that are higher than `livezone_upperbound` will be rounded up to 1.0.\n Values that are lower than `livezone_lowerbound` will be rounded down to -1.0.\n Values that are in-between `deadzone_lowerbound` and `deadzone_upperbound` will be rounded\n to 0.0.\n Otherwise, values will not be rounded.\n\n The valid range is `[-1.0, 1.0]`.", + "associated_functions": [ + "bevy_input::gamepad::AxisSettings::clamp", + "bevy_input::gamepad::AxisSettings::clone", + "bevy_input::gamepad::AxisSettings::deadzone_lowerbound", + "bevy_input::gamepad::AxisSettings::deadzone_upperbound", + "bevy_input::gamepad::AxisSettings::eq", + "bevy_input::gamepad::AxisSettings::filter", + "bevy_input::gamepad::AxisSettings::livezone_lowerbound", + "bevy_input::gamepad::AxisSettings::livezone_upperbound", + "bevy_input::gamepad::AxisSettings::set_deadzone_lowerbound", + "bevy_input::gamepad::AxisSettings::set_deadzone_upperbound", + "bevy_input::gamepad::AxisSettings::set_livezone_lowerbound", + "bevy_input::gamepad::AxisSettings::set_livezone_upperbound", + "bevy_input::gamepad::AxisSettings::set_threshold", + "bevy_input::gamepad::AxisSettings::threshold" + ], + "layout": { + "kind": "Struct", + "name": "AxisSettings", + "fields": [ + { + "name": "livezone_upperbound", + "type": "f32" + }, + { + "name": "deadzone_upperbound", + "type": "f32" + }, + { + "name": "deadzone_lowerbound", + "type": "f32" + }, + { + "name": "livezone_lowerbound", + "type": "f32" + }, + { + "name": "threshold", + "type": "f32" + } + ] + } + }, + "bevy_input::gamepad::ButtonAxisSettings": { + "identifier": "ButtonAxisSettings", + "crate": "bevy_input", + "path": "bevy_input::gamepad::ButtonAxisSettings", + "documentation": " Settings for a [`GamepadButton`].\n\n It is used inside the [`GamepadSettings`] to define the sensitivity range and\n threshold for a button axis.\n\n ## Logic\n\n - Values that are higher than or equal to `high` will be rounded to 1.0.\n - Values that are lower than or equal to `low` will be rounded to 0.0.\n - Otherwise, values will not be rounded.\n\n The valid range is from 0.0 to 1.0, inclusive.", + "associated_functions": [ + "bevy_input::gamepad::ButtonAxisSettings::clone", + "bevy_input::gamepad::ButtonAxisSettings::filter" + ], + "layout": { + "kind": "Struct", + "name": "ButtonAxisSettings", + "fields": [ + { + "name": "high", + "type": "f32" + }, + { + "name": "low", + "type": "f32" + }, + { + "name": "threshold", + "type": "f32" + } + ] + } + }, + "bevy_input::gamepad::ButtonSettings": { + "identifier": "ButtonSettings", + "crate": "bevy_input", + "path": "bevy_input::gamepad::ButtonSettings", + "documentation": " Manages settings for gamepad buttons.\n\n It is used inside [`GamepadSettings`] to define the threshold for a [`GamepadButton`]\n to be considered pressed or released. A button is considered pressed if the `press_threshold`\n value is surpassed and released if the `release_threshold` value is undercut.\n\n Allowed values: `0.0 <= ``release_threshold`` <= ``press_threshold`` <= 1.0`", + "associated_functions": [ + "bevy_input::gamepad::ButtonSettings::clone", + "bevy_input::gamepad::ButtonSettings::eq", + "bevy_input::gamepad::ButtonSettings::is_pressed", + "bevy_input::gamepad::ButtonSettings::is_released", + "bevy_input::gamepad::ButtonSettings::press_threshold", + "bevy_input::gamepad::ButtonSettings::release_threshold", + "bevy_input::gamepad::ButtonSettings::set_press_threshold", + "bevy_input::gamepad::ButtonSettings::set_release_threshold" + ], + "layout": { + "kind": "Struct", + "name": "ButtonSettings", + "fields": [ + { + "name": "press_threshold", + "type": "f32" + }, + { + "name": "release_threshold", + "type": "f32" + } + ] + } + }, + "bevy_input::gamepad::Gamepad": { + "identifier": "Gamepad", + "crate": "bevy_input", + "path": "bevy_input::gamepad::Gamepad", + "documentation": " Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`].\n\n An entity with this component is spawned automatically after [`GamepadConnectionEvent`]\n and updated by [`gamepad_event_processing_system`].\n\n See also [`GamepadSettings`] for configuration.\n\n # Examples\n\n ```\n # use bevy_input::gamepad::{Gamepad, GamepadAxis, GamepadButton};\n # use bevy_ecs::system::Query;\n # use bevy_core::Name;\n #\n fn gamepad_usage_system(gamepads: Query<(&Name, &Gamepad)>) {\n for (name, gamepad) in &gamepads {\n println!(\"{name}\");\n\n if gamepad.just_pressed(GamepadButton::North) {\n println!(\"{} just pressed North\", name)\n }\n\n if let Some(left_stick_x) = gamepad.get(GamepadAxis::LeftStickX) {\n println!(\"left stick X: {}\", left_stick_x)\n }\n }\n }\n ```", + "associated_functions": [ + "bevy_input::gamepad::Gamepad::dpad", + "bevy_input::gamepad::Gamepad::just_pressed", + "bevy_input::gamepad::Gamepad::just_released", + "bevy_input::gamepad::Gamepad::left_stick", + "bevy_input::gamepad::Gamepad::pressed", + "bevy_input::gamepad::Gamepad::product_id", + "bevy_input::gamepad::Gamepad::right_stick", + "bevy_input::gamepad::Gamepad::vendor_id" + ], + "layout": { + "kind": "Struct", + "name": "Gamepad", + "fields": [ + { + "name": "vendor_id", + "type": "core::option::Option" + }, + { + "name": "product_id", + "type": "core::option::Option" + }, + { + "name": "digital", + "type": "bevy_input::button_input::ButtonInput" + }, + { + "name": "analog", + "type": "bevy_input::axis::Axis" + } + ] + } + }, + "bevy_input::gamepad::GamepadAxis": { + "identifier": "GamepadAxis", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadAxis", + "documentation": " Represents gamepad input types that are mapped in the range [-1.0, 1.0]\n\n ## Usage\n\n This is used to determine which axis has changed its value when receiving a\n gamepad axis event. It is also used in the [`Gamepad`] component.", + "associated_functions": [ + "bevy_input::gamepad::GamepadAxis::assert_receiver_is_total_eq", + "bevy_input::gamepad::GamepadAxis::clone", + "bevy_input::gamepad::GamepadAxis::eq" + ], + "layout": [ + { + "kind": "Unit", + "name": "LeftStickX" + }, + { + "kind": "Unit", + "name": "LeftStickY" + }, + { + "kind": "Unit", + "name": "LeftZ" + }, + { + "kind": "Unit", + "name": "RightStickX" + }, + { + "kind": "Unit", + "name": "RightStickY" + }, + { + "kind": "Unit", + "name": "RightZ" + }, + { + "kind": "TupleStruct", + "name": "Other", + "fields": [ + { + "type": "u8" + } + ] + } + ] + }, + "bevy_input::gamepad::GamepadAxisChangedEvent": { + "identifier": "GamepadAxisChangedEvent", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadAxisChangedEvent", + "documentation": " [`GamepadAxis`] event triggered by an analog state change", + "associated_functions": [ + "bevy_input::gamepad::GamepadAxisChangedEvent::clone", + "bevy_input::gamepad::GamepadAxisChangedEvent::eq", + "bevy_input::gamepad::GamepadAxisChangedEvent::new" + ], + "layout": { + "kind": "Struct", + "name": "GamepadAxisChangedEvent", + "fields": [ + { + "name": "entity", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "axis", + "type": "bevy_input::gamepad::GamepadAxis" + }, + { + "name": "value", + "type": "f32" + } + ] + } + }, + "bevy_input::gamepad::GamepadButton": { + "identifier": "GamepadButton", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadButton", + "documentation": " Represents gamepad input types that are mapped in the range [0.0, 1.0].\n\n ## Usage\n\n This is used to determine which button has changed its value when receiving gamepad button events\n It is also used in the [`Gamepad`] component.", + "associated_functions": [ + "bevy_input::gamepad::GamepadButton::assert_receiver_is_total_eq", + "bevy_input::gamepad::GamepadButton::clone", + "bevy_input::gamepad::GamepadButton::eq" + ], + "layout": [ + { + "kind": "Unit", + "name": "South" + }, + { + "kind": "Unit", + "name": "East" + }, + { + "kind": "Unit", + "name": "North" + }, + { + "kind": "Unit", + "name": "West" + }, + { + "kind": "Unit", + "name": "C" + }, + { + "kind": "Unit", + "name": "Z" + }, + { + "kind": "Unit", + "name": "LeftTrigger" + }, + { + "kind": "Unit", + "name": "LeftTrigger2" + }, + { + "kind": "Unit", + "name": "RightTrigger" + }, + { + "kind": "Unit", + "name": "RightTrigger2" + }, + { + "kind": "Unit", + "name": "Select" + }, + { + "kind": "Unit", + "name": "Start" + }, + { + "kind": "Unit", + "name": "Mode" + }, + { + "kind": "Unit", + "name": "LeftThumb" + }, + { + "kind": "Unit", + "name": "RightThumb" + }, + { + "kind": "Unit", + "name": "DPadUp" + }, + { + "kind": "Unit", + "name": "DPadDown" + }, + { + "kind": "Unit", + "name": "DPadLeft" + }, + { + "kind": "Unit", + "name": "DPadRight" + }, + { + "kind": "TupleStruct", + "name": "Other", + "fields": [ + { + "type": "u8" + } + ] + } + ] + }, + "bevy_input::gamepad::GamepadButtonChangedEvent": { + "identifier": "GamepadButtonChangedEvent", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadButtonChangedEvent", + "documentation": " [`GamepadButton`] event triggered by an analog state change", + "associated_functions": [ + "bevy_input::gamepad::GamepadButtonChangedEvent::clone", + "bevy_input::gamepad::GamepadButtonChangedEvent::eq", + "bevy_input::gamepad::GamepadButtonChangedEvent::new" + ], + "layout": { + "kind": "Struct", + "name": "GamepadButtonChangedEvent", + "fields": [ + { + "name": "entity", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "button", + "type": "bevy_input::gamepad::GamepadButton" + }, + { + "name": "state", + "type": "bevy_input::ButtonState" + }, + { + "name": "value", + "type": "f32" + } + ] + } + }, + "bevy_input::gamepad::GamepadButtonStateChangedEvent": { + "identifier": "GamepadButtonStateChangedEvent", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadButtonStateChangedEvent", + "documentation": " [`GamepadButton`] event triggered by a digital state change", + "associated_functions": [ + "bevy_input::gamepad::GamepadButtonStateChangedEvent::assert_receiver_is_total_eq", + "bevy_input::gamepad::GamepadButtonStateChangedEvent::clone", + "bevy_input::gamepad::GamepadButtonStateChangedEvent::eq", + "bevy_input::gamepad::GamepadButtonStateChangedEvent::new" + ], + "layout": { + "kind": "Struct", + "name": "GamepadButtonStateChangedEvent", + "fields": [ + { + "name": "entity", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "button", + "type": "bevy_input::gamepad::GamepadButton" + }, + { + "name": "state", + "type": "bevy_input::ButtonState" + } + ] + } + }, + "bevy_input::gamepad::GamepadConnection": { + "identifier": "GamepadConnection", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadConnection", + "documentation": " The connection status of a gamepad.", + "associated_functions": [ + "bevy_input::gamepad::GamepadConnection::clone", + "bevy_input::gamepad::GamepadConnection::eq" + ], + "layout": [ + { + "kind": "Struct", + "name": "Connected", + "fields": [ + { + "name": "name", + "type": "String" + }, + { + "name": "vendor_id", + "type": "core::option::Option" + }, + { + "name": "product_id", + "type": "core::option::Option" + } + ] + }, + { + "kind": "Unit", + "name": "Disconnected" + } + ] + }, + "bevy_input::gamepad::GamepadConnectionEvent": { + "identifier": "GamepadConnectionEvent", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadConnectionEvent", + "documentation": " A Gamepad connection event. Created when a connection to a gamepad\n is established and when a gamepad is disconnected.", + "associated_functions": [ + "bevy_input::gamepad::GamepadConnectionEvent::clone", + "bevy_input::gamepad::GamepadConnectionEvent::connected", + "bevy_input::gamepad::GamepadConnectionEvent::disconnected", + "bevy_input::gamepad::GamepadConnectionEvent::eq", + "bevy_input::gamepad::GamepadConnectionEvent::new" + ], + "layout": { + "kind": "Struct", + "name": "GamepadConnectionEvent", + "fields": [ + { + "name": "gamepad", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "connection", + "type": "bevy_input::gamepad::GamepadConnection" + } + ] + } + }, + "bevy_input::gamepad::GamepadEvent": { + "identifier": "GamepadEvent", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadEvent", + "documentation": " A gamepad event.\n\n This event type is used over the [`GamepadConnectionEvent`],\n [`GamepadButtonChangedEvent`] and [`GamepadAxisChangedEvent`] when\n the in-frame relative ordering of events is important.\n\n This event is produced by `bevy_input`", + "associated_functions": [ + "bevy_input::gamepad::GamepadEvent::clone", + "bevy_input::gamepad::GamepadEvent::eq" + ], + "layout": [ + { + "kind": "TupleStruct", + "name": "Connection", + "fields": [ + { + "type": "bevy_input::gamepad::GamepadConnectionEvent" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Button", + "fields": [ + { + "type": "bevy_input::gamepad::GamepadButtonChangedEvent" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Axis", + "fields": [ + { + "type": "bevy_input::gamepad::GamepadAxisChangedEvent" + } + ] + } + ] + }, + "bevy_input::gamepad::GamepadInput": { + "identifier": "GamepadInput", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadInput", + "documentation": " Encapsulation over [`GamepadAxis`] and [`GamepadButton`]", + "associated_functions": [ + "bevy_input::gamepad::GamepadInput::assert_receiver_is_total_eq", + "bevy_input::gamepad::GamepadInput::clone", + "bevy_input::gamepad::GamepadInput::eq" + ], + "layout": [ + { + "kind": "TupleStruct", + "name": "Axis", + "fields": [ + { + "type": "bevy_input::gamepad::GamepadAxis" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Button", + "fields": [ + { + "type": "bevy_input::gamepad::GamepadButton" + } + ] + } + ] + }, + "bevy_input::gamepad::GamepadRumbleIntensity": { + "identifier": "GamepadRumbleIntensity", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadRumbleIntensity", + "documentation": " The intensity at which a gamepad's force-feedback motors may rumble.", + "associated_functions": [ + "bevy_input::gamepad::GamepadRumbleIntensity::clone", + "bevy_input::gamepad::GamepadRumbleIntensity::eq", + "bevy_input::gamepad::GamepadRumbleIntensity::strong_motor", + "bevy_input::gamepad::GamepadRumbleIntensity::weak_motor" + ], + "layout": { + "kind": "Struct", + "name": "GamepadRumbleIntensity", + "fields": [ + { + "name": "strong_motor", + "type": "f32" + }, + { + "name": "weak_motor", + "type": "f32" + } + ] + } + }, + "bevy_input::gamepad::GamepadRumbleRequest": { + "identifier": "GamepadRumbleRequest", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadRumbleRequest", + "documentation": " An event that controls force-feedback rumbling of a [`Gamepad`] [`entity`](Entity).\n\n # Notes\n\n Does nothing if the gamepad or platform does not support rumble.\n\n # Example\n\n ```\n # use bevy_input::gamepad::{Gamepad, GamepadRumbleRequest, GamepadRumbleIntensity};\n # use bevy_ecs::prelude::{EventWriter, Res, Query, Entity, With};\n # use bevy_utils::Duration;\n fn rumble_gamepad_system(\n mut rumble_requests: EventWriter,\n gamepads: Query>,\n ) {\n for entity in gamepads.iter() {\n rumble_requests.send(GamepadRumbleRequest::Add {\n gamepad: entity,\n intensity: GamepadRumbleIntensity::MAX,\n duration: Duration::from_secs_f32(0.5),\n });\n }\n }\n ```", + "associated_functions": [ + "bevy_input::gamepad::GamepadRumbleRequest::clone", + "bevy_input::gamepad::GamepadRumbleRequest::gamepad" + ], + "layout": [ + { + "kind": "Struct", + "name": "Add", + "fields": [ + { + "name": "duration", + "type": "bevy_utils::Duration" + }, + { + "name": "intensity", + "type": "bevy_input::gamepad::GamepadRumbleIntensity" + }, + { + "name": "gamepad", + "type": "bevy_ecs::entity::Entity" + } + ] + }, + { + "kind": "Struct", + "name": "Stop", + "fields": [ + { + "name": "gamepad", + "type": "bevy_ecs::entity::Entity" + } + ] + } + ] + }, + "bevy_input::gamepad::GamepadSettings": { + "identifier": "GamepadSettings", + "crate": "bevy_input", + "path": "bevy_input::gamepad::GamepadSettings", + "documentation": " Gamepad settings component.\n\n ## Usage\n\n It is used to create a `bevy` component that stores the settings of [`GamepadButton`] and [`GamepadAxis`] in [`Gamepad`].\n If no user defined [`ButtonSettings`], [`AxisSettings`], or [`ButtonAxisSettings`]\n are defined, the default settings of each are used as a fallback accordingly.\n\n ## Note\n\n The [`GamepadSettings`] are used to determine when raw gamepad events\n should register. Events that don't meet the change thresholds defined in [`GamepadSettings`]\n will not register. To modify these settings, mutate the corresponding component.", + "associated_functions": [ + "bevy_input::gamepad::GamepadSettings::clone" + ], + "layout": { + "kind": "Struct", + "name": "GamepadSettings", + "fields": [ + { + "name": "default_button_settings", + "type": "bevy_input::gamepad::ButtonSettings" + }, + { + "name": "default_axis_settings", + "type": "bevy_input::gamepad::AxisSettings" + }, + { + "name": "default_button_axis_settings", + "type": "bevy_input::gamepad::ButtonAxisSettings" + }, + { + "name": "button_settings", + "type": "bevy_utils::hashbrown::HashMap" + }, + { + "name": "axis_settings", + "type": "bevy_utils::hashbrown::HashMap" + }, + { + "name": "button_axis_settings", + "type": "bevy_utils::hashbrown::HashMap" + } + ] + } + }, + "bevy_input::gamepad::RawGamepadAxisChangedEvent": { + "identifier": "RawGamepadAxisChangedEvent", + "crate": "bevy_input", + "path": "bevy_input::gamepad::RawGamepadAxisChangedEvent", + "documentation": " [`GamepadAxis`] changed event unfiltered by [`GamepadSettings`]", + "associated_functions": [ + "bevy_input::gamepad::RawGamepadAxisChangedEvent::clone", + "bevy_input::gamepad::RawGamepadAxisChangedEvent::eq", + "bevy_input::gamepad::RawGamepadAxisChangedEvent::new" + ], + "layout": { + "kind": "Struct", + "name": "RawGamepadAxisChangedEvent", + "fields": [ + { + "name": "gamepad", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "axis", + "type": "bevy_input::gamepad::GamepadAxis" + }, + { + "name": "value", + "type": "f32" + } + ] + } + }, + "bevy_input::gamepad::RawGamepadButtonChangedEvent": { + "identifier": "RawGamepadButtonChangedEvent", + "crate": "bevy_input", + "path": "bevy_input::gamepad::RawGamepadButtonChangedEvent", + "documentation": " [`GamepadButton`] changed event unfiltered by [`GamepadSettings`]", + "associated_functions": [ + "bevy_input::gamepad::RawGamepadButtonChangedEvent::clone", + "bevy_input::gamepad::RawGamepadButtonChangedEvent::eq", + "bevy_input::gamepad::RawGamepadButtonChangedEvent::new" + ], + "layout": { + "kind": "Struct", + "name": "RawGamepadButtonChangedEvent", + "fields": [ + { + "name": "gamepad", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "button", + "type": "bevy_input::gamepad::GamepadButton" + }, + { + "name": "value", + "type": "f32" + } + ] + } + }, + "bevy_input::gamepad::RawGamepadEvent": { + "identifier": "RawGamepadEvent", + "crate": "bevy_input", + "path": "bevy_input::gamepad::RawGamepadEvent", + "documentation": " A raw gamepad event.\n\n This event type is used over the [`GamepadConnectionEvent`],\n [`RawGamepadButtonChangedEvent`] and [`RawGamepadAxisChangedEvent`] when\n the in-frame relative ordering of events is important.\n\n This event type is used by `bevy_input` to feed its components.", + "associated_functions": [ + "bevy_input::gamepad::RawGamepadEvent::clone", + "bevy_input::gamepad::RawGamepadEvent::eq" + ], + "layout": [ + { + "kind": "TupleStruct", + "name": "Connection", + "fields": [ + { + "type": "bevy_input::gamepad::GamepadConnectionEvent" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Button", + "fields": [ + { + "type": "bevy_input::gamepad::RawGamepadButtonChangedEvent" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Axis", + "fields": [ + { + "type": "bevy_input::gamepad::RawGamepadAxisChangedEvent" + } + ] + } + ] + }, + "bevy_input::gestures::DoubleTapGesture": { + "identifier": "DoubleTapGesture", + "crate": "bevy_input", + "path": "bevy_input::gestures::DoubleTapGesture", + "documentation": " Double tap gesture.\n\n ## Platform-specific\n\n - Only available on **`macOS`** and **`iOS`**.\n - On **`iOS`**, must be enabled first", + "associated_functions": [ + "bevy_input::gestures::DoubleTapGesture::clone", + "bevy_input::gestures::DoubleTapGesture::eq" + ], + "layout": { + "kind": "Struct", + "name": "DoubleTapGesture" + } + }, + "bevy_input::gestures::PanGesture": { + "identifier": "PanGesture", + "crate": "bevy_input", + "path": "bevy_input::gestures::PanGesture", + "documentation": " Pan gesture.\n\n ## Platform-specific\n\n - On **`iOS`**, must be enabled first", + "associated_functions": [ + "bevy_input::gestures::PanGesture::clone", + "bevy_input::gestures::PanGesture::eq" + ], + "layout": { + "kind": "TupleStruct", + "name": "PanGesture", + "fields": [ + { + "type": "glam::Vec2" + } + ] + } + }, + "bevy_input::gestures::PinchGesture": { + "identifier": "PinchGesture", + "crate": "bevy_input", + "path": "bevy_input::gestures::PinchGesture", + "documentation": " Two-finger pinch gesture, often used for magnifications.\n\n Positive delta values indicate magnification (zooming in) and\n negative delta values indicate shrinking (zooming out).\n\n ## Platform-specific\n\n - Only available on **`macOS`** and **`iOS`**.\n - On **`iOS`**, must be enabled first", + "associated_functions": [ + "bevy_input::gestures::PinchGesture::clone", + "bevy_input::gestures::PinchGesture::eq" + ], + "layout": { + "kind": "TupleStruct", + "name": "PinchGesture", + "fields": [ + { + "type": "f32" + } + ] + } + }, + "bevy_input::gestures::RotationGesture": { + "identifier": "RotationGesture", + "crate": "bevy_input", + "path": "bevy_input::gestures::RotationGesture", + "documentation": " Two-finger rotation gesture.\n\n Positive delta values indicate rotation counterclockwise and\n negative delta values indicate rotation clockwise.\n\n ## Platform-specific\n\n - Only available on **`macOS`** and **`iOS`**.\n - On **`iOS`**, must be enabled first", + "associated_functions": [ + "bevy_input::gestures::RotationGesture::clone", + "bevy_input::gestures::RotationGesture::eq" + ], + "layout": { + "kind": "TupleStruct", + "name": "RotationGesture", + "fields": [ + { + "type": "f32" + } + ] + } + }, + "bevy_input::keyboard::Key": { + "identifier": "Key", + "crate": "bevy_input", + "path": "bevy_input::keyboard::Key", + "documentation": " The logical key code of a [`KeyboardInput`].\n\n ## Technical\n\n Its values map 1 to 1 to winit's Key.", + "associated_functions": [ + "bevy_input::keyboard::Key::assert_receiver_is_total_eq", + "bevy_input::keyboard::Key::clone", + "bevy_input::keyboard::Key::eq" + ], + "layout": [ + { + "kind": "TupleStruct", + "name": "Character", + "fields": [ + { + "type": "smol_str::SmolStr" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Unidentified", + "fields": [ + { + "type": "bevy_input::keyboard::NativeKey" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Dead", + "fields": [ + { + "type": "core::option::Option" + } + ] + }, + { + "kind": "Unit", + "name": "Alt" + }, + { + "kind": "Unit", + "name": "AltGraph" + }, + { + "kind": "Unit", + "name": "CapsLock" + }, + { + "kind": "Unit", + "name": "Control" + }, + { + "kind": "Unit", + "name": "Fn" + }, + { + "kind": "Unit", + "name": "FnLock" + }, + { + "kind": "Unit", + "name": "NumLock" + }, + { + "kind": "Unit", + "name": "ScrollLock" + }, + { + "kind": "Unit", + "name": "Shift" + }, + { + "kind": "Unit", + "name": "Symbol" + }, + { + "kind": "Unit", + "name": "SymbolLock" + }, + { + "kind": "Unit", + "name": "Meta" + }, + { + "kind": "Unit", + "name": "Hyper" + }, + { + "kind": "Unit", + "name": "Super" + }, + { + "kind": "Unit", + "name": "Enter" + }, + { + "kind": "Unit", + "name": "Tab" + }, + { + "kind": "Unit", + "name": "Space" + }, + { + "kind": "Unit", + "name": "ArrowDown" + }, + { + "kind": "Unit", + "name": "ArrowLeft" + }, + { + "kind": "Unit", + "name": "ArrowRight" + }, + { + "kind": "Unit", + "name": "ArrowUp" + }, + { + "kind": "Unit", + "name": "End" + }, + { + "kind": "Unit", + "name": "Home" + }, + { + "kind": "Unit", + "name": "PageDown" + }, + { + "kind": "Unit", + "name": "PageUp" + }, + { + "kind": "Unit", + "name": "Backspace" + }, + { + "kind": "Unit", + "name": "Clear" + }, + { + "kind": "Unit", + "name": "Copy" + }, + { + "kind": "Unit", + "name": "CrSel" + }, + { + "kind": "Unit", + "name": "Cut" + }, + { + "kind": "Unit", + "name": "Delete" + }, + { + "kind": "Unit", + "name": "EraseEof" + }, + { + "kind": "Unit", + "name": "ExSel" + }, + { + "kind": "Unit", + "name": "Insert" + }, + { + "kind": "Unit", + "name": "Paste" + }, + { + "kind": "Unit", + "name": "Redo" + }, + { + "kind": "Unit", + "name": "Undo" + }, + { + "kind": "Unit", + "name": "Accept" + }, + { + "kind": "Unit", + "name": "Again" + }, + { + "kind": "Unit", + "name": "Attn" + }, + { + "kind": "Unit", + "name": "Cancel" + }, + { + "kind": "Unit", + "name": "ContextMenu" + }, + { + "kind": "Unit", + "name": "Escape" + }, + { + "kind": "Unit", + "name": "Execute" + }, + { + "kind": "Unit", + "name": "Find" + }, + { + "kind": "Unit", + "name": "Help" + }, + { + "kind": "Unit", + "name": "Pause" + }, + { + "kind": "Unit", + "name": "Play" + }, + { + "kind": "Unit", + "name": "Props" + }, + { + "kind": "Unit", + "name": "Select" + }, + { + "kind": "Unit", + "name": "ZoomIn" + }, + { + "kind": "Unit", + "name": "ZoomOut" + }, + { + "kind": "Unit", + "name": "BrightnessDown" + }, + { + "kind": "Unit", + "name": "BrightnessUp" + }, + { + "kind": "Unit", + "name": "Eject" + }, + { + "kind": "Unit", + "name": "LogOff" + }, + { + "kind": "Unit", + "name": "Power" + }, + { + "kind": "Unit", + "name": "PowerOff" + }, + { + "kind": "Unit", + "name": "PrintScreen" + }, + { + "kind": "Unit", + "name": "Hibernate" + }, + { + "kind": "Unit", + "name": "Standby" + }, + { + "kind": "Unit", + "name": "WakeUp" + }, + { + "kind": "Unit", + "name": "AllCandidates" + }, + { + "kind": "Unit", + "name": "Alphanumeric" + }, + { + "kind": "Unit", + "name": "CodeInput" + }, + { + "kind": "Unit", + "name": "Compose" + }, + { + "kind": "Unit", + "name": "Convert" + }, + { + "kind": "Unit", + "name": "FinalMode" + }, + { + "kind": "Unit", + "name": "GroupFirst" + }, + { + "kind": "Unit", + "name": "GroupLast" + }, + { + "kind": "Unit", + "name": "GroupNext" + }, + { + "kind": "Unit", + "name": "GroupPrevious" + }, + { + "kind": "Unit", + "name": "ModeChange" + }, + { + "kind": "Unit", + "name": "NextCandidate" + }, + { + "kind": "Unit", + "name": "NonConvert" + }, + { + "kind": "Unit", + "name": "PreviousCandidate" + }, + { + "kind": "Unit", + "name": "Process" + }, + { + "kind": "Unit", + "name": "SingleCandidate" + }, + { + "kind": "Unit", + "name": "HangulMode" + }, + { + "kind": "Unit", + "name": "HanjaMode" + }, + { + "kind": "Unit", + "name": "JunjaMode" + }, + { + "kind": "Unit", + "name": "Eisu" + }, + { + "kind": "Unit", + "name": "Hankaku" + }, + { + "kind": "Unit", + "name": "Hiragana" + }, + { + "kind": "Unit", + "name": "HiraganaKatakana" + }, + { + "kind": "Unit", + "name": "KanaMode" + }, + { + "kind": "Unit", + "name": "KanjiMode" + }, + { + "kind": "Unit", + "name": "Katakana" + }, + { + "kind": "Unit", + "name": "Romaji" + }, + { + "kind": "Unit", + "name": "Zenkaku" + }, + { + "kind": "Unit", + "name": "ZenkakuHankaku" + }, + { + "kind": "Unit", + "name": "Soft1" + }, + { + "kind": "Unit", + "name": "Soft2" + }, + { + "kind": "Unit", + "name": "Soft3" + }, + { + "kind": "Unit", + "name": "Soft4" + }, + { + "kind": "Unit", + "name": "ChannelDown" + }, + { + "kind": "Unit", + "name": "ChannelUp" + }, + { + "kind": "Unit", + "name": "Close" + }, + { + "kind": "Unit", + "name": "MailForward" + }, + { + "kind": "Unit", + "name": "MailReply" + }, + { + "kind": "Unit", + "name": "MailSend" + }, + { + "kind": "Unit", + "name": "MediaClose" + }, + { + "kind": "Unit", + "name": "MediaFastForward" + }, + { + "kind": "Unit", + "name": "MediaPause" + }, + { + "kind": "Unit", + "name": "MediaPlay" + }, + { + "kind": "Unit", + "name": "MediaPlayPause" + }, + { + "kind": "Unit", + "name": "MediaRecord" + }, + { + "kind": "Unit", + "name": "MediaRewind" + }, + { + "kind": "Unit", + "name": "MediaStop" + }, + { + "kind": "Unit", + "name": "MediaTrackNext" + }, + { + "kind": "Unit", + "name": "MediaTrackPrevious" + }, + { + "kind": "Unit", + "name": "New" + }, + { + "kind": "Unit", + "name": "Open" + }, + { + "kind": "Unit", + "name": "Print" + }, + { + "kind": "Unit", + "name": "Save" + }, + { + "kind": "Unit", + "name": "SpellCheck" + }, + { + "kind": "Unit", + "name": "Key11" + }, + { + "kind": "Unit", + "name": "Key12" + }, + { + "kind": "Unit", + "name": "AudioBalanceLeft" + }, + { + "kind": "Unit", + "name": "AudioBalanceRight" + }, + { + "kind": "Unit", + "name": "AudioBassBoostDown" + }, + { + "kind": "Unit", + "name": "AudioBassBoostToggle" + }, + { + "kind": "Unit", + "name": "AudioBassBoostUp" + }, + { + "kind": "Unit", + "name": "AudioFaderFront" + }, + { + "kind": "Unit", + "name": "AudioFaderRear" + }, + { + "kind": "Unit", + "name": "AudioSurroundModeNext" + }, + { + "kind": "Unit", + "name": "AudioTrebleDown" + }, + { + "kind": "Unit", + "name": "AudioTrebleUp" + }, + { + "kind": "Unit", + "name": "AudioVolumeDown" + }, + { + "kind": "Unit", + "name": "AudioVolumeUp" + }, + { + "kind": "Unit", + "name": "AudioVolumeMute" + }, + { + "kind": "Unit", + "name": "MicrophoneToggle" + }, + { + "kind": "Unit", + "name": "MicrophoneVolumeDown" + }, + { + "kind": "Unit", + "name": "MicrophoneVolumeUp" + }, + { + "kind": "Unit", + "name": "MicrophoneVolumeMute" + }, + { + "kind": "Unit", + "name": "SpeechCorrectionList" + }, + { + "kind": "Unit", + "name": "SpeechInputToggle" + }, + { + "kind": "Unit", + "name": "LaunchApplication1" + }, + { + "kind": "Unit", + "name": "LaunchApplication2" + }, + { + "kind": "Unit", + "name": "LaunchCalendar" + }, + { + "kind": "Unit", + "name": "LaunchContacts" + }, + { + "kind": "Unit", + "name": "LaunchMail" + }, + { + "kind": "Unit", + "name": "LaunchMediaPlayer" + }, + { + "kind": "Unit", + "name": "LaunchMusicPlayer" + }, + { + "kind": "Unit", + "name": "LaunchPhone" + }, + { + "kind": "Unit", + "name": "LaunchScreenSaver" + }, + { + "kind": "Unit", + "name": "LaunchSpreadsheet" + }, + { + "kind": "Unit", + "name": "LaunchWebBrowser" + }, + { + "kind": "Unit", + "name": "LaunchWebCam" + }, + { + "kind": "Unit", + "name": "LaunchWordProcessor" + }, + { + "kind": "Unit", + "name": "BrowserBack" + }, + { + "kind": "Unit", + "name": "BrowserFavorites" + }, + { + "kind": "Unit", + "name": "BrowserForward" + }, + { + "kind": "Unit", + "name": "BrowserHome" + }, + { + "kind": "Unit", + "name": "BrowserRefresh" + }, + { + "kind": "Unit", + "name": "BrowserSearch" + }, + { + "kind": "Unit", + "name": "BrowserStop" + }, + { + "kind": "Unit", + "name": "AppSwitch" + }, + { + "kind": "Unit", + "name": "Call" + }, + { + "kind": "Unit", + "name": "Camera" + }, + { + "kind": "Unit", + "name": "CameraFocus" + }, + { + "kind": "Unit", + "name": "EndCall" + }, + { + "kind": "Unit", + "name": "GoBack" + }, + { + "kind": "Unit", + "name": "GoHome" + }, + { + "kind": "Unit", + "name": "HeadsetHook" + }, + { + "kind": "Unit", + "name": "LastNumberRedial" + }, + { + "kind": "Unit", + "name": "Notification" + }, + { + "kind": "Unit", + "name": "MannerMode" + }, + { + "kind": "Unit", + "name": "VoiceDial" + }, + { + "kind": "Unit", + "name": "TV" + }, + { + "kind": "Unit", + "name": "TV3DMode" + }, + { + "kind": "Unit", + "name": "TVAntennaCable" + }, + { + "kind": "Unit", + "name": "TVAudioDescription" + }, + { + "kind": "Unit", + "name": "TVAudioDescriptionMixDown" + }, + { + "kind": "Unit", + "name": "TVAudioDescriptionMixUp" + }, + { + "kind": "Unit", + "name": "TVContentsMenu" + }, + { + "kind": "Unit", + "name": "TVDataService" + }, + { + "kind": "Unit", + "name": "TVInput" + }, + { + "kind": "Unit", + "name": "TVInputComponent1" + }, + { + "kind": "Unit", + "name": "TVInputComponent2" + }, + { + "kind": "Unit", + "name": "TVInputComposite1" + }, + { + "kind": "Unit", + "name": "TVInputComposite2" + }, + { + "kind": "Unit", + "name": "TVInputHDMI1" + }, + { + "kind": "Unit", + "name": "TVInputHDMI2" + }, + { + "kind": "Unit", + "name": "TVInputHDMI3" + }, + { + "kind": "Unit", + "name": "TVInputHDMI4" + }, + { + "kind": "Unit", + "name": "TVInputVGA1" + }, + { + "kind": "Unit", + "name": "TVMediaContext" + }, + { + "kind": "Unit", + "name": "TVNetwork" + }, + { + "kind": "Unit", + "name": "TVNumberEntry" + }, + { + "kind": "Unit", + "name": "TVPower" + }, + { + "kind": "Unit", + "name": "TVRadioService" + }, + { + "kind": "Unit", + "name": "TVSatellite" + }, + { + "kind": "Unit", + "name": "TVSatelliteBS" + }, + { + "kind": "Unit", + "name": "TVSatelliteCS" + }, + { + "kind": "Unit", + "name": "TVSatelliteToggle" + }, + { + "kind": "Unit", + "name": "TVTerrestrialAnalog" + }, + { + "kind": "Unit", + "name": "TVTerrestrialDigital" + }, + { + "kind": "Unit", + "name": "TVTimer" + }, + { + "kind": "Unit", + "name": "AVRInput" + }, + { + "kind": "Unit", + "name": "AVRPower" + }, + { + "kind": "Unit", + "name": "ColorF0Red" + }, + { + "kind": "Unit", + "name": "ColorF1Green" + }, + { + "kind": "Unit", + "name": "ColorF2Yellow" + }, + { + "kind": "Unit", + "name": "ColorF3Blue" + }, + { + "kind": "Unit", + "name": "ColorF4Grey" + }, + { + "kind": "Unit", + "name": "ColorF5Brown" + }, + { + "kind": "Unit", + "name": "ClosedCaptionToggle" + }, + { + "kind": "Unit", + "name": "Dimmer" + }, + { + "kind": "Unit", + "name": "DisplaySwap" + }, + { + "kind": "Unit", + "name": "DVR" + }, + { + "kind": "Unit", + "name": "Exit" + }, + { + "kind": "Unit", + "name": "FavoriteClear0" + }, + { + "kind": "Unit", + "name": "FavoriteClear1" + }, + { + "kind": "Unit", + "name": "FavoriteClear2" + }, + { + "kind": "Unit", + "name": "FavoriteClear3" + }, + { + "kind": "Unit", + "name": "FavoriteRecall0" + }, + { + "kind": "Unit", + "name": "FavoriteRecall1" + }, + { + "kind": "Unit", + "name": "FavoriteRecall2" + }, + { + "kind": "Unit", + "name": "FavoriteRecall3" + }, + { + "kind": "Unit", + "name": "FavoriteStore0" + }, + { + "kind": "Unit", + "name": "FavoriteStore1" + }, + { + "kind": "Unit", + "name": "FavoriteStore2" + }, + { + "kind": "Unit", + "name": "FavoriteStore3" + }, + { + "kind": "Unit", + "name": "Guide" + }, + { + "kind": "Unit", + "name": "GuideNextDay" + }, + { + "kind": "Unit", + "name": "GuidePreviousDay" + }, + { + "kind": "Unit", + "name": "Info" + }, + { + "kind": "Unit", + "name": "InstantReplay" + }, + { + "kind": "Unit", + "name": "Link" + }, + { + "kind": "Unit", + "name": "ListProgram" + }, + { + "kind": "Unit", + "name": "LiveContent" + }, + { + "kind": "Unit", + "name": "Lock" + }, + { + "kind": "Unit", + "name": "MediaApps" + }, + { + "kind": "Unit", + "name": "MediaAudioTrack" + }, + { + "kind": "Unit", + "name": "MediaLast" + }, + { + "kind": "Unit", + "name": "MediaSkipBackward" + }, + { + "kind": "Unit", + "name": "MediaSkipForward" + }, + { + "kind": "Unit", + "name": "MediaStepBackward" + }, + { + "kind": "Unit", + "name": "MediaStepForward" + }, + { + "kind": "Unit", + "name": "MediaTopMenu" + }, + { + "kind": "Unit", + "name": "NavigateIn" + }, + { + "kind": "Unit", + "name": "NavigateNext" + }, + { + "kind": "Unit", + "name": "NavigateOut" + }, + { + "kind": "Unit", + "name": "NavigatePrevious" + }, + { + "kind": "Unit", + "name": "NextFavoriteChannel" + }, + { + "kind": "Unit", + "name": "NextUserProfile" + }, + { + "kind": "Unit", + "name": "OnDemand" + }, + { + "kind": "Unit", + "name": "Pairing" + }, + { + "kind": "Unit", + "name": "PinPDown" + }, + { + "kind": "Unit", + "name": "PinPMove" + }, + { + "kind": "Unit", + "name": "PinPToggle" + }, + { + "kind": "Unit", + "name": "PinPUp" + }, + { + "kind": "Unit", + "name": "PlaySpeedDown" + }, + { + "kind": "Unit", + "name": "PlaySpeedReset" + }, + { + "kind": "Unit", + "name": "PlaySpeedUp" + }, + { + "kind": "Unit", + "name": "RandomToggle" + }, + { + "kind": "Unit", + "name": "RcLowBattery" + }, + { + "kind": "Unit", + "name": "RecordSpeedNext" + }, + { + "kind": "Unit", + "name": "RfBypass" + }, + { + "kind": "Unit", + "name": "ScanChannelsToggle" + }, + { + "kind": "Unit", + "name": "ScreenModeNext" + }, + { + "kind": "Unit", + "name": "Settings" + }, + { + "kind": "Unit", + "name": "SplitScreenToggle" + }, + { + "kind": "Unit", + "name": "STBInput" + }, + { + "kind": "Unit", + "name": "STBPower" + }, + { + "kind": "Unit", + "name": "Subtitle" + }, + { + "kind": "Unit", + "name": "Teletext" + }, + { + "kind": "Unit", + "name": "VideoModeNext" + }, + { + "kind": "Unit", + "name": "Wink" + }, + { + "kind": "Unit", + "name": "ZoomToggle" + }, + { + "kind": "Unit", + "name": "F1" + }, + { + "kind": "Unit", + "name": "F2" + }, + { + "kind": "Unit", + "name": "F3" + }, + { + "kind": "Unit", + "name": "F4" + }, + { + "kind": "Unit", + "name": "F5" + }, + { + "kind": "Unit", + "name": "F6" + }, + { + "kind": "Unit", + "name": "F7" + }, + { + "kind": "Unit", + "name": "F8" + }, + { + "kind": "Unit", + "name": "F9" + }, + { + "kind": "Unit", + "name": "F10" + }, + { + "kind": "Unit", + "name": "F11" + }, + { + "kind": "Unit", + "name": "F12" + }, + { + "kind": "Unit", + "name": "F13" + }, + { + "kind": "Unit", + "name": "F14" + }, + { + "kind": "Unit", + "name": "F15" + }, + { + "kind": "Unit", + "name": "F16" + }, + { + "kind": "Unit", + "name": "F17" + }, + { + "kind": "Unit", + "name": "F18" + }, + { + "kind": "Unit", + "name": "F19" + }, + { + "kind": "Unit", + "name": "F20" + }, + { + "kind": "Unit", + "name": "F21" + }, + { + "kind": "Unit", + "name": "F22" + }, + { + "kind": "Unit", + "name": "F23" + }, + { + "kind": "Unit", + "name": "F24" + }, + { + "kind": "Unit", + "name": "F25" + }, + { + "kind": "Unit", + "name": "F26" + }, + { + "kind": "Unit", + "name": "F27" + }, + { + "kind": "Unit", + "name": "F28" + }, + { + "kind": "Unit", + "name": "F29" + }, + { + "kind": "Unit", + "name": "F30" + }, + { + "kind": "Unit", + "name": "F31" + }, + { + "kind": "Unit", + "name": "F32" + }, + { + "kind": "Unit", + "name": "F33" + }, + { + "kind": "Unit", + "name": "F34" + }, + { + "kind": "Unit", + "name": "F35" + } + ] + }, + "bevy_input::keyboard::KeyCode": { + "identifier": "KeyCode", + "crate": "bevy_input", + "path": "bevy_input::keyboard::KeyCode", + "documentation": " The key code of a [`KeyboardInput`].\n\n ## Usage\n\n It is used as the generic `T` value of an [`ButtonInput`] to create a `Res>`.\n\n Code representing the location of a physical key\n This mostly conforms to the UI Events Specification's [`KeyboardEvent.code`] with a few\n exceptions:\n - The keys that the specification calls `MetaLeft` and `MetaRight` are named `SuperLeft` and\n `SuperRight` here.\n - The key that the specification calls \"Super\" is reported as `Unidentified` here.\n\n [`KeyboardEvent.code`]: https://w3c.github.io/uievents-code/#code-value-tables\n\n ## Updating\n\n The resource is updated inside of the [`keyboard_input_system`].", + "associated_functions": [ + "bevy_input::keyboard::KeyCode::assert_receiver_is_total_eq", + "bevy_input::keyboard::KeyCode::clone", + "bevy_input::keyboard::KeyCode::eq" + ], + "layout": [ + { + "kind": "TupleStruct", + "name": "Unidentified", + "fields": [ + { + "type": "bevy_input::keyboard::NativeKeyCode" + } + ] + }, + { + "kind": "Unit", + "name": "Backquote" + }, + { + "kind": "Unit", + "name": "Backslash" + }, + { + "kind": "Unit", + "name": "BracketLeft" + }, + { + "kind": "Unit", + "name": "BracketRight" + }, + { + "kind": "Unit", + "name": "Comma" + }, + { + "kind": "Unit", + "name": "Digit0" + }, + { + "kind": "Unit", + "name": "Digit1" + }, + { + "kind": "Unit", + "name": "Digit2" + }, + { + "kind": "Unit", + "name": "Digit3" + }, + { + "kind": "Unit", + "name": "Digit4" + }, + { + "kind": "Unit", + "name": "Digit5" + }, + { + "kind": "Unit", + "name": "Digit6" + }, + { + "kind": "Unit", + "name": "Digit7" + }, + { + "kind": "Unit", + "name": "Digit8" + }, + { + "kind": "Unit", + "name": "Digit9" + }, + { + "kind": "Unit", + "name": "Equal" + }, + { + "kind": "Unit", + "name": "IntlBackslash" + }, + { + "kind": "Unit", + "name": "IntlRo" + }, + { + "kind": "Unit", + "name": "IntlYen" + }, + { + "kind": "Unit", + "name": "KeyA" + }, + { + "kind": "Unit", + "name": "KeyB" + }, + { + "kind": "Unit", + "name": "KeyC" + }, + { + "kind": "Unit", + "name": "KeyD" + }, + { + "kind": "Unit", + "name": "KeyE" + }, + { + "kind": "Unit", + "name": "KeyF" + }, + { + "kind": "Unit", + "name": "KeyG" + }, + { + "kind": "Unit", + "name": "KeyH" + }, + { + "kind": "Unit", + "name": "KeyI" + }, + { + "kind": "Unit", + "name": "KeyJ" + }, + { + "kind": "Unit", + "name": "KeyK" + }, + { + "kind": "Unit", + "name": "KeyL" + }, + { + "kind": "Unit", + "name": "KeyM" + }, + { + "kind": "Unit", + "name": "KeyN" + }, + { + "kind": "Unit", + "name": "KeyO" + }, + { + "kind": "Unit", + "name": "KeyP" + }, + { + "kind": "Unit", + "name": "KeyQ" + }, + { + "kind": "Unit", + "name": "KeyR" + }, + { + "kind": "Unit", + "name": "KeyS" + }, + { + "kind": "Unit", + "name": "KeyT" + }, + { + "kind": "Unit", + "name": "KeyU" + }, + { + "kind": "Unit", + "name": "KeyV" + }, + { + "kind": "Unit", + "name": "KeyW" + }, + { + "kind": "Unit", + "name": "KeyX" + }, + { + "kind": "Unit", + "name": "KeyY" + }, + { + "kind": "Unit", + "name": "KeyZ" + }, + { + "kind": "Unit", + "name": "Minus" + }, + { + "kind": "Unit", + "name": "Period" + }, + { + "kind": "Unit", + "name": "Quote" + }, + { + "kind": "Unit", + "name": "Semicolon" + }, + { + "kind": "Unit", + "name": "Slash" + }, + { + "kind": "Unit", + "name": "AltLeft" + }, + { + "kind": "Unit", + "name": "AltRight" + }, + { + "kind": "Unit", + "name": "Backspace" + }, + { + "kind": "Unit", + "name": "CapsLock" + }, + { + "kind": "Unit", + "name": "ContextMenu" + }, + { + "kind": "Unit", + "name": "ControlLeft" + }, + { + "kind": "Unit", + "name": "ControlRight" + }, + { + "kind": "Unit", + "name": "Enter" + }, + { + "kind": "Unit", + "name": "SuperLeft" + }, + { + "kind": "Unit", + "name": "SuperRight" + }, + { + "kind": "Unit", + "name": "ShiftLeft" + }, + { + "kind": "Unit", + "name": "ShiftRight" + }, + { + "kind": "Unit", + "name": "Space" + }, + { + "kind": "Unit", + "name": "Tab" + }, + { + "kind": "Unit", + "name": "Convert" + }, + { + "kind": "Unit", + "name": "KanaMode" + }, + { + "kind": "Unit", + "name": "Lang1" + }, + { + "kind": "Unit", + "name": "Lang2" + }, + { + "kind": "Unit", + "name": "Lang3" + }, + { + "kind": "Unit", + "name": "Lang4" + }, + { + "kind": "Unit", + "name": "Lang5" + }, + { + "kind": "Unit", + "name": "NonConvert" + }, + { + "kind": "Unit", + "name": "Delete" + }, + { + "kind": "Unit", + "name": "End" + }, + { + "kind": "Unit", + "name": "Help" + }, + { + "kind": "Unit", + "name": "Home" + }, + { + "kind": "Unit", + "name": "Insert" + }, + { + "kind": "Unit", + "name": "PageDown" + }, + { + "kind": "Unit", + "name": "PageUp" + }, + { + "kind": "Unit", + "name": "ArrowDown" + }, + { + "kind": "Unit", + "name": "ArrowLeft" + }, + { + "kind": "Unit", + "name": "ArrowRight" + }, + { + "kind": "Unit", + "name": "ArrowUp" + }, + { + "kind": "Unit", + "name": "NumLock" + }, + { + "kind": "Unit", + "name": "Numpad0" + }, + { + "kind": "Unit", + "name": "Numpad1" + }, + { + "kind": "Unit", + "name": "Numpad2" + }, + { + "kind": "Unit", + "name": "Numpad3" + }, + { + "kind": "Unit", + "name": "Numpad4" + }, + { + "kind": "Unit", + "name": "Numpad5" + }, + { + "kind": "Unit", + "name": "Numpad6" + }, + { + "kind": "Unit", + "name": "Numpad7" + }, + { + "kind": "Unit", + "name": "Numpad8" + }, + { + "kind": "Unit", + "name": "Numpad9" + }, + { + "kind": "Unit", + "name": "NumpadAdd" + }, + { + "kind": "Unit", + "name": "NumpadBackspace" + }, + { + "kind": "Unit", + "name": "NumpadClear" + }, + { + "kind": "Unit", + "name": "NumpadClearEntry" + }, + { + "kind": "Unit", + "name": "NumpadComma" + }, + { + "kind": "Unit", + "name": "NumpadDecimal" + }, + { + "kind": "Unit", + "name": "NumpadDivide" + }, + { + "kind": "Unit", + "name": "NumpadEnter" + }, + { + "kind": "Unit", + "name": "NumpadEqual" + }, + { + "kind": "Unit", + "name": "NumpadHash" + }, + { + "kind": "Unit", + "name": "NumpadMemoryAdd" + }, + { + "kind": "Unit", + "name": "NumpadMemoryClear" + }, + { + "kind": "Unit", + "name": "NumpadMemoryRecall" + }, + { + "kind": "Unit", + "name": "NumpadMemoryStore" + }, + { + "kind": "Unit", + "name": "NumpadMemorySubtract" + }, + { + "kind": "Unit", + "name": "NumpadMultiply" + }, + { + "kind": "Unit", + "name": "NumpadParenLeft" + }, + { + "kind": "Unit", + "name": "NumpadParenRight" + }, + { + "kind": "Unit", + "name": "NumpadStar" + }, + { + "kind": "Unit", + "name": "NumpadSubtract" + }, + { + "kind": "Unit", + "name": "Escape" + }, + { + "kind": "Unit", + "name": "Fn" + }, + { + "kind": "Unit", + "name": "FnLock" + }, + { + "kind": "Unit", + "name": "PrintScreen" + }, + { + "kind": "Unit", + "name": "ScrollLock" + }, + { + "kind": "Unit", + "name": "Pause" + }, + { + "kind": "Unit", + "name": "BrowserBack" + }, + { + "kind": "Unit", + "name": "BrowserFavorites" + }, + { + "kind": "Unit", + "name": "BrowserForward" + }, + { + "kind": "Unit", + "name": "BrowserHome" + }, + { + "kind": "Unit", + "name": "BrowserRefresh" + }, + { + "kind": "Unit", + "name": "BrowserSearch" + }, + { + "kind": "Unit", + "name": "BrowserStop" + }, + { + "kind": "Unit", + "name": "Eject" + }, + { + "kind": "Unit", + "name": "LaunchApp1" + }, + { + "kind": "Unit", + "name": "LaunchApp2" + }, + { + "kind": "Unit", + "name": "LaunchMail" + }, + { + "kind": "Unit", + "name": "MediaPlayPause" + }, + { + "kind": "Unit", + "name": "MediaSelect" + }, + { + "kind": "Unit", + "name": "MediaStop" + }, + { + "kind": "Unit", + "name": "MediaTrackNext" + }, + { + "kind": "Unit", + "name": "MediaTrackPrevious" + }, + { + "kind": "Unit", + "name": "Power" + }, + { + "kind": "Unit", + "name": "Sleep" + }, + { + "kind": "Unit", + "name": "AudioVolumeDown" + }, + { + "kind": "Unit", + "name": "AudioVolumeMute" + }, + { + "kind": "Unit", + "name": "AudioVolumeUp" + }, + { + "kind": "Unit", + "name": "WakeUp" + }, + { + "kind": "Unit", + "name": "Meta" + }, + { + "kind": "Unit", + "name": "Hyper" + }, + { + "kind": "Unit", + "name": "Turbo" + }, + { + "kind": "Unit", + "name": "Abort" + }, + { + "kind": "Unit", + "name": "Resume" + }, + { + "kind": "Unit", + "name": "Suspend" + }, + { + "kind": "Unit", + "name": "Again" + }, + { + "kind": "Unit", + "name": "Copy" + }, + { + "kind": "Unit", + "name": "Cut" + }, + { + "kind": "Unit", + "name": "Find" + }, + { + "kind": "Unit", + "name": "Open" + }, + { + "kind": "Unit", + "name": "Paste" + }, + { + "kind": "Unit", + "name": "Props" + }, + { + "kind": "Unit", + "name": "Select" + }, + { + "kind": "Unit", + "name": "Undo" + }, + { + "kind": "Unit", + "name": "Hiragana" + }, + { + "kind": "Unit", + "name": "Katakana" + }, + { + "kind": "Unit", + "name": "F1" + }, + { + "kind": "Unit", + "name": "F2" + }, + { + "kind": "Unit", + "name": "F3" + }, + { + "kind": "Unit", + "name": "F4" + }, + { + "kind": "Unit", + "name": "F5" + }, + { + "kind": "Unit", + "name": "F6" + }, + { + "kind": "Unit", + "name": "F7" + }, + { + "kind": "Unit", + "name": "F8" + }, + { + "kind": "Unit", + "name": "F9" + }, + { + "kind": "Unit", + "name": "F10" + }, + { + "kind": "Unit", + "name": "F11" + }, + { + "kind": "Unit", + "name": "F12" + }, + { + "kind": "Unit", + "name": "F13" + }, + { + "kind": "Unit", + "name": "F14" + }, + { + "kind": "Unit", + "name": "F15" + }, + { + "kind": "Unit", + "name": "F16" + }, + { + "kind": "Unit", + "name": "F17" + }, + { + "kind": "Unit", + "name": "F18" + }, + { + "kind": "Unit", + "name": "F19" + }, + { + "kind": "Unit", + "name": "F20" + }, + { + "kind": "Unit", + "name": "F21" + }, + { + "kind": "Unit", + "name": "F22" + }, + { + "kind": "Unit", + "name": "F23" + }, + { + "kind": "Unit", + "name": "F24" + }, + { + "kind": "Unit", + "name": "F25" + }, + { + "kind": "Unit", + "name": "F26" + }, + { + "kind": "Unit", + "name": "F27" + }, + { + "kind": "Unit", + "name": "F28" + }, + { + "kind": "Unit", + "name": "F29" + }, + { + "kind": "Unit", + "name": "F30" + }, + { + "kind": "Unit", + "name": "F31" + }, + { + "kind": "Unit", + "name": "F32" + }, + { + "kind": "Unit", + "name": "F33" + }, + { + "kind": "Unit", + "name": "F34" + }, + { + "kind": "Unit", + "name": "F35" + } + ] + }, + "bevy_input::keyboard::KeyboardFocusLost": { + "identifier": "KeyboardFocusLost", + "crate": "bevy_input", + "path": "bevy_input::keyboard::KeyboardFocusLost", + "documentation": " Gets generated from `bevy_winit::winit_runner`\n\n Used for clearing all cached states to avoid having 'stuck' key presses\n when, for example, switching between windows with 'Alt-Tab' or using any other\n OS specific key combination that leads to Bevy window losing focus and not receiving any\n input events", + "associated_functions": [ + "bevy_input::keyboard::KeyboardFocusLost::assert_receiver_is_total_eq", + "bevy_input::keyboard::KeyboardFocusLost::clone", + "bevy_input::keyboard::KeyboardFocusLost::eq" + ], + "layout": { + "kind": "Struct", + "name": "KeyboardFocusLost" + } + }, + "bevy_input::keyboard::KeyboardInput": { + "identifier": "KeyboardInput", + "crate": "bevy_input", + "path": "bevy_input::keyboard::KeyboardInput", + "documentation": " A keyboard input event.\n\n This event is the translated version of the `WindowEvent::KeyboardInput` from the `winit` crate.\n It is available to the end user and can be used for game logic.\n\n ## Usage\n\n The event is consumed inside of the [`keyboard_input_system`]\n to update the [`ButtonInput`](ButtonInput) resource.", + "associated_functions": [ + "bevy_input::keyboard::KeyboardInput::assert_receiver_is_total_eq", + "bevy_input::keyboard::KeyboardInput::clone", + "bevy_input::keyboard::KeyboardInput::eq" + ], + "layout": { + "kind": "Struct", + "name": "KeyboardInput", + "fields": [ + { + "name": "key_code", + "type": "bevy_input::keyboard::KeyCode" + }, + { + "name": "logical_key", + "type": "bevy_input::keyboard::Key" + }, + { + "name": "state", + "type": "bevy_input::ButtonState" + }, + { + "name": "repeat", + "type": "bool" + }, + { + "name": "window", + "type": "bevy_ecs::entity::Entity" + } + ] + } + }, + "bevy_input::keyboard::NativeKey": { + "identifier": "NativeKey", + "crate": "bevy_input", + "path": "bevy_input::keyboard::NativeKey", + "documentation": " Contains the platform-native logical key identifier, known as keysym.\n\n Exactly what that means differs from platform to platform, but the values are to some degree\n tied to the currently active keyboard layout. The same key on the same keyboard may also report\n different values on different platforms, which is one of the reasons this is a per-platform\n enum.\n\n This enum is primarily used to store raw keysym when Winit doesn't map a given native logical\n key identifier to a meaningful [`Key`] variant. This lets you use [`Key`], and let the user\n define keybinds which work in the presence of identifiers we haven't mapped for you yet.", + "associated_functions": [ + "bevy_input::keyboard::NativeKey::assert_receiver_is_total_eq", + "bevy_input::keyboard::NativeKey::clone", + "bevy_input::keyboard::NativeKey::eq" + ], + "layout": [ + { + "kind": "Unit", + "name": "Unidentified" + }, + { + "kind": "TupleStruct", + "name": "Android", + "fields": [ + { + "type": "u32" + } + ] + }, + { + "kind": "TupleStruct", + "name": "MacOS", + "fields": [ + { + "type": "u16" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Windows", + "fields": [ + { + "type": "u16" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Xkb", + "fields": [ + { + "type": "u32" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Web", + "fields": [ + { + "type": "smol_str::SmolStr" + } + ] + } + ] + }, + "bevy_input::keyboard::NativeKeyCode": { + "identifier": "NativeKeyCode", + "crate": "bevy_input", + "path": "bevy_input::keyboard::NativeKeyCode", + "documentation": " Contains the platform-native physical key identifier\n\n The exact values vary from platform to platform (which is part of why this is a per-platform\n enum), but the values are primarily tied to the key's physical location on the keyboard.\n\n This enum is primarily used to store raw keycodes when Winit doesn't map a given native\n physical key identifier to a meaningful [`KeyCode`] variant. In the presence of identifiers we\n haven't mapped for you yet, this lets you use [`KeyCode`] to:\n\n - Correctly match key press and release events.\n - On non-web platforms, support assigning keybinds to virtually any key through a UI.", + "associated_functions": [ + "bevy_input::keyboard::NativeKeyCode::assert_receiver_is_total_eq", + "bevy_input::keyboard::NativeKeyCode::clone", + "bevy_input::keyboard::NativeKeyCode::eq" + ], + "layout": [ + { + "kind": "Unit", + "name": "Unidentified" + }, + { + "kind": "TupleStruct", + "name": "Android", + "fields": [ + { + "type": "u32" + } + ] + }, + { + "kind": "TupleStruct", + "name": "MacOS", + "fields": [ + { + "type": "u16" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Windows", + "fields": [ + { + "type": "u16" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Xkb", + "fields": [ + { + "type": "u32" + } + ] + } + ] + }, + "bevy_input::mouse::AccumulatedMouseMotion": { + "identifier": "AccumulatedMouseMotion", + "crate": "bevy_input", + "path": "bevy_input::mouse::AccumulatedMouseMotion", + "documentation": " Tracks how much the mouse has moved every frame.\n\n This resource is reset to zero every frame.\n\n This resource sums the total [`MouseMotion`] events received this frame.", + "associated_functions": [ + "bevy_input::mouse::AccumulatedMouseMotion::clone", + "bevy_input::mouse::AccumulatedMouseMotion::eq" + ], + "layout": { + "kind": "Struct", + "name": "AccumulatedMouseMotion", + "fields": [ + { + "name": "delta", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_input::mouse::AccumulatedMouseScroll": { + "identifier": "AccumulatedMouseScroll", + "crate": "bevy_input", + "path": "bevy_input::mouse::AccumulatedMouseScroll", + "documentation": " Tracks how much the mouse has scrolled every frame.\n\n This resource is reset to zero every frame.\n\n This resource sums the total [`MouseWheel`] events received this frame.", + "associated_functions": [ + "bevy_input::mouse::AccumulatedMouseScroll::clone", + "bevy_input::mouse::AccumulatedMouseScroll::eq" + ], + "layout": { + "kind": "Struct", + "name": "AccumulatedMouseScroll", + "fields": [ + { + "name": "unit", + "type": "bevy_input::mouse::MouseScrollUnit" + }, + { + "name": "delta", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_input::mouse::MouseButton": { + "identifier": "MouseButton", + "crate": "bevy_input", + "path": "bevy_input::mouse::MouseButton", + "documentation": " A button on a mouse device.\n\n ## Usage\n\n It is used as the generic `T` value of an [`ButtonInput`] to create a `bevy`\n resource.\n\n ## Updating\n\n The resource is updated inside of the [`mouse_button_input_system`].", + "associated_functions": [ + "bevy_input::mouse::MouseButton::assert_receiver_is_total_eq", + "bevy_input::mouse::MouseButton::clone", + "bevy_input::mouse::MouseButton::eq" + ], + "layout": [ + { + "kind": "Unit", + "name": "Left" + }, + { + "kind": "Unit", + "name": "Right" + }, + { + "kind": "Unit", + "name": "Middle" + }, + { + "kind": "Unit", + "name": "Back" + }, + { + "kind": "Unit", + "name": "Forward" + }, + { + "kind": "TupleStruct", + "name": "Other", + "fields": [ + { + "type": "u16" + } + ] + } + ] + }, + "bevy_input::mouse::MouseButtonInput": { + "identifier": "MouseButtonInput", + "crate": "bevy_input", + "path": "bevy_input::mouse::MouseButtonInput", + "documentation": " A mouse button input event.\n\n This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate.\n\n ## Usage\n\n The event is read inside of the [`mouse_button_input_system`]\n to update the [`ButtonInput`] resource.", + "associated_functions": [ + "bevy_input::mouse::MouseButtonInput::assert_receiver_is_total_eq", + "bevy_input::mouse::MouseButtonInput::clone", + "bevy_input::mouse::MouseButtonInput::eq" + ], + "layout": { + "kind": "Struct", + "name": "MouseButtonInput", + "fields": [ + { + "name": "button", + "type": "bevy_input::mouse::MouseButton" + }, + { + "name": "state", + "type": "bevy_input::ButtonState" + }, + { + "name": "window", + "type": "bevy_ecs::entity::Entity" + } + ] + } + }, + "bevy_input::mouse::MouseMotion": { + "identifier": "MouseMotion", + "crate": "bevy_input", + "path": "bevy_input::mouse::MouseMotion", + "documentation": " An event reporting the change in physical position of a pointing device.\n\n This represents raw, unfiltered physical motion.\n It is the translated version of [`DeviceEvent::MouseMotion`] from the `winit` crate.\n\n All pointing devices connected to a single machine at the same time can emit the event independently.\n However, the event data does not make it possible to distinguish which device it is referring to.\n\n [`DeviceEvent::MouseMotion`]: https://docs.rs/winit/latest/winit/event/enum.DeviceEvent.html#variant.MouseMotion", + "associated_functions": [ + "bevy_input::mouse::MouseMotion::clone", + "bevy_input::mouse::MouseMotion::eq" + ], + "layout": { + "kind": "Struct", + "name": "MouseMotion", + "fields": [ + { + "name": "delta", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_input::mouse::MouseScrollUnit": { + "identifier": "MouseScrollUnit", + "crate": "bevy_input", + "path": "bevy_input::mouse::MouseScrollUnit", + "documentation": " The scroll unit.\n\n Describes how a value of a [`MouseWheel`] event has to be interpreted.\n\n The value of the event can either be interpreted as the amount of lines or the amount of pixels\n to scroll.", + "associated_functions": [ + "bevy_input::mouse::MouseScrollUnit::assert_receiver_is_total_eq", + "bevy_input::mouse::MouseScrollUnit::clone", + "bevy_input::mouse::MouseScrollUnit::eq" + ], + "layout": [ + { + "kind": "Unit", + "name": "Line" + }, + { + "kind": "Unit", + "name": "Pixel" + } + ] + }, + "bevy_input::mouse::MouseWheel": { + "identifier": "MouseWheel", + "crate": "bevy_input", + "path": "bevy_input::mouse::MouseWheel", + "documentation": " A mouse wheel event.\n\n This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate.", + "associated_functions": [ + "bevy_input::mouse::MouseWheel::clone", + "bevy_input::mouse::MouseWheel::eq" + ], + "layout": { + "kind": "Struct", + "name": "MouseWheel", + "fields": [ + { + "name": "unit", + "type": "bevy_input::mouse::MouseScrollUnit" + }, + { + "name": "x", + "type": "f32" + }, + { + "name": "y", + "type": "f32" + }, + { + "name": "window", + "type": "bevy_ecs::entity::Entity" + } + ] + } + }, + "bevy_input::touch::ForceTouch": { + "identifier": "ForceTouch", + "crate": "bevy_input", + "path": "bevy_input::touch::ForceTouch", + "documentation": " A force description of a [`Touch`] input.", + "associated_functions": [ + "bevy_input::touch::ForceTouch::clone", + "bevy_input::touch::ForceTouch::eq" + ], + "layout": [ + { + "kind": "Struct", + "name": "Calibrated", + "fields": [ + { + "name": "force", + "type": "f64" + }, + { + "name": "max_possible_force", + "type": "f64" + }, + { + "name": "altitude_angle", + "type": "core::option::Option" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Normalized", + "fields": [ + { + "type": "f64" + } + ] + } + ] + }, + "bevy_input::touch::TouchInput": { + "identifier": "TouchInput", + "crate": "bevy_input", + "path": "bevy_input::touch::TouchInput", + "documentation": " A touch input event.\n\n ## Logic\n\n Every time the user touches the screen, a new [`TouchPhase::Started`] event with an unique\n identifier for the finger is generated. When the finger is lifted, the [`TouchPhase::Ended`]\n event is generated with the same finger id.\n\n After a [`TouchPhase::Started`] event has been emitted, there may be zero or more [`TouchPhase::Moved`]\n events when the finger is moved or the touch pressure changes.\n\n The finger id may be reused by the system after an [`TouchPhase::Ended`] event. The user\n should assume that a new [`TouchPhase::Started`] event received with the same id has nothing\n to do with the old finger and is a new finger.\n\n A [`TouchPhase::Canceled`] event is emitted when the system has canceled tracking this\n touch, such as when the window loses focus, or on iOS if the user moves the\n device against their face.\n\n ## Note\n\n This event is the translated version of the `WindowEvent::Touch` from the `winit` crate.\n It is available to the end user and can be used for game logic.", + "associated_functions": [ + "bevy_input::touch::TouchInput::clone", + "bevy_input::touch::TouchInput::eq" + ], + "layout": { + "kind": "Struct", + "name": "TouchInput", + "fields": [ + { + "name": "phase", + "type": "bevy_input::touch::TouchPhase" + }, + { + "name": "position", + "type": "glam::Vec2" + }, + { + "name": "window", + "type": "bevy_ecs::entity::Entity" + }, + { + "name": "force", + "type": "core::option::Option" + }, + { + "name": "id", + "type": "u64" + } + ] + } + }, + "bevy_input::touch::TouchPhase": { + "identifier": "TouchPhase", + "crate": "bevy_input", + "path": "bevy_input::touch::TouchPhase", + "documentation": " A phase of a [`TouchInput`].\n\n ## Usage\n\n It is used to describe the phase of the touch input that is currently active.\n This includes a phase that indicates that a touch input has started or ended,\n or that a finger has moved. There is also a canceled phase that indicates that\n the system canceled the tracking of the finger.", + "associated_functions": [ + "bevy_input::touch::TouchPhase::assert_receiver_is_total_eq", + "bevy_input::touch::TouchPhase::clone", + "bevy_input::touch::TouchPhase::eq" + ], + "layout": [ + { + "kind": "Unit", + "name": "Started" + }, + { + "kind": "Unit", + "name": "Moved" + }, + { + "kind": "Unit", + "name": "Ended" + }, + { + "kind": "Unit", + "name": "Canceled" + } + ] + }, + "bevy_math::affine3::Affine3": { + "identifier": "Affine3", + "crate": "bevy_math", + "path": "bevy_math::affine3::Affine3", + "documentation": " Reduced-size version of `glam::Affine3A` for use when storage has\n significant performance impact. Convert to `glam::Affine3A` to do\n non-trivial calculations.", + "layout": { + "kind": "Struct", + "name": "Affine3", + "fields": [ + { + "name": "matrix3", + "type": "glam::Mat3" + }, + { + "name": "translation", + "type": "glam::Vec3" + } + ] + } + }, + "bevy_math::aspect_ratio::AspectRatio": { + "identifier": "AspectRatio", + "crate": "bevy_math", + "path": "bevy_math::aspect_ratio::AspectRatio", + "documentation": " An `AspectRatio` is the ratio of width to height.", + "associated_functions": [ + "bevy_math::aspect_ratio::AspectRatio::clone", + "bevy_math::aspect_ratio::AspectRatio::eq", + "bevy_math::aspect_ratio::AspectRatio::inverse", + "bevy_math::aspect_ratio::AspectRatio::is_landscape", + "bevy_math::aspect_ratio::AspectRatio::is_portrait", + "bevy_math::aspect_ratio::AspectRatio::is_square", + "bevy_math::aspect_ratio::AspectRatio::ratio" + ], + "layout": { + "kind": "TupleStruct", + "name": "AspectRatio", + "fields": [ + { + "type": "f32" + } + ] + } + }, + "bevy_math::bounding::bounded2d::Aabb2d": { + "identifier": "Aabb2d", + "crate": "bevy_math", + "path": "bevy_math::bounding::bounded2d::Aabb2d", + "documentation": " A 2D axis-aligned bounding box, or bounding rectangle", + "associated_functions": [ + "bevy_math::bounding::bounded2d::Aabb2d::bounding_circle", + "bevy_math::bounding::bounded2d::Aabb2d::clone", + "bevy_math::bounding::bounded2d::Aabb2d::closest_point", + "bevy_math::bounding::bounded2d::Aabb2d::new" + ], + "layout": { + "kind": "Struct", + "name": "Aabb2d", + "fields": [ + { + "name": "min", + "type": "glam::Vec2" + }, + { + "name": "max", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_math::bounding::bounded2d::BoundingCircle": { + "identifier": "BoundingCircle", + "crate": "bevy_math", + "path": "bevy_math::bounding::bounded2d::BoundingCircle", + "documentation": " A bounding circle", + "associated_functions": [ + "bevy_math::bounding::bounded2d::BoundingCircle::aabb_2d", + "bevy_math::bounding::bounded2d::BoundingCircle::clone", + "bevy_math::bounding::bounded2d::BoundingCircle::closest_point", + "bevy_math::bounding::bounded2d::BoundingCircle::new", + "bevy_math::bounding::bounded2d::BoundingCircle::radius" + ], + "layout": { + "kind": "Struct", + "name": "BoundingCircle", + "fields": [ + { + "name": "center", + "type": "glam::Vec2" + }, + { + "name": "circle", + "type": "bevy_math::primitives::dim2::Circle" + } + ] + } + }, + "bevy_math::bounding::bounded3d::Aabb3d": { + "identifier": "Aabb3d", + "crate": "bevy_math", + "path": "bevy_math::bounding::bounded3d::Aabb3d", + "documentation": " A 3D axis-aligned bounding box", + "associated_functions": [ + "bevy_math::bounding::bounded3d::Aabb3d::bounding_sphere", + "bevy_math::bounding::bounded3d::Aabb3d::clone" + ], + "layout": { + "kind": "Struct", + "name": "Aabb3d", + "fields": [ + { + "name": "min", + "type": "glam::Vec3A" + }, + { + "name": "max", + "type": "glam::Vec3A" + } + ] + } + }, + "bevy_math::bounding::bounded3d::BoundingSphere": { + "identifier": "BoundingSphere", + "crate": "bevy_math", + "path": "bevy_math::bounding::bounded3d::BoundingSphere", + "documentation": " A bounding sphere", + "associated_functions": [ + "bevy_math::bounding::bounded3d::BoundingSphere::aabb_3d", + "bevy_math::bounding::bounded3d::BoundingSphere::clone", + "bevy_math::bounding::bounded3d::BoundingSphere::radius" + ], + "layout": { + "kind": "Struct", + "name": "BoundingSphere", + "fields": [ + { + "name": "center", + "type": "glam::Vec3A" + }, + { + "name": "sphere", + "type": "bevy_math::primitives::dim3::Sphere" + } + ] + } + }, + "bevy_math::bounding::raycast2d::AabbCast2d": { + "identifier": "AabbCast2d", + "crate": "bevy_math", + "path": "bevy_math::bounding::raycast2d::AabbCast2d", + "documentation": " An intersection test that casts an [`Aabb2d`] along a ray.", + "associated_functions": [ + "bevy_math::bounding::raycast2d::AabbCast2d::aabb_collision_at", + "bevy_math::bounding::raycast2d::AabbCast2d::clone", + "bevy_math::bounding::raycast2d::AabbCast2d::from_ray", + "bevy_math::bounding::raycast2d::AabbCast2d::new" + ], + "layout": { + "kind": "Struct", + "name": "AabbCast2d", + "fields": [ + { + "name": "ray", + "type": "bevy_math::bounding::raycast2d::RayCast2d" + }, + { + "name": "aabb", + "type": "bevy_math::bounding::bounded2d::Aabb2d" + } + ] + } + }, + "bevy_math::bounding::raycast2d::BoundingCircleCast": { + "identifier": "BoundingCircleCast", + "crate": "bevy_math", + "path": "bevy_math::bounding::raycast2d::BoundingCircleCast", + "documentation": " An intersection test that casts a [`BoundingCircle`] along a ray.", + "associated_functions": [ + "bevy_math::bounding::raycast2d::BoundingCircleCast::circle_collision_at", + "bevy_math::bounding::raycast2d::BoundingCircleCast::clone", + "bevy_math::bounding::raycast2d::BoundingCircleCast::from_ray", + "bevy_math::bounding::raycast2d::BoundingCircleCast::new" + ], + "layout": { + "kind": "Struct", + "name": "BoundingCircleCast", + "fields": [ + { + "name": "ray", + "type": "bevy_math::bounding::raycast2d::RayCast2d" + }, + { + "name": "circle", + "type": "bevy_math::bounding::bounded2d::BoundingCircle" + } + ] + } + }, + "bevy_math::bounding::raycast2d::RayCast2d": { + "identifier": "RayCast2d", + "crate": "bevy_math", + "path": "bevy_math::bounding::raycast2d::RayCast2d", + "documentation": " A raycast intersection test for 2D bounding volumes", + "associated_functions": [ + "bevy_math::bounding::raycast2d::RayCast2d::aabb_intersection_at", + "bevy_math::bounding::raycast2d::RayCast2d::circle_intersection_at", + "bevy_math::bounding::raycast2d::RayCast2d::clone", + "bevy_math::bounding::raycast2d::RayCast2d::direction_recip", + "bevy_math::bounding::raycast2d::RayCast2d::from_ray", + "bevy_math::bounding::raycast2d::RayCast2d::new" + ], + "layout": { + "kind": "Struct", + "name": "RayCast2d", + "fields": [ + { + "name": "ray", + "type": "bevy_math::ray::Ray2d" + }, + { + "name": "max", + "type": "f32" + }, + { + "name": "direction_recip", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_math::bounding::raycast3d::AabbCast3d": { + "identifier": "AabbCast3d", + "crate": "bevy_math", + "path": "bevy_math::bounding::raycast3d::AabbCast3d", + "documentation": " An intersection test that casts an [`Aabb3d`] along a ray.", + "associated_functions": [ + "bevy_math::bounding::raycast3d::AabbCast3d::aabb_collision_at", + "bevy_math::bounding::raycast3d::AabbCast3d::clone", + "bevy_math::bounding::raycast3d::AabbCast3d::from_ray" + ], + "layout": { + "kind": "Struct", + "name": "AabbCast3d", + "fields": [ + { + "name": "ray", + "type": "bevy_math::bounding::raycast3d::RayCast3d" + }, + { + "name": "aabb", + "type": "bevy_math::bounding::bounded3d::Aabb3d" + } + ] + } + }, + "bevy_math::bounding::raycast3d::BoundingSphereCast": { + "identifier": "BoundingSphereCast", + "crate": "bevy_math", + "path": "bevy_math::bounding::raycast3d::BoundingSphereCast", + "documentation": " An intersection test that casts a [`BoundingSphere`] along a ray.", + "associated_functions": [ + "bevy_math::bounding::raycast3d::BoundingSphereCast::clone", + "bevy_math::bounding::raycast3d::BoundingSphereCast::from_ray", + "bevy_math::bounding::raycast3d::BoundingSphereCast::sphere_collision_at" + ], + "layout": { + "kind": "Struct", + "name": "BoundingSphereCast", + "fields": [ + { + "name": "ray", + "type": "bevy_math::bounding::raycast3d::RayCast3d" + }, + { + "name": "sphere", + "type": "bevy_math::bounding::bounded3d::BoundingSphere" + } + ] + } + }, + "bevy_math::bounding::raycast3d::RayCast3d": { + "identifier": "RayCast3d", + "crate": "bevy_math", + "path": "bevy_math::bounding::raycast3d::RayCast3d", + "documentation": " A raycast intersection test for 3D bounding volumes", + "associated_functions": [ + "bevy_math::bounding::raycast3d::RayCast3d::aabb_intersection_at", + "bevy_math::bounding::raycast3d::RayCast3d::clone", + "bevy_math::bounding::raycast3d::RayCast3d::direction_recip", + "bevy_math::bounding::raycast3d::RayCast3d::from_ray", + "bevy_math::bounding::raycast3d::RayCast3d::sphere_intersection_at" + ], + "layout": { + "kind": "Struct", + "name": "RayCast3d", + "fields": [ + { + "name": "origin", + "type": "glam::Vec3A" + }, + { + "name": "direction", + "type": "bevy_math::direction::Dir3A" + }, + { + "name": "max", + "type": "f32" + }, + { + "name": "direction_recip", + "type": "glam::Vec3A" + } + ] + } + }, + "bevy_math::compass::CompassOctant": { + "identifier": "CompassOctant", + "crate": "bevy_math", + "path": "bevy_math::compass::CompassOctant", + "documentation": " A compass enum with 8 directions.\n ```text\n N (North)\n ▲\n NW │ NE\n ╲ │ ╱\n W (West) ┼─────► E (East)\n ╱ │ ╲\n SW │ SE\n ▼\n S (South)\n ```", + "associated_functions": [ + "bevy_math::compass::CompassOctant::assert_receiver_is_total_eq", + "bevy_math::compass::CompassOctant::clone", + "bevy_math::compass::CompassOctant::eq" + ], + "layout": [ + { + "kind": "Unit", + "name": "North" + }, + { + "kind": "Unit", + "name": "NorthEast" + }, + { + "kind": "Unit", + "name": "East" + }, + { + "kind": "Unit", + "name": "SouthEast" + }, + { + "kind": "Unit", + "name": "South" + }, + { + "kind": "Unit", + "name": "SouthWest" + }, + { + "kind": "Unit", + "name": "West" + }, + { + "kind": "Unit", + "name": "NorthWest" + } + ] + }, + "bevy_math::compass::CompassQuadrant": { + "identifier": "CompassQuadrant", + "crate": "bevy_math", + "path": "bevy_math::compass::CompassQuadrant", + "documentation": " A compass enum with 4 directions.\n ```text\n N (North)\n ▲\n │\n │\n W (West) ┼─────► E (East)\n │\n │\n ▼\n S (South)\n ```", + "associated_functions": [ + "bevy_math::compass::CompassQuadrant::assert_receiver_is_total_eq", + "bevy_math::compass::CompassQuadrant::clone", + "bevy_math::compass::CompassQuadrant::eq" + ], + "layout": [ + { + "kind": "Unit", + "name": "North" + }, + { + "kind": "Unit", + "name": "East" + }, + { + "kind": "Unit", + "name": "South" + }, + { + "kind": "Unit", + "name": "West" + } + ] + }, + "bevy_math::curve::easing::EaseFunction": { + "identifier": "EaseFunction", + "crate": "bevy_math", + "path": "bevy_math::curve::easing::EaseFunction", + "documentation": " Curve functions over the [unit interval], commonly used for easing transitions.\n\n [unit interval]: `Interval::UNIT`", + "associated_functions": [ + "bevy_math::curve::easing::EaseFunction::clone", + "bevy_math::curve::easing::EaseFunction::eq" + ], + "layout": [ + { + "kind": "Unit", + "name": "Linear" + }, + { + "kind": "Unit", + "name": "QuadraticIn" + }, + { + "kind": "Unit", + "name": "QuadraticOut" + }, + { + "kind": "Unit", + "name": "QuadraticInOut" + }, + { + "kind": "Unit", + "name": "CubicIn" + }, + { + "kind": "Unit", + "name": "CubicOut" + }, + { + "kind": "Unit", + "name": "CubicInOut" + }, + { + "kind": "Unit", + "name": "QuarticIn" + }, + { + "kind": "Unit", + "name": "QuarticOut" + }, + { + "kind": "Unit", + "name": "QuarticInOut" + }, + { + "kind": "Unit", + "name": "QuinticIn" + }, + { + "kind": "Unit", + "name": "QuinticOut" + }, + { + "kind": "Unit", + "name": "QuinticInOut" + }, + { + "kind": "Unit", + "name": "SineIn" + }, + { + "kind": "Unit", + "name": "SineOut" + }, + { + "kind": "Unit", + "name": "SineInOut" + }, + { + "kind": "Unit", + "name": "CircularIn" + }, + { + "kind": "Unit", + "name": "CircularOut" + }, + { + "kind": "Unit", + "name": "CircularInOut" + }, + { + "kind": "Unit", + "name": "ExponentialIn" + }, + { + "kind": "Unit", + "name": "ExponentialOut" + }, + { + "kind": "Unit", + "name": "ExponentialInOut" + }, + { + "kind": "Unit", + "name": "ElasticIn" + }, + { + "kind": "Unit", + "name": "ElasticOut" + }, + { + "kind": "Unit", + "name": "ElasticInOut" + }, + { + "kind": "Unit", + "name": "BackIn" + }, + { + "kind": "Unit", + "name": "BackOut" + }, + { + "kind": "Unit", + "name": "BackInOut" + }, + { + "kind": "Unit", + "name": "BounceIn" + }, + { + "kind": "Unit", + "name": "BounceOut" + }, + { + "kind": "Unit", + "name": "BounceInOut" + }, + { + "kind": "TupleStruct", + "name": "Steps", + "fields": [ + { + "type": "usize" + } + ] + }, + { + "kind": "TupleStruct", + "name": "Elastic", + "fields": [ + { + "type": "f32" + } + ] + } + ] + }, + "bevy_math::curve::interval::Interval": { + "identifier": "Interval", + "crate": "bevy_math", + "path": "bevy_math::curve::interval::Interval", + "documentation": " A nonempty closed interval, possibly unbounded in either direction.\n\n In other words, the interval may stretch all the way to positive or negative infinity, but it\n will always have some nonempty interior.", + "associated_functions": [ + "bevy_math::curve::interval::Interval::clamp", + "bevy_math::curve::interval::Interval::clone", + "bevy_math::curve::interval::Interval::contains", + "bevy_math::curve::interval::Interval::contains_interval", + "bevy_math::curve::interval::Interval::end", + "bevy_math::curve::interval::Interval::eq", + "bevy_math::curve::interval::Interval::has_finite_end", + "bevy_math::curve::interval::Interval::has_finite_start", + "bevy_math::curve::interval::Interval::is_bounded", + "bevy_math::curve::interval::Interval::length", + "bevy_math::curve::interval::Interval::start" + ], + "layout": { + "kind": "Struct", + "name": "Interval", + "fields": [ + { + "name": "start", + "type": "f32" + }, + { + "name": "end", + "type": "f32" + } + ] + } + }, + "bevy_math::direction::Dir2": { + "identifier": "Dir2", + "crate": "bevy_math", + "path": "bevy_math::direction::Dir2", + "documentation": " A normalized vector pointing in a direction in 2D space", + "associated_functions": [ + "bevy_math::direction::Dir2::as_vec2", + "bevy_math::direction::Dir2::clone", + "bevy_math::direction::Dir2::eq", + "bevy_math::direction::Dir2::fast_renormalize", + "bevy_math::direction::Dir2::from_xy_unchecked", + "bevy_math::direction::Dir2::mul", + "bevy_math::direction::Dir2::neg", + "bevy_math::direction::Dir2::new_unchecked", + "bevy_math::direction::Dir2::rotation_from", + "bevy_math::direction::Dir2::rotation_from_x", + "bevy_math::direction::Dir2::rotation_from_y", + "bevy_math::direction::Dir2::rotation_to", + "bevy_math::direction::Dir2::rotation_to_x", + "bevy_math::direction::Dir2::rotation_to_y", + "bevy_math::direction::Dir2::slerp" + ], + "layout": { + "kind": "TupleStruct", + "name": "Dir2", + "fields": [ + { + "type": "glam::Vec2" + } + ] + } + }, + "bevy_math::direction::Dir3": { + "identifier": "Dir3", + "crate": "bevy_math", + "path": "bevy_math::direction::Dir3", + "documentation": " A normalized vector pointing in a direction in 3D space", + "associated_functions": [ + "bevy_math::direction::Dir3::as_vec3", + "bevy_math::direction::Dir3::clone", + "bevy_math::direction::Dir3::eq", + "bevy_math::direction::Dir3::fast_renormalize", + "bevy_math::direction::Dir3::from_xyz_unchecked", + "bevy_math::direction::Dir3::mul", + "bevy_math::direction::Dir3::neg", + "bevy_math::direction::Dir3::new_unchecked", + "bevy_math::direction::Dir3::slerp" + ], + "layout": { + "kind": "TupleStruct", + "name": "Dir3", + "fields": [ + { + "type": "glam::Vec3" + } + ] + } + }, + "bevy_math::direction::Dir3A": { + "identifier": "Dir3A", + "crate": "bevy_math", + "path": "bevy_math::direction::Dir3A", + "documentation": " A normalized SIMD vector pointing in a direction in 3D space.\n\n This type stores a 16 byte aligned [`Vec3A`].\n This may or may not be faster than [`Dir3`]: make sure to benchmark!", + "associated_functions": [ + "bevy_math::direction::Dir3A::as_vec3a", + "bevy_math::direction::Dir3A::clone", + "bevy_math::direction::Dir3A::eq", + "bevy_math::direction::Dir3A::fast_renormalize", + "bevy_math::direction::Dir3A::from_xyz_unchecked", + "bevy_math::direction::Dir3A::mul", + "bevy_math::direction::Dir3A::neg", + "bevy_math::direction::Dir3A::new_unchecked", + "bevy_math::direction::Dir3A::slerp" + ], + "layout": { + "kind": "TupleStruct", + "name": "Dir3A", + "fields": [ + { + "type": "glam::Vec3A" + } + ] + } + }, + "bevy_math::float_ord::FloatOrd": { + "identifier": "FloatOrd", + "crate": "bevy_math", + "path": "bevy_math::float_ord::FloatOrd", + "documentation": " A wrapper for floats that implements [`Ord`], [`Eq`], and [`Hash`] traits.\n\n This is a work around for the fact that the IEEE 754-2008 standard,\n implemented by Rust's [`f32`] type,\n doesn't define an ordering for [`NaN`](f32::NAN),\n and `NaN` is not considered equal to any other `NaN`.\n\n Wrapping a float with `FloatOrd` breaks conformance with the standard\n by sorting `NaN` as less than all other numbers and equal to any other `NaN`.", + "associated_functions": [ + "bevy_math::float_ord::FloatOrd::clone", + "bevy_math::float_ord::FloatOrd::eq", + "bevy_math::float_ord::FloatOrd::ge", + "bevy_math::float_ord::FloatOrd::gt", + "bevy_math::float_ord::FloatOrd::le", + "bevy_math::float_ord::FloatOrd::lt", + "bevy_math::float_ord::FloatOrd::neg" + ], + "layout": { + "kind": "TupleStruct", + "name": "FloatOrd", + "fields": [ + { + "type": "f32" + } + ] + } + }, + "bevy_math::isometry::Isometry2d": { + "identifier": "Isometry2d", + "crate": "bevy_math", + "path": "bevy_math::isometry::Isometry2d", + "documentation": " An isometry in two dimensions, representing a rotation followed by a translation.\n This can often be useful for expressing relative positions and transformations from one position to another.\n\n In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,\n and belongs to the special [Euclidean group] SE(2). This includes translation and rotation, but excludes reflection.\n\n For the three-dimensional version, see [`Isometry3d`].\n\n [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group\n\n # Example\n\n Isometries can be created from a given translation and rotation:\n\n ```\n # use bevy_math::{Isometry2d, Rot2, Vec2};\n #\n let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));\n ```\n\n Or from separate parts:\n\n ```\n # use bevy_math::{Isometry2d, Rot2, Vec2};\n #\n let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));\n let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));\n ```\n\n The isometries can be used to transform points:\n\n ```\n # use approx::assert_abs_diff_eq;\n # use bevy_math::{Isometry2d, Rot2, Vec2};\n #\n let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));\n let point = Vec2::new(4.0, 4.0);\n\n // These are equivalent\n let result = iso.transform_point(point);\n let result = iso * point;\n\n assert_eq!(result, Vec2::new(-2.0, 5.0));\n ```\n\n Isometries can also be composed together:\n\n ```\n # use bevy_math::{Isometry2d, Rot2, Vec2};\n #\n # let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));\n # let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));\n # let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));\n #\n assert_eq!(iso1 * iso2, iso);\n ```\n\n One common operation is to compute an isometry representing the relative positions of two objects\n for things like intersection tests. This can be done with an inverse transformation:\n\n ```\n # use bevy_math::{Isometry2d, Rot2, Vec2};\n #\n let circle_iso = Isometry2d::from_translation(Vec2::new(2.0, 1.0));\n let rectangle_iso = Isometry2d::from_rotation(Rot2::degrees(90.0));\n\n // Compute the relative position and orientation between the two shapes\n let relative_iso = circle_iso.inverse() * rectangle_iso;\n\n // Or alternatively, to skip an extra rotation operation:\n let relative_iso = circle_iso.inverse_mul(rectangle_iso);\n ```", + "associated_functions": [ + "bevy_math::isometry::Isometry2d::clone", + "bevy_math::isometry::Isometry2d::eq", + "bevy_math::isometry::Isometry2d::from_rotation", + "bevy_math::isometry::Isometry2d::from_translation", + "bevy_math::isometry::Isometry2d::from_xy", + "bevy_math::isometry::Isometry2d::inverse", + "bevy_math::isometry::Isometry2d::inverse_mul", + "bevy_math::isometry::Isometry2d::inverse_transform_point", + "bevy_math::isometry::Isometry2d::mul", + "bevy_math::isometry::Isometry2d::mul-1", + "bevy_math::isometry::Isometry2d::mul-2", + "bevy_math::isometry::Isometry2d::new", + "bevy_math::isometry::Isometry2d::transform_point" + ], + "layout": { + "kind": "Struct", + "name": "Isometry2d", + "fields": [ + { + "name": "rotation", + "type": "bevy_math::rotation2d::Rot2" + }, + { + "name": "translation", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_math::isometry::Isometry3d": { + "identifier": "Isometry3d", + "crate": "bevy_math", + "path": "bevy_math::isometry::Isometry3d", + "documentation": " An isometry in three dimensions, representing a rotation followed by a translation.\n This can often be useful for expressing relative positions and transformations from one position to another.\n\n In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,\n and belongs to the special [Euclidean group] SE(3). This includes translation and rotation, but excludes reflection.\n\n For the two-dimensional version, see [`Isometry2d`].\n\n [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group\n\n # Example\n\n Isometries can be created from a given translation and rotation:\n\n ```\n # use bevy_math::{Isometry3d, Quat, Vec3};\n # use std::f32::consts::FRAC_PI_2;\n #\n let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));\n ```\n\n Or from separate parts:\n\n ```\n # use bevy_math::{Isometry3d, Quat, Vec3};\n # use std::f32::consts::FRAC_PI_2;\n #\n let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));\n let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));\n ```\n\n The isometries can be used to transform points:\n\n ```\n # use approx::assert_relative_eq;\n # use bevy_math::{Isometry3d, Quat, Vec3};\n # use std::f32::consts::FRAC_PI_2;\n #\n let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));\n let point = Vec3::new(4.0, 4.0, 4.0);\n\n // These are equivalent\n let result = iso.transform_point(point);\n let result = iso * point;\n\n assert_relative_eq!(result, Vec3::new(-2.0, 5.0, 7.0));\n ```\n\n Isometries can also be composed together:\n\n ```\n # use bevy_math::{Isometry3d, Quat, Vec3};\n # use std::f32::consts::FRAC_PI_2;\n #\n # let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));\n # let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));\n # let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));\n #\n assert_eq!(iso1 * iso2, iso);\n ```\n\n One common operation is to compute an isometry representing the relative positions of two objects\n for things like intersection tests. This can be done with an inverse transformation:\n\n ```\n # use bevy_math::{Isometry3d, Quat, Vec3};\n # use std::f32::consts::FRAC_PI_2;\n #\n let sphere_iso = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));\n let cuboid_iso = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));\n\n // Compute the relative position and orientation between the two shapes\n let relative_iso = sphere_iso.inverse() * cuboid_iso;\n\n // Or alternatively, to skip an extra rotation operation:\n let relative_iso = sphere_iso.inverse_mul(cuboid_iso);\n ```", + "associated_functions": [ + "bevy_math::isometry::Isometry3d::clone", + "bevy_math::isometry::Isometry3d::eq", + "bevy_math::isometry::Isometry3d::from_rotation", + "bevy_math::isometry::Isometry3d::from_xyz", + "bevy_math::isometry::Isometry3d::inverse", + "bevy_math::isometry::Isometry3d::inverse_mul", + "bevy_math::isometry::Isometry3d::mul", + "bevy_math::isometry::Isometry3d::mul-1", + "bevy_math::isometry::Isometry3d::mul-2", + "bevy_math::isometry::Isometry3d::mul-3" + ], + "layout": { + "kind": "Struct", + "name": "Isometry3d", + "fields": [ + { + "name": "rotation", + "type": "glam::Quat" + }, + { + "name": "translation", + "type": "glam::Vec3A" + } + ] + } + }, + "bevy_math::primitives::dim2::Annulus": { + "identifier": "Annulus", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Annulus", + "documentation": " A primitive shape formed by the region between two circles, also known as a ring.", + "associated_functions": [ + "bevy_math::primitives::dim2::Annulus::clone", + "bevy_math::primitives::dim2::Annulus::closest_point", + "bevy_math::primitives::dim2::Annulus::diameter", + "bevy_math::primitives::dim2::Annulus::eq", + "bevy_math::primitives::dim2::Annulus::new", + "bevy_math::primitives::dim2::Annulus::thickness" + ], + "layout": { + "kind": "Struct", + "name": "Annulus", + "fields": [ + { + "name": "inner_circle", + "type": "bevy_math::primitives::dim2::Circle" + }, + { + "name": "outer_circle", + "type": "bevy_math::primitives::dim2::Circle" + } + ] + } + }, + "bevy_math::primitives::dim2::Arc2d": { + "identifier": "Arc2d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Arc2d", + "documentation": " A primitive representing an arc between two points on a circle.\n\n An arc has no area.\n If you want to include the portion of a circle's area swept out by the arc,\n use the pie-shaped [`CircularSector`].\n If you want to include only the space inside the convex hull of the arc,\n use the bowl-shaped [`CircularSegment`].\n\n The arc is drawn starting from [`Vec2::Y`], extending by `half_angle` radians on\n either side. The center of the circle is the origin [`Vec2::ZERO`]. Note that this\n means that the origin may not be within the `Arc2d`'s convex hull.\n\n **Warning:** Arcs with negative angle or radius, or with angle greater than an entire circle, are not officially supported.\n It is recommended to normalize arcs to have an angle in [0, 2π].", + "associated_functions": [ + "bevy_math::primitives::dim2::Arc2d::angle", + "bevy_math::primitives::dim2::Arc2d::apothem", + "bevy_math::primitives::dim2::Arc2d::chord_length", + "bevy_math::primitives::dim2::Arc2d::chord_midpoint", + "bevy_math::primitives::dim2::Arc2d::clone", + "bevy_math::primitives::dim2::Arc2d::eq", + "bevy_math::primitives::dim2::Arc2d::from_degrees", + "bevy_math::primitives::dim2::Arc2d::from_radians", + "bevy_math::primitives::dim2::Arc2d::from_turns", + "bevy_math::primitives::dim2::Arc2d::half_chord_length", + "bevy_math::primitives::dim2::Arc2d::is_major", + "bevy_math::primitives::dim2::Arc2d::is_minor", + "bevy_math::primitives::dim2::Arc2d::left_endpoint", + "bevy_math::primitives::dim2::Arc2d::length", + "bevy_math::primitives::dim2::Arc2d::midpoint", + "bevy_math::primitives::dim2::Arc2d::new", + "bevy_math::primitives::dim2::Arc2d::right_endpoint", + "bevy_math::primitives::dim2::Arc2d::sagitta" + ], + "layout": { + "kind": "Struct", + "name": "Arc2d", + "fields": [ + { + "name": "radius", + "type": "f32" + }, + { + "name": "half_angle", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim2::Capsule2d": { + "identifier": "Capsule2d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Capsule2d", + "documentation": " A 2D capsule primitive, also known as a stadium or pill shape.\n\n A two-dimensional capsule is defined as a neighborhood of points at a distance (radius) from a line", + "associated_functions": [ + "bevy_math::primitives::dim2::Capsule2d::clone", + "bevy_math::primitives::dim2::Capsule2d::eq", + "bevy_math::primitives::dim2::Capsule2d::new", + "bevy_math::primitives::dim2::Capsule2d::to_inner_rectangle" + ], + "layout": { + "kind": "Struct", + "name": "Capsule2d", + "fields": [ + { + "name": "radius", + "type": "f32" + }, + { + "name": "half_length", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim2::Circle": { + "identifier": "Circle", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Circle", + "documentation": " A circle primitive, representing the set of points some distance from the origin", + "associated_functions": [ + "bevy_math::primitives::dim2::Circle::clone", + "bevy_math::primitives::dim2::Circle::closest_point", + "bevy_math::primitives::dim2::Circle::diameter", + "bevy_math::primitives::dim2::Circle::eq", + "bevy_math::primitives::dim2::Circle::new" + ], + "layout": { + "kind": "Struct", + "name": "Circle", + "fields": [ + { + "name": "radius", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim2::CircularSector": { + "identifier": "CircularSector", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::CircularSector", + "documentation": " A primitive representing a circular sector: a pie slice of a circle.\n\n The segment is positioned so that it always includes [`Vec2::Y`] and is vertically symmetrical.\n To orient the sector differently, apply a rotation.\n The sector is drawn with the center of its circle at the origin [`Vec2::ZERO`].\n\n **Warning:** Circular sectors with negative angle or radius, or with angle greater than an entire circle, are not officially supported.\n We recommend normalizing circular sectors to have an angle in [0, 2π].", + "associated_functions": [ + "bevy_math::primitives::dim2::CircularSector::angle", + "bevy_math::primitives::dim2::CircularSector::apothem", + "bevy_math::primitives::dim2::CircularSector::arc_length", + "bevy_math::primitives::dim2::CircularSector::chord_length", + "bevy_math::primitives::dim2::CircularSector::chord_midpoint", + "bevy_math::primitives::dim2::CircularSector::clone", + "bevy_math::primitives::dim2::CircularSector::eq", + "bevy_math::primitives::dim2::CircularSector::from_degrees", + "bevy_math::primitives::dim2::CircularSector::from_radians", + "bevy_math::primitives::dim2::CircularSector::from_turns", + "bevy_math::primitives::dim2::CircularSector::half_angle", + "bevy_math::primitives::dim2::CircularSector::half_chord_length", + "bevy_math::primitives::dim2::CircularSector::new", + "bevy_math::primitives::dim2::CircularSector::radius", + "bevy_math::primitives::dim2::CircularSector::sagitta" + ], + "layout": { + "kind": "Struct", + "name": "CircularSector", + "fields": [ + { + "name": "arc", + "type": "bevy_math::primitives::dim2::Arc2d" + } + ] + } + }, + "bevy_math::primitives::dim2::CircularSegment": { + "identifier": "CircularSegment", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::CircularSegment", + "documentation": " A primitive representing a circular segment:\n the area enclosed by the arc of a circle and its chord (the line between its endpoints).\n\n The segment is drawn starting from [`Vec2::Y`], extending equally on either side.\n To orient the segment differently, apply a rotation.\n The segment is drawn with the center of its circle at the origin [`Vec2::ZERO`].\n When positioning a segment, the [`apothem`](Self::apothem) function may be particularly useful.\n\n **Warning:** Circular segments with negative angle or radius, or with angle greater than an entire circle, are not officially supported.\n We recommend normalizing circular segments to have an angle in [0, 2π].", + "associated_functions": [ + "bevy_math::primitives::dim2::CircularSegment::angle", + "bevy_math::primitives::dim2::CircularSegment::apothem", + "bevy_math::primitives::dim2::CircularSegment::arc_length", + "bevy_math::primitives::dim2::CircularSegment::chord_length", + "bevy_math::primitives::dim2::CircularSegment::chord_midpoint", + "bevy_math::primitives::dim2::CircularSegment::clone", + "bevy_math::primitives::dim2::CircularSegment::eq", + "bevy_math::primitives::dim2::CircularSegment::from_degrees", + "bevy_math::primitives::dim2::CircularSegment::from_radians", + "bevy_math::primitives::dim2::CircularSegment::from_turns", + "bevy_math::primitives::dim2::CircularSegment::half_angle", + "bevy_math::primitives::dim2::CircularSegment::half_chord_length", + "bevy_math::primitives::dim2::CircularSegment::new", + "bevy_math::primitives::dim2::CircularSegment::radius", + "bevy_math::primitives::dim2::CircularSegment::sagitta" + ], + "layout": { + "kind": "Struct", + "name": "CircularSegment", + "fields": [ + { + "name": "arc", + "type": "bevy_math::primitives::dim2::Arc2d" + } + ] + } + }, + "bevy_math::primitives::dim2::Ellipse": { + "identifier": "Ellipse", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Ellipse", + "documentation": " An ellipse primitive, which is like a circle, but the width and height can be different", + "associated_functions": [ + "bevy_math::primitives::dim2::Ellipse::clone", + "bevy_math::primitives::dim2::Ellipse::eccentricity", + "bevy_math::primitives::dim2::Ellipse::eq", + "bevy_math::primitives::dim2::Ellipse::focal_length", + "bevy_math::primitives::dim2::Ellipse::from_size", + "bevy_math::primitives::dim2::Ellipse::new", + "bevy_math::primitives::dim2::Ellipse::semi_major", + "bevy_math::primitives::dim2::Ellipse::semi_minor" + ], + "layout": { + "kind": "Struct", + "name": "Ellipse", + "fields": [ + { + "name": "half_size", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_math::primitives::dim2::Line2d": { + "identifier": "Line2d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Line2d", + "documentation": " An infinite line going through the origin along a direction in 2D space.\n\n For a finite line: [`Segment2d`]", + "associated_functions": [ + "bevy_math::primitives::dim2::Line2d::clone", + "bevy_math::primitives::dim2::Line2d::eq" + ], + "layout": { + "kind": "Struct", + "name": "Line2d", + "fields": [ + { + "name": "direction", + "type": "bevy_math::direction::Dir2" + } + ] + } + }, + "bevy_math::primitives::dim2::Plane2d": { + "identifier": "Plane2d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Plane2d", + "documentation": " An unbounded plane in 2D space. It forms a separating surface through the origin,\n stretching infinitely far", + "associated_functions": [ + "bevy_math::primitives::dim2::Plane2d::clone", + "bevy_math::primitives::dim2::Plane2d::eq", + "bevy_math::primitives::dim2::Plane2d::new" + ], + "layout": { + "kind": "Struct", + "name": "Plane2d", + "fields": [ + { + "name": "normal", + "type": "bevy_math::direction::Dir2" + } + ] + } + }, + "bevy_math::primitives::dim2::Rectangle": { + "identifier": "Rectangle", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Rectangle", + "documentation": " A rectangle primitive, which is like a square, except that the width and height can be different", + "associated_functions": [ + "bevy_math::primitives::dim2::Rectangle::clone", + "bevy_math::primitives::dim2::Rectangle::closest_point", + "bevy_math::primitives::dim2::Rectangle::eq", + "bevy_math::primitives::dim2::Rectangle::from_corners", + "bevy_math::primitives::dim2::Rectangle::from_length", + "bevy_math::primitives::dim2::Rectangle::from_size", + "bevy_math::primitives::dim2::Rectangle::new", + "bevy_math::primitives::dim2::Rectangle::size" + ], + "layout": { + "kind": "Struct", + "name": "Rectangle", + "fields": [ + { + "name": "half_size", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_math::primitives::dim2::RegularPolygon": { + "identifier": "RegularPolygon", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::RegularPolygon", + "documentation": " A polygon centered on the origin where all vertices lie on a circle, equally far apart.", + "associated_functions": [ + "bevy_math::primitives::dim2::RegularPolygon::circumradius", + "bevy_math::primitives::dim2::RegularPolygon::clone", + "bevy_math::primitives::dim2::RegularPolygon::eq", + "bevy_math::primitives::dim2::RegularPolygon::external_angle_degrees", + "bevy_math::primitives::dim2::RegularPolygon::external_angle_radians", + "bevy_math::primitives::dim2::RegularPolygon::inradius", + "bevy_math::primitives::dim2::RegularPolygon::internal_angle_degrees", + "bevy_math::primitives::dim2::RegularPolygon::internal_angle_radians", + "bevy_math::primitives::dim2::RegularPolygon::new", + "bevy_math::primitives::dim2::RegularPolygon::side_length" + ], + "layout": { + "kind": "Struct", + "name": "RegularPolygon", + "fields": [ + { + "name": "circumcircle", + "type": "bevy_math::primitives::dim2::Circle" + }, + { + "name": "sides", + "type": "u32" + } + ] + } + }, + "bevy_math::primitives::dim2::Rhombus": { + "identifier": "Rhombus", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Rhombus", + "documentation": " A rhombus primitive, also known as a diamond shape.\n A four sided polygon, centered on the origin, where opposite sides are parallel but without\n requiring right angles.", + "associated_functions": [ + "bevy_math::primitives::dim2::Rhombus::circumradius", + "bevy_math::primitives::dim2::Rhombus::clone", + "bevy_math::primitives::dim2::Rhombus::closest_point", + "bevy_math::primitives::dim2::Rhombus::eq", + "bevy_math::primitives::dim2::Rhombus::from_inradius", + "bevy_math::primitives::dim2::Rhombus::from_side", + "bevy_math::primitives::dim2::Rhombus::inradius", + "bevy_math::primitives::dim2::Rhombus::new", + "bevy_math::primitives::dim2::Rhombus::side" + ], + "layout": { + "kind": "Struct", + "name": "Rhombus", + "fields": [ + { + "name": "half_diagonals", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_math::primitives::dim2::Segment2d": { + "identifier": "Segment2d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Segment2d", + "documentation": " A segment of a line going through the origin along a direction in 2D space.", + "associated_functions": [ + "bevy_math::primitives::dim2::Segment2d::clone", + "bevy_math::primitives::dim2::Segment2d::eq", + "bevy_math::primitives::dim2::Segment2d::new", + "bevy_math::primitives::dim2::Segment2d::point1", + "bevy_math::primitives::dim2::Segment2d::point2" + ], + "layout": { + "kind": "Struct", + "name": "Segment2d", + "fields": [ + { + "name": "direction", + "type": "bevy_math::direction::Dir2" + }, + { + "name": "half_length", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim2::Triangle2d": { + "identifier": "Triangle2d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim2::Triangle2d", + "documentation": " A triangle in 2D space", + "associated_functions": [ + "bevy_math::primitives::dim2::Triangle2d::clone", + "bevy_math::primitives::dim2::Triangle2d::eq", + "bevy_math::primitives::dim2::Triangle2d::is_acute", + "bevy_math::primitives::dim2::Triangle2d::is_degenerate", + "bevy_math::primitives::dim2::Triangle2d::is_obtuse", + "bevy_math::primitives::dim2::Triangle2d::new", + "bevy_math::primitives::dim2::Triangle2d::reverse", + "bevy_math::primitives::dim2::Triangle2d::reversed" + ], + "layout": { + "kind": "Struct", + "name": "Triangle2d", + "fields": [ + { + "name": "vertices", + "type": "[glam::Vec2; 3]" + } + ] + } + }, + "bevy_math::primitives::dim3::Capsule3d": { + "identifier": "Capsule3d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Capsule3d", + "documentation": " A 3D capsule primitive centered on the origin\n A three-dimensional capsule is defined as a surface at a distance (radius) from a line", + "associated_functions": [ + "bevy_math::primitives::dim3::Capsule3d::clone", + "bevy_math::primitives::dim3::Capsule3d::eq", + "bevy_math::primitives::dim3::Capsule3d::new", + "bevy_math::primitives::dim3::Capsule3d::to_cylinder" + ], + "layout": { + "kind": "Struct", + "name": "Capsule3d", + "fields": [ + { + "name": "radius", + "type": "f32" + }, + { + "name": "half_length", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim3::Cone": { + "identifier": "Cone", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Cone", + "documentation": " A cone primitive centered on the midpoint between the tip of the cone and the center of its base.\n\n The cone is oriented with its tip pointing towards the Y axis.", + "associated_functions": [ + "bevy_math::primitives::dim3::Cone::base", + "bevy_math::primitives::dim3::Cone::base_area", + "bevy_math::primitives::dim3::Cone::clone", + "bevy_math::primitives::dim3::Cone::eq", + "bevy_math::primitives::dim3::Cone::lateral_area", + "bevy_math::primitives::dim3::Cone::new", + "bevy_math::primitives::dim3::Cone::slant_height" + ], + "layout": { + "kind": "Struct", + "name": "Cone", + "fields": [ + { + "name": "radius", + "type": "f32" + }, + { + "name": "height", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim3::ConicalFrustum": { + "identifier": "ConicalFrustum", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::ConicalFrustum", + "documentation": " A conical frustum primitive.\n A conical frustum can be created\n by slicing off a section of a cone.", + "associated_functions": [ + "bevy_math::primitives::dim3::ConicalFrustum::clone", + "bevy_math::primitives::dim3::ConicalFrustum::eq" + ], + "layout": { + "kind": "Struct", + "name": "ConicalFrustum", + "fields": [ + { + "name": "radius_top", + "type": "f32" + }, + { + "name": "radius_bottom", + "type": "f32" + }, + { + "name": "height", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim3::Cuboid": { + "identifier": "Cuboid", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Cuboid", + "documentation": " A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not\n required to be the same.", + "associated_functions": [ + "bevy_math::primitives::dim3::Cuboid::clone", + "bevy_math::primitives::dim3::Cuboid::closest_point", + "bevy_math::primitives::dim3::Cuboid::eq", + "bevy_math::primitives::dim3::Cuboid::from_corners", + "bevy_math::primitives::dim3::Cuboid::from_length", + "bevy_math::primitives::dim3::Cuboid::from_size", + "bevy_math::primitives::dim3::Cuboid::new", + "bevy_math::primitives::dim3::Cuboid::size" + ], + "layout": { + "kind": "Struct", + "name": "Cuboid", + "fields": [ + { + "name": "half_size", + "type": "glam::Vec3" + } + ] + } + }, + "bevy_math::primitives::dim3::Cylinder": { + "identifier": "Cylinder", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Cylinder", + "documentation": " A cylinder primitive centered on the origin", + "associated_functions": [ + "bevy_math::primitives::dim3::Cylinder::base", + "bevy_math::primitives::dim3::Cylinder::base_area", + "bevy_math::primitives::dim3::Cylinder::clone", + "bevy_math::primitives::dim3::Cylinder::eq", + "bevy_math::primitives::dim3::Cylinder::lateral_area", + "bevy_math::primitives::dim3::Cylinder::new" + ], + "layout": { + "kind": "Struct", + "name": "Cylinder", + "fields": [ + { + "name": "radius", + "type": "f32" + }, + { + "name": "half_height", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim3::InfinitePlane3d": { + "identifier": "InfinitePlane3d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::InfinitePlane3d", + "documentation": " An unbounded plane in 3D space. It forms a separating surface through the origin,\n stretching infinitely far", + "associated_functions": [ + "bevy_math::primitives::dim3::InfinitePlane3d::clone", + "bevy_math::primitives::dim3::InfinitePlane3d::eq", + "bevy_math::primitives::dim3::InfinitePlane3d::isometry_from_xy", + "bevy_math::primitives::dim3::InfinitePlane3d::isometry_into_xy" + ], + "layout": { + "kind": "Struct", + "name": "InfinitePlane3d", + "fields": [ + { + "name": "normal", + "type": "bevy_math::direction::Dir3" + } + ] + } + }, + "bevy_math::primitives::dim3::Line3d": { + "identifier": "Line3d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Line3d", + "documentation": " An infinite line going through the origin along a direction in 3D space.\n\n For a finite line: [`Segment3d`]", + "associated_functions": [ + "bevy_math::primitives::dim3::Line3d::clone", + "bevy_math::primitives::dim3::Line3d::eq" + ], + "layout": { + "kind": "Struct", + "name": "Line3d", + "fields": [ + { + "name": "direction", + "type": "bevy_math::direction::Dir3" + } + ] + } + }, + "bevy_math::primitives::dim3::Plane3d": { + "identifier": "Plane3d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Plane3d", + "documentation": " A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width.", + "associated_functions": [ + "bevy_math::primitives::dim3::Plane3d::clone", + "bevy_math::primitives::dim3::Plane3d::eq", + "bevy_math::primitives::dim3::Plane3d::new" + ], + "layout": { + "kind": "Struct", + "name": "Plane3d", + "fields": [ + { + "name": "normal", + "type": "bevy_math::direction::Dir3" + }, + { + "name": "half_size", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_math::primitives::dim3::Segment3d": { + "identifier": "Segment3d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Segment3d", + "documentation": " A segment of a line going through the origin along a direction in 3D space.", + "associated_functions": [ + "bevy_math::primitives::dim3::Segment3d::clone", + "bevy_math::primitives::dim3::Segment3d::eq", + "bevy_math::primitives::dim3::Segment3d::new", + "bevy_math::primitives::dim3::Segment3d::point1", + "bevy_math::primitives::dim3::Segment3d::point2" + ], + "layout": { + "kind": "Struct", + "name": "Segment3d", + "fields": [ + { + "name": "direction", + "type": "bevy_math::direction::Dir3" + }, + { + "name": "half_length", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim3::Sphere": { + "identifier": "Sphere", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Sphere", + "documentation": " A sphere primitive, representing the set of all points some distance from the origin", + "associated_functions": [ + "bevy_math::primitives::dim3::Sphere::clone", + "bevy_math::primitives::dim3::Sphere::closest_point", + "bevy_math::primitives::dim3::Sphere::diameter", + "bevy_math::primitives::dim3::Sphere::eq", + "bevy_math::primitives::dim3::Sphere::new" + ], + "layout": { + "kind": "Struct", + "name": "Sphere", + "fields": [ + { + "name": "radius", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim3::Tetrahedron": { + "identifier": "Tetrahedron", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Tetrahedron", + "documentation": " A tetrahedron primitive.", + "associated_functions": [ + "bevy_math::primitives::dim3::Tetrahedron::centroid", + "bevy_math::primitives::dim3::Tetrahedron::clone", + "bevy_math::primitives::dim3::Tetrahedron::eq", + "bevy_math::primitives::dim3::Tetrahedron::new", + "bevy_math::primitives::dim3::Tetrahedron::signed_volume" + ], + "layout": { + "kind": "Struct", + "name": "Tetrahedron", + "fields": [ + { + "name": "vertices", + "type": "[glam::Vec3; 4]" + } + ] + } + }, + "bevy_math::primitives::dim3::Torus": { + "identifier": "Torus", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Torus", + "documentation": " A torus primitive, often representing a ring or donut shape\n The set of points some distance from a circle centered at the origin", + "associated_functions": [ + "bevy_math::primitives::dim3::Torus::clone", + "bevy_math::primitives::dim3::Torus::eq", + "bevy_math::primitives::dim3::Torus::inner_radius", + "bevy_math::primitives::dim3::Torus::new", + "bevy_math::primitives::dim3::Torus::outer_radius" + ], + "layout": { + "kind": "Struct", + "name": "Torus", + "fields": [ + { + "name": "minor_radius", + "type": "f32" + }, + { + "name": "major_radius", + "type": "f32" + } + ] + } + }, + "bevy_math::primitives::dim3::Triangle3d": { + "identifier": "Triangle3d", + "crate": "bevy_math", + "path": "bevy_math::primitives::dim3::Triangle3d", + "documentation": " A 3D triangle primitive.", + "associated_functions": [ + "bevy_math::primitives::dim3::Triangle3d::centroid", + "bevy_math::primitives::dim3::Triangle3d::circumcenter", + "bevy_math::primitives::dim3::Triangle3d::clone", + "bevy_math::primitives::dim3::Triangle3d::eq", + "bevy_math::primitives::dim3::Triangle3d::is_acute", + "bevy_math::primitives::dim3::Triangle3d::is_degenerate", + "bevy_math::primitives::dim3::Triangle3d::is_obtuse", + "bevy_math::primitives::dim3::Triangle3d::new", + "bevy_math::primitives::dim3::Triangle3d::reverse", + "bevy_math::primitives::dim3::Triangle3d::reversed" + ], + "layout": { + "kind": "Struct", + "name": "Triangle3d", + "fields": [ + { + "name": "vertices", + "type": "[glam::Vec3; 3]" + } + ] + } + }, + "bevy_math::ray::Ray2d": { + "identifier": "Ray2d", + "crate": "bevy_math", + "path": "bevy_math::ray::Ray2d", + "documentation": " An infinite half-line starting at `origin` and going in `direction` in 2D space.", + "associated_functions": [ + "bevy_math::ray::Ray2d::clone", + "bevy_math::ray::Ray2d::eq", + "bevy_math::ray::Ray2d::get_point", + "bevy_math::ray::Ray2d::intersect_plane", + "bevy_math::ray::Ray2d::new" + ], + "layout": { + "kind": "Struct", + "name": "Ray2d", + "fields": [ + { + "name": "origin", + "type": "glam::Vec2" + }, + { + "name": "direction", + "type": "bevy_math::direction::Dir2" + } + ] + } + }, + "bevy_math::ray::Ray3d": { + "identifier": "Ray3d", + "crate": "bevy_math", + "path": "bevy_math::ray::Ray3d", + "documentation": " An infinite half-line starting at `origin` and going in `direction` in 3D space.", + "associated_functions": [ + "bevy_math::ray::Ray3d::clone", + "bevy_math::ray::Ray3d::eq", + "bevy_math::ray::Ray3d::get_point", + "bevy_math::ray::Ray3d::intersect_plane", + "bevy_math::ray::Ray3d::new" + ], + "layout": { + "kind": "Struct", + "name": "Ray3d", + "fields": [ + { + "name": "origin", + "type": "glam::Vec3" + }, + { + "name": "direction", + "type": "bevy_math::direction::Dir3" + } + ] + } + }, + "bevy_math::rects::irect::IRect": { + "identifier": "IRect", + "crate": "bevy_math", + "path": "bevy_math::rects::irect::IRect", + "documentation": " A rectangle defined by two opposite corners.\n\n The rectangle is axis aligned, and defined by its minimum and maximum coordinates,\n stored in `IRect::min` and `IRect::max`, respectively. The minimum/maximum invariant\n must be upheld by the user when directly assigning the fields, otherwise some methods\n produce invalid results. It is generally recommended to use one of the constructor\n methods instead, which will ensure this invariant is met, unless you already have\n the minimum and maximum corners.", + "associated_functions": [ + "bevy_math::rects::irect::IRect::as_rect", + "bevy_math::rects::irect::IRect::as_urect", + "bevy_math::rects::irect::IRect::assert_receiver_is_total_eq", + "bevy_math::rects::irect::IRect::center", + "bevy_math::rects::irect::IRect::clone", + "bevy_math::rects::irect::IRect::contains", + "bevy_math::rects::irect::IRect::eq", + "bevy_math::rects::irect::IRect::from_center_half_size", + "bevy_math::rects::irect::IRect::from_center_size", + "bevy_math::rects::irect::IRect::from_corners", + "bevy_math::rects::irect::IRect::half_size", + "bevy_math::rects::irect::IRect::height", + "bevy_math::rects::irect::IRect::inflate", + "bevy_math::rects::irect::IRect::intersect", + "bevy_math::rects::irect::IRect::is_empty", + "bevy_math::rects::irect::IRect::new", + "bevy_math::rects::irect::IRect::size", + "bevy_math::rects::irect::IRect::union", + "bevy_math::rects::irect::IRect::union_point", + "bevy_math::rects::irect::IRect::width" + ], + "layout": { + "kind": "Struct", + "name": "IRect", + "fields": [ + { + "name": "min", + "type": "glam::IVec2" + }, + { + "name": "max", + "type": "glam::IVec2" + } + ] + } + }, + "bevy_math::rects::rect::Rect": { + "identifier": "Rect", + "crate": "bevy_math", + "path": "bevy_math::rects::rect::Rect", + "documentation": " A rectangle defined by two opposite corners.\n\n The rectangle is axis aligned, and defined by its minimum and maximum coordinates,\n stored in `Rect::min` and `Rect::max`, respectively. The minimum/maximum invariant\n must be upheld by the user when directly assigning the fields, otherwise some methods\n produce invalid results. It is generally recommended to use one of the constructor\n methods instead, which will ensure this invariant is met, unless you already have\n the minimum and maximum corners.", + "associated_functions": [ + "bevy_math::rects::rect::Rect::as_irect", + "bevy_math::rects::rect::Rect::as_urect", + "bevy_math::rects::rect::Rect::center", + "bevy_math::rects::rect::Rect::clone", + "bevy_math::rects::rect::Rect::contains", + "bevy_math::rects::rect::Rect::eq", + "bevy_math::rects::rect::Rect::from_center_half_size", + "bevy_math::rects::rect::Rect::from_center_size", + "bevy_math::rects::rect::Rect::from_corners", + "bevy_math::rects::rect::Rect::half_size", + "bevy_math::rects::rect::Rect::height", + "bevy_math::rects::rect::Rect::inflate", + "bevy_math::rects::rect::Rect::intersect", + "bevy_math::rects::rect::Rect::is_empty", + "bevy_math::rects::rect::Rect::new", + "bevy_math::rects::rect::Rect::normalize", + "bevy_math::rects::rect::Rect::size", + "bevy_math::rects::rect::Rect::union", + "bevy_math::rects::rect::Rect::union_point", + "bevy_math::rects::rect::Rect::width" + ], + "layout": { + "kind": "Struct", + "name": "Rect", + "fields": [ + { + "name": "min", + "type": "glam::Vec2" + }, + { + "name": "max", + "type": "glam::Vec2" + } + ] + } + }, + "bevy_math::rects::urect::URect": { + "identifier": "URect", + "crate": "bevy_math", + "path": "bevy_math::rects::urect::URect", + "documentation": " A rectangle defined by two opposite corners.\n\n The rectangle is axis aligned, and defined by its minimum and maximum coordinates,\n stored in `URect::min` and `URect::max`, respectively. The minimum/maximum invariant\n must be upheld by the user when directly assigning the fields, otherwise some methods\n produce invalid results. It is generally recommended to use one of the constructor\n methods instead, which will ensure this invariant is met, unless you already have\n the minimum and maximum corners.", + "associated_functions": [ + "bevy_math::rects::urect::URect::as_irect", + "bevy_math::rects::urect::URect::as_rect", + "bevy_math::rects::urect::URect::assert_receiver_is_total_eq", + "bevy_math::rects::urect::URect::center", + "bevy_math::rects::urect::URect::clone", + "bevy_math::rects::urect::URect::contains", + "bevy_math::rects::urect::URect::eq", + "bevy_math::rects::urect::URect::from_center_half_size", + "bevy_math::rects::urect::URect::from_center_size", + "bevy_math::rects::urect::URect::from_corners", + "bevy_math::rects::urect::URect::half_size", + "bevy_math::rects::urect::URect::height", + "bevy_math::rects::urect::URect::inflate", + "bevy_math::rects::urect::URect::intersect", + "bevy_math::rects::urect::URect::is_empty", + "bevy_math::rects::urect::URect::new", + "bevy_math::rects::urect::URect::size", + "bevy_math::rects::urect::URect::union", + "bevy_math::rects::urect::URect::union_point", + "bevy_math::rects::urect::URect::width" + ], + "layout": { + "kind": "Struct", + "name": "URect", + "fields": [ + { + "name": "min", + "type": "glam::UVec2" + }, + { + "name": "max", + "type": "glam::UVec2" + } + ] + } + }, + "bevy_math::rotation2d::Rot2": { + "identifier": "Rot2", + "crate": "bevy_math", + "path": "bevy_math::rotation2d::Rot2", + "documentation": " A counterclockwise 2D rotation.\n\n # Example\n\n ```\n # use approx::assert_relative_eq;\n # use bevy_math::{Rot2, Vec2};\n use std::f32::consts::PI;\n\n // Create rotations from radians or degrees\n let rotation1 = Rot2::radians(PI / 2.0);\n let rotation2 = Rot2::degrees(45.0);\n\n // Get the angle back as radians or degrees\n assert_eq!(rotation1.as_degrees(), 90.0);\n assert_eq!(rotation2.as_radians(), PI / 4.0);\n\n // \"Add\" rotations together using `*`\n assert_relative_eq!(rotation1 * rotation2, Rot2::degrees(135.0));\n\n // Rotate vectors\n assert_relative_eq!(rotation1 * Vec2::X, Vec2::Y);\n ```", + "associated_functions": [ + "bevy_math::rotation2d::Rot2::angle_between", + "bevy_math::rotation2d::Rot2::angle_to", + "bevy_math::rotation2d::Rot2::as_degrees", + "bevy_math::rotation2d::Rot2::as_radians", + "bevy_math::rotation2d::Rot2::as_turn_fraction", + "bevy_math::rotation2d::Rot2::clone", + "bevy_math::rotation2d::Rot2::degrees", + "bevy_math::rotation2d::Rot2::eq", + "bevy_math::rotation2d::Rot2::fast_renormalize", + "bevy_math::rotation2d::Rot2::from_sin_cos", + "bevy_math::rotation2d::Rot2::inverse", + "bevy_math::rotation2d::Rot2::is_finite", + "bevy_math::rotation2d::Rot2::is_nan", + "bevy_math::rotation2d::Rot2::is_near_identity", + "bevy_math::rotation2d::Rot2::is_normalized", + "bevy_math::rotation2d::Rot2::length", + "bevy_math::rotation2d::Rot2::length_recip", + "bevy_math::rotation2d::Rot2::length_squared", + "bevy_math::rotation2d::Rot2::mul", + "bevy_math::rotation2d::Rot2::mul-1", + "bevy_math::rotation2d::Rot2::mul-2", + "bevy_math::rotation2d::Rot2::nlerp", + "bevy_math::rotation2d::Rot2::normalize", + "bevy_math::rotation2d::Rot2::radians", + "bevy_math::rotation2d::Rot2::sin_cos", + "bevy_math::rotation2d::Rot2::slerp", + "bevy_math::rotation2d::Rot2::turn_fraction" + ], + "layout": { + "kind": "Struct", + "name": "Rot2", + "fields": [ + { + "name": "cos", + "type": "f32" + }, + { + "name": "sin", + "type": "f32" + } + ] + } + }, + "bevy_mod_scripting_core::bindings::function::from::Val": { + "identifier": "Val", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::function::from::Val", + "generics": [ + { + "type_id": "bevy_ecs::entity::Entity", + "name": "T" + } + ], + "documentation": " A wrapper around a value of type `T`.\n\n This can be used to retrieve a value out of a [`ScriptValue::Reference`] corresponding to the type `T`.\n You can also use this to return values from a script function to be allocated directly as a [`ScriptValue::Reference`].", + "layout": { + "kind": "TupleStruct", + "name": "Val", + "fields": [ + { + "type": "bevy_ecs::entity::Entity" + } + ] + } + }, + "bevy_mod_scripting_core::bindings::function::from::Val": { + "identifier": "Val", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::function::from::Val", + "generics": [ + { + "type_id": "bevy_mod_scripting_core::bindings::query::ScriptQueryBuilder", + "name": "T" + } + ], + "documentation": " A wrapper around a value of type `T`.\n\n This can be used to retrieve a value out of a [`ScriptValue::Reference`] corresponding to the type `T`.\n You can also use this to return values from a script function to be allocated directly as a [`ScriptValue::Reference`].", + "layout": { + "kind": "TupleStruct", + "name": "Val", + "fields": [ + { + "type": "bevy_mod_scripting_core::bindings::query::ScriptQueryBuilder" + } + ] + } + }, + "bevy_mod_scripting_core::bindings::function::from::Val": { + "identifier": "Val", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::function::from::Val", + "generics": [ + { + "type_id": "bevy_mod_scripting_core::bindings::query::ScriptQueryResult", + "name": "T" + } + ], + "documentation": " A wrapper around a value of type `T`.\n\n This can be used to retrieve a value out of a [`ScriptValue::Reference`] corresponding to the type `T`.\n You can also use this to return values from a script function to be allocated directly as a [`ScriptValue::Reference`].", + "layout": { + "kind": "TupleStruct", + "name": "Val", + "fields": [ + { + "type": "bevy_mod_scripting_core::bindings::query::ScriptQueryResult" + } + ] + } + }, + "bevy_mod_scripting_core::bindings::function::from::Val": { + "identifier": "Val", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::function::from::Val", + "generics": [ + { + "type_id": "bevy_mod_scripting_core::docgen::info::FunctionInfo", + "name": "T" + } + ], + "documentation": " A wrapper around a value of type `T`.\n\n This can be used to retrieve a value out of a [`ScriptValue::Reference`] corresponding to the type `T`.\n You can also use this to return values from a script function to be allocated directly as a [`ScriptValue::Reference`].", + "layout": { + "kind": "TupleStruct", + "name": "Val", + "fields": [ + { + "type": "bevy_mod_scripting_core::docgen::info::FunctionInfo" + } + ] + } + }, + "bevy_mod_scripting_core::bindings::function::namespace::Namespace": { + "identifier": "Namespace", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::function::namespace::Namespace", + "documentation": " A namespace for functions", + "layout": [ + { + "kind": "Unit", + "name": "Global" + }, + { + "kind": "TupleStruct", + "name": "OnType", + "fields": [ + { + "type": "core::any::TypeId" + } + ] + } + ] + }, + "bevy_mod_scripting_core::bindings::function::script_function::DynamicScriptFunctionMut": { + "identifier": "DynamicScriptFunctionMut", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::function::script_function::DynamicScriptFunctionMut", + "documentation": " A dynamic mutable script function.", + "layout": null + }, + "bevy_mod_scripting_core::bindings::query::ScriptComponentRegistration": { + "identifier": "ScriptComponentRegistration", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::query::ScriptComponentRegistration", + "documentation": " A registration for a component type.", + "associated_functions": [ + "bevy_mod_scripting_core::bindings::query::ScriptComponentRegistration::short_name", + "bevy_mod_scripting_core::bindings::query::ScriptComponentRegistration::type_name" + ], + "layout": { + "kind": "Struct", + "name": "ScriptComponentRegistration", + "fields": [ + { + "name": "registration", + "type": "bevy_mod_scripting_core::bindings::query::ScriptTypeRegistration" + }, + { + "name": "component_id", + "type": "bevy_ecs::component::ComponentId" + } + ] + } + }, + "bevy_mod_scripting_core::bindings::query::ScriptQueryBuilder": { + "identifier": "ScriptQueryBuilder", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::query::ScriptQueryBuilder", + "documentation": " A builder for a query.", + "associated_functions": [ + "bevy_mod_scripting_core::bindings::query::ScriptQueryBuilder::build", + "bevy_mod_scripting_core::bindings::query::ScriptQueryBuilder::component", + "bevy_mod_scripting_core::bindings::query::ScriptQueryBuilder::with", + "bevy_mod_scripting_core::bindings::query::ScriptQueryBuilder::without" + ], + "layout": null + }, + "bevy_mod_scripting_core::bindings::query::ScriptQueryResult": { + "identifier": "ScriptQueryResult", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::query::ScriptQueryResult", + "documentation": " A result from a query.", + "associated_functions": [ + "bevy_mod_scripting_core::bindings::query::ScriptQueryResult::components", + "bevy_mod_scripting_core::bindings::query::ScriptQueryResult::entity" + ], + "layout": null + }, + "bevy_mod_scripting_core::bindings::query::ScriptResourceRegistration": { + "identifier": "ScriptResourceRegistration", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::query::ScriptResourceRegistration", + "documentation": " A registration for a resource type.", + "associated_functions": [ + "bevy_mod_scripting_core::bindings::query::ScriptResourceRegistration::short_name", + "bevy_mod_scripting_core::bindings::query::ScriptResourceRegistration::type_name" + ], + "layout": { + "kind": "Struct", + "name": "ScriptResourceRegistration", + "fields": [ + { + "name": "registration", + "type": "bevy_mod_scripting_core::bindings::query::ScriptTypeRegistration" + }, + { + "name": "resource_id", + "type": "bevy_ecs::component::ComponentId" + } + ] + } + }, + "bevy_mod_scripting_core::bindings::query::ScriptTypeRegistration": { + "identifier": "ScriptTypeRegistration", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::query::ScriptTypeRegistration", + "documentation": " A wrapper around a `TypeRegistration` that provides additional information about the type.\n\n This is used as a hook to a rust type from a scripting language. We should be able to easily convert between a type name and a [`ScriptTypeRegistration`].", + "associated_functions": [ + "bevy_mod_scripting_core::bindings::query::ScriptTypeRegistration::short_name", + "bevy_mod_scripting_core::bindings::query::ScriptTypeRegistration::type_name" + ], + "layout": null + }, + "bevy_mod_scripting_core::bindings::script_value::ScriptValue": { + "identifier": "ScriptValue", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::bindings::script_value::ScriptValue", + "documentation": " An abstraction of values that can be passed to and from scripts.\n This allows us to re-use logic between scripting languages.", + "layout": null + }, + "bevy_mod_scripting_core::docgen::info::FunctionArgInfo": { + "identifier": "FunctionArgInfo", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::docgen::info::FunctionArgInfo", + "documentation": " Information about a function argument.", + "layout": { + "kind": "Struct", + "name": "FunctionArgInfo", + "fields": [ + { + "name": "name", + "type": "core::option::Option>" + }, + { + "name": "arg_index", + "type": "usize" + }, + { + "name": "type_id", + "type": "core::any::TypeId" + } + ] + } + }, + "bevy_mod_scripting_core::docgen::info::FunctionInfo": { + "identifier": "FunctionInfo", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::docgen::info::FunctionInfo", + "documentation": " Information about a function.", + "layout": { + "kind": "Struct", + "name": "FunctionInfo", + "fields": [ + { + "name": "name", + "type": "alloc::borrow::Cow" + }, + { + "name": "namespace", + "type": "bevy_mod_scripting_core::bindings::function::namespace::Namespace" + }, + { + "name": "arg_info", + "type": "alloc::vec::Vec" + }, + { + "name": "return_info", + "type": "bevy_mod_scripting_core::docgen::info::FunctionReturnInfo" + }, + { + "name": "docs", + "type": "core::option::Option>" + } + ] + } + }, + "bevy_mod_scripting_core::docgen::info::FunctionReturnInfo": { + "identifier": "FunctionReturnInfo", + "crate": "bevy_mod_scripting_core", + "path": "bevy_mod_scripting_core::docgen::info::FunctionReturnInfo", + "documentation": " Information about a function return value.", + "layout": { + "kind": "Struct", + "name": "FunctionReturnInfo", + "fields": [ + { + "name": "type_id", + "type": "core::any::TypeId" + } + ] + } + }, + "bevy_time::fixed::Fixed": { + "identifier": "Fixed", + "crate": "bevy_time", + "path": "bevy_time::fixed::Fixed", + "documentation": " The fixed timestep game clock following virtual time.\n\n A specialization of the [`Time`] structure. **For method documentation, see\n [`Time#impl-Time`].**\n \n It is automatically inserted as a resource by\n [`TimePlugin`](crate::TimePlugin) and updated based on\n [`Time`](Virtual). The fixed clock is automatically set as the\n generic [`Time`] resource during [`FixedUpdate`](bevy_app::FixedUpdate)\n schedule processing.\n\n The fixed timestep clock advances in fixed-size increments, which is\n extremely useful for writing logic (like physics) that should have\n consistent behavior, regardless of framerate.\n\n The default [`timestep()`](Time::timestep) is 64 hertz, or 15625\n microseconds. This value was chosen because using 60 hertz has the potential\n for a pathological interaction with the monitor refresh rate where the game\n alternates between running two fixed timesteps and zero fixed timesteps per\n frame (for example when running two fixed timesteps takes longer than a\n frame). Additionally, the value is a power of two which losslessly converts\n into [`f32`] and [`f64`].\n\n To run a system on a fixed timestep, add it to one of the [`FixedMain`]\n schedules, most commonly [`FixedUpdate`](bevy_app::FixedUpdate).\n\n This schedule is run a number of times between\n [`PreUpdate`](bevy_app::PreUpdate) and [`Update`](bevy_app::Update)\n according to the accumulated [`overstep()`](Time::overstep) time divided by\n the [`timestep()`](Time::timestep). This means the schedule may run 0, 1 or\n more times during a single update (which typically corresponds to a rendered\n frame).\n\n `Time` and the generic [`Time`] resource will report a\n [`delta()`](Time::delta) equal to [`timestep()`](Time::timestep) and always\n grow [`elapsed()`](Time::elapsed) by one [`timestep()`](Time::timestep) per\n iteration.\n\n The fixed timestep clock follows the [`Time`](Virtual) clock, which\n means it is affected by [`pause()`](Time::pause),\n [`set_relative_speed()`](Time::set_relative_speed) and\n [`set_max_delta()`](Time::set_max_delta) from virtual time. If the virtual\n clock is paused, the [`FixedUpdate`](bevy_app::FixedUpdate) schedule will\n not run. It is guaranteed that the [`elapsed()`](Time::elapsed) time in\n `Time` is always between the previous `elapsed()` and the current\n `elapsed()` value in `Time`, so the values are compatible.\n\n Changing the timestep size while the game is running should not normally be\n done, as having a regular interval is the point of this schedule, but it may\n be necessary for effects like \"bullet-time\" if the normal granularity of the\n fixed timestep is too big for the slowed down time. In this case,\n [`set_timestep()`](Time::set_timestep) and be called to set a new value. The\n new value will be used immediately for the next run of the\n [`FixedUpdate`](bevy_app::FixedUpdate) schedule, meaning that it will affect\n the [`delta()`](Time::delta) value for the very next\n [`FixedUpdate`](bevy_app::FixedUpdate), even if it is still during the same\n frame. Any [`overstep()`](Time::overstep) present in the accumulator will be\n processed according to the new [`timestep()`](Time::timestep) value.", + "associated_functions": [ + "bevy_time::fixed::Fixed::clone" + ], + "layout": { + "kind": "Struct", + "name": "Fixed", + "fields": [ + { + "name": "timestep", + "type": "bevy_utils::Duration" + }, + { + "name": "overstep", + "type": "bevy_utils::Duration" + } + ] + } + }, + "bevy_time::real::Real": { + "identifier": "Real", + "crate": "bevy_time", + "path": "bevy_time::real::Real", + "documentation": " Real time clock representing elapsed wall clock time.\n\n A specialization of the [`Time`] structure. **For method documentation, see\n [`Time#impl-Time`].**\n\n It is automatically inserted as a resource by\n [`TimePlugin`](crate::TimePlugin) and updated with time instants according\n to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).[^disclaimer]\n\n Note:\n Using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration)\n allows for mocking the wall clock for testing purposes.\n Besides this use case, it is not recommended to do this, as it will no longer\n represent \"wall clock\" time as intended.\n\n The [`delta()`](Time::delta) and [`elapsed()`](Time::elapsed) values of this\n clock should be used for anything which deals specifically with real time\n (wall clock time). It will not be affected by relative game speed\n adjustments, pausing or other adjustments.[^disclaimer]\n\n The clock does not count time from [`startup()`](Time::startup) to\n [`first_update()`](Time::first_update()) into elapsed, but instead will\n start counting time from the first update call. [`delta()`](Time::delta) and\n [`elapsed()`](Time::elapsed) will report zero on the first update as there\n is no previous update instant. This means that a [`delta()`](Time::delta) of\n zero must be handled without errors in application logic, as it may\n theoretically also happen at other times.\n\n [`Instant`]s for [`startup()`](Time::startup),\n [`first_update()`](Time::first_update) and\n [`last_update()`](Time::last_update) are recorded and accessible.\n\n [^disclaimer]: When using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration),\n [`Time#impl-Time`] is only a *mock* of wall clock time.\n", + "associated_functions": [ + "bevy_time::real::Real::clone" + ], + "layout": { + "kind": "Struct", + "name": "Real", + "fields": [ + { + "name": "startup", + "type": "bevy_utils::Instant" + }, + { + "name": "first_update", + "type": "core::option::Option" + }, + { + "name": "last_update", + "type": "core::option::Option" + } + ] + } + }, + "bevy_time::stopwatch::Stopwatch": { + "identifier": "Stopwatch", + "crate": "bevy_time", + "path": "bevy_time::stopwatch::Stopwatch", + "documentation": " A Stopwatch is a struct that tracks elapsed time when started.\n\n Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called.\n # Examples\n\n ```\n # use bevy_time::*;\n use std::time::Duration;\n let mut stopwatch = Stopwatch::new();\n assert_eq!(stopwatch.elapsed_secs(), 0.0);\n\n stopwatch.tick(Duration::from_secs_f32(1.0)); // tick one second\n assert_eq!(stopwatch.elapsed_secs(), 1.0);\n\n stopwatch.pause();\n stopwatch.tick(Duration::from_secs_f32(1.0)); // paused stopwatches don't tick\n assert_eq!(stopwatch.elapsed_secs(), 1.0);\n\n stopwatch.reset(); // reset the stopwatch\n assert!(stopwatch.is_paused());\n assert_eq!(stopwatch.elapsed_secs(), 0.0);\n ```", + "associated_functions": [ + "bevy_time::stopwatch::Stopwatch::assert_receiver_is_total_eq", + "bevy_time::stopwatch::Stopwatch::clone", + "bevy_time::stopwatch::Stopwatch::elapsed", + "bevy_time::stopwatch::Stopwatch::elapsed_secs", + "bevy_time::stopwatch::Stopwatch::elapsed_secs_f64", + "bevy_time::stopwatch::Stopwatch::eq", + "bevy_time::stopwatch::Stopwatch::is_paused", + "bevy_time::stopwatch::Stopwatch::new", + "bevy_time::stopwatch::Stopwatch::pause", + "bevy_time::stopwatch::Stopwatch::reset", + "bevy_time::stopwatch::Stopwatch::set_elapsed", + "bevy_time::stopwatch::Stopwatch::unpause" + ], + "layout": { + "kind": "Struct", + "name": "Stopwatch", + "fields": [ + { + "name": "elapsed", + "type": "bevy_utils::Duration" + }, + { + "name": "is_paused", + "type": "bool" + } + ] + } + }, + "bevy_time::time::Time<()>": { + "identifier": "Time", + "crate": "bevy_time", + "path": "bevy_time::time::Time<()>", + "generics": [ + { + "type_id": "()", + "name": "T" + } + ], + "documentation": " A generic clock resource that tracks how much it has advanced since its\n previous update and since its creation.\n\n Multiple instances of this resource are inserted automatically by\n [`TimePlugin`](crate::TimePlugin):\n\n - [`Time`](crate::real::Real) tracks real wall-clock time elapsed.\n - [`Time`](crate::virt::Virtual) tracks virtual game time that may\n be paused or scaled.\n - [`Time`](crate::fixed::Fixed) tracks fixed timesteps based on\n virtual time.\n - [`Time`] is a generic clock that corresponds to \"current\" or \"default\"\n time for systems. It contains [`Time`](crate::virt::Virtual)\n except inside the [`FixedMain`](bevy_app::FixedMain) schedule when it\n contains [`Time`](crate::fixed::Fixed).\n\n The time elapsed since the previous time this clock was advanced is saved as\n [`delta()`](Time::delta) and the total amount of time the clock has advanced\n is saved as [`elapsed()`](Time::elapsed). Both are represented as exact\n [`Duration`] values with fixed nanosecond precision. The clock does not\n support time moving backwards, but it can be updated with [`Duration::ZERO`]\n which will set [`delta()`](Time::delta) to zero.\n\n These values are also available in seconds as `f32` via\n [`delta_secs()`](Time::delta_secs) and\n [`elapsed_secs()`](Time::elapsed_secs), and also in seconds as `f64`\n via [`delta_secs_f64()`](Time::delta_secs_f64) and\n [`elapsed_secs_f64()`](Time::elapsed_secs_f64).\n\n Since [`elapsed_secs()`](Time::elapsed_secs) will grow constantly and\n is `f32`, it will exhibit gradual precision loss. For applications that\n require an `f32` value but suffer from gradual precision loss there is\n [`elapsed_secs_wrapped()`](Time::elapsed_secs_wrapped) available. The\n same wrapped value is also available as [`Duration`] and `f64` for\n consistency. The wrap period is by default 1 hour, and can be set by\n [`set_wrap_period()`](Time::set_wrap_period).\n\n # Accessing clocks\n\n By default, any systems requiring current [`delta()`](Time::delta) or\n [`elapsed()`](Time::elapsed) should use `Res