From 13a5a87b1f2502fddb7283c8ed9758c132fb06ef Mon Sep 17 00:00:00 2001 From: makspll Date: Sun, 13 Jul 2025 15:31:36 +0100 Subject: [PATCH 01/20] WIP on declaration file backend --- .luarc.json | 8 + Cargo.toml | 1 + assets/definitions/World.lua | 10 + assets/scripts/game_of_life.lua | 54 +-- .../Cargo.toml | 39 ++ .../src/convert.rs | 51 +++ .../src/lib.rs | 40 ++ .../src/lua_declaration_file.rs | 424 ++++++++++++++++++ .../src/main.rs | 47 ++ .../src/templating.rs | 44 ++ .../templates/declaration_file.tera | 92 ++++ crates/ladfile/src/lib.rs | 4 +- 12 files changed, 785 insertions(+), 29 deletions(-) create mode 100644 .luarc.json create mode 100644 assets/definitions/World.lua create mode 100644 crates/lad_backends/lua_language_server_lad_backend/Cargo.toml create mode 100644 crates/lad_backends/lua_language_server_lad_backend/src/convert.rs create mode 100644 crates/lad_backends/lua_language_server_lad_backend/src/lib.rs create mode 100644 crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs create mode 100644 crates/lad_backends/lua_language_server_lad_backend/src/main.rs create mode 100644 crates/lad_backends/lua_language_server_lad_backend/src/templating.rs create mode 100644 crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000000..a57d8b1c34 --- /dev/null +++ b/.luarc.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", + "workspace.library": [ + "assets" + ], + "runtime.version": "Lua 5.4", + "hint.enable": false +} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index e0402aa5e6..8ca685eadc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -119,6 +119,7 @@ members = [ "crates/testing_crates/script_integration_test_harness", "crates/bevy_mod_scripting_derive", "crates/ladfile", + "crates/lad_backends/lua_language_server_lad_backend", "crates/lad_backends/mdbook_lad_preprocessor", "crates/ladfile_builder", "crates/bevy_system_reflection", diff --git a/assets/definitions/World.lua b/assets/definitions/World.lua new file mode 100644 index 0000000000..5d29efd20e --- /dev/null +++ b/assets/definitions/World.lua @@ -0,0 +1,10 @@ +---@meta + + +---@class world +world = {} + + +function world.query(asd) + +end diff --git a/assets/scripts/game_of_life.lua b/assets/scripts/game_of_life.lua index 85d6aa254e..529c7e817b 100644 --- a/assets/scripts/game_of_life.lua +++ b/assets/scripts/game_of_life.lua @@ -5,27 +5,27 @@ info("Lua: The game_of_life.lua script just got loaded") math.randomseed(os.time()) -function fetch_life_state() - -- find the first entity with life state - local i,v = next(world.query():component(LifeState):build()) +function fetch_life_state() + -- find the first entity with life state + local i, v = next(world.query():component(LifeState):build()) return v:components()[1] -end +end function on_script_loaded() info("Lua: Hello! I am initiating the game of life simulation state with randomness!") info("Lua: Click on the screen to set cells alive after running the `gol start` command") - + local life_state = fetch_life_state() local cells = life_state.cells - + -- set some cells alive - for _=1,1000 do + for _ = 1, 1000 do local index = math.random(#cells) cells[index] = 255 end -end +end -function on_click(x,y) +function on_click(x, y) -- get the settings info("Lua: Clicked at x: " .. x .. " y: " .. y) local life_state = fetch_life_state() @@ -51,18 +51,18 @@ function on_click(x,y) -- toggle a bunch of cells around if they exist local cell_offsets = { - {0,0}, - {1,0}, - {0,1}, - {1,1}, - {-1,0}, - {0,-1}, - {-1,-1}, - {1,-1}, - {-1,1} + { 0, 0 }, + { 1, 0 }, + { 0, 1 }, + { 1, 1 }, + { -1, 0 }, + { 0, -1 }, + { -1, -1 }, + { 1, -1 }, + { -1, 1 } } - for _,offset in pairs(cell_offsets) do + for _, offset in pairs(cell_offsets) do local offset_x = offset[1] local offset_y = offset[2] local new_index = index + offset_x + offset_y * dimension_x @@ -81,10 +81,10 @@ function on_update() -- primitives are passed by value to lua, keep a hold of old state but turn 255's into 1's local prev_state = {} - for v in pairs(cells) do - prev_state[#prev_state+1] = (not(v == 0)) and 1 or 0 + for v in pairs(cells) do + prev_state[#prev_state + 1] = (not (v == 0)) and 1 or 0 end - for i=1,(dimension_x * dimension_y) do + for i = 1, (dimension_x * dimension_y) do -- wrap around the north and south edges local north = prev_state[i - dimension_x] or prev_state[i + dimension_x * (dimension_y - 1)] local south = prev_state[i + dimension_x] or prev_state[i - dimension_x * (dimension_y - 1)] @@ -95,13 +95,13 @@ function on_update() local northwest = prev_state[i - dimension_x - 1] or 0 local southwest = prev_state[i + dimension_x - 1] or 0 - local neighbours = north + south + east + west + local neighbours = north + south + east + west + northeast + southeast + northwest + southwest - + -- was dead and got 3 neighbours now if prev_state[i] == 0 and neighbours == 3 then cells[i] = 255 - -- was alive and should die now + -- was alive and should die now elseif prev_state[i] == 1 and ((neighbours < 2) or (neighbours > 3)) then cells[i] = 0 end @@ -114,7 +114,7 @@ function on_script_unloaded() -- set state to 0's local life_state = fetch_life_state() local cells = life_state.cells - for i=1,#cells do + for i = 1, #cells do cells[i] = 0 end -end \ No newline at end of file +end diff --git a/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml b/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml new file mode 100644 index 0000000000..5381406045 --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml @@ -0,0 +1,39 @@ +[package] +name = "lua_language_server_lad_backend" +version = "0.1.0" +edition = "2021" +authors = ["Maksymilian Mozolewski "] +license = "MIT OR Apache-2.0" +description = "Language Agnostic Declaration (LAD) file format post processor for generating Lua language server files for the bevy_mod_scripting crate" +repository = "https://github.com/makspll/bevy_mod_scripting" +homepage = "https://github.com/makspll/bevy_mod_scripting" +keywords = ["bevy", "gamedev", "scripting", "documentation", "generator"] +categories = ["game-development", "development-tools"] +include = ["readme.md", "/src"] +readme = "readme.md" + +[dependencies] +clap = { version = "4", features = ["derive"] } +# mdbook = "0.4" +anyhow = "1" +tera = "1.20" +strum = { version = "0.25", features = ["derive"] } +ladfile = { path = "../../ladfile", version = "0.5.0" } +env_logger = "0.11" +log = "0.4" +serde = { version = "1.0", features = ["derive"] } +include_dir = "0.7" +indexmap = "2" +# serde_json = "1.0" +# regex = "1.11" + +[dev-dependencies] +# assert_cmd = "2.0" +# pretty_assertions = "1.4.1" + +[lints] +workspace = true + +[[bin]] +name = "lad-lls" +path = "src/main.rs" diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs new file mode 100644 index 0000000000..50dfc9a8e5 --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -0,0 +1,51 @@ +use indexmap::IndexMap; +use ladfile::LadTypeId; + +use crate::lua_declaration_file::{LuaClass, LuaDefinitionFile, LuaModule}; + +pub fn convert_ladfile_to_lua_declaration_file( + ladfile: ladfile::LadFile, +) -> Result { + let mut definition_file = LuaDefinitionFile { + modules: vec![], + diagnostics: vec![], + }; + + let mut lua_classes: IndexMap = + IndexMap::with_capacity(ladfile.types.len()); + + for (type_id, lad_type) in ladfile.types.iter() { + let lua_class = lad_type_to_lua_type(lad_type); + lua_classes.insert(type_id.clone(), lua_class); + } + + for (type_id, lad_type) in ladfile.types.iter() { + let lua_class = lua_classes + .get(type_id) + .ok_or_else(|| anyhow::anyhow!("Lua class not found for type ID: {}", type_id))?; + definition_file.modules.push(LuaModule { + name: lad_type.identifier.to_owned(), + classes: vec![lua_class.clone()], + ..Default::default() + }); + } + + Ok(definition_file) +} + +pub fn lad_type_to_lua_type(lad_type: &ladfile::LadType) -> LuaClass { + let mut class = LuaClass { + name: lad_type.identifier.to_owned(), + ..Default::default() + }; + + // match &lad_type.layout { + // ladfile::LadTypeLayout::Opaque => todo!(), + // ladfile::LadTypeLayout::MonoVariant(lad_variant) => { + + // }, + // ladfile::LadTypeLayout::Enum(lad_variants) => todo!(), + // } + + class +} diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs new file mode 100644 index 0000000000..415240c70e --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs @@ -0,0 +1,40 @@ +//! Logic for generating Lua language server files from a LAD file. + +use std::path::Path; + +use anyhow::Context; + +use crate::{convert::convert_ladfile_to_lua_declaration_file, templating::render_template}; + +mod convert; +mod lua_declaration_file; +mod templating; + +/// Processess a LAD file and generates Lua language server files. +pub fn generate_lua_language_server_files( + ladfile: ladfile::LadFile, + output_dir: &Path, +) -> Result<(), anyhow::Error> { + let declaration_file = convert_ladfile_to_lua_declaration_file(ladfile)?; + + for file in declaration_file.modules { + let output_path = output_dir.join(&file.name); + std::fs::create_dir_all(output_path.parent().unwrap()) + .with_context(|| "failed to create output directories")?; + let context = tera::Context::from_serialize(&file).with_context(|| { + format!( + "Failed to serialize LuaModule for template rendering: {}", + file.name + ) + })?; + + let rendered = render_template("declaration_file.tera", &context)?; + std::fs::write(&output_path, rendered).with_context(|| { + format!( + "Failed to write rendered template to file: {}", + output_path.display() + ) + })?; + } + Ok(()) +} diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs new file mode 100644 index 0000000000..f50c02e46a --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs @@ -0,0 +1,424 @@ +use serde::Serialize; +use std::collections::HashMap; + +/// Basic primitive types supported by Lua Language Server annotations. +/// +/// These correspond to the fundamental Lua types that can be used in type annotations. +/// +/// # Example +/// ```lua +/// ---@type nil +/// local my_nil = nil +/// +/// ---@type boolean +/// local my_bool = true +/// +/// ---@type string +/// local my_string = "hello" +/// +/// ---@type number +/// local my_number = 42.5 +/// +/// ---@type integer +/// local my_int = 42 +/// +/// ---@type function +/// local my_func = function() end +/// +/// ---@type table +/// local my_table = {} +/// +/// ---@type thread +/// local my_thread = coroutine.create(function() end) +/// +/// ---@type userdata +/// local my_userdata = io.stdout +/// +/// ---@type lightuserdata +/// local my_lightuserdata = some_c_pointer +/// ``` +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "lowercase")] +pub enum LuaPrimitiveType { + Nil, + Any, + Boolean, + String, + Number, + Integer, + Function, + Table, + Thread, + Userdata, + #[serde(rename = "lightuserdata")] + LightUserdata, +} + +/// Represents a Lua type (can be primitive, alias, union, array, function, etc.) +/// +/// Supports all Lua Language Server type annotations including complex types +/// like unions, arrays, generics, and table literals. +/// +/// # Examples +/// ```lua +/// ---@type string -- Primitive type +/// ---@type MyClass -- Alias type +/// ---@type string | number -- Union type +/// ---@type string[] -- Array type +/// ---@type [string, number] -- Tuple type +/// ---@type table -- Dictionary type +/// ---@type { name: string, age: number } -- Table literal +/// ---@type fun(x: number): string -- Function type +/// ---@type MyClass -- Generic type +/// ---@type "left" | "right" -- Literal types +/// ``` +#[derive(Debug, Clone, Serialize)] +pub enum LuaType { + Primitive(LuaPrimitiveType), // "number", "string", "boolean", etc. + Alias(String), + Union(Vec), + Array(Box), + Tuple(Vec), + Dictionary { + key: Box, + value: Box, + }, + TableLiteral(HashMap), + Function(FunctionSignature), + Generic { + name: String, + parent: Option>, + }, + Literal(String), // for literal types, e.g., '"left"' + Any, + Nil, +} + +// Function-related definitions +/// Represents a function parameter in Lua Language Server annotations. +/// +/// # Examples +/// ```lua +/// ---@param name string -- Required parameter +/// ---@param age? number -- Optional parameter +/// ---@param callback fun(): nil -- Function parameter +/// ---@param ... string -- Variadic parameter +/// ``` +#[derive(Debug, Clone, Serialize)] +pub struct FunctionParam { + pub name: String, + pub ty: LuaType, + pub optional: bool, + pub description: Option, +} + +/// Represents a function signature with comprehensive annotation support. +/// +/// # Examples +/// ```lua +/// ---@async -- Async function +/// ---@deprecated -- Deprecated function +/// ---@nodiscard -- Return value should not be ignored +/// ---@package -- Package-private function +/// ---@generic T -- Generic function +/// ---@param name string -- Parameters +/// ---@param age? number +/// ---@return string -- Return types +/// ---@return number? +/// ---@overload fun(name: string): string -- Function overloads +/// function getName(name, age) end +/// ``` +#[derive(Debug, Clone, Serialize)] +pub struct FunctionSignature { + pub params: Vec, + pub returns: Vec, + pub async_fn: bool, + pub deprecated: bool, + pub nodiscard: bool, + pub package: bool, + pub overloads: Vec, + pub generics: Vec, + pub documentation: Option, +} + +// Class-related definitions +/// Field visibility scope for class members. +/// +/// # Examples +/// ```lua +/// ---@class MyClass +/// ---@field public_field string -- Public field (default) +/// ---@field private _private number -- Private field +/// ---@field protected _protected boolean -- Protected field +/// ---@field package _package table -- Package-private field +/// ``` +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "lowercase")] +pub enum FieldScope { + #[serde(rename = "")] + Public, + Private, + Protected, + Package, +} + +/// Represents a class field with type, visibility, and optional status. +/// +/// # Examples +/// ```lua +/// ---@class Player +/// ---@field name string -- Required public field +/// ---@field age? number -- Optional field +/// ---@field private _id string -- Private field +/// ---@field protected _health number -- Protected field +/// ``` +#[derive(Debug, Clone, Serialize)] +pub struct ClassField { + pub name: String, + pub ty: LuaType, + pub scope: FieldScope, + pub optional: bool, + pub description: Option, +} + +// Operator-related definitions +/// Lua metamethod operators supported by the language server. +/// +/// These correspond to Lua metamethods that can be overloaded in classes. +/// +/// # Examples +/// ```lua +/// ---@class Vector +/// ---@operator add(Vector): Vector -- Overload + operator +/// ---@operator unm: Vector -- Overload unary - operator +/// ---@operator call(number): Vector -- Overload () operator +/// ---@operator len: number -- Overload # operator +/// ``` +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "lowercase")] +pub enum LuaOperator { + Add, // + + Sub, // - + Mul, // * + Div, // / + #[serde(rename = "idiv")] + IDiv, // // + Mod, // % + Pow, // ^ + Unm, // unary - + Concat, // .. + Len, // # + Eq, // == + Lt, // < + Le, // <= + Call, // () + Index, // [] + #[serde(rename = "newindex")] + NewIndex, // []= + #[serde(rename = "tostring")] + ToString, // tostring() +} + +/// Represents an operator overload for a class. +/// +/// # Examples +/// ```lua +/// ---@class Vector +/// ---@operator add(Vector): Vector -- Binary operator with parameter +/// ---@operator unm: Vector -- Unary operator without parameter +/// ---@operator call(...): Vector -- Call operator with variadic parameters +/// ``` +#[derive(Debug, Clone, Serialize)] +pub struct Operator { + pub operation: LuaOperator, // e.g., "add", "unm", "call" + pub param_type: Option, + pub return_type: LuaType, +} + +/// Represents a Lua class with inheritance, fields, operators, and generic support. +/// +/// Classes can have inheritance, generic parameters, fields with visibility modifiers, +/// operator overloads, and comprehensive documentation. +/// +/// # Examples +/// ```lua +/// ---@class Vector -- Generic class +/// ---@field x number -- Public field +/// ---@field private _id string -- Private field +/// ---@operator add(Vector): Vector -- Operator overload +/// +/// ---@class Point : Vector -- Inheritance +/// ---@field z number -- Additional field +/// ``` +#[derive(Debug, Clone, Serialize, Default)] +pub struct LuaClass { + pub name: String, + pub exact: bool, + pub parents: Vec, + pub fields: Vec, + pub generics: Vec, + pub operators: Vec, + pub documentation: Option, +} + +// Type alias and enum definitions +/// Represents an enum variant for type aliases that act as enums. +/// +/// # Examples +/// ```lua +/// ---@alias Color +/// ---| "red" -- Red color +/// ---| "green" -- Green color +/// ---| "blue" -- Blue color +/// +/// ---@enum Direction +/// local Direction = { +/// UP = 1, -- Move up +/// DOWN = 2, -- Move down +/// LEFT = 3, -- Move left +/// RIGHT = 4, -- Move right +/// } +/// ``` +#[derive(Debug, Clone, Serialize)] +pub struct EnumVariant { + pub value: String, + pub description: Option, +} + +/// Represents a type alias (including enums) +/// +/// Type aliases can be simple type definitions or enum-like structures with specific values. +/// +/// # Examples +/// ```lua +/// ---@alias MyString string -- Simple alias +/// ---@alias StringOrNumber string | number -- Union alias +/// +/// ---@alias Color +/// ---| "red" +/// ---| "green" +/// ---| "blue" +/// +/// ---@enum Status +/// local Status = { +/// PENDING = 0, +/// SUCCESS = 1, +/// ERROR = 2 +/// } +/// ``` +#[derive(Debug, Clone, Serialize)] +pub struct TypeAlias { + pub name: String, + pub definition: LuaType, + pub enum_variants: Vec, // For enum-like aliases + pub description: Option, +} + +// Module and file-level definitions +/// Represents a module or meta file +/// +/// A module contains classes, type aliases, functions, enums, and other declarations. +/// Can be marked as a meta file for special handling by the language server. +/// +/// # Examples +/// ```lua +/// ---@meta +/// ---@module "mymodule" +/// +/// ---@class MyClass +/// local MyClass = {} +/// +/// ---@type string +/// local version = "1.0.0" +/// +/// return MyClass +/// ``` +#[derive(Debug, Clone, Serialize, Default)] +pub struct LuaModule { + pub name: String, + pub classes: Vec, + pub aliases: Vec, + pub functions: Vec, + pub enums: Vec, + pub documentation: Option, + pub is_meta: bool, +} + +/// Represents a Lua definition file +/// +/// Contains all modules and diagnostic settings for a complete Lua type definition file. +/// Used to generate `.lua` files with proper annotations for the Lua Language Server. +/// +/// # Examples +/// ```lua +/// ---@meta +/// ---@diagnostic disable: lowercase-global +/// +/// ---@class MyClass +/// local MyClass = {} +/// +/// return MyClass +/// ``` +#[derive(Debug, Clone, Serialize)] +pub struct LuaDefinitionFile { + pub modules: Vec, + pub diagnostics: Vec, +} + +// Diagnostic-related definitions +/// Represents a diagnostic toggle annotation. +/// +/// Used to control which diagnostics are enabled or disabled for specific scopes. +/// +/// # Examples +/// ```lua +/// ---@diagnostic disable: lowercase-global -- Disable for entire file +/// ---@diagnostic disable-next-line: unused-local -- Disable for next line only +/// ---@diagnostic enable: undefined-global -- Re-enable specific diagnostic +/// ``` +#[derive(Debug, Clone, Serialize)] +pub struct DiagnosticToggle { + pub state: DiagnosticState, + pub diagnostics: Vec, + pub scope: DiagnosticScope, +} + +/// Diagnostic state (enable/disable) +/// +/// Controls whether diagnostics are enabled, disabled, or disabled for specific lines. +/// +/// # Examples +/// ```lua +/// ---@diagnostic enable: undefined-global -- Enable diagnostic +/// ---@diagnostic disable: lowercase-global -- Disable diagnostic +/// ---@diagnostic disable-next-line: unused-local -- Disable for next line +/// ---@diagnostic disable-line: missing-parameter -- Disable for current line +/// ``` +#[derive(Debug, Clone, Serialize)] +#[serde(rename_all = "lowercase")] +pub enum DiagnosticState { + Enable, + Disable, + #[serde(rename = "disable-next-line")] + DisableNextLine, + #[serde(rename = "disable-line")] + DisableLine, +} + +/// Where the diagnostic toggle applies +/// +/// Defines the scope where diagnostic settings take effect. +/// +/// # Examples +/// ```lua +/// ---@diagnostic disable: lowercase-global -- File scope +/// local x = 1 +/// ---@diagnostic disable-next-line: unused-local -- Next line scope +/// local unused = 2 +/// ``` +#[derive(Debug, Clone, Serialize)] +pub enum DiagnosticScope { + File, + Line(usize), + NextLine(usize), +} diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/main.rs b/crates/lad_backends/lua_language_server_lad_backend/src/main.rs new file mode 100644 index 0000000000..b53fef4bc4 --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/src/main.rs @@ -0,0 +1,47 @@ +//! Language Agnostic Declaration (LAD) file format post processor for generating Lua language server files for the bevy_mod_scripting crate. + +use std::path::PathBuf; + +use clap::Parser; +use lua_language_server_lad_backend::generate_lua_language_server_files; + +#[derive(Debug, clap::Parser)] +/// Command line arguments for the Lua Language Server LAD backend. +pub struct Args { + /// Input LAD file path + #[clap(short, long, help = "LAD json input file")] + pub input: String, + + /// Output directory for the generated Lua language server files + #[clap( + short, + long, + help = "Output directory for the generated Lua language server files, will generate multiple files" + )] + pub output: PathBuf, +} +fn main() { + if let Err(e) = try_main() { + eprintln!("{e}"); + std::process::exit(1); + } +} + +fn try_main() -> Result<(), anyhow::Error> { + let args = Args::parse(); + + // Initialize the logger + env_logger::init(); + + // Log the input and output paths + log::info!("Input LAD file: {}", args.input); + log::info!("Output directory: {:?}", args.output); + + // Load the LAD file + let file = std::fs::read_to_string(&args.input) + .map_err(|e| anyhow::anyhow!("Failed to read LAD file {}: {}", args.input, e))?; + let ladfile = ladfile::parse_lad_file(&file)?; + + generate_lua_language_server_files(ladfile, &args.output)?; + Ok(()) +} diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs b/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs new file mode 100644 index 0000000000..5c8efc5875 --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs @@ -0,0 +1,44 @@ +use std::error::Error; + +use anyhow::Context; +use include_dir::{include_dir, Dir}; + +pub const TEMPLATE_DIRECTORY: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/templates"); + +pub fn prepare_tera() -> Result { + let mut tera = tera::Tera::default(); + // Add the template directory to Tera + for file in TEMPLATE_DIRECTORY.files() { + let content_utf8 = file.contents_utf8().ok_or_else(|| { + anyhow::anyhow!("Failed to read template file: {}", file.path().display()) + })?; + + let template_name = file.path().to_string_lossy(); + tera.add_raw_template(&template_name, content_utf8) + .map_err(handle_tera_error) + .with_context(|| format!("Failed to add template: {}", file.path().display()))?; + log::info!("Added template: {template_name}"); + } + + Ok(tera) +} + +fn handle_tera_error(error: tera::Error) -> anyhow::Error { + let inner_error_str = error + .source() + .and_then(|e| e.to_string().into()) + .unwrap_or_else(|| "No source available".to_string()); + anyhow::anyhow!("Tera error: {error}, {inner_error_str}") +} + +pub fn render_template( + template_name: &str, + context: &tera::Context, +) -> Result { + let tera = prepare_tera()?; + tera.get_template_names().for_each(|name| { + log::info!("Available template: {name}"); + }); + tera.render(template_name, context) + .map_err(handle_tera_error) +} diff --git a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera new file mode 100644 index 0000000000..0b78a18adf --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera @@ -0,0 +1,92 @@ +{%- if is_meta -%} +---@meta +{% endif -%} +{%- if name -%} +---@module "{{ name }}" +{% endif %} +{%- if documentation -%} +--- {{ documentation }} +{% endif %} + + + +{%- for alias in aliases %} + +{%- if alias.description %} +--- {{ alias.description }} +{%- endif %} +{%- if alias.enum_variants %} +---@alias {{ alias.name }} +{%- for variant in alias.enum_variants %} +---| "{{ variant.value }}"{% if variant.description %} # {{ variant.description }}{% endif %} +{%- endfor %} +{%- else %} +---@alias {{ alias.name }} {{ alias.definition | lua_type }} +{%- endif %} +{%- endfor %} + +{%- for enum in enums %} + +{%- if enum.description %} +--- {{ enum.description }} +{%- endif %} +---@enum {{ enum.name }} +local {{ enum.name }} = { +{%- for variant in enum.enum_variants %} +{{ variant.value | upper }} = "{{ variant.value }}",{% if variant.description %} -- {{ variant.description }}{% endif %} +{%- endfor %} +} +{%- endfor %} + +{%- for class in classes %} + +{%- if class.documentation %} +--- {{ class.documentation }} +{%- endif %} +---@class {{ class.name }}{% if class.generics %}<{{ class.generics | join(sep=", " ) }}>{% endif %}{% if class.parents + %} : {{ class.parents | join(sep=" , ") }}{% endif %}{% if class.exact %} @exact{% endif %} + {%- for field in class.fields %} + ---@field {% if field.scope != " Public" %}{{ field.scope | lower }} {% endif %}{{ field.name }}{% if field.optional + %}?{% endif %} {{ field.ty | lua_type }}{% if field.description %} # {{ field.description }}{% endif %} {%- endfor + %} {%- for operator in class.operators %} ---@operator {{ operator.operation }}{% if operator.param_type %}({{ + operator.param_type | lua_type }}){% endif %}: {{ operator.return_type | lua_type }} {%- endfor %} {{ + class.name }}={} {%- endfor %} {%- for func in functions %} {%- if func.documentation %} --- {{ func.documentation + }} {%- endif %} {%- if func.deprecated %} ---@deprecated {%- endif %} {%- if func.async_fn %} ---@async {%- endif %} + {%- if func.nodiscard %} ---@nodiscard {%- endif %} {%- if func.package %} ---@package {%- endif %} {%- for generic + in func.generics %} ---@generic {{ generic }} {%- endfor %} {%- for param in func.params %} ---@param {{ param.name + }}{% if param.optional %}?{% endif %} {{ param.ty | lua_type }}{% if param.description %} # {{ param.description + }}{% endif %} {%- endfor %} {%- for return_type in func.returns %} ---@return {{ return_type | lua_type }} {%- + endfor %} {%- for overload in func.overloads %} ---@overload fun({{ overload.params | map(attribute="name" ) | + join(sep=", ") }}): {{ overload.returns | map(attribute="lua_type") | join(sep=", ") }} + {%- endfor %} + function {{ func.name | default(value="anonymous") }}({{ func.params | map(attribute="name" ) | join(sep=", ") }}) + end + {%- endfor %} + + {%- macro lua_type(type) -%} + {%- if type.Primitive -%} + {{ type.Primitive | lower }} + {%- elif type.Alias -%} + {{ type.Alias }} + {%- elif type.Union -%} + {{ type.Union | map(attribute="lua_type") | join(sep=" | ") }} + {%- elif type.Array -%} + {{ type.Array | lua_type }}[] + {%- elif type.Tuple -%} + [{{ type.Tuple | map(attribute="lua_type") | + join(sep=", ") }}] + {%- elif type.Dictionary -%} + table<{{ type.Dictionary.key | lua_type }}, {{ type.Dictionary.value | lua_type }}> + {%- elif type.TableLiteral -%} + { {% for key, value in type.TableLiteral %}{{ key }}: {{ value | lua_type }}{% if not loop.last %}, {% endif + %}{% endfor %} } + {%- elif type.Function -%} + fun({% for param in type.Function.params %}{{ param.name }}{% if param.optional %}?{% endif %}: {{ param.ty | + lua_type }}{% if not loop.last %}, {% endif %}{% endfor %}){% if type.Function.returns %}: {{ + type.Function.returns | map(attribute="lua_type") | join(sep=", ") }}{% endif %} + {%- elif type.Generic -%} + {{ type.Generic.name }}{% if type.Generic.parent %}<{{ type.Generic.parent | lua_type }}>{% endif %} + {%- elif type.Literal -%} + " {{ type.Literal }}" {%- elif type.Any -%} any {%- elif type.Nil -%} nil {%- else -%} unknown {%- endif -%} + {%- + endmacro -%} \ No newline at end of file diff --git a/crates/ladfile/src/lib.rs b/crates/ladfile/src/lib.rs index 93ad7518b6..95331bd7fa 100644 --- a/crates/ladfile/src/lib.rs +++ b/crates/ladfile/src/lib.rs @@ -577,12 +577,12 @@ pub struct LadGeneric { pub name: String, } -/// Parses a toml string into a LAD file. +/// Parses a json string into a LAD file. pub fn parse_lad_file(toml: &str) -> Result { serde_json::from_str(toml) } -/// Serializes a LAD file into a toml file. +/// Serializes a LAD file into a json file. pub fn serialize_lad_file(lad_file: &LadFile, pretty: bool) -> Result { if pretty { serde_json::to_string_pretty(lad_file) From a32faa47be311518be12568c35757b7b8803c140 Mon Sep 17 00:00:00 2001 From: makspll Date: Mon, 21 Jul 2025 22:43:32 +0100 Subject: [PATCH 02/20] start doing some templates --- .../src/templating.rs | 3 +- .../templates/declaration_file.tera | 133 ++++++------------ 2 files changed, 47 insertions(+), 89 deletions(-) diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs b/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs index 5c8efc5875..b57dba49f4 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs @@ -15,8 +15,7 @@ pub fn prepare_tera() -> Result { let template_name = file.path().to_string_lossy(); tera.add_raw_template(&template_name, content_utf8) - .map_err(handle_tera_error) - .with_context(|| format!("Failed to add template: {}", file.path().display()))?; + .map_err(handle_tera_error)?; log::info!("Added template: {template_name}"); } diff --git a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera index 0b78a18adf..793895d569 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera +++ b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera @@ -1,92 +1,51 @@ -{%- if is_meta -%} ---@meta -{% endif -%} -{%- if name -%} ---@module "{{ name }}" -{% endif %} -{%- if documentation -%} ---- {{ documentation }} -{% endif %} - - - -{%- for alias in aliases %} - -{%- if alias.description %} ---- {{ alias.description }} -{%- endif %} -{%- if alias.enum_variants %} ----@alias {{ alias.name }} -{%- for variant in alias.enum_variants %} ----| "{{ variant.value }}"{% if variant.description %} # {{ variant.description }}{% endif %} -{%- endfor %} -{%- else %} ----@alias {{ alias.name }} {{ alias.definition | lua_type }} -{%- endif %} -{%- endfor %} -{%- for enum in enums %} +{% for class in classes %} +---@class {{ class.name }} -{%- if enum.description %} ---- {{ enum.description }} -{%- endif %} ----@enum {{ enum.name }} -local {{ enum.name }} = { -{%- for variant in enum.enum_variants %} -{{ variant.value | upper }} = "{{ variant.value }}",{% if variant.description %} -- {{ variant.description }}{% endif %} -{%- endfor %} -} -{%- endfor %} +{% for field in class.fields %} +{{ class_field(field=field) }} +{% endfor %} -{%- for class in classes %} - -{%- if class.documentation %} ---- {{ class.documentation }} -{%- endif %} ----@class {{ class.name }}{% if class.generics %}<{{ class.generics | join(sep=", " ) }}>{% endif %}{% if class.parents - %} : {{ class.parents | join(sep=" , ") }}{% endif %}{% if class.exact %} @exact{% endif %} - {%- for field in class.fields %} - ---@field {% if field.scope != " Public" %}{{ field.scope | lower }} {% endif %}{{ field.name }}{% if field.optional - %}?{% endif %} {{ field.ty | lua_type }}{% if field.description %} # {{ field.description }}{% endif %} {%- endfor - %} {%- for operator in class.operators %} ---@operator {{ operator.operation }}{% if operator.param_type %}({{ - operator.param_type | lua_type }}){% endif %}: {{ operator.return_type | lua_type }} {%- endfor %} {{ - class.name }}={} {%- endfor %} {%- for func in functions %} {%- if func.documentation %} --- {{ func.documentation - }} {%- endif %} {%- if func.deprecated %} ---@deprecated {%- endif %} {%- if func.async_fn %} ---@async {%- endif %} - {%- if func.nodiscard %} ---@nodiscard {%- endif %} {%- if func.package %} ---@package {%- endif %} {%- for generic - in func.generics %} ---@generic {{ generic }} {%- endfor %} {%- for param in func.params %} ---@param {{ param.name - }}{% if param.optional %}?{% endif %} {{ param.ty | lua_type }}{% if param.description %} # {{ param.description - }}{% endif %} {%- endfor %} {%- for return_type in func.returns %} ---@return {{ return_type | lua_type }} {%- - endfor %} {%- for overload in func.overloads %} ---@overload fun({{ overload.params | map(attribute="name" ) | - join(sep=", ") }}): {{ overload.returns | map(attribute="lua_type") | join(sep=", ") }} - {%- endfor %} - function {{ func.name | default(value="anonymous") }}({{ func.params | map(attribute="name" ) | join(sep=", ") }}) - end - {%- endfor %} - - {%- macro lua_type(type) -%} - {%- if type.Primitive -%} - {{ type.Primitive | lower }} - {%- elif type.Alias -%} - {{ type.Alias }} - {%- elif type.Union -%} - {{ type.Union | map(attribute="lua_type") | join(sep=" | ") }} - {%- elif type.Array -%} - {{ type.Array | lua_type }}[] - {%- elif type.Tuple -%} - [{{ type.Tuple | map(attribute="lua_type") | - join(sep=", ") }}] - {%- elif type.Dictionary -%} - table<{{ type.Dictionary.key | lua_type }}, {{ type.Dictionary.value | lua_type }}> - {%- elif type.TableLiteral -%} - { {% for key, value in type.TableLiteral %}{{ key }}: {{ value | lua_type }}{% if not loop.last %}, {% endif - %}{% endfor %} } - {%- elif type.Function -%} - fun({% for param in type.Function.params %}{{ param.name }}{% if param.optional %}?{% endif %}: {{ param.ty | - lua_type }}{% if not loop.last %}, {% endif %}{% endfor %}){% if type.Function.returns %}: {{ - type.Function.returns | map(attribute="lua_type") | join(sep=", ") }}{% endif %} - {%- elif type.Generic -%} - {{ type.Generic.name }}{% if type.Generic.parent %}<{{ type.Generic.parent | lua_type }}>{% endif %} - {%- elif type.Literal -%} - " {{ type.Literal }}" {%- elif type.Any -%} any {%- elif type.Nil -%} nil {%- else -%} unknown {%- endif -%} - {%- - endmacro -%} \ No newline at end of file +{% for function in functions %} +{% if function.async_fn %} +---@async +{% endif %} +{% if function.deprecated %} +---@deprecated +{% endif %} +{% if function.no_discard %} +---@nodiscard +{% endif %} +{% if function.package %} +---@package +{% endif %} +{% for generic in function.generics %} +---@generic {{ generic.name }} +{% endfor %} +{% for param in function.params %} +{{ function_param(param=param) }} +{% endfor %} +{% for return in function.returns %} +---@return {{ return.ty }} +{% endfor %} +{% endfor %} +{% endfor %} +{# macros #} + +{% macro class_field(field) %} +---@field {{ field.scope }} {{ field.name }} {% if field.optional %}?{% endif %} {{ field.ty }} +{{ multiline_description(description=field.description) }} +{% endmacro class_field %} + +{% macro function_param(arg) %} +---@param {{ arg.name }} {{ arg.ty }} {% if arg.optional %}?{% endif %} +{{ multiline_description(description=arg.description) }} +{% endmacro function_param %} + +{% macro multiline_description(description) %} +{% for line in description | split(pat="\n") %} +--- {{ line }} +{% endfor %} +{% endmacro multiline_description %} \ No newline at end of file From 3fe87f9184da83105937cfa4e7bafa759b547b3e Mon Sep 17 00:00:00 2001 From: makspll Date: Fri, 25 Jul 2025 00:14:51 +0100 Subject: [PATCH 03/20] add test harness and start generating --- .../Cargo.toml | 4 +- .../src/convert.rs | 75 +++++++++++--- .../src/lib.rs | 39 ++++---- .../src/templating.rs | 4 +- .../templates/declaration_file.tera | 81 ++++++++------- .../tests/.gitignore | 2 + .../tests/example_ladfile/expected.lua | 15 +++ .../tests/integration_tests.rs | 99 +++++++++++++++++++ crates/ladfile/src/lib.rs | 53 ++++++++++ 9 files changed, 299 insertions(+), 73 deletions(-) create mode 100644 crates/lad_backends/lua_language_server_lad_backend/tests/.gitignore create mode 100644 crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua create mode 100644 crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs diff --git a/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml b/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml index 5381406045..c4c56a65ec 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml +++ b/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml @@ -28,8 +28,8 @@ indexmap = "2" # regex = "1.11" [dev-dependencies] -# assert_cmd = "2.0" -# pretty_assertions = "1.4.1" +assert_cmd = "2.0" +pretty_assertions = "1.4.1" [lints] workspace = true diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs index 50dfc9a8e5..b9884bcf00 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -11,12 +11,17 @@ pub fn convert_ladfile_to_lua_declaration_file( diagnostics: vec![], }; + let rust_types = ladfile.polymorphizied_types(); + // convert each rust type to a lua class with generics + let mut lua_classes: IndexMap = IndexMap::with_capacity(ladfile.types.len()); - for (type_id, lad_type) in ladfile.types.iter() { - let lua_class = lad_type_to_lua_type(lad_type); - lua_classes.insert(type_id.clone(), lua_class); + for (key, types) in rust_types.iter() { + // right now one class == one lad type id, when we can properly denormorphize types, we will + // be able to have multiple lad type ids per class + let lua_classes_for_type = convert_polymorphic_type_to_lua_classes(key, types, &ladfile); + lua_classes.extend(lua_classes_for_type); } for (type_id, lad_type) in ladfile.types.iter() { @@ -33,19 +38,59 @@ pub fn convert_ladfile_to_lua_declaration_file( Ok(definition_file) } -pub fn lad_type_to_lua_type(lad_type: &ladfile::LadType) -> LuaClass { - let mut class = LuaClass { - name: lad_type.identifier.to_owned(), - ..Default::default() - }; +const GENERIC_PLACEHOLDERS: [&str; 10] = ["T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C"]; - // match &lad_type.layout { - // ladfile::LadTypeLayout::Opaque => todo!(), - // ladfile::LadTypeLayout::MonoVariant(lad_variant) => { +// TODO: once https://github.com/bevyengine/bevy/issues/17117 is solved, we will be able to figure out +// where the generic types are actually used, for now we only know what they are per type. +pub fn convert_polymorphic_type_to_lua_classes( + polymorphic_type_key: &ladfile::PolymorphicTypeKey, + monomorphized_types: &[&ladfile::LadTypeId], + ladfile: &ladfile::LadFile, +) -> Vec<(LadTypeId, LuaClass)> { + let mut types = Vec::default(); + for &lad_type_id in monomorphized_types { + let generics = GENERIC_PLACEHOLDERS[0..polymorphic_type_key.arity] + .iter() + .map(ToString::to_string) + .collect(); - // }, - // ladfile::LadTypeLayout::Enum(lad_variants) => todo!(), - // } + let documentation = ladfile + .get_type_documentation(lad_type_id) + .map(ToOwned::to_owned); - class + let class = LuaClass { + name: polymorphic_type_key.identifier.to_string(), + exact: true, + generics, + documentation, + operators: vec![], // TODO: Find operators + parents: vec![], // not needed + fields: vec![], // TODO: Find fields + }; + + types.push((lad_type_id.clone(), class)); + } + types } + +// pub fn lad_type_to_lua_type(lad_type: &ladfile::LadType) -> LuaClass { +// let mut class = LuaClass { +// name: lad_type.identifier.to_owned(), +// exact: true, +// parents: vec![], +// generics: lad_type.generics.iter().map(), +// operators: vec![], // TODO: Find operators +// documentation: lad_type.documentation.clone(), +// fields: todo!(), +// }; + +// // match &lad_type.layout { +// // ladfile::LadTypeLayout::Opaque => todo!(), +// // ladfile::LadTypeLayout::MonoVariant(lad_variant) => { + +// // }, +// // ladfile::LadTypeLayout::Enum(lad_variants) => todo!(), +// // } + +// class +// } diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs index 415240c70e..5c9182fdcf 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs @@ -10,6 +10,8 @@ mod convert; mod lua_declaration_file; mod templating; +const DECLARATION_FILE_NAME: &str = "bindings.lua"; + /// Processess a LAD file and generates Lua language server files. pub fn generate_lua_language_server_files( ladfile: ladfile::LadFile, @@ -17,24 +19,23 @@ pub fn generate_lua_language_server_files( ) -> Result<(), anyhow::Error> { let declaration_file = convert_ladfile_to_lua_declaration_file(ladfile)?; - for file in declaration_file.modules { - let output_path = output_dir.join(&file.name); - std::fs::create_dir_all(output_path.parent().unwrap()) - .with_context(|| "failed to create output directories")?; - let context = tera::Context::from_serialize(&file).with_context(|| { - format!( - "Failed to serialize LuaModule for template rendering: {}", - file.name - ) - })?; - - let rendered = render_template("declaration_file.tera", &context)?; - std::fs::write(&output_path, rendered).with_context(|| { - format!( - "Failed to write rendered template to file: {}", - output_path.display() - ) - })?; - } + let output_path = output_dir.join(DECLARATION_FILE_NAME); + std::fs::create_dir_all( + output_path + .parent() + .ok_or_else(|| anyhow::anyhow!("Output path has no parent"))?, + ) + .with_context(|| "failed to create output directories")?; + let context = tera::Context::from_serialize(&declaration_file).with_context(|| { + format!("Failed to serialize LuaModule for template rendering: {DECLARATION_FILE_NAME}") + })?; + + let rendered = render_template("declaration_file.tera", &context)?; + std::fs::write(&output_path, rendered).with_context(|| { + format!( + "Failed to write rendered template to file: {}", + output_path.display() + ) + })?; Ok(()) } diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs b/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs index b57dba49f4..f2de29c8e0 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs @@ -1,7 +1,5 @@ -use std::error::Error; - -use anyhow::Context; use include_dir::{include_dir, Dir}; +use std::error::Error; pub const TEMPLATE_DIRECTORY: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/templates"); diff --git a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera index 793895d569..4af69d5c60 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera +++ b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera @@ -1,51 +1,64 @@ ---@meta ----@module "{{ name }}" - -{% for class in classes %} +---@module "{{ modules | first | get(key="name")}}" +{# newline #} +{# newline #} +{%- for module in modules -%} {# module #} +{%- for class in module.classes -%} ---@class {{ class.name }} +{# newline #} +{{- self::multiline_description(description=class.documentation) -}} -{% for field in class.fields %} -{{ class_field(field=field) }} -{% endfor %} +{%- for field in class.fields -%} +{{- class_field(field=field) -}} +{%- endfor -%} -{% for function in functions %} -{% if function.async_fn %} +{%- for function in module.functions -%} +{%- if function.async_fn -%} ---@async -{% endif %} -{% if function.deprecated %} +{%- endif -%} +{%- if function.deprecated -%} ---@deprecated -{% endif %} -{% if function.no_discard %} +{%- endif -%} +{%- if function.no_discard -%} ---@nodiscard -{% endif %} -{% if function.package %} +{%- endif -%} +{%- if function.package -%} ---@package -{% endif %} -{% for generic in function.generics %} +{%- endif -%} +{%- for generic in function.generics -%} ---@generic {{ generic.name }} -{% endfor %} -{% for param in function.params %} +{%- endfor -%} +{%- for param in function.params -%} {{ function_param(param=param) }} -{% endfor %} -{% for return in function.returns %} +{%- endfor -%} +{%- for return in function.returns -%} ---@return {{ return.ty }} -{% endfor %} -{% endfor %} -{% endfor %} -{# macros #} +{%- endfor -%} +{%- endfor -%} {# functions #} +{%- endfor -%} {# class #} +{# newline #} +{# newline #} +{%- endfor -%} {# modules #} -{% macro class_field(field) %} +{%- macro class_field(field) -%} ---@field {{ field.scope }} {{ field.name }} {% if field.optional %}?{% endif %} {{ field.ty }} -{{ multiline_description(description=field.description) }} -{% endmacro class_field %} +{# newline #} +{{- multiline_description(description=field.description) -}} +{%- endmacro class_field -%} -{% macro function_param(arg) %} +{%- macro function_param(arg) -%} ---@param {{ arg.name }} {{ arg.ty }} {% if arg.optional %}?{% endif %} -{{ multiline_description(description=arg.description) }} -{% endmacro function_param %} +{# newline #} +{{- multiline_description(description=arg.description) -}} +{%- endmacro function_param -%} -{% macro multiline_description(description) %} -{% for line in description | split(pat="\n") %} +{%- macro multiline_description(description) -%} +{% if description %} +{%- for line in description | split(pat="\n") -%} --- {{ line }} -{% endfor %} -{% endmacro multiline_description %} \ No newline at end of file +{%- if not last -%} +{# newline #} +{%- endif -%} +{%- endfor -%} +{%- endif -%} +{%- endmacro multiline_description -%} \ No newline at end of file diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/.gitignore b/crates/lad_backends/lua_language_server_lad_backend/tests/.gitignore new file mode 100644 index 0000000000..9ff7349b79 --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/.gitignore @@ -0,0 +1,2 @@ +**/test.lad.json +**/bindings.lua \ No newline at end of file diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua b/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua new file mode 100644 index 0000000000..6dee532b0a --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua @@ -0,0 +1,15 @@ +---@meta +---@module "StructType" + +---@class StructType +--- I am a struct + +---@class EnumType + + +---@class TupleStructType +--- I am a tuple test type + +---@class UnitType +--- I am a unit test type + diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs new file mode 100644 index 0000000000..03a8bcf973 --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs @@ -0,0 +1,99 @@ +#![allow(missing_docs)] + +use std::{fs::DirEntry, path::PathBuf}; + +use assert_cmd::Command; +fn add_executable_dir_to_path() { + let command_path = Command::cargo_bin("lad-lls").expect("failed to find lad-lls binary"); + let command_path = command_path.get_program(); + let command_path = PathBuf::from(command_path); + let dir = command_path + .parent() + .expect("failed to get parent directory"); + let mut paths = std::env::split_paths(&std::env::var("PATH").expect("failed to get PATH")) + .collect::>(); + paths.insert(0, dir.to_owned()); + std::env::set_var( + "PATH", + std::env::join_paths(paths).expect("failed to join paths"), + ); +} + +// use cargo manifest dir +fn get_tests_dir() -> std::path::PathBuf { + let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap(); + let manifest_dir = std::path::PathBuf::from(manifest_dir); + manifest_dir.join("tests") +} + +fn copy_example_ladfile_to_relevant_test(tests_dir: &std::path::Path) { + let ladfile = ladfile::EXAMPLE_LADFILE; + let book_ladfile_path = tests_dir.join("example_ladfile").join("test.lad.json"); + std::fs::write(book_ladfile_path, ladfile).expect("failed to copy LAD file"); +} + +const BLESS_MODE: bool = true; + +#[test] +fn main() { + add_executable_dir_to_path(); + + let tests_dir = get_tests_dir(); + if !tests_dir.exists() { + std::fs::create_dir_all(&tests_dir).expect("failed to create tests directory"); + } + copy_example_ladfile_to_relevant_test(&tests_dir); + + // for each folder in tests_dir, run the binary with + // --input /test.lad.json + // --output /generated.lua + + let tests = std::fs::read_dir(&tests_dir) + .expect("failed to read tests directory") + .collect::, _>>() + .expect("failed to collect test entries"); + + if tests.is_empty() { + panic!("No tests found in the tests directory. Please add some test folders with LAD files") + } + + for entry in tests { + if entry.file_type().expect("failed to get file type").is_dir() { + let folder_path = entry.path(); + let ladfile_path = folder_path.join("test.lad.json"); + + Command::cargo_bin("lad-lls") + .expect("failed to find lad-lls binary") + .arg("--input") + .arg(&ladfile_path) + .arg("--output") + .arg(&folder_path) + .assert() + .success(); + + // then compare the output with the expected.lua file + + let expected_path = folder_path.join("expected.lua"); + let expected_str = + std::fs::read_to_string(&expected_path).expect("failed to read expected.lua file"); + let generated_str = std::fs::read_to_string(folder_path.join("bindings.lua")) + .expect("failed to read bindings.lua file"); + + if BLESS_MODE { + std::fs::write(&expected_path, &generated_str) + .expect("failed to write expected.lua file"); + } else { + pretty_assertions::assert_eq!( + expected_str, + generated_str, + "Generated Lua file does not match expected output for {}", + folder_path.display() + ); + } + } + } + assert!( + !BLESS_MODE, + "BLESS_MODE is enabled, please disable it to run the tests" + ); +} diff --git a/crates/ladfile/src/lib.rs b/crates/ladfile/src/lib.rs index 95331bd7fa..aeac189336 100644 --- a/crates/ladfile/src/lib.rs +++ b/crates/ladfile/src/lib.rs @@ -73,6 +73,11 @@ impl LadFile { }) } + /// Retrieves true if the type id corresponds to a primitive type. + pub fn is_primitive(&self, type_id: &LadTypeId) -> bool { + self.primitives.contains_key(type_id) + } + /// Retrieves the generics of a type id if it is a generic type. pub fn get_type_generics(&self, type_id: &LadTypeId) -> Option<&[LadGeneric]> { self.types @@ -92,6 +97,54 @@ impl LadFile { .map(|p| p.documentation.as_ref()) }) } + + /// Retrieves all unique types, then groups them by their generics arity, + /// this grouping represents types as expected to be seen in rust source code. + /// + /// For example `Vec` and `Vec` will be grouped together as `Vec` with arity 1. + pub fn polymorphizied_types(&self) -> IndexMap> { + let mut types_by_identifier_and_arity: IndexMap> = + IndexMap::>::new(); + for type_id in self.types.keys() { + let arity = self.get_type_arity(type_id); + let identifier = self.get_type_identifier(type_id, None); + types_by_identifier_and_arity + .entry(PolymorphicTypeKey { identifier, arity }) + .or_default() + .push(type_id); + } + + for (primitive_id, primitive) in &self.primitives { + let arity = 0; // primitives have no generics currently + let identifier = primitive.kind.lad_type_id().to_string().into(); + types_by_identifier_and_arity + .entry(PolymorphicTypeKey { identifier, arity }) + .or_default() + .push(primitive_id); + } + + types_by_identifier_and_arity + } + + /// Returns the arity of a type, which is the number of generic parameters it has. + /// Types without generics will return 0, meaning they can be identified uniquely by their identifier. + pub fn get_type_arity(&self, type_id: &LadTypeId) -> usize { + self.types + .get(type_id) + .map(|t| t.generics.len()) + .unwrap_or(0) // primitives have no generics currently + } +} + +/// A key for polymorphic types, used to group types by their identifier and arity. +/// +/// Each key would correspond to a unique rust type, such as `Vec` or `HashMap`. +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct PolymorphicTypeKey { + /// The type identifier + pub identifier: Cow<'static, str>, + /// The arity of the type + pub arity: usize, } impl Default for LadFile { From 27ee8aa7649de8c9981f3c47bceb757efec85765 Mon Sep 17 00:00:00 2001 From: makspll Date: Fri, 25 Jul 2025 21:36:06 +0100 Subject: [PATCH 04/20] WIP --- assets/definitions/World.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/assets/definitions/World.lua b/assets/definitions/World.lua index 5d29efd20e..57f73792a6 100644 --- a/assets/definitions/World.lua +++ b/assets/definitions/World.lua @@ -5,6 +5,17 @@ world = {} +---@class Abc +---@field asd number + +---@class Abc +---@field abc string + + + function world.query(asd) end + +---@type Abc +asd = {} From a9c6cf881db78d44d0bf1dd9103b30089ce23a34 Mon Sep 17 00:00:00 2001 From: makspll Date: Fri, 25 Jul 2025 21:36:25 +0100 Subject: [PATCH 05/20] WIP --- .../src/convert.rs | 131 ++++++++++++++---- .../src/lua_declaration_file.rs | 2 - .../tests/.gitignore | 2 +- 3 files changed, 106 insertions(+), 29 deletions(-) diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs index b9884bcf00..bac1cf0b38 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -1,7 +1,19 @@ use indexmap::IndexMap; -use ladfile::LadTypeId; +use ladfile::{ArgumentVisitor, LadFile, LadTypeId}; -use crate::lua_declaration_file::{LuaClass, LuaDefinitionFile, LuaModule}; +use crate::lua_declaration_file::{ + LuaClass, LuaDefinitionFile, LuaModule, LuaPrimitiveType, LuaType, +}; + +trait GetLuaIdentifier { + fn get_lua_identifier(&self, key: LadTypeId) -> String; +} + +impl GetLuaIdentifier for ladfile::LadFile { + fn get_lua_identifier(&self, key: LadTypeId) -> String { + ArgumentVisitor + } +} pub fn convert_ladfile_to_lua_declaration_file( ladfile: ladfile::LadFile, @@ -58,14 +70,24 @@ pub fn convert_polymorphic_type_to_lua_classes( .get_type_documentation(lad_type_id) .map(ToOwned::to_owned); + let mut fields = vec![]; + if let Some(lad_type) = ladfile.types.get(lad_type_id) { + // add fields for the type + match lad_type.layout { + ladfile::LadTypeLayout::Opaque => todo!(), + ladfile::LadTypeLayout::MonoVariant(lad_variant) => todo!(), + ladfile::LadTypeLayout::Enum(lad_variants) => todo!(), + } + } + let class = LuaClass { name: polymorphic_type_key.identifier.to_string(), - exact: true, + parents: vec![], // not needed + fields: vec![], // TODO: Find fields generics, documentation, + exact: true, operators: vec![], // TODO: Find operators - parents: vec![], // not needed - fields: vec![], // TODO: Find fields }; types.push((lad_type_id.clone(), class)); @@ -73,24 +95,81 @@ pub fn convert_polymorphic_type_to_lua_classes( types } -// pub fn lad_type_to_lua_type(lad_type: &ladfile::LadType) -> LuaClass { -// let mut class = LuaClass { -// name: lad_type.identifier.to_owned(), -// exact: true, -// parents: vec![], -// generics: lad_type.generics.iter().map(), -// operators: vec![], // TODO: Find operators -// documentation: lad_type.documentation.clone(), -// fields: todo!(), -// }; - -// // match &lad_type.layout { -// // ladfile::LadTypeLayout::Opaque => todo!(), -// // ladfile::LadTypeLayout::MonoVariant(lad_variant) => { - -// // }, -// // ladfile::LadTypeLayout::Enum(lad_variants) => todo!(), -// // } - -// class -// } +pub fn to_lua_many( + ladfile: &LadFile, + lad_types: &[ladfile::LadTypeKind], +) -> Result, anyhow::Error> { + let lua_types = lad_types + .iter() + .map(|lad_type| lad_instance_to_lua_type(&lad_type)) + .collect::, _>>()?; + Ok(lua_types) +} + +pub fn lad_instance_to_lua_type( + ladfile: &LadFile, + lad_type: &ladfile::LadTypeKind, +) -> Result { + Ok(match &lad_type { + ladfile::LadTypeKind::Primitive(prim) => lad_primitive_to_lua_type(prim), + ladfile::LadTypeKind::Ref(lad_type_id) + | ladfile::LadTypeKind::Mut(lad_type_id) + | ladfile::LadTypeKind::Val(lad_type_id) => LuaType::Alias(ladfile.), + ladfile::LadTypeKind::Option(lad_type_kind) => LuaType::Union(vec![ + lad_instance_to_lua_type(ladfile, lad_type_kind)?, + LuaType::Primitive(LuaPrimitiveType::Nil), + ]), + ladfile::LadTypeKind::Vec(lad_type_kind) => { + LuaType::Array(Box::new(lad_instance_to_lua_type(ladfile, lad_type_kind)?)) + } + ladfile::LadTypeKind::HashMap(key, value) => LuaType::Dictionary { + key: Box::new(lad_instance_to_lua_type(ladfile, key)?), + value: Box::new(lad_instance_to_lua_type(ladfile, value)?), + }, + ladfile::LadTypeKind::InteropResult(lad_type_kind) => { + lad_instance_to_lua_type(ladfile, lad_type_kind)? // TODO: currently ignores the possibility of an error type, we should have a custom class abstraction here + } + ladfile::LadTypeKind::Tuple(lad_type_kinds) => { + LuaType::Tuple(to_lua_many(ladfile, lad_type_kinds)?) + } + ladfile::LadTypeKind::Array(lad_type_kind, _) => { + LuaType::Array(Box::new(lad_instance_to_lua_type(ladfile, lad_type_kind)?)) + } + ladfile::LadTypeKind::Union(lad_type_kinds) => { + LuaType::Union(to_lua_many(ladfile, lad_type_kinds)?) + } + ladfile::LadTypeKind::Unknown(_) => LuaType::Any, + }) +} + +pub fn lad_primitive_to_lua_type(lad_primitive: &ladfile::LadBMSPrimitiveKind) -> LuaType { + LuaType::Primitive(match lad_primitive { + ladfile::LadBMSPrimitiveKind::Bool => LuaPrimitiveType::Boolean, + ladfile::LadBMSPrimitiveKind::Isize + | ladfile::LadBMSPrimitiveKind::I8 + | ladfile::LadBMSPrimitiveKind::I16 + | ladfile::LadBMSPrimitiveKind::I32 + | ladfile::LadBMSPrimitiveKind::I64 + | ladfile::LadBMSPrimitiveKind::I128 + | ladfile::LadBMSPrimitiveKind::Usize + | ladfile::LadBMSPrimitiveKind::U8 + | ladfile::LadBMSPrimitiveKind::U16 + | ladfile::LadBMSPrimitiveKind::U32 + | ladfile::LadBMSPrimitiveKind::U64 + | ladfile::LadBMSPrimitiveKind::U128 => LuaPrimitiveType::Integer, + ladfile::LadBMSPrimitiveKind::F32 | ladfile::LadBMSPrimitiveKind::F64 => { + LuaPrimitiveType::Number + } + ladfile::LadBMSPrimitiveKind::Char + | ladfile::LadBMSPrimitiveKind::Str + | ladfile::LadBMSPrimitiveKind::String + | ladfile::LadBMSPrimitiveKind::OsString + | ladfile::LadBMSPrimitiveKind::PathBuf => LuaPrimitiveType::String, + ladfile::LadBMSPrimitiveKind::FunctionCallContext => LuaPrimitiveType::Any, + ladfile::LadBMSPrimitiveKind::DynamicFunction + | ladfile::LadBMSPrimitiveKind::DynamicFunctionMut => LuaPrimitiveType::Function, + ladfile::LadBMSPrimitiveKind::ReflectReference => { + return LuaType::Alias("ReflectReference".to_string()) + } + }) +} diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs index f50c02e46a..88aa27fb34 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs @@ -41,7 +41,6 @@ use std::collections::HashMap; #[serde(rename_all = "lowercase")] pub enum LuaPrimitiveType { Nil, - Any, Boolean, String, Number, @@ -91,7 +90,6 @@ pub enum LuaType { }, Literal(String), // for literal types, e.g., '"left"' Any, - Nil, } // Function-related definitions diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/.gitignore b/crates/lad_backends/lua_language_server_lad_backend/tests/.gitignore index 9ff7349b79..7b7d2bd1f4 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/tests/.gitignore +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/.gitignore @@ -1,2 +1,2 @@ -**/test.lad.json +example_ladfile/test.lad.json **/bindings.lua \ No newline at end of file From f29c33981ca8dc383ec25b437ca700a68f331588 Mon Sep 17 00:00:00 2001 From: makspll Date: Sun, 26 Oct 2025 23:52:02 +0000 Subject: [PATCH 06/20] some progress --- assets/definitions/World.lua | 21 - assets/definitions/bindings.lua | 2197 ++++++++++++++++ assets/scripts/game_of_life.lua | 1 + .../Cargo.toml | 2 +- .../bindings.lua/bindings.lua | 2201 +++++++++++++++++ .../src/convert.rs | 168 +- .../src/lua_declaration_file.rs | 12 +- .../templates/declaration_file.tera | 79 +- .../tests/example_ladfile/expected.lua | 19 +- crates/ladfile/test_assets/test.lad.json | 58 +- crates/ladfile_builder/src/lib.rs | 39 +- 11 files changed, 4713 insertions(+), 84 deletions(-) delete mode 100644 assets/definitions/World.lua create mode 100644 assets/definitions/bindings.lua create mode 100644 crates/lad_backends/lua_language_server_lad_backend/bindings.lua/bindings.lua diff --git a/assets/definitions/World.lua b/assets/definitions/World.lua deleted file mode 100644 index 57f73792a6..0000000000 --- a/assets/definitions/World.lua +++ /dev/null @@ -1,21 +0,0 @@ ----@meta - - ----@class world -world = {} - - ----@class Abc ----@field asd number - ----@class Abc ----@field abc string - - - -function world.query(asd) - -end - ----@type Abc -asd = {} diff --git a/assets/definitions/bindings.lua b/assets/definitions/bindings.lua new file mode 100644 index 0000000000..0fd3b08d4b --- /dev/null +++ b/assets/definitions/bindings.lua @@ -0,0 +1,2197 @@ +---@meta +---@module "World" + +---@class World +--- The ECS world containing all Components, Resources and Systems. Main point of interaction with a Bevy App. + + +---@class ScriptComponentRegistration +--- A reference to a component type's reflection registration.--- --- In general think of this as a handle to a type.--- --- Not to be confused with script registered dynamic components, although this can point to a script registered component. +---@field registration ? ScriptTypeRegistration +---@field component_id ? ComponentId +---@field is_dynamic_script_component ? boolean + + +---@class ScriptQueryBuilder +--- The query builder is used to build ECS queries which retrieve spefific components filtered by specific conditions.--- --- For example:--- ```rust,ignore--- builder.component(componentA)--- .component(componentB)--- .with(componentC)--- .without(componentD) --- ```--- --- Will retrieve entities which:--- - Have componentA--- - Have componentB--- - Have componentC--- - Do not have componentD--- --- As well as references to components:--- - componentA--- - componentB + + +---@class ScriptQueryResult +--- A result from a query. + + +---@class ScriptResourceRegistration +--- A reference to a resource type's reflection registration.--- --- In general think of this as a handle to a type. +---@field registration ? ScriptTypeRegistration +---@field resource_id ? ComponentId + + +---@class ScriptTypeRegistration +--- A reference to a type which is not a `Resource` or `Component`.--- --- In general think of this as a handle to a type. + + +---@class ScriptSystemBuilder +--- A builder for systems living in scripts + + +---@class ScriptAttachment +--- Specifies a unique attachment of a script. These attachments are mapped to [`ContextKey`]'s depending on the context policy used. + + +---@class ReflectSchedule +--- A reflectable schedule. +---@field type_path ? string +---@field label ? ReflectableScheduleLabel + +---@class ReflectSystem +--- A reflectable system. + + +---@class Color +--- An enumerated type that can represent any of the color types in this crate.--- --- This is useful when you need to store a color in a data structure that can't be generic over--- the color type.---
---
--- --- # Operations--- --- [`Color`] supports all the standard color operations, such as [mixing](Mix),--- [luminance](Luminance) and [hue](Hue) adjustment,--- and [diffing](EuclideanDistance). These operations delegate to the concrete color space contained--- by [`Color`], but will convert to [`Oklch`](Oklcha) for operations which aren't supported in the--- current space. After performing the operation, if a conversion was required, the result will be--- converted back into the original color space.--- --- ```rust--- # use bevy_color::{Hue, Color};--- let red_hsv = Color::hsv(0., 1., 1.);--- let red_srgb = Color::srgb(1., 0., 0.);--- --- // HSV has a definition of hue, so it will be returned.--- red_hsv.hue();--- --- // SRGB doesn't have a native definition for hue.--- // Converts to Oklch and returns that result.--- red_srgb.hue();--- ```--- --- [`Oklch`](Oklcha) has been chosen as the intermediary space in cases where conversion is required--- due to its perceptual uniformity and broad support for Bevy's color operations.--- To avoid the cost of repeated conversion, and ensure consistent results where that is desired,--- first convert this [`Color`] into your desired color space. + + +---@class Hsla +--- Color in Hue-Saturation-Lightness (HSL) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV).---
---
+---@field hue ? number +---@field saturation ? number +---@field lightness ? number +---@field alpha ? number + + +---@class Hsva +--- Color in Hue-Saturation-Value (HSV) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV).---
---
+---@field hue ? number +---@field saturation ? number +---@field value ? number +---@field alpha ? number + + +---@class Hwba +--- Color in Hue-Whiteness-Blackness (HWB) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HWB_color_model).---
---
+---@field hue ? number +---@field whiteness ? number +---@field blackness ? number +---@field alpha ? number + + +---@class Laba +--- Color in LAB color space, with alpha---
---
+---@field lightness ? number +---@field a ? number +---@field b ? number +---@field alpha ? number + + +---@class Lcha +--- Color in LCH color space, with alpha---
---
+---@field lightness ? number +---@field chroma ? number +---@field hue ? number +---@field alpha ? number + + +---@class LinearRgba +--- Linear RGB color with alpha.---
---
+---@field red ? number +---@field green ? number +---@field blue ? number +---@field alpha ? number + + +---@class Oklaba +--- Color in Oklab color space, with alpha---
---
+---@field lightness ? number +---@field a ? number +---@field b ? number +---@field alpha ? number + + +---@class Oklcha +--- Color in Oklch color space, with alpha---
---
+---@field lightness ? number +---@field chroma ? number +---@field hue ? number +---@field alpha ? number + + +---@class Srgba +--- Non-linear standard RGB with alpha.---
---
+---@field red ? number +---@field green ? number +---@field blue ? number +---@field alpha ? number + + +---@class Xyza +--- [CIE 1931](https://en.wikipedia.org/wiki/CIE_1931_color_space) color space, also known as XYZ, with an alpha channel.---
---
+---@field x ? number +---@field y ? number +---@field z ? number +---@field alpha ? number + + +---@class AutoExposureCompensationCurve +--- An auto exposure compensation curve.--- This curve is used to map the average log luminance of a scene to an--- exposure compensation value, to allow for fine control over the final exposure. +---@field min_log_lum ? number +---@field max_log_lum ? number +---@field min_compensation ? number +---@field max_compensation ? number +---@field lut ? [u8; 256] + + +---@class AutoExposure +--- Component that enables auto exposure for an HDR-enabled 2d or 3d camera.--- --- Auto exposure adjusts the exposure of the camera automatically to--- simulate the human eye's ability to adapt to different lighting conditions.--- --- Bevy's implementation builds a 64 bin histogram of the scene's luminance,--- and then adjusts the exposure so that the average brightness of the final--- render will be middle gray. Because it's using a histogram, some details can--- be selectively ignored or emphasized. Outliers like shadows and specular--- highlights can be ignored, and certain areas can be given more (or less)--- weight based on a mask.--- --- # Usage Notes--- --- **Auto Exposure requires compute shaders and is not compatible with WebGL2.** +---@field range ? RangeInclusive +---@field filter ? RangeInclusive +---@field speed_brighten ? number +---@field speed_darken ? number +---@field exponential_transition_distance ? number +---@field metering_mask ? Handle +---@field compensation_curve ? Handle + + +---@class Bloom +--- Applies a bloom effect to an HDR-enabled 2d or 3d camera.--- --- Bloom emulates an effect found in real cameras and the human eye,--- causing halos to appear around very bright parts of the scene.--- --- See also .--- --- # Usage Notes--- --- **Bloom is currently not compatible with WebGL2.**--- --- Often used in conjunction with `bevy_pbr::StandardMaterial::emissive` for 3d meshes.--- --- Bloom is best used alongside a tonemapping function that desaturates bright colors,--- such as [`crate::tonemapping::Tonemapping::TonyMcMapface`].--- --- Bevy's implementation uses a parametric curve to blend between a set of--- blurred (lower frequency) images generated from the camera's view.--- See for a visualization of the parametric curve--- used in Bevy as well as a visualization of the curve's respective scattering profile. +---@field intensity ? number +---@field low_frequency_boost ? number +---@field low_frequency_boost_curvature ? number +---@field high_pass_frequency ? number +---@field prefilter ? BloomPrefilter +---@field composite_mode ? BloomCompositeMode +---@field max_mip_dimension ? integer +---@field scale ? Vec2 + + +---@class BloomCompositeMode + + + +---@class BloomPrefilter +--- Applies a threshold filter to the input image to extract the brightest--- regions before blurring them and compositing back onto the original image.--- These settings are useful when emulating the 1990s-2000s game look.--- --- # Considerations--- * Changing these settings creates a physically inaccurate image--- * Changing these settings makes it easy to make the final result look worse--- * Non-default prefilter settings should be used in conjunction with [`BloomCompositeMode::Additive`] +---@field threshold ? number +---@field threshold_softness ? number + + +---@class ContrastAdaptiveSharpening +--- Applies a contrast adaptive sharpening (CAS) filter to the camera.--- --- CAS is usually used in combination with shader based anti-aliasing methods--- such as FXAA or TAA to regain some of the lost detail from the blurring that they introduce.--- --- CAS is designed to adjust the amount of sharpening applied to different areas of an image--- based on the local contrast. This can help avoid over-sharpening areas with high contrast--- and under-sharpening areas with low contrast.--- --- To use this, add the [`ContrastAdaptiveSharpening`] component to a 2D or 3D camera. +---@field enabled ? boolean +---@field sharpening_strength ? number +---@field denoise ? boolean + + +---@class DenoiseCas + +---@field [1] ? boolean + + +---@class Camera2d +--- A 2D camera component. Enables the 2D render graph for a [`Camera`]. + + +---@class Camera3d +--- A 3D camera component. Enables the main 3D render graph for a [`Camera`].--- --- The camera coordinate space is right-handed X-right, Y-up, Z-back.--- This means "forward" is -Z. +---@field depth_load_op ? Camera3dDepthLoadOp +---@field depth_texture_usages ? Camera3dDepthTextureUsage +---@field screen_space_specular_transmission_steps ? integer +---@field screen_space_specular_transmission_quality ? ScreenSpaceTransmissionQuality + + +---@class Camera3dDepthLoadOp +--- The depth clear operation to perform for the main 3d pass. + + +---@class Camera3dDepthTextureUsage + +---@field [1] ? integer + + +---@class ScreenSpaceTransmissionQuality +--- The quality of the screen space transmission blur effect, applied to whatever's “behind” transmissive--- objects when their `roughness` is greater than `0.0`.--- --- Higher qualities are more GPU-intensive.--- --- **Note:** You can get better-looking results at any quality level by enabling TAA. See: [`TemporalAntiAliasPlugin`](crate::experimental::taa::TemporalAntiAliasPlugin). + + +---@class DepthOfField +--- A component that enables a [depth of field] postprocessing effect when attached to a [`Camera3d`],--- simulating the focus of a camera lens.--- --- [depth of field]: https://en.wikipedia.org/wiki/Depth_of_field +---@field mode ? DepthOfFieldMode +---@field focal_distance ? number +---@field sensor_height ? number +---@field aperture_f_stops ? number +---@field max_circle_of_confusion_diameter ? number +---@field max_depth ? number + + +---@class DepthOfFieldMode +--- Controls the appearance of the effect. + + +---@class Fxaa +--- A component for enabling Fast Approximate Anti-Aliasing (FXAA)--- for a [`bevy_render::camera::Camera`]. +---@field enabled ? boolean +---@field edge_threshold ? Sensitivity +---@field edge_threshold_min ? Sensitivity + + +---@class Sensitivity + + + +---@class MotionBlur +--- A component that enables and configures motion blur when added to a camera.--- --- Motion blur is an effect that simulates how moving objects blur as they change position during--- the exposure of film, a sensor, or an eyeball.--- --- Because rendering simulates discrete steps in time, we use per-pixel motion vectors to estimate--- the path of objects between frames. This kind of implementation has some artifacts:--- - Fast moving objects in front of a stationary object or when in front of empty space, will not--- have their edges blurred.--- - Transparent objects do not write to depth or motion vectors, so they cannot be blurred.--- --- Other approaches, such as *A Reconstruction Filter for Plausible Motion Blur* produce more--- correct results, but are more expensive and complex, and have other kinds of artifacts. This--- implementation is relatively inexpensive and effective.--- --- # Usage--- --- Add the [`MotionBlur`] component to a camera to enable and configure motion blur for that--- camera.--- --- ```--- # use bevy_core_pipeline::{core_3d::Camera3d, motion_blur::MotionBlur};--- # use bevy_ecs::prelude::*;--- # fn test(mut commands: Commands) {--- commands.spawn((--- Camera3d::default(),--- MotionBlur::default(),--- ));--- # }--- ```` +---@field shutter_angle ? number +---@field samples ? integer + + +---@class OrderIndependentTransparencySettings +--- Used to identify which camera will use OIT to render transparent meshes--- and to configure OIT. +---@field layer_count ? integer +---@field alpha_threshold ? number + + +---@class ChromaticAberration +--- Adds colored fringes to the edges of objects in the scene.--- --- [Chromatic aberration] simulates the effect when lenses fail to focus all--- colors of light toward a single point. It causes rainbow-colored streaks to--- appear, which are especially apparent on the edges of objects. Chromatic--- aberration is commonly used for collision effects, especially in horror--- games.--- --- Bevy's implementation is based on that of *Inside* ([Gjøl & Svendsen 2016]).--- It's based on a customizable lookup texture, which allows for changing the--- color pattern. By default, the color pattern is simply a 3×1 pixel texture--- consisting of red, green, and blue, in that order, but you can change it to--- any image in order to achieve different effects.--- --- [Chromatic aberration]: https://en.wikipedia.org/wiki/Chromatic_aberration--- --- [Gjøl & Svendsen 2016]: https://github.com/playdeadgames/publications/blob/master/INSIDE/rendering_inside_gdc2016.pdf +---@field color_lut ? Handle +---@field intensity ? number +---@field max_samples ? integer + + +---@class DepthPrepass +--- If added to a [`crate::prelude::Camera3d`] then depth values will be copied to a separate texture available to the main pass. + + +---@class MotionVectorPrepass +--- If added to a [`crate::prelude::Camera3d`] then screen space motion vectors will be copied to a separate texture available to the main pass. + + +---@class NormalPrepass +--- If added to a [`crate::prelude::Camera3d`] then vertex world normals will be copied to a separate texture available to the main pass.--- Normals will have normal map textures already applied. + + +---@class Skybox +--- Adds a skybox to a 3D camera, based on a cubemap texture.--- --- Note that this component does not (currently) affect the scene's lighting.--- To do so, use `EnvironmentMapLight` alongside this component.--- --- See also . +---@field image ? Handle +---@field brightness ? number +---@field rotation ? Quat + + +---@class Smaa +--- A component for enabling Subpixel Morphological Anti-Aliasing (SMAA)--- for a [`bevy_render::camera::Camera`]. +---@field preset ? SmaaPreset + + +---@class SmaaPreset +--- A preset quality level for SMAA.--- --- Higher values are slower but result in a higher-quality image.--- --- The default value is *high*. + + +---@class TemporalAntiAliasing +--- Component to apply temporal anti-aliasing to a 3D perspective camera.--- --- Temporal anti-aliasing (TAA) is a form of image smoothing/filtering, like--- multisample anti-aliasing (MSAA), or fast approximate anti-aliasing (FXAA).--- TAA works by blending (averaging) each frame with the past few frames.--- --- # Tradeoffs--- --- Pros:--- * Filters more types of aliasing than MSAA, such as textures and singular bright pixels (specular aliasing)--- * Cost scales with screen/view resolution, unlike MSAA which scales with number of triangles--- * Greatly increases the quality of stochastic rendering techniques such as SSAO, certain shadow map sampling methods, etc--- --- Cons:--- * Chance of "ghosting" - ghostly trails left behind moving objects--- * Thin geometry, lighting detail, or texture lines may flicker noisily or disappear--- --- Because TAA blends past frames with the current frame, when the frames differ too much--- (such as with fast moving objects or camera cuts), ghosting artifacts may occur.--- --- Artifacts tend to be reduced at higher framerates and rendering resolution.--- --- # Usage Notes--- --- The [`TemporalAntiAliasPlugin`] must be added to your app.--- Any camera with this component must also disable [`Msaa`] by setting it to [`Msaa::Off`].--- --- [Currently](https://github.com/bevyengine/bevy/issues/8423), TAA cannot be used with [`bevy_render::camera::OrthographicProjection`].--- --- TAA also does not work well with alpha-blended meshes, as it requires depth writing to determine motion.--- --- It is very important that correct motion vectors are written for everything on screen.--- Failure to do so will lead to ghosting artifacts. For instance, if particle effects--- are added using a third party library, the library must either:--- --- 1. Write particle motion vectors to the motion vectors prepass texture--- 2. Render particles after TAA--- --- If no [`MipBias`] component is attached to the camera, TAA will add a `MipBias(-1.0)` component. +---@field reset ? boolean + + +---@class DebandDither +--- Enables a debanding shader that applies dithering to mitigate color banding in the final image for a given [`Camera`] entity. + + +---@class Tonemapping +--- Optionally enables a tonemapping shader that attempts to map linear input stimulus into a perceptually uniform image for a given [`Camera`] entity. + + +---@class ComponentId +--- A value which uniquely identifies the type of a [`Component`] or [`Resource`] within a--- [`World`].--- --- Each time a new `Component` type is registered within a `World` using--- e.g. [`World::register_component`] or [`World::register_component_with_descriptor`]--- or a Resource with e.g. [`World::init_resource`],--- a corresponding `ComponentId` is created to track it.--- --- While the distinction between `ComponentId` and [`TypeId`] may seem superficial, breaking them--- into two separate but related concepts allows components to exist outside of Rust's type system.--- Each Rust type registered as a `Component` will have a corresponding `ComponentId`, but additional--- `ComponentId`s may exist in a `World` to track components which cannot be--- represented as Rust types for scripting or other advanced use-cases.--- --- A `ComponentId` is tightly coupled to its parent `World`. Attempting to use a `ComponentId` from--- one `World` to access the metadata of a `Component` in a different `World` is undefined behavior--- and must not be attempted.--- --- Given a type `T` which implements [`Component`], the `ComponentId` for `T` can be retrieved--- from a `World` using [`World::component_id()`] or via [`Components::component_id()`]. Access--- to the `ComponentId` for a [`Resource`] is available via [`Components::resource_id()`]. +---@field [1] ? integer + + +---@class ComponentTicks +--- Records when a component or resource was added and when it was last mutably dereferenced (or added). +---@field added ? Tick +---@field changed ? Tick + + +---@class Tick +--- A value that tracks when a system ran relative to other systems.--- This is used to power change detection.--- --- *Note* that a system that hasn't been run yet has a `Tick` of 0. +---@field tick ? integer + + +---@class Entity +--- Lightweight identifier of an [entity](crate::entity).--- --- The identifier is implemented using a [generational index]: a combination of an index and a generation.--- This allows fast insertion after data removal in an array while minimizing loss of spatial locality.--- --- These identifiers are only valid on the [`World`] it's sourced from. Attempting to use an `Entity` to--- fetch entity components or metadata from a different world will either fail or return unexpected results.--- --- [generational index]: https://lucassardois.medium.com/generational-indices-guide-8e3c5f7fd594--- --- # Stability warning--- For all intents and purposes, `Entity` should be treated as an opaque identifier. The internal bit--- representation is liable to change from release to release as are the behaviors or performance--- characteristics of any of its trait implementations (i.e. `Ord`, `Hash`, etc.). This means that changes in--- `Entity`'s representation, though made readable through various functions on the type, are not considered--- breaking changes under [SemVer].--- --- In particular, directly serializing with `Serialize` and `Deserialize` make zero guarantee of long--- term wire format compatibility. Changes in behavior will cause serialized `Entity` values persisted--- to long term storage (i.e. disk, databases, etc.) will fail to deserialize upon being updated.--- --- # Usage--- --- This data type is returned by iterating a `Query` that has `Entity` as part of its query fetch type parameter ([learn more]).--- It can also be obtained by calling [`EntityCommands::id`] or [`EntityWorldMut::id`].--- --- ```--- # use bevy_ecs::prelude::*;--- # #[derive(Component)]--- # struct SomeComponent;--- fn setup(mut commands: Commands) {--- // Calling `spawn` returns `EntityCommands`.--- let entity = commands.spawn(SomeComponent).id();--- }--- --- fn exclusive_system(world: &mut World) {--- // Calling `spawn` returns `EntityWorldMut`.--- let entity = world.spawn(SomeComponent).id();--- }--- #--- # bevy_ecs::system::assert_is_system(setup);--- # bevy_ecs::system::assert_is_system(exclusive_system);--- ```--- --- 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.--- --- ```--- # use bevy_ecs::prelude::*;--- #--- # #[derive(Component)]--- # struct Expired;--- #--- fn dispose_expired_food(mut commands: Commands, query: Query>) {--- for food_entity in &query {--- commands.entity(food_entity).despawn();--- }--- }--- #--- # bevy_ecs::system::assert_is_system(dispose_expired_food);--- ```--- --- [learn more]: crate::system::Query#entity-id-access--- [`EntityCommands::id`]: crate::system::EntityCommands::id--- [`EntityWorldMut::id`]: crate::world::EntityWorldMut::id--- [`EntityCommands`]: crate::system::EntityCommands--- [`Query::get`]: crate::system::Query::get--- [`World`]: crate::world::World--- [SemVer]: https://semver.org/ + + +---@class EntityHash +--- A [`BuildHasher`] that results in a [`EntityHasher`]. + + +---@class EntityHashSet +--- A [`HashSet`] pre-configured to use [`EntityHash`] hashing. +---@field [1] ? HashSet + + +---@class DefaultQueryFilters +--- Default query filters work by excluding entities with certain components from most queries.--- --- If a query does not explicitly mention a given disabling component, it will not include entities with that component.--- To be more precise, this checks if the query's [`FilteredAccess`] contains the component,--- and if it does not, adds a [`Without`](crate::prelude::Without) filter for that component to the query.--- --- This resource is initialized in the [`World`] whenever a new world is created,--- with the [`Disabled`] component as a disabling component.--- --- Note that you can remove default query filters by overwriting the [`DefaultQueryFilters`] resource.--- This can be useful as a last resort escape hatch, but is liable to break compatibility with other libraries.--- --- See the [module docs](crate::entity_disabling) for more info.--- --- --- # Warning--- --- Default query filters are a global setting that affects all queries in the [`World`],--- and incur a small performance cost for each query.--- --- They can cause significant interoperability issues within the ecosystem,--- as users must be aware of each disabling component in use.--- --- Think carefully about whether you need to use a new disabling component,--- and clearly communicate their presence in any libraries you publish. +---@field disabling ? SmallVec + + +---@class Disabled +--- A marker component for disabled entities.--- --- Semantically, this component is used to mark entities that are temporarily disabled (typically for gameplay reasons),--- but will likely be re-enabled at some point.--- --- Like all disabling components, this only disables the entity itself,--- not its children or other entities that reference it.--- To disable an entire tree of entities, use [`EntityCommands::insert_recursive`](crate::prelude::EntityCommands::insert_recursive).--- --- Every [`World`] has a default query filter that excludes entities with this component,--- registered in the [`DefaultQueryFilters`] resource.--- See [the module docs] for more info.--- --- [the module docs]: crate::entity_disabling + + +---@class ChildOf +--- Stores the parent entity of this child entity with this component.--- --- This is a [`Relationship`] component, and creates the canonical--- "parent / child" hierarchy. This is the "source of truth" component, and it pairs with--- the [`Children`] [`RelationshipTarget`](crate::relationship::RelationshipTarget).--- --- This relationship should be used for things like:--- --- 1. Organizing entities in a scene--- 2. Propagating configuration or data inherited from a parent, such as "visibility" or "world-space global transforms".--- 3. Ensuring a hierarchy is despawned when an entity is despawned.--- --- [`ChildOf`] contains a single "target" [`Entity`]. When [`ChildOf`] is inserted on a "source" entity,--- the "target" entity will automatically (and immediately, via a component hook) have a [`Children`]--- component inserted, and the "source" entity will be added to that [`Children`] instance.--- --- If the [`ChildOf`] component is replaced with a different "target" entity, the old target's [`Children`]--- will be automatically (and immediately, via a component hook) be updated to reflect that change.--- --- Likewise, when the [`ChildOf`] component is removed, the "source" entity will be removed from the old--- target's [`Children`]. If this results in [`Children`] being empty, [`Children`] will be automatically removed.--- --- When a parent is despawned, all children (and their descendants) will _also_ be despawned.--- --- You can create parent-child relationships in a variety of ways. The most direct way is to insert a [`ChildOf`] component:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let root = world.spawn_empty().id();--- let child1 = world.spawn(ChildOf(root)).id();--- let child2 = world.spawn(ChildOf(root)).id();--- let grandchild = world.spawn(ChildOf(child1)).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- --- world.entity_mut(child2).remove::();--- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1]);--- --- world.entity_mut(root).despawn();--- assert!(world.get_entity(root).is_err());--- assert!(world.get_entity(child1).is_err());--- assert!(world.get_entity(grandchild).is_err());--- ```--- --- However if you are spawning many children, you might want to use the [`EntityWorldMut::with_children`] helper instead:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let mut child1 = Entity::PLACEHOLDER;--- let mut child2 = Entity::PLACEHOLDER;--- let mut grandchild = Entity::PLACEHOLDER;--- let root = world.spawn_empty().with_children(|p| {--- child1 = p.spawn_empty().with_children(|p| {--- grandchild = p.spawn_empty().id();--- }).id();--- child2 = p.spawn_empty().id();--- }).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- ```--- --- [`Relationship`]: crate::relationship::Relationship +---@field [1] ? Entity + + +---@class Children +--- Tracks which entities are children of this parent entity.--- --- A [`RelationshipTarget`] collection component that is populated--- with entities that "target" this entity with the [`ChildOf`] [`Relationship`] component.--- --- Together, these components form the "canonical parent-child hierarchy". See the [`ChildOf`] component for the full--- description of this relationship and instructions on how to use it.--- --- # Usage--- --- Like all [`RelationshipTarget`] components, this data should not be directly manipulated to avoid desynchronization.--- Instead, modify the [`ChildOf`] components on the "source" entities.--- --- To access the children of an entity, you can iterate over the [`Children`] component,--- using the [`IntoIterator`] trait.--- For more complex access patterns, see the [`RelationshipTarget`] trait.--- --- [`Relationship`]: crate::relationship::Relationship--- [`RelationshipTarget`]: crate::relationship::RelationshipTarget +---@field [1] ? Vec + + +---@class Identifier +--- A unified identifier for all entity and similar IDs.--- --- Has the same size as a `u64` integer, but the layout is split between a 32-bit low--- segment, a 31-bit high segment, and the significant bit reserved as type flags to denote--- entity kinds. + + +---@class Name +--- Component used to identify an entity. Stores a hash for faster comparisons.--- --- The hash is eagerly re-computed upon each update to the name.--- --- [`Name`] should not be treated as a globally unique identifier for entities,--- as multiple entities can have the same name. [`Entity`] should be--- used instead as the default unique identifier. +---@field hash ? integer +---@field name ? Cow + + +---@class RemovedComponentEntity +--- Wrapper around [`Entity`] for [`RemovedComponents`].--- Internally, `RemovedComponents` uses these as an `Events`. +---@field [1] ? Entity + + +---@class ButtonState +--- The current "press" state of an element + + +---@class AxisSettings +--- Settings for a [`GamepadAxis`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for an axis.--- Values that are higher than `livezone_upperbound` will be rounded up to 1.0.--- Values that are lower than `livezone_lowerbound` will be rounded down to -1.0.--- Values that are in-between `deadzone_lowerbound` and `deadzone_upperbound` will be rounded to 0.0.--- Otherwise, values will be linearly rescaled to fit into the sensitivity range.--- For example, a value that is one fourth of the way from `deadzone_upperbound` to `livezone_upperbound` will be scaled to 0.25.--- --- The valid range is `[-1.0, 1.0]`. +---@field livezone_upperbound ? number +---@field deadzone_upperbound ? number +---@field deadzone_lowerbound ? number +---@field livezone_lowerbound ? number +---@field threshold ? number + + +---@class ButtonAxisSettings +--- Settings for a [`GamepadButton`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for a button axis.--- --- ## Logic--- --- - Values that are higher than or equal to `high` will be rounded to 1.0.--- - Values that are lower than or equal to `low` will be rounded to 0.0.--- - Otherwise, values will not be rounded.--- --- The valid range is from 0.0 to 1.0, inclusive. +---@field high ? number +---@field low ? number +---@field threshold ? number + + +---@class ButtonSettings +--- Manages settings for gamepad buttons.--- --- It is used inside [`GamepadSettings`] to define the threshold for a [`GamepadButton`]--- to be considered pressed or released. A button is considered pressed if the `press_threshold`--- value is surpassed and released if the `release_threshold` value is undercut.--- --- Allowed values: `0.0 <= ``release_threshold`` <= ``press_threshold`` <= 1.0` +---@field press_threshold ? number +---@field release_threshold ? number + + +---@class Gamepad +--- Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`].--- --- An entity with this component is spawned automatically after [`GamepadConnectionEvent`]--- and updated by [`gamepad_event_processing_system`].--- --- See also [`GamepadSettings`] for configuration.--- --- # Examples--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadAxis, GamepadButton};--- # use bevy_ecs::system::Query;--- # use bevy_ecs::name::Name;--- #--- fn gamepad_usage_system(gamepads: Query<(&Name, &Gamepad)>) {--- for (name, gamepad) in &gamepads {--- println!("{name}");--- --- if gamepad.just_pressed(GamepadButton::North) {--- println!("{} just pressed North", name)--- }--- --- if let Some(left_stick_x) = gamepad.get(GamepadAxis::LeftStickX) {--- println!("left stick X: {}", left_stick_x)--- }--- }--- }--- ``` +---@field vendor_id ? Option +---@field product_id ? Option +---@field digital ? ButtonInput +---@field analog ? Axis + + +---@class GamepadAxis +--- Represents gamepad input types that are mapped in the range [-1.0, 1.0].--- --- ## Usage--- --- This is used to determine which axis has changed its value when receiving a--- gamepad axis event. It is also used in the [`Gamepad`] component. + + +---@class GamepadAxisChangedEvent +--- [`GamepadAxis`] event triggered by an analog state change. +---@field entity ? Entity +---@field axis ? GamepadAxis +---@field value ? number + + +---@class GamepadButton +--- Represents gamepad input types that are mapped in the range [0.0, 1.0].--- --- ## Usage--- --- This is used to determine which button has changed its value when receiving gamepad button events.--- It is also used in the [`Gamepad`] component. + + +---@class GamepadButtonChangedEvent +--- [`GamepadButton`] event triggered by an analog state change. +---@field entity ? Entity +---@field button ? GamepadButton +---@field state ? ButtonState +---@field value ? number + + +---@class GamepadButtonStateChangedEvent +--- [`GamepadButton`] event triggered by a digital state change. +---@field entity ? Entity +---@field button ? GamepadButton +---@field state ? ButtonState + + +---@class GamepadConnection +--- The connection status of a gamepad. + + +---@class GamepadConnectionEvent +--- A Gamepad connection event. Created when a connection to a gamepad--- is established and when a gamepad is disconnected. +---@field gamepad ? Entity +---@field connection ? GamepadConnection + + +---@class GamepadEvent +--- A gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`GamepadButtonChangedEvent`] and [`GamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event is produced by `bevy_input`. + + +---@class GamepadInput +--- Encapsulation over [`GamepadAxis`] and [`GamepadButton`]. + + +---@class GamepadRumbleIntensity +--- The intensity at which a gamepad's force-feedback motors may rumble. +---@field strong_motor ? number +---@field weak_motor ? number + + +---@class GamepadRumbleRequest +--- An event that controls force-feedback rumbling of a [`Gamepad`] [`entity`](Entity).--- --- # Notes--- --- Does nothing if the gamepad or platform does not support rumble.--- --- # Example--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadRumbleRequest, GamepadRumbleIntensity};--- # use bevy_ecs::prelude::{EventWriter, Res, Query, Entity, With};--- # use core::time::Duration;--- fn rumble_gamepad_system(--- mut rumble_requests: EventWriter,--- gamepads: Query>,--- ) {--- for entity in gamepads.iter() {--- rumble_requests.write(GamepadRumbleRequest::Add {--- gamepad: entity,--- intensity: GamepadRumbleIntensity::MAX,--- duration: Duration::from_secs_f32(0.5),--- });--- }--- }--- ``` + + +---@class GamepadSettings +--- Gamepad settings component.--- --- ## Usage--- --- It is used to create a `bevy` component that stores the settings of [`GamepadButton`] and [`GamepadAxis`] in [`Gamepad`].--- If no user defined [`ButtonSettings`], [`AxisSettings`], or [`ButtonAxisSettings`]--- are defined, the default settings of each are used as a fallback accordingly.--- --- ## Note--- --- The [`GamepadSettings`] are used to determine when raw gamepad events--- should register. Events that don't meet the change thresholds defined in [`GamepadSettings`]--- will not register. To modify these settings, mutate the corresponding component. +---@field default_button_settings ? ButtonSettings +---@field default_axis_settings ? AxisSettings +---@field default_button_axis_settings ? ButtonAxisSettings +---@field button_settings ? HashMap +---@field axis_settings ? HashMap +---@field button_axis_settings ? HashMap + + +---@class RawGamepadAxisChangedEvent +--- [`GamepadAxis`] changed event unfiltered by [`GamepadSettings`]. +---@field gamepad ? Entity +---@field axis ? GamepadAxis +---@field value ? number + + +---@class RawGamepadButtonChangedEvent +--- [`GamepadButton`] changed event unfiltered by [`GamepadSettings`]. +---@field gamepad ? Entity +---@field button ? GamepadButton +---@field value ? number + + +---@class RawGamepadEvent +--- A raw gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`RawGamepadButtonChangedEvent`] and [`RawGamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event type is used by `bevy_input` to feed its components. + + +---@class DoubleTapGesture +--- Double tap gesture.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first + + +---@class PanGesture +--- Pan gesture.--- --- ## Platform-specific--- --- - On **`iOS`**, must be enabled first +---@field [1] ? Vec2 + + +---@class PinchGesture +--- Two-finger pinch gesture, often used for magnifications.--- --- Positive delta values indicate magnification (zooming in) and--- negative delta values indicate shrinking (zooming out).--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +---@field [1] ? number + + +---@class RotationGesture +--- Two-finger rotation gesture.--- --- Positive delta values indicate rotation counterclockwise and--- negative delta values indicate rotation clockwise.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +---@field [1] ? number + + +---@class Key +--- The logical key code of a [`KeyboardInput`].--- --- ## Technical--- --- Its values map 1 to 1 to winit's Key. + + +---@class KeyCode +--- The key code of a [`KeyboardInput`].--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `Res>`.--- --- Code representing the location of a physical key--- This mostly conforms to the UI Events Specification's [`KeyboardEvent.code`] with a few--- exceptions:--- - The keys that the specification calls `MetaLeft` and `MetaRight` are named `SuperLeft` and--- `SuperRight` here.--- - The key that the specification calls "Super" is reported as `Unidentified` here.--- --- [`KeyboardEvent.code`]: https://w3c.github.io/uievents-code/#code-value-tables--- --- ## Updating--- --- The resource is updated inside of the [`keyboard_input_system`]. + + +---@class KeyboardFocusLost +--- Gets generated from `bevy_winit::winit_runner`--- --- Used for clearing all cached states to avoid having 'stuck' key presses--- when, for example, switching between windows with 'Alt-Tab' or using any other--- OS specific key combination that leads to Bevy window losing focus and not receiving any--- input events + + +---@class KeyboardInput +--- A keyboard input event.--- --- This event is the translated version of the `WindowEvent::KeyboardInput` from the `winit` crate.--- It is available to the end user and can be used for game logic.--- --- ## Usage--- --- The event is consumed inside of the [`keyboard_input_system`]--- to update the [`ButtonInput`](ButtonInput) resource. +---@field key_code ? KeyCode +---@field logical_key ? Key +---@field state ? ButtonState +---@field text ? Option +---@field repeat ? boolean +---@field window ? Entity + + +---@class NativeKey +--- Contains the platform-native logical key identifier, known as keysym.--- --- Exactly what that means differs from platform to platform, but the values are to some degree--- tied to the currently active keyboard layout. The same key on the same keyboard may also report--- different values on different platforms, which is one of the reasons this is a per-platform--- enum.--- --- This enum is primarily used to store raw keysym when Winit doesn't map a given native logical--- key identifier to a meaningful [`Key`] variant. This lets you use [`Key`], and let the user--- define keybinds which work in the presence of identifiers we haven't mapped for you yet. + + +---@class NativeKeyCode +--- Contains the platform-native physical key identifier--- --- The exact values vary from platform to platform (which is part of why this is a per-platform--- enum), but the values are primarily tied to the key's physical location on the keyboard.--- --- This enum is primarily used to store raw keycodes when Winit doesn't map a given native--- physical key identifier to a meaningful [`KeyCode`] variant. In the presence of identifiers we--- haven't mapped for you yet, this lets you use [`KeyCode`] to:--- --- - Correctly match key press and release events.--- - On non-web platforms, support assigning keybinds to virtually any key through a UI. + + +---@class AccumulatedMouseMotion +--- Tracks how much the mouse has moved every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseMotion`] events received this frame. +---@field delta ? Vec2 + + +---@class AccumulatedMouseScroll +--- Tracks how much the mouse has scrolled every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseWheel`] events received this frame. +---@field unit ? MouseScrollUnit +---@field delta ? Vec2 + + +---@class MouseButton +--- A button on a mouse device.--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `bevy`--- resource.--- --- ## Updating--- --- The resource is updated inside of the [`mouse_button_input_system`]. + + +---@class MouseButtonInput +--- A mouse button input event.--- --- This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate.--- --- ## Usage--- --- The event is read inside of the [`mouse_button_input_system`]--- to update the [`ButtonInput`] resource. +---@field button ? MouseButton +---@field state ? ButtonState +---@field window ? Entity + + +---@class MouseMotion +--- An event reporting the change in physical position of a pointing device.--- --- This represents raw, unfiltered physical motion.--- It is the translated version of [`DeviceEvent::MouseMotion`] from the `winit` crate.--- --- All pointing devices connected to a single machine at the same time can emit the event independently.--- However, the event data does not make it possible to distinguish which device it is referring to.--- --- [`DeviceEvent::MouseMotion`]: https://docs.rs/winit/latest/winit/event/enum.DeviceEvent.html#variant.MouseMotion +---@field delta ? Vec2 + + +---@class MouseScrollUnit +--- The scroll unit.--- --- Describes how a value of a [`MouseWheel`] event has to be interpreted.--- --- The value of the event can either be interpreted as the amount of lines or the amount of pixels--- to scroll. + + +---@class MouseWheel +--- A mouse wheel event.--- --- This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate. +---@field unit ? MouseScrollUnit +---@field x ? number +---@field y ? number +---@field window ? Entity + + +---@class ForceTouch +--- A force description of a [`Touch`] input. + + +---@class TouchInput +--- A touch input event.--- --- ## Logic--- --- Every time the user touches the screen, a new [`TouchPhase::Started`] event with an unique--- identifier for the finger is generated. When the finger is lifted, the [`TouchPhase::Ended`]--- event is generated with the same finger id.--- --- After a [`TouchPhase::Started`] event has been emitted, there may be zero or more [`TouchPhase::Moved`]--- events when the finger is moved or the touch pressure changes.--- --- The finger id may be reused by the system after an [`TouchPhase::Ended`] event. The user--- should assume that a new [`TouchPhase::Started`] event received with the same id has nothing--- to do with the old finger and is a new finger.--- --- A [`TouchPhase::Canceled`] event is emitted when the system has canceled tracking this--- touch, such as when the window loses focus, or on iOS if the user moves the--- device against their face.--- --- ## Note--- --- This event is the translated version of the `WindowEvent::Touch` from the `winit` crate.--- It is available to the end user and can be used for game logic. +---@field phase ? TouchPhase +---@field position ? Vec2 +---@field window ? Entity +---@field force ? Option +---@field id ? integer + + +---@class TouchPhase +--- A phase of a [`TouchInput`].--- --- ## Usage--- --- It is used to describe the phase of the touch input that is currently active.--- This includes a phase that indicates that a touch input has started or ended,--- or that a finger has moved. There is also a canceled phase that indicates that--- the system canceled the tracking of the finger. + + +---@class AspectRatio +--- An `AspectRatio` is the ratio of width to height. +---@field [1] ? number + + +---@class Aabb2d +--- A 2D axis-aligned bounding box, or bounding rectangle +---@field min ? Vec2 +---@field max ? Vec2 + + +---@class BoundingCircle +--- A bounding circle +---@field center ? Vec2 +---@field circle ? Circle + + +---@class Aabb3d +--- A 3D axis-aligned bounding box +---@field min ? Vec3A +---@field max ? Vec3A + + +---@class BoundingSphere +--- A bounding sphere +---@field center ? Vec3A +---@field sphere ? Sphere + + +---@class AabbCast2d +--- An intersection test that casts an [`Aabb2d`] along a ray. +---@field ray ? RayCast2d +---@field aabb ? Aabb2d + + +---@class BoundingCircleCast +--- An intersection test that casts a [`BoundingCircle`] along a ray. +---@field ray ? RayCast2d +---@field circle ? BoundingCircle + + +---@class RayCast2d +--- A raycast intersection test for 2D bounding volumes +---@field ray ? Ray2d +---@field max ? number +---@field direction_recip ? Vec2 + + +---@class AabbCast3d +--- An intersection test that casts an [`Aabb3d`] along a ray. +---@field ray ? RayCast3d +---@field aabb ? Aabb3d + + +---@class BoundingSphereCast +--- An intersection test that casts a [`BoundingSphere`] along a ray. +---@field ray ? RayCast3d +---@field sphere ? BoundingSphere + + +---@class RayCast3d +--- A raycast intersection test for 3D bounding volumes +---@field origin ? Vec3A +---@field direction ? Dir3A +---@field max ? number +---@field direction_recip ? Vec3A + + +---@class CompassOctant +--- A compass enum with 8 directions.--- ```text--- N (North)--- ▲--- NW │ NE--- ╲ │ ╱--- W (West) ┼─────► E (East)--- ╱ │ ╲--- SW │ SE--- ▼--- S (South)--- ``` + + +---@class CompassQuadrant +--- A compass enum with 4 directions.--- ```text--- N (North)--- ▲--- │--- │--- W (West) ┼─────► E (East)--- │--- │--- ▼--- S (South)--- ``` + + +---@class EaseFunction +--- Curve functions over the [unit interval], commonly used for easing transitions.--- --- `EaseFunction` can be used on its own to interpolate between `0.0` and `1.0`.--- It can also be combined with [`EasingCurve`] to interpolate between other--- intervals and types, including vectors and rotations.--- --- # Example--- --- [`sample`] the smoothstep function at various points. This will return `None`--- if the parameter is outside the unit interval.--- --- ```--- # use bevy_math::prelude::*;--- let f = EaseFunction::SmoothStep;--- --- assert_eq!(f.sample(-1.0), None);--- assert_eq!(f.sample(0.0), Some(0.0));--- assert_eq!(f.sample(0.5), Some(0.5));--- assert_eq!(f.sample(1.0), Some(1.0));--- assert_eq!(f.sample(2.0), None);--- ```--- --- [`sample_clamped`] will clamp the parameter to the unit interval, so it--- always returns a value.--- --- ```--- # use bevy_math::prelude::*;--- # let f = EaseFunction::SmoothStep;--- assert_eq!(f.sample_clamped(-1.0), 0.0);--- assert_eq!(f.sample_clamped(0.0), 0.0);--- assert_eq!(f.sample_clamped(0.5), 0.5);--- assert_eq!(f.sample_clamped(1.0), 1.0);--- assert_eq!(f.sample_clamped(2.0), 1.0);--- ```--- --- [`sample`]: EaseFunction::sample--- [`sample_clamped`]: EaseFunction::sample_clamped--- [unit interval]: `Interval::UNIT` + + +---@class JumpAt +--- Configuration options for the [`EaseFunction::Steps`] curves. This closely replicates the--- [CSS step function specification].--- --- [CSS step function specification]: https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#description + + +---@class Interval +--- A nonempty closed interval, possibly unbounded in either direction.--- --- In other words, the interval may stretch all the way to positive or negative infinity, but it--- will always have some nonempty interior. +---@field start ? number +---@field end ? number + + +---@class Dir2 +--- A normalized vector pointing in a direction in 2D space +---@field [1] ? Vec2 + + +---@class Dir3 +--- A normalized vector pointing in a direction in 3D space +---@field [1] ? Vec3 + + +---@class Dir3A +--- A normalized SIMD vector pointing in a direction in 3D space.--- --- This type stores a 16 byte aligned [`Vec3A`].--- This may or may not be faster than [`Dir3`]: make sure to benchmark! +---@field [1] ? Vec3A + + +---@class FloatOrd +--- A wrapper for floats that implements [`Ord`], [`Eq`], and [`Hash`] traits.--- --- This is a work around for the fact that the IEEE 754-2008 standard,--- implemented by Rust's [`f32`] type,--- doesn't define an ordering for [`NaN`](f32::NAN),--- and `NaN` is not considered equal to any other `NaN`.--- --- Wrapping a float with `FloatOrd` breaks conformance with the standard--- by sorting `NaN` as less than all other numbers and equal to any other `NaN`. +---@field [1] ? number + + +---@class Isometry2d +--- An isometry in two dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(2). This includes translation and rotation, but excludes reflection.--- --- For the three-dimensional version, see [`Isometry3d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_abs_diff_eq;--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- let point = Vec2::new(4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_eq!(result, Vec2::new(-2.0, 5.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- # let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- # let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- # let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let circle_iso = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let rectangle_iso = Isometry2d::from_rotation(Rot2::degrees(90.0));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = circle_iso.inverse() * rectangle_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = circle_iso.inverse_mul(rectangle_iso);--- ``` +---@field rotation ? Rot2 +---@field translation ? Vec2 + + +---@class Isometry3d +--- An isometry in three dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(3). This includes translation and rotation, but excludes reflection.--- --- For the two-dimensional version, see [`Isometry2d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- let point = Vec3::new(4.0, 4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_relative_eq!(result, Vec3::new(-2.0, 5.0, 7.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- # let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- # let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- # let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let sphere_iso = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let cuboid_iso = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = sphere_iso.inverse() * cuboid_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = sphere_iso.inverse_mul(cuboid_iso);--- ``` +---@field rotation ? Quat +---@field translation ? Vec3A + + +---@class Annulus +--- A primitive shape formed by the region between two circles, also known as a ring. +---@field inner_circle ? Circle +---@field outer_circle ? Circle + + +---@class Arc2d +--- A primitive representing an arc between two points on a circle.--- --- An arc has no area.--- If you want to include the portion of a circle's area swept out by the arc,--- use the pie-shaped [`CircularSector`].--- If you want to include only the space inside the convex hull of the arc,--- use the bowl-shaped [`CircularSegment`].--- --- The arc is drawn starting from [`Vec2::Y`], extending by `half_angle` radians on--- either side. The center of the circle is the origin [`Vec2::ZERO`]. Note that this--- means that the origin may not be within the `Arc2d`'s convex hull.--- --- **Warning:** Arcs with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- It is recommended to normalize arcs to have an angle in [0, 2π]. +---@field radius ? number +---@field half_angle ? number + + +---@class Capsule2d +--- A 2D capsule primitive, also known as a stadium or pill shape.--- --- A two-dimensional capsule is defined as a neighborhood of points at a distance (radius) from a line +---@field radius ? number +---@field half_length ? number + + +---@class Circle +--- A circle primitive, representing the set of points some distance from the origin +---@field radius ? number + + +---@class CircularSector +--- A primitive representing a circular sector: a pie slice of a circle.--- --- The segment is positioned so that it always includes [`Vec2::Y`] and is vertically symmetrical.--- To orient the sector differently, apply a rotation.--- The sector is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- --- **Warning:** Circular sectors with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular sectors to have an angle in [0, 2π]. +---@field arc ? Arc2d + + +---@class CircularSegment +--- A primitive representing a circular segment:--- the area enclosed by the arc of a circle and its chord (the line between its endpoints).--- --- The segment is drawn starting from [`Vec2::Y`], extending equally on either side.--- To orient the segment differently, apply a rotation.--- The segment is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- When positioning a segment, the [`apothem`](Self::apothem) function may be particularly useful.--- --- **Warning:** Circular segments with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular segments to have an angle in [0, 2π]. +---@field arc ? Arc2d + + +---@class Ellipse +--- An ellipse primitive, which is like a circle, but the width and height can be different +---@field half_size ? Vec2 + + +---@class Line2d +--- An infinite line going through the origin along a direction in 2D space.--- --- For a finite line: [`Segment2d`] +---@field direction ? Dir2 + + +---@class Plane2d +--- An unbounded plane in 2D space. It forms a separating surface through the origin,--- stretching infinitely far +---@field normal ? Dir2 + + +---@class Rectangle +--- A rectangle primitive, which is like a square, except that the width and height can be different +---@field half_size ? Vec2 + + +---@class RegularPolygon +--- A polygon centered on the origin where all vertices lie on a circle, equally far apart. +---@field circumcircle ? Circle +---@field sides ? integer + + +---@class Rhombus +--- A rhombus primitive, also known as a diamond shape.--- A four sided polygon, centered on the origin, where opposite sides are parallel but without--- requiring right angles. +---@field half_diagonals ? Vec2 + + +---@class Segment2d +--- A line segment defined by two endpoints in 2D space. +---@field vertices ? [glam::Vec2; 2] + + +---@class Triangle2d +--- A triangle in 2D space +---@field vertices ? [glam::Vec2; 3] + + +---@class Capsule3d +--- A 3D capsule primitive centered on the origin--- A three-dimensional capsule is defined as a surface at a distance (radius) from a line +---@field radius ? number +---@field half_length ? number + + +---@class Cone +--- A cone primitive centered on the midpoint between the tip of the cone and the center of its base.--- --- The cone is oriented with its tip pointing towards the Y axis. +---@field radius ? number +---@field height ? number + + +---@class ConicalFrustum +--- A conical frustum primitive.--- A conical frustum can be created--- by slicing off a section of a cone. +---@field radius_top ? number +---@field radius_bottom ? number +---@field height ? number + + +---@class Cuboid +--- A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not--- required to be the same. +---@field half_size ? Vec3 + + +---@class Cylinder +--- A cylinder primitive centered on the origin +---@field radius ? number +---@field half_height ? number + + +---@class InfinitePlane3d +--- An unbounded plane in 3D space. It forms a separating surface through the origin,--- stretching infinitely far +---@field normal ? Dir3 + + +---@class Line3d +--- An infinite line going through the origin along a direction in 3D space.--- --- For a finite line: [`Segment3d`] +---@field direction ? Dir3 + + +---@class Plane3d +--- A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width. +---@field normal ? Dir3 +---@field half_size ? Vec2 + + +---@class Segment3d +--- A line segment defined by two endpoints in 3D space. +---@field vertices ? [glam::Vec3; 2] + + +---@class Sphere +--- A sphere primitive, representing the set of all points some distance from the origin +---@field radius ? number + + +---@class Tetrahedron +--- A tetrahedron primitive. +---@field vertices ? [glam::Vec3; 4] + + +---@class Torus +--- A torus primitive, often representing a ring or donut shape--- The set of points some distance from a circle centered at the origin +---@field minor_radius ? number +---@field major_radius ? number + + +---@class Triangle3d +--- A 3D triangle primitive. +---@field vertices ? [glam::Vec3; 3] + + +---@class Ray2d +--- An infinite half-line starting at `origin` and going in `direction` in 2D space. +---@field origin ? Vec2 +---@field direction ? Dir2 + + +---@class Ray3d +--- An infinite half-line starting at `origin` and going in `direction` in 3D space. +---@field origin ? Vec3 +---@field direction ? Dir3 + + +---@class IRect +--- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `IRect::min` and `IRect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@field min ? IVec2 +---@field max ? IVec2 + + +---@class Rect +--- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `Rect::min` and `Rect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@field min ? Vec2 +---@field max ? Vec2 + + +---@class URect +--- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `URect::min` and `URect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@field min ? UVec2 +---@field max ? UVec2 + + +---@class Rot2 +--- A counterclockwise 2D rotation.--- --- # Example--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Rot2, Vec2};--- use std::f32::consts::PI;--- --- // Create rotations from radians or degrees--- let rotation1 = Rot2::radians(PI / 2.0);--- let rotation2 = Rot2::degrees(45.0);--- --- // Get the angle back as radians or degrees--- assert_eq!(rotation1.as_degrees(), 90.0);--- assert_eq!(rotation2.as_radians(), PI / 4.0);--- --- // "Add" rotations together using `*`--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * rotation2, Rot2::degrees(135.0));--- --- // Rotate vectors--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * Vec2::X, Vec2::Y);--- ``` +---@field cos ? number +---@field sin ? number + + +---@class Instant + + + +---@class Fixed +--- The fixed timestep game clock following virtual time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Virtual). The fixed clock is automatically set as the--- generic [`Time`] resource during [`FixedUpdate`](bevy_app::FixedUpdate)--- schedule processing.--- --- The fixed timestep clock advances in fixed-size increments, which is--- extremely useful for writing logic (like physics) that should have--- consistent behavior, regardless of framerate.--- --- The default [`timestep()`](Time::timestep) is 64 hertz, or 15625--- microseconds. This value was chosen because using 60 hertz has the potential--- for a pathological interaction with the monitor refresh rate where the game--- alternates between running two fixed timesteps and zero fixed timesteps per--- frame (for example when running two fixed timesteps takes longer than a--- frame). Additionally, the value is a power of two which losslessly converts--- into [`f32`] and [`f64`].--- --- To run a system on a fixed timestep, add it to one of the [`FixedMain`]--- schedules, most commonly [`FixedUpdate`](bevy_app::FixedUpdate).--- --- This schedule is run a number of times between--- [`PreUpdate`](bevy_app::PreUpdate) and [`Update`](bevy_app::Update)--- according to the accumulated [`overstep()`](Time::overstep) time divided by--- the [`timestep()`](Time::timestep). This means the schedule may run 0, 1 or--- more times during a single update (which typically corresponds to a rendered--- frame).--- --- `Time` and the generic [`Time`] resource will report a--- [`delta()`](Time::delta) equal to [`timestep()`](Time::timestep) and always--- grow [`elapsed()`](Time::elapsed) by one [`timestep()`](Time::timestep) per--- iteration.--- --- The fixed timestep clock follows the [`Time`](Virtual) clock, which--- means it is affected by [`pause()`](Time::pause),--- [`set_relative_speed()`](Time::set_relative_speed) and--- [`set_max_delta()`](Time::set_max_delta) from virtual time. If the virtual--- clock is paused, the [`FixedUpdate`](bevy_app::FixedUpdate) schedule will--- not run. It is guaranteed that the [`elapsed()`](Time::elapsed) time in--- `Time` is always between the previous `elapsed()` and the current--- `elapsed()` value in `Time`, so the values are compatible.--- --- Changing the timestep size while the game is running should not normally be--- done, as having a regular interval is the point of this schedule, but it may--- be necessary for effects like "bullet-time" if the normal granularity of the--- fixed timestep is too big for the slowed down time. In this case,--- [`set_timestep()`](Time::set_timestep) and be called to set a new value. The--- new value will be used immediately for the next run of the--- [`FixedUpdate`](bevy_app::FixedUpdate) schedule, meaning that it will affect--- the [`delta()`](Time::delta) value for the very next--- [`FixedUpdate`](bevy_app::FixedUpdate), even if it is still during the same--- frame. Any [`overstep()`](Time::overstep) present in the accumulator will be--- processed according to the new [`timestep()`](Time::timestep) value. +---@field timestep ? Duration +---@field overstep ? Duration + + +---@class Real +--- Real time clock representing elapsed wall clock time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated with time instants according--- to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).[^disclaimer]--- --- Note:--- Using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration)--- allows for mocking the wall clock for testing purposes.--- Besides this use case, it is not recommended to do this, as it will no longer--- represent "wall clock" time as intended.--- --- The [`delta()`](Time::delta) and [`elapsed()`](Time::elapsed) values of this--- clock should be used for anything which deals specifically with real time--- (wall clock time). It will not be affected by relative game speed--- adjustments, pausing or other adjustments.[^disclaimer]--- --- The clock does not count time from [`startup()`](Time::startup) to--- [`first_update()`](Time::first_update()) into elapsed, but instead will--- start counting time from the first update call. [`delta()`](Time::delta) and--- [`elapsed()`](Time::elapsed) will report zero on the first update as there--- is no previous update instant. This means that a [`delta()`](Time::delta) of--- zero must be handled without errors in application logic, as it may--- theoretically also happen at other times.--- --- [`Instant`]s for [`startup()`](Time::startup),--- [`first_update()`](Time::first_update) and--- [`last_update()`](Time::last_update) are recorded and accessible.--- --- [^disclaimer]: When using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration),--- [`Time#impl-Time`] is only a *mock* of wall clock time.--- +---@field startup ? Instant +---@field first_update ? Option +---@field last_update ? Option + + +---@class Stopwatch +--- A Stopwatch is a struct that tracks elapsed time when started.--- --- Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called.--- # Examples--- --- ```--- # use bevy_time::*;--- use std::time::Duration;--- let mut stopwatch = Stopwatch::new();--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- --- stopwatch.tick(Duration::from_secs_f32(1.0)); // tick one second--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.pause();--- stopwatch.tick(Duration::from_secs_f32(1.0)); // paused stopwatches don't tick--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.reset(); // reset the stopwatch--- assert!(stopwatch.is_paused());--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- ``` +---@field elapsed ? Duration +---@field is_paused ? boolean + + +---@class Timer +--- Tracks elapsed time. Enters the finished state once `duration` is reached.--- --- Non repeating timers will stop tracking and stay in the finished state until reset.--- Repeating timers will only be in the finished state on each tick `duration` is reached or--- exceeded, and can still be reset at any given point.--- --- Paused timers will not have elapsed time increased.--- --- Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called. +---@field stopwatch ? Stopwatch +---@field duration ? Duration +---@field mode ? TimerMode +---@field finished ? boolean +---@field times_finished_this_tick ? integer + + +---@class TimerMode +--- Specifies [`Timer`] behavior. + + +---@class Virtual +--- The virtual game clock representing game time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- Normally used as `Time`. It is automatically inserted as a resource--- by [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Real). The virtual clock is automatically set as the default--- generic [`Time`] resource for the update.--- --- The virtual clock differs from real time clock in that it can be paused, sped up--- and slowed down. It also limits how much it can advance in a single update--- in order to prevent unexpected behavior in cases where updates do not happen--- at regular intervals (e.g. coming back after the program was suspended a long time).--- --- The virtual clock can be paused by calling [`pause()`](Time::pause) and--- unpaused by calling [`unpause()`](Time::unpause). When the game clock is--- paused [`delta()`](Time::delta) will be zero on each update, and--- [`elapsed()`](Time::elapsed) will not grow.--- [`effective_speed()`](Time::effective_speed) will return `0.0`. Calling--- [`pause()`](Time::pause) will not affect value the [`delta()`](Time::delta)--- value for the update currently being processed.--- --- The speed of the virtual clock can be changed by calling--- [`set_relative_speed()`](Time::set_relative_speed). A value of `2.0` means--- that virtual clock should advance twice as fast as real time, meaning that--- [`delta()`](Time::delta) values will be double of what--- [`Time::delta()`](Time::delta) reports and--- [`elapsed()`](Time::elapsed) will go twice as fast as--- [`Time::elapsed()`](Time::elapsed). Calling--- [`set_relative_speed()`](Time::set_relative_speed) will not affect the--- [`delta()`](Time::delta) value for the update currently being processed.--- --- The maximum amount of delta time that can be added by a single update can be--- set by [`set_max_delta()`](Time::set_max_delta). This value serves a dual--- purpose in the virtual clock.--- --- If the game temporarily freezes due to any reason, such as disk access, a--- blocking system call, or operating system level suspend, reporting the full--- elapsed delta time is likely to cause bugs in game logic. Usually if a--- laptop is suspended for an hour, it doesn't make sense to try to simulate--- the game logic for the elapsed hour when resuming. Instead it is better to--- lose the extra time and pretend a shorter duration of time passed. Setting--- [`max_delta()`](Time::max_delta) to a relatively short time means that the--- impact on game logic will be minimal.--- --- If the game lags for some reason, meaning that it will take a longer time to--- compute a frame than the real time that passes during the computation, then--- we would fall behind in processing virtual time. If this situation persists,--- and computing a frame takes longer depending on how much virtual time has--- passed, the game would enter a "death spiral" where computing each frame--- takes longer and longer and the game will appear to freeze. By limiting the--- maximum time that can be added at once, we also limit the amount of virtual--- time the game needs to compute for each frame. This means that the game will--- run slow, and it will run slower than real time, but it will not freeze and--- it will recover as soon as computation becomes fast again.--- --- You should set [`max_delta()`](Time::max_delta) to a value that is--- approximately the minimum FPS your game should have even if heavily lagged--- for a moment. The actual FPS when lagged will be somewhat lower than this,--- depending on how much more time it takes to compute a frame compared to real--- time. You should also consider how stable your FPS is, as the limit will--- also dictate how big of an FPS drop you can accept without losing time and--- falling behind real time. +---@field max_delta ? Duration +---@field paused ? boolean +---@field relative_speed ? number +---@field effective_speed ? number + + +---@class GlobalTransform +--- [`GlobalTransform`] is an affine transformation from entity-local coordinates to worldspace coordinates.--- --- You cannot directly mutate [`GlobalTransform`]; instead, you change an entity's transform by manipulating--- its [`Transform`], which indirectly causes Bevy to update its [`GlobalTransform`].--- --- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * For transform hierarchies to work correctly, you must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] transforms an entity relative to its parent's reference frame, or relative to world space coordinates,--- if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is managed by Bevy; it is computed by successively applying the [`Transform`] of each ancestor--- entity which has a Transform. This is done automatically by Bevy-internal systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity in this schedule or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs +---@field [1] ? Affine3A + + +---@class Transform +--- Describe the position of an entity. If the entity has a parent, the position is relative--- to its parent position.--- --- * To place or move an entity, you should set its [`Transform`].--- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * To be displayed, an entity must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] is the position of an entity relative to its parent position, or the reference--- frame if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is the position of an entity relative to the reference frame.--- --- [`GlobalTransform`] is updated from [`Transform`] by systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity during this set or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs +---@field translation ? Vec3 +---@field rotation ? Quat +---@field scale ? Vec3 + + +---@class TransformTreeChanged +--- An optimization for transform propagation. This ZST marker component uses change detection to--- mark all entities of the hierarchy as "dirty" if any of their descendants have a changed--- `Transform`. If this component is *not* marked `is_changed()`, propagation will halt. + + +---@class TypeId + + + +---@class SocketAddr + + + +---@class RangeFull + + + +---@class AtomicBool + + + +---@class AtomicI16 + + + +---@class AtomicI32 + + + +---@class AtomicI64 + + + +---@class AtomicI8 + + + +---@class AtomicIsize + + + +---@class AtomicU16 + + + +---@class AtomicU32 + + + +---@class AtomicU64 + + + +---@class AtomicU8 + + + +---@class AtomicUsize + + + +---@class Duration + + + +---@class Affine2 + +---@field matrix2 ? Mat2 +---@field translation ? Vec2 + + +---@class Affine3A + +---@field matrix3 ? Mat3A +---@field translation ? Vec3A + + +---@class BVec2 + +---@field x ? boolean +---@field y ? boolean + + +---@class BVec3 + +---@field x ? boolean +---@field y ? boolean +---@field z ? boolean + + +---@class BVec3A + + + +---@class BVec4 + +---@field x ? boolean +---@field y ? boolean +---@field z ? boolean +---@field w ? boolean + + +---@class BVec4A + + + +---@class DAffine2 + +---@field matrix2 ? DMat2 +---@field translation ? DVec2 + + +---@class DAffine3 + +---@field matrix3 ? DMat3 +---@field translation ? DVec3 + + +---@class DMat2 + +---@field x_axis ? DVec2 +---@field y_axis ? DVec2 + + +---@class DMat3 + +---@field x_axis ? DVec3 +---@field y_axis ? DVec3 +---@field z_axis ? DVec3 + + +---@class DMat4 + +---@field x_axis ? DVec4 +---@field y_axis ? DVec4 +---@field z_axis ? DVec4 +---@field w_axis ? DVec4 + + +---@class DQuat + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number + + +---@class DVec2 + +---@field x ? number +---@field y ? number + + +---@class DVec3 + +---@field x ? number +---@field y ? number +---@field z ? number + + +---@class DVec4 + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number + + +---@class EulerRot + + + +---@class I16Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class I16Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class I16Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class I64Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class I64Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class I64Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class I8Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class I8Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class I8Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class IVec2 + +---@field x ? integer +---@field y ? integer + + +---@class IVec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class IVec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class Mat2 + +---@field x_axis ? Vec2 +---@field y_axis ? Vec2 + + +---@class Mat3 + +---@field x_axis ? Vec3 +---@field y_axis ? Vec3 +---@field z_axis ? Vec3 + + +---@class Mat3A + +---@field x_axis ? Vec3A +---@field y_axis ? Vec3A +---@field z_axis ? Vec3A + + +---@class Mat4 + +---@field x_axis ? Vec4 +---@field y_axis ? Vec4 +---@field z_axis ? Vec4 +---@field w_axis ? Vec4 + + +---@class Quat + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number + + +---@class U16Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class U16Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class U16Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class U64Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class U64Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class U64Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class U8Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class U8Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class U8Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class UVec2 + +---@field x ? integer +---@field y ? integer + + +---@class UVec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class UVec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class Vec2 + +---@field x ? number +---@field y ? number + + +---@class Vec3 + +---@field x ? number +---@field y ? number +---@field z ? number + + +---@class Vec3A + +---@field x ? number +---@field y ? number +---@field z ? number + + +---@class Vec4 + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number + + +---@class SmolStr + + + +---@class Uuid + + + +---@class AssetIndex +--- A generational runtime-only identifier for a specific [`Asset`] stored in [`Assets`]. This is optimized for efficient runtime--- usage and is not suitable for identifying assets across app runs. +---@field generation ? integer +---@field index ? integer + + +---@class AssetPath +--- Represents a path to an asset in a "virtual filesystem".--- --- Asset paths consist of three main parts:--- * [`AssetPath::source`]: The name of the [`AssetSource`](crate::io::AssetSource) to load the asset from.--- This is optional. If one is not set the default source will be used (which is the `assets` folder by default).--- * [`AssetPath::path`]: The "virtual filesystem path" pointing to an asset source file.--- * [`AssetPath::label`]: An optional "named sub asset". When assets are loaded, they are--- allowed to load "sub assets" of any type, which are identified by a named "label".--- --- Asset paths are generally constructed (and visualized) as strings:--- --- ```no_run--- # use bevy_asset::{Asset, AssetServer, Handle};--- # use bevy_reflect::TypePath;--- #--- # #[derive(Asset, TypePath, Default)]--- # struct Mesh;--- #--- # #[derive(Asset, TypePath, Default)]--- # struct Scene;--- #--- # let asset_server: AssetServer = panic!();--- // This loads the `my_scene.scn` base asset from the default asset source.--- let scene: Handle = asset_server.load("my_scene.scn");--- --- // This loads the `PlayerMesh` labeled asset from the `my_scene.scn` base asset in the default asset source.--- let mesh: Handle = asset_server.load("my_scene.scn#PlayerMesh");--- --- // This loads the `my_scene.scn` base asset from a custom 'remote' asset source.--- let scene: Handle = asset_server.load("remote://my_scene.scn");--- ```--- --- [`AssetPath`] implements [`From`] for `&'static str`, `&'static Path`, and `&'a String`,--- which allows us to optimize the static cases.--- This means that the common case of `asset_server.load("my_scene.scn")` when it creates and--- clones internal owned [`AssetPaths`](AssetPath).--- This also means that you should use [`AssetPath::parse`] in cases where `&str` is the explicit type. + + +---@class RenderAssetUsages +--- Defines where the asset will be used.--- --- If an asset is set to the `RENDER_WORLD` but not the `MAIN_WORLD`, the asset will be--- unloaded from the asset server once it's been extracted and prepared in the render world.--- --- Unloading the asset saves on memory, as for most cases it is no longer necessary to keep--- it in RAM once it's been uploaded to the GPU's VRAM. However, this means you can no longer--- access the asset from the CPU (via the `Assets` resource) once unloaded (without re-loading it).--- --- If you never need access to the asset from the CPU past the first frame it's loaded on,--- or only need very infrequent access, then set this to `RENDER_WORLD`. Otherwise, set this to--- `RENDER_WORLD | MAIN_WORLD`.--- --- If you have an asset that doesn't actually need to end up in the render world, like an Image--- that will be decoded into another Image asset, use `MAIN_WORLD` only.--- --- ## Platform-specific--- --- On Wasm, it is not possible for now to free reserved memory. To control memory usage, load assets--- in sequence and unload one before loading the next. See this--- [discussion about memory management](https://github.com/WebAssembly/design/issues/1397) for more--- details. + + +---@class DeferredPrepass +--- If added to a [`crate::prelude::Camera3d`] then deferred materials will be rendered to the deferred gbuffer texture and will be available to subsequent passes.--- Note the default deferred lighting plugin also requires `DepthPrepass` to work correctly. + + +---@class SystemIdMarker +--- Marker [`Component`](bevy_ecs::component::Component) for identifying [`SystemId`] [`Entity`]s. + + +---@class OnAdd +--- Trigger emitted when a component is inserted onto an entity that does not already have that--- component. Runs before `OnInsert`.--- See [`crate::component::ComponentHooks::on_add`] for more information. + + +---@class OnDespawn +--- Trigger emitted for each component on an entity when it is despawned.--- See [`crate::component::ComponentHooks::on_despawn`] for more information. + + +---@class OnInsert +--- Trigger emitted when a component is inserted, regardless of whether or not the entity already--- had that component. Runs after `OnAdd`, if it ran.--- See [`crate::component::ComponentHooks::on_insert`] for more information. + + +---@class OnRemove +--- Trigger emitted when a component is removed from an entity, and runs before the component is--- removed, so you can still access the component data.--- See [`crate::component::ComponentHooks::on_remove`] for more information. + + +---@class OnReplace +--- Trigger emitted when a component is inserted onto an entity that already has that component.--- Runs before the value is replaced, so you can still access the original component data.--- See [`crate::component::ComponentHooks::on_replace`] for more information. + + +---@class Image + + + +---@class TextureAtlas +--- An index into a [`TextureAtlasLayout`], which corresponds to a specific section of a texture.--- --- It stores a handle to [`TextureAtlasLayout`] and the index of the current section of the atlas.--- The texture atlas contains various *sections* of a given texture, allowing users to have a single--- image file for either sprite animation or global mapping.--- You can change the texture [`index`](Self::index) of the atlas to animate the sprite or display only a *section* of the texture--- for efficient rendering of related game objects.--- --- Check the following examples for usage:--- - [`animated sprite sheet example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs)--- - [`sprite animation event example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs)--- - [`texture atlas example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) +---@field layout ? Handle +---@field index ? integer + + +---@class TextureAtlasLayout +--- Stores a map used to lookup the position of a texture in a [`TextureAtlas`].--- This can be used to either use and look up a specific section of a texture, or animate frame-by-frame as a sprite sheet.--- --- Optionally it can store a mapping from sub texture handles to the related area index (see--- [`TextureAtlasBuilder`]).--- --- [Example usage animating sprite.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs)--- [Example usage animating sprite in response to an event.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs)--- [Example usage loading sprite sheet.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs)--- --- [`TextureAtlasBuilder`]: crate::TextureAtlasBuilder +---@field size ? UVec2 +---@field textures ? Vec + + +---@class Affine3 +--- Reduced-size version of `glam::Affine3A` for use when storage has--- significant performance impact. Convert to `glam::Affine3A` to do--- non-trivial calculations. +---@field matrix3 ? Mat3 +---@field translation ? Vec3 + + +---@class Indices +--- An array of indices into the [`VertexAttributeValues`](super::VertexAttributeValues) for a mesh.--- --- It describes the order in which the vertex attributes should be joined into faces. + + +---@class Mesh +--- A 3D object made out of vertices representing triangles, lines, or points,--- with "attribute" values for each vertex.--- --- Meshes can be automatically generated by a bevy `AssetLoader` (generally by loading a `Gltf` file),--- or by converting a [primitive](bevy_math::primitives) using [`into`](Into).--- It is also possible to create one manually. They can be edited after creation.--- --- Meshes can be rendered with a `Mesh2d` and `MeshMaterial2d`--- or `Mesh3d` and `MeshMaterial3d` for 2D and 3D respectively.--- --- A [`Mesh`] in Bevy is equivalent to a "primitive" in the glTF format, for a--- glTF Mesh representation, see `GltfMesh`.--- --- ## Manual creation--- --- The following function will construct a flat mesh, to be rendered with a--- `StandardMaterial` or `ColorMaterial`:--- --- ```--- # use bevy_mesh::{Mesh, Indices, PrimitiveTopology};--- # use bevy_asset::RenderAssetUsages;--- fn create_simple_parallelogram() -> Mesh {--- // Create a new mesh using a triangle list topology, where each set of 3 vertices composes a triangle.--- Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsages::default())--- // Add 4 vertices, each with its own position attribute (coordinate in--- // 3D space), for each of the corners of the parallelogram.--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_POSITION,--- vec![[0.0, 0.0, 0.0], [1.0, 2.0, 0.0], [2.0, 2.0, 0.0], [1.0, 0.0, 0.0]]--- )--- // Assign a UV coordinate to each vertex.--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_UV_0,--- vec![[0.0, 1.0], [0.5, 0.0], [1.0, 0.0], [0.5, 1.0]]--- )--- // Assign normals (everything points outwards)--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_NORMAL,--- vec![[0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0]]--- )--- // After defining all the vertices and their attributes, build each triangle using the--- // indices of the vertices that make it up in a counter-clockwise order.--- .with_inserted_indices(Indices::U32(vec![--- // First triangle--- 0, 3, 1,--- // Second triangle--- 1, 3, 2--- ]))--- }--- ```--- --- You can see how it looks like [here](https://github.com/bevyengine/bevy/blob/main/assets/docs/Mesh.png),--- used in a `Mesh3d` with a square bevy logo texture, with added axis, points,--- lines and text for clarity.--- --- ## Other examples--- --- For further visualization, explanation, and examples, see the built-in Bevy examples,--- and the [implementation of the built-in shapes](https://github.com/bevyengine/bevy/tree/main/crates/bevy_mesh/src/primitives).--- In particular, [generate_custom_mesh](https://github.com/bevyengine/bevy/blob/main/examples/3d/generate_custom_mesh.rs)--- teaches you to access and modify the attributes of a [`Mesh`] after creating it.--- --- ## Common points of confusion--- --- - UV maps in Bevy start at the top-left, see [`ATTRIBUTE_UV_0`](Mesh::ATTRIBUTE_UV_0),--- other APIs can have other conventions, `OpenGL` starts at bottom-left.--- - It is possible and sometimes useful for multiple vertices to have the same--- [position attribute](Mesh::ATTRIBUTE_POSITION) value,--- it's a common technique in 3D modeling for complex UV mapping or other calculations.--- - Bevy performs frustum culling based on the `Aabb` of meshes, which is calculated--- and added automatically for new meshes only. If a mesh is modified, the entity's `Aabb`--- needs to be updated manually or deleted so that it is re-calculated.--- --- ## Use with `StandardMaterial`--- --- To render correctly with `StandardMaterial`, a mesh needs to have properly defined:--- - [`UVs`](Mesh::ATTRIBUTE_UV_0): Bevy needs to know how to map a texture onto the mesh--- (also true for `ColorMaterial`).--- - [`Normals`](Mesh::ATTRIBUTE_NORMAL): Bevy needs to know how light interacts with your mesh.--- [0.0, 0.0, 1.0] is very common for simple flat meshes on the XY plane,--- because simple meshes are smooth and they don't require complex light calculations.--- - Vertex winding order: by default, `StandardMaterial.cull_mode` is `Some(Face::Back)`,--- which means that Bevy would *only* render the "front" of each triangle, which--- is the side of the triangle from where the vertices appear in a *counter-clockwise* order. +---@field indices ? Option +---@field morph_targets ? Option +---@field morph_target_names ? Option +---@field asset_usage ? RenderAssetUsages + + +---@class MeshMorphWeights +--- Control a specific [`Mesh`] instance's [morph targets]. These control the weights of--- specific "mesh primitives" in scene formats like GLTF. They can be set manually, but--- in most cases they should "automatically" synced by setting the [`MorphWeights`] component--- on a parent entity.--- --- See [`MorphWeights`] for more details on Bevy's morph target implementation.--- --- Add this to an [`Entity`] with a `Mesh3d` with a [`MorphAttributes`] set--- to control individual weights of each morph target.--- --- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation +---@field weights ? Vec + + +---@class MorphWeights +--- Controls the [morph targets] for all child `Mesh3d` entities. In most cases, [`MorphWeights`] should be considered--- the "source of truth" when writing morph targets for meshes. However you can choose to write child [`MeshMorphWeights`]--- if your situation requires more granularity. Just note that if you set [`MorphWeights`], it will overwrite child--- [`MeshMorphWeights`] values.--- --- This exists because Bevy's [`Mesh`] corresponds to a _single_ surface / material, whereas morph targets--- as defined in the GLTF spec exist on "multi-primitive meshes" (where each primitive is its own surface with its own material).--- Therefore in Bevy [`MorphWeights`] an a parent entity are the "canonical weights" from a GLTF perspective, which then--- synchronized to child `Mesh3d` / [`MeshMorphWeights`] (which correspond to "primitives" / "surfaces" from a GLTF perspective).--- --- Add this to the parent of one or more [`Entities`](`Entity`) with a `Mesh3d` with a [`MeshMorphWeights`].--- --- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation +---@field weights ? Vec +---@field first_mesh ? Option + + +---@class AnnulusMeshBuilder +--- A builder for creating a [`Mesh`] with an [`Annulus`] shape. +---@field annulus ? Annulus +---@field resolution ? integer + + +---@class Capsule2dMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Capsule2d`] shape. +---@field capsule ? Capsule2d +---@field resolution ? integer + + +---@class CircleMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Circle`] shape. +---@field circle ? Circle +---@field resolution ? integer + + +---@class CircularMeshUvMode +--- Specifies how to generate UV-mappings for the [`CircularSector`] and [`CircularSegment`] shapes.--- --- Currently the only variant is `Mask`, which is good for showing a portion of a texture that includes--- the entire circle, particularly the same texture will be displayed with different fractions of a--- complete circle.--- --- It's expected that more will be added in the future, such as a variant that causes the texture to be--- scaled to fit the bounding box of the shape, which would be good for packed textures only including the--- portion of the circle that is needed to display. + + +---@class CircularSectorMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`CircularSector`] shape.--- --- The resulting mesh will have a UV-map such that the center of the circle is--- at the center of the texture. +---@field sector ? CircularSector +---@field resolution ? integer +---@field uv_mode ? CircularMeshUvMode + + +---@class CircularSegmentMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`CircularSegment`] shape.--- --- The resulting mesh will have a UV-map such that the center of the circle is--- at the center of the texture. +---@field segment ? CircularSegment +---@field resolution ? integer +---@field uv_mode ? CircularMeshUvMode + + +---@class EllipseMeshBuilder +--- A builder used for creating a [`Mesh`] with an [`Ellipse`] shape. +---@field ellipse ? Ellipse +---@field resolution ? integer + + +---@class RectangleMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Rectangle`] shape. +---@field half_size ? Vec2 + + +---@class RegularPolygonMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`RegularPolygon`] shape. +---@field circumradius ? number +---@field sides ? integer + + +---@class RhombusMeshBuilder +--- A builder for creating a [`Mesh`] with an [`Rhombus`] shape. +---@field half_diagonals ? Vec2 + + +---@class Triangle2dMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Triangle2d`] shape. +---@field triangle ? Triangle2d + + +---@class Capsule3dMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Capsule3d`] shape. +---@field capsule ? Capsule3d +---@field rings ? integer +---@field longitudes ? integer +---@field latitudes ? integer +---@field uv_profile ? CapsuleUvProfile + + +---@class CapsuleUvProfile +--- Manner in which UV coordinates are distributed vertically. + + +---@class ConeAnchor +--- Anchoring options for [`ConeMeshBuilder`] + + +---@class ConeMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Cone`] shape. +---@field cone ? Cone +---@field resolution ? integer +---@field anchor ? ConeAnchor + + +---@class ConicalFrustumMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`ConicalFrustum`] shape. +---@field frustum ? ConicalFrustum +---@field resolution ? integer +---@field segments ? integer + + +---@class CuboidMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Cuboid`] shape. +---@field half_size ? Vec3 + + +---@class CylinderAnchor +--- Anchoring options for [`CylinderMeshBuilder`] + + +---@class CylinderMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Cylinder`] shape. +---@field cylinder ? Cylinder +---@field resolution ? integer +---@field segments ? integer +---@field caps ? boolean +---@field anchor ? CylinderAnchor + + +---@class PlaneMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Plane3d`] shape. +---@field plane ? Plane3d +---@field subdivisions ? integer + + +---@class SphereKind +--- A type of sphere mesh. + + +---@class SphereMeshBuilder +--- A builder used for creating a [`Mesh`] with an [`Sphere`] shape. +---@field sphere ? Sphere +---@field kind ? SphereKind + + +---@class TetrahedronMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Tetrahedron`] shape. +---@field tetrahedron ? Tetrahedron + + +---@class TorusMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Torus`] shape. +---@field torus ? Torus +---@field minor_resolution ? integer +---@field major_resolution ? integer +---@field angle_range ? RangeInclusive + + +---@class Triangle3dMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Triangle3d`] shape. +---@field triangle ? Triangle3d + + +---@class SkinnedMesh + +---@field inverse_bindposes ? bevy_asset::handle::Handle +---@field joints ? Vec + + +---@class ScriptAsset +--- Represents a script loaded into memory as an asset + + +---@class FunctionArgInfo +--- Information about a function argument. +---@field name ? Option +---@field arg_index ? integer +---@field type_id ? TypeId + + +---@class FunctionInfo +--- Information about a function. +---@field name ? Cow +---@field namespace ? Namespace +---@field arg_info ? Vec +---@field return_info ? FunctionReturnInfo +---@field docs ? Option + + +---@class FunctionReturnInfo +--- Information about a function return value. +---@field type_id ? TypeId + + +---@class InteropError +--- An error occurring when converting between rust and a script context. + + +---@class Namespace +--- A namespace for functions + + +---@class DynamicComponent +--- A dynamic script component +---@field data ? ScriptValue + + +---@class ScriptValue +--- An abstraction of values that can be passed to and from scripts.--- This allows us to re-use logic between scripting languages. + + +---@class AlphaMode +--- Sets how a material's base color alpha channel is used for transparency. + + +---@class Camera +--- The defining [`Component`] for camera entities,--- storing information about how and what to render through this camera.--- --- The [`Camera`] component is added to an entity to define the properties of the viewpoint from--- which rendering occurs. It defines the position of the view to render, the projection method--- to transform the 3D objects into a 2D image, as well as the render target into which that image--- is produced.--- --- Note that a [`Camera`] needs a [`CameraRenderGraph`] to render anything.--- This is typically provided by adding a [`Camera2d`] or [`Camera3d`] component,--- but custom render graphs can also be defined. Inserting a [`Camera`] with no render--- graph will emit an error at runtime.--- --- [`Camera2d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_2d/struct.Camera2d.html--- [`Camera3d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_3d/struct.Camera3d.html +---@field viewport ? Option +---@field order ? integer +---@field is_active ? boolean +---@field target ? RenderTarget +---@field hdr ? boolean +---@field msaa_writeback ? boolean +---@field clear_color ? ClearColorConfig +---@field sub_camera_view ? Option + + +---@class CameraMainTextureUsages +--- This component lets you control the [`TextureUsages`] field of the main texture generated for the camera + + +---@class CameraRenderGraph +--- Configures the [`RenderGraph`](crate::render_graph::RenderGraph) name assigned to be run for a given [`Camera`] entity. + + +---@class Exposure +--- How much energy a `Camera3d` absorbs from incoming light.--- --- + + +---@class ImageRenderTarget +--- A render target that renders to an [`Image`]. +---@field handle ? Handle +---@field scale_factor ? FloatOrd + + +---@class MipBias +--- Camera component specifying a mip bias to apply when sampling from material textures.--- --- Often used in conjunction with antialiasing post-process effects to reduce textures blurriness. +---@field [1] ? number + + +---@class RenderTarget +--- The "target" that a [`Camera`] will render to. For example, this could be a [`Window`]--- swapchain or an [`Image`]. + + +---@class SubCameraView +--- Settings to define a camera sub view.--- --- When [`Camera::sub_camera_view`] is `Some`, only the sub-section of the--- image defined by `size` and `offset` (relative to the `full_size` of the--- whole image) is projected to the cameras viewport.--- --- Take the example of the following multi-monitor setup:--- ```css--- ┌───┬───┐--- │ A │ B │--- ├───┼───┤--- │ C │ D │--- └───┴───┘--- ```--- If each monitor is 1920x1080, the whole image will have a resolution of--- 3840x2160. For each monitor we can use a single camera with a viewport of--- the same size as the monitor it corresponds to. To ensure that the image is--- cohesive, we can use a different sub view on each camera:--- - Camera A: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,0--- - Camera B: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 1920,0--- - Camera C: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,1080--- - Camera D: `full_size` = 3840x2160, `size` = 1920x1080, `offset` =--- 1920,1080--- --- However since only the ratio between the values is important, they could all--- be divided by 120 and still produce the same image. Camera D would for--- example have the following values:--- `full_size` = 32x18, `size` = 16x9, `offset` = 16,9 +---@field full_size ? UVec2 +---@field offset ? Vec2 +---@field size ? UVec2 + + +---@class TemporalJitter +--- A subpixel offset to jitter a perspective camera's frustum by.--- --- Useful for temporal rendering techniques.--- --- Do not use with [`OrthographicProjection`].--- --- [`OrthographicProjection`]: crate::camera::OrthographicProjection +---@field offset ? Vec2 + + +---@class Viewport +--- Render viewport configuration for the [`Camera`] component.--- --- The viewport defines the area on the render target to which the camera renders its image.--- You can overlay multiple cameras in a single window using viewports to create effects like--- split screen, minimaps, and character viewers. +---@field physical_position ? UVec2 +---@field physical_size ? UVec2 +---@field depth ? Range + + +---@class ClearColor +--- A [`Resource`] that stores the color that is used to clear the screen between frames.--- --- This color appears as the "background" color for simple apps,--- when there are portions of the screen with nothing rendered. +---@field [1] ? Color + + +---@class ClearColorConfig +--- For a camera, specifies the color used to clear the viewport before rendering. + + +---@class ManualTextureViewHandle +--- A unique id that corresponds to a specific [`ManualTextureView`] in the [`ManualTextureViews`] collection. +---@field [1] ? integer + + +---@class CustomProjection +--- Holds a dynamic [`CameraProjection`] trait object. Use [`Projection::custom()`] to construct a--- custom projection.--- --- The contained dynamic object can be downcast into a static type using [`CustomProjection::get`]. + + +---@class OrthographicProjection +--- Project a 3D space onto a 2D surface using parallel lines, i.e., unlike [`PerspectiveProjection`],--- the size of objects remains the same regardless of their distance to the camera.--- --- The volume contained in the projection is called the *view frustum*. Since the viewport is rectangular--- and projection lines are parallel, the view frustum takes the shape of a cuboid.--- --- Note that the scale of the projection and the apparent size of objects are inversely proportional.--- As the size of the projection increases, the size of objects decreases.--- --- # Examples--- --- Configure the orthographic projection to one world unit per 100 window pixels:--- --- ```--- # use bevy_render::camera::{OrthographicProjection, Projection, ScalingMode};--- let projection = Projection::Orthographic(OrthographicProjection {--- scaling_mode: ScalingMode::WindowSize,--- scale: 0.01,--- ..OrthographicProjection::default_2d()--- });--- ``` +---@field near ? number +---@field far ? number +---@field viewport_origin ? Vec2 +---@field scaling_mode ? ScalingMode +---@field scale ? number +---@field area ? Rect + + +---@class PerspectiveProjection +--- A 3D camera projection in which distant objects appear smaller than close objects. +---@field fov ? number +---@field aspect_ratio ? number +---@field near ? number +---@field far ? number + + +---@class Projection +--- Component that defines how to compute a [`Camera`]'s projection matrix.--- --- Common projections, like perspective and orthographic, are provided out of the box to handle the--- majority of use cases. Custom projections can be added using the [`CameraProjection`] trait and--- the [`Projection::custom`] constructor.--- --- ## What's a projection?--- --- A camera projection essentially describes how 3d points from the point of view of a camera are--- projected onto a 2d screen. This is where properties like a camera's field of view are defined.--- More specifically, a projection is a 4x4 matrix that transforms points from view space (the--- point of view of the camera) into clip space. Clip space is almost, but not quite, equivalent to--- the rectangle that is rendered to your screen, with a depth axis. Any points that land outside--- the bounds of this cuboid are "clipped" and not rendered.--- --- You can also think of the projection as the thing that describes the shape of a camera's--- frustum: the volume in 3d space that is visible to a camera.--- --- [`Camera`]: crate::camera::Camera + + +---@class OcclusionCulling +--- Add this component to a view in order to enable experimental GPU occlusion--- culling.--- --- *Bevy's occlusion culling is currently marked as experimental.* There are--- known issues whereby, in rare circumstances, occlusion culling can result in--- meshes being culled that shouldn't be (i.e. meshes that turn invisible).--- Please try it out and report issues.--- --- *Occlusion culling* allows Bevy to avoid rendering objects that are fully--- behind other opaque or alpha tested objects. This is different from, and--- complements, depth fragment rejection as the `DepthPrepass` enables. While--- depth rejection allows Bevy to avoid rendering *pixels* that are behind--- other objects, the GPU still has to examine those pixels to reject them,--- which requires transforming the vertices of the objects and performing--- skinning if the objects were skinned. Occlusion culling allows the GPU to go--- a step further, avoiding even transforming the vertices of objects that it--- can quickly prove to be behind other objects.--- --- Occlusion culling inherently has some overhead, because Bevy must examine--- the objects' bounding boxes, and create an acceleration structure--- (hierarchical Z-buffer) to perform the occlusion tests. Therefore, occlusion--- culling is disabled by default. Only enable it if you measure it to be a--- speedup on your scene. Note that, because Bevy's occlusion culling runs on--- the GPU and is quite efficient, it's rare for occlusion culling to result in--- a significant slowdown.--- --- Occlusion culling currently requires a `DepthPrepass`. If no depth prepass--- is present on the view, the [`OcclusionCulling`] component will be ignored.--- Additionally, occlusion culling is currently incompatible with deferred--- shading; including both `DeferredPrepass` and [`OcclusionCulling`] results--- in unspecified behavior.--- --- The algorithm that Bevy uses is known as [*two-phase occlusion culling*].--- When you enable occlusion culling, Bevy splits the depth prepass into two:--- an *early* depth prepass and a *late* depth prepass. The early depth prepass--- renders all the meshes that were visible last frame to produce a--- conservative approximation of the depth buffer. Then, after producing an--- acceleration structure known as a hierarchical Z-buffer or depth pyramid,--- Bevy tests the bounding boxes of all meshes against that depth buffer. Those--- that can be quickly proven to be behind the geometry rendered during the--- early depth prepass are skipped entirely. The other potentially-visible--- meshes are rendered during the late prepass, and finally all the visible--- meshes are rendered as usual during the opaque, transparent, etc. passes.--- --- Unlike other occlusion culling systems you may be familiar with, Bevy's--- occlusion culling is fully dynamic and requires no baking step. The CPU--- overhead is minimal. Large skinned meshes and other dynamic objects can--- occlude other objects.--- --- [*two-phase occlusion culling*]:--- https://medium.com/@mil_kru/two-pass-occlusion-culling-4100edcad501 + + +---@class GlobalsUniform +--- Contains global values useful when writing shaders.--- Currently only contains values related to time. +---@field time ? number +---@field delta_time ? number +---@field frame_count ? integer + + +---@class Mesh2d +--- A component for 2D meshes. Requires a [`MeshMaterial2d`] to be rendered, commonly using a [`ColorMaterial`].--- --- [`MeshMaterial2d`]: --- [`ColorMaterial`]: --- --- # Example--- --- ```ignore--- # use bevy_sprite::{ColorMaterial, Mesh2d, MeshMaterial2d};--- # use bevy_ecs::prelude::*;--- # use bevy_render::mesh::Mesh;--- # use bevy_color::palettes::basic::RED;--- # use bevy_asset::Assets;--- # use bevy_math::primitives::Circle;--- #--- // Spawn an entity with a mesh using `ColorMaterial`.--- fn setup(--- mut commands: Commands,--- mut meshes: ResMut>,--- mut materials: ResMut>,--- ) {--- commands.spawn((--- Mesh2d(meshes.add(Circle::new(50.0))),--- MeshMaterial2d(materials.add(ColorMaterial::from_color(RED))),--- ));--- }--- ``` +---@field [1] ? Handle + + +---@class Mesh3d +--- A component for 3D meshes. Requires a [`MeshMaterial3d`] to be rendered, commonly using a [`StandardMaterial`].--- --- [`MeshMaterial3d`]: --- [`StandardMaterial`]: --- --- # Example--- --- ```ignore--- # use bevy_pbr::{Material, MeshMaterial3d, StandardMaterial};--- # use bevy_ecs::prelude::*;--- # use bevy_render::mesh::{Mesh, Mesh3d};--- # use bevy_color::palettes::basic::RED;--- # use bevy_asset::Assets;--- # use bevy_math::primitives::Capsule3d;--- #--- // Spawn an entity with a mesh using `StandardMaterial`.--- fn setup(--- mut commands: Commands,--- mut meshes: ResMut>,--- mut materials: ResMut>,--- ) {--- commands.spawn((--- Mesh3d(meshes.add(Capsule3d::default())),--- MeshMaterial3d(materials.add(StandardMaterial {--- base_color: RED.into(),--- ..Default::default()--- })),--- ));--- }--- ``` +---@field [1] ? Handle + + +---@class Aabb +--- An axis-aligned bounding box, defined by:--- - a center,--- - the distances from the center to each faces along the axis,--- the faces are orthogonal to the axis.--- --- It is typically used as a component on an entity to represent the local space--- occupied by this entity, with faces orthogonal to its local axis.--- --- This component is notably used during "frustum culling", a process to determine--- if an entity should be rendered by a [`Camera`] if its bounding box intersects--- with the camera's [`Frustum`].--- --- It will be added automatically by the systems in [`CalculateBounds`] to entities that:--- - could be subject to frustum culling, for example with a [`Mesh3d`]--- or `Sprite` component,--- - don't have the [`NoFrustumCulling`] component.--- --- It won't be updated automatically if the space occupied by the entity changes,--- for example if the vertex positions of a [`Mesh3d`] are updated.--- --- [`Camera`]: crate::camera::Camera--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling--- [`CalculateBounds`]: crate::view::visibility::VisibilitySystems::CalculateBounds--- [`Mesh3d`]: crate::mesh::Mesh +---@field center ? Vec3A +---@field half_extents ? Vec3A + + +---@class CascadesFrusta + + + +---@class CubemapFrusta + + + +---@class Frustum +--- A region of 3D space defined by the intersection of 6 [`HalfSpace`]s.--- --- Frustums are typically an apex-truncated square pyramid (a pyramid without the top) or a cuboid.--- --- Half spaces are ordered left, right, top, bottom, near, far. The normal vectors--- of the half-spaces point towards the interior of the frustum.--- --- A frustum component is used on an entity with a [`Camera`] component to--- determine which entities will be considered for rendering by this camera.--- All entities with an [`Aabb`] component that are not contained by (or crossing--- the boundary of) the frustum will not be rendered, and not be used in rendering computations.--- --- This process is called frustum culling, and entities can opt out of it using--- the [`NoFrustumCulling`] component.--- --- The frustum component is typically added automatically for cameras, either `Camera2d` or `Camera3d`.--- It is usually updated automatically by [`update_frusta`] from the--- [`CameraProjection`] component and [`GlobalTransform`] of the camera entity.--- --- [`Camera`]: crate::camera::Camera--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling--- [`update_frusta`]: crate::view::visibility::update_frusta--- [`CameraProjection`]: crate::camera::CameraProjection--- [`GlobalTransform`]: bevy_transform::components::GlobalTransform + + +---@class ShaderStorageBuffer +--- A storage buffer that is prepared as a [`RenderAsset`] and uploaded to the GPU. + + +---@class SyncToRenderWorld +--- Marker component that indicates that its entity needs to be synchronized to the render world.--- --- This component is automatically added as a required component by [`ExtractComponentPlugin`] and [`SyncComponentPlugin`].--- For more information see [`SyncWorldPlugin`].--- --- NOTE: This component should persist throughout the entity's entire lifecycle.--- If this component is removed from its entity, the entity will be despawned.--- --- [`ExtractComponentPlugin`]: crate::extract_component::ExtractComponentPlugin--- [`SyncComponentPlugin`]: crate::sync_component::SyncComponentPlugin + + +---@class ColorGrading +--- Configures filmic color grading parameters to adjust the image appearance.--- --- Color grading is applied just before tonemapping for a given--- [`Camera`](crate::camera::Camera) entity, with the sole exception of the--- `post_saturation` value in [`ColorGradingGlobal`], which is applied after--- tonemapping. +---@field global ? ColorGradingGlobal +---@field shadows ? ColorGradingSection +---@field midtones ? ColorGradingSection +---@field highlights ? ColorGradingSection + + +---@class ColorGradingGlobal +--- Filmic color grading values applied to the image as a whole (as opposed to--- individual sections, like shadows and highlights). +---@field exposure ? number +---@field temperature ? number +---@field tint ? number +---@field hue ? number +---@field post_saturation ? number +---@field midtones_range ? Range + + +---@class ColorGradingSection +--- A section of color grading values that can be selectively applied to--- shadows, midtones, and highlights. +---@field saturation ? number +---@field contrast ? number +---@field gamma ? number +---@field gain ? number +---@field lift ? number + + +---@class Msaa +--- Component for configuring the number of samples for [Multi-Sample Anti-Aliasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing)--- for a [`Camera`](crate::camera::Camera).--- --- Defaults to 4 samples. A higher number of samples results in smoother edges.--- --- Some advanced rendering features may require that MSAA is disabled.--- --- Note that the web currently only supports 1 or 4 samples. + + +---@class InheritedVisibility +--- Whether or not an entity is visible in the hierarchy.--- This will not be accurate until [`VisibilityPropagate`] runs in the [`PostUpdate`] schedule.--- --- If this is false, then [`ViewVisibility`] should also be false.--- --- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate +---@field [1] ? boolean + + +---@class NoFrustumCulling +--- Use this component to opt-out of built-in frustum culling for entities, see--- [`Frustum`].--- --- It can be used for example:--- - when a [`Mesh`] is updated but its [`Aabb`] is not, which might happen with animations,--- - when using some light effects, like wanting a [`Mesh`] out of the [`Frustum`]--- to appear in the reflection of a [`Mesh`] within. + + +---@class ViewVisibility +--- Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering.--- --- Each frame, this will be reset to `false` during [`VisibilityPropagate`] systems in [`PostUpdate`].--- Later in the frame, systems in [`CheckVisibility`] will mark any visible entities using [`ViewVisibility::set`].--- Because of this, values of this type will be marked as changed every frame, even when they do not change.--- --- If you wish to add custom visibility system that sets this value, make sure you add it to the [`CheckVisibility`] set.--- --- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate--- [`CheckVisibility`]: VisibilitySystems::CheckVisibility +---@field [1] ? boolean + + +---@class Visibility +--- User indication of whether an entity is visible. Propagates down the entity hierarchy.--- --- If an entity is hidden in this way, all [`Children`] (and all of their children and so on) who--- are set to [`Inherited`](Self::Inherited) will also be hidden.--- --- This is done by the `visibility_propagate_system` which uses the entity hierarchy and--- `Visibility` to set the values of each entity's [`InheritedVisibility`] component. + + +---@class VisibilityClass +--- A bucket into which we group entities for the purposes of visibility.--- --- Bevy's various rendering subsystems (3D, 2D, UI, etc.) want to be able to--- quickly winnow the set of entities to only those that the subsystem is--- tasked with rendering, to avoid spending time examining irrelevant entities.--- At the same time, Bevy wants the [`check_visibility`] system to determine--- all entities' visibilities at the same time, regardless of what rendering--- subsystem is responsible for drawing them. Additionally, your application--- may want to add more types of renderable objects that Bevy determines--- visibility for just as it does for Bevy's built-in objects.--- --- The solution to this problem is *visibility classes*. A visibility class is--- a type, typically the type of a component, that represents the subsystem--- that renders it: for example, `Mesh3d`, `Mesh2d`, and `Sprite`. The--- [`VisibilityClass`] component stores the visibility class or classes that--- the entity belongs to. (Generally, an object will belong to only one--- visibility class, but in rare cases it may belong to multiple.)--- --- When adding a new renderable component, you'll typically want to write an--- add-component hook that adds the type ID of that component to the--- [`VisibilityClass`] array. See `custom_phase_item` for an example. +---@field [1] ? SmallVec + + +---@class VisibleEntities +--- Collection of entities visible from the current view.--- --- This component contains all entities which are visible from the currently--- rendered view. The collection is updated automatically by the [`VisibilitySystems::CheckVisibility`]--- system set. Renderers can use the equivalent [`RenderVisibleEntities`] to optimize rendering of--- a particular view, to prevent drawing items not visible from that view.--- --- This component is intended to be attached to the same entity as the [`Camera`] and--- the [`Frustum`] defining the view. + + +---@class VisibilityRange +--- Specifies the range of distances that this entity must be from the camera in--- order to be rendered.--- --- This is also known as *hierarchical level of detail* or *HLOD*.--- --- Use this component when you want to render a high-polygon mesh when the--- camera is close and a lower-polygon mesh when the camera is far away. This--- is a common technique for improving performance, because fine details are--- hard to see in a mesh at a distance. To avoid an artifact known as *popping*--- between levels, each level has a *margin*, within which the object--- transitions gradually from invisible to visible using a dithering effect.--- --- You can also use this feature to replace multiple meshes with a single mesh--- when the camera is distant. This is the reason for the term "*hierarchical*--- level of detail". Reducing the number of meshes can be useful for reducing--- drawcall count. Note that you must place the [`VisibilityRange`] component--- on each entity you want to be part of a LOD group, as [`VisibilityRange`]--- isn't automatically propagated down to children.--- --- A typical use of this feature might look like this:--- --- | Entity | `start_margin` | `end_margin` |--- |-------------------------|----------------|--------------|--- | Root | N/A | N/A |--- | ├─ High-poly mesh | [0, 0) | [20, 25) |--- | ├─ Low-poly mesh | [20, 25) | [70, 75) |--- | └─ Billboard *imposter* | [70, 75) | [150, 160) |--- --- With this setup, the user will see a high-poly mesh when the camera is--- closer than 20 units. As the camera zooms out, between 20 units to 25 units,--- the high-poly mesh will gradually fade to a low-poly mesh. When the camera--- is 70 to 75 units away, the low-poly mesh will fade to a single textured--- quad. And between 150 and 160 units, the object fades away entirely. Note--- that the `end_margin` of a higher LOD is always identical to the--- `start_margin` of the next lower LOD; this is important for the crossfade--- effect to function properly. +---@field start_margin ? Range +---@field end_margin ? Range +---@field use_aabb ? boolean + + +---@class RenderLayers +--- Describes which rendering layers an entity belongs to.--- --- Cameras with this component will only render entities with intersecting--- layers.--- --- Entities may belong to one or more layers, or no layer at all.--- --- The [`Default`] instance of `RenderLayers` contains layer `0`, the first layer.--- --- An entity with this component without any layers is invisible.--- --- Entities without this component belong to layer `0`. +---@field [1] ? SmallVec + + +---@class Screenshot +--- A component that signals to the renderer to capture a screenshot this frame.--- --- This component should be spawned on a new entity with an observer that will trigger--- with [`ScreenshotCaptured`] when the screenshot is ready.--- --- Screenshots are captured asynchronously and may not be available immediately after the frame--- that the component is spawned on. The observer should be used to handle the screenshot when it--- is ready.--- --- Note that the screenshot entity will be despawned after the screenshot is captured and the--- observer is triggered.--- --- # Usage--- --- ```--- # use bevy_ecs::prelude::*;--- # use bevy_render::view::screenshot::{save_to_disk, Screenshot};--- --- fn take_screenshot(mut commands: Commands) {--- commands.spawn(Screenshot::primary_window())--- .observe(save_to_disk("screenshot.png"));--- }--- ``` +---@field [1] ? RenderTarget + + +---@class ScreenshotCaptured + +---@field [1] ? Image + + +---@class ColorMaterial +--- A [2d material](Material2d) that renders [2d meshes](crate::Mesh2d) with a texture tinted by a uniform color +---@field color ? Color +---@field alpha_mode ? AlphaMode2d +---@field uv_transform ? Affine2 +---@field texture ? Option + + +---@class AlphaMode2d +--- Sets how a 2d material's base color alpha channel is used for transparency.--- Currently, this only works with [`Mesh2d`]. Sprites are always transparent.--- --- This is very similar to [`AlphaMode`](bevy_render::alpha::AlphaMode) but this only applies to 2d meshes.--- We use a separate type because 2d doesn't support all the transparency modes that 3d does. + + +---@class Anchor +--- How a sprite is positioned relative to its [`Transform`].--- It defaults to `Anchor::Center`. + + +---@class Sprite +--- Describes a sprite to be rendered to a 2D camera +---@field image ? Handle +---@field texture_atlas ? Option +---@field color ? Color +---@field flip_x ? boolean +---@field flip_y ? boolean +---@field custom_size ? Option +---@field rect ? Option +---@field anchor ? Anchor +---@field image_mode ? SpriteImageMode + + +---@class SpriteImageMode +--- Controls how the image is altered when scaled. + + +---@class BorderRect +--- Defines the extents of the border of a rectangle.--- --- This struct is used to represent thickness or offsets from the edges--- of a rectangle (left, right, top, and bottom), with values increasing inwards. +---@field left ? number +---@field right ? number +---@field top ? number +---@field bottom ? number + + +---@class SliceScaleMode +--- Defines how a texture slice scales when resized + + +---@class TextureSlicer +--- Slices a texture using the **9-slicing** technique. This allows to reuse an image at various sizes--- without needing to prepare multiple assets. The associated texture will be split into nine portions,--- so that on resize the different portions scale or tile in different ways to keep the texture in proportion.--- --- For example, when resizing a 9-sliced texture the corners will remain unscaled while the other--- sections will be scaled or tiled.--- --- See [9-sliced](https://en.wikipedia.org/wiki/9-slice_scaling) textures. +---@field border ? BorderRect +---@field center_scale_mode ? SliceScaleMode +---@field sides_scale_mode ? SliceScaleMode +---@field max_corner_scale ? number + + +---@class ReflectableScheduleLabel + + + +---@class AppLifecycle +--- Application lifetime events + + +---@class CursorEntered +--- An event that is sent whenever the user's cursor enters a window. +---@field window ? Entity + + +---@class CursorLeft +--- An event that is sent whenever the user's cursor leaves a window. +---@field window ? Entity + + +---@class CursorMoved +--- An event reporting that the mouse cursor has moved inside a window.--- --- The event is sent only if the cursor is over one of the application's windows.--- It is the translated version of [`WindowEvent::CursorMoved`] from the `winit` crate with the addition of `delta`.--- --- Not to be confused with the `MouseMotion` event from `bevy_input`.--- --- Because the range of data is limited by the window area and it may have been transformed by the OS to implement certain effects like acceleration,--- you should not use it for non-cursor-like behavior such as 3D camera control. Please see `MouseMotion` instead.--- --- [`WindowEvent::CursorMoved`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.CursorMoved +---@field window ? Entity +---@field position ? Vec2 +---@field delta ? Option + + +---@class FileDragAndDrop +--- Events related to files being dragged and dropped on a window. + + +---@class Ime +--- An Input Method Editor event.--- --- This event is the translated version of the `WindowEvent::Ime` from the `winit` crate.--- --- It is only sent if IME was enabled on the window with [`Window::ime_enabled`](crate::window::Window::ime_enabled). + + +---@class RequestRedraw +--- An event that indicates all of the application's windows should be redrawn,--- even if their control flow is set to `Wait` and there have been no window events. + + +---@class WindowBackendScaleFactorChanged +--- An event that indicates a window's OS-reported scale factor has changed. +---@field window ? Entity +---@field scale_factor ? number + + +---@class WindowCloseRequested +--- An event that is sent whenever the operating systems requests that a window--- be closed. This will be sent when the close button of the window is pressed.--- --- If the default [`WindowPlugin`] is used, these events are handled--- by closing the corresponding [`Window`].--- To disable this behavior, set `close_when_requested` on the [`WindowPlugin`]--- to `false`.--- --- [`WindowPlugin`]: crate::WindowPlugin--- [`Window`]: crate::Window +---@field window ? Entity + + +---@class WindowClosed +--- An event that is sent whenever a window is closed. This will be sent when--- the window entity loses its [`Window`](crate::window::Window) component or is despawned. +---@field window ? Entity + + +---@class WindowClosing +--- An event that is sent whenever a window is closing. This will be sent when--- after a [`WindowCloseRequested`] event is received and the window is in the process of closing. +---@field window ? Entity + + +---@class WindowCreated +--- An event that is sent whenever a new window is created.--- --- To create a new window, spawn an entity with a [`crate::Window`] on it. +---@field window ? Entity + + +---@class WindowDestroyed +--- An event that is sent whenever a window is destroyed by the underlying window system.--- --- Note that if your application only has a single window, this event may be your last chance to--- persist state before the application terminates. +---@field window ? Entity + + +---@class WindowEvent +--- Wraps all `bevy_window` and `bevy_input` events in a common enum.--- --- Read these events with `EventReader` if you need to--- access window events in the order they were received from the--- operating system. Otherwise, the event types are individually--- readable with `EventReader` (e.g. `EventReader`). + + +---@class WindowFocused +--- An event that indicates a window has received or lost focus. +---@field window ? Entity +---@field focused ? boolean + + +---@class WindowMoved +--- An event that is sent when a window is repositioned in physical pixels. +---@field window ? Entity +---@field position ? IVec2 + + +---@class WindowOccluded +--- The window has been occluded (completely hidden from view).--- --- This is different to window visibility as it depends on--- whether the window is closed, minimized, set invisible,--- or fully occluded by another window.--- --- It is the translated version of [`WindowEvent::Occluded`] from the `winit` crate.--- --- [`WindowEvent::Occluded`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.Occluded +---@field window ? Entity +---@field occluded ? boolean + + +---@class WindowResized +--- A window event that is sent whenever a window's logical size has changed. +---@field window ? Entity +---@field width ? number +---@field height ? number + + +---@class WindowScaleFactorChanged +--- An event that indicates a window's scale factor has changed. +---@field window ? Entity +---@field scale_factor ? number + + +---@class WindowThemeChanged +--- An event sent when the system theme changes for a window.--- --- This event is only sent when the window is relying on the system theme to control its appearance.--- i.e. It is only sent when [`Window::window_theme`](crate::window::Window::window_theme) is `None` and the system theme changes. +---@field window ? Entity +---@field theme ? WindowTheme + + +---@class Monitor +--- Represents an available monitor as reported by the user's operating system, which can be used--- to query information about the display, such as its size, position, and video modes.--- --- Each monitor corresponds to an entity and can be used to position a monitor using--- [`crate::window::MonitorSelection::Entity`].--- --- # Warning--- --- This component is synchronized with `winit` through `bevy_winit`, but is effectively--- read-only as `winit` does not support changing monitor properties. +---@field name ? Option +---@field physical_height ? integer +---@field physical_width ? integer +---@field physical_position ? IVec2 +---@field refresh_rate_millihertz ? Option +---@field scale_factor ? number +---@field video_modes ? Vec + + +---@class VideoMode +--- Represents a video mode that a monitor supports +---@field physical_size ? UVec2 +---@field bit_depth ? integer +---@field refresh_rate_millihertz ? integer + + +---@class SystemCursorIcon +--- The icon to display for a window.--- --- Examples of all of these cursors can be found [here](https://www.w3schools.com/cssref/playit.php?filename=playcss_cursor&preval=crosshair).--- This `enum` is simply a copy of a similar `enum` found in [`winit`](https://docs.rs/winit/latest/winit/window/enum.CursorIcon.html).--- `winit`, in turn, is based upon the [CSS3 UI spec](https://www.w3.org/TR/css-ui-3/#cursor).--- --- See the [`window_settings`] example for usage.--- --- [`window_settings`]: https://github.com/bevyengine/bevy/blob/latest/examples/window/window_settings.rs + + +---@class CompositeAlphaMode +--- Specifies how the alpha channel of the textures should be handled during compositing, for a [`Window`]. + + +---@class CursorGrabMode +--- Defines if and how the cursor is grabbed by a [`Window`].--- --- ## Platform-specific--- --- - **`Windows`** doesn't support [`CursorGrabMode::Locked`]--- - **`macOS`** doesn't support [`CursorGrabMode::Confined`]--- - **`iOS/Android`** don't have cursors.--- --- Since `Windows` and `macOS` have different [`CursorGrabMode`] support, we first try to set the grab mode that was asked for. If it doesn't work then use the alternate grab mode. + + +---@class CursorOptions +--- Cursor data for a [`Window`]. +---@field visible ? boolean +---@field grab_mode ? CursorGrabMode +---@field hit_test ? boolean + + +---@class EnabledButtons +--- Specifies which [`Window`] control buttons should be enabled.--- --- ## Platform-specific--- --- **`iOS`**, **`Android`**, and the **`Web`** do not have window control buttons.--- --- On some **`Linux`** environments these values have no effect. +---@field minimize ? boolean +---@field maximize ? boolean +---@field close ? boolean + + +---@class InternalWindowState +--- Stores internal [`Window`] state that isn't directly accessible. +---@field minimize_request ? Option +---@field maximize_request ? Option +---@field drag_move_request ? boolean +---@field drag_resize_request ? Option +---@field physical_cursor_position ? Option + + +---@class MonitorSelection +--- References a screen monitor.--- --- Used when centering a [`Window`] on a monitor. + + +---@class PresentMode +--- Presentation mode for a [`Window`].--- --- The presentation mode specifies when a frame is presented to the window. The [`Fifo`]--- option corresponds to a traditional `VSync`, where the framerate is capped by the--- display refresh rate. Both [`Immediate`] and [`Mailbox`] are low-latency and are not--- capped by the refresh rate, but may not be available on all platforms. Tearing--- may be observed with [`Immediate`] mode, but will not be observed with [`Mailbox`] or--- [`Fifo`].--- --- [`AutoVsync`] or [`AutoNoVsync`] will gracefully fallback to [`Fifo`] when unavailable.--- --- [`Immediate`] or [`Mailbox`] will panic if not supported by the platform.--- --- [`Fifo`]: PresentMode::Fifo--- [`FifoRelaxed`]: PresentMode::FifoRelaxed--- [`Immediate`]: PresentMode::Immediate--- [`Mailbox`]: PresentMode::Mailbox--- [`AutoVsync`]: PresentMode::AutoVsync--- [`AutoNoVsync`]: PresentMode::AutoNoVsync + + +---@class PrimaryWindow +--- Marker [`Component`] for the window considered the primary window.--- --- Currently this is assumed to only exist on 1 entity at a time.--- --- [`WindowPlugin`](crate::WindowPlugin) will spawn a [`Window`] entity--- with this component if [`primary_window`](crate::WindowPlugin::primary_window)--- is `Some`. + + +---@class VideoModeSelection +--- References an exclusive fullscreen video mode.--- --- Used when setting [`WindowMode::Fullscreen`] on a window. + + +---@class Window +--- The defining [`Component`] for window entities,--- storing information about how it should appear and behave.--- --- Each window corresponds to an entity, and is uniquely identified by the value of their [`Entity`].--- When the [`Window`] component is added to an entity, a new window will be opened.--- When it is removed or the entity is despawned, the window will close.--- --- The primary window entity (and the corresponding window) is spawned by default--- by [`WindowPlugin`](crate::WindowPlugin) and is marked with the [`PrimaryWindow`] component.--- --- This component is synchronized with `winit` through `bevy_winit`:--- it will reflect the current state of the window and can be modified to change this state.--- --- # Example--- --- Because this component is synchronized with `winit`, it can be used to perform--- OS-integrated windowing operations. For example, here's a simple system--- to change the window mode:--- --- ```--- # use bevy_ecs::query::With;--- # use bevy_ecs::system::Query;--- # use bevy_window::{WindowMode, PrimaryWindow, Window, MonitorSelection, VideoModeSelection};--- fn change_window_mode(mut windows: Query<&mut Window, With>) {--- // Query returns one window typically.--- for mut window in windows.iter_mut() {--- window.mode =--- WindowMode::Fullscreen(MonitorSelection::Current, VideoModeSelection::Current);--- }--- }--- ``` +---@field cursor_options ? CursorOptions +---@field present_mode ? PresentMode +---@field mode ? WindowMode +---@field position ? WindowPosition +---@field resolution ? WindowResolution +---@field title ? string +---@field name ? Option +---@field composite_alpha_mode ? CompositeAlphaMode +---@field resize_constraints ? WindowResizeConstraints +---@field resizable ? boolean +---@field enabled_buttons ? EnabledButtons +---@field decorations ? boolean +---@field transparent ? boolean +---@field focused ? boolean +---@field window_level ? WindowLevel +---@field canvas ? Option +---@field fit_canvas_to_parent ? boolean +---@field prevent_default_event_handling ? boolean +---@field internal ? InternalWindowState +---@field ime_enabled ? boolean +---@field ime_position ? Vec2 +---@field window_theme ? Option +---@field visible ? boolean +---@field skip_taskbar ? boolean +---@field clip_children ? boolean +---@field desired_maximum_frame_latency ? Option +---@field recognize_pinch_gesture ? boolean +---@field recognize_rotation_gesture ? boolean +---@field recognize_doubletap_gesture ? boolean +---@field recognize_pan_gesture ? Option +---@field movable_by_window_background ? boolean +---@field fullsize_content_view ? boolean +---@field has_shadow ? boolean +---@field titlebar_shown ? boolean +---@field titlebar_transparent ? boolean +---@field titlebar_show_title ? boolean +---@field titlebar_show_buttons ? boolean +---@field prefers_home_indicator_hidden ? boolean +---@field prefers_status_bar_hidden ? boolean + + +---@class WindowLevel +--- Specifies where a [`Window`] should appear relative to other overlapping windows (on top or under) .--- --- Levels are groups of windows with respect to their z-position.--- --- The relative ordering between windows in different window levels is fixed.--- The z-order of windows within the same window level may change dynamically on user interaction.--- --- ## Platform-specific--- --- - **iOS / Android / Web / Wayland:** Unsupported. + + +---@class WindowMode +--- Defines the way a [`Window`] is displayed. + + +---@class WindowPosition +--- Defines where a [`Window`] should be placed on the screen. + + +---@class WindowRef +--- Reference to a [`Window`], whether it be a direct link to a specific entity or--- a more vague defaulting choice. + + +---@class WindowResizeConstraints +--- The size limits on a [`Window`].--- --- These values are measured in logical pixels (see [`WindowResolution`]), so the user's--- scale factor does affect the size limits on the window.--- --- Please note that if the window is resizable, then when the window is--- maximized it may have a size outside of these limits. The functionality--- required to disable maximizing is not yet exposed by winit. +---@field min_width ? number +---@field min_height ? number +---@field max_width ? number +---@field max_height ? number + + +---@class WindowResolution +--- Controls the size of a [`Window`]--- --- ## Physical, logical and requested sizes--- --- There are three sizes associated with a window:--- - the physical size,--- which represents the actual height and width in physical pixels--- the window occupies on the monitor,--- - the logical size,--- which represents the size that should be used to scale elements--- inside the window, measured in logical pixels,--- - the requested size,--- measured in logical pixels, which is the value submitted--- to the API when creating the window, or requesting that it be resized.--- --- ## Scale factor--- --- The reason logical size and physical size are separated and can be different--- is to account for the cases where:--- - several monitors have different pixel densities,--- - the user has set up a pixel density preference in its operating system,--- - the Bevy `App` has specified a specific scale factor between both.--- --- The factor between physical size and logical size can be retrieved with--- [`WindowResolution::scale_factor`].--- --- For the first two cases, a scale factor is set automatically by the operating--- system through the window backend. You can get it with--- [`WindowResolution::base_scale_factor`].--- --- For the third case, you can override this automatic scale factor with--- [`WindowResolution::set_scale_factor_override`].--- --- ## Requested and obtained sizes--- --- The logical size should be equal to the requested size after creating/resizing,--- when possible.--- The reason the requested size and logical size might be different--- is because the corresponding physical size might exceed limits (either the--- size limits of the monitor, or limits defined in [`WindowResizeConstraints`]).--- --- Note: The requested size is not kept in memory, for example requesting a size--- too big for the screen, making the logical size different from the requested size,--- and then setting a scale factor that makes the previous requested size within--- the limits of the screen will not get back that previous requested size. +---@field physical_width ? integer +---@field physical_height ? integer +---@field scale_factor_override ? Option +---@field scale_factor ? number + + +---@class WindowTheme +--- The [`Window`] theme variant to use. + + +---@class CursorIcon +--- Insert into a window entity to set the cursor for that window. + + +---@class NonZeroU32 + + + +---@class Cow + + + +---@class Arc + + + +---@class Range + + + +---@class RangeInclusive diff --git a/assets/scripts/game_of_life.lua b/assets/scripts/game_of_life.lua index 529c7e817b..b7ee9ebb5b 100644 --- a/assets/scripts/game_of_life.lua +++ b/assets/scripts/game_of_life.lua @@ -16,6 +16,7 @@ function on_script_loaded() info("Lua: Click on the screen to set cells alive after running the `gol start` command") local life_state = fetch_life_state() + local cells = life_state.cells -- set some cells alive diff --git a/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml b/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml index c4c56a65ec..32e97bfa01 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml +++ b/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml @@ -18,7 +18,7 @@ clap = { version = "4", features = ["derive"] } anyhow = "1" tera = "1.20" strum = { version = "0.25", features = ["derive"] } -ladfile = { path = "../../ladfile", version = "0.5.0" } +ladfile = { path = "../../ladfile", version = "0.6.0" } env_logger = "0.11" log = "0.4" serde = { version = "1.0", features = ["derive"] } diff --git a/crates/lad_backends/lua_language_server_lad_backend/bindings.lua/bindings.lua b/crates/lad_backends/lua_language_server_lad_backend/bindings.lua/bindings.lua new file mode 100644 index 0000000000..73622c0f0e --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/bindings.lua/bindings.lua @@ -0,0 +1,2201 @@ +---@meta +---@module "World" + +---@class World +--- The ECS world containing all Components, Resources and Systems. Main point of interaction with a Bevy App. + + +---@class ScriptComponentRegistration +--- A reference to a component type's reflection registration.--- --- In general think of this as a handle to a type.--- --- Not to be confused with script registered dynamic components, although this can point to a script registered component. +---@field registration ? ScriptTypeRegistration +---@field component_id ? ComponentId +---@field is_dynamic_script_component ? boolean + + +---@class ScriptQueryBuilder +--- The query builder is used to build ECS queries which retrieve spefific components filtered by specific conditions.--- --- For example:--- ```rust,ignore--- builder.component(componentA)--- .component(componentB)--- .with(componentC)--- .without(componentD) --- ```--- --- Will retrieve entities which:--- - Have componentA--- - Have componentB--- - Have componentC--- - Do not have componentD--- --- As well as references to components:--- - componentA--- - componentB + + +---@class ScriptQueryResult +--- A result from a query. + + +---@class ScriptResourceRegistration +--- A reference to a resource type's reflection registration.--- --- In general think of this as a handle to a type. +---@field registration ? ScriptTypeRegistration +---@field resource_id ? ComponentId + + +---@class ScriptTypeRegistration +--- A reference to a type which is not a `Resource` or `Component`.--- --- In general think of this as a handle to a type. + + +---@class ScriptSystemBuilder +--- A builder for systems living in scripts + + +---@class ScriptAttachment +--- Specifies a unique attachment of a script. These attachments are mapped to [`ContextKey`]'s depending on the context policy used. + + +---@class ReflectSchedule +--- A reflectable schedule. +---@field type_path ? string +---@field label ? ReflectableScheduleLabel + + +---@class ReflectSystem +--- A reflectable system. + + +---@class Color +--- An enumerated type that can represent any of the color types in this crate.--- --- This is useful when you need to store a color in a data structure that can't be generic over--- the color type.---
---
--- --- # Operations--- --- [`Color`] supports all the standard color operations, such as [mixing](Mix),--- [luminance](Luminance) and [hue](Hue) adjustment,--- and [diffing](EuclideanDistance). These operations delegate to the concrete color space contained--- by [`Color`], but will convert to [`Oklch`](Oklcha) for operations which aren't supported in the--- current space. After performing the operation, if a conversion was required, the result will be--- converted back into the original color space.--- --- ```rust--- # use bevy_color::{Hue, Color};--- let red_hsv = Color::hsv(0., 1., 1.);--- let red_srgb = Color::srgb(1., 0., 0.);--- --- // HSV has a definition of hue, so it will be returned.--- red_hsv.hue();--- --- // SRGB doesn't have a native definition for hue.--- // Converts to Oklch and returns that result.--- red_srgb.hue();--- ```--- --- [`Oklch`](Oklcha) has been chosen as the intermediary space in cases where conversion is required--- due to its perceptual uniformity and broad support for Bevy's color operations.--- To avoid the cost of repeated conversion, and ensure consistent results where that is desired,--- first convert this [`Color`] into your desired color space. + + +---@class Hsla +--- Color in Hue-Saturation-Lightness (HSL) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV).---
---
+---@field hue ? number +---@field saturation ? number +---@field lightness ? number +---@field alpha ? number + + +---@class Hsva +--- Color in Hue-Saturation-Value (HSV) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV).---
---
+---@field hue ? number +---@field saturation ? number +---@field value ? number +---@field alpha ? number + + +---@class Hwba +--- Color in Hue-Whiteness-Blackness (HWB) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HWB_color_model).---
---
+---@field hue ? number +---@field whiteness ? number +---@field blackness ? number +---@field alpha ? number + + +---@class Laba +--- Color in LAB color space, with alpha---
---
+---@field lightness ? number +---@field a ? number +---@field b ? number +---@field alpha ? number + + +---@class Lcha +--- Color in LCH color space, with alpha---
---
+---@field lightness ? number +---@field chroma ? number +---@field hue ? number +---@field alpha ? number + + +---@class LinearRgba +--- Linear RGB color with alpha.---
---
+---@field red ? number +---@field green ? number +---@field blue ? number +---@field alpha ? number + + +---@class Oklaba +--- Color in Oklab color space, with alpha---
---
+---@field lightness ? number +---@field a ? number +---@field b ? number +---@field alpha ? number + + +---@class Oklcha +--- Color in Oklch color space, with alpha---
---
+---@field lightness ? number +---@field chroma ? number +---@field hue ? number +---@field alpha ? number + + +---@class Srgba +--- Non-linear standard RGB with alpha.---
---
+---@field red ? number +---@field green ? number +---@field blue ? number +---@field alpha ? number + + +---@class Xyza +--- [CIE 1931](https://en.wikipedia.org/wiki/CIE_1931_color_space) color space, also known as XYZ, with an alpha channel.---
---
+---@field x ? number +---@field y ? number +---@field z ? number +---@field alpha ? number + + +---@class AutoExposureCompensationCurve +--- An auto exposure compensation curve.--- This curve is used to map the average log luminance of a scene to an--- exposure compensation value, to allow for fine control over the final exposure. +---@field min_log_lum ? number +---@field max_log_lum ? number +---@field min_compensation ? number +---@field max_compensation ? number +---@field lut ? [u8; 256] + + +---@class AutoExposure +--- Component that enables auto exposure for an HDR-enabled 2d or 3d camera.--- --- Auto exposure adjusts the exposure of the camera automatically to--- simulate the human eye's ability to adapt to different lighting conditions.--- --- Bevy's implementation builds a 64 bin histogram of the scene's luminance,--- and then adjusts the exposure so that the average brightness of the final--- render will be middle gray. Because it's using a histogram, some details can--- be selectively ignored or emphasized. Outliers like shadows and specular--- highlights can be ignored, and certain areas can be given more (or less)--- weight based on a mask.--- --- # Usage Notes--- --- **Auto Exposure requires compute shaders and is not compatible with WebGL2.** +---@field range ? RangeInclusive +---@field filter ? RangeInclusive +---@field speed_brighten ? number +---@field speed_darken ? number +---@field exponential_transition_distance ? number +---@field metering_mask ? Handle +---@field compensation_curve ? Handle + + +---@class Bloom +--- Applies a bloom effect to an HDR-enabled 2d or 3d camera.--- --- Bloom emulates an effect found in real cameras and the human eye,--- causing halos to appear around very bright parts of the scene.--- --- See also .--- --- # Usage Notes--- --- **Bloom is currently not compatible with WebGL2.**--- --- Often used in conjunction with `bevy_pbr::StandardMaterial::emissive` for 3d meshes.--- --- Bloom is best used alongside a tonemapping function that desaturates bright colors,--- such as [`crate::tonemapping::Tonemapping::TonyMcMapface`].--- --- Bevy's implementation uses a parametric curve to blend between a set of--- blurred (lower frequency) images generated from the camera's view.--- See for a visualization of the parametric curve--- used in Bevy as well as a visualization of the curve's respective scattering profile. +---@field intensity ? number +---@field low_frequency_boost ? number +---@field low_frequency_boost_curvature ? number +---@field high_pass_frequency ? number +---@field prefilter ? BloomPrefilter +---@field composite_mode ? BloomCompositeMode +---@field max_mip_dimension ? integer +---@field scale ? Vec2 + + +---@class BloomCompositeMode + + + +---@class BloomPrefilter +--- Applies a threshold filter to the input image to extract the brightest--- regions before blurring them and compositing back onto the original image.--- These settings are useful when emulating the 1990s-2000s game look.--- --- # Considerations--- * Changing these settings creates a physically inaccurate image--- * Changing these settings makes it easy to make the final result look worse--- * Non-default prefilter settings should be used in conjunction with [`BloomCompositeMode::Additive`] +---@field threshold ? number +---@field threshold_softness ? number + + +---@class ContrastAdaptiveSharpening +--- Applies a contrast adaptive sharpening (CAS) filter to the camera.--- --- CAS is usually used in combination with shader based anti-aliasing methods--- such as FXAA or TAA to regain some of the lost detail from the blurring that they introduce.--- --- CAS is designed to adjust the amount of sharpening applied to different areas of an image--- based on the local contrast. This can help avoid over-sharpening areas with high contrast--- and under-sharpening areas with low contrast.--- --- To use this, add the [`ContrastAdaptiveSharpening`] component to a 2D or 3D camera. +---@field enabled ? boolean +---@field sharpening_strength ? number +---@field denoise ? boolean + + +---@class DenoiseCas + +---@field [1] ? boolean + + +---@class Camera2d +--- A 2D camera component. Enables the 2D render graph for a [`Camera`]. + + +---@class Camera3d +--- A 3D camera component. Enables the main 3D render graph for a [`Camera`].--- --- The camera coordinate space is right-handed X-right, Y-up, Z-back.--- This means "forward" is -Z. +---@field depth_load_op ? Camera3dDepthLoadOp +---@field depth_texture_usages ? Camera3dDepthTextureUsage +---@field screen_space_specular_transmission_steps ? integer +---@field screen_space_specular_transmission_quality ? ScreenSpaceTransmissionQuality + + +---@class Camera3dDepthLoadOp +--- The depth clear operation to perform for the main 3d pass. + + +---@class Camera3dDepthTextureUsage + +---@field [1] ? integer + + +---@class ScreenSpaceTransmissionQuality +--- The quality of the screen space transmission blur effect, applied to whatever's “behind” transmissive--- objects when their `roughness` is greater than `0.0`.--- --- Higher qualities are more GPU-intensive.--- --- **Note:** You can get better-looking results at any quality level by enabling TAA. See: [`TemporalAntiAliasPlugin`](crate::experimental::taa::TemporalAntiAliasPlugin). + + +---@class DepthOfField +--- A component that enables a [depth of field] postprocessing effect when attached to a [`Camera3d`],--- simulating the focus of a camera lens.--- --- [depth of field]: https://en.wikipedia.org/wiki/Depth_of_field +---@field mode ? DepthOfFieldMode +---@field focal_distance ? number +---@field sensor_height ? number +---@field aperture_f_stops ? number +---@field max_circle_of_confusion_diameter ? number +---@field max_depth ? number + + +---@class DepthOfFieldMode +--- Controls the appearance of the effect. + + +---@class Fxaa +--- A component for enabling Fast Approximate Anti-Aliasing (FXAA)--- for a [`bevy_render::camera::Camera`]. +---@field enabled ? boolean +---@field edge_threshold ? Sensitivity +---@field edge_threshold_min ? Sensitivity + + +---@class Sensitivity + + + +---@class MotionBlur +--- A component that enables and configures motion blur when added to a camera.--- --- Motion blur is an effect that simulates how moving objects blur as they change position during--- the exposure of film, a sensor, or an eyeball.--- --- Because rendering simulates discrete steps in time, we use per-pixel motion vectors to estimate--- the path of objects between frames. This kind of implementation has some artifacts:--- - Fast moving objects in front of a stationary object or when in front of empty space, will not--- have their edges blurred.--- - Transparent objects do not write to depth or motion vectors, so they cannot be blurred.--- --- Other approaches, such as *A Reconstruction Filter for Plausible Motion Blur* produce more--- correct results, but are more expensive and complex, and have other kinds of artifacts. This--- implementation is relatively inexpensive and effective.--- --- # Usage--- --- Add the [`MotionBlur`] component to a camera to enable and configure motion blur for that--- camera.--- --- ```--- # use bevy_core_pipeline::{core_3d::Camera3d, motion_blur::MotionBlur};--- # use bevy_ecs::prelude::*;--- # fn test(mut commands: Commands) {--- commands.spawn((--- Camera3d::default(),--- MotionBlur::default(),--- ));--- # }--- ```` +---@field shutter_angle ? number +---@field samples ? integer + + +---@class OrderIndependentTransparencySettings +--- Used to identify which camera will use OIT to render transparent meshes--- and to configure OIT. +---@field layer_count ? integer +---@field alpha_threshold ? number + + +---@class ChromaticAberration +--- Adds colored fringes to the edges of objects in the scene.--- --- [Chromatic aberration] simulates the effect when lenses fail to focus all--- colors of light toward a single point. It causes rainbow-colored streaks to--- appear, which are especially apparent on the edges of objects. Chromatic--- aberration is commonly used for collision effects, especially in horror--- games.--- --- Bevy's implementation is based on that of *Inside* ([Gjøl & Svendsen 2016]).--- It's based on a customizable lookup texture, which allows for changing the--- color pattern. By default, the color pattern is simply a 3×1 pixel texture--- consisting of red, green, and blue, in that order, but you can change it to--- any image in order to achieve different effects.--- --- [Chromatic aberration]: https://en.wikipedia.org/wiki/Chromatic_aberration--- --- [Gjøl & Svendsen 2016]: https://github.com/playdeadgames/publications/blob/master/INSIDE/rendering_inside_gdc2016.pdf +---@field color_lut ? Handle +---@field intensity ? number +---@field max_samples ? integer + + +---@class DepthPrepass +--- If added to a [`crate::prelude::Camera3d`] then depth values will be copied to a separate texture available to the main pass. + + +---@class MotionVectorPrepass +--- If added to a [`crate::prelude::Camera3d`] then screen space motion vectors will be copied to a separate texture available to the main pass. + + +---@class NormalPrepass +--- If added to a [`crate::prelude::Camera3d`] then vertex world normals will be copied to a separate texture available to the main pass.--- Normals will have normal map textures already applied. + + +---@class Skybox +--- Adds a skybox to a 3D camera, based on a cubemap texture.--- --- Note that this component does not (currently) affect the scene's lighting.--- To do so, use `EnvironmentMapLight` alongside this component.--- --- See also . +---@field image ? Handle +---@field brightness ? number +---@field rotation ? Quat + + +---@class Smaa +--- A component for enabling Subpixel Morphological Anti-Aliasing (SMAA)--- for a [`bevy_render::camera::Camera`]. +---@field preset ? SmaaPreset + + +---@class SmaaPreset +--- A preset quality level for SMAA.--- --- Higher values are slower but result in a higher-quality image.--- --- The default value is *high*. + + +---@class TemporalAntiAliasing +--- Component to apply temporal anti-aliasing to a 3D perspective camera.--- --- Temporal anti-aliasing (TAA) is a form of image smoothing/filtering, like--- multisample anti-aliasing (MSAA), or fast approximate anti-aliasing (FXAA).--- TAA works by blending (averaging) each frame with the past few frames.--- --- # Tradeoffs--- --- Pros:--- * Filters more types of aliasing than MSAA, such as textures and singular bright pixels (specular aliasing)--- * Cost scales with screen/view resolution, unlike MSAA which scales with number of triangles--- * Greatly increases the quality of stochastic rendering techniques such as SSAO, certain shadow map sampling methods, etc--- --- Cons:--- * Chance of "ghosting" - ghostly trails left behind moving objects--- * Thin geometry, lighting detail, or texture lines may flicker noisily or disappear--- --- Because TAA blends past frames with the current frame, when the frames differ too much--- (such as with fast moving objects or camera cuts), ghosting artifacts may occur.--- --- Artifacts tend to be reduced at higher framerates and rendering resolution.--- --- # Usage Notes--- --- The [`TemporalAntiAliasPlugin`] must be added to your app.--- Any camera with this component must also disable [`Msaa`] by setting it to [`Msaa::Off`].--- --- [Currently](https://github.com/bevyengine/bevy/issues/8423), TAA cannot be used with [`bevy_render::camera::OrthographicProjection`].--- --- TAA also does not work well with alpha-blended meshes, as it requires depth writing to determine motion.--- --- It is very important that correct motion vectors are written for everything on screen.--- Failure to do so will lead to ghosting artifacts. For instance, if particle effects--- are added using a third party library, the library must either:--- --- 1. Write particle motion vectors to the motion vectors prepass texture--- 2. Render particles after TAA--- --- If no [`MipBias`] component is attached to the camera, TAA will add a `MipBias(-1.0)` component. +---@field reset ? boolean + + +---@class DebandDither +--- Enables a debanding shader that applies dithering to mitigate color banding in the final image for a given [`Camera`] entity. + + +---@class Tonemapping +--- Optionally enables a tonemapping shader that attempts to map linear input stimulus into a perceptually uniform image for a given [`Camera`] entity. + + +---@class ComponentId +--- A value which uniquely identifies the type of a [`Component`] or [`Resource`] within a--- [`World`].--- --- Each time a new `Component` type is registered within a `World` using--- e.g. [`World::register_component`] or [`World::register_component_with_descriptor`]--- or a Resource with e.g. [`World::init_resource`],--- a corresponding `ComponentId` is created to track it.--- --- While the distinction between `ComponentId` and [`TypeId`] may seem superficial, breaking them--- into two separate but related concepts allows components to exist outside of Rust's type system.--- Each Rust type registered as a `Component` will have a corresponding `ComponentId`, but additional--- `ComponentId`s may exist in a `World` to track components which cannot be--- represented as Rust types for scripting or other advanced use-cases.--- --- A `ComponentId` is tightly coupled to its parent `World`. Attempting to use a `ComponentId` from--- one `World` to access the metadata of a `Component` in a different `World` is undefined behavior--- and must not be attempted.--- --- Given a type `T` which implements [`Component`], the `ComponentId` for `T` can be retrieved--- from a `World` using [`World::component_id()`] or via [`Components::component_id()`]. Access--- to the `ComponentId` for a [`Resource`] is available via [`Components::resource_id()`]. +---@field [1] ? integer + + +---@class ComponentTicks +--- Records when a component or resource was added and when it was last mutably dereferenced (or added). +---@field added ? Tick +---@field changed ? Tick + + +---@class Tick +--- A value that tracks when a system ran relative to other systems.--- This is used to power change detection.--- --- *Note* that a system that hasn't been run yet has a `Tick` of 0. +---@field tick ? integer + + +---@class Entity +--- Lightweight identifier of an [entity](crate::entity).--- --- The identifier is implemented using a [generational index]: a combination of an index and a generation.--- This allows fast insertion after data removal in an array while minimizing loss of spatial locality.--- --- These identifiers are only valid on the [`World`] it's sourced from. Attempting to use an `Entity` to--- fetch entity components or metadata from a different world will either fail or return unexpected results.--- --- [generational index]: https://lucassardois.medium.com/generational-indices-guide-8e3c5f7fd594--- --- # Stability warning--- For all intents and purposes, `Entity` should be treated as an opaque identifier. The internal bit--- representation is liable to change from release to release as are the behaviors or performance--- characteristics of any of its trait implementations (i.e. `Ord`, `Hash`, etc.). This means that changes in--- `Entity`'s representation, though made readable through various functions on the type, are not considered--- breaking changes under [SemVer].--- --- In particular, directly serializing with `Serialize` and `Deserialize` make zero guarantee of long--- term wire format compatibility. Changes in behavior will cause serialized `Entity` values persisted--- to long term storage (i.e. disk, databases, etc.) will fail to deserialize upon being updated.--- --- # Usage--- --- This data type is returned by iterating a `Query` that has `Entity` as part of its query fetch type parameter ([learn more]).--- It can also be obtained by calling [`EntityCommands::id`] or [`EntityWorldMut::id`].--- --- ```--- # use bevy_ecs::prelude::*;--- # #[derive(Component)]--- # struct SomeComponent;--- fn setup(mut commands: Commands) {--- // Calling `spawn` returns `EntityCommands`.--- let entity = commands.spawn(SomeComponent).id();--- }--- --- fn exclusive_system(world: &mut World) {--- // Calling `spawn` returns `EntityWorldMut`.--- let entity = world.spawn(SomeComponent).id();--- }--- #--- # bevy_ecs::system::assert_is_system(setup);--- # bevy_ecs::system::assert_is_system(exclusive_system);--- ```--- --- 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.--- --- ```--- # use bevy_ecs::prelude::*;--- #--- # #[derive(Component)]--- # struct Expired;--- #--- fn dispose_expired_food(mut commands: Commands, query: Query>) {--- for food_entity in &query {--- commands.entity(food_entity).despawn();--- }--- }--- #--- # bevy_ecs::system::assert_is_system(dispose_expired_food);--- ```--- --- [learn more]: crate::system::Query#entity-id-access--- [`EntityCommands::id`]: crate::system::EntityCommands::id--- [`EntityWorldMut::id`]: crate::world::EntityWorldMut::id--- [`EntityCommands`]: crate::system::EntityCommands--- [`Query::get`]: crate::system::Query::get--- [`World`]: crate::world::World--- [SemVer]: https://semver.org/ + + +---@class EntityHash +--- A [`BuildHasher`] that results in a [`EntityHasher`]. + + +---@class EntityHashSet +--- A [`HashSet`] pre-configured to use [`EntityHash`] hashing. +---@field [1] ? HashSet + + +---@class DefaultQueryFilters +--- Default query filters work by excluding entities with certain components from most queries.--- --- If a query does not explicitly mention a given disabling component, it will not include entities with that component.--- To be more precise, this checks if the query's [`FilteredAccess`] contains the component,--- and if it does not, adds a [`Without`](crate::prelude::Without) filter for that component to the query.--- --- This resource is initialized in the [`World`] whenever a new world is created,--- with the [`Disabled`] component as a disabling component.--- --- Note that you can remove default query filters by overwriting the [`DefaultQueryFilters`] resource.--- This can be useful as a last resort escape hatch, but is liable to break compatibility with other libraries.--- --- See the [module docs](crate::entity_disabling) for more info.--- --- --- # Warning--- --- Default query filters are a global setting that affects all queries in the [`World`],--- and incur a small performance cost for each query.--- --- They can cause significant interoperability issues within the ecosystem,--- as users must be aware of each disabling component in use.--- --- Think carefully about whether you need to use a new disabling component,--- and clearly communicate their presence in any libraries you publish. +---@field disabling ? SmallVec + + +---@class Disabled +--- A marker component for disabled entities.--- --- Semantically, this component is used to mark entities that are temporarily disabled (typically for gameplay reasons),--- but will likely be re-enabled at some point.--- --- Like all disabling components, this only disables the entity itself,--- not its children or other entities that reference it.--- To disable an entire tree of entities, use [`EntityCommands::insert_recursive`](crate::prelude::EntityCommands::insert_recursive).--- --- Every [`World`] has a default query filter that excludes entities with this component,--- registered in the [`DefaultQueryFilters`] resource.--- See [the module docs] for more info.--- --- [the module docs]: crate::entity_disabling + + +---@class ChildOf +--- Stores the parent entity of this child entity with this component.--- --- This is a [`Relationship`] component, and creates the canonical--- "parent / child" hierarchy. This is the "source of truth" component, and it pairs with--- the [`Children`] [`RelationshipTarget`](crate::relationship::RelationshipTarget).--- --- This relationship should be used for things like:--- --- 1. Organizing entities in a scene--- 2. Propagating configuration or data inherited from a parent, such as "visibility" or "world-space global transforms".--- 3. Ensuring a hierarchy is despawned when an entity is despawned.--- --- [`ChildOf`] contains a single "target" [`Entity`]. When [`ChildOf`] is inserted on a "source" entity,--- the "target" entity will automatically (and immediately, via a component hook) have a [`Children`]--- component inserted, and the "source" entity will be added to that [`Children`] instance.--- --- If the [`ChildOf`] component is replaced with a different "target" entity, the old target's [`Children`]--- will be automatically (and immediately, via a component hook) be updated to reflect that change.--- --- Likewise, when the [`ChildOf`] component is removed, the "source" entity will be removed from the old--- target's [`Children`]. If this results in [`Children`] being empty, [`Children`] will be automatically removed.--- --- When a parent is despawned, all children (and their descendants) will _also_ be despawned.--- --- You can create parent-child relationships in a variety of ways. The most direct way is to insert a [`ChildOf`] component:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let root = world.spawn_empty().id();--- let child1 = world.spawn(ChildOf(root)).id();--- let child2 = world.spawn(ChildOf(root)).id();--- let grandchild = world.spawn(ChildOf(child1)).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- --- world.entity_mut(child2).remove::();--- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1]);--- --- world.entity_mut(root).despawn();--- assert!(world.get_entity(root).is_err());--- assert!(world.get_entity(child1).is_err());--- assert!(world.get_entity(grandchild).is_err());--- ```--- --- However if you are spawning many children, you might want to use the [`EntityWorldMut::with_children`] helper instead:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let mut child1 = Entity::PLACEHOLDER;--- let mut child2 = Entity::PLACEHOLDER;--- let mut grandchild = Entity::PLACEHOLDER;--- let root = world.spawn_empty().with_children(|p| {--- child1 = p.spawn_empty().with_children(|p| {--- grandchild = p.spawn_empty().id();--- }).id();--- child2 = p.spawn_empty().id();--- }).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- ```--- --- [`Relationship`]: crate::relationship::Relationship +---@field [1] ? Entity + + +---@class Children +--- Tracks which entities are children of this parent entity.--- --- A [`RelationshipTarget`] collection component that is populated--- with entities that "target" this entity with the [`ChildOf`] [`Relationship`] component.--- --- Together, these components form the "canonical parent-child hierarchy". See the [`ChildOf`] component for the full--- description of this relationship and instructions on how to use it.--- --- # Usage--- --- Like all [`RelationshipTarget`] components, this data should not be directly manipulated to avoid desynchronization.--- Instead, modify the [`ChildOf`] components on the "source" entities.--- --- To access the children of an entity, you can iterate over the [`Children`] component,--- using the [`IntoIterator`] trait.--- For more complex access patterns, see the [`RelationshipTarget`] trait.--- --- [`Relationship`]: crate::relationship::Relationship--- [`RelationshipTarget`]: crate::relationship::RelationshipTarget +---@field [1] ? Vec + + +---@class Identifier +--- A unified identifier for all entity and similar IDs.--- --- Has the same size as a `u64` integer, but the layout is split between a 32-bit low--- segment, a 31-bit high segment, and the significant bit reserved as type flags to denote--- entity kinds. + + +---@class Name +--- Component used to identify an entity. Stores a hash for faster comparisons.--- --- The hash is eagerly re-computed upon each update to the name.--- --- [`Name`] should not be treated as a globally unique identifier for entities,--- as multiple entities can have the same name. [`Entity`] should be--- used instead as the default unique identifier. +---@field hash ? integer +---@field name ? Cow + + +---@class RemovedComponentEntity +--- Wrapper around [`Entity`] for [`RemovedComponents`].--- Internally, `RemovedComponents` uses these as an `Events`. +---@field [1] ? Entity + + +---@class ButtonState +--- The current "press" state of an element + + +---@class AxisSettings +--- Settings for a [`GamepadAxis`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for an axis.--- Values that are higher than `livezone_upperbound` will be rounded up to 1.0.--- Values that are lower than `livezone_lowerbound` will be rounded down to -1.0.--- Values that are in-between `deadzone_lowerbound` and `deadzone_upperbound` will be rounded to 0.0.--- Otherwise, values will be linearly rescaled to fit into the sensitivity range.--- For example, a value that is one fourth of the way from `deadzone_upperbound` to `livezone_upperbound` will be scaled to 0.25.--- --- The valid range is `[-1.0, 1.0]`. +---@field livezone_upperbound ? number +---@field deadzone_upperbound ? number +---@field deadzone_lowerbound ? number +---@field livezone_lowerbound ? number +---@field threshold ? number + + +---@class ButtonAxisSettings +--- Settings for a [`GamepadButton`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for a button axis.--- --- ## Logic--- --- - Values that are higher than or equal to `high` will be rounded to 1.0.--- - Values that are lower than or equal to `low` will be rounded to 0.0.--- - Otherwise, values will not be rounded.--- --- The valid range is from 0.0 to 1.0, inclusive. +---@field high ? number +---@field low ? number +---@field threshold ? number + + +---@class ButtonSettings +--- Manages settings for gamepad buttons.--- --- It is used inside [`GamepadSettings`] to define the threshold for a [`GamepadButton`]--- to be considered pressed or released. A button is considered pressed if the `press_threshold`--- value is surpassed and released if the `release_threshold` value is undercut.--- --- Allowed values: `0.0 <= ``release_threshold`` <= ``press_threshold`` <= 1.0` +---@field press_threshold ? number +---@field release_threshold ? number + + +---@class Gamepad +--- Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`].--- --- An entity with this component is spawned automatically after [`GamepadConnectionEvent`]--- and updated by [`gamepad_event_processing_system`].--- --- See also [`GamepadSettings`] for configuration.--- --- # Examples--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadAxis, GamepadButton};--- # use bevy_ecs::system::Query;--- # use bevy_ecs::name::Name;--- #--- fn gamepad_usage_system(gamepads: Query<(&Name, &Gamepad)>) {--- for (name, gamepad) in &gamepads {--- println!("{name}");--- --- if gamepad.just_pressed(GamepadButton::North) {--- println!("{} just pressed North", name)--- }--- --- if let Some(left_stick_x) = gamepad.get(GamepadAxis::LeftStickX) {--- println!("left stick X: {}", left_stick_x)--- }--- }--- }--- ``` +---@field vendor_id ? Option +---@field product_id ? Option +---@field digital ? ButtonInput +---@field analog ? Axis + + +---@class GamepadAxis +--- Represents gamepad input types that are mapped in the range [-1.0, 1.0].--- --- ## Usage--- --- This is used to determine which axis has changed its value when receiving a--- gamepad axis event. It is also used in the [`Gamepad`] component. + + +---@class GamepadAxisChangedEvent +--- [`GamepadAxis`] event triggered by an analog state change. +---@field entity ? Entity +---@field axis ? GamepadAxis +---@field value ? number + + +---@class GamepadButton +--- Represents gamepad input types that are mapped in the range [0.0, 1.0].--- --- ## Usage--- --- This is used to determine which button has changed its value when receiving gamepad button events.--- It is also used in the [`Gamepad`] component. + + +---@class GamepadButtonChangedEvent +--- [`GamepadButton`] event triggered by an analog state change. +---@field entity ? Entity +---@field button ? GamepadButton +---@field state ? ButtonState +---@field value ? number + + +---@class GamepadButtonStateChangedEvent +--- [`GamepadButton`] event triggered by a digital state change. +---@field entity ? Entity +---@field button ? GamepadButton +---@field state ? ButtonState + + +---@class GamepadConnection +--- The connection status of a gamepad. + + +---@class GamepadConnectionEvent +--- A Gamepad connection event. Created when a connection to a gamepad--- is established and when a gamepad is disconnected. +---@field gamepad ? Entity +---@field connection ? GamepadConnection + + +---@class GamepadEvent +--- A gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`GamepadButtonChangedEvent`] and [`GamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event is produced by `bevy_input`. + + +---@class GamepadInput +--- Encapsulation over [`GamepadAxis`] and [`GamepadButton`]. + + +---@class GamepadRumbleIntensity +--- The intensity at which a gamepad's force-feedback motors may rumble. +---@field strong_motor ? number +---@field weak_motor ? number + + +---@class GamepadRumbleRequest +--- An event that controls force-feedback rumbling of a [`Gamepad`] [`entity`](Entity).--- --- # Notes--- --- Does nothing if the gamepad or platform does not support rumble.--- --- # Example--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadRumbleRequest, GamepadRumbleIntensity};--- # use bevy_ecs::prelude::{EventWriter, Res, Query, Entity, With};--- # use core::time::Duration;--- fn rumble_gamepad_system(--- mut rumble_requests: EventWriter,--- gamepads: Query>,--- ) {--- for entity in gamepads.iter() {--- rumble_requests.write(GamepadRumbleRequest::Add {--- gamepad: entity,--- intensity: GamepadRumbleIntensity::MAX,--- duration: Duration::from_secs_f32(0.5),--- });--- }--- }--- ``` + + +---@class GamepadSettings +--- Gamepad settings component.--- --- ## Usage--- --- It is used to create a `bevy` component that stores the settings of [`GamepadButton`] and [`GamepadAxis`] in [`Gamepad`].--- If no user defined [`ButtonSettings`], [`AxisSettings`], or [`ButtonAxisSettings`]--- are defined, the default settings of each are used as a fallback accordingly.--- --- ## Note--- --- The [`GamepadSettings`] are used to determine when raw gamepad events--- should register. Events that don't meet the change thresholds defined in [`GamepadSettings`]--- will not register. To modify these settings, mutate the corresponding component. +---@field default_button_settings ? ButtonSettings +---@field default_axis_settings ? AxisSettings +---@field default_button_axis_settings ? ButtonAxisSettings +---@field button_settings ? HashMap +---@field axis_settings ? HashMap +---@field button_axis_settings ? HashMap + + +---@class RawGamepadAxisChangedEvent +--- [`GamepadAxis`] changed event unfiltered by [`GamepadSettings`]. +---@field gamepad ? Entity +---@field axis ? GamepadAxis +---@field value ? number + + +---@class RawGamepadButtonChangedEvent +--- [`GamepadButton`] changed event unfiltered by [`GamepadSettings`]. +---@field gamepad ? Entity +---@field button ? GamepadButton +---@field value ? number + + +---@class RawGamepadEvent +--- A raw gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`RawGamepadButtonChangedEvent`] and [`RawGamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event type is used by `bevy_input` to feed its components. + + +---@class DoubleTapGesture +--- Double tap gesture.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first + + +---@class PanGesture +--- Pan gesture.--- --- ## Platform-specific--- --- - On **`iOS`**, must be enabled first +---@field [1] ? Vec2 + + +---@class PinchGesture +--- Two-finger pinch gesture, often used for magnifications.--- --- Positive delta values indicate magnification (zooming in) and--- negative delta values indicate shrinking (zooming out).--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +---@field [1] ? number + + +---@class RotationGesture +--- Two-finger rotation gesture.--- --- Positive delta values indicate rotation counterclockwise and--- negative delta values indicate rotation clockwise.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +---@field [1] ? number + + +---@class Key +--- The logical key code of a [`KeyboardInput`].--- --- ## Technical--- --- Its values map 1 to 1 to winit's Key. + + +---@class KeyCode +--- The key code of a [`KeyboardInput`].--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `Res>`.--- --- Code representing the location of a physical key--- This mostly conforms to the UI Events Specification's [`KeyboardEvent.code`] with a few--- exceptions:--- - The keys that the specification calls `MetaLeft` and `MetaRight` are named `SuperLeft` and--- `SuperRight` here.--- - The key that the specification calls "Super" is reported as `Unidentified` here.--- --- [`KeyboardEvent.code`]: https://w3c.github.io/uievents-code/#code-value-tables--- --- ## Updating--- --- The resource is updated inside of the [`keyboard_input_system`]. + + +---@class KeyboardFocusLost +--- Gets generated from `bevy_winit::winit_runner`--- --- Used for clearing all cached states to avoid having 'stuck' key presses--- when, for example, switching between windows with 'Alt-Tab' or using any other--- OS specific key combination that leads to Bevy window losing focus and not receiving any--- input events + + +---@class KeyboardInput +--- A keyboard input event.--- --- This event is the translated version of the `WindowEvent::KeyboardInput` from the `winit` crate.--- It is available to the end user and can be used for game logic.--- --- ## Usage--- --- The event is consumed inside of the [`keyboard_input_system`]--- to update the [`ButtonInput`](ButtonInput) resource. +---@field key_code ? KeyCode +---@field logical_key ? Key +---@field state ? ButtonState +---@field text ? Option +---@field repeat ? boolean +---@field window ? Entity + + +---@class NativeKey +--- Contains the platform-native logical key identifier, known as keysym.--- --- Exactly what that means differs from platform to platform, but the values are to some degree--- tied to the currently active keyboard layout. The same key on the same keyboard may also report--- different values on different platforms, which is one of the reasons this is a per-platform--- enum.--- --- This enum is primarily used to store raw keysym when Winit doesn't map a given native logical--- key identifier to a meaningful [`Key`] variant. This lets you use [`Key`], and let the user--- define keybinds which work in the presence of identifiers we haven't mapped for you yet. + + +---@class NativeKeyCode +--- Contains the platform-native physical key identifier--- --- The exact values vary from platform to platform (which is part of why this is a per-platform--- enum), but the values are primarily tied to the key's physical location on the keyboard.--- --- This enum is primarily used to store raw keycodes when Winit doesn't map a given native--- physical key identifier to a meaningful [`KeyCode`] variant. In the presence of identifiers we--- haven't mapped for you yet, this lets you use [`KeyCode`] to:--- --- - Correctly match key press and release events.--- - On non-web platforms, support assigning keybinds to virtually any key through a UI. + + +---@class AccumulatedMouseMotion +--- Tracks how much the mouse has moved every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseMotion`] events received this frame. +---@field delta ? Vec2 + + +---@class AccumulatedMouseScroll +--- Tracks how much the mouse has scrolled every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseWheel`] events received this frame. +---@field unit ? MouseScrollUnit +---@field delta ? Vec2 + + +---@class MouseButton +--- A button on a mouse device.--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `bevy`--- resource.--- --- ## Updating--- --- The resource is updated inside of the [`mouse_button_input_system`]. + + +---@class MouseButtonInput +--- A mouse button input event.--- --- This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate.--- --- ## Usage--- --- The event is read inside of the [`mouse_button_input_system`]--- to update the [`ButtonInput`] resource. +---@field button ? MouseButton +---@field state ? ButtonState +---@field window ? Entity + + +---@class MouseMotion +--- An event reporting the change in physical position of a pointing device.--- --- This represents raw, unfiltered physical motion.--- It is the translated version of [`DeviceEvent::MouseMotion`] from the `winit` crate.--- --- All pointing devices connected to a single machine at the same time can emit the event independently.--- However, the event data does not make it possible to distinguish which device it is referring to.--- --- [`DeviceEvent::MouseMotion`]: https://docs.rs/winit/latest/winit/event/enum.DeviceEvent.html#variant.MouseMotion +---@field delta ? Vec2 + + +---@class MouseScrollUnit +--- The scroll unit.--- --- Describes how a value of a [`MouseWheel`] event has to be interpreted.--- --- The value of the event can either be interpreted as the amount of lines or the amount of pixels--- to scroll. + + +---@class MouseWheel +--- A mouse wheel event.--- --- This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate. +---@field unit ? MouseScrollUnit +---@field x ? number +---@field y ? number +---@field window ? Entity + + +---@class ForceTouch +--- A force description of a [`Touch`] input. + + +---@class TouchInput +--- A touch input event.--- --- ## Logic--- --- Every time the user touches the screen, a new [`TouchPhase::Started`] event with an unique--- identifier for the finger is generated. When the finger is lifted, the [`TouchPhase::Ended`]--- event is generated with the same finger id.--- --- After a [`TouchPhase::Started`] event has been emitted, there may be zero or more [`TouchPhase::Moved`]--- events when the finger is moved or the touch pressure changes.--- --- The finger id may be reused by the system after an [`TouchPhase::Ended`] event. The user--- should assume that a new [`TouchPhase::Started`] event received with the same id has nothing--- to do with the old finger and is a new finger.--- --- A [`TouchPhase::Canceled`] event is emitted when the system has canceled tracking this--- touch, such as when the window loses focus, or on iOS if the user moves the--- device against their face.--- --- ## Note--- --- This event is the translated version of the `WindowEvent::Touch` from the `winit` crate.--- It is available to the end user and can be used for game logic. +---@field phase ? TouchPhase +---@field position ? Vec2 +---@field window ? Entity +---@field force ? Option +---@field id ? integer + + +---@class TouchPhase +--- A phase of a [`TouchInput`].--- --- ## Usage--- --- It is used to describe the phase of the touch input that is currently active.--- This includes a phase that indicates that a touch input has started or ended,--- or that a finger has moved. There is also a canceled phase that indicates that--- the system canceled the tracking of the finger. + + +---@class AspectRatio +--- An `AspectRatio` is the ratio of width to height. +---@field [1] ? number + + +---@class Aabb2d +--- A 2D axis-aligned bounding box, or bounding rectangle +---@field min ? Vec2 +---@field max ? Vec2 + + +---@class BoundingCircle +--- A bounding circle +---@field center ? Vec2 +---@field circle ? Circle + + +---@class Aabb3d +--- A 3D axis-aligned bounding box +---@field min ? Vec3A +---@field max ? Vec3A + + +---@class BoundingSphere +--- A bounding sphere +---@field center ? Vec3A +---@field sphere ? Sphere + + +---@class AabbCast2d +--- An intersection test that casts an [`Aabb2d`] along a ray. +---@field ray ? RayCast2d +---@field aabb ? Aabb2d + + +---@class BoundingCircleCast +--- An intersection test that casts a [`BoundingCircle`] along a ray. +---@field ray ? RayCast2d +---@field circle ? BoundingCircle + + +---@class RayCast2d +--- A raycast intersection test for 2D bounding volumes +---@field ray ? Ray2d +---@field max ? number +---@field direction_recip ? Vec2 + + +---@class AabbCast3d +--- An intersection test that casts an [`Aabb3d`] along a ray. +---@field ray ? RayCast3d +---@field aabb ? Aabb3d + + +---@class BoundingSphereCast +--- An intersection test that casts a [`BoundingSphere`] along a ray. +---@field ray ? RayCast3d +---@field sphere ? BoundingSphere + + +---@class RayCast3d +--- A raycast intersection test for 3D bounding volumes +---@field origin ? Vec3A +---@field direction ? Dir3A +---@field max ? number +---@field direction_recip ? Vec3A + + +---@class CompassOctant +--- A compass enum with 8 directions.--- ```text--- N (North)--- ▲--- NW │ NE--- ╲ │ ╱--- W (West) ┼─────► E (East)--- ╱ │ ╲--- SW │ SE--- ▼--- S (South)--- ``` + + +---@class CompassQuadrant +--- A compass enum with 4 directions.--- ```text--- N (North)--- ▲--- │--- │--- W (West) ┼─────► E (East)--- │--- │--- ▼--- S (South)--- ``` + + +---@class EaseFunction +--- Curve functions over the [unit interval], commonly used for easing transitions.--- --- `EaseFunction` can be used on its own to interpolate between `0.0` and `1.0`.--- It can also be combined with [`EasingCurve`] to interpolate between other--- intervals and types, including vectors and rotations.--- --- # Example--- --- [`sample`] the smoothstep function at various points. This will return `None`--- if the parameter is outside the unit interval.--- --- ```--- # use bevy_math::prelude::*;--- let f = EaseFunction::SmoothStep;--- --- assert_eq!(f.sample(-1.0), None);--- assert_eq!(f.sample(0.0), Some(0.0));--- assert_eq!(f.sample(0.5), Some(0.5));--- assert_eq!(f.sample(1.0), Some(1.0));--- assert_eq!(f.sample(2.0), None);--- ```--- --- [`sample_clamped`] will clamp the parameter to the unit interval, so it--- always returns a value.--- --- ```--- # use bevy_math::prelude::*;--- # let f = EaseFunction::SmoothStep;--- assert_eq!(f.sample_clamped(-1.0), 0.0);--- assert_eq!(f.sample_clamped(0.0), 0.0);--- assert_eq!(f.sample_clamped(0.5), 0.5);--- assert_eq!(f.sample_clamped(1.0), 1.0);--- assert_eq!(f.sample_clamped(2.0), 1.0);--- ```--- --- [`sample`]: EaseFunction::sample--- [`sample_clamped`]: EaseFunction::sample_clamped--- [unit interval]: `Interval::UNIT` + + +---@class JumpAt +--- Configuration options for the [`EaseFunction::Steps`] curves. This closely replicates the--- [CSS step function specification].--- --- [CSS step function specification]: https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#description + + +---@class Interval +--- A nonempty closed interval, possibly unbounded in either direction.--- --- In other words, the interval may stretch all the way to positive or negative infinity, but it--- will always have some nonempty interior. +---@field start ? number +---@field end ? number + + +---@class Dir2 +--- A normalized vector pointing in a direction in 2D space +---@field [1] ? Vec2 + + +---@class Dir3 +--- A normalized vector pointing in a direction in 3D space +---@field [1] ? Vec3 + + +---@class Dir3A +--- A normalized SIMD vector pointing in a direction in 3D space.--- --- This type stores a 16 byte aligned [`Vec3A`].--- This may or may not be faster than [`Dir3`]: make sure to benchmark! +---@field [1] ? Vec3A + + +---@class FloatOrd +--- A wrapper for floats that implements [`Ord`], [`Eq`], and [`Hash`] traits.--- --- This is a work around for the fact that the IEEE 754-2008 standard,--- implemented by Rust's [`f32`] type,--- doesn't define an ordering for [`NaN`](f32::NAN),--- and `NaN` is not considered equal to any other `NaN`.--- --- Wrapping a float with `FloatOrd` breaks conformance with the standard--- by sorting `NaN` as less than all other numbers and equal to any other `NaN`. +---@field [1] ? number + + +---@class Isometry2d +--- An isometry in two dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(2). This includes translation and rotation, but excludes reflection.--- --- For the three-dimensional version, see [`Isometry3d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_abs_diff_eq;--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- let point = Vec2::new(4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_eq!(result, Vec2::new(-2.0, 5.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- # let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- # let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- # let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let circle_iso = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let rectangle_iso = Isometry2d::from_rotation(Rot2::degrees(90.0));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = circle_iso.inverse() * rectangle_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = circle_iso.inverse_mul(rectangle_iso);--- ``` +---@field rotation ? Rot2 +---@field translation ? Vec2 + + +---@class Isometry3d +--- An isometry in three dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(3). This includes translation and rotation, but excludes reflection.--- --- For the two-dimensional version, see [`Isometry2d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- let point = Vec3::new(4.0, 4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_relative_eq!(result, Vec3::new(-2.0, 5.0, 7.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- # let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- # let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- # let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let sphere_iso = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let cuboid_iso = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = sphere_iso.inverse() * cuboid_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = sphere_iso.inverse_mul(cuboid_iso);--- ``` +---@field rotation ? Quat +---@field translation ? Vec3A + + +---@class Annulus +--- A primitive shape formed by the region between two circles, also known as a ring. +---@field inner_circle ? Circle +---@field outer_circle ? Circle + + +---@class Arc2d +--- A primitive representing an arc between two points on a circle.--- --- An arc has no area.--- If you want to include the portion of a circle's area swept out by the arc,--- use the pie-shaped [`CircularSector`].--- If you want to include only the space inside the convex hull of the arc,--- use the bowl-shaped [`CircularSegment`].--- --- The arc is drawn starting from [`Vec2::Y`], extending by `half_angle` radians on--- either side. The center of the circle is the origin [`Vec2::ZERO`]. Note that this--- means that the origin may not be within the `Arc2d`'s convex hull.--- --- **Warning:** Arcs with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- It is recommended to normalize arcs to have an angle in [0, 2π]. +---@field radius ? number +---@field half_angle ? number + + +---@class Capsule2d +--- A 2D capsule primitive, also known as a stadium or pill shape.--- --- A two-dimensional capsule is defined as a neighborhood of points at a distance (radius) from a line +---@field radius ? number +---@field half_length ? number + + +---@class Circle +--- A circle primitive, representing the set of points some distance from the origin +---@field radius ? number + + +---@class CircularSector +--- A primitive representing a circular sector: a pie slice of a circle.--- --- The segment is positioned so that it always includes [`Vec2::Y`] and is vertically symmetrical.--- To orient the sector differently, apply a rotation.--- The sector is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- --- **Warning:** Circular sectors with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular sectors to have an angle in [0, 2π]. +---@field arc ? Arc2d + + +---@class CircularSegment +--- A primitive representing a circular segment:--- the area enclosed by the arc of a circle and its chord (the line between its endpoints).--- --- The segment is drawn starting from [`Vec2::Y`], extending equally on either side.--- To orient the segment differently, apply a rotation.--- The segment is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- When positioning a segment, the [`apothem`](Self::apothem) function may be particularly useful.--- --- **Warning:** Circular segments with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular segments to have an angle in [0, 2π]. +---@field arc ? Arc2d + + +---@class Ellipse +--- An ellipse primitive, which is like a circle, but the width and height can be different +---@field half_size ? Vec2 + + +---@class Line2d +--- An infinite line going through the origin along a direction in 2D space.--- --- For a finite line: [`Segment2d`] +---@field direction ? Dir2 + + +---@class Plane2d +--- An unbounded plane in 2D space. It forms a separating surface through the origin,--- stretching infinitely far +---@field normal ? Dir2 + + +---@class Rectangle +--- A rectangle primitive, which is like a square, except that the width and height can be different +---@field half_size ? Vec2 + + +---@class RegularPolygon +--- A polygon centered on the origin where all vertices lie on a circle, equally far apart. +---@field circumcircle ? Circle +---@field sides ? integer + + +---@class Rhombus +--- A rhombus primitive, also known as a diamond shape.--- A four sided polygon, centered on the origin, where opposite sides are parallel but without--- requiring right angles. +---@field half_diagonals ? Vec2 + + +---@class Segment2d +--- A line segment defined by two endpoints in 2D space. +---@field vertices ? [glam::Vec2; 2] + + +---@class Triangle2d +--- A triangle in 2D space +---@field vertices ? [glam::Vec2; 3] + + +---@class Capsule3d +--- A 3D capsule primitive centered on the origin--- A three-dimensional capsule is defined as a surface at a distance (radius) from a line +---@field radius ? number +---@field half_length ? number + + +---@class Cone +--- A cone primitive centered on the midpoint between the tip of the cone and the center of its base.--- --- The cone is oriented with its tip pointing towards the Y axis. +---@field radius ? number +---@field height ? number + + +---@class ConicalFrustum +--- A conical frustum primitive.--- A conical frustum can be created--- by slicing off a section of a cone. +---@field radius_top ? number +---@field radius_bottom ? number +---@field height ? number + + +---@class Cuboid +--- A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not--- required to be the same. +---@field half_size ? Vec3 + + +---@class Cylinder +--- A cylinder primitive centered on the origin +---@field radius ? number +---@field half_height ? number + + +---@class InfinitePlane3d +--- An unbounded plane in 3D space. It forms a separating surface through the origin,--- stretching infinitely far +---@field normal ? Dir3 + + +---@class Line3d +--- An infinite line going through the origin along a direction in 3D space.--- --- For a finite line: [`Segment3d`] +---@field direction ? Dir3 + + +---@class Plane3d +--- A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width. +---@field normal ? Dir3 +---@field half_size ? Vec2 + + +---@class Segment3d +--- A line segment defined by two endpoints in 3D space. +---@field vertices ? [glam::Vec3; 2] + + +---@class Sphere +--- A sphere primitive, representing the set of all points some distance from the origin +---@field radius ? number + + +---@class Tetrahedron +--- A tetrahedron primitive. +---@field vertices ? [glam::Vec3; 4] + + +---@class Torus +--- A torus primitive, often representing a ring or donut shape--- The set of points some distance from a circle centered at the origin +---@field minor_radius ? number +---@field major_radius ? number + + +---@class Triangle3d +--- A 3D triangle primitive. +---@field vertices ? [glam::Vec3; 3] + + +---@class Ray2d +--- An infinite half-line starting at `origin` and going in `direction` in 2D space. +---@field origin ? Vec2 +---@field direction ? Dir2 + + +---@class Ray3d +--- An infinite half-line starting at `origin` and going in `direction` in 3D space. +---@field origin ? Vec3 +---@field direction ? Dir3 + + +---@class IRect +--- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `IRect::min` and `IRect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@field min ? IVec2 +---@field max ? IVec2 + + +---@class Rect +--- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `Rect::min` and `Rect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@field min ? Vec2 +---@field max ? Vec2 + + +---@class URect +--- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `URect::min` and `URect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@field min ? UVec2 +---@field max ? UVec2 + + +---@class Rot2 +--- A counterclockwise 2D rotation.--- --- # Example--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Rot2, Vec2};--- use std::f32::consts::PI;--- --- // Create rotations from radians or degrees--- let rotation1 = Rot2::radians(PI / 2.0);--- let rotation2 = Rot2::degrees(45.0);--- --- // Get the angle back as radians or degrees--- assert_eq!(rotation1.as_degrees(), 90.0);--- assert_eq!(rotation2.as_radians(), PI / 4.0);--- --- // "Add" rotations together using `*`--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * rotation2, Rot2::degrees(135.0));--- --- // Rotate vectors--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * Vec2::X, Vec2::Y);--- ``` +---@field cos ? number +---@field sin ? number + + +---@class Instant + + + +---@class Fixed +--- The fixed timestep game clock following virtual time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Virtual). The fixed clock is automatically set as the--- generic [`Time`] resource during [`FixedUpdate`](bevy_app::FixedUpdate)--- schedule processing.--- --- The fixed timestep clock advances in fixed-size increments, which is--- extremely useful for writing logic (like physics) that should have--- consistent behavior, regardless of framerate.--- --- The default [`timestep()`](Time::timestep) is 64 hertz, or 15625--- microseconds. This value was chosen because using 60 hertz has the potential--- for a pathological interaction with the monitor refresh rate where the game--- alternates between running two fixed timesteps and zero fixed timesteps per--- frame (for example when running two fixed timesteps takes longer than a--- frame). Additionally, the value is a power of two which losslessly converts--- into [`f32`] and [`f64`].--- --- To run a system on a fixed timestep, add it to one of the [`FixedMain`]--- schedules, most commonly [`FixedUpdate`](bevy_app::FixedUpdate).--- --- This schedule is run a number of times between--- [`PreUpdate`](bevy_app::PreUpdate) and [`Update`](bevy_app::Update)--- according to the accumulated [`overstep()`](Time::overstep) time divided by--- the [`timestep()`](Time::timestep). This means the schedule may run 0, 1 or--- more times during a single update (which typically corresponds to a rendered--- frame).--- --- `Time` and the generic [`Time`] resource will report a--- [`delta()`](Time::delta) equal to [`timestep()`](Time::timestep) and always--- grow [`elapsed()`](Time::elapsed) by one [`timestep()`](Time::timestep) per--- iteration.--- --- The fixed timestep clock follows the [`Time`](Virtual) clock, which--- means it is affected by [`pause()`](Time::pause),--- [`set_relative_speed()`](Time::set_relative_speed) and--- [`set_max_delta()`](Time::set_max_delta) from virtual time. If the virtual--- clock is paused, the [`FixedUpdate`](bevy_app::FixedUpdate) schedule will--- not run. It is guaranteed that the [`elapsed()`](Time::elapsed) time in--- `Time` is always between the previous `elapsed()` and the current--- `elapsed()` value in `Time`, so the values are compatible.--- --- Changing the timestep size while the game is running should not normally be--- done, as having a regular interval is the point of this schedule, but it may--- be necessary for effects like "bullet-time" if the normal granularity of the--- fixed timestep is too big for the slowed down time. In this case,--- [`set_timestep()`](Time::set_timestep) and be called to set a new value. The--- new value will be used immediately for the next run of the--- [`FixedUpdate`](bevy_app::FixedUpdate) schedule, meaning that it will affect--- the [`delta()`](Time::delta) value for the very next--- [`FixedUpdate`](bevy_app::FixedUpdate), even if it is still during the same--- frame. Any [`overstep()`](Time::overstep) present in the accumulator will be--- processed according to the new [`timestep()`](Time::timestep) value. +---@field timestep ? Duration +---@field overstep ? Duration + + +---@class Real +--- Real time clock representing elapsed wall clock time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated with time instants according--- to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).[^disclaimer]--- --- Note:--- Using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration)--- allows for mocking the wall clock for testing purposes.--- Besides this use case, it is not recommended to do this, as it will no longer--- represent "wall clock" time as intended.--- --- The [`delta()`](Time::delta) and [`elapsed()`](Time::elapsed) values of this--- clock should be used for anything which deals specifically with real time--- (wall clock time). It will not be affected by relative game speed--- adjustments, pausing or other adjustments.[^disclaimer]--- --- The clock does not count time from [`startup()`](Time::startup) to--- [`first_update()`](Time::first_update()) into elapsed, but instead will--- start counting time from the first update call. [`delta()`](Time::delta) and--- [`elapsed()`](Time::elapsed) will report zero on the first update as there--- is no previous update instant. This means that a [`delta()`](Time::delta) of--- zero must be handled without errors in application logic, as it may--- theoretically also happen at other times.--- --- [`Instant`]s for [`startup()`](Time::startup),--- [`first_update()`](Time::first_update) and--- [`last_update()`](Time::last_update) are recorded and accessible.--- --- [^disclaimer]: When using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration),--- [`Time#impl-Time`] is only a *mock* of wall clock time.--- +---@field startup ? Instant +---@field first_update ? Option +---@field last_update ? Option + + +---@class Stopwatch +--- A Stopwatch is a struct that tracks elapsed time when started.--- --- Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called.--- # Examples--- --- ```--- # use bevy_time::*;--- use std::time::Duration;--- let mut stopwatch = Stopwatch::new();--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- --- stopwatch.tick(Duration::from_secs_f32(1.0)); // tick one second--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.pause();--- stopwatch.tick(Duration::from_secs_f32(1.0)); // paused stopwatches don't tick--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.reset(); // reset the stopwatch--- assert!(stopwatch.is_paused());--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- ``` +---@field elapsed ? Duration +---@field is_paused ? boolean + + +---@class Timer +--- Tracks elapsed time. Enters the finished state once `duration` is reached.--- --- Non repeating timers will stop tracking and stay in the finished state until reset.--- Repeating timers will only be in the finished state on each tick `duration` is reached or--- exceeded, and can still be reset at any given point.--- --- Paused timers will not have elapsed time increased.--- --- Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called. +---@field stopwatch ? Stopwatch +---@field duration ? Duration +---@field mode ? TimerMode +---@field finished ? boolean +---@field times_finished_this_tick ? integer + + +---@class TimerMode +--- Specifies [`Timer`] behavior. + + +---@class Virtual +--- The virtual game clock representing game time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- Normally used as `Time`. It is automatically inserted as a resource--- by [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Real). The virtual clock is automatically set as the default--- generic [`Time`] resource for the update.--- --- The virtual clock differs from real time clock in that it can be paused, sped up--- and slowed down. It also limits how much it can advance in a single update--- in order to prevent unexpected behavior in cases where updates do not happen--- at regular intervals (e.g. coming back after the program was suspended a long time).--- --- The virtual clock can be paused by calling [`pause()`](Time::pause) and--- unpaused by calling [`unpause()`](Time::unpause). When the game clock is--- paused [`delta()`](Time::delta) will be zero on each update, and--- [`elapsed()`](Time::elapsed) will not grow.--- [`effective_speed()`](Time::effective_speed) will return `0.0`. Calling--- [`pause()`](Time::pause) will not affect value the [`delta()`](Time::delta)--- value for the update currently being processed.--- --- The speed of the virtual clock can be changed by calling--- [`set_relative_speed()`](Time::set_relative_speed). A value of `2.0` means--- that virtual clock should advance twice as fast as real time, meaning that--- [`delta()`](Time::delta) values will be double of what--- [`Time::delta()`](Time::delta) reports and--- [`elapsed()`](Time::elapsed) will go twice as fast as--- [`Time::elapsed()`](Time::elapsed). Calling--- [`set_relative_speed()`](Time::set_relative_speed) will not affect the--- [`delta()`](Time::delta) value for the update currently being processed.--- --- The maximum amount of delta time that can be added by a single update can be--- set by [`set_max_delta()`](Time::set_max_delta). This value serves a dual--- purpose in the virtual clock.--- --- If the game temporarily freezes due to any reason, such as disk access, a--- blocking system call, or operating system level suspend, reporting the full--- elapsed delta time is likely to cause bugs in game logic. Usually if a--- laptop is suspended for an hour, it doesn't make sense to try to simulate--- the game logic for the elapsed hour when resuming. Instead it is better to--- lose the extra time and pretend a shorter duration of time passed. Setting--- [`max_delta()`](Time::max_delta) to a relatively short time means that the--- impact on game logic will be minimal.--- --- If the game lags for some reason, meaning that it will take a longer time to--- compute a frame than the real time that passes during the computation, then--- we would fall behind in processing virtual time. If this situation persists,--- and computing a frame takes longer depending on how much virtual time has--- passed, the game would enter a "death spiral" where computing each frame--- takes longer and longer and the game will appear to freeze. By limiting the--- maximum time that can be added at once, we also limit the amount of virtual--- time the game needs to compute for each frame. This means that the game will--- run slow, and it will run slower than real time, but it will not freeze and--- it will recover as soon as computation becomes fast again.--- --- You should set [`max_delta()`](Time::max_delta) to a value that is--- approximately the minimum FPS your game should have even if heavily lagged--- for a moment. The actual FPS when lagged will be somewhat lower than this,--- depending on how much more time it takes to compute a frame compared to real--- time. You should also consider how stable your FPS is, as the limit will--- also dictate how big of an FPS drop you can accept without losing time and--- falling behind real time. +---@field max_delta ? Duration +---@field paused ? boolean +---@field relative_speed ? number +---@field effective_speed ? number + + +---@class GlobalTransform +--- [`GlobalTransform`] is an affine transformation from entity-local coordinates to worldspace coordinates.--- --- You cannot directly mutate [`GlobalTransform`]; instead, you change an entity's transform by manipulating--- its [`Transform`], which indirectly causes Bevy to update its [`GlobalTransform`].--- --- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * For transform hierarchies to work correctly, you must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] transforms an entity relative to its parent's reference frame, or relative to world space coordinates,--- if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is managed by Bevy; it is computed by successively applying the [`Transform`] of each ancestor--- entity which has a Transform. This is done automatically by Bevy-internal systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity in this schedule or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs +---@field [1] ? Affine3A + + +---@class Transform +--- Describe the position of an entity. If the entity has a parent, the position is relative--- to its parent position.--- --- * To place or move an entity, you should set its [`Transform`].--- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * To be displayed, an entity must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] is the position of an entity relative to its parent position, or the reference--- frame if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is the position of an entity relative to the reference frame.--- --- [`GlobalTransform`] is updated from [`Transform`] by systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity during this set or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs +---@field translation ? Vec3 +---@field rotation ? Quat +---@field scale ? Vec3 + + +---@class TransformTreeChanged +--- An optimization for transform propagation. This ZST marker component uses change detection to--- mark all entities of the hierarchy as "dirty" if any of their descendants have a changed--- `Transform`. If this component is *not* marked `is_changed()`, propagation will halt. + + +---@class TypeId + + + +---@class SocketAddr + + + +---@class RangeFull + + + +---@class AtomicBool + + + +---@class AtomicI16 + + + +---@class AtomicI32 + + + +---@class AtomicI64 + + + +---@class AtomicI8 + + + +---@class AtomicIsize + + + +---@class AtomicU16 + + + +---@class AtomicU32 + + + +---@class AtomicU64 + + + +---@class AtomicU8 + + + +---@class AtomicUsize + + + +---@class Duration + + + +---@class Affine2 + +---@field matrix2 ? Mat2 +---@field translation ? Vec2 + + +---@class Affine3A + +---@field matrix3 ? Mat3A +---@field translation ? Vec3A + + +---@class BVec2 + +---@field x ? boolean +---@field y ? boolean + + +---@class BVec3 + +---@field x ? boolean +---@field y ? boolean +---@field z ? boolean + + +---@class BVec3A + + + +---@class BVec4 + +---@field x ? boolean +---@field y ? boolean +---@field z ? boolean +---@field w ? boolean + + +---@class BVec4A + + + +---@class DAffine2 + +---@field matrix2 ? DMat2 +---@field translation ? DVec2 + + +---@class DAffine3 + +---@field matrix3 ? DMat3 +---@field translation ? DVec3 + + +---@class DMat2 + +---@field x_axis ? DVec2 +---@field y_axis ? DVec2 + + +---@class DMat3 + +---@field x_axis ? DVec3 +---@field y_axis ? DVec3 +---@field z_axis ? DVec3 + + +---@class DMat4 + +---@field x_axis ? DVec4 +---@field y_axis ? DVec4 +---@field z_axis ? DVec4 +---@field w_axis ? DVec4 + + +---@class DQuat + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number + + +---@class DVec2 + +---@field x ? number +---@field y ? number + + +---@class DVec3 + +---@field x ? number +---@field y ? number +---@field z ? number + + +---@class DVec4 + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number + + +---@class EulerRot + + + +---@class I16Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class I16Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class I16Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class I64Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class I64Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class I64Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class I8Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class I8Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class I8Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class IVec2 + +---@field x ? integer +---@field y ? integer + + +---@class IVec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class IVec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class Mat2 + +---@field x_axis ? Vec2 +---@field y_axis ? Vec2 + + +---@class Mat3 + +---@field x_axis ? Vec3 +---@field y_axis ? Vec3 +---@field z_axis ? Vec3 + + +---@class Mat3A + +---@field x_axis ? Vec3A +---@field y_axis ? Vec3A +---@field z_axis ? Vec3A + + +---@class Mat4 + +---@field x_axis ? Vec4 +---@field y_axis ? Vec4 +---@field z_axis ? Vec4 +---@field w_axis ? Vec4 + + +---@class Quat + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number + + +---@class U16Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class U16Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class U16Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class U64Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class U64Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class U64Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class U8Vec2 + +---@field x ? integer +---@field y ? integer + + +---@class U8Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class U8Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class UVec2 + +---@field x ? integer +---@field y ? integer + + +---@class UVec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer + + +---@class UVec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer + + +---@class Vec2 + +---@field x ? number +---@field y ? number + + +---@class Vec3 + +---@field x ? number +---@field y ? number +---@field z ? number + + +---@class Vec3A + +---@field x ? number +---@field y ? number +---@field z ? number + + +---@class Vec4 + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number + + +---@class SmolStr + + + +---@class Uuid + + + +---@class AssetIndex +--- A generational runtime-only identifier for a specific [`Asset`] stored in [`Assets`]. This is optimized for efficient runtime--- usage and is not suitable for identifying assets across app runs. +---@field generation ? integer +---@field index ? integer + + +---@class AssetPath +--- Represents a path to an asset in a "virtual filesystem".--- --- Asset paths consist of three main parts:--- * [`AssetPath::source`]: The name of the [`AssetSource`](crate::io::AssetSource) to load the asset from.--- This is optional. If one is not set the default source will be used (which is the `assets` folder by default).--- * [`AssetPath::path`]: The "virtual filesystem path" pointing to an asset source file.--- * [`AssetPath::label`]: An optional "named sub asset". When assets are loaded, they are--- allowed to load "sub assets" of any type, which are identified by a named "label".--- --- Asset paths are generally constructed (and visualized) as strings:--- --- ```no_run--- # use bevy_asset::{Asset, AssetServer, Handle};--- # use bevy_reflect::TypePath;--- #--- # #[derive(Asset, TypePath, Default)]--- # struct Mesh;--- #--- # #[derive(Asset, TypePath, Default)]--- # struct Scene;--- #--- # let asset_server: AssetServer = panic!();--- // This loads the `my_scene.scn` base asset from the default asset source.--- let scene: Handle = asset_server.load("my_scene.scn");--- --- // This loads the `PlayerMesh` labeled asset from the `my_scene.scn` base asset in the default asset source.--- let mesh: Handle = asset_server.load("my_scene.scn#PlayerMesh");--- --- // This loads the `my_scene.scn` base asset from a custom 'remote' asset source.--- let scene: Handle = asset_server.load("remote://my_scene.scn");--- ```--- --- [`AssetPath`] implements [`From`] for `&'static str`, `&'static Path`, and `&'a String`,--- which allows us to optimize the static cases.--- This means that the common case of `asset_server.load("my_scene.scn")` when it creates and--- clones internal owned [`AssetPaths`](AssetPath).--- This also means that you should use [`AssetPath::parse`] in cases where `&str` is the explicit type. + + +---@class RenderAssetUsages +--- Defines where the asset will be used.--- --- If an asset is set to the `RENDER_WORLD` but not the `MAIN_WORLD`, the asset will be--- unloaded from the asset server once it's been extracted and prepared in the render world.--- --- Unloading the asset saves on memory, as for most cases it is no longer necessary to keep--- it in RAM once it's been uploaded to the GPU's VRAM. However, this means you can no longer--- access the asset from the CPU (via the `Assets` resource) once unloaded (without re-loading it).--- --- If you never need access to the asset from the CPU past the first frame it's loaded on,--- or only need very infrequent access, then set this to `RENDER_WORLD`. Otherwise, set this to--- `RENDER_WORLD | MAIN_WORLD`.--- --- If you have an asset that doesn't actually need to end up in the render world, like an Image--- that will be decoded into another Image asset, use `MAIN_WORLD` only.--- --- ## Platform-specific--- --- On Wasm, it is not possible for now to free reserved memory. To control memory usage, load assets--- in sequence and unload one before loading the next. See this--- [discussion about memory management](https://github.com/WebAssembly/design/issues/1397) for more--- details. + + +---@class DeferredPrepass +--- If added to a [`crate::prelude::Camera3d`] then deferred materials will be rendered to the deferred gbuffer texture and will be available to subsequent passes.--- Note the default deferred lighting plugin also requires `DepthPrepass` to work correctly. + + +---@class SystemIdMarker +--- Marker [`Component`](bevy_ecs::component::Component) for identifying [`SystemId`] [`Entity`]s. + + +---@class OnAdd +--- Trigger emitted when a component is inserted onto an entity that does not already have that--- component. Runs before `OnInsert`.--- See [`crate::component::ComponentHooks::on_add`] for more information. + + +---@class OnDespawn +--- Trigger emitted for each component on an entity when it is despawned.--- See [`crate::component::ComponentHooks::on_despawn`] for more information. + + +---@class OnInsert +--- Trigger emitted when a component is inserted, regardless of whether or not the entity already--- had that component. Runs after `OnAdd`, if it ran.--- See [`crate::component::ComponentHooks::on_insert`] for more information. + + +---@class OnRemove +--- Trigger emitted when a component is removed from an entity, and runs before the component is--- removed, so you can still access the component data.--- See [`crate::component::ComponentHooks::on_remove`] for more information. + + +---@class OnReplace +--- Trigger emitted when a component is inserted onto an entity that already has that component.--- Runs before the value is replaced, so you can still access the original component data.--- See [`crate::component::ComponentHooks::on_replace`] for more information. + + +---@class Image + + + +---@class TextureAtlas +--- An index into a [`TextureAtlasLayout`], which corresponds to a specific section of a texture.--- --- It stores a handle to [`TextureAtlasLayout`] and the index of the current section of the atlas.--- The texture atlas contains various *sections* of a given texture, allowing users to have a single--- image file for either sprite animation or global mapping.--- You can change the texture [`index`](Self::index) of the atlas to animate the sprite or display only a *section* of the texture--- for efficient rendering of related game objects.--- --- Check the following examples for usage:--- - [`animated sprite sheet example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs)--- - [`sprite animation event example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs)--- - [`texture atlas example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) +---@field layout ? Handle +---@field index ? integer + + +---@class TextureAtlasLayout +--- Stores a map used to lookup the position of a texture in a [`TextureAtlas`].--- This can be used to either use and look up a specific section of a texture, or animate frame-by-frame as a sprite sheet.--- --- Optionally it can store a mapping from sub texture handles to the related area index (see--- [`TextureAtlasBuilder`]).--- --- [Example usage animating sprite.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs)--- [Example usage animating sprite in response to an event.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs)--- [Example usage loading sprite sheet.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs)--- --- [`TextureAtlasBuilder`]: crate::TextureAtlasBuilder +---@field size ? UVec2 +---@field textures ? Vec + + +---@class Affine3 +--- Reduced-size version of `glam::Affine3A` for use when storage has--- significant performance impact. Convert to `glam::Affine3A` to do--- non-trivial calculations. +---@field matrix3 ? Mat3 +---@field translation ? Vec3 + + +---@class Indices +--- An array of indices into the [`VertexAttributeValues`](super::VertexAttributeValues) for a mesh.--- --- It describes the order in which the vertex attributes should be joined into faces. + + +---@class Mesh +--- A 3D object made out of vertices representing triangles, lines, or points,--- with "attribute" values for each vertex.--- --- Meshes can be automatically generated by a bevy `AssetLoader` (generally by loading a `Gltf` file),--- or by converting a [primitive](bevy_math::primitives) using [`into`](Into).--- It is also possible to create one manually. They can be edited after creation.--- --- Meshes can be rendered with a `Mesh2d` and `MeshMaterial2d`--- or `Mesh3d` and `MeshMaterial3d` for 2D and 3D respectively.--- --- A [`Mesh`] in Bevy is equivalent to a "primitive" in the glTF format, for a--- glTF Mesh representation, see `GltfMesh`.--- --- ## Manual creation--- --- The following function will construct a flat mesh, to be rendered with a--- `StandardMaterial` or `ColorMaterial`:--- --- ```--- # use bevy_mesh::{Mesh, Indices, PrimitiveTopology};--- # use bevy_asset::RenderAssetUsages;--- fn create_simple_parallelogram() -> Mesh {--- // Create a new mesh using a triangle list topology, where each set of 3 vertices composes a triangle.--- Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsages::default())--- // Add 4 vertices, each with its own position attribute (coordinate in--- // 3D space), for each of the corners of the parallelogram.--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_POSITION,--- vec![[0.0, 0.0, 0.0], [1.0, 2.0, 0.0], [2.0, 2.0, 0.0], [1.0, 0.0, 0.0]]--- )--- // Assign a UV coordinate to each vertex.--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_UV_0,--- vec![[0.0, 1.0], [0.5, 0.0], [1.0, 0.0], [0.5, 1.0]]--- )--- // Assign normals (everything points outwards)--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_NORMAL,--- vec![[0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0]]--- )--- // After defining all the vertices and their attributes, build each triangle using the--- // indices of the vertices that make it up in a counter-clockwise order.--- .with_inserted_indices(Indices::U32(vec![--- // First triangle--- 0, 3, 1,--- // Second triangle--- 1, 3, 2--- ]))--- }--- ```--- --- You can see how it looks like [here](https://github.com/bevyengine/bevy/blob/main/assets/docs/Mesh.png),--- used in a `Mesh3d` with a square bevy logo texture, with added axis, points,--- lines and text for clarity.--- --- ## Other examples--- --- For further visualization, explanation, and examples, see the built-in Bevy examples,--- and the [implementation of the built-in shapes](https://github.com/bevyengine/bevy/tree/main/crates/bevy_mesh/src/primitives).--- In particular, [generate_custom_mesh](https://github.com/bevyengine/bevy/blob/main/examples/3d/generate_custom_mesh.rs)--- teaches you to access and modify the attributes of a [`Mesh`] after creating it.--- --- ## Common points of confusion--- --- - UV maps in Bevy start at the top-left, see [`ATTRIBUTE_UV_0`](Mesh::ATTRIBUTE_UV_0),--- other APIs can have other conventions, `OpenGL` starts at bottom-left.--- - It is possible and sometimes useful for multiple vertices to have the same--- [position attribute](Mesh::ATTRIBUTE_POSITION) value,--- it's a common technique in 3D modeling for complex UV mapping or other calculations.--- - Bevy performs frustum culling based on the `Aabb` of meshes, which is calculated--- and added automatically for new meshes only. If a mesh is modified, the entity's `Aabb`--- needs to be updated manually or deleted so that it is re-calculated.--- --- ## Use with `StandardMaterial`--- --- To render correctly with `StandardMaterial`, a mesh needs to have properly defined:--- - [`UVs`](Mesh::ATTRIBUTE_UV_0): Bevy needs to know how to map a texture onto the mesh--- (also true for `ColorMaterial`).--- - [`Normals`](Mesh::ATTRIBUTE_NORMAL): Bevy needs to know how light interacts with your mesh.--- [0.0, 0.0, 1.0] is very common for simple flat meshes on the XY plane,--- because simple meshes are smooth and they don't require complex light calculations.--- - Vertex winding order: by default, `StandardMaterial.cull_mode` is `Some(Face::Back)`,--- which means that Bevy would *only* render the "front" of each triangle, which--- is the side of the triangle from where the vertices appear in a *counter-clockwise* order. +---@field indices ? Option +---@field morph_targets ? Option +---@field morph_target_names ? Option +---@field asset_usage ? RenderAssetUsages + + +---@class MeshMorphWeights +--- Control a specific [`Mesh`] instance's [morph targets]. These control the weights of--- specific "mesh primitives" in scene formats like GLTF. They can be set manually, but--- in most cases they should "automatically" synced by setting the [`MorphWeights`] component--- on a parent entity.--- --- See [`MorphWeights`] for more details on Bevy's morph target implementation.--- --- Add this to an [`Entity`] with a `Mesh3d` with a [`MorphAttributes`] set--- to control individual weights of each morph target.--- --- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation +---@field weights ? Vec + + +---@class MorphWeights +--- Controls the [morph targets] for all child `Mesh3d` entities. In most cases, [`MorphWeights`] should be considered--- the "source of truth" when writing morph targets for meshes. However you can choose to write child [`MeshMorphWeights`]--- if your situation requires more granularity. Just note that if you set [`MorphWeights`], it will overwrite child--- [`MeshMorphWeights`] values.--- --- This exists because Bevy's [`Mesh`] corresponds to a _single_ surface / material, whereas morph targets--- as defined in the GLTF spec exist on "multi-primitive meshes" (where each primitive is its own surface with its own material).--- Therefore in Bevy [`MorphWeights`] an a parent entity are the "canonical weights" from a GLTF perspective, which then--- synchronized to child `Mesh3d` / [`MeshMorphWeights`] (which correspond to "primitives" / "surfaces" from a GLTF perspective).--- --- Add this to the parent of one or more [`Entities`](`Entity`) with a `Mesh3d` with a [`MeshMorphWeights`].--- --- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation +---@field weights ? Vec +---@field first_mesh ? Option + + +---@class AnnulusMeshBuilder +--- A builder for creating a [`Mesh`] with an [`Annulus`] shape. +---@field annulus ? Annulus +---@field resolution ? integer + + +---@class Capsule2dMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Capsule2d`] shape. +---@field capsule ? Capsule2d +---@field resolution ? integer + + +---@class CircleMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Circle`] shape. +---@field circle ? Circle +---@field resolution ? integer + + +---@class CircularMeshUvMode +--- Specifies how to generate UV-mappings for the [`CircularSector`] and [`CircularSegment`] shapes.--- --- Currently the only variant is `Mask`, which is good for showing a portion of a texture that includes--- the entire circle, particularly the same texture will be displayed with different fractions of a--- complete circle.--- --- It's expected that more will be added in the future, such as a variant that causes the texture to be--- scaled to fit the bounding box of the shape, which would be good for packed textures only including the--- portion of the circle that is needed to display. + + +---@class CircularSectorMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`CircularSector`] shape.--- --- The resulting mesh will have a UV-map such that the center of the circle is--- at the center of the texture. +---@field sector ? CircularSector +---@field resolution ? integer +---@field uv_mode ? CircularMeshUvMode + + +---@class CircularSegmentMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`CircularSegment`] shape.--- --- The resulting mesh will have a UV-map such that the center of the circle is--- at the center of the texture. +---@field segment ? CircularSegment +---@field resolution ? integer +---@field uv_mode ? CircularMeshUvMode + + +---@class EllipseMeshBuilder +--- A builder used for creating a [`Mesh`] with an [`Ellipse`] shape. +---@field ellipse ? Ellipse +---@field resolution ? integer + + +---@class RectangleMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Rectangle`] shape. +---@field half_size ? Vec2 + + +---@class RegularPolygonMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`RegularPolygon`] shape. +---@field circumradius ? number +---@field sides ? integer + + +---@class RhombusMeshBuilder +--- A builder for creating a [`Mesh`] with an [`Rhombus`] shape. +---@field half_diagonals ? Vec2 + + +---@class Triangle2dMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Triangle2d`] shape. +---@field triangle ? Triangle2d + + +---@class Capsule3dMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Capsule3d`] shape. +---@field capsule ? Capsule3d +---@field rings ? integer +---@field longitudes ? integer +---@field latitudes ? integer +---@field uv_profile ? CapsuleUvProfile + + +---@class CapsuleUvProfile +--- Manner in which UV coordinates are distributed vertically. + + +---@class ConeAnchor +--- Anchoring options for [`ConeMeshBuilder`] + + +---@class ConeMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Cone`] shape. +---@field cone ? Cone +---@field resolution ? integer +---@field anchor ? ConeAnchor + + +---@class ConicalFrustumMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`ConicalFrustum`] shape. +---@field frustum ? ConicalFrustum +---@field resolution ? integer +---@field segments ? integer + + +---@class CuboidMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Cuboid`] shape. +---@field half_size ? Vec3 + + +---@class CylinderAnchor +--- Anchoring options for [`CylinderMeshBuilder`] + + +---@class CylinderMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Cylinder`] shape. +---@field cylinder ? Cylinder +---@field resolution ? integer +---@field segments ? integer +---@field caps ? boolean +---@field anchor ? CylinderAnchor + + +---@class PlaneMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Plane3d`] shape. +---@field plane ? Plane3d +---@field subdivisions ? integer + + +---@class SphereKind +--- A type of sphere mesh. + + +---@class SphereMeshBuilder +--- A builder used for creating a [`Mesh`] with an [`Sphere`] shape. +---@field sphere ? Sphere +---@field kind ? SphereKind + + +---@class TetrahedronMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Tetrahedron`] shape. +---@field tetrahedron ? Tetrahedron + + +---@class TorusMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Torus`] shape. +---@field torus ? Torus +---@field minor_resolution ? integer +---@field major_resolution ? integer +---@field angle_range ? RangeInclusive + + +---@class Triangle3dMeshBuilder +--- A builder used for creating a [`Mesh`] with a [`Triangle3d`] shape. +---@field triangle ? Triangle3d + + +---@class SkinnedMesh + +---@field inverse_bindposes ? bevy_asset::handle::Handle +---@field joints ? Vec + + +---@class ScriptAsset +--- Represents a script loaded into memory as an asset + + +---@class FunctionArgInfo +--- Information about a function argument. +---@field name ? Option +---@field arg_index ? integer +---@field type_id ? TypeId + + +---@class FunctionInfo +--- Information about a function. +---@field name ? Cow +---@field namespace ? Namespace +---@field arg_info ? Vec +---@field return_info ? FunctionReturnInfo +---@field docs ? Option + + +---@class FunctionReturnInfo +--- Information about a function return value. +---@field type_id ? TypeId + + +---@class InteropError +--- An error occurring when converting between rust and a script context. + + +---@class Namespace +--- A namespace for functions + + +---@class DynamicComponent +--- A dynamic script component +---@field data ? ScriptValue + + +---@class ScriptValue +--- An abstraction of values that can be passed to and from scripts.--- This allows us to re-use logic between scripting languages. + + +---@class AlphaMode +--- Sets how a material's base color alpha channel is used for transparency. + + +---@class Camera +--- The defining [`Component`] for camera entities,--- storing information about how and what to render through this camera.--- --- The [`Camera`] component is added to an entity to define the properties of the viewpoint from--- which rendering occurs. It defines the position of the view to render, the projection method--- to transform the 3D objects into a 2D image, as well as the render target into which that image--- is produced.--- --- Note that a [`Camera`] needs a [`CameraRenderGraph`] to render anything.--- This is typically provided by adding a [`Camera2d`] or [`Camera3d`] component,--- but custom render graphs can also be defined. Inserting a [`Camera`] with no render--- graph will emit an error at runtime.--- --- [`Camera2d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_2d/struct.Camera2d.html--- [`Camera3d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_3d/struct.Camera3d.html +---@field viewport ? Option +---@field order ? integer +---@field is_active ? boolean +---@field target ? RenderTarget +---@field hdr ? boolean +---@field msaa_writeback ? boolean +---@field clear_color ? ClearColorConfig +---@field sub_camera_view ? Option + + +---@class CameraMainTextureUsages +--- This component lets you control the [`TextureUsages`] field of the main texture generated for the camera + + +---@class CameraRenderGraph +--- Configures the [`RenderGraph`](crate::render_graph::RenderGraph) name assigned to be run for a given [`Camera`] entity. + + +---@class Exposure +--- How much energy a `Camera3d` absorbs from incoming light.--- --- + + +---@class ImageRenderTarget +--- A render target that renders to an [`Image`]. +---@field handle ? Handle +---@field scale_factor ? FloatOrd + + +---@class MipBias +--- Camera component specifying a mip bias to apply when sampling from material textures.--- --- Often used in conjunction with antialiasing post-process effects to reduce textures blurriness. +---@field [1] ? number + + +---@class RenderTarget +--- The "target" that a [`Camera`] will render to. For example, this could be a [`Window`]--- swapchain or an [`Image`]. + + +---@class SubCameraView +--- Settings to define a camera sub view.--- --- When [`Camera::sub_camera_view`] is `Some`, only the sub-section of the--- image defined by `size` and `offset` (relative to the `full_size` of the--- whole image) is projected to the cameras viewport.--- --- Take the example of the following multi-monitor setup:--- ```css--- ┌───┬───┐--- │ A │ B │--- ├───┼───┤--- │ C │ D │--- └───┴───┘--- ```--- If each monitor is 1920x1080, the whole image will have a resolution of--- 3840x2160. For each monitor we can use a single camera with a viewport of--- the same size as the monitor it corresponds to. To ensure that the image is--- cohesive, we can use a different sub view on each camera:--- - Camera A: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,0--- - Camera B: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 1920,0--- - Camera C: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,1080--- - Camera D: `full_size` = 3840x2160, `size` = 1920x1080, `offset` =--- 1920,1080--- --- However since only the ratio between the values is important, they could all--- be divided by 120 and still produce the same image. Camera D would for--- example have the following values:--- `full_size` = 32x18, `size` = 16x9, `offset` = 16,9 +---@field full_size ? UVec2 +---@field offset ? Vec2 +---@field size ? UVec2 + + +---@class TemporalJitter +--- A subpixel offset to jitter a perspective camera's frustum by.--- --- Useful for temporal rendering techniques.--- --- Do not use with [`OrthographicProjection`].--- --- [`OrthographicProjection`]: crate::camera::OrthographicProjection +---@field offset ? Vec2 + + +---@class Viewport +--- Render viewport configuration for the [`Camera`] component.--- --- The viewport defines the area on the render target to which the camera renders its image.--- You can overlay multiple cameras in a single window using viewports to create effects like--- split screen, minimaps, and character viewers. +---@field physical_position ? UVec2 +---@field physical_size ? UVec2 +---@field depth ? Range + + +---@class ClearColor +--- A [`Resource`] that stores the color that is used to clear the screen between frames.--- --- This color appears as the "background" color for simple apps,--- when there are portions of the screen with nothing rendered. +---@field [1] ? Color + + +---@class ClearColorConfig +--- For a camera, specifies the color used to clear the viewport before rendering. + + +---@class ManualTextureViewHandle +--- A unique id that corresponds to a specific [`ManualTextureView`] in the [`ManualTextureViews`] collection. +---@field [1] ? integer + + +---@class CustomProjection +--- Holds a dynamic [`CameraProjection`] trait object. Use [`Projection::custom()`] to construct a--- custom projection.--- --- The contained dynamic object can be downcast into a static type using [`CustomProjection::get`]. + + +---@class OrthographicProjection +--- Project a 3D space onto a 2D surface using parallel lines, i.e., unlike [`PerspectiveProjection`],--- the size of objects remains the same regardless of their distance to the camera.--- --- The volume contained in the projection is called the *view frustum*. Since the viewport is rectangular--- and projection lines are parallel, the view frustum takes the shape of a cuboid.--- --- Note that the scale of the projection and the apparent size of objects are inversely proportional.--- As the size of the projection increases, the size of objects decreases.--- --- # Examples--- --- Configure the orthographic projection to one world unit per 100 window pixels:--- --- ```--- # use bevy_render::camera::{OrthographicProjection, Projection, ScalingMode};--- let projection = Projection::Orthographic(OrthographicProjection {--- scaling_mode: ScalingMode::WindowSize,--- scale: 0.01,--- ..OrthographicProjection::default_2d()--- });--- ``` +---@field near ? number +---@field far ? number +---@field viewport_origin ? Vec2 +---@field scaling_mode ? ScalingMode +---@field scale ? number +---@field area ? Rect + + +---@class PerspectiveProjection +--- A 3D camera projection in which distant objects appear smaller than close objects. +---@field fov ? number +---@field aspect_ratio ? number +---@field near ? number +---@field far ? number + + +---@class Projection +--- Component that defines how to compute a [`Camera`]'s projection matrix.--- --- Common projections, like perspective and orthographic, are provided out of the box to handle the--- majority of use cases. Custom projections can be added using the [`CameraProjection`] trait and--- the [`Projection::custom`] constructor.--- --- ## What's a projection?--- --- A camera projection essentially describes how 3d points from the point of view of a camera are--- projected onto a 2d screen. This is where properties like a camera's field of view are defined.--- More specifically, a projection is a 4x4 matrix that transforms points from view space (the--- point of view of the camera) into clip space. Clip space is almost, but not quite, equivalent to--- the rectangle that is rendered to your screen, with a depth axis. Any points that land outside--- the bounds of this cuboid are "clipped" and not rendered.--- --- You can also think of the projection as the thing that describes the shape of a camera's--- frustum: the volume in 3d space that is visible to a camera.--- --- [`Camera`]: crate::camera::Camera + + +---@class OcclusionCulling +--- Add this component to a view in order to enable experimental GPU occlusion--- culling.--- --- *Bevy's occlusion culling is currently marked as experimental.* There are--- known issues whereby, in rare circumstances, occlusion culling can result in--- meshes being culled that shouldn't be (i.e. meshes that turn invisible).--- Please try it out and report issues.--- --- *Occlusion culling* allows Bevy to avoid rendering objects that are fully--- behind other opaque or alpha tested objects. This is different from, and--- complements, depth fragment rejection as the `DepthPrepass` enables. While--- depth rejection allows Bevy to avoid rendering *pixels* that are behind--- other objects, the GPU still has to examine those pixels to reject them,--- which requires transforming the vertices of the objects and performing--- skinning if the objects were skinned. Occlusion culling allows the GPU to go--- a step further, avoiding even transforming the vertices of objects that it--- can quickly prove to be behind other objects.--- --- Occlusion culling inherently has some overhead, because Bevy must examine--- the objects' bounding boxes, and create an acceleration structure--- (hierarchical Z-buffer) to perform the occlusion tests. Therefore, occlusion--- culling is disabled by default. Only enable it if you measure it to be a--- speedup on your scene. Note that, because Bevy's occlusion culling runs on--- the GPU and is quite efficient, it's rare for occlusion culling to result in--- a significant slowdown.--- --- Occlusion culling currently requires a `DepthPrepass`. If no depth prepass--- is present on the view, the [`OcclusionCulling`] component will be ignored.--- Additionally, occlusion culling is currently incompatible with deferred--- shading; including both `DeferredPrepass` and [`OcclusionCulling`] results--- in unspecified behavior.--- --- The algorithm that Bevy uses is known as [*two-phase occlusion culling*].--- When you enable occlusion culling, Bevy splits the depth prepass into two:--- an *early* depth prepass and a *late* depth prepass. The early depth prepass--- renders all the meshes that were visible last frame to produce a--- conservative approximation of the depth buffer. Then, after producing an--- acceleration structure known as a hierarchical Z-buffer or depth pyramid,--- Bevy tests the bounding boxes of all meshes against that depth buffer. Those--- that can be quickly proven to be behind the geometry rendered during the--- early depth prepass are skipped entirely. The other potentially-visible--- meshes are rendered during the late prepass, and finally all the visible--- meshes are rendered as usual during the opaque, transparent, etc. passes.--- --- Unlike other occlusion culling systems you may be familiar with, Bevy's--- occlusion culling is fully dynamic and requires no baking step. The CPU--- overhead is minimal. Large skinned meshes and other dynamic objects can--- occlude other objects.--- --- [*two-phase occlusion culling*]:--- https://medium.com/@mil_kru/two-pass-occlusion-culling-4100edcad501 + + +---@class GlobalsUniform +--- Contains global values useful when writing shaders.--- Currently only contains values related to time. +---@field time ? number +---@field delta_time ? number +---@field frame_count ? integer + + +---@class Mesh2d +--- A component for 2D meshes. Requires a [`MeshMaterial2d`] to be rendered, commonly using a [`ColorMaterial`].--- --- [`MeshMaterial2d`]: --- [`ColorMaterial`]: --- --- # Example--- --- ```ignore--- # use bevy_sprite::{ColorMaterial, Mesh2d, MeshMaterial2d};--- # use bevy_ecs::prelude::*;--- # use bevy_render::mesh::Mesh;--- # use bevy_color::palettes::basic::RED;--- # use bevy_asset::Assets;--- # use bevy_math::primitives::Circle;--- #--- // Spawn an entity with a mesh using `ColorMaterial`.--- fn setup(--- mut commands: Commands,--- mut meshes: ResMut>,--- mut materials: ResMut>,--- ) {--- commands.spawn((--- Mesh2d(meshes.add(Circle::new(50.0))),--- MeshMaterial2d(materials.add(ColorMaterial::from_color(RED))),--- ));--- }--- ``` +---@field [1] ? Handle + + +---@class Mesh3d +--- A component for 3D meshes. Requires a [`MeshMaterial3d`] to be rendered, commonly using a [`StandardMaterial`].--- --- [`MeshMaterial3d`]: --- [`StandardMaterial`]: --- --- # Example--- --- ```ignore--- # use bevy_pbr::{Material, MeshMaterial3d, StandardMaterial};--- # use bevy_ecs::prelude::*;--- # use bevy_render::mesh::{Mesh, Mesh3d};--- # use bevy_color::palettes::basic::RED;--- # use bevy_asset::Assets;--- # use bevy_math::primitives::Capsule3d;--- #--- // Spawn an entity with a mesh using `StandardMaterial`.--- fn setup(--- mut commands: Commands,--- mut meshes: ResMut>,--- mut materials: ResMut>,--- ) {--- commands.spawn((--- Mesh3d(meshes.add(Capsule3d::default())),--- MeshMaterial3d(materials.add(StandardMaterial {--- base_color: RED.into(),--- ..Default::default()--- })),--- ));--- }--- ``` +---@field [1] ? Handle + + +---@class Aabb +--- An axis-aligned bounding box, defined by:--- - a center,--- - the distances from the center to each faces along the axis,--- the faces are orthogonal to the axis.--- --- It is typically used as a component on an entity to represent the local space--- occupied by this entity, with faces orthogonal to its local axis.--- --- This component is notably used during "frustum culling", a process to determine--- if an entity should be rendered by a [`Camera`] if its bounding box intersects--- with the camera's [`Frustum`].--- --- It will be added automatically by the systems in [`CalculateBounds`] to entities that:--- - could be subject to frustum culling, for example with a [`Mesh3d`]--- or `Sprite` component,--- - don't have the [`NoFrustumCulling`] component.--- --- It won't be updated automatically if the space occupied by the entity changes,--- for example if the vertex positions of a [`Mesh3d`] are updated.--- --- [`Camera`]: crate::camera::Camera--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling--- [`CalculateBounds`]: crate::view::visibility::VisibilitySystems::CalculateBounds--- [`Mesh3d`]: crate::mesh::Mesh +---@field center ? Vec3A +---@field half_extents ? Vec3A + + +---@class CascadesFrusta + + + +---@class CubemapFrusta + + + +---@class Frustum +--- A region of 3D space defined by the intersection of 6 [`HalfSpace`]s.--- --- Frustums are typically an apex-truncated square pyramid (a pyramid without the top) or a cuboid.--- --- Half spaces are ordered left, right, top, bottom, near, far. The normal vectors--- of the half-spaces point towards the interior of the frustum.--- --- A frustum component is used on an entity with a [`Camera`] component to--- determine which entities will be considered for rendering by this camera.--- All entities with an [`Aabb`] component that are not contained by (or crossing--- the boundary of) the frustum will not be rendered, and not be used in rendering computations.--- --- This process is called frustum culling, and entities can opt out of it using--- the [`NoFrustumCulling`] component.--- --- The frustum component is typically added automatically for cameras, either `Camera2d` or `Camera3d`.--- It is usually updated automatically by [`update_frusta`] from the--- [`CameraProjection`] component and [`GlobalTransform`] of the camera entity.--- --- [`Camera`]: crate::camera::Camera--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling--- [`update_frusta`]: crate::view::visibility::update_frusta--- [`CameraProjection`]: crate::camera::CameraProjection--- [`GlobalTransform`]: bevy_transform::components::GlobalTransform + + +---@class ShaderStorageBuffer +--- A storage buffer that is prepared as a [`RenderAsset`] and uploaded to the GPU. + + +---@class SyncToRenderWorld +--- Marker component that indicates that its entity needs to be synchronized to the render world.--- --- This component is automatically added as a required component by [`ExtractComponentPlugin`] and [`SyncComponentPlugin`].--- For more information see [`SyncWorldPlugin`].--- --- NOTE: This component should persist throughout the entity's entire lifecycle.--- If this component is removed from its entity, the entity will be despawned.--- --- [`ExtractComponentPlugin`]: crate::extract_component::ExtractComponentPlugin--- [`SyncComponentPlugin`]: crate::sync_component::SyncComponentPlugin + + +---@class ColorGrading +--- Configures filmic color grading parameters to adjust the image appearance.--- --- Color grading is applied just before tonemapping for a given--- [`Camera`](crate::camera::Camera) entity, with the sole exception of the--- `post_saturation` value in [`ColorGradingGlobal`], which is applied after--- tonemapping. +---@field global ? ColorGradingGlobal +---@field shadows ? ColorGradingSection +---@field midtones ? ColorGradingSection +---@field highlights ? ColorGradingSection + + +---@class ColorGradingGlobal +--- Filmic color grading values applied to the image as a whole (as opposed to--- individual sections, like shadows and highlights). +---@field exposure ? number +---@field temperature ? number +---@field tint ? number +---@field hue ? number +---@field post_saturation ? number +---@field midtones_range ? Range + + +---@class ColorGradingSection +--- A section of color grading values that can be selectively applied to--- shadows, midtones, and highlights. +---@field saturation ? number +---@field contrast ? number +---@field gamma ? number +---@field gain ? number +---@field lift ? number + + +---@class Msaa +--- Component for configuring the number of samples for [Multi-Sample Anti-Aliasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing)--- for a [`Camera`](crate::camera::Camera).--- --- Defaults to 4 samples. A higher number of samples results in smoother edges.--- --- Some advanced rendering features may require that MSAA is disabled.--- --- Note that the web currently only supports 1 or 4 samples. + + +---@class InheritedVisibility +--- Whether or not an entity is visible in the hierarchy.--- This will not be accurate until [`VisibilityPropagate`] runs in the [`PostUpdate`] schedule.--- --- If this is false, then [`ViewVisibility`] should also be false.--- --- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate +---@field [1] ? boolean + + +---@class NoFrustumCulling +--- Use this component to opt-out of built-in frustum culling for entities, see--- [`Frustum`].--- --- It can be used for example:--- - when a [`Mesh`] is updated but its [`Aabb`] is not, which might happen with animations,--- - when using some light effects, like wanting a [`Mesh`] out of the [`Frustum`]--- to appear in the reflection of a [`Mesh`] within. + + +---@class ViewVisibility +--- Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering.--- --- Each frame, this will be reset to `false` during [`VisibilityPropagate`] systems in [`PostUpdate`].--- Later in the frame, systems in [`CheckVisibility`] will mark any visible entities using [`ViewVisibility::set`].--- Because of this, values of this type will be marked as changed every frame, even when they do not change.--- --- If you wish to add custom visibility system that sets this value, make sure you add it to the [`CheckVisibility`] set.--- --- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate--- [`CheckVisibility`]: VisibilitySystems::CheckVisibility +---@field [1] ? boolean + + +---@class Visibility +--- User indication of whether an entity is visible. Propagates down the entity hierarchy.--- --- If an entity is hidden in this way, all [`Children`] (and all of their children and so on) who--- are set to [`Inherited`](Self::Inherited) will also be hidden.--- --- This is done by the `visibility_propagate_system` which uses the entity hierarchy and--- `Visibility` to set the values of each entity's [`InheritedVisibility`] component. + + +---@class VisibilityClass +--- A bucket into which we group entities for the purposes of visibility.--- --- Bevy's various rendering subsystems (3D, 2D, UI, etc.) want to be able to--- quickly winnow the set of entities to only those that the subsystem is--- tasked with rendering, to avoid spending time examining irrelevant entities.--- At the same time, Bevy wants the [`check_visibility`] system to determine--- all entities' visibilities at the same time, regardless of what rendering--- subsystem is responsible for drawing them. Additionally, your application--- may want to add more types of renderable objects that Bevy determines--- visibility for just as it does for Bevy's built-in objects.--- --- The solution to this problem is *visibility classes*. A visibility class is--- a type, typically the type of a component, that represents the subsystem--- that renders it: for example, `Mesh3d`, `Mesh2d`, and `Sprite`. The--- [`VisibilityClass`] component stores the visibility class or classes that--- the entity belongs to. (Generally, an object will belong to only one--- visibility class, but in rare cases it may belong to multiple.)--- --- When adding a new renderable component, you'll typically want to write an--- add-component hook that adds the type ID of that component to the--- [`VisibilityClass`] array. See `custom_phase_item` for an example. +---@field [1] ? SmallVec + + +---@class VisibleEntities +--- Collection of entities visible from the current view.--- --- This component contains all entities which are visible from the currently--- rendered view. The collection is updated automatically by the [`VisibilitySystems::CheckVisibility`]--- system set. Renderers can use the equivalent [`RenderVisibleEntities`] to optimize rendering of--- a particular view, to prevent drawing items not visible from that view.--- --- This component is intended to be attached to the same entity as the [`Camera`] and--- the [`Frustum`] defining the view. + + +---@class VisibilityRange +--- Specifies the range of distances that this entity must be from the camera in--- order to be rendered.--- --- This is also known as *hierarchical level of detail* or *HLOD*.--- --- Use this component when you want to render a high-polygon mesh when the--- camera is close and a lower-polygon mesh when the camera is far away. This--- is a common technique for improving performance, because fine details are--- hard to see in a mesh at a distance. To avoid an artifact known as *popping*--- between levels, each level has a *margin*, within which the object--- transitions gradually from invisible to visible using a dithering effect.--- --- You can also use this feature to replace multiple meshes with a single mesh--- when the camera is distant. This is the reason for the term "*hierarchical*--- level of detail". Reducing the number of meshes can be useful for reducing--- drawcall count. Note that you must place the [`VisibilityRange`] component--- on each entity you want to be part of a LOD group, as [`VisibilityRange`]--- isn't automatically propagated down to children.--- --- A typical use of this feature might look like this:--- --- | Entity | `start_margin` | `end_margin` |--- |-------------------------|----------------|--------------|--- | Root | N/A | N/A |--- | ├─ High-poly mesh | [0, 0) | [20, 25) |--- | ├─ Low-poly mesh | [20, 25) | [70, 75) |--- | └─ Billboard *imposter* | [70, 75) | [150, 160) |--- --- With this setup, the user will see a high-poly mesh when the camera is--- closer than 20 units. As the camera zooms out, between 20 units to 25 units,--- the high-poly mesh will gradually fade to a low-poly mesh. When the camera--- is 70 to 75 units away, the low-poly mesh will fade to a single textured--- quad. And between 150 and 160 units, the object fades away entirely. Note--- that the `end_margin` of a higher LOD is always identical to the--- `start_margin` of the next lower LOD; this is important for the crossfade--- effect to function properly. +---@field start_margin ? Range +---@field end_margin ? Range +---@field use_aabb ? boolean + + +---@class RenderLayers +--- Describes which rendering layers an entity belongs to.--- --- Cameras with this component will only render entities with intersecting--- layers.--- --- Entities may belong to one or more layers, or no layer at all.--- --- The [`Default`] instance of `RenderLayers` contains layer `0`, the first layer.--- --- An entity with this component without any layers is invisible.--- --- Entities without this component belong to layer `0`. +---@field [1] ? SmallVec + + +---@class Screenshot +--- A component that signals to the renderer to capture a screenshot this frame.--- --- This component should be spawned on a new entity with an observer that will trigger--- with [`ScreenshotCaptured`] when the screenshot is ready.--- --- Screenshots are captured asynchronously and may not be available immediately after the frame--- that the component is spawned on. The observer should be used to handle the screenshot when it--- is ready.--- --- Note that the screenshot entity will be despawned after the screenshot is captured and the--- observer is triggered.--- --- # Usage--- --- ```--- # use bevy_ecs::prelude::*;--- # use bevy_render::view::screenshot::{save_to_disk, Screenshot};--- --- fn take_screenshot(mut commands: Commands) {--- commands.spawn(Screenshot::primary_window())--- .observe(save_to_disk("screenshot.png"));--- }--- ``` +---@field [1] ? RenderTarget + + +---@class ScreenshotCaptured + +---@field [1] ? Image + + +---@class ColorMaterial +--- A [2d material](Material2d) that renders [2d meshes](crate::Mesh2d) with a texture tinted by a uniform color +---@field color ? Color +---@field alpha_mode ? AlphaMode2d +---@field uv_transform ? Affine2 +---@field texture ? Option + + +---@class AlphaMode2d +--- Sets how a 2d material's base color alpha channel is used for transparency.--- Currently, this only works with [`Mesh2d`]. Sprites are always transparent.--- --- This is very similar to [`AlphaMode`](bevy_render::alpha::AlphaMode) but this only applies to 2d meshes.--- We use a separate type because 2d doesn't support all the transparency modes that 3d does. + + +---@class Anchor +--- How a sprite is positioned relative to its [`Transform`].--- It defaults to `Anchor::Center`. + + +---@class Sprite +--- Describes a sprite to be rendered to a 2D camera +---@field image ? Handle +---@field texture_atlas ? Option +---@field color ? Color +---@field flip_x ? boolean +---@field flip_y ? boolean +---@field custom_size ? Option +---@field rect ? Option +---@field anchor ? Anchor +---@field image_mode ? SpriteImageMode + + +---@class SpriteImageMode +--- Controls how the image is altered when scaled. + + +---@class BorderRect +--- Defines the extents of the border of a rectangle.--- --- This struct is used to represent thickness or offsets from the edges--- of a rectangle (left, right, top, and bottom), with values increasing inwards. +---@field left ? number +---@field right ? number +---@field top ? number +---@field bottom ? number + + +---@class SliceScaleMode +--- Defines how a texture slice scales when resized + + +---@class TextureSlicer +--- Slices a texture using the **9-slicing** technique. This allows to reuse an image at various sizes--- without needing to prepare multiple assets. The associated texture will be split into nine portions,--- so that on resize the different portions scale or tile in different ways to keep the texture in proportion.--- --- For example, when resizing a 9-sliced texture the corners will remain unscaled while the other--- sections will be scaled or tiled.--- --- See [9-sliced](https://en.wikipedia.org/wiki/9-slice_scaling) textures. +---@field border ? BorderRect +---@field center_scale_mode ? SliceScaleMode +---@field sides_scale_mode ? SliceScaleMode +---@field max_corner_scale ? number + + +---@class ReflectableScheduleLabel + + + +---@class AppLifecycle +--- Application lifetime events + + +---@class CursorEntered +--- An event that is sent whenever the user's cursor enters a window. +---@field window ? Entity + + +---@class CursorLeft +--- An event that is sent whenever the user's cursor leaves a window. +---@field window ? Entity + + +---@class CursorMoved +--- An event reporting that the mouse cursor has moved inside a window.--- --- The event is sent only if the cursor is over one of the application's windows.--- It is the translated version of [`WindowEvent::CursorMoved`] from the `winit` crate with the addition of `delta`.--- --- Not to be confused with the `MouseMotion` event from `bevy_input`.--- --- Because the range of data is limited by the window area and it may have been transformed by the OS to implement certain effects like acceleration,--- you should not use it for non-cursor-like behavior such as 3D camera control. Please see `MouseMotion` instead.--- --- [`WindowEvent::CursorMoved`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.CursorMoved +---@field window ? Entity +---@field position ? Vec2 +---@field delta ? Option + + +---@class FileDragAndDrop +--- Events related to files being dragged and dropped on a window. + + +---@class Ime +--- An Input Method Editor event.--- --- This event is the translated version of the `WindowEvent::Ime` from the `winit` crate.--- --- It is only sent if IME was enabled on the window with [`Window::ime_enabled`](crate::window::Window::ime_enabled). + + +---@class RequestRedraw +--- An event that indicates all of the application's windows should be redrawn,--- even if their control flow is set to `Wait` and there have been no window events. + + +---@class WindowBackendScaleFactorChanged +--- An event that indicates a window's OS-reported scale factor has changed. +---@field window ? Entity +---@field scale_factor ? number + + +---@class WindowCloseRequested +--- An event that is sent whenever the operating systems requests that a window--- be closed. This will be sent when the close button of the window is pressed.--- --- If the default [`WindowPlugin`] is used, these events are handled--- by closing the corresponding [`Window`].--- To disable this behavior, set `close_when_requested` on the [`WindowPlugin`]--- to `false`.--- --- [`WindowPlugin`]: crate::WindowPlugin--- [`Window`]: crate::Window +---@field window ? Entity + + +---@class WindowClosed +--- An event that is sent whenever a window is closed. This will be sent when--- the window entity loses its [`Window`](crate::window::Window) component or is despawned. +---@field window ? Entity + + +---@class WindowClosing +--- An event that is sent whenever a window is closing. This will be sent when--- after a [`WindowCloseRequested`] event is received and the window is in the process of closing. +---@field window ? Entity + + +---@class WindowCreated +--- An event that is sent whenever a new window is created.--- --- To create a new window, spawn an entity with a [`crate::Window`] on it. +---@field window ? Entity + + +---@class WindowDestroyed +--- An event that is sent whenever a window is destroyed by the underlying window system.--- --- Note that if your application only has a single window, this event may be your last chance to--- persist state before the application terminates. +---@field window ? Entity + + +---@class WindowEvent +--- Wraps all `bevy_window` and `bevy_input` events in a common enum.--- --- Read these events with `EventReader` if you need to--- access window events in the order they were received from the--- operating system. Otherwise, the event types are individually--- readable with `EventReader` (e.g. `EventReader`). + + +---@class WindowFocused +--- An event that indicates a window has received or lost focus. +---@field window ? Entity +---@field focused ? boolean + + +---@class WindowMoved +--- An event that is sent when a window is repositioned in physical pixels. +---@field window ? Entity +---@field position ? IVec2 + + +---@class WindowOccluded +--- The window has been occluded (completely hidden from view).--- --- This is different to window visibility as it depends on--- whether the window is closed, minimized, set invisible,--- or fully occluded by another window.--- --- It is the translated version of [`WindowEvent::Occluded`] from the `winit` crate.--- --- [`WindowEvent::Occluded`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.Occluded +---@field window ? Entity +---@field occluded ? boolean + + +---@class WindowResized +--- A window event that is sent whenever a window's logical size has changed. +---@field window ? Entity +---@field width ? number +---@field height ? number + + +---@class WindowScaleFactorChanged +--- An event that indicates a window's scale factor has changed. +---@field window ? Entity +---@field scale_factor ? number + + +---@class WindowThemeChanged +--- An event sent when the system theme changes for a window.--- --- This event is only sent when the window is relying on the system theme to control its appearance.--- i.e. It is only sent when [`Window::window_theme`](crate::window::Window::window_theme) is `None` and the system theme changes. +---@field window ? Entity +---@field theme ? WindowTheme + + +---@class Monitor +--- Represents an available monitor as reported by the user's operating system, which can be used--- to query information about the display, such as its size, position, and video modes.--- --- Each monitor corresponds to an entity and can be used to position a monitor using--- [`crate::window::MonitorSelection::Entity`].--- --- # Warning--- --- This component is synchronized with `winit` through `bevy_winit`, but is effectively--- read-only as `winit` does not support changing monitor properties. +---@field name ? Option +---@field physical_height ? integer +---@field physical_width ? integer +---@field physical_position ? IVec2 +---@field refresh_rate_millihertz ? Option +---@field scale_factor ? number +---@field video_modes ? Vec + + +---@class VideoMode +--- Represents a video mode that a monitor supports +---@field physical_size ? UVec2 +---@field bit_depth ? integer +---@field refresh_rate_millihertz ? integer + + +---@class SystemCursorIcon +--- The icon to display for a window.--- --- Examples of all of these cursors can be found [here](https://www.w3schools.com/cssref/playit.php?filename=playcss_cursor&preval=crosshair).--- This `enum` is simply a copy of a similar `enum` found in [`winit`](https://docs.rs/winit/latest/winit/window/enum.CursorIcon.html).--- `winit`, in turn, is based upon the [CSS3 UI spec](https://www.w3.org/TR/css-ui-3/#cursor).--- --- See the [`window_settings`] example for usage.--- --- [`window_settings`]: https://github.com/bevyengine/bevy/blob/latest/examples/window/window_settings.rs + + +---@class CompositeAlphaMode +--- Specifies how the alpha channel of the textures should be handled during compositing, for a [`Window`]. + + +---@class CursorGrabMode +--- Defines if and how the cursor is grabbed by a [`Window`].--- --- ## Platform-specific--- --- - **`Windows`** doesn't support [`CursorGrabMode::Locked`]--- - **`macOS`** doesn't support [`CursorGrabMode::Confined`]--- - **`iOS/Android`** don't have cursors.--- --- Since `Windows` and `macOS` have different [`CursorGrabMode`] support, we first try to set the grab mode that was asked for. If it doesn't work then use the alternate grab mode. + + +---@class CursorOptions +--- Cursor data for a [`Window`]. +---@field visible ? boolean +---@field grab_mode ? CursorGrabMode +---@field hit_test ? boolean + + +---@class EnabledButtons +--- Specifies which [`Window`] control buttons should be enabled.--- --- ## Platform-specific--- --- **`iOS`**, **`Android`**, and the **`Web`** do not have window control buttons.--- --- On some **`Linux`** environments these values have no effect. +---@field minimize ? boolean +---@field maximize ? boolean +---@field close ? boolean + + +---@class InternalWindowState +--- Stores internal [`Window`] state that isn't directly accessible. +---@field minimize_request ? Option +---@field maximize_request ? Option +---@field drag_move_request ? boolean +---@field drag_resize_request ? Option +---@field physical_cursor_position ? Option + + +---@class MonitorSelection +--- References a screen monitor.--- --- Used when centering a [`Window`] on a monitor. + + +---@class PresentMode +--- Presentation mode for a [`Window`].--- --- The presentation mode specifies when a frame is presented to the window. The [`Fifo`]--- option corresponds to a traditional `VSync`, where the framerate is capped by the--- display refresh rate. Both [`Immediate`] and [`Mailbox`] are low-latency and are not--- capped by the refresh rate, but may not be available on all platforms. Tearing--- may be observed with [`Immediate`] mode, but will not be observed with [`Mailbox`] or--- [`Fifo`].--- --- [`AutoVsync`] or [`AutoNoVsync`] will gracefully fallback to [`Fifo`] when unavailable.--- --- [`Immediate`] or [`Mailbox`] will panic if not supported by the platform.--- --- [`Fifo`]: PresentMode::Fifo--- [`FifoRelaxed`]: PresentMode::FifoRelaxed--- [`Immediate`]: PresentMode::Immediate--- [`Mailbox`]: PresentMode::Mailbox--- [`AutoVsync`]: PresentMode::AutoVsync--- [`AutoNoVsync`]: PresentMode::AutoNoVsync + + +---@class PrimaryWindow +--- Marker [`Component`] for the window considered the primary window.--- --- Currently this is assumed to only exist on 1 entity at a time.--- --- [`WindowPlugin`](crate::WindowPlugin) will spawn a [`Window`] entity--- with this component if [`primary_window`](crate::WindowPlugin::primary_window)--- is `Some`. + + +---@class VideoModeSelection +--- References an exclusive fullscreen video mode.--- --- Used when setting [`WindowMode::Fullscreen`] on a window. + + +---@class Window +--- The defining [`Component`] for window entities,--- storing information about how it should appear and behave.--- --- Each window corresponds to an entity, and is uniquely identified by the value of their [`Entity`].--- When the [`Window`] component is added to an entity, a new window will be opened.--- When it is removed or the entity is despawned, the window will close.--- --- The primary window entity (and the corresponding window) is spawned by default--- by [`WindowPlugin`](crate::WindowPlugin) and is marked with the [`PrimaryWindow`] component.--- --- This component is synchronized with `winit` through `bevy_winit`:--- it will reflect the current state of the window and can be modified to change this state.--- --- # Example--- --- Because this component is synchronized with `winit`, it can be used to perform--- OS-integrated windowing operations. For example, here's a simple system--- to change the window mode:--- --- ```--- # use bevy_ecs::query::With;--- # use bevy_ecs::system::Query;--- # use bevy_window::{WindowMode, PrimaryWindow, Window, MonitorSelection, VideoModeSelection};--- fn change_window_mode(mut windows: Query<&mut Window, With>) {--- // Query returns one window typically.--- for mut window in windows.iter_mut() {--- window.mode =--- WindowMode::Fullscreen(MonitorSelection::Current, VideoModeSelection::Current);--- }--- }--- ``` +---@field cursor_options ? CursorOptions +---@field present_mode ? PresentMode +---@field mode ? WindowMode +---@field position ? WindowPosition +---@field resolution ? WindowResolution +---@field title ? string +---@field name ? Option +---@field composite_alpha_mode ? CompositeAlphaMode +---@field resize_constraints ? WindowResizeConstraints +---@field resizable ? boolean +---@field enabled_buttons ? EnabledButtons +---@field decorations ? boolean +---@field transparent ? boolean +---@field focused ? boolean +---@field window_level ? WindowLevel +---@field canvas ? Option +---@field fit_canvas_to_parent ? boolean +---@field prevent_default_event_handling ? boolean +---@field internal ? InternalWindowState +---@field ime_enabled ? boolean +---@field ime_position ? Vec2 +---@field window_theme ? Option +---@field visible ? boolean +---@field skip_taskbar ? boolean +---@field clip_children ? boolean +---@field desired_maximum_frame_latency ? Option +---@field recognize_pinch_gesture ? boolean +---@field recognize_rotation_gesture ? boolean +---@field recognize_doubletap_gesture ? boolean +---@field recognize_pan_gesture ? Option +---@field movable_by_window_background ? boolean +---@field fullsize_content_view ? boolean +---@field has_shadow ? boolean +---@field titlebar_shown ? boolean +---@field titlebar_transparent ? boolean +---@field titlebar_show_title ? boolean +---@field titlebar_show_buttons ? boolean +---@field prefers_home_indicator_hidden ? boolean +---@field prefers_status_bar_hidden ? boolean + + +---@class WindowLevel +--- Specifies where a [`Window`] should appear relative to other overlapping windows (on top or under) .--- --- Levels are groups of windows with respect to their z-position.--- --- The relative ordering between windows in different window levels is fixed.--- The z-order of windows within the same window level may change dynamically on user interaction.--- --- ## Platform-specific--- --- - **iOS / Android / Web / Wayland:** Unsupported. + + +---@class WindowMode +--- Defines the way a [`Window`] is displayed. + + +---@class WindowPosition +--- Defines where a [`Window`] should be placed on the screen. + + +---@class WindowRef +--- Reference to a [`Window`], whether it be a direct link to a specific entity or--- a more vague defaulting choice. + + +---@class WindowResizeConstraints +--- The size limits on a [`Window`].--- --- These values are measured in logical pixels (see [`WindowResolution`]), so the user's--- scale factor does affect the size limits on the window.--- --- Please note that if the window is resizable, then when the window is--- maximized it may have a size outside of these limits. The functionality--- required to disable maximizing is not yet exposed by winit. +---@field min_width ? number +---@field min_height ? number +---@field max_width ? number +---@field max_height ? number + + +---@class WindowResolution +--- Controls the size of a [`Window`]--- --- ## Physical, logical and requested sizes--- --- There are three sizes associated with a window:--- - the physical size,--- which represents the actual height and width in physical pixels--- the window occupies on the monitor,--- - the logical size,--- which represents the size that should be used to scale elements--- inside the window, measured in logical pixels,--- - the requested size,--- measured in logical pixels, which is the value submitted--- to the API when creating the window, or requesting that it be resized.--- --- ## Scale factor--- --- The reason logical size and physical size are separated and can be different--- is to account for the cases where:--- - several monitors have different pixel densities,--- - the user has set up a pixel density preference in its operating system,--- - the Bevy `App` has specified a specific scale factor between both.--- --- The factor between physical size and logical size can be retrieved with--- [`WindowResolution::scale_factor`].--- --- For the first two cases, a scale factor is set automatically by the operating--- system through the window backend. You can get it with--- [`WindowResolution::base_scale_factor`].--- --- For the third case, you can override this automatic scale factor with--- [`WindowResolution::set_scale_factor_override`].--- --- ## Requested and obtained sizes--- --- The logical size should be equal to the requested size after creating/resizing,--- when possible.--- The reason the requested size and logical size might be different--- is because the corresponding physical size might exceed limits (either the--- size limits of the monitor, or limits defined in [`WindowResizeConstraints`]).--- --- Note: The requested size is not kept in memory, for example requesting a size--- too big for the screen, making the logical size different from the requested size,--- and then setting a scale factor that makes the previous requested size within--- the limits of the screen will not get back that previous requested size. +---@field physical_width ? integer +---@field physical_height ? integer +---@field scale_factor_override ? Option +---@field scale_factor ? number + + +---@class WindowTheme +--- The [`Window`] theme variant to use. + + +---@class CursorIcon +--- Insert into a window entity to set the cursor for that window. + + +---@class NonZeroU32 + + + +---@class Cow + + + +---@class Arc + + + +---@class Range + + + +---@class RangeInclusive + + + diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs index bac1cf0b38..bb9512a049 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -1,20 +1,13 @@ +use std::ops::Index; + use indexmap::IndexMap; -use ladfile::{ArgumentVisitor, LadFile, LadTypeId}; +use ladfile::{LadFile, LadFunction, LadTypeId, LadTypeKind}; use crate::lua_declaration_file::{ - LuaClass, LuaDefinitionFile, LuaModule, LuaPrimitiveType, LuaType, + ClassField, FunctionParam, FunctionSignature, LuaClass, LuaDefinitionFile, LuaModule, + LuaPrimitiveType, LuaType, }; -trait GetLuaIdentifier { - fn get_lua_identifier(&self, key: LadTypeId) -> String; -} - -impl GetLuaIdentifier for ladfile::LadFile { - fn get_lua_identifier(&self, key: LadTypeId) -> String { - ArgumentVisitor - } -} - pub fn convert_ladfile_to_lua_declaration_file( ladfile: ladfile::LadFile, ) -> Result { @@ -24,25 +17,36 @@ pub fn convert_ladfile_to_lua_declaration_file( }; let rust_types = ladfile.polymorphizied_types(); + // convert each rust type to a lua class with generics - let mut lua_classes: IndexMap = + let mut lua_classes: IndexMap)> = IndexMap::with_capacity(ladfile.types.len()); for (key, types) in rust_types.iter() { // right now one class == one lad type id, when we can properly denormorphize types, we will // be able to have multiple lad type ids per class let lua_classes_for_type = convert_polymorphic_type_to_lua_classes(key, types, &ladfile); - lua_classes.extend(lua_classes_for_type); + + lua_classes.extend( + lua_classes_for_type + .into_iter() + .map(|(id, class, funcs)| (id, (class, funcs))), + ); } for (type_id, lad_type) in ladfile.types.iter() { - let lua_class = lua_classes - .get(type_id) - .ok_or_else(|| anyhow::anyhow!("Lua class not found for type ID: {}", type_id))?; + let (lua_class, functions) = match lua_classes.get(type_id) { + Some(val) => val.clone(), + None => continue, + }; + // TODO: support all types + // .get(type_id) + // .ok_or_else(|| anyhow::anyhow!("Lua class not found for type ID: {}", type_id))?; definition_file.modules.push(LuaModule { name: lad_type.identifier.to_owned(), classes: vec![lua_class.clone()], + functions, ..Default::default() }); } @@ -58,9 +62,14 @@ pub fn convert_polymorphic_type_to_lua_classes( polymorphic_type_key: &ladfile::PolymorphicTypeKey, monomorphized_types: &[&ladfile::LadTypeId], ladfile: &ladfile::LadFile, -) -> Vec<(LadTypeId, LuaClass)> { +) -> Vec<(LadTypeId, LuaClass, Vec)> { + if monomorphized_types.len() > 1 || polymorphic_type_key.arity != 0 { + // TODO: support generics, currently bevy doesn't let you track back generic instantiations to their definition + return vec![]; + } + let mut types = Vec::default(); - for &lad_type_id in monomorphized_types { + if let Some(lad_type_id) = monomorphized_types.first() { let generics = GENERIC_PLACEHOLDERS[0..polymorphic_type_key.arity] .iter() .map(ToString::to_string) @@ -70,42 +79,137 @@ pub fn convert_polymorphic_type_to_lua_classes( .get_type_documentation(lad_type_id) .map(ToOwned::to_owned); - let mut fields = vec![]; - if let Some(lad_type) = ladfile.types.get(lad_type_id) { + let mut lua_fields = vec![]; + let mut lua_functions = vec![]; + + if let Some(lad_type) = ladfile.types.get(*lad_type_id) { // add fields for the type - match lad_type.layout { - ladfile::LadTypeLayout::Opaque => todo!(), - ladfile::LadTypeLayout::MonoVariant(lad_variant) => todo!(), - ladfile::LadTypeLayout::Enum(lad_variants) => todo!(), + match &lad_type.layout { + ladfile::LadTypeLayout::Opaque => {} + ladfile::LadTypeLayout::MonoVariant(lad_variant) => match lad_variant { + ladfile::LadVariant::TupleStruct { name, fields } => { + for (idx, field) in fields.iter().enumerate() { + lua_fields.push(ClassField { + name: format!("[{}]", idx + 1), + ty: match lad_type_to_lua_type(ladfile, field.type_.clone()) { + Ok(ty) => ty, + Err(e) => panic!("{e}"), + }, + scope: crate::lua_declaration_file::FieldScope::Public, + optional: true, + description: None, + }) + } + } + ladfile::LadVariant::Struct { name, fields } => { + for field in fields.iter() { + lua_fields.push(ClassField { + name: field.name.clone(), + ty: match lad_type_to_lua_type(ladfile, field.type_.clone()) { + Ok(ty) => ty, + Err(e) => panic!("{e}"), + }, + scope: crate::lua_declaration_file::FieldScope::Public, + optional: true, + description: None, + }) + } + } + ladfile::LadVariant::Unit { name } => {} + }, + ladfile::LadTypeLayout::Enum(lad_variants) => {} + } + + for function in &lad_type.associated_functions { + if let Some(function) = ladfile.functions.get(function) { + lua_functions.push(match lad_function_to_lua_function(ladfile, function) { + Ok(func) => func, + Err(err) => { + log::error!("Error converting function: {err}"); + continue; + } + }) + } } } let class = LuaClass { name: polymorphic_type_key.identifier.to_string(), - parents: vec![], // not needed - fields: vec![], // TODO: Find fields + parents: vec![], // not needed + fields: lua_fields, // TODO: Find fields generics, documentation, exact: true, operators: vec![], // TODO: Find operators }; - types.push((lad_type_id.clone(), class)); + types.push(((*lad_type_id).clone(), class, lua_functions)); } types } +pub fn lad_function_to_lua_function( + ladfile: &LadFile, + function: &LadFunction, +) -> Result { + let params = function + .arguments + .iter() + .enumerate() + .map(|(idx, a)| { + Ok(FunctionParam { + name: a + .name + .as_ref() + .map(|v| v.to_string()) + .unwrap_or(format!("p{}", idx + 1)), + ty: lad_instance_to_lua_type(ladfile, &a.kind)?, + optional: matches!(a.kind, LadTypeKind::Option(..)), + description: a.documentation.as_ref().map(|d| d.to_string()), + }) + }) + .collect::, anyhow::Error>>()?; + + let returns = lad_instance_to_lua_type(ladfile, &function.return_type.kind)?; + + Ok(FunctionSignature { + name: function.identifier.to_string(), + params, + returns: vec![returns], + async_fn: false, + deprecated: false, + nodiscard: false, + package: true, + overloads: vec![], + generics: vec![], + documentation: function.documentation.as_ref().map(|d| d.to_string()), + }) +} + pub fn to_lua_many( ladfile: &LadFile, lad_types: &[ladfile::LadTypeKind], ) -> Result, anyhow::Error> { let lua_types = lad_types .iter() - .map(|lad_type| lad_instance_to_lua_type(&lad_type)) + .map(|lad_type| lad_instance_to_lua_type(ladfile, &lad_type)) .collect::, _>>()?; Ok(lua_types) } +pub fn lad_type_to_lua_type( + ladfile: &LadFile, + lad_type_id: LadTypeId, +) -> Result { + if let Some(primitive) = ladfile.primitives.get(&lad_type_id) { + Ok(lad_primitive_to_lua_type(&primitive.kind)) + } else { + Ok(LuaType::Alias( + ladfile.get_type_identifier(&lad_type_id, None).to_string(), + )) + } +} + pub fn lad_instance_to_lua_type( ladfile: &LadFile, lad_type: &ladfile::LadTypeKind, @@ -114,7 +218,9 @@ pub fn lad_instance_to_lua_type( ladfile::LadTypeKind::Primitive(prim) => lad_primitive_to_lua_type(prim), ladfile::LadTypeKind::Ref(lad_type_id) | ladfile::LadTypeKind::Mut(lad_type_id) - | ladfile::LadTypeKind::Val(lad_type_id) => LuaType::Alias(ladfile.), + | ladfile::LadTypeKind::Val(lad_type_id) => { + LuaType::Alias(ladfile.get_type_identifier(lad_type_id, None).to_string()) + } ladfile::LadTypeKind::Option(lad_type_kind) => LuaType::Union(vec![ lad_instance_to_lua_type(ladfile, lad_type_kind)?, LuaType::Primitive(LuaPrimitiveType::Nil), @@ -165,7 +271,7 @@ pub fn lad_primitive_to_lua_type(lad_primitive: &ladfile::LadBMSPrimitiveKind) - | ladfile::LadBMSPrimitiveKind::String | ladfile::LadBMSPrimitiveKind::OsString | ladfile::LadBMSPrimitiveKind::PathBuf => LuaPrimitiveType::String, - ladfile::LadBMSPrimitiveKind::FunctionCallContext => LuaPrimitiveType::Any, + ladfile::LadBMSPrimitiveKind::FunctionCallContext => return LuaType::Any, ladfile::LadBMSPrimitiveKind::DynamicFunction | ladfile::LadBMSPrimitiveKind::DynamicFunctionMut => LuaPrimitiveType::Function, ladfile::LadBMSPrimitiveKind::ReflectReference => { diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs index 88aa27fb34..7805b1b13a 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs @@ -1,4 +1,4 @@ -use serde::Serialize; +use serde::{Serialize, Serializer}; use std::collections::HashMap; /// Basic primitive types supported by Lua Language Server annotations. @@ -72,6 +72,7 @@ pub enum LuaPrimitiveType { /// ---@type "left" | "right" -- Literal types /// ``` #[derive(Debug, Clone, Serialize)] +#[serde(tag = "kind", content = "value")] pub enum LuaType { Primitive(LuaPrimitiveType), // "number", "string", "boolean", etc. Alias(String), @@ -83,7 +84,7 @@ pub enum LuaType { value: Box, }, TableLiteral(HashMap), - Function(FunctionSignature), + Function(FunctionSignatureShort), Generic { name: String, parent: Option>, @@ -92,6 +93,12 @@ pub enum LuaType { Any, } +#[derive(Debug, Clone, Serialize)] +pub struct FunctionSignatureShort { + pub parameters: Vec<(String, LuaType)>, + pub return_type: Box, +} + // Function-related definitions /// Represents a function parameter in Lua Language Server annotations. /// @@ -128,6 +135,7 @@ pub struct FunctionParam { /// ``` #[derive(Debug, Clone, Serialize)] pub struct FunctionSignature { + pub name: String, pub params: Vec, pub returns: Vec, pub async_fn: bool, diff --git a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera index 4af69d5c60..fc76d22804 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera +++ b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera @@ -6,33 +6,40 @@ {%- for class in module.classes -%} ---@class {{ class.name }} {# newline #} -{{- self::multiline_description(description=class.documentation) -}} - -{%- for field in class.fields -%} -{{- class_field(field=field) -}} +{{- self::multiline_description(description=class.documentation) }} +{% for field in class.fields -%} +{{- self::class_field(field=field) -}} {%- endfor -%} - {%- for function in module.functions -%} +{# newline #} +{# newline #} {%- if function.async_fn -%} ---@async +{# newline #} {%- endif -%} {%- if function.deprecated -%} ---@deprecated +{# newline #} {%- endif -%} {%- if function.no_discard -%} ---@nodiscard +{# newline #} {%- endif -%} {%- if function.package -%} ---@package +{# newline #} {%- endif -%} {%- for generic in function.generics -%} ---@generic {{ generic.name }} +{# newline #} {%- endfor -%} {%- for param in function.params -%} -{{ function_param(param=param) }} +{{ self::function_param(arg=param) }} {%- endfor -%} {%- for return in function.returns -%} ----@return {{ return.ty }} +---@return {{ self::lua_type(ty=return) }} +local function {{ function.name }}() end +{# newline #} {%- endfor -%} {%- endfor -%} {# functions #} {%- endfor -%} {# class #} @@ -41,15 +48,65 @@ {%- endfor -%} {# modules #} {%- macro class_field(field) -%} ----@field {{ field.scope }} {{ field.name }} {% if field.optional %}?{% endif %} {{ field.ty }} +---@field {{ field.scope }} {{ field.name }} {% if field.optional %}?{% endif %} {{ self::lua_type(ty=field.ty) }} {# newline #} -{{- multiline_description(description=field.description) -}} +{{- self::multiline_description(description=field.description) -}} {%- endmacro class_field -%} +{%- macro lua_type(ty) -%} + {%- if ty.kind == "Primitive" -%} + {{ ty.value }} + {%- elif ty.kind == "Alias" -%} + {{ ty.value }} + {%- elif ty.kind == "Literal" -%} + {{ ty.value }} + {%- elif ty.kind == "Any" -%} + any + {%- elif ty.kind == "Array" -%} + {{ self::lua_type(ty=ty.value) }}[] + {%- elif ty.kind == "Union" -%} + {%- for subtype in ty.value -%} + {{ self::lua_type(ty=subtype) }} + {%- if not loop.last %} | {% endif -%} + {%- endfor -%} + {%- elif ty.kind == "Tuple" -%} + [ + {%- for subtype in ty.value -%} + {{ self::lua_type(ty=subtype) }} + {%- if not loop.last %}, {% endif -%} + {%- endfor -%} + ] + {%- elif ty.kind == "Dictionary" -%} + table<{{ self::lua_type(ty=ty.key) }}, {{ self::lua_type(ty=ty.value) }}> + {%- elif ty.kind == "TableLiteral" -%} + { + {%- for key in ty.value | keys -%} + {{ key }}: {{ self::lua_type(ty=ty.value[key]) }} + {%- if not loop.last %}, {% endif -%} + {%- endfor -%} + } + {%- elif ty.kind == "Function" -%} + fun( + {%- for param in ty.value.parameters -%} + {{ param[0] }}: {{ self::lua_type(ty=param[1]) }} + {%- if not loop.last %}, {% endif -%} + {%- endfor -%} + ): {{ self::lua_type(ty=ty.value.returns) }} + {%- elif ty.kind == "Generic" -%} + {%- if ty.value.parent is defined and ty.value.parent is not null -%} + {{ ty.value.name }}<{{ self::lua_type(ty=ty.value.parent) }}> + {%- else -%} + {{ ty.value.name }} + {%- endif -%} + {%- else -%} + ??? {# fallback #} + {%- endif -%} +{%- endmacro lua_type -%} + {%- macro function_param(arg) -%} ----@param {{ arg.name }} {{ arg.ty }} {% if arg.optional %}?{% endif %} +---@param {{ arg.name }} {{ self::lua_type(ty=arg.ty) }} {% if arg.optional %}?{% endif %} {# newline #} -{{- multiline_description(description=arg.description) -}} +{{- self::multiline_description(description=arg.description) -}} {%- endmacro function_param -%} {%- macro multiline_description(description) -%} diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua b/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua index 6dee532b0a..5c24908720 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua @@ -1,15 +1,28 @@ ---@meta ----@module "StructType" +---@module "PlainStructType" + +---@class PlainStructType +--- I am a simple plain struct type +---@field int_field ? integer + +---@package +---@param p1 PlainStructType +---@param p2 integer +---@return any +local function plain_struct_function() end ----@class StructType ---- I am a struct ---@class EnumType + ---@class TupleStructType --- I am a tuple test type +---@field [1] ? integer +---@field [2] ? string + ---@class UnitType --- I am a unit test type + diff --git a/crates/ladfile/test_assets/test.lad.json b/crates/ladfile/test_assets/test.lad.json index 10765db1e4..7696fd42d7 100644 --- a/crates/ladfile/test_assets/test.lad.json +++ b/crates/ladfile/test_assets/test.lad.json @@ -3,7 +3,7 @@ "globals": { "my_static_instance": { "type_kind": { - "val": "ladfile_builder::test::StructType" + "val": "ladfile_builder::test::GenericStructType" }, "is_static": true }, @@ -37,10 +37,31 @@ } }, "types": { - "ladfile_builder::test::StructType": { - "identifier": "StructType", + "ladfile_builder::test::PlainStructType": { + "identifier": "PlainStructType", "crate": "ladfile_builder", - "path": "ladfile_builder::test::StructType", + "path": "ladfile_builder::test::PlainStructType", + "documentation": " I am a simple plain struct type", + "associated_functions": [ + "ladfile_builder::test::PlainStructType::plain_struct_function" + ], + "layout": { + "kind": "Struct", + "name": "PlainStructType", + "fields": [ + { + "name": "int_field", + "type": "usize" + } + ] + }, + "generated": false, + "insignificance": 1000 + }, + "ladfile_builder::test::GenericStructType": { + "identifier": "GenericStructType", + "crate": "ladfile_builder", + "path": "ladfile_builder::test::GenericStructType", "generics": [ { "type_id": "usize", @@ -49,11 +70,11 @@ ], "documentation": " I am a struct", "associated_functions": [ - "ladfile_builder::test::StructType::hello_world" + "ladfile_builder::test::GenericStructType::hello_world" ], "layout": { "kind": "Struct", - "name": "StructType", + "name": "GenericStructType", "fields": [ { "name": "field", @@ -154,8 +175,8 @@ } } }, - "ladfile_builder::test::StructType::hello_world": { - "namespace": "ladfile_builder::test::StructType", + "ladfile_builder::test::GenericStructType::hello_world": { + "namespace": "ladfile_builder::test::GenericStructType", "identifier": "hello_world", "arguments": [ { @@ -198,6 +219,27 @@ "documentation": "I am some docs for the return type, I provide a name for the return value too", "name": "return" } + }, + "ladfile_builder::test::PlainStructType::plain_struct_function": { + "namespace": "ladfile_builder::test::PlainStructType", + "identifier": "plain_struct_function", + "arguments": [ + { + "kind": { + "ref": "ladfile_builder::test::PlainStructType" + } + }, + { + "kind": { + "primitive": "usize" + } + } + ], + "return_type": { + "kind": { + "unknown": "ladfile_builder::test::PlainStructType" + } + } } }, "primitives": { diff --git a/crates/ladfile_builder/src/lib.rs b/crates/ladfile_builder/src/lib.rs index be099c86e3..3f75b81e79 100644 --- a/crates/ladfile_builder/src/lib.rs +++ b/crates/ladfile_builder/src/lib.rs @@ -1064,14 +1064,26 @@ mod test { #[derive(Reflect)] /// I am a struct - struct StructType { + struct GenericStructType { /// hello from field field: usize, /// hello from field 2 field2: T, } - impl TypedThrough for StructType { + impl TypedThrough for GenericStructType { + fn through_type_info() -> ThroughTypeInfo { + ThroughTypeInfo::TypeInfo(Self::type_info()) + } + } + + #[derive(Reflect)] + /// I am a simple plain struct type + struct PlainStructType { + int_field: usize, + } + + impl TypedThrough for PlainStructType { fn through_type_info() -> ThroughTypeInfo { ThroughTypeInfo::TypeInfo(Self::type_info()) } @@ -1104,20 +1116,31 @@ mod test { TupleStruct(usize, #[doc = "asd"] String), } - type_registry.register::>(); + type_registry.register::>(); type_registry.register::(); type_registry.register::(); type_registry.register::(); + type_registry.register::(); + + let plain_struct_function = + |_: Ref, _: usize| PlainStructType { int_field: 2 }; + let plain_struct_function_info = plain_struct_function.get_function_info( + "plain_struct_function".into(), + PlainStructType::into_namespace(), + ); let function = |_: ReflectReference, _: usize| 2usize; let function_info = function - .get_function_info("hello_world".into(), StructType::::into_namespace()) + .get_function_info( + "hello_world".into(), + GenericStructType::::into_namespace(), + ) .with_docs("hello docs"); let function_with_complex_args = |_: ReflectReference, _: (usize, String), _: Option>>| 2usize; let function_with_complex_args_info = function_with_complex_args - .get_function_info("hello_world".into(), StructType::::into_namespace()) + .get_function_info("hello_world".into(), GenericStructType::::into_namespace()) .with_arg_names(&["ref_", "tuple", "option_vec_ref_wrapper"]) .with_docs( "Arguments: ".to_owned() @@ -1141,14 +1164,16 @@ mod test { let mut lad_file = LadFileBuilder::new(&type_registry) .set_description("## Hello gentlemen\n I am markdown file.\n - hello\n - world") .set_sorted(true) + .add_function_info(&plain_struct_function_info) .add_function_info(&function_info) .add_function_info(&global_function_info) .add_function_info(&function_with_complex_args_info) - .add_type::>() + .add_type::>() .add_type::() .add_type::() + .add_type::() .add_type_info(EnumType::type_info()) - .add_instance::>>("my_static_instance", true) + .add_instance::>>("my_static_instance", true) .add_instance::>>("my_non_static_instance", false) .add_instance::>>("map", false) .build(); From fa990271aad1bf6d4829b4fa64119ea0bfa7c3ed Mon Sep 17 00:00:00 2001 From: makspll Date: Tue, 28 Oct 2025 08:24:35 +0000 Subject: [PATCH 07/20] more progress --- assets/definitions/bindings.lua | 28201 +++++++++++++++- .../bindings.lua/bindings.lua | 2201 -- .../src/convert.rs | 54 +- .../src/keywords.rs | 38 + .../src/lib.rs | 1 + .../src/lua_declaration_file.rs | 1 + .../templates/declaration_file.tera | 11 +- .../tests/example_ladfile/expected.lua | 6 +- crates/ladfile/src/lib.rs | 11 + 9 files changed, 27553 insertions(+), 2971 deletions(-) delete mode 100644 crates/lad_backends/lua_language_server_lad_backend/bindings.lua/bindings.lua create mode 100644 crates/lad_backends/lua_language_server_lad_backend/src/keywords.rs diff --git a/assets/definitions/bindings.lua b/assets/definitions/bindings.lua index 0fd3b08d4b..3fbbf01067 100644 --- a/assets/definitions/bindings.lua +++ b/assets/definitions/bindings.lua @@ -3,6 +3,173 @@ ---@class World --- The ECS world containing all Components, Resources and Systems. Main point of interaction with a Bevy App. +World = {} + +---@package +---@return ScriptQueryBuilder +function World.query() end + +---@package +---@param e Entity + +---@return boolean +function World.has_entity(e) end + +---@package +---@param entity Entity + +---@param registration ScriptComponentRegistration +--- The resource to add. +---@return [] +function World.add_default_component(entity,registration) end + +---@package +---@param handle_reference ReflectReference + +---@return boolean +function World.has_asset(handle_reference) end + +---@package +---@param entity Entity +--- The entity to retrieve the parent of. +---@return Entity | nil +function World.get_parent(entity) end + +---@package +---@param registration ScriptResourceRegistration +--- The registration of the resource to check for. +---@return boolean +function World.has_resource(registration) end + +---@package +---@param entity Entity +--- The entity to retrieve the component from. +---@param registration ScriptComponentRegistration +--- The component to retrieve. +---@return ReflectReference | nil +function World.get_component(entity,registration) end + +---@package +---@param entity Entity +--- The entity to check. +---@param registration ScriptComponentRegistration +--- The component to check for. +---@return boolean +function World.has_component(entity,registration) end + +---@package +---@param entity Entity +--- The entity to despawn. +---@return [] +function World.despawn(entity) end + +---@package +---@param entity Entity +--- The parent entity to receive children +---@param index integer +--- The index to insert the children at +---@param children Entity[] +--- The children entities to insert +---@return [] +function World.insert_children(entity,index,children) end + +---@package +---@return [] +function World.exit() end + +---@package +---@param entity Entity +--- The entity to insert the component into. +---@param registration ScriptComponentRegistration +--- The component registration of the component to insert. +---@param value ReflectReference +--- The value of the component to insert. Can be constructed using `construct` +---@return [] +function World.insert_component(entity,registration,value) end + +---@package +---@param name string +--- The name of the component type +---@return ScriptComponentRegistration +function World.register_new_component(name) end + +---@package +---@param registration ScriptResourceRegistration +--- The resource to remove. +---@return [] +function World.remove_resource(registration) end + +---@package +---@param entity Entity +--- The entity to remove the component from. +---@param registration ScriptComponentRegistration +--- The component to remove. +---@return [] +function World.remove_component(entity,registration) end + +---@package +---@param entity Entity +--- The entity to despawn the descendants of. +---@return [] +function World.despawn_descendants(entity) end + +---@package +---@param handle_reference ReflectReference +--- The handle to the asset (as a reflect reference). +---@param registration ScriptTypeRegistration +--- The type registration of the asset type. +---@return ReflectReference | nil +function World.get_asset(handle_reference,registration) end + +---@package +---@param registration ScriptResourceRegistration +--- The registration of the resource to retrieve. +---@return ReflectReference | nil +function World.get_resource(registration) end + +---@package +---@param entity Entity +--- The entity to despawn recursively. +---@return [] +function World.despawn_recursive(entity) end + +---@package +---@param entity Entity +--- The parent entity to receive children +---@param children Entity[] +--- The children entities to push +---@return [] +function World.push_children(entity,children) end + +---@package +---@param name string +--- The name of the schedule to retrieve. +---@return ReflectSchedule | nil +function World.get_schedule_by_name(name) end + +---@package +---@param entity Entity +--- The entity to retrieve the children of. +---@return Entity[] +function World.get_children(entity) end + +---@package +---@param type_name string +--- The name of the type to retrieve. +---@return ScriptTypeRegistration | ScriptComponentRegistration | ScriptResourceRegistration | nil +function World.get_type_by_name(type_name) end + +---@package +---@param schedule ReflectSchedule +--- The schedule to add the system to. +---@param builder ScriptSystemBuilder +--- The system builder specifying the system and its dependencies. +---@return ReflectSystem +function World.add_system(schedule,builder) end + +---@package +---@return Entity +function World.spawn() end ---@class ScriptComponentRegistration @@ -10,45 +177,492 @@ ---@field registration ? ScriptTypeRegistration ---@field component_id ? ComponentId ---@field is_dynamic_script_component ? boolean +ScriptComponentRegistration = {} + +---@package +---@param registration ScriptComponentRegistration +--- The type registration. +---@return string +function ScriptComponentRegistration:type_name(registration) end + +---@package +---@param registration ScriptComponentRegistration +--- The type registration. +---@return string +function ScriptComponentRegistration:short_name(registration) end ---@class ScriptQueryBuilder --- The query builder is used to build ECS queries which retrieve spefific components filtered by specific conditions.--- --- For example:--- ```rust,ignore--- builder.component(componentA)--- .component(componentB)--- .with(componentC)--- .without(componentD) --- ```--- --- Will retrieve entities which:--- - Have componentA--- - Have componentB--- - Have componentC--- - Do not have componentD--- --- As well as references to components:--- - componentA--- - componentB +ScriptQueryBuilder = {} + +---@package +---@param query ScriptQueryBuilder +--- The query to add the component to +---@param with ScriptComponentRegistration + +---@return ScriptQueryBuilder +function ScriptQueryBuilder:with(query,with) end + +---@package +---@param query ScriptQueryBuilder +--- The query to add the component to +---@param components ScriptComponentRegistration + +---@return ScriptQueryBuilder +function ScriptQueryBuilder:component(query,components) end + +---@package +---@param query ScriptQueryBuilder +--- The query to add the component to +---@param without ScriptComponentRegistration + +---@return ScriptQueryBuilder +function ScriptQueryBuilder:without(query,without) end + +---@package +---@param query ScriptQueryBuilder +--- The query to build. +---@return ScriptQueryResult[] +function ScriptQueryBuilder.build(query) end ---@class ScriptQueryResult --- A result from a query. +ScriptQueryResult = {} + +---@package +---@param query ScriptQueryResult +--- The query result to retrieve the components from. +---@return ReflectReference[] +function ScriptQueryResult:components(query) end + +---@package +---@param query ScriptQueryResult +--- The query result to retrieve the entity from. +---@return Entity +function ScriptQueryResult:entity(query) end ---@class ScriptResourceRegistration --- A reference to a resource type's reflection registration.--- --- In general think of this as a handle to a type. ---@field registration ? ScriptTypeRegistration ---@field resource_id ? ComponentId +ScriptResourceRegistration = {} + +---@package +---@param registration ScriptResourceRegistration +--- The type registration. +---@return string +function ScriptResourceRegistration:type_name(registration) end + +---@package +---@param registration ScriptResourceRegistration +--- The type registration. +---@return string +function ScriptResourceRegistration:short_name(registration) end ---@class ScriptTypeRegistration --- A reference to a type which is not a `Resource` or `Component`.--- --- In general think of this as a handle to a type. +ScriptTypeRegistration = {} + +---@package +---@param registration ScriptTypeRegistration +--- The type registration. +---@return string +function ScriptTypeRegistration:type_name(registration) end + +---@package +---@param registration ScriptTypeRegistration +--- The type registration. +---@return string +function ScriptTypeRegistration:short_name(registration) end ---@class ScriptSystemBuilder --- A builder for systems living in scripts +ScriptSystemBuilder = {} + +---@package +---@param builder ScriptSystemBuilder +--- The system builder to add the dependency to. +---@param system ReflectSystem +--- The system to run after. +---@return ScriptSystemBuilder +function ScriptSystemBuilder:after(builder,system) end + +---@package +---@param builder ScriptSystemBuilder +--- The system builder to make exclusive. +---@return ScriptSystemBuilder +function ScriptSystemBuilder:exclusive(builder) end + +---@package +---@param builder ScriptSystemBuilder +--- The system builder to add the dependency to. +---@param system ReflectSystem +--- The system to run before. +---@return ScriptSystemBuilder +function ScriptSystemBuilder:before(builder,system) end + +---@package +---@param builder ScriptSystemBuilder +--- The system builder to add the query to. +---@param query ScriptQueryBuilder +--- The query to add. +---@return ScriptSystemBuilder +function ScriptSystemBuilder:query(builder,query) end + +---@package +---@param builder ScriptSystemBuilder +--- The system builder to add the resource to. +---@param resource ScriptResourceRegistration +--- The resource to add. +---@return ScriptSystemBuilder +function ScriptSystemBuilder:resource(builder,resource) end ---@class ScriptAttachment --- Specifies a unique attachment of a script. These attachments are mapped to [`ContextKey`]'s depending on the context policy used. +ScriptAttachment = {} + +---@package +---@param entity Entity +--- The entity to attach the script to. +---@param script Handle +--- The script asset to attach to the entity. +---@return ScriptAttachment +function ScriptAttachment.new_entity_script(entity,script) end + +---@package +---@param script Handle +--- The script asset to create the attachment from. +---@return ScriptAttachment +function ScriptAttachment.new_static_script(script) end ---@class ReflectSchedule --- A reflectable schedule. ---@field type_path ? string ---@field label ? ReflectableScheduleLabel +ReflectSchedule = {} + +---@package +---@param schedule ReflectSchedule +--- The schedule to retrieve the systems from. +---@return ReflectSystem[] +function ReflectSchedule.systems(schedule) end + +---@package +---@param schedule ReflectSchedule +--- The schedule to retrieve the system from. +---@param name string +--- The identifier or full path of the system to retrieve. +---@return ReflectSystem | nil +function ReflectSchedule.get_system_by_name(schedule,name) end + +---@package +---@param schedule ReflectSchedule +--- The schedule to render. +---@return string +function ReflectSchedule.render_dot(schedule) end + ---@class ReflectSystem --- A reflectable system. +ReflectSystem = {} + +---@package +---@param system ReflectSystem +--- The system to retrieve the identifier from. +---@return string +function ReflectSystem:identifier(system) end + +---@package +---@param system ReflectSystem +--- The system to retrieve the path from. +---@return string +function ReflectSystem:path(system) end ---@class Color --- An enumerated type that can represent any of the color types in this crate.--- --- This is useful when you need to store a color in a data structure that can't be generic over--- the color type.---
---
--- --- # Operations--- --- [`Color`] supports all the standard color operations, such as [mixing](Mix),--- [luminance](Luminance) and [hue](Hue) adjustment,--- and [diffing](EuclideanDistance). These operations delegate to the concrete color space contained--- by [`Color`], but will convert to [`Oklch`](Oklcha) for operations which aren't supported in the--- current space. After performing the operation, if a conversion was required, the result will be--- converted back into the original color space.--- --- ```rust--- # use bevy_color::{Hue, Color};--- let red_hsv = Color::hsv(0., 1., 1.);--- let red_srgb = Color::srgb(1., 0., 0.);--- --- // HSV has a definition of hue, so it will be returned.--- red_hsv.hue();--- --- // SRGB doesn't have a native definition for hue.--- // Converts to Oklch and returns that result.--- red_srgb.hue();--- ```--- --- [`Oklch`](Oklcha) has been chosen as the intermediary space in cases where conversion is required--- due to its perceptual uniformity and broad support for Bevy's color operations.--- To avoid the cost of repeated conversion, and ensure consistent results where that is desired,--- first convert this [`Color`] into your desired color space. +Color = {} + +---@package +---@param _self Color + +---@return LinearRgba +function Color:to_linear(_self) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.5] +---@param chroma number +--- Chroma channel. [0.0, 1.5] +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Color +function Color.lcha(lightness,chroma,hue,alpha) end + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param saturation number +--- Saturation channel. [0.0, 1.0] +---@param value number +--- Value channel. [0.0, 1.0] +---@return Color +function Color.hsv(hue,saturation,value) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@param chroma number +--- Chroma channel. [0.0, 1.0] +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Color +function Color.oklcha(lightness,chroma,hue,alpha) end + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param whiteness number +--- Whiteness channel. [0.0, 1.0] +---@param blackness number +--- Blackness channel. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Color +function Color.hwba(hue,whiteness,blackness,alpha) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@param a number +--- Green-red channel. [-1.0, 1.0] +---@param b number +--- Blue-yellow channel. [-1.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Color +function Color.oklaba(lightness,a,b,alpha) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.5] +---@param a number +--- a axis. [-1.5, 1.5] +---@param b number +--- b axis. [-1.5, 1.5] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Color +function Color.laba(lightness,a,b,alpha) end + +---@package +---@param _self Color + +---@return Srgba +function Color:to_srgba(_self) end + +---@package +---@param red number +--- Red channel. [0.0, 1.0] +---@param green number +--- Green channel. [0.0, 1.0] +---@param blue number +--- Blue channel. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Color +function Color.srgba(red,green,blue,alpha) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@param a number +--- Green-red channel. [-1.0, 1.0] +---@param b number +--- Blue-yellow channel. [-1.0, 1.0] +---@return Color +function Color.oklab(lightness,a,b) end + +---@package +---@param x number +--- x-axis. [0.0, 1.0] +---@param y number +--- y-axis. [0.0, 1.0] +---@param z number +--- z-axis. [0.0, 1.0] +---@return Color +function Color.xyz(x,y,z) end + +---@package +---@param red number +--- Red channel. [0.0, 1.0] +---@param green number +--- Green channel. [0.0, 1.0] +---@param blue number +--- Blue channel. [0.0, 1.0] +---@return Color +function Color.srgb(red,green,blue) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@param chroma number +--- Chroma channel. [0.0, 1.0] +---@param hue number +--- Hue channel. [0.0, 360.0] +---@return Color +function Color.oklch(lightness,chroma,hue) end + +---@package +---@param red number +--- Red channel. [0.0, 1.0] +---@param green number +--- Green channel. [0.0, 1.0] +---@param blue number +--- Blue channel. [0.0, 1.0] +---@return Color +function Color.linear_rgb(red,green,blue) end + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param whiteness number +--- Whiteness channel. [0.0, 1.0] +---@param blackness number +--- Blackness channel. [0.0, 1.0] +---@return Color +function Color.hwb(hue,whiteness,blackness) end + +---@package +---@param red integer +--- Red channel. [0, 255] +---@param green integer +--- Green channel. [0, 255] +---@param blue integer +--- Blue channel. [0, 255] +---@return Color +function Color.srgb_u8(red,green,blue) end + +---@package +---@param _self Color + +---@return Color +function Color:clone(_self) end + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param saturation number +--- Saturation channel. [0.0, 1.0] +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Color +function Color.hsla(hue,saturation,lightness,alpha) end + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param saturation number +--- Saturation channel. [0.0, 1.0] +---@param value number +--- Value channel. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Color +function Color.hsva(hue,saturation,value,alpha) end + +---@package +---@param _self Color + +---@param other Color + +---@return boolean +function Color:eq(_self,other) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.5] +---@param a number +--- a axis. [-1.5, 1.5] +---@param b number +--- b axis. [-1.5, 1.5] +---@return Color +function Color.lab(lightness,a,b) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.5] +---@param chroma number +--- Chroma channel. [0.0, 1.5] +---@param hue number +--- Hue channel. [0.0, 360.0] +---@return Color +function Color.lch(lightness,chroma,hue) end + +---@package +---@param x number +--- x-axis. [0.0, 1.0] +---@param y number +--- y-axis. [0.0, 1.0] +---@param z number +--- z-axis. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Color +function Color.xyza(x,y,z,alpha) end + +---@package +---@param red number +--- Red channel. [0.0, 1.0] +---@param green number +--- Green channel. [0.0, 1.0] +---@param blue number +--- Blue channel. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Color +function Color.linear_rgba(red,green,blue,alpha) end + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param saturation number +--- Saturation channel. [0.0, 1.0] +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@return Color +function Color.hsl(hue,saturation,lightness) end + +---@package +---@param red integer +--- Red channel. [0, 255] +---@param green integer +--- Green channel. [0, 255] +---@param blue integer +--- Blue channel. [0, 255] +---@param alpha integer +--- Alpha channel. [0, 255] +---@return Color +function Color.srgba_u8(red,green,blue,alpha) end + +---@package +---@param array number[] +--- Red, Green and Blue channels. Each channel is in the range [0.0, 1.0] +---@return Color +function Color.srgb_from_array(array) end ---@class Hsla @@ -57,6 +671,65 @@ ---@field saturation ? number ---@field lightness ? number ---@field alpha ? number +Hsla = {} + +---@package +---@param _self Hsla + +---@param lightness number + +---@return Hsla +function Hsla:with_lightness(_self,lightness) end + +---@package +---@param _self Hsla + +---@return Hsla +function Hsla:clone(_self) end + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param saturation number +--- Saturation channel. [0.0, 1.0] +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Hsla +function Hsla.new(hue,saturation,lightness,alpha) end + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param saturation number +--- Saturation channel. [0.0, 1.0] +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@return Hsla +function Hsla.hsl(hue,saturation,lightness) end + +---@package +---@param _self Hsla + +---@param saturation number + +---@return Hsla +function Hsla:with_saturation(_self,saturation) end + +---@package +---@param index integer + +---@return Hsla +function Hsla.sequential_dispersed(index) end + +---@package +---@param _self Hsla + +---@param other Hsla + +---@return boolean +function Hsla:eq(_self,other) end ---@class Hsva @@ -65,6 +738,59 @@ ---@field saturation ? number ---@field value ? number ---@field alpha ? number +Hsva = {} + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param saturation number +--- Saturation channel. [0.0, 1.0] +---@param value number +--- Value channel. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Hsva +function Hsva.new(hue,saturation,value,alpha) end + +---@package +---@param _self Hsva + +---@param value number + +---@return Hsva +function Hsva:with_value(_self,value) end + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param saturation number +--- Saturation channel. [0.0, 1.0] +---@param value number +--- Value channel. [0.0, 1.0] +---@return Hsva +function Hsva.hsv(hue,saturation,value) end + +---@package +---@param _self Hsva + +---@return Hsva +function Hsva:clone(_self) end + +---@package +---@param _self Hsva + +---@param other Hsva + +---@return boolean +function Hsva:eq(_self,other) end + +---@package +---@param _self Hsva + +---@param saturation number + +---@return Hsva +function Hsva:with_saturation(_self,saturation) end ---@class Hwba @@ -73,6 +799,59 @@ ---@field whiteness ? number ---@field blackness ? number ---@field alpha ? number +Hwba = {} + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param whiteness number +--- Whiteness channel. [0.0, 1.0] +---@param blackness number +--- Blackness channel. [0.0, 1.0] +---@return Hwba +function Hwba.hwb(hue,whiteness,blackness) end + +---@package +---@param _self Hwba + +---@param blackness number + +---@return Hwba +function Hwba:with_blackness(_self,blackness) end + +---@package +---@param _self Hwba + +---@return Hwba +function Hwba:clone(_self) end + +---@package +---@param _self Hwba + +---@param other Hwba + +---@return boolean +function Hwba:eq(_self,other) end + +---@package +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param whiteness number +--- Whiteness channel. [0.0, 1.0] +---@param blackness number +--- Blackness channel. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Hwba +function Hwba.new(hue,whiteness,blackness,alpha) end + +---@package +---@param _self Hwba + +---@param whiteness number + +---@return Hwba +function Hwba:with_whiteness(_self,whiteness) end ---@class Laba @@ -81,1345 +860,27114 @@ ---@field a ? number ---@field b ? number ---@field alpha ? number +Laba = {} +---@package +---@param _self Laba ----@class Lcha ---- Color in LCH color space, with alpha---
---
----@field lightness ? number ----@field chroma ? number ----@field hue ? number ----@field alpha ? number +---@return Laba +function Laba:neg(_self) end +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.5] +---@param a number +--- a axis. [-1.5, 1.5] +---@param b number +--- b axis. [-1.5, 1.5] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Laba +function Laba.new(lightness,a,b,alpha) end ----@class LinearRgba ---- Linear RGB color with alpha.---
---
----@field red ? number ----@field green ? number ----@field blue ? number ----@field alpha ? number +---@package +---@param _self Laba +---@param rhs number ----@class Oklaba ---- Color in Oklab color space, with alpha---
---
----@field lightness ? number ----@field a ? number ----@field b ? number ----@field alpha ? number +---@return Laba +function Laba:div(_self,rhs) end +---@package +---@param _self Laba ----@class Oklcha ---- Color in Oklch color space, with alpha---
---
----@field lightness ? number ----@field chroma ? number ----@field hue ? number ----@field alpha ? number +---@param rhs Laba +---@return Laba +function Laba:add(_self,rhs) end ----@class Srgba ---- Non-linear standard RGB with alpha.---
---
----@field red ? number ----@field green ? number ----@field blue ? number ----@field alpha ? number +---@package +---@param _self Laba +---@param lightness number ----@class Xyza ---- [CIE 1931](https://en.wikipedia.org/wiki/CIE_1931_color_space) color space, also known as XYZ, with an alpha channel.---
---
----@field x ? number ----@field y ? number ----@field z ? number ----@field alpha ? number +---@return Laba +function Laba:with_lightness(_self,lightness) end +---@package +---@param _self Laba ----@class AutoExposureCompensationCurve ---- An auto exposure compensation curve.--- This curve is used to map the average log luminance of a scene to an--- exposure compensation value, to allow for fine control over the final exposure. ----@field min_log_lum ? number ----@field max_log_lum ? number ----@field min_compensation ? number ----@field max_compensation ? number ----@field lut ? [u8; 256] +---@param rhs number +---@return Laba +function Laba:mul(_self,rhs) end ----@class AutoExposure ---- Component that enables auto exposure for an HDR-enabled 2d or 3d camera.--- --- Auto exposure adjusts the exposure of the camera automatically to--- simulate the human eye's ability to adapt to different lighting conditions.--- --- Bevy's implementation builds a 64 bin histogram of the scene's luminance,--- and then adjusts the exposure so that the average brightness of the final--- render will be middle gray. Because it's using a histogram, some details can--- be selectively ignored or emphasized. Outliers like shadows and specular--- highlights can be ignored, and certain areas can be given more (or less)--- weight based on a mask.--- --- # Usage Notes--- --- **Auto Exposure requires compute shaders and is not compatible with WebGL2.** ----@field range ? RangeInclusive ----@field filter ? RangeInclusive ----@field speed_brighten ? number ----@field speed_darken ? number ----@field exponential_transition_distance ? number ----@field metering_mask ? Handle ----@field compensation_curve ? Handle +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.5] +---@param a number +--- a axis. [-1.5, 1.5] +---@param b number +--- b axis. [-1.5, 1.5] +---@return Laba +function Laba.lab(lightness,a,b) end +---@package +---@param _self Laba ----@class Bloom ---- Applies a bloom effect to an HDR-enabled 2d or 3d camera.--- --- Bloom emulates an effect found in real cameras and the human eye,--- causing halos to appear around very bright parts of the scene.--- --- See also .--- --- # Usage Notes--- --- **Bloom is currently not compatible with WebGL2.**--- --- Often used in conjunction with `bevy_pbr::StandardMaterial::emissive` for 3d meshes.--- --- Bloom is best used alongside a tonemapping function that desaturates bright colors,--- such as [`crate::tonemapping::Tonemapping::TonyMcMapface`].--- --- Bevy's implementation uses a parametric curve to blend between a set of--- blurred (lower frequency) images generated from the camera's view.--- See for a visualization of the parametric curve--- used in Bevy as well as a visualization of the curve's respective scattering profile. ----@field intensity ? number ----@field low_frequency_boost ? number ----@field low_frequency_boost_curvature ? number ----@field high_pass_frequency ? number ----@field prefilter ? BloomPrefilter ----@field composite_mode ? BloomCompositeMode ----@field max_mip_dimension ? integer ----@field scale ? Vec2 +---@param other Laba +---@return boolean +function Laba:eq(_self,other) end ----@class BloomCompositeMode +---@package +---@param _self Laba +---@param rhs Laba +---@return Laba +function Laba:sub(_self,rhs) end ----@class BloomPrefilter ---- Applies a threshold filter to the input image to extract the brightest--- regions before blurring them and compositing back onto the original image.--- These settings are useful when emulating the 1990s-2000s game look.--- --- # Considerations--- * Changing these settings creates a physically inaccurate image--- * Changing these settings makes it easy to make the final result look worse--- * Non-default prefilter settings should be used in conjunction with [`BloomCompositeMode::Additive`] ----@field threshold ? number ----@field threshold_softness ? number +---@package +---@param _self Laba +---@return Laba +function Laba:clone(_self) end ----@class ContrastAdaptiveSharpening ---- Applies a contrast adaptive sharpening (CAS) filter to the camera.--- --- CAS is usually used in combination with shader based anti-aliasing methods--- such as FXAA or TAA to regain some of the lost detail from the blurring that they introduce.--- --- CAS is designed to adjust the amount of sharpening applied to different areas of an image--- based on the local contrast. This can help avoid over-sharpening areas with high contrast--- and under-sharpening areas with low contrast.--- --- To use this, add the [`ContrastAdaptiveSharpening`] component to a 2D or 3D camera. ----@field enabled ? boolean ----@field sharpening_strength ? number ----@field denoise ? boolean +---@class Lcha +--- Color in LCH color space, with alpha---
---
+---@field lightness ? number +---@field chroma ? number +---@field hue ? number +---@field alpha ? number +Lcha = {} ----@class DenoiseCas +---@package +---@param _self Lcha ----@field [1] ? boolean +---@param chroma number +---@return Lcha +function Lcha:with_chroma(_self,chroma) end ----@class Camera2d ---- A 2D camera component. Enables the 2D render graph for a [`Camera`]. +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.5] +---@param chroma number +--- Chroma channel. [0.0, 1.5] +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Lcha +function Lcha.new(lightness,chroma,hue,alpha) end +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.5] +---@param chroma number +--- Chroma channel. [0.0, 1.5] +---@param hue number +--- Hue channel. [0.0, 360.0] +---@return Lcha +function Lcha.lch(lightness,chroma,hue) end ----@class Camera3d ---- A 3D camera component. Enables the main 3D render graph for a [`Camera`].--- --- The camera coordinate space is right-handed X-right, Y-up, Z-back.--- This means "forward" is -Z. ----@field depth_load_op ? Camera3dDepthLoadOp ----@field depth_texture_usages ? Camera3dDepthTextureUsage ----@field screen_space_specular_transmission_steps ? integer ----@field screen_space_specular_transmission_quality ? ScreenSpaceTransmissionQuality +---@package +---@param _self Lcha +---@param other Lcha ----@class Camera3dDepthLoadOp ---- The depth clear operation to perform for the main 3d pass. +---@return boolean +function Lcha:eq(_self,other) end +---@package +---@param index integer ----@class Camera3dDepthTextureUsage +---@return Lcha +function Lcha.sequential_dispersed(index) end ----@field [1] ? integer +---@package +---@param _self Lcha +---@param lightness number ----@class ScreenSpaceTransmissionQuality ---- The quality of the screen space transmission blur effect, applied to whatever's “behind” transmissive--- objects when their `roughness` is greater than `0.0`.--- --- Higher qualities are more GPU-intensive.--- --- **Note:** You can get better-looking results at any quality level by enabling TAA. See: [`TemporalAntiAliasPlugin`](crate::experimental::taa::TemporalAntiAliasPlugin). +---@return Lcha +function Lcha:with_lightness(_self,lightness) end +---@package +---@param _self Lcha ----@class DepthOfField ---- A component that enables a [depth of field] postprocessing effect when attached to a [`Camera3d`],--- simulating the focus of a camera lens.--- --- [depth of field]: https://en.wikipedia.org/wiki/Depth_of_field ----@field mode ? DepthOfFieldMode ----@field focal_distance ? number ----@field sensor_height ? number ----@field aperture_f_stops ? number ----@field max_circle_of_confusion_diameter ? number ----@field max_depth ? number +---@return Lcha +function Lcha:clone(_self) end ----@class DepthOfFieldMode ---- Controls the appearance of the effect. +---@class LinearRgba +--- Linear RGB color with alpha.---
---
+---@field red ? number +---@field green ? number +---@field blue ? number +---@field alpha ? number +LinearRgba = {} +---@package +---@param _self LinearRgba ----@class Fxaa ---- A component for enabling Fast Approximate Anti-Aliasing (FXAA)--- for a [`bevy_render::camera::Camera`]. ----@field enabled ? boolean ----@field edge_threshold ? Sensitivity ----@field edge_threshold_min ? Sensitivity +---@return integer +function LinearRgba:as_u32(_self) end +---@package +---@param _self LinearRgba ----@class Sensitivity +---@param other LinearRgba +---@return boolean +function LinearRgba:eq(_self,other) end +---@package +---@param red number +--- Red channel. [0.0, 1.0] +---@param green number +--- Green channel. [0.0, 1.0] +---@param blue number +--- Blue channel. [0.0, 1.0] +---@return LinearRgba +function LinearRgba.rgb(red,green,blue) end ----@class MotionBlur ---- A component that enables and configures motion blur when added to a camera.--- --- Motion blur is an effect that simulates how moving objects blur as they change position during--- the exposure of film, a sensor, or an eyeball.--- --- Because rendering simulates discrete steps in time, we use per-pixel motion vectors to estimate--- the path of objects between frames. This kind of implementation has some artifacts:--- - Fast moving objects in front of a stationary object or when in front of empty space, will not--- have their edges blurred.--- - Transparent objects do not write to depth or motion vectors, so they cannot be blurred.--- --- Other approaches, such as *A Reconstruction Filter for Plausible Motion Blur* produce more--- correct results, but are more expensive and complex, and have other kinds of artifacts. This--- implementation is relatively inexpensive and effective.--- --- # Usage--- --- Add the [`MotionBlur`] component to a camera to enable and configure motion blur for that--- camera.--- --- ```--- # use bevy_core_pipeline::{core_3d::Camera3d, motion_blur::MotionBlur};--- # use bevy_ecs::prelude::*;--- # fn test(mut commands: Commands) {--- commands.spawn((--- Camera3d::default(),--- MotionBlur::default(),--- ));--- # }--- ```` ----@field shutter_angle ? number ----@field samples ? integer +---@package +---@param _self LinearRgba +---@param rhs number ----@class OrderIndependentTransparencySettings ---- Used to identify which camera will use OIT to render transparent meshes--- and to configure OIT. ----@field layer_count ? integer ----@field alpha_threshold ? number +---@return LinearRgba +function LinearRgba:div(_self,rhs) end +---@package +---@param red number ----@class ChromaticAberration ---- Adds colored fringes to the edges of objects in the scene.--- --- [Chromatic aberration] simulates the effect when lenses fail to focus all--- colors of light toward a single point. It causes rainbow-colored streaks to--- appear, which are especially apparent on the edges of objects. Chromatic--- aberration is commonly used for collision effects, especially in horror--- games.--- --- Bevy's implementation is based on that of *Inside* ([Gjøl & Svendsen 2016]).--- It's based on a customizable lookup texture, which allows for changing the--- color pattern. By default, the color pattern is simply a 3×1 pixel texture--- consisting of red, green, and blue, in that order, but you can change it to--- any image in order to achieve different effects.--- --- [Chromatic aberration]: https://en.wikipedia.org/wiki/Chromatic_aberration--- --- [Gjøl & Svendsen 2016]: https://github.com/playdeadgames/publications/blob/master/INSIDE/rendering_inside_gdc2016.pdf ----@field color_lut ? Handle ----@field intensity ? number ----@field max_samples ? integer +---@param green number +---@param blue number ----@class DepthPrepass ---- If added to a [`crate::prelude::Camera3d`] then depth values will be copied to a separate texture available to the main pass. +---@param alpha number +---@return LinearRgba +function LinearRgba.new(red,green,blue,alpha) end ----@class MotionVectorPrepass ---- If added to a [`crate::prelude::Camera3d`] then screen space motion vectors will be copied to a separate texture available to the main pass. +---@package +---@param _self LinearRgba +---@param rhs LinearRgba ----@class NormalPrepass ---- If added to a [`crate::prelude::Camera3d`] then vertex world normals will be copied to a separate texture available to the main pass.--- Normals will have normal map textures already applied. +---@return LinearRgba +function LinearRgba:sub(_self,rhs) end +---@package +---@param _self LinearRgba ----@class Skybox ---- Adds a skybox to a 3D camera, based on a cubemap texture.--- --- Note that this component does not (currently) affect the scene's lighting.--- To do so, use `EnvironmentMapLight` alongside this component.--- --- See also . ----@field image ? Handle ----@field brightness ? number ----@field rotation ? Quat +---@return LinearRgba +function LinearRgba:clone(_self) end +---@package +---@param _self LinearRgba ----@class Smaa ---- A component for enabling Subpixel Morphological Anti-Aliasing (SMAA)--- for a [`bevy_render::camera::Camera`]. ----@field preset ? SmaaPreset +---@param rhs LinearRgba +---@return LinearRgba +function LinearRgba:add(_self,rhs) end ----@class SmaaPreset ---- A preset quality level for SMAA.--- --- Higher values are slower but result in a higher-quality image.--- --- The default value is *high*. +---@package +---@param _self LinearRgba +---@param rhs number ----@class TemporalAntiAliasing ---- Component to apply temporal anti-aliasing to a 3D perspective camera.--- --- Temporal anti-aliasing (TAA) is a form of image smoothing/filtering, like--- multisample anti-aliasing (MSAA), or fast approximate anti-aliasing (FXAA).--- TAA works by blending (averaging) each frame with the past few frames.--- --- # Tradeoffs--- --- Pros:--- * Filters more types of aliasing than MSAA, such as textures and singular bright pixels (specular aliasing)--- * Cost scales with screen/view resolution, unlike MSAA which scales with number of triangles--- * Greatly increases the quality of stochastic rendering techniques such as SSAO, certain shadow map sampling methods, etc--- --- Cons:--- * Chance of "ghosting" - ghostly trails left behind moving objects--- * Thin geometry, lighting detail, or texture lines may flicker noisily or disappear--- --- Because TAA blends past frames with the current frame, when the frames differ too much--- (such as with fast moving objects or camera cuts), ghosting artifacts may occur.--- --- Artifacts tend to be reduced at higher framerates and rendering resolution.--- --- # Usage Notes--- --- The [`TemporalAntiAliasPlugin`] must be added to your app.--- Any camera with this component must also disable [`Msaa`] by setting it to [`Msaa::Off`].--- --- [Currently](https://github.com/bevyengine/bevy/issues/8423), TAA cannot be used with [`bevy_render::camera::OrthographicProjection`].--- --- TAA also does not work well with alpha-blended meshes, as it requires depth writing to determine motion.--- --- It is very important that correct motion vectors are written for everything on screen.--- Failure to do so will lead to ghosting artifacts. For instance, if particle effects--- are added using a third party library, the library must either:--- --- 1. Write particle motion vectors to the motion vectors prepass texture--- 2. Render particles after TAA--- --- If no [`MipBias`] component is attached to the camera, TAA will add a `MipBias(-1.0)` component. ----@field reset ? boolean +---@return LinearRgba +function LinearRgba:mul(_self,rhs) end +---@package +---@param _self LinearRgba ----@class DebandDither ---- Enables a debanding shader that applies dithering to mitigate color banding in the final image for a given [`Camera`] entity. +---@param red number +---@return LinearRgba +function LinearRgba:with_red(_self,red) end ----@class Tonemapping ---- Optionally enables a tonemapping shader that attempts to map linear input stimulus into a perceptually uniform image for a given [`Camera`] entity. +---@package +---@param _self LinearRgba +---@param green number ----@class ComponentId ---- A value which uniquely identifies the type of a [`Component`] or [`Resource`] within a--- [`World`].--- --- Each time a new `Component` type is registered within a `World` using--- e.g. [`World::register_component`] or [`World::register_component_with_descriptor`]--- or a Resource with e.g. [`World::init_resource`],--- a corresponding `ComponentId` is created to track it.--- --- While the distinction between `ComponentId` and [`TypeId`] may seem superficial, breaking them--- into two separate but related concepts allows components to exist outside of Rust's type system.--- Each Rust type registered as a `Component` will have a corresponding `ComponentId`, but additional--- `ComponentId`s may exist in a `World` to track components which cannot be--- represented as Rust types for scripting or other advanced use-cases.--- --- A `ComponentId` is tightly coupled to its parent `World`. Attempting to use a `ComponentId` from--- one `World` to access the metadata of a `Component` in a different `World` is undefined behavior--- and must not be attempted.--- --- Given a type `T` which implements [`Component`], the `ComponentId` for `T` can be retrieved--- from a `World` using [`World::component_id()`] or via [`Components::component_id()`]. Access--- to the `ComponentId` for a [`Resource`] is available via [`Components::resource_id()`]. ----@field [1] ? integer +---@return LinearRgba +function LinearRgba:with_green(_self,green) end +---@package +---@param _self LinearRgba ----@class ComponentTicks ---- Records when a component or resource was added and when it was last mutably dereferenced (or added). ----@field added ? Tick ----@field changed ? Tick +---@return LinearRgba +function LinearRgba:neg(_self) end +---@package +---@param _self LinearRgba ----@class Tick ---- A value that tracks when a system ran relative to other systems.--- This is used to power change detection.--- --- *Note* that a system that hasn't been run yet has a `Tick` of 0. ----@field tick ? integer +---@param blue number +---@return LinearRgba +function LinearRgba:with_blue(_self,blue) end ----@class Entity ---- Lightweight identifier of an [entity](crate::entity).--- --- The identifier is implemented using a [generational index]: a combination of an index and a generation.--- This allows fast insertion after data removal in an array while minimizing loss of spatial locality.--- --- These identifiers are only valid on the [`World`] it's sourced from. Attempting to use an `Entity` to--- fetch entity components or metadata from a different world will either fail or return unexpected results.--- --- [generational index]: https://lucassardois.medium.com/generational-indices-guide-8e3c5f7fd594--- --- # Stability warning--- For all intents and purposes, `Entity` should be treated as an opaque identifier. The internal bit--- representation is liable to change from release to release as are the behaviors or performance--- characteristics of any of its trait implementations (i.e. `Ord`, `Hash`, etc.). This means that changes in--- `Entity`'s representation, though made readable through various functions on the type, are not considered--- breaking changes under [SemVer].--- --- In particular, directly serializing with `Serialize` and `Deserialize` make zero guarantee of long--- term wire format compatibility. Changes in behavior will cause serialized `Entity` values persisted--- to long term storage (i.e. disk, databases, etc.) will fail to deserialize upon being updated.--- --- # Usage--- --- This data type is returned by iterating a `Query` that has `Entity` as part of its query fetch type parameter ([learn more]).--- It can also be obtained by calling [`EntityCommands::id`] or [`EntityWorldMut::id`].--- --- ```--- # use bevy_ecs::prelude::*;--- # #[derive(Component)]--- # struct SomeComponent;--- fn setup(mut commands: Commands) {--- // Calling `spawn` returns `EntityCommands`.--- let entity = commands.spawn(SomeComponent).id();--- }--- --- fn exclusive_system(world: &mut World) {--- // Calling `spawn` returns `EntityWorldMut`.--- let entity = world.spawn(SomeComponent).id();--- }--- #--- # bevy_ecs::system::assert_is_system(setup);--- # bevy_ecs::system::assert_is_system(exclusive_system);--- ```--- --- 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.--- --- ```--- # use bevy_ecs::prelude::*;--- #--- # #[derive(Component)]--- # struct Expired;--- #--- fn dispose_expired_food(mut commands: Commands, query: Query>) {--- for food_entity in &query {--- commands.entity(food_entity).despawn();--- }--- }--- #--- # bevy_ecs::system::assert_is_system(dispose_expired_food);--- ```--- --- [learn more]: crate::system::Query#entity-id-access--- [`EntityCommands::id`]: crate::system::EntityCommands::id--- [`EntityWorldMut::id`]: crate::world::EntityWorldMut::id--- [`EntityCommands`]: crate::system::EntityCommands--- [`Query::get`]: crate::system::Query::get--- [`World`]: crate::world::World--- [SemVer]: https://semver.org/ +---@class Oklaba +--- Color in Oklab color space, with alpha---
---
+---@field lightness ? number +---@field a ? number +---@field b ? number +---@field alpha ? number +Oklaba = {} ----@class EntityHash ---- A [`BuildHasher`] that results in a [`EntityHasher`]. +---@package +---@param _self Oklaba +---@param rhs Oklaba ----@class EntityHashSet ---- A [`HashSet`] pre-configured to use [`EntityHash`] hashing. ----@field [1] ? HashSet +---@return Oklaba +function Oklaba:sub(_self,rhs) end +---@package +---@param _self Oklaba ----@class DefaultQueryFilters ---- Default query filters work by excluding entities with certain components from most queries.--- --- If a query does not explicitly mention a given disabling component, it will not include entities with that component.--- To be more precise, this checks if the query's [`FilteredAccess`] contains the component,--- and if it does not, adds a [`Without`](crate::prelude::Without) filter for that component to the query.--- --- This resource is initialized in the [`World`] whenever a new world is created,--- with the [`Disabled`] component as a disabling component.--- --- Note that you can remove default query filters by overwriting the [`DefaultQueryFilters`] resource.--- This can be useful as a last resort escape hatch, but is liable to break compatibility with other libraries.--- --- See the [module docs](crate::entity_disabling) for more info.--- --- --- # Warning--- --- Default query filters are a global setting that affects all queries in the [`World`],--- and incur a small performance cost for each query.--- --- They can cause significant interoperability issues within the ecosystem,--- as users must be aware of each disabling component in use.--- --- Think carefully about whether you need to use a new disabling component,--- and clearly communicate their presence in any libraries you publish. ----@field disabling ? SmallVec +---@return Oklaba +function Oklaba:neg(_self) end +---@package +---@param _self Oklaba ----@class Disabled ---- A marker component for disabled entities.--- --- Semantically, this component is used to mark entities that are temporarily disabled (typically for gameplay reasons),--- but will likely be re-enabled at some point.--- --- Like all disabling components, this only disables the entity itself,--- not its children or other entities that reference it.--- To disable an entire tree of entities, use [`EntityCommands::insert_recursive`](crate::prelude::EntityCommands::insert_recursive).--- --- Every [`World`] has a default query filter that excludes entities with this component,--- registered in the [`DefaultQueryFilters`] resource.--- See [the module docs] for more info.--- --- [the module docs]: crate::entity_disabling +---@param b number +---@return Oklaba +function Oklaba:with_b(_self,b) end ----@class ChildOf ---- Stores the parent entity of this child entity with this component.--- --- This is a [`Relationship`] component, and creates the canonical--- "parent / child" hierarchy. This is the "source of truth" component, and it pairs with--- the [`Children`] [`RelationshipTarget`](crate::relationship::RelationshipTarget).--- --- This relationship should be used for things like:--- --- 1. Organizing entities in a scene--- 2. Propagating configuration or data inherited from a parent, such as "visibility" or "world-space global transforms".--- 3. Ensuring a hierarchy is despawned when an entity is despawned.--- --- [`ChildOf`] contains a single "target" [`Entity`]. When [`ChildOf`] is inserted on a "source" entity,--- the "target" entity will automatically (and immediately, via a component hook) have a [`Children`]--- component inserted, and the "source" entity will be added to that [`Children`] instance.--- --- If the [`ChildOf`] component is replaced with a different "target" entity, the old target's [`Children`]--- will be automatically (and immediately, via a component hook) be updated to reflect that change.--- --- Likewise, when the [`ChildOf`] component is removed, the "source" entity will be removed from the old--- target's [`Children`]. If this results in [`Children`] being empty, [`Children`] will be automatically removed.--- --- When a parent is despawned, all children (and their descendants) will _also_ be despawned.--- --- You can create parent-child relationships in a variety of ways. The most direct way is to insert a [`ChildOf`] component:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let root = world.spawn_empty().id();--- let child1 = world.spawn(ChildOf(root)).id();--- let child2 = world.spawn(ChildOf(root)).id();--- let grandchild = world.spawn(ChildOf(child1)).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- --- world.entity_mut(child2).remove::();--- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1]);--- --- world.entity_mut(root).despawn();--- assert!(world.get_entity(root).is_err());--- assert!(world.get_entity(child1).is_err());--- assert!(world.get_entity(grandchild).is_err());--- ```--- --- However if you are spawning many children, you might want to use the [`EntityWorldMut::with_children`] helper instead:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let mut child1 = Entity::PLACEHOLDER;--- let mut child2 = Entity::PLACEHOLDER;--- let mut grandchild = Entity::PLACEHOLDER;--- let root = world.spawn_empty().with_children(|p| {--- child1 = p.spawn_empty().with_children(|p| {--- grandchild = p.spawn_empty().id();--- }).id();--- child2 = p.spawn_empty().id();--- }).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- ```--- --- [`Relationship`]: crate::relationship::Relationship ----@field [1] ? Entity +---@package +---@param _self Oklaba +---@param rhs number ----@class Children ---- Tracks which entities are children of this parent entity.--- --- A [`RelationshipTarget`] collection component that is populated--- with entities that "target" this entity with the [`ChildOf`] [`Relationship`] component.--- --- Together, these components form the "canonical parent-child hierarchy". See the [`ChildOf`] component for the full--- description of this relationship and instructions on how to use it.--- --- # Usage--- --- Like all [`RelationshipTarget`] components, this data should not be directly manipulated to avoid desynchronization.--- Instead, modify the [`ChildOf`] components on the "source" entities.--- --- To access the children of an entity, you can iterate over the [`Children`] component,--- using the [`IntoIterator`] trait.--- For more complex access patterns, see the [`RelationshipTarget`] trait.--- --- [`Relationship`]: crate::relationship::Relationship--- [`RelationshipTarget`]: crate::relationship::RelationshipTarget ----@field [1] ? Vec +---@return Oklaba +function Oklaba:div(_self,rhs) end +---@package +---@param _self Oklaba ----@class Identifier ---- A unified identifier for all entity and similar IDs.--- --- Has the same size as a `u64` integer, but the layout is split between a 32-bit low--- segment, a 31-bit high segment, and the significant bit reserved as type flags to denote--- entity kinds. +---@return Oklaba +function Oklaba:clone(_self) end +---@package +---@param _self Oklaba ----@class Name ---- Component used to identify an entity. Stores a hash for faster comparisons.--- --- The hash is eagerly re-computed upon each update to the name.--- --- [`Name`] should not be treated as a globally unique identifier for entities,--- as multiple entities can have the same name. [`Entity`] should be--- used instead as the default unique identifier. ----@field hash ? integer ----@field name ? Cow +---@param other Oklaba + +---@return boolean +function Oklaba:eq(_self,other) end + +---@package +---@param _self Oklaba + +---@param rhs Oklaba + +---@return Oklaba +function Oklaba:add(_self,rhs) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@param a number +--- Green-red channel. [-1.0, 1.0] +---@param b number +--- Blue-yellow channel. [-1.0, 1.0] +---@return Oklaba +function Oklaba.lab(lightness,a,b) end + +---@package +---@param _self Oklaba + +---@param rhs number + +---@return Oklaba +function Oklaba:mul(_self,rhs) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@param a number +--- Green-red channel. [-1.0, 1.0] +---@param b number +--- Blue-yellow channel. [-1.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Oklaba +function Oklaba.new(lightness,a,b,alpha) end + +---@package +---@param _self Oklaba + +---@param a number + +---@return Oklaba +function Oklaba:with_a(_self,a) end + +---@package +---@param _self Oklaba + +---@param lightness number + +---@return Oklaba +function Oklaba:with_lightness(_self,lightness) end + + +---@class Oklcha +--- Color in Oklch color space, with alpha---
---
+---@field lightness ? number +---@field chroma ? number +---@field hue ? number +---@field alpha ? number +Oklcha = {} + +---@package +---@param _self Oklcha + +---@param lightness number + +---@return Oklcha +function Oklcha:with_lightness(_self,lightness) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@param chroma number +--- Chroma channel. [0.0, 1.0] +---@param hue number +--- Hue channel. [0.0, 360.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Oklcha +function Oklcha.new(lightness,chroma,hue,alpha) end + +---@package +---@param lightness number +--- Lightness channel. [0.0, 1.0] +---@param chroma number +--- Chroma channel. [0.0, 1.0] +---@param hue number +--- Hue channel. [0.0, 360.0] +---@return Oklcha +function Oklcha.lch(lightness,chroma,hue) end + +---@package +---@param _self Oklcha + +---@return Oklcha +function Oklcha:clone(_self) end + +---@package +---@param index integer + +---@return Oklcha +function Oklcha.sequential_dispersed(index) end + +---@package +---@param _self Oklcha + +---@param other Oklcha + +---@return boolean +function Oklcha:eq(_self,other) end + +---@package +---@param _self Oklcha + +---@param chroma number + +---@return Oklcha +function Oklcha:with_chroma(_self,chroma) end + + +---@class Srgba +--- Non-linear standard RGB with alpha.---
---
+---@field red ? number +---@field green ? number +---@field blue ? number +---@field alpha ? number +Srgba = {} + +---@package +---@param _self Srgba + +---@return Srgba +function Srgba:neg(_self) end + +---@package +---@param red number +--- Red channel. [0.0, 1.0] +---@param green number +--- Green channel. [0.0, 1.0] +---@param blue number +--- Blue channel. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Srgba +function Srgba.new(red,green,blue,alpha) end + +---@package +---@param _self Srgba + +---@param rhs number + +---@return Srgba +function Srgba:mul(_self,rhs) end + +---@package +---@param _self Srgba + +---@param rhs Srgba + +---@return Srgba +function Srgba:add(_self,rhs) end + +---@package +---@param r integer +--- Red channel. [0, 255] +---@param g integer +--- Green channel. [0, 255] +---@param b integer +--- Blue channel. [0, 255] +---@return Srgba +function Srgba.rgb_u8(r,g,b) end + +---@package +---@param _self Srgba + +---@param rhs Srgba + +---@return Srgba +function Srgba:sub(_self,rhs) end + +---@package +---@param red number +--- Red channel. [0.0, 1.0] +---@param green number +--- Green channel. [0.0, 1.0] +---@param blue number +--- Blue channel. [0.0, 1.0] +---@return Srgba +function Srgba.rgb(red,green,blue) end + +---@package +---@param _self Srgba + +---@return Srgba +function Srgba:clone(_self) end + +---@package +---@param _self Srgba + +---@param rhs number + +---@return Srgba +function Srgba:div(_self,rhs) end + +---@package +---@param _self Srgba + +---@param other Srgba + +---@return boolean +function Srgba:eq(_self,other) end + +---@package +---@param _self Srgba + +---@param green number + +---@return Srgba +function Srgba:with_green(_self,green) end + +---@package +---@param r integer +--- Red channel. [0, 255] +---@param g integer +--- Green channel. [0, 255] +---@param b integer +--- Blue channel. [0, 255] +---@param a integer +--- Alpha channel. [0, 255] +---@return Srgba +function Srgba.rgba_u8(r,g,b,a) end + +---@package +---@param _self Srgba + +---@param blue number + +---@return Srgba +function Srgba:with_blue(_self,blue) end + +---@package +---@param _self Srgba + +---@return string +function Srgba:to_hex(_self) end + +---@package +---@param value number + +---@return number +function Srgba.gamma_function(value) end + +---@package +---@param _self Srgba + +---@param red number + +---@return Srgba +function Srgba:with_red(_self,red) end + +---@package +---@param value number + +---@return number +function Srgba.gamma_function_inverse(value) end + + +---@class Xyza +--- [CIE 1931](https://en.wikipedia.org/wiki/CIE_1931_color_space) color space, also known as XYZ, with an alpha channel.---
---
+---@field x ? number +---@field y ? number +---@field z ? number +---@field alpha ? number +Xyza = {} + +---@package +---@param _self Xyza + +---@param rhs number + +---@return Xyza +function Xyza:div(_self,rhs) end + +---@package +---@param x number +--- x-axis. [0.0, 1.0] +---@param y number +--- y-axis. [0.0, 1.0] +---@param z number +--- z-axis. [0.0, 1.0] +---@param alpha number +--- Alpha channel. [0.0, 1.0] +---@return Xyza +function Xyza.new(x,y,z,alpha) end + +---@package +---@param _self Xyza + +---@param rhs number + +---@return Xyza +function Xyza:mul(_self,rhs) end + +---@package +---@param _self Xyza + +---@param x number + +---@return Xyza +function Xyza:with_x(_self,x) end + +---@package +---@param _self Xyza + +---@param rhs Xyza + +---@return Xyza +function Xyza:sub(_self,rhs) end + +---@package +---@param x number +--- x-axis. [0.0, 1.0] +---@param y number +--- y-axis. [0.0, 1.0] +---@param z number +--- z-axis. [0.0, 1.0] +---@return Xyza +function Xyza.xyz(x,y,z) end + +---@package +---@param _self Xyza + +---@return Xyza +function Xyza:neg(_self) end + +---@package +---@param _self Xyza + +---@param other Xyza + +---@return boolean +function Xyza:eq(_self,other) end + +---@package +---@param _self Xyza + +---@return Xyza +function Xyza:clone(_self) end + +---@package +---@param _self Xyza + +---@param y number + +---@return Xyza +function Xyza:with_y(_self,y) end + +---@package +---@param _self Xyza + +---@param z number + +---@return Xyza +function Xyza:with_z(_self,z) end + +---@package +---@param _self Xyza + +---@param rhs Xyza + +---@return Xyza +function Xyza:add(_self,rhs) end + + +---@class AutoExposureCompensationCurve +--- An auto exposure compensation curve.--- This curve is used to map the average log luminance of a scene to an--- exposure compensation value, to allow for fine control over the final exposure. +---@field min_log_lum ? number +---@field max_log_lum ? number +---@field min_compensation ? number +---@field max_compensation ? number +---@field lut ? [u8; 256] +AutoExposureCompensationCurve = {} + +---@package +---@param _self AutoExposureCompensationCurve + +---@return AutoExposureCompensationCurve +function AutoExposureCompensationCurve:clone(_self) end + + +---@class AutoExposure +--- Component that enables auto exposure for an HDR-enabled 2d or 3d camera.--- --- Auto exposure adjusts the exposure of the camera automatically to--- simulate the human eye's ability to adapt to different lighting conditions.--- --- Bevy's implementation builds a 64 bin histogram of the scene's luminance,--- and then adjusts the exposure so that the average brightness of the final--- render will be middle gray. Because it's using a histogram, some details can--- be selectively ignored or emphasized. Outliers like shadows and specular--- highlights can be ignored, and certain areas can be given more (or less)--- weight based on a mask.--- --- # Usage Notes--- --- **Auto Exposure requires compute shaders and is not compatible with WebGL2.** +---@field range ? RangeInclusive +---@field filter ? RangeInclusive +---@field speed_brighten ? number +---@field speed_darken ? number +---@field exponential_transition_distance ? number +---@field metering_mask ? Handle +---@field compensation_curve ? Handle +AutoExposure = {} + +---@package +---@param _self AutoExposure + +---@return AutoExposure +function AutoExposure:clone(_self) end + + +---@class Bloom +--- Applies a bloom effect to an HDR-enabled 2d or 3d camera.--- --- Bloom emulates an effect found in real cameras and the human eye,--- causing halos to appear around very bright parts of the scene.--- --- See also .--- --- # Usage Notes--- --- **Bloom is currently not compatible with WebGL2.**--- --- Often used in conjunction with `bevy_pbr::StandardMaterial::emissive` for 3d meshes.--- --- Bloom is best used alongside a tonemapping function that desaturates bright colors,--- such as [`crate::tonemapping::Tonemapping::TonyMcMapface`].--- --- Bevy's implementation uses a parametric curve to blend between a set of--- blurred (lower frequency) images generated from the camera's view.--- See for a visualization of the parametric curve--- used in Bevy as well as a visualization of the curve's respective scattering profile. +---@field intensity ? number +---@field low_frequency_boost ? number +---@field low_frequency_boost_curvature ? number +---@field high_pass_frequency ? number +---@field prefilter ? BloomPrefilter +---@field composite_mode ? BloomCompositeMode +---@field max_mip_dimension ? integer +---@field scale ? Vec2 +Bloom = {} + +---@package +---@param _self Bloom + +---@return Bloom +function Bloom:clone(_self) end + + +---@class BloomCompositeMode + +BloomCompositeMode = {} + +---@package +---@param _self BloomCompositeMode + +---@return BloomCompositeMode +function BloomCompositeMode:clone(_self) end + +---@package +---@param _self BloomCompositeMode + +---@return [] +function BloomCompositeMode:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self BloomCompositeMode + +---@param other BloomCompositeMode + +---@return boolean +function BloomCompositeMode:eq(_self,other) end + + +---@class BloomPrefilter +--- Applies a threshold filter to the input image to extract the brightest--- regions before blurring them and compositing back onto the original image.--- These settings are useful when emulating the 1990s-2000s game look.--- --- # Considerations--- * Changing these settings creates a physically inaccurate image--- * Changing these settings makes it easy to make the final result look worse--- * Non-default prefilter settings should be used in conjunction with [`BloomCompositeMode::Additive`] +---@field threshold ? number +---@field threshold_softness ? number +BloomPrefilter = {} + +---@package +---@param _self BloomPrefilter + +---@return BloomPrefilter +function BloomPrefilter:clone(_self) end + + +---@class ContrastAdaptiveSharpening +--- Applies a contrast adaptive sharpening (CAS) filter to the camera.--- --- CAS is usually used in combination with shader based anti-aliasing methods--- such as FXAA or TAA to regain some of the lost detail from the blurring that they introduce.--- --- CAS is designed to adjust the amount of sharpening applied to different areas of an image--- based on the local contrast. This can help avoid over-sharpening areas with high contrast--- and under-sharpening areas with low contrast.--- --- To use this, add the [`ContrastAdaptiveSharpening`] component to a 2D or 3D camera. +---@field enabled ? boolean +---@field sharpening_strength ? number +---@field denoise ? boolean +ContrastAdaptiveSharpening = {} + +---@package +---@param _self ContrastAdaptiveSharpening + +---@return ContrastAdaptiveSharpening +function ContrastAdaptiveSharpening:clone(_self) end + + +---@class DenoiseCas + +---@field [1] ? boolean +DenoiseCas = {} + +---@package +---@param _self DenoiseCas + +---@return DenoiseCas +function DenoiseCas:clone(_self) end + + +---@class Camera2d +--- A 2D camera component. Enables the 2D render graph for a [`Camera`]. +Camera2d = {} + +---@package +---@param _self Camera2d + +---@return Camera2d +function Camera2d:clone(_self) end + + +---@class Camera3d +--- A 3D camera component. Enables the main 3D render graph for a [`Camera`].--- --- The camera coordinate space is right-handed X-right, Y-up, Z-back.--- This means "forward" is -Z. +---@field depth_load_op ? Camera3dDepthLoadOp +---@field depth_texture_usages ? Camera3dDepthTextureUsage +---@field screen_space_specular_transmission_steps ? integer +---@field screen_space_specular_transmission_quality ? ScreenSpaceTransmissionQuality +Camera3d = {} + +---@package +---@param _self Camera3d + +---@return Camera3d +function Camera3d:clone(_self) end + + +---@class Camera3dDepthLoadOp +--- The depth clear operation to perform for the main 3d pass. +Camera3dDepthLoadOp = {} + +---@package +---@param _self Camera3dDepthLoadOp + +---@return Camera3dDepthLoadOp +function Camera3dDepthLoadOp:clone(_self) end + + +---@class Camera3dDepthTextureUsage + +---@field [1] ? integer +Camera3dDepthTextureUsage = {} + +---@package +---@param _self Camera3dDepthTextureUsage + +---@return Camera3dDepthTextureUsage +function Camera3dDepthTextureUsage:clone(_self) end + + +---@class ScreenSpaceTransmissionQuality +--- The quality of the screen space transmission blur effect, applied to whatever's “behind” transmissive--- objects when their `roughness` is greater than `0.0`.--- --- Higher qualities are more GPU-intensive.--- --- **Note:** You can get better-looking results at any quality level by enabling TAA. See: [`TemporalAntiAliasPlugin`](crate::experimental::taa::TemporalAntiAliasPlugin). +ScreenSpaceTransmissionQuality = {} + +---@package +---@param _self ScreenSpaceTransmissionQuality + +---@param other ScreenSpaceTransmissionQuality + +---@return boolean +function ScreenSpaceTransmissionQuality:eq(_self,other) end + +---@package +---@param _self ScreenSpaceTransmissionQuality + +---@return ScreenSpaceTransmissionQuality +function ScreenSpaceTransmissionQuality:clone(_self) end + + +---@class DepthOfField +--- A component that enables a [depth of field] postprocessing effect when attached to a [`Camera3d`],--- simulating the focus of a camera lens.--- --- [depth of field]: https://en.wikipedia.org/wiki/Depth_of_field +---@field mode ? DepthOfFieldMode +---@field focal_distance ? number +---@field sensor_height ? number +---@field aperture_f_stops ? number +---@field max_circle_of_confusion_diameter ? number +---@field max_depth ? number +DepthOfField = {} + +---@package +---@param _self DepthOfField + +---@return DepthOfField +function DepthOfField:clone(_self) end + + +---@class DepthOfFieldMode +--- Controls the appearance of the effect. +DepthOfFieldMode = {} + +---@package +---@param _self DepthOfFieldMode + +---@return DepthOfFieldMode +function DepthOfFieldMode:clone(_self) end + +---@package +---@param _self DepthOfFieldMode + +---@param other DepthOfFieldMode + +---@return boolean +function DepthOfFieldMode:eq(_self,other) end + + +---@class Fxaa +--- A component for enabling Fast Approximate Anti-Aliasing (FXAA)--- for a [`bevy_render::camera::Camera`]. +---@field enabled ? boolean +---@field edge_threshold ? Sensitivity +---@field edge_threshold_min ? Sensitivity +Fxaa = {} + +---@package +---@param _self Fxaa + +---@return Fxaa +function Fxaa:clone(_self) end + + +---@class Sensitivity + +Sensitivity = {} + +---@package +---@param _self Sensitivity + +---@return Sensitivity +function Sensitivity:clone(_self) end + +---@package +---@param _self Sensitivity + +---@return [] +function Sensitivity:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self Sensitivity + +---@param other Sensitivity + +---@return boolean +function Sensitivity:eq(_self,other) end + + +---@class MotionBlur +--- A component that enables and configures motion blur when added to a camera.--- --- Motion blur is an effect that simulates how moving objects blur as they change position during--- the exposure of film, a sensor, or an eyeball.--- --- Because rendering simulates discrete steps in time, we use per-pixel motion vectors to estimate--- the path of objects between frames. This kind of implementation has some artifacts:--- - Fast moving objects in front of a stationary object or when in front of empty space, will not--- have their edges blurred.--- - Transparent objects do not write to depth or motion vectors, so they cannot be blurred.--- --- Other approaches, such as *A Reconstruction Filter for Plausible Motion Blur* produce more--- correct results, but are more expensive and complex, and have other kinds of artifacts. This--- implementation is relatively inexpensive and effective.--- --- # Usage--- --- Add the [`MotionBlur`] component to a camera to enable and configure motion blur for that--- camera.--- --- ```--- # use bevy_core_pipeline::{core_3d::Camera3d, motion_blur::MotionBlur};--- # use bevy_ecs::prelude::*;--- # fn test(mut commands: Commands) {--- commands.spawn((--- Camera3d::default(),--- MotionBlur::default(),--- ));--- # }--- ```` +---@field shutter_angle ? number +---@field samples ? integer +MotionBlur = {} + +---@package +---@param _self MotionBlur + +---@return MotionBlur +function MotionBlur:clone(_self) end + + +---@class OrderIndependentTransparencySettings +--- Used to identify which camera will use OIT to render transparent meshes--- and to configure OIT. +---@field layer_count ? integer +---@field alpha_threshold ? number +OrderIndependentTransparencySettings = {} + +---@package +---@param _self OrderIndependentTransparencySettings + +---@return OrderIndependentTransparencySettings +function OrderIndependentTransparencySettings:clone(_self) end + + +---@class ChromaticAberration +--- Adds colored fringes to the edges of objects in the scene.--- --- [Chromatic aberration] simulates the effect when lenses fail to focus all--- colors of light toward a single point. It causes rainbow-colored streaks to--- appear, which are especially apparent on the edges of objects. Chromatic--- aberration is commonly used for collision effects, especially in horror--- games.--- --- Bevy's implementation is based on that of *Inside* ([Gjøl & Svendsen 2016]).--- It's based on a customizable lookup texture, which allows for changing the--- color pattern. By default, the color pattern is simply a 3×1 pixel texture--- consisting of red, green, and blue, in that order, but you can change it to--- any image in order to achieve different effects.--- --- [Chromatic aberration]: https://en.wikipedia.org/wiki/Chromatic_aberration--- --- [Gjøl & Svendsen 2016]: https://github.com/playdeadgames/publications/blob/master/INSIDE/rendering_inside_gdc2016.pdf +---@field color_lut ? Handle +---@field intensity ? number +---@field max_samples ? integer +ChromaticAberration = {} + +---@package +---@param _self ChromaticAberration + +---@return ChromaticAberration +function ChromaticAberration:clone(_self) end + + +---@class DepthPrepass +--- If added to a [`crate::prelude::Camera3d`] then depth values will be copied to a separate texture available to the main pass. +DepthPrepass = {} + +---@package +---@param _self DepthPrepass + +---@return DepthPrepass +function DepthPrepass:clone(_self) end + + +---@class MotionVectorPrepass +--- If added to a [`crate::prelude::Camera3d`] then screen space motion vectors will be copied to a separate texture available to the main pass. +MotionVectorPrepass = {} + +---@package +---@param _self MotionVectorPrepass + +---@return MotionVectorPrepass +function MotionVectorPrepass:clone(_self) end + + +---@class NormalPrepass +--- If added to a [`crate::prelude::Camera3d`] then vertex world normals will be copied to a separate texture available to the main pass.--- Normals will have normal map textures already applied. +NormalPrepass = {} + +---@package +---@param _self NormalPrepass + +---@return NormalPrepass +function NormalPrepass:clone(_self) end + + +---@class Skybox +--- Adds a skybox to a 3D camera, based on a cubemap texture.--- --- Note that this component does not (currently) affect the scene's lighting.--- To do so, use `EnvironmentMapLight` alongside this component.--- --- See also . +---@field image ? Handle +---@field brightness ? number +---@field rotation ? Quat +Skybox = {} + +---@package +---@param _self Skybox + +---@return Skybox +function Skybox:clone(_self) end + + +---@class Smaa +--- A component for enabling Subpixel Morphological Anti-Aliasing (SMAA)--- for a [`bevy_render::camera::Camera`]. +---@field preset ? SmaaPreset +Smaa = {} + +---@package +---@param _self Smaa + +---@return Smaa +function Smaa:clone(_self) end + + +---@class SmaaPreset +--- A preset quality level for SMAA.--- --- Higher values are slower but result in a higher-quality image.--- --- The default value is *high*. +SmaaPreset = {} + +---@package +---@param _self SmaaPreset + +---@return SmaaPreset +function SmaaPreset:clone(_self) end + +---@package +---@param _self SmaaPreset + +---@return [] +function SmaaPreset:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self SmaaPreset + +---@param other SmaaPreset + +---@return boolean +function SmaaPreset:eq(_self,other) end + + +---@class TemporalAntiAliasing +--- Component to apply temporal anti-aliasing to a 3D perspective camera.--- --- Temporal anti-aliasing (TAA) is a form of image smoothing/filtering, like--- multisample anti-aliasing (MSAA), or fast approximate anti-aliasing (FXAA).--- TAA works by blending (averaging) each frame with the past few frames.--- --- # Tradeoffs--- --- Pros:--- * Filters more types of aliasing than MSAA, such as textures and singular bright pixels (specular aliasing)--- * Cost scales with screen/view resolution, unlike MSAA which scales with number of triangles--- * Greatly increases the quality of stochastic rendering techniques such as SSAO, certain shadow map sampling methods, etc--- --- Cons:--- * Chance of "ghosting" - ghostly trails left behind moving objects--- * Thin geometry, lighting detail, or texture lines may flicker noisily or disappear--- --- Because TAA blends past frames with the current frame, when the frames differ too much--- (such as with fast moving objects or camera cuts), ghosting artifacts may occur.--- --- Artifacts tend to be reduced at higher framerates and rendering resolution.--- --- # Usage Notes--- --- The [`TemporalAntiAliasPlugin`] must be added to your app.--- Any camera with this component must also disable [`Msaa`] by setting it to [`Msaa::Off`].--- --- [Currently](https://github.com/bevyengine/bevy/issues/8423), TAA cannot be used with [`bevy_render::camera::OrthographicProjection`].--- --- TAA also does not work well with alpha-blended meshes, as it requires depth writing to determine motion.--- --- It is very important that correct motion vectors are written for everything on screen.--- Failure to do so will lead to ghosting artifacts. For instance, if particle effects--- are added using a third party library, the library must either:--- --- 1. Write particle motion vectors to the motion vectors prepass texture--- 2. Render particles after TAA--- --- If no [`MipBias`] component is attached to the camera, TAA will add a `MipBias(-1.0)` component. +---@field reset ? boolean +TemporalAntiAliasing = {} + +---@package +---@param _self TemporalAntiAliasing + +---@return TemporalAntiAliasing +function TemporalAntiAliasing:clone(_self) end + + +---@class DebandDither +--- Enables a debanding shader that applies dithering to mitigate color banding in the final image for a given [`Camera`] entity. +DebandDither = {} + +---@package +---@param _self DebandDither + +---@return [] +function DebandDither:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self DebandDither + +---@return DebandDither +function DebandDither:clone(_self) end + +---@package +---@param _self DebandDither + +---@param other DebandDither + +---@return boolean +function DebandDither:eq(_self,other) end + + +---@class Tonemapping +--- Optionally enables a tonemapping shader that attempts to map linear input stimulus into a perceptually uniform image for a given [`Camera`] entity. +Tonemapping = {} + +---@package +---@param _self Tonemapping + +---@param other Tonemapping + +---@return boolean +function Tonemapping:eq(_self,other) end + +---@package +---@param _self Tonemapping + +---@return [] +function Tonemapping:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self Tonemapping + +---@return boolean +function Tonemapping:is_enabled(_self) end + +---@package +---@param _self Tonemapping + +---@return Tonemapping +function Tonemapping:clone(_self) end + + +---@class ComponentId +--- A value which uniquely identifies the type of a [`Component`] or [`Resource`] within a--- [`World`].--- --- Each time a new `Component` type is registered within a `World` using--- e.g. [`World::register_component`] or [`World::register_component_with_descriptor`]--- or a Resource with e.g. [`World::init_resource`],--- a corresponding `ComponentId` is created to track it.--- --- While the distinction between `ComponentId` and [`TypeId`] may seem superficial, breaking them--- into two separate but related concepts allows components to exist outside of Rust's type system.--- Each Rust type registered as a `Component` will have a corresponding `ComponentId`, but additional--- `ComponentId`s may exist in a `World` to track components which cannot be--- represented as Rust types for scripting or other advanced use-cases.--- --- A `ComponentId` is tightly coupled to its parent `World`. Attempting to use a `ComponentId` from--- one `World` to access the metadata of a `Component` in a different `World` is undefined behavior--- and must not be attempted.--- --- Given a type `T` which implements [`Component`], the `ComponentId` for `T` can be retrieved--- from a `World` using [`World::component_id()`] or via [`Components::component_id()`]. Access--- to the `ComponentId` for a [`Resource`] is available via [`Components::resource_id()`]. +---@field [1] ? integer +ComponentId = {} + +---@package +---@param index integer + +---@return ComponentId +function ComponentId.new(index) end + +---@package +---@param _self ComponentId + +---@return ComponentId +function ComponentId:clone(_self) end + +---@package +---@param _self ComponentId + +---@return [] +function ComponentId:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self ComponentId + +---@return integer +function ComponentId:index(_self) end + +---@package +---@param _self ComponentId + +---@param other ComponentId + +---@return boolean +function ComponentId:eq(_self,other) end + + +---@class ComponentTicks +--- Records when a component or resource was added and when it was last mutably dereferenced (or added). +---@field added ? Tick +---@field changed ? Tick +ComponentTicks = {} + +---@package +---@param _self ComponentTicks + +---@return ComponentTicks +function ComponentTicks:clone(_self) end + +---@package +---@param _self ComponentTicks + +---@param last_run Tick + +---@param this_run Tick + +---@return boolean +function ComponentTicks:is_changed(_self,last_run,this_run) end + +---@package +---@param change_tick Tick + +---@return ComponentTicks +function ComponentTicks.new(change_tick) end + +---@package +---@param _self ComponentTicks + +---@param last_run Tick + +---@param this_run Tick + +---@return boolean +function ComponentTicks:is_added(_self,last_run,this_run) end + +---@package +---@param _self ComponentTicks + +---@param change_tick Tick + +---@return [] +function ComponentTicks:set_changed(_self,change_tick) end + + +---@class Tick +--- A value that tracks when a system ran relative to other systems.--- This is used to power change detection.--- --- *Note* that a system that hasn't been run yet has a `Tick` of 0. +---@field tick ? integer +Tick = {} + +---@package +---@param _self Tick + +---@return Tick +function Tick:clone(_self) end + +---@package +---@param _self Tick + +---@return integer +function Tick:get(_self) end + +---@package +---@param _self Tick + +---@param last_run Tick + +---@param this_run Tick + +---@return boolean +function Tick:is_newer_than(_self,last_run,this_run) end + +---@package +---@param tick integer + +---@return Tick +function Tick.new(tick) end + +---@package +---@param _self Tick + +---@param other Tick + +---@return boolean +function Tick:eq(_self,other) end + +---@package +---@param _self Tick + +---@return [] +function Tick:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self Tick + +---@param tick integer + +---@return [] +function Tick:set(_self,tick) end + + +---@class Entity +--- Lightweight identifier of an [entity](crate::entity).--- --- The identifier is implemented using a [generational index]: a combination of an index and a generation.--- This allows fast insertion after data removal in an array while minimizing loss of spatial locality.--- --- These identifiers are only valid on the [`World`] it's sourced from. Attempting to use an `Entity` to--- fetch entity components or metadata from a different world will either fail or return unexpected results.--- --- [generational index]: https://lucassardois.medium.com/generational-indices-guide-8e3c5f7fd594--- --- # Stability warning--- For all intents and purposes, `Entity` should be treated as an opaque identifier. The internal bit--- representation is liable to change from release to release as are the behaviors or performance--- characteristics of any of its trait implementations (i.e. `Ord`, `Hash`, etc.). This means that changes in--- `Entity`'s representation, though made readable through various functions on the type, are not considered--- breaking changes under [SemVer].--- --- In particular, directly serializing with `Serialize` and `Deserialize` make zero guarantee of long--- term wire format compatibility. Changes in behavior will cause serialized `Entity` values persisted--- to long term storage (i.e. disk, databases, etc.) will fail to deserialize upon being updated.--- --- # Usage--- --- This data type is returned by iterating a `Query` that has `Entity` as part of its query fetch type parameter ([learn more]).--- It can also be obtained by calling [`EntityCommands::id`] or [`EntityWorldMut::id`].--- --- ```--- # use bevy_ecs::prelude::*;--- # #[derive(Component)]--- # struct SomeComponent;--- fn setup(mut commands: Commands) {--- // Calling `spawn` returns `EntityCommands`.--- let entity = commands.spawn(SomeComponent).id();--- }--- --- fn exclusive_system(world: &mut World) {--- // Calling `spawn` returns `EntityWorldMut`.--- let entity = world.spawn(SomeComponent).id();--- }--- #--- # bevy_ecs::system::assert_is_system(setup);--- # bevy_ecs::system::assert_is_system(exclusive_system);--- ```--- --- 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.--- --- ```--- # use bevy_ecs::prelude::*;--- #--- # #[derive(Component)]--- # struct Expired;--- #--- fn dispose_expired_food(mut commands: Commands, query: Query>) {--- for food_entity in &query {--- commands.entity(food_entity).despawn();--- }--- }--- #--- # bevy_ecs::system::assert_is_system(dispose_expired_food);--- ```--- --- [learn more]: crate::system::Query#entity-id-access--- [`EntityCommands::id`]: crate::system::EntityCommands::id--- [`EntityWorldMut::id`]: crate::world::EntityWorldMut::id--- [`EntityCommands`]: crate::system::EntityCommands--- [`Query::get`]: crate::system::Query::get--- [`World`]: crate::world::World--- [SemVer]: https://semver.org/ +Entity = {} + +---@package +---@param _self Entity + +---@return integer +function Entity:generation(_self) end + +---@package +---@param index integer + +---@return Entity +function Entity.from_raw(index) end + +---@package +---@param bits integer + +---@return Entity +function Entity.from_bits(bits) end + +---@package +---@param _self Entity + +---@return integer +function Entity:to_bits(_self) end + +---@package +---@param _self Entity + +---@param other Entity + +---@return boolean +function Entity:eq(_self,other) end + +---@package +---@param _self Entity + +---@return Entity +function Entity:clone(_self) end + +---@package +---@param _self Entity + +---@return integer +function Entity:index(_self) end + + +---@class EntityHash +--- A [`BuildHasher`] that results in a [`EntityHasher`]. +EntityHash = {} + +---@package +---@param _self EntityHash + +---@return EntityHash +function EntityHash:clone(_self) end + + +---@class EntityHashSet +--- A [`HashSet`] pre-configured to use [`EntityHash`] hashing. +---@field [1] ? HashSet +EntityHashSet = {} + +---@package +---@param _self EntityHashSet + +---@param other EntityHashSet + +---@return boolean +function EntityHashSet:eq(_self,other) end + +---@package +---@param n integer + +---@return EntityHashSet +function EntityHashSet.with_capacity(n) end + +---@package +---@return EntityHashSet +function EntityHashSet.new() end + +---@package +---@param _self EntityHashSet + +---@return boolean +function EntityHashSet:is_empty(_self) end + +---@package +---@param _self EntityHashSet + +---@return integer +function EntityHashSet:len(_self) end + +---@package +---@param _self EntityHashSet + +---@return [] +function EntityHashSet:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self EntityHashSet + +---@return EntityHashSet +function EntityHashSet:clone(_self) end + + +---@class DefaultQueryFilters +--- Default query filters work by excluding entities with certain components from most queries.--- --- If a query does not explicitly mention a given disabling component, it will not include entities with that component.--- To be more precise, this checks if the query's [`FilteredAccess`] contains the component,--- and if it does not, adds a [`Without`](crate::prelude::Without) filter for that component to the query.--- --- This resource is initialized in the [`World`] whenever a new world is created,--- with the [`Disabled`] component as a disabling component.--- --- Note that you can remove default query filters by overwriting the [`DefaultQueryFilters`] resource.--- This can be useful as a last resort escape hatch, but is liable to break compatibility with other libraries.--- --- See the [module docs](crate::entity_disabling) for more info.--- --- --- # Warning--- --- Default query filters are a global setting that affects all queries in the [`World`],--- and incur a small performance cost for each query.--- --- They can cause significant interoperability issues within the ecosystem,--- as users must be aware of each disabling component in use.--- --- Think carefully about whether you need to use a new disabling component,--- and clearly communicate their presence in any libraries you publish. +---@field disabling ? SmallVec +DefaultQueryFilters = {} + +---@package +---@param _self DefaultQueryFilters + +---@param component_id ComponentId + +---@return [] +function DefaultQueryFilters:register_disabling_component(_self,component_id) end + +---@package +---@return DefaultQueryFilters +function DefaultQueryFilters.empty() end + + +---@class Disabled +--- A marker component for disabled entities.--- --- Semantically, this component is used to mark entities that are temporarily disabled (typically for gameplay reasons),--- but will likely be re-enabled at some point.--- --- Like all disabling components, this only disables the entity itself,--- not its children or other entities that reference it.--- To disable an entire tree of entities, use [`EntityCommands::insert_recursive`](crate::prelude::EntityCommands::insert_recursive).--- --- Every [`World`] has a default query filter that excludes entities with this component,--- registered in the [`DefaultQueryFilters`] resource.--- See [the module docs] for more info.--- --- [the module docs]: crate::entity_disabling +Disabled = {} + +---@package +---@param _self Disabled + +---@return Disabled +function Disabled:clone(_self) end + + +---@class ChildOf +--- Stores the parent entity of this child entity with this component.--- --- This is a [`Relationship`] component, and creates the canonical--- "parent / child" hierarchy. This is the "source of truth" component, and it pairs with--- the [`Children`] [`RelationshipTarget`](crate::relationship::RelationshipTarget).--- --- This relationship should be used for things like:--- --- 1. Organizing entities in a scene--- 2. Propagating configuration or data inherited from a parent, such as "visibility" or "world-space global transforms".--- 3. Ensuring a hierarchy is despawned when an entity is despawned.--- --- [`ChildOf`] contains a single "target" [`Entity`]. When [`ChildOf`] is inserted on a "source" entity,--- the "target" entity will automatically (and immediately, via a component hook) have a [`Children`]--- component inserted, and the "source" entity will be added to that [`Children`] instance.--- --- If the [`ChildOf`] component is replaced with a different "target" entity, the old target's [`Children`]--- will be automatically (and immediately, via a component hook) be updated to reflect that change.--- --- Likewise, when the [`ChildOf`] component is removed, the "source" entity will be removed from the old--- target's [`Children`]. If this results in [`Children`] being empty, [`Children`] will be automatically removed.--- --- When a parent is despawned, all children (and their descendants) will _also_ be despawned.--- --- You can create parent-child relationships in a variety of ways. The most direct way is to insert a [`ChildOf`] component:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let root = world.spawn_empty().id();--- let child1 = world.spawn(ChildOf(root)).id();--- let child2 = world.spawn(ChildOf(root)).id();--- let grandchild = world.spawn(ChildOf(child1)).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- --- world.entity_mut(child2).remove::();--- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1]);--- --- world.entity_mut(root).despawn();--- assert!(world.get_entity(root).is_err());--- assert!(world.get_entity(child1).is_err());--- assert!(world.get_entity(grandchild).is_err());--- ```--- --- However if you are spawning many children, you might want to use the [`EntityWorldMut::with_children`] helper instead:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let mut child1 = Entity::PLACEHOLDER;--- let mut child2 = Entity::PLACEHOLDER;--- let mut grandchild = Entity::PLACEHOLDER;--- let root = world.spawn_empty().with_children(|p| {--- child1 = p.spawn_empty().with_children(|p| {--- grandchild = p.spawn_empty().id();--- }).id();--- child2 = p.spawn_empty().id();--- }).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- ```--- --- [`Relationship`]: crate::relationship::Relationship +---@field [1] ? Entity +ChildOf = {} + +---@package +---@param _self ChildOf + +---@return ChildOf +function ChildOf:clone(_self) end + +---@package +---@param _self ChildOf + +---@return Entity +function ChildOf:get(_self) end + +---@package +---@param _self ChildOf + +---@return [] +function ChildOf:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self ChildOf + +---@param other ChildOf + +---@return boolean +function ChildOf:eq(_self,other) end + +---@package +---@param _self ChildOf + +---@return Entity +function ChildOf:parent(_self) end + + +---@class Children +--- Tracks which entities are children of this parent entity.--- --- A [`RelationshipTarget`] collection component that is populated--- with entities that "target" this entity with the [`ChildOf`] [`Relationship`] component.--- --- Together, these components form the "canonical parent-child hierarchy". See the [`ChildOf`] component for the full--- description of this relationship and instructions on how to use it.--- --- # Usage--- --- Like all [`RelationshipTarget`] components, this data should not be directly manipulated to avoid desynchronization.--- Instead, modify the [`ChildOf`] components on the "source" entities.--- --- To access the children of an entity, you can iterate over the [`Children`] component,--- using the [`IntoIterator`] trait.--- For more complex access patterns, see the [`RelationshipTarget`] trait.--- --- [`Relationship`]: crate::relationship::Relationship--- [`RelationshipTarget`]: crate::relationship::RelationshipTarget +---@field [1] ? Vec +Children = {} + +---@package +---@param _self Children + +---@param other Children + +---@return boolean +function Children:eq(_self,other) end + +---@package +---@param _self Children + +---@return [] +function Children:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self Children + +---@param a_index integer + +---@param b_index integer + +---@return [] +function Children:swap(_self,a_index,b_index) end + + +---@class Identifier +--- A unified identifier for all entity and similar IDs.--- --- Has the same size as a `u64` integer, but the layout is split between a 32-bit low--- segment, a 31-bit high segment, and the significant bit reserved as type flags to denote--- entity kinds. +Identifier = {} + +---@package +---@param _self Identifier + +---@return integer +function Identifier:to_bits(_self) end + +---@package +---@param _self Identifier + +---@return integer +function Identifier:masked_high(_self) end + +---@package +---@param value integer + +---@return Identifier +function Identifier.from_bits(value) end + +---@package +---@param _self Identifier + +---@return integer +function Identifier:low(_self) end + +---@package +---@param _self Identifier + +---@param other Identifier + +---@return boolean +function Identifier:eq(_self,other) end + +---@package +---@param _self Identifier + +---@return Identifier +function Identifier:clone(_self) end + + +---@class Name +--- Component used to identify an entity. Stores a hash for faster comparisons.--- --- The hash is eagerly re-computed upon each update to the name.--- --- [`Name`] should not be treated as a globally unique identifier for entities,--- as multiple entities can have the same name. [`Entity`] should be--- used instead as the default unique identifier. +---@field hash ? integer +---@field name ? Cow +Name = {} + +---@package +---@param _self Name + +---@return Name +function Name:clone(_self) end + +---@package +---@param _self Name + +---@param other Name + +---@return boolean +function Name:eq(_self,other) end ---@class RemovedComponentEntity --- Wrapper around [`Entity`] for [`RemovedComponents`].--- Internally, `RemovedComponents` uses these as an `Events`. ---@field [1] ? Entity +RemovedComponentEntity = {} + +---@package +---@param _self RemovedComponentEntity + +---@return RemovedComponentEntity +function RemovedComponentEntity:clone(_self) end + + +---@class ButtonState +--- The current "press" state of an element +ButtonState = {} + +---@package +---@param _self ButtonState + +---@return ButtonState +function ButtonState:clone(_self) end + +---@package +---@param _self ButtonState + +---@return boolean +function ButtonState:is_pressed(_self) end + +---@package +---@param _self ButtonState + +---@param other ButtonState + +---@return boolean +function ButtonState:eq(_self,other) end + +---@package +---@param _self ButtonState + +---@return [] +function ButtonState:assert_receiver_is_total_eq(_self) end + + +---@class AxisSettings +--- Settings for a [`GamepadAxis`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for an axis.--- Values that are higher than `livezone_upperbound` will be rounded up to 1.0.--- Values that are lower than `livezone_lowerbound` will be rounded down to -1.0.--- Values that are in-between `deadzone_lowerbound` and `deadzone_upperbound` will be rounded to 0.0.--- Otherwise, values will be linearly rescaled to fit into the sensitivity range.--- For example, a value that is one fourth of the way from `deadzone_upperbound` to `livezone_upperbound` will be scaled to 0.25.--- --- The valid range is `[-1.0, 1.0]`. +---@field livezone_upperbound ? number +---@field deadzone_upperbound ? number +---@field deadzone_lowerbound ? number +---@field livezone_lowerbound ? number +---@field threshold ? number +AxisSettings = {} + +---@package +---@param _self AxisSettings + +---@return number +function AxisSettings:livezone_upperbound(_self) end + +---@package +---@param _self AxisSettings + +---@param value number + +---@return number +function AxisSettings:set_livezone_upperbound(_self,value) end + +---@package +---@param _self AxisSettings + +---@param value number + +---@return number +function AxisSettings:set_deadzone_lowerbound(_self,value) end + +---@package +---@param _self AxisSettings + +---@return number +function AxisSettings:deadzone_upperbound(_self) end + +---@package +---@param _self AxisSettings + +---@param other AxisSettings + +---@return boolean +function AxisSettings:eq(_self,other) end + +---@package +---@param _self AxisSettings + +---@return number +function AxisSettings:deadzone_lowerbound(_self) end + +---@package +---@param _self AxisSettings + +---@param value number + +---@return number +function AxisSettings:set_livezone_lowerbound(_self,value) end + +---@package +---@param _self AxisSettings + +---@param raw_value number + +---@return number +function AxisSettings:clamp(_self,raw_value) end + +---@package +---@param _self AxisSettings + +---@return number +function AxisSettings:livezone_lowerbound(_self) end + +---@package +---@param _self AxisSettings + +---@return AxisSettings +function AxisSettings:clone(_self) end + +---@package +---@param _self AxisSettings + +---@return number +function AxisSettings:threshold(_self) end + +---@package +---@param _self AxisSettings + +---@param value number + +---@return number +function AxisSettings:set_deadzone_upperbound(_self,value) end + +---@package +---@param _self AxisSettings + +---@param value number + +---@return number +function AxisSettings:set_threshold(_self,value) end + + +---@class ButtonAxisSettings +--- Settings for a [`GamepadButton`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for a button axis.--- --- ## Logic--- --- - Values that are higher than or equal to `high` will be rounded to 1.0.--- - Values that are lower than or equal to `low` will be rounded to 0.0.--- - Otherwise, values will not be rounded.--- --- The valid range is from 0.0 to 1.0, inclusive. +---@field high ? number +---@field low ? number +---@field threshold ? number +ButtonAxisSettings = {} + +---@package +---@param _self ButtonAxisSettings + +---@return ButtonAxisSettings +function ButtonAxisSettings:clone(_self) end + + +---@class ButtonSettings +--- Manages settings for gamepad buttons.--- --- It is used inside [`GamepadSettings`] to define the threshold for a [`GamepadButton`]--- to be considered pressed or released. A button is considered pressed if the `press_threshold`--- value is surpassed and released if the `release_threshold` value is undercut.--- --- Allowed values: `0.0 <= ``release_threshold`` <= ``press_threshold`` <= 1.0` +---@field press_threshold ? number +---@field release_threshold ? number +ButtonSettings = {} + +---@package +---@param _self ButtonSettings + +---@param value number + +---@return boolean +function ButtonSettings:is_released(_self,value) end + +---@package +---@param _self ButtonSettings + +---@param value number + +---@return number +function ButtonSettings:set_press_threshold(_self,value) end + +---@package +---@param _self ButtonSettings + +---@param other ButtonSettings + +---@return boolean +function ButtonSettings:eq(_self,other) end + +---@package +---@param _self ButtonSettings + +---@param value number + +---@return boolean +function ButtonSettings:is_pressed(_self,value) end + +---@package +---@param _self ButtonSettings + +---@return number +function ButtonSettings:release_threshold(_self) end + +---@package +---@param _self ButtonSettings + +---@param value number + +---@return number +function ButtonSettings:set_release_threshold(_self,value) end + +---@package +---@param _self ButtonSettings + +---@return ButtonSettings +function ButtonSettings:clone(_self) end + +---@package +---@param _self ButtonSettings + +---@return number +function ButtonSettings:press_threshold(_self) end + + +---@class Gamepad +--- Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`].--- --- An entity with this component is spawned automatically after [`GamepadConnectionEvent`]--- and updated by [`gamepad_event_processing_system`].--- --- See also [`GamepadSettings`] for configuration.--- --- # Examples--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadAxis, GamepadButton};--- # use bevy_ecs::system::Query;--- # use bevy_ecs::name::Name;--- #--- fn gamepad_usage_system(gamepads: Query<(&Name, &Gamepad)>) {--- for (name, gamepad) in &gamepads {--- println!("{name}");--- --- if gamepad.just_pressed(GamepadButton::North) {--- println!("{} just pressed North", name)--- }--- --- if let Some(left_stick_x) = gamepad.get(GamepadAxis::LeftStickX) {--- println!("left stick X: {}", left_stick_x)--- }--- }--- }--- ``` +---@field vendor_id ? Option +---@field product_id ? Option +---@field digital ? ButtonInput +---@field analog ? Axis +Gamepad = {} + +---@package +---@param _self Gamepad + +---@return Vec2 +function Gamepad:right_stick(_self) end + +---@package +---@param _self Gamepad + +---@return Vec2 +function Gamepad:dpad(_self) end + +---@package +---@param _self Gamepad + +---@return integer | nil +function Gamepad:vendor_id(_self) end + +---@package +---@param _self Gamepad + +---@param button_type GamepadButton + +---@return boolean +function Gamepad:just_released(_self,button_type) end + +---@package +---@param _self Gamepad + +---@param button_type GamepadButton + +---@return boolean +function Gamepad:pressed(_self,button_type) end + +---@package +---@param _self Gamepad + +---@return Vec2 +function Gamepad:left_stick(_self) end + +---@package +---@param _self Gamepad + +---@param button_type GamepadButton + +---@return boolean +function Gamepad:just_pressed(_self,button_type) end + +---@package +---@param _self Gamepad + +---@return integer | nil +function Gamepad:product_id(_self) end + + +---@class GamepadAxis +--- Represents gamepad input types that are mapped in the range [-1.0, 1.0].--- --- ## Usage--- --- This is used to determine which axis has changed its value when receiving a--- gamepad axis event. It is also used in the [`Gamepad`] component. +GamepadAxis = {} + +---@package +---@param _self GamepadAxis + +---@return [] +function GamepadAxis:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self GamepadAxis + +---@param other GamepadAxis + +---@return boolean +function GamepadAxis:eq(_self,other) end + +---@package +---@param _self GamepadAxis + +---@return GamepadAxis +function GamepadAxis:clone(_self) end + + +---@class GamepadAxisChangedEvent +--- [`GamepadAxis`] event triggered by an analog state change. +---@field entity ? Entity +---@field axis ? GamepadAxis +---@field value ? number +GamepadAxisChangedEvent = {} + +---@package +---@param entity Entity + +---@param axis GamepadAxis + +---@param value number + +---@return GamepadAxisChangedEvent +function GamepadAxisChangedEvent.new(entity,axis,value) end + +---@package +---@param _self GamepadAxisChangedEvent + +---@return GamepadAxisChangedEvent +function GamepadAxisChangedEvent:clone(_self) end + +---@package +---@param _self GamepadAxisChangedEvent + +---@param other GamepadAxisChangedEvent + +---@return boolean +function GamepadAxisChangedEvent:eq(_self,other) end + + +---@class GamepadButton +--- Represents gamepad input types that are mapped in the range [0.0, 1.0].--- --- ## Usage--- --- This is used to determine which button has changed its value when receiving gamepad button events.--- It is also used in the [`Gamepad`] component. +GamepadButton = {} + +---@package +---@param _self GamepadButton + +---@return GamepadButton +function GamepadButton:clone(_self) end + +---@package +---@param _self GamepadButton + +---@return [] +function GamepadButton:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self GamepadButton + +---@param other GamepadButton + +---@return boolean +function GamepadButton:eq(_self,other) end + + +---@class GamepadButtonChangedEvent +--- [`GamepadButton`] event triggered by an analog state change. +---@field entity ? Entity +---@field button ? GamepadButton +---@field state ? ButtonState +---@field value ? number +GamepadButtonChangedEvent = {} + +---@package +---@param entity Entity + +---@param button GamepadButton + +---@param state ButtonState + +---@param value number + +---@return GamepadButtonChangedEvent +function GamepadButtonChangedEvent.new(entity,button,state,value) end + +---@package +---@param _self GamepadButtonChangedEvent + +---@param other GamepadButtonChangedEvent + +---@return boolean +function GamepadButtonChangedEvent:eq(_self,other) end + +---@package +---@param _self GamepadButtonChangedEvent + +---@return GamepadButtonChangedEvent +function GamepadButtonChangedEvent:clone(_self) end + + +---@class GamepadButtonStateChangedEvent +--- [`GamepadButton`] event triggered by a digital state change. +---@field entity ? Entity +---@field button ? GamepadButton +---@field state ? ButtonState +GamepadButtonStateChangedEvent = {} + +---@package +---@param _self GamepadButtonStateChangedEvent + +---@param other GamepadButtonStateChangedEvent + +---@return boolean +function GamepadButtonStateChangedEvent:eq(_self,other) end + +---@package +---@param entity Entity + +---@param button GamepadButton + +---@param state ButtonState + +---@return GamepadButtonStateChangedEvent +function GamepadButtonStateChangedEvent.new(entity,button,state) end + +---@package +---@param _self GamepadButtonStateChangedEvent + +---@return GamepadButtonStateChangedEvent +function GamepadButtonStateChangedEvent:clone(_self) end + +---@package +---@param _self GamepadButtonStateChangedEvent + +---@return [] +function GamepadButtonStateChangedEvent:assert_receiver_is_total_eq(_self) end + + +---@class GamepadConnection +--- The connection status of a gamepad. +GamepadConnection = {} + +---@package +---@param _self GamepadConnection + +---@return GamepadConnection +function GamepadConnection:clone(_self) end + +---@package +---@param _self GamepadConnection + +---@param other GamepadConnection + +---@return boolean +function GamepadConnection:eq(_self,other) end + + +---@class GamepadConnectionEvent +--- A Gamepad connection event. Created when a connection to a gamepad--- is established and when a gamepad is disconnected. +---@field gamepad ? Entity +---@field connection ? GamepadConnection +GamepadConnectionEvent = {} + +---@package +---@param gamepad Entity + +---@param connection GamepadConnection + +---@return GamepadConnectionEvent +function GamepadConnectionEvent.new(gamepad,connection) end + +---@package +---@param _self GamepadConnectionEvent + +---@return boolean +function GamepadConnectionEvent:disconnected(_self) end + +---@package +---@param _self GamepadConnectionEvent + +---@return GamepadConnectionEvent +function GamepadConnectionEvent:clone(_self) end + +---@package +---@param _self GamepadConnectionEvent + +---@param other GamepadConnectionEvent + +---@return boolean +function GamepadConnectionEvent:eq(_self,other) end + +---@package +---@param _self GamepadConnectionEvent + +---@return boolean +function GamepadConnectionEvent:connected(_self) end + + +---@class GamepadEvent +--- A gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`GamepadButtonChangedEvent`] and [`GamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event is produced by `bevy_input`. +GamepadEvent = {} + +---@package +---@param _self GamepadEvent + +---@return GamepadEvent +function GamepadEvent:clone(_self) end + +---@package +---@param _self GamepadEvent + +---@param other GamepadEvent + +---@return boolean +function GamepadEvent:eq(_self,other) end + + +---@class GamepadInput +--- Encapsulation over [`GamepadAxis`] and [`GamepadButton`]. +GamepadInput = {} + +---@package +---@param _self GamepadInput + +---@return GamepadInput +function GamepadInput:clone(_self) end + +---@package +---@param _self GamepadInput + +---@param other GamepadInput + +---@return boolean +function GamepadInput:eq(_self,other) end + +---@package +---@param _self GamepadInput + +---@return [] +function GamepadInput:assert_receiver_is_total_eq(_self) end + + +---@class GamepadRumbleIntensity +--- The intensity at which a gamepad's force-feedback motors may rumble. +---@field strong_motor ? number +---@field weak_motor ? number +GamepadRumbleIntensity = {} + +---@package +---@param _self GamepadRumbleIntensity + +---@param other GamepadRumbleIntensity + +---@return boolean +function GamepadRumbleIntensity:eq(_self,other) end + +---@package +---@param _self GamepadRumbleIntensity + +---@return GamepadRumbleIntensity +function GamepadRumbleIntensity:clone(_self) end + +---@package +---@param intensity number + +---@return GamepadRumbleIntensity +function GamepadRumbleIntensity.strong_motor(intensity) end + +---@package +---@param intensity number + +---@return GamepadRumbleIntensity +function GamepadRumbleIntensity.weak_motor(intensity) end + + +---@class GamepadRumbleRequest +--- An event that controls force-feedback rumbling of a [`Gamepad`] [`entity`](Entity).--- --- # Notes--- --- Does nothing if the gamepad or platform does not support rumble.--- --- # Example--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadRumbleRequest, GamepadRumbleIntensity};--- # use bevy_ecs::prelude::{EventWriter, Res, Query, Entity, With};--- # use core::time::Duration;--- fn rumble_gamepad_system(--- mut rumble_requests: EventWriter,--- gamepads: Query>,--- ) {--- for entity in gamepads.iter() {--- rumble_requests.write(GamepadRumbleRequest::Add {--- gamepad: entity,--- intensity: GamepadRumbleIntensity::MAX,--- duration: Duration::from_secs_f32(0.5),--- });--- }--- }--- ``` +GamepadRumbleRequest = {} + +---@package +---@param _self GamepadRumbleRequest + +---@return GamepadRumbleRequest +function GamepadRumbleRequest:clone(_self) end + +---@package +---@param _self GamepadRumbleRequest + +---@return Entity +function GamepadRumbleRequest:gamepad(_self) end + + +---@class GamepadSettings +--- Gamepad settings component.--- --- ## Usage--- --- It is used to create a `bevy` component that stores the settings of [`GamepadButton`] and [`GamepadAxis`] in [`Gamepad`].--- If no user defined [`ButtonSettings`], [`AxisSettings`], or [`ButtonAxisSettings`]--- are defined, the default settings of each are used as a fallback accordingly.--- --- ## Note--- --- The [`GamepadSettings`] are used to determine when raw gamepad events--- should register. Events that don't meet the change thresholds defined in [`GamepadSettings`]--- will not register. To modify these settings, mutate the corresponding component. +---@field default_button_settings ? ButtonSettings +---@field default_axis_settings ? AxisSettings +---@field default_button_axis_settings ? ButtonAxisSettings +---@field button_settings ? HashMap +---@field axis_settings ? HashMap +---@field button_axis_settings ? HashMap +GamepadSettings = {} + +---@package +---@param _self GamepadSettings + +---@return GamepadSettings +function GamepadSettings:clone(_self) end + + +---@class RawGamepadAxisChangedEvent +--- [`GamepadAxis`] changed event unfiltered by [`GamepadSettings`]. +---@field gamepad ? Entity +---@field axis ? GamepadAxis +---@field value ? number +RawGamepadAxisChangedEvent = {} + +---@package +---@param gamepad Entity + +---@param axis_type GamepadAxis + +---@param value number + +---@return RawGamepadAxisChangedEvent +function RawGamepadAxisChangedEvent.new(gamepad,axis_type,value) end + +---@package +---@param _self RawGamepadAxisChangedEvent + +---@param other RawGamepadAxisChangedEvent + +---@return boolean +function RawGamepadAxisChangedEvent:eq(_self,other) end + +---@package +---@param _self RawGamepadAxisChangedEvent + +---@return RawGamepadAxisChangedEvent +function RawGamepadAxisChangedEvent:clone(_self) end + + +---@class RawGamepadButtonChangedEvent +--- [`GamepadButton`] changed event unfiltered by [`GamepadSettings`]. +---@field gamepad ? Entity +---@field button ? GamepadButton +---@field value ? number +RawGamepadButtonChangedEvent = {} + +---@package +---@param gamepad Entity + +---@param button_type GamepadButton + +---@param value number + +---@return RawGamepadButtonChangedEvent +function RawGamepadButtonChangedEvent.new(gamepad,button_type,value) end + +---@package +---@param _self RawGamepadButtonChangedEvent + +---@return RawGamepadButtonChangedEvent +function RawGamepadButtonChangedEvent:clone(_self) end + +---@package +---@param _self RawGamepadButtonChangedEvent + +---@param other RawGamepadButtonChangedEvent + +---@return boolean +function RawGamepadButtonChangedEvent:eq(_self,other) end + + +---@class RawGamepadEvent +--- A raw gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`RawGamepadButtonChangedEvent`] and [`RawGamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event type is used by `bevy_input` to feed its components. +RawGamepadEvent = {} + +---@package +---@param _self RawGamepadEvent + +---@return RawGamepadEvent +function RawGamepadEvent:clone(_self) end + +---@package +---@param _self RawGamepadEvent + +---@param other RawGamepadEvent + +---@return boolean +function RawGamepadEvent:eq(_self,other) end + + +---@class DoubleTapGesture +--- Double tap gesture.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +DoubleTapGesture = {} + +---@package +---@param _self DoubleTapGesture + +---@param other DoubleTapGesture + +---@return boolean +function DoubleTapGesture:eq(_self,other) end + +---@package +---@param _self DoubleTapGesture + +---@return DoubleTapGesture +function DoubleTapGesture:clone(_self) end + + +---@class PanGesture +--- Pan gesture.--- --- ## Platform-specific--- --- - On **`iOS`**, must be enabled first +---@field [1] ? Vec2 +PanGesture = {} + +---@package +---@param _self PanGesture + +---@param other PanGesture + +---@return boolean +function PanGesture:eq(_self,other) end + +---@package +---@param _self PanGesture + +---@return PanGesture +function PanGesture:clone(_self) end + + +---@class PinchGesture +--- Two-finger pinch gesture, often used for magnifications.--- --- Positive delta values indicate magnification (zooming in) and--- negative delta values indicate shrinking (zooming out).--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +---@field [1] ? number +PinchGesture = {} + +---@package +---@param _self PinchGesture + +---@return PinchGesture +function PinchGesture:clone(_self) end + +---@package +---@param _self PinchGesture + +---@param other PinchGesture + +---@return boolean +function PinchGesture:eq(_self,other) end + + +---@class RotationGesture +--- Two-finger rotation gesture.--- --- Positive delta values indicate rotation counterclockwise and--- negative delta values indicate rotation clockwise.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +---@field [1] ? number +RotationGesture = {} + +---@package +---@param _self RotationGesture + +---@return RotationGesture +function RotationGesture:clone(_self) end + +---@package +---@param _self RotationGesture + +---@param other RotationGesture + +---@return boolean +function RotationGesture:eq(_self,other) end + + +---@class Key +--- The logical key code of a [`KeyboardInput`].--- --- ## Technical--- --- Its values map 1 to 1 to winit's Key. +Key = {} + +---@package +---@param _self Key + +---@param other Key + +---@return boolean +function Key:eq(_self,other) end + +---@package +---@param _self Key + +---@return Key +function Key:clone(_self) end + +---@package +---@param _self Key + +---@return [] +function Key:assert_receiver_is_total_eq(_self) end + + +---@class KeyCode +--- The key code of a [`KeyboardInput`].--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `Res>`.--- --- Code representing the location of a physical key--- This mostly conforms to the UI Events Specification's [`KeyboardEvent.code`] with a few--- exceptions:--- - The keys that the specification calls `MetaLeft` and `MetaRight` are named `SuperLeft` and--- `SuperRight` here.--- - The key that the specification calls "Super" is reported as `Unidentified` here.--- --- [`KeyboardEvent.code`]: https://w3c.github.io/uievents-code/#code-value-tables--- --- ## Updating--- --- The resource is updated inside of the [`keyboard_input_system`]. +KeyCode = {} + +---@package +---@param _self KeyCode + +---@return KeyCode +function KeyCode:clone(_self) end + +---@package +---@param _self KeyCode + +---@return [] +function KeyCode:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self KeyCode + +---@param other KeyCode + +---@return boolean +function KeyCode:eq(_self,other) end + + +---@class KeyboardFocusLost +--- Gets generated from `bevy_winit::winit_runner`--- --- Used for clearing all cached states to avoid having 'stuck' key presses--- when, for example, switching between windows with 'Alt-Tab' or using any other--- OS specific key combination that leads to Bevy window losing focus and not receiving any--- input events +KeyboardFocusLost = {} + +---@package +---@param _self KeyboardFocusLost + +---@return KeyboardFocusLost +function KeyboardFocusLost:clone(_self) end + +---@package +---@param _self KeyboardFocusLost + +---@param other KeyboardFocusLost + +---@return boolean +function KeyboardFocusLost:eq(_self,other) end + +---@package +---@param _self KeyboardFocusLost + +---@return [] +function KeyboardFocusLost:assert_receiver_is_total_eq(_self) end + + +---@class KeyboardInput +--- A keyboard input event.--- --- This event is the translated version of the `WindowEvent::KeyboardInput` from the `winit` crate.--- It is available to the end user and can be used for game logic.--- --- ## Usage--- --- The event is consumed inside of the [`keyboard_input_system`]--- to update the [`ButtonInput`](ButtonInput) resource. +---@field key_code ? KeyCode +---@field logical_key ? Key +---@field state ? ButtonState +---@field text ? Option +---@field repeat ? boolean +---@field window ? Entity +KeyboardInput = {} + +---@package +---@param _self KeyboardInput + +---@return KeyboardInput +function KeyboardInput:clone(_self) end + +---@package +---@param _self KeyboardInput + +---@return [] +function KeyboardInput:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self KeyboardInput + +---@param other KeyboardInput + +---@return boolean +function KeyboardInput:eq(_self,other) end + + +---@class NativeKey +--- Contains the platform-native logical key identifier, known as keysym.--- --- Exactly what that means differs from platform to platform, but the values are to some degree--- tied to the currently active keyboard layout. The same key on the same keyboard may also report--- different values on different platforms, which is one of the reasons this is a per-platform--- enum.--- --- This enum is primarily used to store raw keysym when Winit doesn't map a given native logical--- key identifier to a meaningful [`Key`] variant. This lets you use [`Key`], and let the user--- define keybinds which work in the presence of identifiers we haven't mapped for you yet. +NativeKey = {} + +---@package +---@param _self NativeKey + +---@return NativeKey +function NativeKey:clone(_self) end + +---@package +---@param _self NativeKey + +---@return [] +function NativeKey:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self NativeKey + +---@param other NativeKey + +---@return boolean +function NativeKey:eq(_self,other) end + + +---@class NativeKeyCode +--- Contains the platform-native physical key identifier--- --- The exact values vary from platform to platform (which is part of why this is a per-platform--- enum), but the values are primarily tied to the key's physical location on the keyboard.--- --- This enum is primarily used to store raw keycodes when Winit doesn't map a given native--- physical key identifier to a meaningful [`KeyCode`] variant. In the presence of identifiers we--- haven't mapped for you yet, this lets you use [`KeyCode`] to:--- --- - Correctly match key press and release events.--- - On non-web platforms, support assigning keybinds to virtually any key through a UI. +NativeKeyCode = {} + +---@package +---@param _self NativeKeyCode + +---@return [] +function NativeKeyCode:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self NativeKeyCode + +---@param other NativeKeyCode + +---@return boolean +function NativeKeyCode:eq(_self,other) end + +---@package +---@param _self NativeKeyCode + +---@return NativeKeyCode +function NativeKeyCode:clone(_self) end + + +---@class AccumulatedMouseMotion +--- Tracks how much the mouse has moved every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseMotion`] events received this frame. +---@field delta ? Vec2 +AccumulatedMouseMotion = {} + +---@package +---@param _self AccumulatedMouseMotion + +---@param other AccumulatedMouseMotion + +---@return boolean +function AccumulatedMouseMotion:eq(_self,other) end + +---@package +---@param _self AccumulatedMouseMotion + +---@return AccumulatedMouseMotion +function AccumulatedMouseMotion:clone(_self) end + + +---@class AccumulatedMouseScroll +--- Tracks how much the mouse has scrolled every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseWheel`] events received this frame. +---@field unit ? MouseScrollUnit +---@field delta ? Vec2 +AccumulatedMouseScroll = {} + +---@package +---@param _self AccumulatedMouseScroll + +---@param other AccumulatedMouseScroll + +---@return boolean +function AccumulatedMouseScroll:eq(_self,other) end + +---@package +---@param _self AccumulatedMouseScroll + +---@return AccumulatedMouseScroll +function AccumulatedMouseScroll:clone(_self) end + + +---@class MouseButton +--- A button on a mouse device.--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `bevy`--- resource.--- --- ## Updating--- --- The resource is updated inside of the [`mouse_button_input_system`]. +MouseButton = {} + +---@package +---@param _self MouseButton + +---@return MouseButton +function MouseButton:clone(_self) end + +---@package +---@param _self MouseButton + +---@param other MouseButton + +---@return boolean +function MouseButton:eq(_self,other) end + +---@package +---@param _self MouseButton + +---@return [] +function MouseButton:assert_receiver_is_total_eq(_self) end + + +---@class MouseButtonInput +--- A mouse button input event.--- --- This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate.--- --- ## Usage--- --- The event is read inside of the [`mouse_button_input_system`]--- to update the [`ButtonInput`] resource. +---@field button ? MouseButton +---@field state ? ButtonState +---@field window ? Entity +MouseButtonInput = {} + +---@package +---@param _self MouseButtonInput + +---@return [] +function MouseButtonInput:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self MouseButtonInput + +---@return MouseButtonInput +function MouseButtonInput:clone(_self) end + +---@package +---@param _self MouseButtonInput + +---@param other MouseButtonInput + +---@return boolean +function MouseButtonInput:eq(_self,other) end + + +---@class MouseMotion +--- An event reporting the change in physical position of a pointing device.--- --- This represents raw, unfiltered physical motion.--- It is the translated version of [`DeviceEvent::MouseMotion`] from the `winit` crate.--- --- All pointing devices connected to a single machine at the same time can emit the event independently.--- However, the event data does not make it possible to distinguish which device it is referring to.--- --- [`DeviceEvent::MouseMotion`]: https://docs.rs/winit/latest/winit/event/enum.DeviceEvent.html#variant.MouseMotion +---@field delta ? Vec2 +MouseMotion = {} + +---@package +---@param _self MouseMotion + +---@param other MouseMotion + +---@return boolean +function MouseMotion:eq(_self,other) end + +---@package +---@param _self MouseMotion + +---@return MouseMotion +function MouseMotion:clone(_self) end + + +---@class MouseScrollUnit +--- The scroll unit.--- --- Describes how a value of a [`MouseWheel`] event has to be interpreted.--- --- The value of the event can either be interpreted as the amount of lines or the amount of pixels--- to scroll. +MouseScrollUnit = {} + +---@package +---@param _self MouseScrollUnit + +---@param other MouseScrollUnit + +---@return boolean +function MouseScrollUnit:eq(_self,other) end + +---@package +---@param _self MouseScrollUnit + +---@return [] +function MouseScrollUnit:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self MouseScrollUnit + +---@return MouseScrollUnit +function MouseScrollUnit:clone(_self) end + + +---@class MouseWheel +--- A mouse wheel event.--- --- This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate. +---@field unit ? MouseScrollUnit +---@field x ? number +---@field y ? number +---@field window ? Entity +MouseWheel = {} + +---@package +---@param _self MouseWheel + +---@param other MouseWheel + +---@return boolean +function MouseWheel:eq(_self,other) end + +---@package +---@param _self MouseWheel + +---@return MouseWheel +function MouseWheel:clone(_self) end + + +---@class ForceTouch +--- A force description of a [`Touch`] input. +ForceTouch = {} + +---@package +---@param _self ForceTouch + +---@param other ForceTouch + +---@return boolean +function ForceTouch:eq(_self,other) end + +---@package +---@param _self ForceTouch + +---@return ForceTouch +function ForceTouch:clone(_self) end + + +---@class TouchInput +--- A touch input event.--- --- ## Logic--- --- Every time the user touches the screen, a new [`TouchPhase::Started`] event with an unique--- identifier for the finger is generated. When the finger is lifted, the [`TouchPhase::Ended`]--- event is generated with the same finger id.--- --- After a [`TouchPhase::Started`] event has been emitted, there may be zero or more [`TouchPhase::Moved`]--- events when the finger is moved or the touch pressure changes.--- --- The finger id may be reused by the system after an [`TouchPhase::Ended`] event. The user--- should assume that a new [`TouchPhase::Started`] event received with the same id has nothing--- to do with the old finger and is a new finger.--- --- A [`TouchPhase::Canceled`] event is emitted when the system has canceled tracking this--- touch, such as when the window loses focus, or on iOS if the user moves the--- device against their face.--- --- ## Note--- --- This event is the translated version of the `WindowEvent::Touch` from the `winit` crate.--- It is available to the end user and can be used for game logic. +---@field phase ? TouchPhase +---@field position ? Vec2 +---@field window ? Entity +---@field force ? Option +---@field id ? integer +TouchInput = {} + +---@package +---@param _self TouchInput + +---@param other TouchInput + +---@return boolean +function TouchInput:eq(_self,other) end + +---@package +---@param _self TouchInput + +---@return TouchInput +function TouchInput:clone(_self) end + + +---@class TouchPhase +--- A phase of a [`TouchInput`].--- --- ## Usage--- --- It is used to describe the phase of the touch input that is currently active.--- This includes a phase that indicates that a touch input has started or ended,--- or that a finger has moved. There is also a canceled phase that indicates that--- the system canceled the tracking of the finger. +TouchPhase = {} + +---@package +---@param _self TouchPhase + +---@param other TouchPhase + +---@return boolean +function TouchPhase:eq(_self,other) end + +---@package +---@param _self TouchPhase + +---@return TouchPhase +function TouchPhase:clone(_self) end + +---@package +---@param _self TouchPhase + +---@return [] +function TouchPhase:assert_receiver_is_total_eq(_self) end + + +---@class AspectRatio +--- An `AspectRatio` is the ratio of width to height. +---@field [1] ? number +AspectRatio = {} + +---@package +---@param _self AspectRatio + +---@return boolean +function AspectRatio:is_landscape(_self) end + +---@package +---@param _self AspectRatio + +---@param other AspectRatio + +---@return boolean +function AspectRatio:eq(_self,other) end + +---@package +---@param _self AspectRatio + +---@return number +function AspectRatio:ratio(_self) end + +---@package +---@param _self AspectRatio + +---@return boolean +function AspectRatio:is_square(_self) end + +---@package +---@param _self AspectRatio + +---@return boolean +function AspectRatio:is_portrait(_self) end + +---@package +---@param _self AspectRatio + +---@return AspectRatio +function AspectRatio:inverse(_self) end + +---@package +---@param _self AspectRatio + +---@return AspectRatio +function AspectRatio:clone(_self) end + + +---@class Aabb2d +--- A 2D axis-aligned bounding box, or bounding rectangle +---@field min ? Vec2 +---@field max ? Vec2 +Aabb2d = {} + +---@package +---@param _self Aabb2d + +---@param other Aabb2d + +---@return boolean +function Aabb2d:eq(_self,other) end + +---@package +---@param _self Aabb2d + +---@param point Vec2 + +---@return Vec2 +function Aabb2d:closest_point(_self,point) end + +---@package +---@param center Vec2 + +---@param half_size Vec2 + +---@return Aabb2d +function Aabb2d.new(center,half_size) end + +---@package +---@param _self Aabb2d + +---@return BoundingCircle +function Aabb2d:bounding_circle(_self) end + +---@package +---@param _self Aabb2d + +---@return Aabb2d +function Aabb2d:clone(_self) end + + +---@class BoundingCircle +--- A bounding circle +---@field center ? Vec2 +---@field circle ? Circle +BoundingCircle = {} + +---@package +---@param _self BoundingCircle + +---@return number +function BoundingCircle:radius(_self) end + +---@package +---@param _self BoundingCircle + +---@return BoundingCircle +function BoundingCircle:clone(_self) end + +---@package +---@param _self BoundingCircle + +---@param point Vec2 + +---@return Vec2 +function BoundingCircle:closest_point(_self,point) end + +---@package +---@param center Vec2 + +---@param radius number + +---@return BoundingCircle +function BoundingCircle.new(center,radius) end + +---@package +---@param _self BoundingCircle + +---@return Aabb2d +function BoundingCircle:aabb_2d(_self) end + +---@package +---@param _self BoundingCircle + +---@param other BoundingCircle + +---@return boolean +function BoundingCircle:eq(_self,other) end + + +---@class Aabb3d +--- A 3D axis-aligned bounding box +---@field min ? Vec3A +---@field max ? Vec3A +Aabb3d = {} + +---@package +---@param _self Aabb3d + +---@return Aabb3d +function Aabb3d:clone(_self) end + +---@package +---@param _self Aabb3d + +---@return BoundingSphere +function Aabb3d:bounding_sphere(_self) end + +---@package +---@param _self Aabb3d + +---@param other Aabb3d + +---@return boolean +function Aabb3d:eq(_self,other) end + + +---@class BoundingSphere +--- A bounding sphere +---@field center ? Vec3A +---@field sphere ? Sphere +BoundingSphere = {} + +---@package +---@param _self BoundingSphere + +---@param other BoundingSphere + +---@return boolean +function BoundingSphere:eq(_self,other) end + +---@package +---@param _self BoundingSphere + +---@return number +function BoundingSphere:radius(_self) end + +---@package +---@param _self BoundingSphere + +---@return BoundingSphere +function BoundingSphere:clone(_self) end + +---@package +---@param _self BoundingSphere + +---@return Aabb3d +function BoundingSphere:aabb_3d(_self) end + + +---@class AabbCast2d +--- An intersection test that casts an [`Aabb2d`] along a ray. +---@field ray ? RayCast2d +---@field aabb ? Aabb2d +AabbCast2d = {} + +---@package +---@param aabb Aabb2d + +---@param origin Vec2 + +---@param direction Dir2 + +---@param max number + +---@return AabbCast2d +function AabbCast2d.new(aabb,origin,direction,max) end + +---@package +---@param aabb Aabb2d + +---@param ray Ray2d + +---@param max number + +---@return AabbCast2d +function AabbCast2d.from_ray(aabb,ray,max) end + +---@package +---@param _self AabbCast2d + +---@param aabb Aabb2d + +---@return number | nil +function AabbCast2d:aabb_collision_at(_self,aabb) end + +---@package +---@param _self AabbCast2d + +---@return AabbCast2d +function AabbCast2d:clone(_self) end + + +---@class BoundingCircleCast +--- An intersection test that casts a [`BoundingCircle`] along a ray. +---@field ray ? RayCast2d +---@field circle ? BoundingCircle +BoundingCircleCast = {} + +---@package +---@param circle BoundingCircle + +---@param ray Ray2d + +---@param max number + +---@return BoundingCircleCast +function BoundingCircleCast.from_ray(circle,ray,max) end + +---@package +---@param circle BoundingCircle + +---@param origin Vec2 + +---@param direction Dir2 + +---@param max number + +---@return BoundingCircleCast +function BoundingCircleCast.new(circle,origin,direction,max) end + +---@package +---@param _self BoundingCircleCast + +---@param circle BoundingCircle + +---@return number | nil +function BoundingCircleCast:circle_collision_at(_self,circle) end + +---@package +---@param _self BoundingCircleCast + +---@return BoundingCircleCast +function BoundingCircleCast:clone(_self) end + + +---@class RayCast2d +--- A raycast intersection test for 2D bounding volumes +---@field ray ? Ray2d +---@field max ? number +---@field direction_recip ? Vec2 +RayCast2d = {} + +---@package +---@param _self RayCast2d + +---@param aabb Aabb2d + +---@return number | nil +function RayCast2d:aabb_intersection_at(_self,aabb) end + +---@package +---@param ray Ray2d + +---@param max number + +---@return RayCast2d +function RayCast2d.from_ray(ray,max) end + +---@package +---@param _self RayCast2d + +---@return RayCast2d +function RayCast2d:clone(_self) end + +---@package +---@param origin Vec2 + +---@param direction Dir2 + +---@param max number + +---@return RayCast2d +function RayCast2d.new(origin,direction,max) end + +---@package +---@param _self RayCast2d + +---@return Vec2 +function RayCast2d:direction_recip(_self) end + +---@package +---@param _self RayCast2d + +---@param circle BoundingCircle + +---@return number | nil +function RayCast2d:circle_intersection_at(_self,circle) end + + +---@class AabbCast3d +--- An intersection test that casts an [`Aabb3d`] along a ray. +---@field ray ? RayCast3d +---@field aabb ? Aabb3d +AabbCast3d = {} + +---@package +---@param _self AabbCast3d + +---@param aabb Aabb3d + +---@return number | nil +function AabbCast3d:aabb_collision_at(_self,aabb) end + +---@package +---@param _self AabbCast3d + +---@return AabbCast3d +function AabbCast3d:clone(_self) end + +---@package +---@param aabb Aabb3d + +---@param ray Ray3d + +---@param max number + +---@return AabbCast3d +function AabbCast3d.from_ray(aabb,ray,max) end + + +---@class BoundingSphereCast +--- An intersection test that casts a [`BoundingSphere`] along a ray. +---@field ray ? RayCast3d +---@field sphere ? BoundingSphere +BoundingSphereCast = {} + +---@package +---@param sphere BoundingSphere + +---@param ray Ray3d + +---@param max number + +---@return BoundingSphereCast +function BoundingSphereCast.from_ray(sphere,ray,max) end + +---@package +---@param _self BoundingSphereCast + +---@return BoundingSphereCast +function BoundingSphereCast:clone(_self) end + +---@package +---@param _self BoundingSphereCast + +---@param sphere BoundingSphere + +---@return number | nil +function BoundingSphereCast:sphere_collision_at(_self,sphere) end + + +---@class RayCast3d +--- A raycast intersection test for 3D bounding volumes +---@field origin ? Vec3A +---@field direction ? Dir3A +---@field max ? number +---@field direction_recip ? Vec3A +RayCast3d = {} + +---@package +---@param ray Ray3d + +---@param max number + +---@return RayCast3d +function RayCast3d.from_ray(ray,max) end + +---@package +---@param _self RayCast3d + +---@return Vec3A +function RayCast3d:direction_recip(_self) end + +---@package +---@param _self RayCast3d + +---@param sphere BoundingSphere + +---@return number | nil +function RayCast3d:sphere_intersection_at(_self,sphere) end + +---@package +---@param _self RayCast3d + +---@return RayCast3d +function RayCast3d:clone(_self) end + +---@package +---@param _self RayCast3d + +---@param aabb Aabb3d + +---@return number | nil +function RayCast3d:aabb_intersection_at(_self,aabb) end + + +---@class CompassOctant +--- A compass enum with 8 directions.--- ```text--- N (North)--- ▲--- NW │ NE--- ╲ │ ╱--- W (West) ┼─────► E (East)--- ╱ │ ╲--- SW │ SE--- ▼--- S (South)--- ``` +CompassOctant = {} + +---@package +---@param _self CompassOctant + +---@return integer +function CompassOctant:to_index(_self) end + +---@package +---@param _self CompassOctant + +---@return CompassOctant +function CompassOctant:opposite(_self) end + +---@package +---@param _self CompassOctant + +---@return CompassOctant +function CompassOctant:clone(_self) end + +---@package +---@param _self CompassOctant + +---@param other CompassOctant + +---@return boolean +function CompassOctant:eq(_self,other) end + +---@package +---@param _self CompassOctant + +---@return CompassOctant +function CompassOctant:neg(_self) end + +---@package +---@param _self CompassOctant + +---@return [] +function CompassOctant:assert_receiver_is_total_eq(_self) end + + +---@class CompassQuadrant +--- A compass enum with 4 directions.--- ```text--- N (North)--- ▲--- │--- │--- W (West) ┼─────► E (East)--- │--- │--- ▼--- S (South)--- ``` +CompassQuadrant = {} + +---@package +---@param _self CompassQuadrant + +---@return integer +function CompassQuadrant:to_index(_self) end + +---@package +---@param _self CompassQuadrant + +---@param other CompassQuadrant + +---@return boolean +function CompassQuadrant:eq(_self,other) end + +---@package +---@param _self CompassQuadrant + +---@return CompassQuadrant +function CompassQuadrant:opposite(_self) end + +---@package +---@param _self CompassQuadrant + +---@return CompassQuadrant +function CompassQuadrant:clone(_self) end + +---@package +---@param _self CompassQuadrant + +---@return CompassQuadrant +function CompassQuadrant:neg(_self) end + +---@package +---@param _self CompassQuadrant + +---@return [] +function CompassQuadrant:assert_receiver_is_total_eq(_self) end + + +---@class EaseFunction +--- Curve functions over the [unit interval], commonly used for easing transitions.--- --- `EaseFunction` can be used on its own to interpolate between `0.0` and `1.0`.--- It can also be combined with [`EasingCurve`] to interpolate between other--- intervals and types, including vectors and rotations.--- --- # Example--- --- [`sample`] the smoothstep function at various points. This will return `None`--- if the parameter is outside the unit interval.--- --- ```--- # use bevy_math::prelude::*;--- let f = EaseFunction::SmoothStep;--- --- assert_eq!(f.sample(-1.0), None);--- assert_eq!(f.sample(0.0), Some(0.0));--- assert_eq!(f.sample(0.5), Some(0.5));--- assert_eq!(f.sample(1.0), Some(1.0));--- assert_eq!(f.sample(2.0), None);--- ```--- --- [`sample_clamped`] will clamp the parameter to the unit interval, so it--- always returns a value.--- --- ```--- # use bevy_math::prelude::*;--- # let f = EaseFunction::SmoothStep;--- assert_eq!(f.sample_clamped(-1.0), 0.0);--- assert_eq!(f.sample_clamped(0.0), 0.0);--- assert_eq!(f.sample_clamped(0.5), 0.5);--- assert_eq!(f.sample_clamped(1.0), 1.0);--- assert_eq!(f.sample_clamped(2.0), 1.0);--- ```--- --- [`sample`]: EaseFunction::sample--- [`sample_clamped`]: EaseFunction::sample_clamped--- [unit interval]: `Interval::UNIT` +EaseFunction = {} + +---@package +---@param _self EaseFunction + +---@return EaseFunction +function EaseFunction:clone(_self) end + +---@package +---@param _self EaseFunction + +---@param other EaseFunction + +---@return boolean +function EaseFunction:eq(_self,other) end + + +---@class JumpAt +--- Configuration options for the [`EaseFunction::Steps`] curves. This closely replicates the--- [CSS step function specification].--- --- [CSS step function specification]: https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#description +JumpAt = {} + +---@package +---@param _self JumpAt + +---@return [] +function JumpAt:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self JumpAt + +---@param other JumpAt + +---@return boolean +function JumpAt:eq(_self,other) end + +---@package +---@param _self JumpAt + +---@return JumpAt +function JumpAt:clone(_self) end + + +---@class Interval +--- A nonempty closed interval, possibly unbounded in either direction.--- --- In other words, the interval may stretch all the way to positive or negative infinity, but it--- will always have some nonempty interior. +---@field start ? number +---@field end ? number +Interval = {} + +---@package +---@param _self Interval + +---@param other Interval + +---@return boolean +function Interval:eq(_self,other) end + +---@package +---@param _self Interval + +---@return boolean +function Interval:has_finite_start(_self) end + +---@package +---@param _self Interval + +---@param value number + +---@return number +function Interval:clamp(_self,value) end + +---@package +---@param _self Interval + +---@return number +function Interval:length(_self) end + +---@package +---@param _self Interval + +---@return boolean +function Interval:has_finite_end(_self) end + +---@package +---@param _self Interval + +---@return boolean +function Interval:is_bounded(_self) end + +---@package +---@param _self Interval + +---@param item number + +---@return boolean +function Interval:contains(_self,item) end + +---@package +---@param _self Interval + +---@return Interval +function Interval:clone(_self) end + +---@package +---@param _self Interval + +---@return number +function Interval:start(_self) end + +---@package +---@param _self Interval + +---@param other Interval + +---@return boolean +function Interval:contains_interval(_self,other) end + + +---@class Dir2 +--- A normalized vector pointing in a direction in 2D space +---@field [1] ? Vec2 +Dir2 = {} + +---@package +---@param _self Dir2 + +---@param rhs number + +---@return Vec2 +function Dir2:mul(_self,rhs) end + +---@package +---@param _self Dir2 + +---@param rhs Dir2 + +---@param s number + +---@return Dir2 +function Dir2:slerp(_self,rhs,s) end + +---@package +---@param _self Dir2 + +---@return Dir2 +function Dir2:fast_renormalize(_self) end + +---@package +---@param _self Dir2 + +---@return Vec2 +function Dir2:as_vec2(_self) end + +---@package +---@param _self Dir2 + +---@return Rot2 +function Dir2:rotation_to_x(_self) end + +---@package +---@param _self Dir2 + +---@return Dir2 +function Dir2:clone(_self) end + +---@package +---@param _self Dir2 + +---@return Rot2 +function Dir2:rotation_from_x(_self) end + +---@package +---@param _self Dir2 + +---@return Dir2 +function Dir2:neg(_self) end + +---@package +---@param x number + +---@param y number + +---@return Dir2 +function Dir2.from_xy_unchecked(x,y) end + +---@package +---@param _self Dir2 + +---@param other Dir2 + +---@return boolean +function Dir2:eq(_self,other) end + +---@package +---@param value Vec2 + +---@return Dir2 +function Dir2.new_unchecked(value) end + +---@package +---@param _self Dir2 + +---@return Rot2 +function Dir2:rotation_from_y(_self) end + +---@package +---@param _self Dir2 + +---@return Rot2 +function Dir2:rotation_to_y(_self) end + +---@package +---@param _self Dir2 + +---@param other Dir2 + +---@return Rot2 +function Dir2:rotation_from(_self,other) end + +---@package +---@param _self Dir2 + +---@param other Dir2 + +---@return Rot2 +function Dir2:rotation_to(_self,other) end + + +---@class Dir3 +--- A normalized vector pointing in a direction in 3D space +---@field [1] ? Vec3 +Dir3 = {} + +---@package +---@param value Vec3 + +---@return Dir3 +function Dir3.new_unchecked(value) end + +---@package +---@param _self Dir3 + +---@return Dir3 +function Dir3:neg(_self) end + +---@package +---@param _self Dir3 + +---@param rhs Dir3 + +---@param s number + +---@return Dir3 +function Dir3:slerp(_self,rhs,s) end + +---@package +---@param _self Dir3 + +---@param rhs number + +---@return Vec3 +function Dir3:mul(_self,rhs) end + +---@package +---@param _self Dir3 + +---@return Dir3 +function Dir3:clone(_self) end + +---@package +---@param _self Dir3 + +---@return Vec3 +function Dir3:as_vec3(_self) end + +---@package +---@param _self Dir3 + +---@return Dir3 +function Dir3:fast_renormalize(_self) end + +---@package +---@param _self Dir3 + +---@param other Dir3 + +---@return boolean +function Dir3:eq(_self,other) end + +---@package +---@param x number + +---@param y number + +---@param z number + +---@return Dir3 +function Dir3.from_xyz_unchecked(x,y,z) end + + +---@class Dir3A +--- A normalized SIMD vector pointing in a direction in 3D space.--- --- This type stores a 16 byte aligned [`Vec3A`].--- This may or may not be faster than [`Dir3`]: make sure to benchmark! +---@field [1] ? Vec3A +Dir3A = {} + +---@package +---@param _self Dir3A + +---@return Dir3A +function Dir3A:fast_renormalize(_self) end + +---@package +---@param _self Dir3A + +---@return Vec3A +function Dir3A:as_vec3a(_self) end + +---@package +---@param _self Dir3A + +---@param rhs Dir3A + +---@param s number + +---@return Dir3A +function Dir3A:slerp(_self,rhs,s) end + +---@package +---@param value Vec3A + +---@return Dir3A +function Dir3A.new_unchecked(value) end + +---@package +---@param _self Dir3A + +---@return Dir3A +function Dir3A:clone(_self) end + +---@package +---@param _self Dir3A + +---@param other Dir3A + +---@return boolean +function Dir3A:eq(_self,other) end + +---@package +---@param x number + +---@param y number + +---@param z number + +---@return Dir3A +function Dir3A.from_xyz_unchecked(x,y,z) end + +---@package +---@param _self Dir3A + +---@param rhs number + +---@return Vec3A +function Dir3A:mul(_self,rhs) end + +---@package +---@param _self Dir3A + +---@return Dir3A +function Dir3A:neg(_self) end + + +---@class FloatOrd +--- A wrapper for floats that implements [`Ord`], [`Eq`], and [`Hash`] traits.--- --- This is a work around for the fact that the IEEE 754-2008 standard,--- implemented by Rust's [`f32`] type,--- doesn't define an ordering for [`NaN`](f32::NAN),--- and `NaN` is not considered equal to any other `NaN`.--- --- Wrapping a float with `FloatOrd` breaks conformance with the standard--- by sorting `NaN` as less than all other numbers and equal to any other `NaN`. +---@field [1] ? number +FloatOrd = {} + +---@package +---@param _self FloatOrd + +---@param other FloatOrd + +---@return boolean +function FloatOrd:eq(_self,other) end + +---@package +---@param _self FloatOrd + +---@param other FloatOrd + +---@return boolean +function FloatOrd:lt(_self,other) end + +---@package +---@param _self FloatOrd + +---@return FloatOrd +function FloatOrd:neg(_self) end + +---@package +---@param _self FloatOrd + +---@param other FloatOrd + +---@return boolean +function FloatOrd:ge(_self,other) end + +---@package +---@param _self FloatOrd + +---@param other FloatOrd + +---@return boolean +function FloatOrd:le(_self,other) end + +---@package +---@param _self FloatOrd + +---@return FloatOrd +function FloatOrd:clone(_self) end + +---@package +---@param _self FloatOrd + +---@param other FloatOrd + +---@return boolean +function FloatOrd:gt(_self,other) end + + +---@class Isometry2d +--- An isometry in two dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(2). This includes translation and rotation, but excludes reflection.--- --- For the three-dimensional version, see [`Isometry3d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_abs_diff_eq;--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- let point = Vec2::new(4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_eq!(result, Vec2::new(-2.0, 5.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- # let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- # let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- # let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let circle_iso = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let rectangle_iso = Isometry2d::from_rotation(Rot2::degrees(90.0));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = circle_iso.inverse() * rectangle_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = circle_iso.inverse_mul(rectangle_iso);--- ``` +---@field rotation ? Rot2 +---@field translation ? Vec2 +Isometry2d = {} + +---@package +---@param translation Vec2 + +---@param rotation Rot2 + +---@return Isometry2d +function Isometry2d.new(translation,rotation) end + +---@package +---@param rotation Rot2 + +---@return Isometry2d +function Isometry2d.from_rotation(rotation) end + +---@package +---@param x number + +---@param y number + +---@return Isometry2d +function Isometry2d.from_xy(x,y) end + +---@package +---@param _self Isometry2d + +---@return Isometry2d +function Isometry2d:clone(_self) end + +---@package +---@param _self Isometry2d + +---@param point Vec2 + +---@return Vec2 +function Isometry2d:transform_point(_self,point) end + +---@package +---@param _self Isometry2d + +---@return Isometry2d +function Isometry2d:inverse(_self) end + +---@package +---@param translation Vec2 + +---@return Isometry2d +function Isometry2d.from_translation(translation) end + +---@package +---@param _self Isometry2d + +---@param point Vec2 + +---@return Vec2 +function Isometry2d:inverse_transform_point(_self,point) end + +---@package +---@param _self Isometry2d + +---@param rhs Isometry2d + +---@return Isometry2d +function Isometry2d:mul(_self,rhs) end + +---@package +---@param _self Isometry2d + +---@param rhs Isometry2d + +---@return Isometry2d +function Isometry2d:inverse_mul(_self,rhs) end + +---@package +---@param _self Isometry2d + +---@param other Isometry2d + +---@return boolean +function Isometry2d:eq(_self,other) end + + +---@class Isometry3d +--- An isometry in three dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(3). This includes translation and rotation, but excludes reflection.--- --- For the two-dimensional version, see [`Isometry2d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- let point = Vec3::new(4.0, 4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_relative_eq!(result, Vec3::new(-2.0, 5.0, 7.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- # let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- # let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- # let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let sphere_iso = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let cuboid_iso = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = sphere_iso.inverse() * cuboid_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = sphere_iso.inverse_mul(cuboid_iso);--- ``` +---@field rotation ? Quat +---@field translation ? Vec3A +Isometry3d = {} + +---@package +---@param x number + +---@param y number + +---@param z number + +---@return Isometry3d +function Isometry3d.from_xyz(x,y,z) end + +---@package +---@param rotation Quat + +---@return Isometry3d +function Isometry3d.from_rotation(rotation) end + +---@package +---@param _self Isometry3d + +---@param other Isometry3d + +---@return boolean +function Isometry3d:eq(_self,other) end + +---@package +---@param _self Isometry3d + +---@param rhs Isometry3d + +---@return Isometry3d +function Isometry3d:mul(_self,rhs) end + +---@package +---@param _self Isometry3d + +---@param rhs Isometry3d + +---@return Isometry3d +function Isometry3d:inverse_mul(_self,rhs) end + +---@package +---@param _self Isometry3d + +---@return Isometry3d +function Isometry3d:inverse(_self) end + +---@package +---@param _self Isometry3d + +---@return Isometry3d +function Isometry3d:clone(_self) end + + +---@class Annulus +--- A primitive shape formed by the region between two circles, also known as a ring. +---@field inner_circle ? Circle +---@field outer_circle ? Circle +Annulus = {} + +---@package +---@param _self Annulus + +---@return number +function Annulus:thickness(_self) end + +---@package +---@param _self Annulus + +---@return number +function Annulus:diameter(_self) end + +---@package +---@param inner_radius number + +---@param outer_radius number + +---@return Annulus +function Annulus.new(inner_radius,outer_radius) end + +---@package +---@param _self Annulus + +---@param point Vec2 + +---@return Vec2 +function Annulus:closest_point(_self,point) end + +---@package +---@param _self Annulus + +---@return Annulus +function Annulus:clone(_self) end + +---@package +---@param _self Annulus + +---@param other Annulus + +---@return boolean +function Annulus:eq(_self,other) end + + +---@class Arc2d +--- A primitive representing an arc between two points on a circle.--- --- An arc has no area.--- If you want to include the portion of a circle's area swept out by the arc,--- use the pie-shaped [`CircularSector`].--- If you want to include only the space inside the convex hull of the arc,--- use the bowl-shaped [`CircularSegment`].--- --- The arc is drawn starting from [`Vec2::Y`], extending by `half_angle` radians on--- either side. The center of the circle is the origin [`Vec2::ZERO`]. Note that this--- means that the origin may not be within the `Arc2d`'s convex hull.--- --- **Warning:** Arcs with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- It is recommended to normalize arcs to have an angle in [0, 2π]. +---@field radius ? number +---@field half_angle ? number +Arc2d = {} + +---@package +---@param _self Arc2d + +---@return Arc2d +function Arc2d:clone(_self) end + +---@package +---@param _self Arc2d + +---@return boolean +function Arc2d:is_major(_self) end + +---@package +---@param _self Arc2d + +---@return number +function Arc2d:angle(_self) end + +---@package +---@param _self Arc2d + +---@return number +function Arc2d:length(_self) end + +---@package +---@param _self Arc2d + +---@param other Arc2d + +---@return boolean +function Arc2d:eq(_self,other) end + +---@package +---@param _self Arc2d + +---@return boolean +function Arc2d:is_minor(_self) end + +---@package +---@param radius number + +---@param angle number + +---@return Arc2d +function Arc2d.from_degrees(radius,angle) end + +---@package +---@param _self Arc2d + +---@return Vec2 +function Arc2d:chord_midpoint(_self) end + +---@package +---@param _self Arc2d + +---@return Vec2 +function Arc2d:midpoint(_self) end + +---@package +---@param _self Arc2d + +---@return number +function Arc2d:apothem(_self) end + +---@package +---@param _self Arc2d + +---@return number +function Arc2d:chord_length(_self) end + +---@package +---@param _self Arc2d + +---@return Vec2 +function Arc2d:right_endpoint(_self) end + +---@package +---@param _self Arc2d + +---@return Vec2 +function Arc2d:left_endpoint(_self) end + +---@package +---@param _self Arc2d + +---@return number +function Arc2d:sagitta(_self) end + +---@package +---@param radius number + +---@param angle number + +---@return Arc2d +function Arc2d.from_radians(radius,angle) end + +---@package +---@param radius number + +---@param half_angle number + +---@return Arc2d +function Arc2d.new(radius,half_angle) end + +---@package +---@param _self Arc2d + +---@return number +function Arc2d:half_chord_length(_self) end + +---@package +---@param radius number + +---@param fraction number + +---@return Arc2d +function Arc2d.from_turns(radius,fraction) end + + +---@class Capsule2d +--- A 2D capsule primitive, also known as a stadium or pill shape.--- --- A two-dimensional capsule is defined as a neighborhood of points at a distance (radius) from a line +---@field radius ? number +---@field half_length ? number +Capsule2d = {} + +---@package +---@param _self Capsule2d + +---@return Rectangle +function Capsule2d:to_inner_rectangle(_self) end + +---@package +---@param radius number + +---@param length number + +---@return Capsule2d +function Capsule2d.new(radius,length) end + +---@package +---@param _self Capsule2d + +---@param other Capsule2d + +---@return boolean +function Capsule2d:eq(_self,other) end + +---@package +---@param _self Capsule2d + +---@return Capsule2d +function Capsule2d:clone(_self) end + + +---@class Circle +--- A circle primitive, representing the set of points some distance from the origin +---@field radius ? number +Circle = {} + +---@package +---@param _self Circle + +---@param other Circle + +---@return boolean +function Circle:eq(_self,other) end + +---@package +---@param _self Circle + +---@return number +function Circle:diameter(_self) end + +---@package +---@param _self Circle + +---@param point Vec2 + +---@return Vec2 +function Circle:closest_point(_self,point) end + +---@package +---@param radius number + +---@return Circle +function Circle.new(radius) end + +---@package +---@param _self Circle + +---@return Circle +function Circle:clone(_self) end + + +---@class CircularSector +--- A primitive representing a circular sector: a pie slice of a circle.--- --- The segment is positioned so that it always includes [`Vec2::Y`] and is vertically symmetrical.--- To orient the sector differently, apply a rotation.--- The sector is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- --- **Warning:** Circular sectors with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular sectors to have an angle in [0, 2π]. +---@field arc ? Arc2d +CircularSector = {} + +---@package +---@param _self CircularSector + +---@return number +function CircularSector:sagitta(_self) end + +---@package +---@param _self CircularSector + +---@return number +function CircularSector:angle(_self) end + +---@package +---@param _self CircularSector + +---@param other CircularSector + +---@return boolean +function CircularSector:eq(_self,other) end + +---@package +---@param _self CircularSector + +---@return number +function CircularSector:apothem(_self) end + +---@package +---@param _self CircularSector + +---@return Vec2 +function CircularSector:chord_midpoint(_self) end + +---@package +---@param _self CircularSector + +---@return CircularSector +function CircularSector:clone(_self) end + +---@package +---@param radius number + +---@param angle number + +---@return CircularSector +function CircularSector.new(radius,angle) end + +---@package +---@param _self CircularSector + +---@return number +function CircularSector:half_angle(_self) end + +---@package +---@param _self CircularSector + +---@return number +function CircularSector:arc_length(_self) end + +---@package +---@param _self CircularSector + +---@return number +function CircularSector:chord_length(_self) end + +---@package +---@param _self CircularSector + +---@return number +function CircularSector:radius(_self) end + +---@package +---@param radius number + +---@param angle number + +---@return CircularSector +function CircularSector.from_radians(radius,angle) end + +---@package +---@param radius number + +---@param angle number + +---@return CircularSector +function CircularSector.from_degrees(radius,angle) end + +---@package +---@param _self CircularSector + +---@return number +function CircularSector:half_chord_length(_self) end + +---@package +---@param radius number + +---@param fraction number + +---@return CircularSector +function CircularSector.from_turns(radius,fraction) end + + +---@class CircularSegment +--- A primitive representing a circular segment:--- the area enclosed by the arc of a circle and its chord (the line between its endpoints).--- --- The segment is drawn starting from [`Vec2::Y`], extending equally on either side.--- To orient the segment differently, apply a rotation.--- The segment is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- When positioning a segment, the [`apothem`](Self::apothem) function may be particularly useful.--- --- **Warning:** Circular segments with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular segments to have an angle in [0, 2π]. +---@field arc ? Arc2d +CircularSegment = {} + +---@package +---@param radius number + +---@param angle number + +---@return CircularSegment +function CircularSegment.from_degrees(radius,angle) end + +---@package +---@param _self CircularSegment + +---@return Vec2 +function CircularSegment:chord_midpoint(_self) end + +---@package +---@param _self CircularSegment + +---@return number +function CircularSegment:chord_length(_self) end + +---@package +---@param _self CircularSegment + +---@param other CircularSegment + +---@return boolean +function CircularSegment:eq(_self,other) end + +---@package +---@param _self CircularSegment + +---@return number +function CircularSegment:radius(_self) end + +---@package +---@param _self CircularSegment + +---@return number +function CircularSegment:half_angle(_self) end + +---@package +---@param _self CircularSegment + +---@return number +function CircularSegment:apothem(_self) end + +---@package +---@param _self CircularSegment + +---@return number +function CircularSegment:angle(_self) end + +---@package +---@param _self CircularSegment + +---@return CircularSegment +function CircularSegment:clone(_self) end + +---@package +---@param radius number + +---@param fraction number + +---@return CircularSegment +function CircularSegment.from_turns(radius,fraction) end + +---@package +---@param radius number + +---@param angle number + +---@return CircularSegment +function CircularSegment.from_radians(radius,angle) end + +---@package +---@param _self CircularSegment + +---@return number +function CircularSegment:arc_length(_self) end + +---@package +---@param _self CircularSegment + +---@return number +function CircularSegment:half_chord_length(_self) end + +---@package +---@param _self CircularSegment + +---@return number +function CircularSegment:sagitta(_self) end + +---@package +---@param radius number + +---@param angle number + +---@return CircularSegment +function CircularSegment.new(radius,angle) end + + +---@class Ellipse +--- An ellipse primitive, which is like a circle, but the width and height can be different +---@field half_size ? Vec2 +Ellipse = {} + +---@package +---@param _self Ellipse + +---@return number +function Ellipse:focal_length(_self) end + +---@package +---@param _self Ellipse + +---@param other Ellipse + +---@return boolean +function Ellipse:eq(_self,other) end + +---@package +---@param half_width number + +---@param half_height number + +---@return Ellipse +function Ellipse.new(half_width,half_height) end + +---@package +---@param size Vec2 + +---@return Ellipse +function Ellipse.from_size(size) end + +---@package +---@param _self Ellipse + +---@return number +function Ellipse:semi_major(_self) end + +---@package +---@param _self Ellipse + +---@return number +function Ellipse:eccentricity(_self) end + +---@package +---@param _self Ellipse + +---@return number +function Ellipse:semi_minor(_self) end + +---@package +---@param _self Ellipse + +---@return Ellipse +function Ellipse:clone(_self) end + + +---@class Line2d +--- An infinite line going through the origin along a direction in 2D space.--- --- For a finite line: [`Segment2d`] +---@field direction ? Dir2 +Line2d = {} + +---@package +---@param _self Line2d + +---@param other Line2d + +---@return boolean +function Line2d:eq(_self,other) end + +---@package +---@param _self Line2d + +---@return Line2d +function Line2d:clone(_self) end + + +---@class Plane2d +--- An unbounded plane in 2D space. It forms a separating surface through the origin,--- stretching infinitely far +---@field normal ? Dir2 +Plane2d = {} + +---@package +---@param _self Plane2d + +---@param other Plane2d + +---@return boolean +function Plane2d:eq(_self,other) end + +---@package +---@param normal Vec2 + +---@return Plane2d +function Plane2d.new(normal) end + +---@package +---@param _self Plane2d + +---@return Plane2d +function Plane2d:clone(_self) end + + +---@class Rectangle +--- A rectangle primitive, which is like a square, except that the width and height can be different +---@field half_size ? Vec2 +Rectangle = {} + +---@package +---@param _self Rectangle + +---@param other Rectangle + +---@return boolean +function Rectangle:eq(_self,other) end + +---@package +---@param _self Rectangle + +---@param point Vec2 + +---@return Vec2 +function Rectangle:closest_point(_self,point) end + +---@package +---@param length number + +---@return Rectangle +function Rectangle.from_length(length) end + +---@package +---@param point1 Vec2 + +---@param point2 Vec2 + +---@return Rectangle +function Rectangle.from_corners(point1,point2) end + +---@package +---@param _self Rectangle + +---@return Rectangle +function Rectangle:clone(_self) end + +---@package +---@param _self Rectangle + +---@return Vec2 +function Rectangle:size(_self) end + +---@package +---@param size Vec2 + +---@return Rectangle +function Rectangle.from_size(size) end + +---@package +---@param width number + +---@param height number + +---@return Rectangle +function Rectangle.new(width,height) end + + +---@class RegularPolygon +--- A polygon centered on the origin where all vertices lie on a circle, equally far apart. +---@field circumcircle ? Circle +---@field sides ? integer +RegularPolygon = {} + +---@package +---@param _self RegularPolygon + +---@return number +function RegularPolygon:external_angle_degrees(_self) end + +---@package +---@param _self RegularPolygon + +---@return number +function RegularPolygon:side_length(_self) end + +---@package +---@param _self RegularPolygon + +---@return number +function RegularPolygon:circumradius(_self) end + +---@package +---@param _self RegularPolygon + +---@return number +function RegularPolygon:external_angle_radians(_self) end + +---@package +---@param _self RegularPolygon + +---@return number +function RegularPolygon:internal_angle_degrees(_self) end + +---@package +---@param _self RegularPolygon + +---@param other RegularPolygon + +---@return boolean +function RegularPolygon:eq(_self,other) end + +---@package +---@param _self RegularPolygon + +---@return number +function RegularPolygon:internal_angle_radians(_self) end + +---@package +---@param circumradius number + +---@param sides integer + +---@return RegularPolygon +function RegularPolygon.new(circumradius,sides) end + +---@package +---@param _self RegularPolygon + +---@return RegularPolygon +function RegularPolygon:clone(_self) end + +---@package +---@param _self RegularPolygon + +---@return number +function RegularPolygon:inradius(_self) end + + +---@class Rhombus +--- A rhombus primitive, also known as a diamond shape.--- A four sided polygon, centered on the origin, where opposite sides are parallel but without--- requiring right angles. +---@field half_diagonals ? Vec2 +Rhombus = {} + +---@package +---@param _self Rhombus + +---@return Rhombus +function Rhombus:clone(_self) end + +---@package +---@param _self Rhombus + +---@return number +function Rhombus:inradius(_self) end + +---@package +---@param horizontal_diagonal number + +---@param vertical_diagonal number + +---@return Rhombus +function Rhombus.new(horizontal_diagonal,vertical_diagonal) end + +---@package +---@param side number + +---@return Rhombus +function Rhombus.from_side(side) end + +---@package +---@param _self Rhombus + +---@param point Vec2 + +---@return Vec2 +function Rhombus:closest_point(_self,point) end + +---@package +---@param _self Rhombus + +---@return number +function Rhombus:circumradius(_self) end + +---@package +---@param _self Rhombus + +---@param other Rhombus + +---@return boolean +function Rhombus:eq(_self,other) end + +---@package +---@param _self Rhombus + +---@return number +function Rhombus:side(_self) end + +---@package +---@param inradius number + +---@return Rhombus +function Rhombus.from_inradius(inradius) end + + +---@class Segment2d +--- A line segment defined by two endpoints in 2D space. +---@field vertices ? [glam::Vec2; 2] +Segment2d = {} + +---@package +---@param _self Segment2d + +---@return number +function Segment2d:length_squared(_self) end + +---@package +---@param ray Ray2d + +---@param length number + +---@return Segment2d +function Segment2d.from_ray_and_length(ray,length) end + +---@package +---@param _self Segment2d + +---@return Dir2 +function Segment2d:left_normal(_self) end + +---@package +---@param _self Segment2d + +---@return Vec2 +function Segment2d:point2(_self) end + +---@package +---@param point1 Vec2 + +---@param point2 Vec2 + +---@return Segment2d +function Segment2d.new(point1,point2) end + +---@package +---@param _self Segment2d + +---@return Vec2 +function Segment2d:center(_self) end + +---@package +---@param _self Segment2d + +---@return Vec2 +function Segment2d:point1(_self) end + +---@package +---@param _self Segment2d + +---@param rotation Rot2 + +---@return Segment2d +function Segment2d:rotated(_self,rotation) end + +---@package +---@param _self Segment2d + +---@param rotation Rot2 + +---@return Segment2d +function Segment2d:rotated_around_center(_self,rotation) end + +---@package +---@param _self Segment2d + +---@param rotation Rot2 + +---@param point Vec2 + +---@return Segment2d +function Segment2d:rotated_around(_self,rotation,point) end + +---@package +---@param direction Dir2 + +---@param length number + +---@return Segment2d +function Segment2d.from_direction_and_length(direction,length) end + +---@package +---@param _self Segment2d + +---@return Vec2 +function Segment2d:scaled_left_normal(_self) end + +---@package +---@param _self Segment2d + +---@return Segment2d +function Segment2d:centered(_self) end + +---@package +---@param _self Segment2d + +---@return Dir2 +function Segment2d:right_normal(_self) end + +---@package +---@param scaled_direction Vec2 + +---@return Segment2d +function Segment2d.from_scaled_direction(scaled_direction) end + +---@package +---@param _self Segment2d + +---@return Dir2 +function Segment2d:direction(_self) end + +---@package +---@param _self Segment2d + +---@return Vec2 +function Segment2d:scaled_right_normal(_self) end + +---@package +---@param _self Segment2d + +---@return Segment2d +function Segment2d:reversed(_self) end + +---@package +---@param _self Segment2d + +---@param length number + +---@return Segment2d +function Segment2d:resized(_self,length) end + +---@package +---@param _self Segment2d + +---@return Segment2d +function Segment2d:clone(_self) end + +---@package +---@param _self Segment2d + +---@return [] +function Segment2d:reverse(_self) end + +---@package +---@param _self Segment2d + +---@param other Segment2d + +---@return boolean +function Segment2d:eq(_self,other) end + +---@package +---@param _self Segment2d + +---@return number +function Segment2d:length(_self) end + +---@package +---@param _self Segment2d + +---@param translation Vec2 + +---@return Segment2d +function Segment2d:translated(_self,translation) end + +---@package +---@param _self Segment2d + +---@return Vec2 +function Segment2d:scaled_direction(_self) end + + +---@class Triangle2d +--- A triangle in 2D space +---@field vertices ? [glam::Vec2; 3] +Triangle2d = {} + +---@package +---@param _self Triangle2d + +---@return [] +function Triangle2d:reverse(_self) end + +---@package +---@param _self Triangle2d + +---@return Triangle2d +function Triangle2d:reversed(_self) end + +---@package +---@param _self Triangle2d + +---@return boolean +function Triangle2d:is_acute(_self) end + +---@package +---@param _self Triangle2d + +---@return boolean +function Triangle2d:is_obtuse(_self) end + +---@package +---@param _self Triangle2d + +---@param other Triangle2d + +---@return boolean +function Triangle2d:eq(_self,other) end + +---@package +---@param a Vec2 + +---@param b Vec2 + +---@param c Vec2 + +---@return Triangle2d +function Triangle2d.new(a,b,c) end + +---@package +---@param _self Triangle2d + +---@return Triangle2d +function Triangle2d:clone(_self) end + +---@package +---@param _self Triangle2d + +---@return boolean +function Triangle2d:is_degenerate(_self) end + + +---@class Capsule3d +--- A 3D capsule primitive centered on the origin--- A three-dimensional capsule is defined as a surface at a distance (radius) from a line +---@field radius ? number +---@field half_length ? number +Capsule3d = {} + +---@package +---@param _self Capsule3d + +---@return Cylinder +function Capsule3d:to_cylinder(_self) end + +---@package +---@param _self Capsule3d + +---@return Capsule3d +function Capsule3d:clone(_self) end + +---@package +---@param _self Capsule3d + +---@param other Capsule3d + +---@return boolean +function Capsule3d:eq(_self,other) end + +---@package +---@param radius number + +---@param length number + +---@return Capsule3d +function Capsule3d.new(radius,length) end + + +---@class Cone +--- A cone primitive centered on the midpoint between the tip of the cone and the center of its base.--- --- The cone is oriented with its tip pointing towards the Y axis. +---@field radius ? number +---@field height ? number +Cone = {} + +---@package +---@param _self Cone + +---@return number +function Cone:slant_height(_self) end + +---@package +---@param _self Cone + +---@return number +function Cone:base_area(_self) end + +---@package +---@param radius number + +---@param height number + +---@return Cone +function Cone.new(radius,height) end + +---@package +---@param _self Cone + +---@return Cone +function Cone:clone(_self) end + +---@package +---@param _self Cone + +---@param other Cone + +---@return boolean +function Cone:eq(_self,other) end + +---@package +---@param _self Cone + +---@return number +function Cone:lateral_area(_self) end + +---@package +---@param _self Cone + +---@return Circle +function Cone:base(_self) end + + +---@class ConicalFrustum +--- A conical frustum primitive.--- A conical frustum can be created--- by slicing off a section of a cone. +---@field radius_top ? number +---@field radius_bottom ? number +---@field height ? number +ConicalFrustum = {} + +---@package +---@param _self ConicalFrustum + +---@param other ConicalFrustum + +---@return boolean +function ConicalFrustum:eq(_self,other) end + +---@package +---@param _self ConicalFrustum + +---@return ConicalFrustum +function ConicalFrustum:clone(_self) end + + +---@class Cuboid +--- A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not--- required to be the same. +---@field half_size ? Vec3 +Cuboid = {} + +---@package +---@param _self Cuboid + +---@param point Vec3 + +---@return Vec3 +function Cuboid:closest_point(_self,point) end + +---@package +---@param length number + +---@return Cuboid +function Cuboid.from_length(length) end + +---@package +---@param _self Cuboid + +---@return Cuboid +function Cuboid:clone(_self) end + +---@package +---@param _self Cuboid + +---@param other Cuboid + +---@return boolean +function Cuboid:eq(_self,other) end + +---@package +---@param size Vec3 + +---@return Cuboid +function Cuboid.from_size(size) end + +---@package +---@param _self Cuboid + +---@return Vec3 +function Cuboid:size(_self) end + +---@package +---@param x_length number + +---@param y_length number + +---@param z_length number + +---@return Cuboid +function Cuboid.new(x_length,y_length,z_length) end + +---@package +---@param point1 Vec3 + +---@param point2 Vec3 + +---@return Cuboid +function Cuboid.from_corners(point1,point2) end + + +---@class Cylinder +--- A cylinder primitive centered on the origin +---@field radius ? number +---@field half_height ? number +Cylinder = {} + +---@package +---@param _self Cylinder + +---@param other Cylinder + +---@return boolean +function Cylinder:eq(_self,other) end + +---@package +---@param _self Cylinder + +---@return number +function Cylinder:lateral_area(_self) end + +---@package +---@param radius number + +---@param height number + +---@return Cylinder +function Cylinder.new(radius,height) end + +---@package +---@param _self Cylinder + +---@return Circle +function Cylinder:base(_self) end + +---@package +---@param _self Cylinder + +---@return Cylinder +function Cylinder:clone(_self) end + +---@package +---@param _self Cylinder + +---@return number +function Cylinder:base_area(_self) end + + +---@class InfinitePlane3d +--- An unbounded plane in 3D space. It forms a separating surface through the origin,--- stretching infinitely far +---@field normal ? Dir3 +InfinitePlane3d = {} + +---@package +---@param _self InfinitePlane3d + +---@param other InfinitePlane3d + +---@return boolean +function InfinitePlane3d:eq(_self,other) end + +---@package +---@param _self InfinitePlane3d + +---@return InfinitePlane3d +function InfinitePlane3d:clone(_self) end + +---@package +---@param _self InfinitePlane3d + +---@param origin Vec3 + +---@return Isometry3d +function InfinitePlane3d:isometry_from_xy(_self,origin) end + +---@package +---@param _self InfinitePlane3d + +---@param origin Vec3 + +---@return Isometry3d +function InfinitePlane3d:isometry_into_xy(_self,origin) end + + +---@class Line3d +--- An infinite line going through the origin along a direction in 3D space.--- --- For a finite line: [`Segment3d`] +---@field direction ? Dir3 +Line3d = {} + +---@package +---@param _self Line3d + +---@return Line3d +function Line3d:clone(_self) end + +---@package +---@param _self Line3d + +---@param other Line3d + +---@return boolean +function Line3d:eq(_self,other) end + + +---@class Plane3d +--- A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width. +---@field normal ? Dir3 +---@field half_size ? Vec2 +Plane3d = {} + +---@package +---@param _self Plane3d + +---@return Plane3d +function Plane3d:clone(_self) end + +---@package +---@param normal Vec3 + +---@param half_size Vec2 + +---@return Plane3d +function Plane3d.new(normal,half_size) end + +---@package +---@param _self Plane3d + +---@param other Plane3d + +---@return boolean +function Plane3d:eq(_self,other) end + + +---@class Segment3d +--- A line segment defined by two endpoints in 3D space. +---@field vertices ? [glam::Vec3; 2] +Segment3d = {} + +---@package +---@param _self Segment3d + +---@return Vec3 +function Segment3d:scaled_direction(_self) end + +---@package +---@param scaled_direction Vec3 + +---@return Segment3d +function Segment3d.from_scaled_direction(scaled_direction) end + +---@package +---@param direction Dir3 + +---@param length number + +---@return Segment3d +function Segment3d.from_direction_and_length(direction,length) end + +---@package +---@param _self Segment3d + +---@param rotation Quat + +---@return Segment3d +function Segment3d:rotated(_self,rotation) end + +---@package +---@param _self Segment3d + +---@return number +function Segment3d:length(_self) end + +---@package +---@param _self Segment3d + +---@param translation Vec3 + +---@return Segment3d +function Segment3d:translated(_self,translation) end + +---@package +---@param _self Segment3d + +---@return [] +function Segment3d:reverse(_self) end + +---@package +---@param _self Segment3d + +---@return Vec3 +function Segment3d:center(_self) end + +---@package +---@param _self Segment3d + +---@return Dir3 +function Segment3d:direction(_self) end + +---@package +---@param _self Segment3d + +---@return number +function Segment3d:length_squared(_self) end + +---@package +---@param _self Segment3d + +---@return Vec3 +function Segment3d:point1(_self) end + +---@package +---@param _self Segment3d + +---@param rotation Quat + +---@param point Vec3 + +---@return Segment3d +function Segment3d:rotated_around(_self,rotation,point) end + +---@package +---@param _self Segment3d + +---@param rotation Quat + +---@return Segment3d +function Segment3d:rotated_around_center(_self,rotation) end + +---@package +---@param _self Segment3d + +---@param other Segment3d + +---@return boolean +function Segment3d:eq(_self,other) end + +---@package +---@param _self Segment3d + +---@return Segment3d +function Segment3d:clone(_self) end + +---@package +---@param _self Segment3d + +---@return Vec3 +function Segment3d:point2(_self) end + +---@package +---@param _self Segment3d + +---@return Segment3d +function Segment3d:reversed(_self) end + +---@package +---@param ray Ray3d + +---@param length number + +---@return Segment3d +function Segment3d.from_ray_and_length(ray,length) end + +---@package +---@param _self Segment3d + +---@param length number + +---@return Segment3d +function Segment3d:resized(_self,length) end + +---@package +---@param _self Segment3d + +---@return Segment3d +function Segment3d:centered(_self) end + +---@package +---@param point1 Vec3 + +---@param point2 Vec3 + +---@return Segment3d +function Segment3d.new(point1,point2) end + + +---@class Sphere +--- A sphere primitive, representing the set of all points some distance from the origin +---@field radius ? number +Sphere = {} + +---@package +---@param _self Sphere + +---@param other Sphere + +---@return boolean +function Sphere:eq(_self,other) end + +---@package +---@param _self Sphere + +---@return number +function Sphere:diameter(_self) end + +---@package +---@param _self Sphere + +---@param point Vec3 + +---@return Vec3 +function Sphere:closest_point(_self,point) end + +---@package +---@param _self Sphere + +---@return Sphere +function Sphere:clone(_self) end + +---@package +---@param radius number + +---@return Sphere +function Sphere.new(radius) end + + +---@class Tetrahedron +--- A tetrahedron primitive. +---@field vertices ? [glam::Vec3; 4] +Tetrahedron = {} + +---@package +---@param _self Tetrahedron + +---@return Vec3 +function Tetrahedron:centroid(_self) end + +---@package +---@param _self Tetrahedron + +---@return Tetrahedron +function Tetrahedron:clone(_self) end + +---@package +---@param _self Tetrahedron + +---@return number +function Tetrahedron:signed_volume(_self) end + +---@package +---@param _self Tetrahedron + +---@param other Tetrahedron + +---@return boolean +function Tetrahedron:eq(_self,other) end + +---@package +---@param a Vec3 + +---@param b Vec3 + +---@param c Vec3 + +---@param d Vec3 + +---@return Tetrahedron +function Tetrahedron.new(a,b,c,d) end + + +---@class Torus +--- A torus primitive, often representing a ring or donut shape--- The set of points some distance from a circle centered at the origin +---@field minor_radius ? number +---@field major_radius ? number +Torus = {} + +---@package +---@param _self Torus + +---@return number +function Torus:inner_radius(_self) end + +---@package +---@param _self Torus + +---@return Torus +function Torus:clone(_self) end + +---@package +---@param inner_radius number + +---@param outer_radius number + +---@return Torus +function Torus.new(inner_radius,outer_radius) end + +---@package +---@param _self Torus + +---@return number +function Torus:outer_radius(_self) end + +---@package +---@param _self Torus + +---@param other Torus + +---@return boolean +function Torus:eq(_self,other) end + + +---@class Triangle3d +--- A 3D triangle primitive. +---@field vertices ? [glam::Vec3; 3] +Triangle3d = {} + +---@package +---@param _self Triangle3d + +---@param other Triangle3d + +---@return boolean +function Triangle3d:eq(_self,other) end + +---@package +---@param _self Triangle3d + +---@return [] +function Triangle3d:reverse(_self) end + +---@package +---@param a Vec3 + +---@param b Vec3 + +---@param c Vec3 + +---@return Triangle3d +function Triangle3d.new(a,b,c) end + +---@package +---@param _self Triangle3d + +---@return boolean +function Triangle3d:is_obtuse(_self) end + +---@package +---@param _self Triangle3d + +---@return Triangle3d +function Triangle3d:clone(_self) end + +---@package +---@param _self Triangle3d + +---@return boolean +function Triangle3d:is_degenerate(_self) end + +---@package +---@param _self Triangle3d + +---@return Vec3 +function Triangle3d:circumcenter(_self) end + +---@package +---@param _self Triangle3d + +---@return Vec3 +function Triangle3d:centroid(_self) end + +---@package +---@param _self Triangle3d + +---@return Triangle3d +function Triangle3d:reversed(_self) end + +---@package +---@param _self Triangle3d + +---@return boolean +function Triangle3d:is_acute(_self) end + + +---@class Ray2d +--- An infinite half-line starting at `origin` and going in `direction` in 2D space. +---@field origin ? Vec2 +---@field direction ? Dir2 +Ray2d = {} + +---@package +---@param _self Ray2d + +---@param distance number + +---@return Vec2 +function Ray2d:get_point(_self,distance) end + +---@package +---@param _self Ray2d + +---@param plane_origin Vec2 + +---@param plane Plane2d + +---@return number | nil +function Ray2d:intersect_plane(_self,plane_origin,plane) end + +---@package +---@param _self Ray2d + +---@return Ray2d +function Ray2d:clone(_self) end + +---@package +---@param _self Ray2d + +---@param other Ray2d + +---@return boolean +function Ray2d:eq(_self,other) end + +---@package +---@param origin Vec2 + +---@param direction Dir2 + +---@return Ray2d +function Ray2d.new(origin,direction) end + + +---@class Ray3d +--- An infinite half-line starting at `origin` and going in `direction` in 3D space. +---@field origin ? Vec3 +---@field direction ? Dir3 +Ray3d = {} + +---@package +---@param origin Vec3 + +---@param direction Dir3 + +---@return Ray3d +function Ray3d.new(origin,direction) end + +---@package +---@param _self Ray3d + +---@param other Ray3d + +---@return boolean +function Ray3d:eq(_self,other) end + +---@package +---@param _self Ray3d + +---@return Ray3d +function Ray3d:clone(_self) end + +---@package +---@param _self Ray3d + +---@param distance number + +---@return Vec3 +function Ray3d:get_point(_self,distance) end + +---@package +---@param _self Ray3d + +---@param plane_origin Vec3 + +---@param plane InfinitePlane3d + +---@return number | nil +function Ray3d:intersect_plane(_self,plane_origin,plane) end + + +---@class IRect +--- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `IRect::min` and `IRect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@field min ? IVec2 +---@field max ? IVec2 +IRect = {} + +---@package +---@param _self IRect + +---@return IVec2 +function IRect:size(_self) end + +---@package +---@param _self IRect + +---@return IRect +function IRect:clone(_self) end + +---@package +---@param _self IRect + +---@return [] +function IRect:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self IRect + +---@return Rect +function IRect:as_rect(_self) end + +---@package +---@param _self IRect + +---@return IVec2 +function IRect:half_size(_self) end + +---@package +---@param _self IRect + +---@return boolean +function IRect:is_empty(_self) end + +---@package +---@param _self IRect + +---@return integer +function IRect:height(_self) end + +---@package +---@param _self IRect + +---@param other IRect + +---@return boolean +function IRect:eq(_self,other) end + +---@package +---@param _self IRect + +---@param other IRect + +---@return IRect +function IRect:union(_self,other) end + +---@package +---@param _self IRect + +---@param point IVec2 + +---@return boolean +function IRect:contains(_self,point) end + +---@package +---@param x0 integer + +---@param y0 integer + +---@param x1 integer + +---@param y1 integer + +---@return IRect +function IRect.new(x0,y0,x1,y1) end + +---@package +---@param _self IRect + +---@param other IVec2 + +---@return IRect +function IRect:union_point(_self,other) end + +---@package +---@param _self IRect + +---@param expansion integer + +---@return IRect +function IRect:inflate(_self,expansion) end + +---@package +---@param _self IRect + +---@return URect +function IRect:as_urect(_self) end + +---@package +---@param _self IRect + +---@return IVec2 +function IRect:center(_self) end + +---@package +---@param _self IRect + +---@param other IRect + +---@return IRect +function IRect:intersect(_self,other) end + +---@package +---@param _self IRect + +---@return integer +function IRect:width(_self) end + +---@package +---@param p0 IVec2 + +---@param p1 IVec2 + +---@return IRect +function IRect.from_corners(p0,p1) end + +---@package +---@param origin IVec2 + +---@param size IVec2 + +---@return IRect +function IRect.from_center_size(origin,size) end + +---@package +---@param origin IVec2 + +---@param half_size IVec2 + +---@return IRect +function IRect.from_center_half_size(origin,half_size) end + + +---@class Rect +--- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `Rect::min` and `Rect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@field min ? Vec2 +---@field max ? Vec2 +Rect = {} + +---@package +---@param _self Rect + +---@return IRect +function Rect:as_irect(_self) end + +---@package +---@param _self Rect + +---@return number +function Rect:height(_self) end + +---@package +---@param origin Vec2 + +---@param size Vec2 + +---@return Rect +function Rect.from_center_size(origin,size) end + +---@package +---@param _self Rect + +---@return Vec2 +function Rect:half_size(_self) end + +---@package +---@param _self Rect + +---@param other Rect + +---@return Rect +function Rect:normalize(_self,other) end + +---@package +---@param _self Rect + +---@return number +function Rect:width(_self) end + +---@package +---@param _self Rect + +---@param expansion number + +---@return Rect +function Rect:inflate(_self,expansion) end + +---@package +---@param _self Rect + +---@param other Rect + +---@return boolean +function Rect:eq(_self,other) end + +---@package +---@param _self Rect + +---@return Rect +function Rect:clone(_self) end + +---@package +---@param _self Rect + +---@param other Rect + +---@return Rect +function Rect:union(_self,other) end + +---@package +---@param _self Rect + +---@return Vec2 +function Rect:center(_self) end + +---@package +---@param _self Rect + +---@return URect +function Rect:as_urect(_self) end + +---@package +---@param p0 Vec2 + +---@param p1 Vec2 + +---@return Rect +function Rect.from_corners(p0,p1) end + +---@package +---@param x0 number + +---@param y0 number + +---@param x1 number + +---@param y1 number + +---@return Rect +function Rect.new(x0,y0,x1,y1) end + +---@package +---@param _self Rect + +---@return Vec2 +function Rect:size(_self) end + +---@package +---@param _self Rect + +---@param other Rect + +---@return Rect +function Rect:intersect(_self,other) end + +---@package +---@param origin Vec2 + +---@param half_size Vec2 + +---@return Rect +function Rect.from_center_half_size(origin,half_size) end + +---@package +---@param _self Rect + +---@param other Vec2 + +---@return Rect +function Rect:union_point(_self,other) end + +---@package +---@param _self Rect + +---@return boolean +function Rect:is_empty(_self) end + +---@package +---@param _self Rect + +---@param point Vec2 + +---@return boolean +function Rect:contains(_self,point) end + + +---@class URect +--- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `URect::min` and `URect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@field min ? UVec2 +---@field max ? UVec2 +URect = {} + +---@package +---@param origin UVec2 + +---@param half_size UVec2 + +---@return URect +function URect.from_center_half_size(origin,half_size) end + +---@package +---@param _self URect + +---@return boolean +function URect:is_empty(_self) end + +---@package +---@param _self URect + +---@return [] +function URect:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self URect + +---@param expansion integer + +---@return URect +function URect:inflate(_self,expansion) end + +---@package +---@param _self URect + +---@return UVec2 +function URect:center(_self) end + +---@package +---@param _self URect + +---@return URect +function URect:clone(_self) end + +---@package +---@param _self URect + +---@param point UVec2 + +---@return boolean +function URect:contains(_self,point) end + +---@package +---@param _self URect + +---@param other URect + +---@return boolean +function URect:eq(_self,other) end + +---@package +---@param _self URect + +---@return integer +function URect:height(_self) end + +---@package +---@param _self URect + +---@return UVec2 +function URect:size(_self) end + +---@package +---@param x0 integer + +---@param y0 integer + +---@param x1 integer + +---@param y1 integer + +---@return URect +function URect.new(x0,y0,x1,y1) end + +---@package +---@param _self URect + +---@return UVec2 +function URect:half_size(_self) end + +---@package +---@param _self URect + +---@param other UVec2 + +---@return URect +function URect:union_point(_self,other) end + +---@package +---@param _self URect + +---@return IRect +function URect:as_irect(_self) end + +---@package +---@param _self URect + +---@return integer +function URect:width(_self) end + +---@package +---@param _self URect + +---@return Rect +function URect:as_rect(_self) end + +---@package +---@param _self URect + +---@param other URect + +---@return URect +function URect:union(_self,other) end + +---@package +---@param p0 UVec2 + +---@param p1 UVec2 + +---@return URect +function URect.from_corners(p0,p1) end + +---@package +---@param origin UVec2 + +---@param size UVec2 + +---@return URect +function URect.from_center_size(origin,size) end + +---@package +---@param _self URect + +---@param other URect + +---@return URect +function URect:intersect(_self,other) end + + +---@class Rot2 +--- A counterclockwise 2D rotation.--- --- # Example--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Rot2, Vec2};--- use std::f32::consts::PI;--- --- // Create rotations from radians or degrees--- let rotation1 = Rot2::radians(PI / 2.0);--- let rotation2 = Rot2::degrees(45.0);--- --- // Get the angle back as radians or degrees--- assert_eq!(rotation1.as_degrees(), 90.0);--- assert_eq!(rotation2.as_radians(), PI / 4.0);--- --- // "Add" rotations together using `*`--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * rotation2, Rot2::degrees(135.0));--- --- // Rotate vectors--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * Vec2::X, Vec2::Y);--- ``` +---@field cos ? number +---@field sin ? number +Rot2 = {} + +---@package +---@param _self Rot2 + +---@param other Rot2 + +---@return number +function Rot2:angle_to(_self,other) end + +---@package +---@param degrees number + +---@return Rot2 +function Rot2.degrees(degrees) end + +---@package +---@param _self Rot2 + +---@return number +function Rot2:as_radians(_self) end + +---@package +---@param _self Rot2 + +---@return boolean +function Rot2:is_finite(_self) end + +---@package +---@param _self Rot2 + +---@return number +function Rot2:length_recip(_self) end + +---@package +---@param _self Rot2 + +---@return number +function Rot2:as_turn_fraction(_self) end + +---@package +---@param _self Rot2 + +---@param _end Rot2 + +---@param s number + +---@return Rot2 +function Rot2:slerp(_self,_end,s) end + +---@package +---@param _self Rot2 + +---@return number +function Rot2:length_squared(_self) end + +---@package +---@param _self Rot2 + +---@param rhs Rot2 + +---@return Rot2 +function Rot2:mul(_self,rhs) end + +---@package +---@param _self Rot2 + +---@return Rot2 +function Rot2:inverse(_self) end + +---@package +---@param _self Rot2 + +---@return Rot2 +function Rot2:normalize(_self) end + +---@package +---@param _self Rot2 + +---@param other Rot2 + +---@return boolean +function Rot2:eq(_self,other) end + +---@package +---@param radians number + +---@return Rot2 +function Rot2.radians(radians) end + +---@package +---@param _self Rot2 + +---@return Rot2 +function Rot2:fast_renormalize(_self) end + +---@package +---@param _self Rot2 + +---@return Rot2 +function Rot2:clone(_self) end + +---@package +---@param _self Rot2 + +---@return boolean +function Rot2:is_near_identity(_self) end + +---@package +---@param _self Rot2 + +---@return boolean +function Rot2:is_nan(_self) end + +---@package +---@param _self Rot2 + +---@return [number, number] +function Rot2:sin_cos(_self) end + +---@package +---@param sin number + +---@param cos number + +---@return Rot2 +function Rot2.from_sin_cos(sin,cos) end + +---@package +---@param _self Rot2 + +---@param _end Rot2 + +---@param s number + +---@return Rot2 +function Rot2:nlerp(_self,_end,s) end + +---@package +---@param _self Rot2 + +---@return boolean +function Rot2:is_normalized(_self) end + +---@package +---@param _self Rot2 + +---@return number +function Rot2:as_degrees(_self) end + +---@package +---@param _self Rot2 + +---@return number +function Rot2:length(_self) end + +---@package +---@param fraction number + +---@return Rot2 +function Rot2.turn_fraction(fraction) end + + +---@class Instant + +Instant = {} + +---@package +---@param _self Instant + +---@param other Duration + +---@return Instant +function Instant:add(_self,other) end + +---@package +---@param _self Instant + +---@param earlier Instant + +---@return Duration +function Instant:saturating_duration_since(_self,earlier) end + +---@package +---@param _self Instant + +---@param earlier Instant + +---@return Duration +function Instant:duration_since(_self,earlier) end + +---@package +---@param _self Instant + +---@param other Duration + +---@return Instant +function Instant:sub(_self,other) end + +---@package +---@param _self Instant + +---@param other Instant + +---@return boolean +function Instant:eq(_self,other) end + +---@package +---@param _self Instant + +---@return Instant +function Instant:clone(_self) end + +---@package +---@param _self Instant + +---@return [] +function Instant:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self Instant + +---@return Duration +function Instant:elapsed(_self) end + +---@package +---@return Instant +function Instant.now() end + + +---@class Fixed +--- The fixed timestep game clock following virtual time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Virtual). The fixed clock is automatically set as the--- generic [`Time`] resource during [`FixedUpdate`](bevy_app::FixedUpdate)--- schedule processing.--- --- The fixed timestep clock advances in fixed-size increments, which is--- extremely useful for writing logic (like physics) that should have--- consistent behavior, regardless of framerate.--- --- The default [`timestep()`](Time::timestep) is 64 hertz, or 15625--- microseconds. This value was chosen because using 60 hertz has the potential--- for a pathological interaction with the monitor refresh rate where the game--- alternates between running two fixed timesteps and zero fixed timesteps per--- frame (for example when running two fixed timesteps takes longer than a--- frame). Additionally, the value is a power of two which losslessly converts--- into [`f32`] and [`f64`].--- --- To run a system on a fixed timestep, add it to one of the [`FixedMain`]--- schedules, most commonly [`FixedUpdate`](bevy_app::FixedUpdate).--- --- This schedule is run a number of times between--- [`PreUpdate`](bevy_app::PreUpdate) and [`Update`](bevy_app::Update)--- according to the accumulated [`overstep()`](Time::overstep) time divided by--- the [`timestep()`](Time::timestep). This means the schedule may run 0, 1 or--- more times during a single update (which typically corresponds to a rendered--- frame).--- --- `Time` and the generic [`Time`] resource will report a--- [`delta()`](Time::delta) equal to [`timestep()`](Time::timestep) and always--- grow [`elapsed()`](Time::elapsed) by one [`timestep()`](Time::timestep) per--- iteration.--- --- The fixed timestep clock follows the [`Time`](Virtual) clock, which--- means it is affected by [`pause()`](Time::pause),--- [`set_relative_speed()`](Time::set_relative_speed) and--- [`set_max_delta()`](Time::set_max_delta) from virtual time. If the virtual--- clock is paused, the [`FixedUpdate`](bevy_app::FixedUpdate) schedule will--- not run. It is guaranteed that the [`elapsed()`](Time::elapsed) time in--- `Time` is always between the previous `elapsed()` and the current--- `elapsed()` value in `Time`, so the values are compatible.--- --- Changing the timestep size while the game is running should not normally be--- done, as having a regular interval is the point of this schedule, but it may--- be necessary for effects like "bullet-time" if the normal granularity of the--- fixed timestep is too big for the slowed down time. In this case,--- [`set_timestep()`](Time::set_timestep) and be called to set a new value. The--- new value will be used immediately for the next run of the--- [`FixedUpdate`](bevy_app::FixedUpdate) schedule, meaning that it will affect--- the [`delta()`](Time::delta) value for the very next--- [`FixedUpdate`](bevy_app::FixedUpdate), even if it is still during the same--- frame. Any [`overstep()`](Time::overstep) present in the accumulator will be--- processed according to the new [`timestep()`](Time::timestep) value. +---@field timestep ? Duration +---@field overstep ? Duration +Fixed = {} + +---@package +---@param _self Fixed + +---@return Fixed +function Fixed:clone(_self) end + + +---@class Real +--- Real time clock representing elapsed wall clock time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated with time instants according--- to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).[^disclaimer]--- --- Note:--- Using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration)--- allows for mocking the wall clock for testing purposes.--- Besides this use case, it is not recommended to do this, as it will no longer--- represent "wall clock" time as intended.--- --- The [`delta()`](Time::delta) and [`elapsed()`](Time::elapsed) values of this--- clock should be used for anything which deals specifically with real time--- (wall clock time). It will not be affected by relative game speed--- adjustments, pausing or other adjustments.[^disclaimer]--- --- The clock does not count time from [`startup()`](Time::startup) to--- [`first_update()`](Time::first_update()) into elapsed, but instead will--- start counting time from the first update call. [`delta()`](Time::delta) and--- [`elapsed()`](Time::elapsed) will report zero on the first update as there--- is no previous update instant. This means that a [`delta()`](Time::delta) of--- zero must be handled without errors in application logic, as it may--- theoretically also happen at other times.--- --- [`Instant`]s for [`startup()`](Time::startup),--- [`first_update()`](Time::first_update) and--- [`last_update()`](Time::last_update) are recorded and accessible.--- --- [^disclaimer]: When using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration),--- [`Time#impl-Time`] is only a *mock* of wall clock time.--- +---@field startup ? Instant +---@field first_update ? Option +---@field last_update ? Option +Real = {} + +---@package +---@param _self Real + +---@return Real +function Real:clone(_self) end + + +---@class Stopwatch +--- A Stopwatch is a struct that tracks elapsed time when started.--- --- Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called.--- # Examples--- --- ```--- # use bevy_time::*;--- use std::time::Duration;--- let mut stopwatch = Stopwatch::new();--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- --- stopwatch.tick(Duration::from_secs_f32(1.0)); // tick one second--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.pause();--- stopwatch.tick(Duration::from_secs_f32(1.0)); // paused stopwatches don't tick--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.reset(); // reset the stopwatch--- assert!(stopwatch.is_paused());--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- ``` +---@field elapsed ? Duration +---@field is_paused ? boolean +Stopwatch = {} + +---@package +---@param _self Stopwatch + +---@return [] +function Stopwatch:pause(_self) end + +---@package +---@return Stopwatch +function Stopwatch.new() end + +---@package +---@param _self Stopwatch + +---@return Stopwatch +function Stopwatch:clone(_self) end + +---@package +---@param _self Stopwatch + +---@return number +function Stopwatch:elapsed_secs(_self) end + +---@package +---@param _self Stopwatch + +---@param time Duration + +---@return [] +function Stopwatch:set_elapsed(_self,time) end + +---@package +---@param _self Stopwatch + +---@param other Stopwatch + +---@return boolean +function Stopwatch:eq(_self,other) end + +---@package +---@param _self Stopwatch + +---@return [] +function Stopwatch:reset(_self) end + +---@package +---@param _self Stopwatch + +---@return Duration +function Stopwatch:elapsed(_self) end + +---@package +---@param _self Stopwatch + +---@return [] +function Stopwatch:unpause(_self) end + +---@package +---@param _self Stopwatch + +---@return boolean +function Stopwatch:is_paused(_self) end + +---@package +---@param _self Stopwatch + +---@return number +function Stopwatch:elapsed_secs_f64(_self) end + +---@package +---@param _self Stopwatch + +---@return [] +function Stopwatch:assert_receiver_is_total_eq(_self) end + + +---@class Timer +--- Tracks elapsed time. Enters the finished state once `duration` is reached.--- --- Non repeating timers will stop tracking and stay in the finished state until reset.--- Repeating timers will only be in the finished state on each tick `duration` is reached or--- exceeded, and can still be reset at any given point.--- --- Paused timers will not have elapsed time increased.--- --- Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called. +---@field stopwatch ? Stopwatch +---@field duration ? Duration +---@field mode ? TimerMode +---@field finished ? boolean +---@field times_finished_this_tick ? integer +Timer = {} + +---@package +---@param duration Duration + +---@param mode TimerMode + +---@return Timer +function Timer.new(duration,mode) end + +---@package +---@param _self Timer + +---@param other Timer + +---@return boolean +function Timer:eq(_self,other) end + +---@package +---@param _self Timer + +---@return [] +function Timer:unpause(_self) end + +---@package +---@param _self Timer + +---@return boolean +function Timer:just_finished(_self) end + +---@package +---@param _self Timer + +---@param duration Duration + +---@return [] +function Timer:set_duration(_self,duration) end + +---@package +---@param _self Timer + +---@return boolean +function Timer:paused(_self) end + +---@package +---@param _self Timer + +---@return TimerMode +function Timer:mode(_self) end + +---@package +---@param _self Timer + +---@return Duration +function Timer:duration(_self) end + +---@package +---@param _self Timer + +---@param time Duration + +---@return [] +function Timer:set_elapsed(_self,time) end + +---@package +---@param duration number + +---@param mode TimerMode + +---@return Timer +function Timer.from_seconds(duration,mode) end + +---@package +---@param _self Timer + +---@return [] +function Timer:reset(_self) end + +---@package +---@param _self Timer + +---@return boolean +function Timer:finished(_self) end + +---@package +---@param _self Timer + +---@return Duration +function Timer:remaining(_self) end + +---@package +---@param _self Timer + +---@return number +function Timer:elapsed_secs(_self) end + +---@package +---@param _self Timer + +---@return number +function Timer:remaining_secs(_self) end + +---@package +---@param _self Timer + +---@return [] +function Timer:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self Timer + +---@return number +function Timer:fraction_remaining(_self) end + +---@package +---@param _self Timer + +---@return number +function Timer:fraction(_self) end + +---@package +---@param _self Timer + +---@return number +function Timer:elapsed_secs_f64(_self) end + +---@package +---@param _self Timer + +---@return integer +function Timer:times_finished_this_tick(_self) end + +---@package +---@param _self Timer + +---@return Duration +function Timer:elapsed(_self) end + +---@package +---@param _self Timer + +---@param mode TimerMode + +---@return [] +function Timer:set_mode(_self,mode) end + +---@package +---@param _self Timer + +---@return Timer +function Timer:clone(_self) end + +---@package +---@param _self Timer + +---@return [] +function Timer:pause(_self) end + + +---@class TimerMode +--- Specifies [`Timer`] behavior. +TimerMode = {} + +---@package +---@param _self TimerMode + +---@return TimerMode +function TimerMode:clone(_self) end + +---@package +---@param _self TimerMode + +---@param other TimerMode + +---@return boolean +function TimerMode:eq(_self,other) end + +---@package +---@param _self TimerMode + +---@return [] +function TimerMode:assert_receiver_is_total_eq(_self) end + + +---@class Virtual +--- The virtual game clock representing game time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- Normally used as `Time`. It is automatically inserted as a resource--- by [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Real). The virtual clock is automatically set as the default--- generic [`Time`] resource for the update.--- --- The virtual clock differs from real time clock in that it can be paused, sped up--- and slowed down. It also limits how much it can advance in a single update--- in order to prevent unexpected behavior in cases where updates do not happen--- at regular intervals (e.g. coming back after the program was suspended a long time).--- --- The virtual clock can be paused by calling [`pause()`](Time::pause) and--- unpaused by calling [`unpause()`](Time::unpause). When the game clock is--- paused [`delta()`](Time::delta) will be zero on each update, and--- [`elapsed()`](Time::elapsed) will not grow.--- [`effective_speed()`](Time::effective_speed) will return `0.0`. Calling--- [`pause()`](Time::pause) will not affect value the [`delta()`](Time::delta)--- value for the update currently being processed.--- --- The speed of the virtual clock can be changed by calling--- [`set_relative_speed()`](Time::set_relative_speed). A value of `2.0` means--- that virtual clock should advance twice as fast as real time, meaning that--- [`delta()`](Time::delta) values will be double of what--- [`Time::delta()`](Time::delta) reports and--- [`elapsed()`](Time::elapsed) will go twice as fast as--- [`Time::elapsed()`](Time::elapsed). Calling--- [`set_relative_speed()`](Time::set_relative_speed) will not affect the--- [`delta()`](Time::delta) value for the update currently being processed.--- --- The maximum amount of delta time that can be added by a single update can be--- set by [`set_max_delta()`](Time::set_max_delta). This value serves a dual--- purpose in the virtual clock.--- --- If the game temporarily freezes due to any reason, such as disk access, a--- blocking system call, or operating system level suspend, reporting the full--- elapsed delta time is likely to cause bugs in game logic. Usually if a--- laptop is suspended for an hour, it doesn't make sense to try to simulate--- the game logic for the elapsed hour when resuming. Instead it is better to--- lose the extra time and pretend a shorter duration of time passed. Setting--- [`max_delta()`](Time::max_delta) to a relatively short time means that the--- impact on game logic will be minimal.--- --- If the game lags for some reason, meaning that it will take a longer time to--- compute a frame than the real time that passes during the computation, then--- we would fall behind in processing virtual time. If this situation persists,--- and computing a frame takes longer depending on how much virtual time has--- passed, the game would enter a "death spiral" where computing each frame--- takes longer and longer and the game will appear to freeze. By limiting the--- maximum time that can be added at once, we also limit the amount of virtual--- time the game needs to compute for each frame. This means that the game will--- run slow, and it will run slower than real time, but it will not freeze and--- it will recover as soon as computation becomes fast again.--- --- You should set [`max_delta()`](Time::max_delta) to a value that is--- approximately the minimum FPS your game should have even if heavily lagged--- for a moment. The actual FPS when lagged will be somewhat lower than this,--- depending on how much more time it takes to compute a frame compared to real--- time. You should also consider how stable your FPS is, as the limit will--- also dictate how big of an FPS drop you can accept without losing time and--- falling behind real time. +---@field max_delta ? Duration +---@field paused ? boolean +---@field relative_speed ? number +---@field effective_speed ? number +Virtual = {} + +---@package +---@param _self Virtual + +---@return Virtual +function Virtual:clone(_self) end + + +---@class GlobalTransform +--- [`GlobalTransform`] is an affine transformation from entity-local coordinates to worldspace coordinates.--- --- You cannot directly mutate [`GlobalTransform`]; instead, you change an entity's transform by manipulating--- its [`Transform`], which indirectly causes Bevy to update its [`GlobalTransform`].--- --- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * For transform hierarchies to work correctly, you must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] transforms an entity relative to its parent's reference frame, or relative to world space coordinates,--- if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is managed by Bevy; it is computed by successively applying the [`Transform`] of each ancestor--- entity which has a Transform. This is done automatically by Bevy-internal systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity in this schedule or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs +---@field [1] ? Affine3A +GlobalTransform = {} + +---@package +---@param scale Vec3 + +---@return GlobalTransform +function GlobalTransform.from_scale(scale) end + +---@package +---@param x number + +---@param y number + +---@param z number + +---@return GlobalTransform +function GlobalTransform.from_xyz(x,y,z) end + +---@package +---@param _self GlobalTransform + +---@return Dir3 +function GlobalTransform:left(_self) end + +---@package +---@param _self GlobalTransform + +---@param value Vec3 + +---@return Vec3 +function GlobalTransform:mul(_self,value) end + +---@package +---@param _self GlobalTransform + +---@return Dir3 +function GlobalTransform:up(_self) end + +---@package +---@param _self GlobalTransform + +---@return Vec3A +function GlobalTransform:translation_vec3a(_self) end + +---@package +---@param _self GlobalTransform + +---@param point Vec3 + +---@return Vec3 +function GlobalTransform:transform_point(_self,point) end + +---@package +---@param rotation Quat + +---@return GlobalTransform +function GlobalTransform.from_rotation(rotation) end + +---@package +---@param _self GlobalTransform + +---@return Quat +function GlobalTransform:rotation(_self) end + +---@package +---@param _self GlobalTransform + +---@return Dir3 +function GlobalTransform:forward(_self) end + +---@package +---@param _self GlobalTransform + +---@return Vec3 +function GlobalTransform:scale(_self) end + +---@package +---@param _self GlobalTransform + +---@return Dir3 +function GlobalTransform:down(_self) end + +---@package +---@param iso Isometry3d + +---@return GlobalTransform +function GlobalTransform.from_isometry(iso) end + +---@package +---@param _self GlobalTransform + +---@return GlobalTransform +function GlobalTransform:clone(_self) end + +---@package +---@param _self GlobalTransform + +---@return Transform +function GlobalTransform:compute_transform(_self) end + +---@package +---@param _self GlobalTransform + +---@return Affine3A +function GlobalTransform:affine(_self) end + +---@package +---@param _self GlobalTransform + +---@param parent GlobalTransform + +---@return Transform +function GlobalTransform:reparented_to(_self,parent) end + +---@package +---@param _self GlobalTransform + +---@return Vec3 +function GlobalTransform:translation(_self) end + +---@package +---@param _self GlobalTransform + +---@return Mat4 +function GlobalTransform:compute_matrix(_self) end + +---@package +---@param _self GlobalTransform + +---@param extents Vec3A + +---@return number +function GlobalTransform:radius_vec3a(_self,extents) end + +---@package +---@param _self GlobalTransform + +---@param transform Transform + +---@return GlobalTransform +function GlobalTransform:mul_transform(_self,transform) end + +---@package +---@param _self GlobalTransform + +---@return Dir3 +function GlobalTransform:back(_self) end + +---@package +---@param _self GlobalTransform + +---@return Dir3 +function GlobalTransform:right(_self) end + +---@package +---@param translation Vec3 + +---@return GlobalTransform +function GlobalTransform.from_translation(translation) end + +---@package +---@param _self GlobalTransform + +---@return Isometry3d +function GlobalTransform:to_isometry(_self) end + +---@package +---@param _self GlobalTransform + +---@param other GlobalTransform + +---@return boolean +function GlobalTransform:eq(_self,other) end + + +---@class Transform +--- Describe the position of an entity. If the entity has a parent, the position is relative--- to its parent position.--- --- * To place or move an entity, you should set its [`Transform`].--- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * To be displayed, an entity must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] is the position of an entity relative to its parent position, or the reference--- frame if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is the position of an entity relative to the reference frame.--- --- [`GlobalTransform`] is updated from [`Transform`] by systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity during this set or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs +---@field translation ? Vec3 +---@field rotation ? Quat +---@field scale ? Vec3 +Transform = {} + +---@package +---@param _self Transform + +---@return boolean +function Transform:is_finite(_self) end + +---@package +---@param _self Transform + +---@param point Vec3 + +---@param rotation Quat + +---@return [] +function Transform:rotate_around(_self,point,rotation) end + +---@package +---@param translation Vec3 + +---@return Transform +function Transform.from_translation(translation) end + +---@package +---@param _self Transform + +---@return Dir3 +function Transform:right(_self) end + +---@package +---@param _self Transform + +---@param value Vec3 + +---@return Vec3 +function Transform:mul(_self,value) end + +---@package +---@param _self Transform + +---@return Dir3 +function Transform:left(_self) end + +---@package +---@param _self Transform + +---@param angle number + +---@return [] +function Transform:rotate_local_z(_self,angle) end + +---@package +---@param _self Transform + +---@return Dir3 +function Transform:local_y(_self) end + +---@package +---@param _self Transform + +---@param point Vec3 + +---@param rotation Quat + +---@return [] +function Transform:translate_around(_self,point,rotation) end + +---@package +---@param _self Transform + +---@return Affine3A +function Transform:compute_affine(_self) end + +---@package +---@param _self Transform + +---@param translation Vec3 + +---@return Transform +function Transform:with_translation(_self,translation) end + +---@package +---@param _self Transform + +---@param angle number + +---@return [] +function Transform:rotate_z(_self,angle) end + +---@package +---@param _self Transform + +---@param rotation Quat + +---@return [] +function Transform:rotate(_self,rotation) end + +---@package +---@param _self Transform + +---@return Dir3 +function Transform:forward(_self) end + +---@package +---@param _self Transform + +---@param angle number + +---@return [] +function Transform:rotate_x(_self,angle) end + +---@package +---@param _self Transform + +---@param rotation Quat + +---@return Transform +function Transform:with_rotation(_self,rotation) end + +---@package +---@param _self Transform + +---@return Dir3 +function Transform:up(_self) end + +---@package +---@param _self Transform + +---@return Dir3 +function Transform:local_x(_self) end + +---@package +---@param _self Transform + +---@param point Vec3 + +---@return Vec3 +function Transform:transform_point(_self,point) end + +---@package +---@param _self Transform + +---@param angle number + +---@return [] +function Transform:rotate_y(_self,angle) end + +---@package +---@param _self Transform + +---@param transform Transform + +---@return Transform +function Transform:mul_transform(_self,transform) end + +---@package +---@param _self Transform + +---@return Dir3 +function Transform:down(_self) end + +---@package +---@param _self Transform + +---@param other Transform + +---@return boolean +function Transform:eq(_self,other) end + +---@package +---@param x number + +---@param y number + +---@param z number + +---@return Transform +function Transform.from_xyz(x,y,z) end + +---@package +---@param rotation Quat + +---@return Transform +function Transform.from_rotation(rotation) end + +---@package +---@param _self Transform + +---@param axis Dir3 + +---@param angle number + +---@return [] +function Transform:rotate_axis(_self,axis,angle) end + +---@package +---@param _self Transform + +---@param scale Vec3 + +---@return Transform +function Transform:with_scale(_self,scale) end + +---@package +---@param _self Transform + +---@return Transform +function Transform:clone(_self) end + +---@package +---@param iso Isometry3d + +---@return Transform +function Transform.from_isometry(iso) end + +---@package +---@param _self Transform + +---@return Dir3 +function Transform:back(_self) end + +---@package +---@param _self Transform + +---@return Mat4 +function Transform:compute_matrix(_self) end + +---@package +---@param _self Transform + +---@param angle number + +---@return [] +function Transform:rotate_local_y(_self,angle) end + +---@package +---@param _self Transform + +---@return Dir3 +function Transform:local_z(_self) end + +---@package +---@param world_from_local Mat4 + +---@return Transform +function Transform.from_matrix(world_from_local) end + +---@package +---@param scale Vec3 + +---@return Transform +function Transform.from_scale(scale) end + +---@package +---@param _self Transform + +---@param angle number + +---@return [] +function Transform:rotate_local_x(_self,angle) end + +---@package +---@param _self Transform + +---@param axis Dir3 + +---@param angle number + +---@return [] +function Transform:rotate_local_axis(_self,axis,angle) end + +---@package +---@param _self Transform + +---@param rotation Quat + +---@return [] +function Transform:rotate_local(_self,rotation) end + +---@package +---@param _self Transform + +---@return Isometry3d +function Transform:to_isometry(_self) end + + +---@class TransformTreeChanged +--- An optimization for transform propagation. This ZST marker component uses change detection to--- mark all entities of the hierarchy as "dirty" if any of their descendants have a changed--- `Transform`. If this component is *not* marked `is_changed()`, propagation will halt. +TransformTreeChanged = {} + +---@package +---@param _self TransformTreeChanged + +---@return TransformTreeChanged +function TransformTreeChanged:clone(_self) end + +---@package +---@param _self TransformTreeChanged + +---@param other TransformTreeChanged + +---@return boolean +function TransformTreeChanged:eq(_self,other) end + + +---@class TypeId + +TypeId = {} + +---@package +---@param _self TypeId + +---@param other TypeId + +---@return boolean +function TypeId:eq(_self,other) end + +---@package +---@param _self TypeId + +---@return [] +function TypeId:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self TypeId + +---@return TypeId +function TypeId:clone(_self) end + + +---@class SocketAddr + +SocketAddr = {} + +---@package +---@param _self SocketAddr + +---@param new_port integer + +---@return [] +function SocketAddr:set_port(_self,new_port) end + +---@package +---@param _self SocketAddr + +---@return boolean +function SocketAddr:is_ipv4(_self) end + +---@package +---@param _self SocketAddr + +---@param other SocketAddr + +---@return boolean +function SocketAddr:eq(_self,other) end + +---@package +---@param _self SocketAddr + +---@return [] +function SocketAddr:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self SocketAddr + +---@return SocketAddr +function SocketAddr:clone(_self) end + +---@package +---@param _self SocketAddr + +---@return integer +function SocketAddr:port(_self) end + +---@package +---@param _self SocketAddr + +---@return boolean +function SocketAddr:is_ipv6(_self) end + + +---@class RangeFull + +RangeFull = {} + +---@package +---@param _self RangeFull + +---@param other RangeFull + +---@return boolean +function RangeFull:eq(_self,other) end + +---@package +---@param _self RangeFull + +---@return RangeFull +function RangeFull:clone(_self) end + +---@package +---@param _self RangeFull + +---@return [] +function RangeFull:assert_receiver_is_total_eq(_self) end + + +---@class AtomicBool + +AtomicBool = {} + +---@package +---@param _self AtomicBool + +---@return boolean +function AtomicBool:into_inner(_self) end + +---@package +---@param v boolean + +---@return AtomicBool +function AtomicBool.new(v) end + + +---@class AtomicI16 + +AtomicI16 = {} + +---@package +---@param v integer + +---@return AtomicI16 +function AtomicI16.new(v) end + +---@package +---@param _self AtomicI16 + +---@return integer +function AtomicI16:into_inner(_self) end + + +---@class AtomicI32 + +AtomicI32 = {} + +---@package +---@param _self AtomicI32 + +---@return integer +function AtomicI32:into_inner(_self) end + +---@package +---@param v integer + +---@return AtomicI32 +function AtomicI32.new(v) end + + +---@class AtomicI64 + +AtomicI64 = {} + +---@package +---@param _self AtomicI64 + +---@return integer +function AtomicI64:into_inner(_self) end + +---@package +---@param v integer + +---@return AtomicI64 +function AtomicI64.new(v) end + + +---@class AtomicI8 + +AtomicI8 = {} + +---@package +---@param v integer + +---@return AtomicI8 +function AtomicI8.new(v) end + +---@package +---@param _self AtomicI8 + +---@return integer +function AtomicI8:into_inner(_self) end + + +---@class AtomicIsize + +AtomicIsize = {} + +---@package +---@param v integer + +---@return AtomicIsize +function AtomicIsize.new(v) end + +---@package +---@param _self AtomicIsize + +---@return integer +function AtomicIsize:into_inner(_self) end + + +---@class AtomicU16 + +AtomicU16 = {} + +---@package +---@param _self AtomicU16 + +---@return integer +function AtomicU16:into_inner(_self) end + +---@package +---@param v integer + +---@return AtomicU16 +function AtomicU16.new(v) end + + +---@class AtomicU32 + +AtomicU32 = {} + +---@package +---@param _self AtomicU32 + +---@return integer +function AtomicU32:into_inner(_self) end + +---@package +---@param v integer + +---@return AtomicU32 +function AtomicU32.new(v) end + + +---@class AtomicU64 + +AtomicU64 = {} + +---@package +---@param _self AtomicU64 + +---@return integer +function AtomicU64:into_inner(_self) end + +---@package +---@param v integer + +---@return AtomicU64 +function AtomicU64.new(v) end + + +---@class AtomicU8 + +AtomicU8 = {} + +---@package +---@param v integer + +---@return AtomicU8 +function AtomicU8.new(v) end + +---@package +---@param _self AtomicU8 + +---@return integer +function AtomicU8:into_inner(_self) end + + +---@class AtomicUsize + +AtomicUsize = {} + +---@package +---@param v integer + +---@return AtomicUsize +function AtomicUsize.new(v) end + +---@package +---@param _self AtomicUsize + +---@return integer +function AtomicUsize:into_inner(_self) end + + +---@class Duration + +Duration = {} + +---@package +---@param _self Duration + +---@return integer +function Duration:as_secs(_self) end + +---@package +---@param _self Duration + +---@param other Duration + +---@return Duration +function Duration:abs_diff(_self,other) end + +---@package +---@param _self Duration + +---@param rhs Duration + +---@return Duration +function Duration:sub(_self,rhs) end + +---@package +---@param _self Duration + +---@param rhs integer + +---@return Duration +function Duration:saturating_mul(_self,rhs) end + +---@package +---@param _self Duration + +---@param rhs number + +---@return Duration +function Duration:div_f64(_self,rhs) end + +---@package +---@param _self Duration + +---@param rhs Duration + +---@return Duration +function Duration:saturating_sub(_self,rhs) end + +---@package +---@param _self Duration + +---@return integer +function Duration:as_nanos(_self) end + +---@package +---@param _self Duration + +---@return integer +function Duration:subsec_nanos(_self) end + +---@package +---@param secs integer + +---@return Duration +function Duration.from_secs(secs) end + +---@package +---@param _self Duration + +---@return integer +function Duration:as_micros(_self) end + +---@package +---@param _self Duration + +---@return number +function Duration:as_secs_f64(_self) end + +---@package +---@param _self Duration + +---@param rhs integer + +---@return Duration +function Duration:div(_self,rhs) end + +---@package +---@param _self Duration + +---@return integer +function Duration:subsec_micros(_self) end + +---@package +---@param secs number + +---@return Duration +function Duration.from_secs_f32(secs) end + +---@package +---@param _self Duration + +---@param rhs number + +---@return Duration +function Duration:mul_f32(_self,rhs) end + +---@package +---@param _self Duration + +---@param rhs integer + +---@return Duration +function Duration:mul(_self,rhs) end + +---@package +---@param nanos integer + +---@return Duration +function Duration.from_nanos(nanos) end + +---@package +---@param _self Duration + +---@return integer +function Duration:as_millis(_self) end + +---@package +---@param _self Duration + +---@return number +function Duration:as_secs_f32(_self) end + +---@package +---@param _self Duration + +---@param rhs Duration + +---@return number +function Duration:div_duration_f32(_self,rhs) end + +---@package +---@param _self Duration + +---@return [] +function Duration:assert_receiver_is_total_eq(_self) end + +---@package +---@param secs number + +---@return Duration +function Duration.from_secs_f64(secs) end + +---@package +---@param _self Duration + +---@param other Duration + +---@return boolean +function Duration:eq(_self,other) end + +---@package +---@param _self Duration + +---@param rhs number + +---@return Duration +function Duration:mul_f64(_self,rhs) end + +---@package +---@param _self Duration + +---@param rhs number + +---@return Duration +function Duration:div_f32(_self,rhs) end + +---@package +---@param micros integer + +---@return Duration +function Duration.from_micros(micros) end + +---@package +---@param _self Duration + +---@param rhs Duration + +---@return number +function Duration:div_duration_f64(_self,rhs) end + +---@package +---@param _self Duration + +---@return integer +function Duration:subsec_millis(_self) end + +---@package +---@param _self Duration + +---@param rhs Duration + +---@return Duration +function Duration:saturating_add(_self,rhs) end + +---@package +---@param _self Duration + +---@return boolean +function Duration:is_zero(_self) end + +---@package +---@param _self Duration + +---@param rhs Duration + +---@return Duration +function Duration:add(_self,rhs) end + +---@package +---@param secs integer + +---@param nanos integer + +---@return Duration +function Duration.new(secs,nanos) end + +---@package +---@param millis integer + +---@return Duration +function Duration.from_millis(millis) end + +---@package +---@param _self Duration + +---@return Duration +function Duration:clone(_self) end + + +---@class Affine2 + +---@field matrix2 ? Mat2 +---@field translation ? Vec2 +Affine2 = {} + +---@package +---@param matrix2 Mat2 + +---@param translation Vec2 + +---@return Affine2 +function Affine2.from_mat2_translation(matrix2,translation) end + +---@package +---@param scale Vec2 + +---@return Affine2 +function Affine2.from_scale(scale) end + +---@package +---@param matrix2 Mat2 + +---@return Affine2 +function Affine2.from_mat2(matrix2) end + +---@package +---@param _self Affine2 + +---@param rhs Affine2 + +---@return boolean +function Affine2:eq(_self,rhs) end + +---@package +---@param _self Affine2 + +---@return number[][] +function Affine2:to_cols_array_2d(_self) end + +---@package +---@param _self Affine2 + +---@return boolean +function Affine2:is_finite(_self) end + +---@package +---@param translation Vec2 + +---@return Affine2 +function Affine2.from_translation(translation) end + +---@package +---@param _self Affine2 + +---@param rhs Affine2 + +---@return Affine2 +function Affine2:mul(_self,rhs) end + +---@package +---@param _self Affine2 + +---@return Affine2 +function Affine2:clone(_self) end + +---@package +---@param m Mat3 + +---@return Affine2 +function Affine2.from_mat3(m) end + +---@package +---@param _self Affine2 + +---@param rhs Affine2 + +---@param max_abs_diff number + +---@return boolean +function Affine2:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param angle number + +---@return Affine2 +function Affine2.from_angle(angle) end + +---@package +---@param _self Affine2 + +---@return Affine2 +function Affine2:inverse(_self) end + +---@package +---@param x_axis Vec2 + +---@param y_axis Vec2 + +---@param z_axis Vec2 + +---@return Affine2 +function Affine2.from_cols(x_axis,y_axis,z_axis) end + +---@package +---@param m Mat3A + +---@return Affine2 +function Affine2.from_mat3a(m) end + +---@package +---@param _self Affine2 + +---@param rhs Vec2 + +---@return Vec2 +function Affine2:transform_point2(_self,rhs) end + +---@package +---@param _self Affine2 + +---@return boolean +function Affine2:is_nan(_self) end + +---@package +---@param _self Affine2 + +---@return number[] +function Affine2:to_cols_array(_self) end + +---@package +---@param _self Affine2 + +---@param rhs Vec2 + +---@return Vec2 +function Affine2:transform_vector2(_self,rhs) end + +---@package +---@param scale Vec2 + +---@param angle number + +---@param translation Vec2 + +---@return Affine2 +function Affine2.from_scale_angle_translation(scale,angle,translation) end + +---@package +---@param angle number + +---@param translation Vec2 + +---@return Affine2 +function Affine2.from_angle_translation(angle,translation) end + + +---@class Affine3A + +---@field matrix3 ? Mat3A +---@field translation ? Vec3A +Affine3A = {} + +---@package +---@param axis Vec3 + +---@param angle number + +---@return Affine3A +function Affine3A.from_axis_angle(axis,angle) end + +---@package +---@param angle number + +---@return Affine3A +function Affine3A.from_rotation_x(angle) end + +---@package +---@param eye Vec3 + +---@param dir Vec3 + +---@param up Vec3 + +---@return Affine3A +function Affine3A.look_to_lh(eye,dir,up) end + +---@package +---@param _self Affine3A + +---@param rhs Vec3 + +---@return Vec3 +function Affine3A:transform_point3(_self,rhs) end + +---@package +---@param _self Affine3A + +---@return number[][] +function Affine3A:to_cols_array_2d(_self) end + +---@package +---@param mat3 Mat3 + +---@return Affine3A +function Affine3A.from_mat3(mat3) end + +---@package +---@param scale Vec3 + +---@return Affine3A +function Affine3A.from_scale(scale) end + +---@package +---@param scale Vec3 + +---@param rotation Quat + +---@param translation Vec3 + +---@return Affine3A +function Affine3A.from_scale_rotation_translation(scale,rotation,translation) end + +---@package +---@param _self Affine3A + +---@param rhs Affine3A + +---@return boolean +function Affine3A:eq(_self,rhs) end + +---@package +---@param eye Vec3 + +---@param center Vec3 + +---@param up Vec3 + +---@return Affine3A +function Affine3A.look_at_rh(eye,center,up) end + +---@package +---@param angle number + +---@return Affine3A +function Affine3A.from_rotation_z(angle) end + +---@package +---@param rotation Quat + +---@param translation Vec3 + +---@return Affine3A +function Affine3A.from_rotation_translation(rotation,translation) end + +---@package +---@param eye Vec3 + +---@param center Vec3 + +---@param up Vec3 + +---@return Affine3A +function Affine3A.look_at_lh(eye,center,up) end + +---@package +---@param _self Affine3A + +---@return Affine3A +function Affine3A:inverse(_self) end + +---@package +---@param _self Affine3A + +---@param rhs Affine3A + +---@param max_abs_diff number + +---@return boolean +function Affine3A:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param mat3 Mat3 + +---@param translation Vec3 + +---@return Affine3A +function Affine3A.from_mat3_translation(mat3,translation) end + +---@package +---@param _self Affine3A + +---@param rhs Affine3A + +---@return Affine3A +function Affine3A:mul(_self,rhs) end + +---@package +---@param translation Vec3 + +---@return Affine3A +function Affine3A.from_translation(translation) end + +---@package +---@param _self Affine3A + +---@param rhs Vec3A + +---@return Vec3A +function Affine3A:transform_point3a(_self,rhs) end + +---@package +---@param rotation Quat + +---@return Affine3A +function Affine3A.from_quat(rotation) end + +---@package +---@param _self Affine3A + +---@param rhs Vec3 + +---@return Vec3 +function Affine3A:transform_vector3(_self,rhs) end + +---@package +---@param x_axis Vec3A + +---@param y_axis Vec3A + +---@param z_axis Vec3A + +---@param w_axis Vec3A + +---@return Affine3A +function Affine3A.from_cols(x_axis,y_axis,z_axis,w_axis) end + +---@package +---@param _self Affine3A + +---@return boolean +function Affine3A:is_nan(_self) end + +---@package +---@param _self Affine3A + +---@return number[] +function Affine3A:to_cols_array(_self) end + +---@package +---@param angle number + +---@return Affine3A +function Affine3A.from_rotation_y(angle) end + +---@package +---@param _self Affine3A + +---@return Affine3A +function Affine3A:clone(_self) end + +---@package +---@param _self Affine3A + +---@return boolean +function Affine3A:is_finite(_self) end + +---@package +---@param eye Vec3 + +---@param dir Vec3 + +---@param up Vec3 + +---@return Affine3A +function Affine3A.look_to_rh(eye,dir,up) end + +---@package +---@param m Mat4 + +---@return Affine3A +function Affine3A.from_mat4(m) end + +---@package +---@param _self Affine3A + +---@param rhs Vec3A + +---@return Vec3A +function Affine3A:transform_vector3a(_self,rhs) end + + +---@class BVec2 + +---@field x ? boolean +---@field y ? boolean +BVec2 = {} + +---@package +---@param _self BVec2 + +---@param index integer + +---@param value boolean + +---@return [] +function BVec2:set(_self,index,value) end + +---@package +---@param _self BVec2 + +---@return BVec2 +function BVec2:clone(_self) end + +---@package +---@param v boolean + +---@return BVec2 +function BVec2.splat(v) end + +---@package +---@param x boolean + +---@param y boolean + +---@return BVec2 +function BVec2.new(x,y) end + +---@package +---@param _self BVec2 + +---@param index integer + +---@return boolean +function BVec2:test(_self,index) end + +---@package +---@param _self BVec2 + +---@param other BVec2 + +---@return boolean +function BVec2:eq(_self,other) end + +---@package +---@param _self BVec2 + +---@return integer +function BVec2:bitmask(_self) end + +---@package +---@param _self BVec2 + +---@return [] +function BVec2:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self BVec2 + +---@return boolean +function BVec2:all(_self) end + +---@package +---@param _self BVec2 + +---@return boolean +function BVec2:any(_self) end + +---@package +---@param a boolean[] + +---@return BVec2 +function BVec2.from_array(a) end + + +---@class BVec3 + +---@field x ? boolean +---@field y ? boolean +---@field z ? boolean +BVec3 = {} + +---@package +---@param v boolean + +---@return BVec3 +function BVec3.splat(v) end + +---@package +---@param _self BVec3 + +---@return boolean +function BVec3:any(_self) end + +---@package +---@param a boolean[] + +---@return BVec3 +function BVec3.from_array(a) end + +---@package +---@param _self BVec3 + +---@param index integer + +---@param value boolean + +---@return [] +function BVec3:set(_self,index,value) end + +---@package +---@param _self BVec3 + +---@param index integer + +---@return boolean +function BVec3:test(_self,index) end + +---@package +---@param _self BVec3 + +---@param other BVec3 + +---@return boolean +function BVec3:eq(_self,other) end + +---@package +---@param _self BVec3 + +---@return BVec3 +function BVec3:clone(_self) end + +---@package +---@param _self BVec3 + +---@return [] +function BVec3:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self BVec3 + +---@return boolean +function BVec3:all(_self) end + +---@package +---@param _self BVec3 + +---@return integer +function BVec3:bitmask(_self) end + +---@package +---@param x boolean + +---@param y boolean + +---@param z boolean + +---@return BVec3 +function BVec3.new(x,y,z) end + + +---@class BVec3A + +BVec3A = {} + +---@package +---@param x boolean + +---@param y boolean + +---@param z boolean + +---@return BVec3A +function BVec3A.new(x,y,z) end + +---@package +---@param _self BVec3A + +---@return integer +function BVec3A:bitmask(_self) end + +---@package +---@param _self BVec3A + +---@return BVec3A +function BVec3A:clone(_self) end + +---@package +---@param _self BVec3A + +---@return boolean +function BVec3A:any(_self) end + +---@package +---@param _self BVec3A + +---@param index integer + +---@param value boolean + +---@return [] +function BVec3A:set(_self,index,value) end + +---@package +---@param a boolean[] + +---@return BVec3A +function BVec3A.from_array(a) end + +---@package +---@param _self BVec3A + +---@param rhs BVec3A + +---@return boolean +function BVec3A:eq(_self,rhs) end + +---@package +---@param _self BVec3A + +---@param index integer + +---@return boolean +function BVec3A:test(_self,index) end + +---@package +---@param v boolean + +---@return BVec3A +function BVec3A.splat(v) end + +---@package +---@param _self BVec3A + +---@return boolean +function BVec3A:all(_self) end + + +---@class BVec4 + +---@field x ? boolean +---@field y ? boolean +---@field z ? boolean +---@field w ? boolean +BVec4 = {} + +---@package +---@param x boolean + +---@param y boolean + +---@param z boolean + +---@param w boolean + +---@return BVec4 +function BVec4.new(x,y,z,w) end + +---@package +---@param _self BVec4 + +---@param index integer + +---@param value boolean + +---@return [] +function BVec4:set(_self,index,value) end + +---@package +---@param _self BVec4 + +---@return BVec4 +function BVec4:clone(_self) end + +---@package +---@param _self BVec4 + +---@return [] +function BVec4:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self BVec4 + +---@param other BVec4 + +---@return boolean +function BVec4:eq(_self,other) end + +---@package +---@param _self BVec4 + +---@return integer +function BVec4:bitmask(_self) end + +---@package +---@param _self BVec4 + +---@return boolean +function BVec4:all(_self) end + +---@package +---@param a boolean[] + +---@return BVec4 +function BVec4.from_array(a) end + +---@package +---@param _self BVec4 + +---@return boolean +function BVec4:any(_self) end + +---@package +---@param v boolean + +---@return BVec4 +function BVec4.splat(v) end + +---@package +---@param _self BVec4 + +---@param index integer + +---@return boolean +function BVec4:test(_self,index) end + + +---@class BVec4A + +BVec4A = {} + +---@package +---@param _self BVec4A + +---@param index integer + +---@return boolean +function BVec4A:test(_self,index) end + +---@package +---@param _self BVec4A + +---@return BVec4A +function BVec4A:clone(_self) end + +---@package +---@param _self BVec4A + +---@return boolean +function BVec4A:any(_self) end + +---@package +---@param _self BVec4A + +---@param index integer + +---@param value boolean + +---@return [] +function BVec4A:set(_self,index,value) end + +---@package +---@param a boolean[] + +---@return BVec4A +function BVec4A.from_array(a) end + +---@package +---@param _self BVec4A + +---@return boolean +function BVec4A:all(_self) end + +---@package +---@param _self BVec4A + +---@param rhs BVec4A + +---@return boolean +function BVec4A:eq(_self,rhs) end + +---@package +---@param _self BVec4A + +---@return integer +function BVec4A:bitmask(_self) end + +---@package +---@param x boolean + +---@param y boolean + +---@param z boolean + +---@param w boolean + +---@return BVec4A +function BVec4A.new(x,y,z,w) end + +---@package +---@param v boolean + +---@return BVec4A +function BVec4A.splat(v) end + + +---@class DAffine2 + +---@field matrix2 ? DMat2 +---@field translation ? DVec2 +DAffine2 = {} + +---@package +---@param angle number + +---@param translation DVec2 + +---@return DAffine2 +function DAffine2.from_angle_translation(angle,translation) end + +---@package +---@param _self DAffine2 + +---@param rhs DVec2 + +---@return DVec2 +function DAffine2:transform_point2(_self,rhs) end + +---@package +---@param scale DVec2 + +---@param angle number + +---@param translation DVec2 + +---@return DAffine2 +function DAffine2.from_scale_angle_translation(scale,angle,translation) end + +---@package +---@param x_axis DVec2 + +---@param y_axis DVec2 + +---@param z_axis DVec2 + +---@return DAffine2 +function DAffine2.from_cols(x_axis,y_axis,z_axis) end + +---@package +---@param translation DVec2 + +---@return DAffine2 +function DAffine2.from_translation(translation) end + +---@package +---@param m DMat3 + +---@return DAffine2 +function DAffine2.from_mat3(m) end + +---@package +---@param _self DAffine2 + +---@param rhs DAffine2 + +---@return boolean +function DAffine2:eq(_self,rhs) end + +---@package +---@param matrix2 DMat2 + +---@return DAffine2 +function DAffine2.from_mat2(matrix2) end + +---@package +---@param _self DAffine2 + +---@return boolean +function DAffine2:is_finite(_self) end + +---@package +---@param matrix2 DMat2 + +---@param translation DVec2 + +---@return DAffine2 +function DAffine2.from_mat2_translation(matrix2,translation) end + +---@package +---@param _self DAffine2 + +---@return number[][] +function DAffine2:to_cols_array_2d(_self) end + +---@package +---@param _self DAffine2 + +---@return number[] +function DAffine2:to_cols_array(_self) end + +---@package +---@param _self DAffine2 + +---@param rhs DAffine2 + +---@return DAffine2 +function DAffine2:mul(_self,rhs) end + +---@package +---@param _self DAffine2 + +---@param rhs DAffine2 + +---@param max_abs_diff number + +---@return boolean +function DAffine2:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param angle number + +---@return DAffine2 +function DAffine2.from_angle(angle) end + +---@package +---@param _self DAffine2 + +---@param rhs DVec2 + +---@return DVec2 +function DAffine2:transform_vector2(_self,rhs) end + +---@package +---@param scale DVec2 + +---@return DAffine2 +function DAffine2.from_scale(scale) end + +---@package +---@param _self DAffine2 + +---@return DAffine2 +function DAffine2:inverse(_self) end + +---@package +---@param _self DAffine2 + +---@return DAffine2 +function DAffine2:clone(_self) end + +---@package +---@param _self DAffine2 + +---@return boolean +function DAffine2:is_nan(_self) end + + +---@class DAffine3 + +---@field matrix3 ? DMat3 +---@field translation ? DVec3 +DAffine3 = {} + +---@package +---@param eye DVec3 + +---@param dir DVec3 + +---@param up DVec3 + +---@return DAffine3 +function DAffine3.look_to_lh(eye,dir,up) end + +---@package +---@param mat3 DMat3 + +---@return DAffine3 +function DAffine3.from_mat3(mat3) end + +---@package +---@param axis DVec3 + +---@param angle number + +---@return DAffine3 +function DAffine3.from_axis_angle(axis,angle) end + +---@package +---@param angle number + +---@return DAffine3 +function DAffine3.from_rotation_y(angle) end + +---@package +---@param angle number + +---@return DAffine3 +function DAffine3.from_rotation_x(angle) end + +---@package +---@param eye DVec3 + +---@param center DVec3 + +---@param up DVec3 + +---@return DAffine3 +function DAffine3.look_at_lh(eye,center,up) end + +---@package +---@param _self DAffine3 + +---@param rhs DVec3 + +---@return DVec3 +function DAffine3:transform_point3(_self,rhs) end + +---@package +---@param angle number + +---@return DAffine3 +function DAffine3.from_rotation_z(angle) end + +---@package +---@param rotation DQuat + +---@param translation DVec3 + +---@return DAffine3 +function DAffine3.from_rotation_translation(rotation,translation) end + +---@package +---@param rotation DQuat + +---@return DAffine3 +function DAffine3.from_quat(rotation) end + +---@package +---@param scale DVec3 + +---@param rotation DQuat + +---@param translation DVec3 + +---@return DAffine3 +function DAffine3.from_scale_rotation_translation(scale,rotation,translation) end + +---@package +---@param _self DAffine3 + +---@param rhs DAffine3 + +---@return DAffine3 +function DAffine3:mul(_self,rhs) end + +---@package +---@param _self DAffine3 + +---@return DAffine3 +function DAffine3:clone(_self) end + +---@package +---@param x_axis DVec3 + +---@param y_axis DVec3 + +---@param z_axis DVec3 + +---@param w_axis DVec3 + +---@return DAffine3 +function DAffine3.from_cols(x_axis,y_axis,z_axis,w_axis) end + +---@package +---@param _self DAffine3 + +---@return boolean +function DAffine3:is_nan(_self) end + +---@package +---@param _self DAffine3 + +---@param rhs DVec3 + +---@return DVec3 +function DAffine3:transform_vector3(_self,rhs) end + +---@package +---@param _self DAffine3 + +---@return DAffine3 +function DAffine3:inverse(_self) end + +---@package +---@param m DMat4 + +---@return DAffine3 +function DAffine3.from_mat4(m) end + +---@package +---@param eye DVec3 + +---@param center DVec3 + +---@param up DVec3 + +---@return DAffine3 +function DAffine3.look_at_rh(eye,center,up) end + +---@package +---@param translation DVec3 + +---@return DAffine3 +function DAffine3.from_translation(translation) end + +---@package +---@param mat3 DMat3 + +---@param translation DVec3 + +---@return DAffine3 +function DAffine3.from_mat3_translation(mat3,translation) end + +---@package +---@param scale DVec3 + +---@return DAffine3 +function DAffine3.from_scale(scale) end + +---@package +---@param _self DAffine3 + +---@param rhs DAffine3 + +---@param max_abs_diff number + +---@return boolean +function DAffine3:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self DAffine3 + +---@return boolean +function DAffine3:is_finite(_self) end + +---@package +---@param _self DAffine3 + +---@return number[][] +function DAffine3:to_cols_array_2d(_self) end + +---@package +---@param _self DAffine3 + +---@param rhs DAffine3 + +---@return boolean +function DAffine3:eq(_self,rhs) end + +---@package +---@param eye DVec3 + +---@param dir DVec3 + +---@param up DVec3 + +---@return DAffine3 +function DAffine3.look_to_rh(eye,dir,up) end + +---@package +---@param _self DAffine3 + +---@return number[] +function DAffine3:to_cols_array(_self) end + + +---@class DMat2 + +---@field x_axis ? DVec2 +---@field y_axis ? DVec2 +DMat2 = {} + +---@package +---@param _self DMat2 + +---@return number[][] +function DMat2:to_cols_array_2d(_self) end + +---@package +---@param _self DMat2 + +---@param rhs DMat2 + +---@return DMat2 +function DMat2:add(_self,rhs) end + +---@package +---@param scale DVec2 + +---@param angle number + +---@return DMat2 +function DMat2.from_scale_angle(scale,angle) end + +---@package +---@param _self DMat2 + +---@param rhs number + +---@return DMat2 +function DMat2:mul_scalar(_self,rhs) end + +---@package +---@param _self DMat2 + +---@return DMat2 +function DMat2:inverse(_self) end + +---@package +---@param x_axis DVec2 + +---@param y_axis DVec2 + +---@return DMat2 +function DMat2.from_cols(x_axis,y_axis) end + +---@package +---@param _self DMat2 + +---@return DMat2 +function DMat2:neg(_self) end + +---@package +---@param _self DMat2 + +---@return DMat2 +function DMat2:transpose(_self) end + +---@package +---@param diagonal DVec2 + +---@return DMat2 +function DMat2.from_diagonal(diagonal) end + +---@package +---@param _self DMat2 + +---@param rhs number + +---@return DMat2 +function DMat2:div_scalar(_self,rhs) end + +---@package +---@param _self DMat2 + +---@return DMat2 +function DMat2:abs(_self) end + +---@package +---@param _self DMat2 + +---@return Mat2 +function DMat2:as_mat2(_self) end + +---@package +---@param _self DMat2 + +---@param rhs DMat2 + +---@param max_abs_diff number + +---@return boolean +function DMat2:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self DMat2 + +---@param rhs DMat2 + +---@return boolean +function DMat2:eq(_self,rhs) end + +---@package +---@param _self DMat2 + +---@param rhs DMat2 + +---@return DMat2 +function DMat2:sub(_self,rhs) end + +---@package +---@param m DMat3 + +---@param i integer + +---@param j integer + +---@return DMat2 +function DMat2.from_mat3_minor(m,i,j) end + +---@package +---@param _self DMat2 + +---@param rhs DVec2 + +---@return DVec2 +function DMat2:mul_vec2(_self,rhs) end + +---@package +---@param angle number + +---@return DMat2 +function DMat2.from_angle(angle) end + +---@package +---@param _self DMat2 + +---@param rhs DMat2 + +---@return DMat2 +function DMat2:mul(_self,rhs) end + +---@package +---@param _self DMat2 + +---@return boolean +function DMat2:is_finite(_self) end + +---@package +---@param m DMat3 + +---@return DMat2 +function DMat2.from_mat3(m) end + +---@package +---@param _self DMat2 + +---@param rhs DMat2 + +---@return DMat2 +function DMat2:sub_mat2(_self,rhs) end + +---@package +---@param _self DMat2 + +---@param rhs DMat2 + +---@return DMat2 +function DMat2:mul_mat2(_self,rhs) end + +---@package +---@param _self DMat2 + +---@param rhs number + +---@return DMat2 +function DMat2:div(_self,rhs) end + +---@package +---@param _self DMat2 + +---@return number +function DMat2:determinant(_self) end + +---@package +---@param _self DMat2 + +---@return number[] +function DMat2:to_cols_array(_self) end + +---@package +---@param _self DMat2 + +---@param index integer + +---@return DVec2 +function DMat2:row(_self,index) end + +---@package +---@param _self DMat2 + +---@return DMat2 +function DMat2:clone(_self) end + +---@package +---@param _self DMat2 + +---@return boolean +function DMat2:is_nan(_self) end + +---@package +---@param _self DMat2 + +---@param index integer + +---@return DVec2 +function DMat2:col(_self,index) end + +---@package +---@param _self DMat2 + +---@param rhs DMat2 + +---@return DMat2 +function DMat2:add_mat2(_self,rhs) end + + +---@class DMat3 + +---@field x_axis ? DVec3 +---@field y_axis ? DVec3 +---@field z_axis ? DVec3 +DMat3 = {} + +---@package +---@param _self DMat3 + +---@param rhs DMat3 + +---@param max_abs_diff number + +---@return boolean +function DMat3:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param axis DVec3 + +---@param angle number + +---@return DMat3 +function DMat3.from_axis_angle(axis,angle) end + +---@package +---@param _self DMat3 + +---@param index integer + +---@return DVec3 +function DMat3:col(_self,index) end + +---@package +---@param _self DMat3 + +---@param rhs DMat3 + +---@return DMat3 +function DMat3:add(_self,rhs) end + +---@package +---@param _self DMat3 + +---@param rhs number + +---@return DMat3 +function DMat3:div(_self,rhs) end + +---@package +---@param angle number + +---@return DMat3 +function DMat3.from_rotation_x(angle) end + +---@package +---@param angle number + +---@return DMat3 +function DMat3.from_angle(angle) end + +---@package +---@param _self DMat3 + +---@param rhs number + +---@return DMat3 +function DMat3:div_scalar(_self,rhs) end + +---@package +---@param rotation DQuat + +---@return DMat3 +function DMat3.from_quat(rotation) end + +---@package +---@param _self DMat3 + +---@param rhs DVec3 + +---@return DVec3 +function DMat3:mul_vec3(_self,rhs) end + +---@package +---@param _self DMat3 + +---@return DMat3 +function DMat3:neg(_self) end + +---@package +---@param m DMat4 + +---@param i integer + +---@param j integer + +---@return DMat3 +function DMat3.from_mat4_minor(m,i,j) end + +---@package +---@param _self DMat3 + +---@param rhs DVec2 + +---@return DVec2 +function DMat3:transform_point2(_self,rhs) end + +---@package +---@param _self DMat3 + +---@return boolean +function DMat3:is_nan(_self) end + +---@package +---@param _self DMat3 + +---@param rhs DAffine2 + +---@return DMat3 +function DMat3:mul(_self,rhs) end + +---@package +---@param _self DMat3 + +---@param rhs DMat3 + +---@return boolean +function DMat3:eq(_self,rhs) end + +---@package +---@param _self DMat3 + +---@return boolean +function DMat3:is_finite(_self) end + +---@package +---@param _self DMat3 + +---@param rhs DMat3 + +---@return DMat3 +function DMat3:sub_mat3(_self,rhs) end + +---@package +---@param angle number + +---@return DMat3 +function DMat3.from_rotation_y(angle) end + +---@package +---@param diagonal DVec3 + +---@return DMat3 +function DMat3.from_diagonal(diagonal) end + +---@package +---@param angle number + +---@return DMat3 +function DMat3.from_rotation_z(angle) end + +---@package +---@param _self DMat3 + +---@param index integer + +---@return DVec3 +function DMat3:row(_self,index) end + +---@package +---@param m DMat2 + +---@return DMat3 +function DMat3.from_mat2(m) end + +---@package +---@param _self DMat3 + +---@param rhs number + +---@return DMat3 +function DMat3:mul_scalar(_self,rhs) end + +---@package +---@param _self DMat3 + +---@param rhs DVec2 + +---@return DVec2 +function DMat3:transform_vector2(_self,rhs) end + +---@package +---@param order EulerRot + +---@param a number + +---@param b number + +---@param c number + +---@return DMat3 +function DMat3.from_euler(order,a,b,c) end + +---@package +---@param _self DMat3 + +---@return DMat3 +function DMat3:clone(_self) end + +---@package +---@param _self DMat3 + +---@param rhs DMat3 + +---@return DMat3 +function DMat3:add_mat3(_self,rhs) end + +---@package +---@param scale DVec2 + +---@return DMat3 +function DMat3.from_scale(scale) end + +---@package +---@param _self DMat3 + +---@return DMat3 +function DMat3:transpose(_self) end + +---@package +---@param scale DVec2 + +---@param angle number + +---@param translation DVec2 + +---@return DMat3 +function DMat3.from_scale_angle_translation(scale,angle,translation) end + +---@package +---@param m DMat4 + +---@return DMat3 +function DMat3.from_mat4(m) end + +---@package +---@param _self DMat3 + +---@return number[] +function DMat3:to_cols_array(_self) end + +---@package +---@param _self DMat3 + +---@param rhs DMat3 + +---@return DMat3 +function DMat3:sub(_self,rhs) end + +---@package +---@param _self DMat3 + +---@return number[][] +function DMat3:to_cols_array_2d(_self) end + +---@package +---@param _self DMat3 + +---@return DMat3 +function DMat3:inverse(_self) end + +---@package +---@param translation DVec2 + +---@return DMat3 +function DMat3.from_translation(translation) end + +---@package +---@param _self DMat3 + +---@return Mat3 +function DMat3:as_mat3(_self) end + +---@package +---@param _self DMat3 + +---@param order EulerRot + +---@return [number, number, number] +function DMat3:to_euler(_self,order) end + +---@package +---@param _self DMat3 + +---@return number +function DMat3:determinant(_self) end + +---@package +---@param _self DMat3 + +---@param rhs DMat3 + +---@return DMat3 +function DMat3:mul_mat3(_self,rhs) end + +---@package +---@param x_axis DVec3 + +---@param y_axis DVec3 + +---@param z_axis DVec3 + +---@return DMat3 +function DMat3.from_cols(x_axis,y_axis,z_axis) end + +---@package +---@param _self DMat3 + +---@return DMat3 +function DMat3:abs(_self) end + + +---@class DMat4 + +---@field x_axis ? DVec4 +---@field y_axis ? DVec4 +---@field z_axis ? DVec4 +---@field w_axis ? DVec4 +DMat4 = {} + +---@package +---@param _self DMat4 + +---@param rhs DAffine3 + +---@return DMat4 +function DMat4:mul(_self,rhs) end + +---@package +---@param angle number + +---@return DMat4 +function DMat4.from_rotation_z(angle) end + +---@package +---@param left number + +---@param right number + +---@param bottom number + +---@param top number + +---@param near number + +---@param far number + +---@return DMat4 +function DMat4.orthographic_rh_gl(left,right,bottom,top,near,far) end + +---@package +---@param _self DMat4 + +---@param rhs DVec4 + +---@return DVec4 +function DMat4:mul_vec4(_self,rhs) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@return DMat4 +function DMat4.perspective_infinite_reverse_rh(fov_y_radians,aspect_ratio,z_near) end + +---@package +---@param _self DMat4 + +---@param rhs number + +---@return DMat4 +function DMat4:div_scalar(_self,rhs) end + +---@package +---@param _self DMat4 + +---@return DMat4 +function DMat4:neg(_self) end + +---@package +---@param _self DMat4 + +---@param rhs DVec3 + +---@return DVec3 +function DMat4:transform_point3(_self,rhs) end + +---@package +---@param angle number + +---@return DMat4 +function DMat4.from_rotation_x(angle) end + +---@package +---@param _self DMat4 + +---@return DMat4 +function DMat4:abs(_self) end + +---@package +---@param scale DVec3 + +---@return DMat4 +function DMat4.from_scale(scale) end + +---@package +---@param _self DMat4 + +---@param rhs DMat4 + +---@param max_abs_diff number + +---@return boolean +function DMat4:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param rotation DQuat + +---@param translation DVec3 + +---@return DMat4 +function DMat4.from_rotation_translation(rotation,translation) end + +---@package +---@param _self DMat4 + +---@param rhs DMat4 + +---@return DMat4 +function DMat4:add(_self,rhs) end + +---@package +---@param eye DVec3 + +---@param dir DVec3 + +---@param up DVec3 + +---@return DMat4 +function DMat4.look_to_lh(eye,dir,up) end + +---@package +---@param order EulerRot + +---@param a number + +---@param b number + +---@param c number + +---@return DMat4 +function DMat4.from_euler(order,a,b,c) end + +---@package +---@param eye DVec3 + +---@param center DVec3 + +---@param up DVec3 + +---@return DMat4 +function DMat4.look_at_rh(eye,center,up) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@return DMat4 +function DMat4.perspective_infinite_rh(fov_y_radians,aspect_ratio,z_near) end + +---@package +---@param angle number + +---@return DMat4 +function DMat4.from_rotation_y(angle) end + +---@package +---@param scale DVec3 + +---@param rotation DQuat + +---@param translation DVec3 + +---@return DMat4 +function DMat4.from_scale_rotation_translation(scale,rotation,translation) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@return DMat4 +function DMat4.perspective_infinite_lh(fov_y_radians,aspect_ratio,z_near) end + +---@package +---@param x_axis DVec4 + +---@param y_axis DVec4 + +---@param z_axis DVec4 + +---@param w_axis DVec4 + +---@return DMat4 +function DMat4.from_cols(x_axis,y_axis,z_axis,w_axis) end + +---@package +---@param eye DVec3 + +---@param center DVec3 + +---@param up DVec3 + +---@return DMat4 +function DMat4.look_at_lh(eye,center,up) end + +---@package +---@param _self DMat4 + +---@param order EulerRot + +---@return [number, number, number] +function DMat4:to_euler(_self,order) end + +---@package +---@param _self DMat4 + +---@param rhs DMat4 + +---@return DMat4 +function DMat4:sub(_self,rhs) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@param z_far number + +---@return DMat4 +function DMat4.perspective_rh(fov_y_radians,aspect_ratio,z_near,z_far) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@param z_far number + +---@return DMat4 +function DMat4.perspective_rh_gl(fov_y_radians,aspect_ratio,z_near,z_far) end + +---@package +---@param _self DMat4 + +---@return Mat4 +function DMat4:as_mat4(_self) end + +---@package +---@param _self DMat4 + +---@param rhs DMat4 + +---@return DMat4 +function DMat4:mul_mat4(_self,rhs) end + +---@package +---@param diagonal DVec4 + +---@return DMat4 +function DMat4.from_diagonal(diagonal) end + +---@package +---@param _self DMat4 + +---@param rhs DMat4 + +---@return DMat4 +function DMat4:sub_mat4(_self,rhs) end + +---@package +---@param left number + +---@param right number + +---@param bottom number + +---@param top number + +---@param near number + +---@param far number + +---@return DMat4 +function DMat4.orthographic_rh(left,right,bottom,top,near,far) end + +---@package +---@param _self DMat4 + +---@param rhs DVec3 + +---@return DVec3 +function DMat4:project_point3(_self,rhs) end + +---@package +---@param left number + +---@param right number + +---@param bottom number + +---@param top number + +---@param near number + +---@param far number + +---@return DMat4 +function DMat4.orthographic_lh(left,right,bottom,top,near,far) end + +---@package +---@param _self DMat4 + +---@return number +function DMat4:determinant(_self) end + +---@package +---@param axis DVec3 + +---@param angle number + +---@return DMat4 +function DMat4.from_axis_angle(axis,angle) end + +---@package +---@param _self DMat4 + +---@param rhs DVec3 + +---@return DVec3 +function DMat4:transform_vector3(_self,rhs) end + +---@package +---@param _self DMat4 + +---@param rhs DMat4 + +---@return DMat4 +function DMat4:add_mat4(_self,rhs) end + +---@package +---@param _self DMat4 + +---@return DMat4 +function DMat4:inverse(_self) end + +---@package +---@param _self DMat4 + +---@return boolean +function DMat4:is_nan(_self) end + +---@package +---@param rotation DQuat + +---@return DMat4 +function DMat4.from_quat(rotation) end + +---@package +---@param eye DVec3 + +---@param dir DVec3 + +---@param up DVec3 + +---@return DMat4 +function DMat4.look_to_rh(eye,dir,up) end + +---@package +---@param _self DMat4 + +---@return boolean +function DMat4:is_finite(_self) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@return DMat4 +function DMat4.perspective_infinite_reverse_lh(fov_y_radians,aspect_ratio,z_near) end + +---@package +---@param _self DMat4 + +---@param index integer + +---@return DVec4 +function DMat4:row(_self,index) end + +---@package +---@param _self DMat4 + +---@return number[][] +function DMat4:to_cols_array_2d(_self) end + +---@package +---@param m DMat3 + +---@return DMat4 +function DMat4.from_mat3(m) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@param z_far number + +---@return DMat4 +function DMat4.perspective_lh(fov_y_radians,aspect_ratio,z_near,z_far) end + +---@package +---@param _self DMat4 + +---@param rhs DMat4 + +---@return boolean +function DMat4:eq(_self,rhs) end + +---@package +---@param _self DMat4 + +---@param rhs number + +---@return DMat4 +function DMat4:div(_self,rhs) end + +---@package +---@param _self DMat4 + +---@return DMat4 +function DMat4:transpose(_self) end + +---@package +---@param _self DMat4 + +---@param rhs number + +---@return DMat4 +function DMat4:mul_scalar(_self,rhs) end + +---@package +---@param _self DMat4 + +---@param index integer + +---@return DVec4 +function DMat4:col(_self,index) end + +---@package +---@param _self DMat4 + +---@return number[] +function DMat4:to_cols_array(_self) end + +---@package +---@param _self DMat4 + +---@return DMat4 +function DMat4:clone(_self) end + +---@package +---@param translation DVec3 + +---@return DMat4 +function DMat4.from_translation(translation) end + + +---@class DQuat + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number +DQuat = {} + +---@package +---@param v DVec4 + +---@return DQuat +function DQuat.from_vec4(v) end + +---@package +---@param from DVec2 + +---@param to DVec2 + +---@return DQuat +function DQuat.from_rotation_arc_2d(from,to) end + +---@package +---@param _self DQuat + +---@return DQuat +function DQuat:normalize(_self) end + +---@package +---@param _self DQuat + +---@param rhs DQuat + +---@return boolean +function DQuat:eq(_self,rhs) end + +---@package +---@param _self DQuat + +---@return DQuat +function DQuat:conjugate(_self) end + +---@package +---@param _self DQuat + +---@param rhs DQuat + +---@return DQuat +function DQuat:mul_quat(_self,rhs) end + +---@package +---@param _self DQuat + +---@return DVec3 +function DQuat:to_scaled_axis(_self) end + +---@package +---@param mat DMat3 + +---@return DQuat +function DQuat.from_mat3(mat) end + +---@package +---@param _self DQuat + +---@param order EulerRot + +---@return [number, number, number] +function DQuat:to_euler(_self,order) end + +---@package +---@param _self DQuat + +---@param rhs DQuat + +---@param max_angle number + +---@return DQuat +function DQuat:rotate_towards(_self,rhs,max_angle) end + +---@package +---@param _self DQuat + +---@param _end DQuat + +---@param s number + +---@return DQuat +function DQuat:lerp(_self,_end,s) end + +---@package +---@param _self DQuat + +---@return DQuat +function DQuat:inverse(_self) end + +---@package +---@param _self DQuat + +---@return boolean +function DQuat:is_nan(_self) end + +---@package +---@param _self DQuat + +---@return number[] +function DQuat:to_array(_self) end + +---@package +---@param _self DQuat + +---@return DQuat +function DQuat:clone(_self) end + +---@package +---@param x number + +---@param y number + +---@param z number + +---@param w number + +---@return DQuat +function DQuat.from_xyzw(x,y,z,w) end + +---@package +---@param angle number + +---@return DQuat +function DQuat.from_rotation_z(angle) end + +---@package +---@param _self DQuat + +---@param rhs DQuat + +---@return number +function DQuat:angle_between(_self,rhs) end + +---@package +---@param _self DQuat + +---@param rhs DQuat + +---@return DQuat +function DQuat:sub(_self,rhs) end + +---@package +---@param _self DQuat + +---@param rhs DQuat + +---@return number +function DQuat:dot(_self,rhs) end + +---@package +---@param angle number + +---@return DQuat +function DQuat.from_rotation_y(angle) end + +---@package +---@param _self DQuat + +---@param rhs DQuat + +---@return DQuat +function DQuat:add(_self,rhs) end + +---@package +---@param _self DQuat + +---@param _end DQuat + +---@param s number + +---@return DQuat +function DQuat:slerp(_self,_end,s) end + +---@package +---@param _self DQuat + +---@param rhs DQuat + +---@param max_abs_diff number + +---@return boolean +function DQuat:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self DQuat + +---@return number +function DQuat:length(_self) end + +---@package +---@param from DVec3 + +---@param to DVec3 + +---@return DQuat +function DQuat.from_rotation_arc(from,to) end + +---@package +---@param mat DMat4 + +---@return DQuat +function DQuat.from_mat4(mat) end + +---@package +---@param _self DQuat + +---@return DVec3 +function DQuat:xyz(_self) end + +---@package +---@param _self DQuat + +---@param rhs number + +---@return DQuat +function DQuat:div(_self,rhs) end + +---@package +---@param v DVec3 + +---@return DQuat +function DQuat.from_scaled_axis(v) end + +---@package +---@param _self DQuat + +---@return boolean +function DQuat:is_near_identity(_self) end + +---@package +---@param _self DQuat + +---@return DQuat +function DQuat:neg(_self) end + +---@package +---@param _self DQuat + +---@return Quat +function DQuat:as_quat(_self) end + +---@package +---@param _self DQuat + +---@return boolean +function DQuat:is_finite(_self) end + +---@package +---@param _self DQuat + +---@param rhs DQuat + +---@return DQuat +function DQuat:mul(_self,rhs) end + +---@package +---@param a number[] + +---@return DQuat +function DQuat.from_array(a) end + +---@package +---@param _self DQuat + +---@return number +function DQuat:length_recip(_self) end + +---@package +---@param axis DVec3 + +---@param angle number + +---@return DQuat +function DQuat.from_axis_angle(axis,angle) end + +---@package +---@param from DVec3 + +---@param to DVec3 + +---@return DQuat +function DQuat.from_rotation_arc_colinear(from,to) end + +---@package +---@param angle number + +---@return DQuat +function DQuat.from_rotation_x(angle) end + +---@package +---@param euler EulerRot + +---@param a number + +---@param b number + +---@param c number + +---@return DQuat +function DQuat.from_euler(euler,a,b,c) end + +---@package +---@param a DAffine3 + +---@return DQuat +function DQuat.from_affine3(a) end + +---@package +---@param _self DQuat + +---@param rhs DVec3 + +---@return DVec3 +function DQuat:mul_vec3(_self,rhs) end + +---@package +---@param _self DQuat + +---@return boolean +function DQuat:is_normalized(_self) end + +---@package +---@param _self DQuat + +---@return number +function DQuat:length_squared(_self) end + + +---@class DVec2 + +---@field x ? number +---@field y ? number +DVec2 = {} + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@param max_angle number + +---@return DVec2 +function DVec2:rotate_towards(_self,rhs,max_angle) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:normalize_or_zero(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return BVec2 +function DVec2:cmplt(_self,rhs) end + +---@package +---@param _self DVec2 + +---@param y number + +---@return DVec2 +function DVec2:with_y(_self,y) end + +---@package +---@param mask BVec2 + +---@param if_true DVec2 + +---@param if_false DVec2 + +---@return DVec2 +function DVec2.select(mask,if_true,if_false) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return BVec2 +function DVec2:cmpeq(_self,rhs) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:rotate(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return integer +function DVec2:is_negative_bitmask(_self) end + +---@package +---@param _self DVec2 + +---@return boolean +function DVec2:is_normalized(_self) end + +---@package +---@param _self DVec2 + +---@return BVec2 +function DVec2:is_nan_mask(_self) end + +---@package +---@param _self DVec2 + +---@return number +function DVec2:element_sum(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return BVec2 +function DVec2:cmpgt(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return number +function DVec2:to_angle(_self) end + +---@package +---@param _self DVec2 + +---@param max number + +---@return DVec2 +function DVec2:clamp_length_max(_self,max) end + +---@package +---@param _self DVec2 + +---@param min DVec2 + +---@param max DVec2 + +---@return DVec2 +function DVec2:clamp(_self,min,max) end + +---@package +---@param _self DVec2 + +---@return number +function DVec2:length_recip(_self) end + +---@package +---@param _self DVec2 + +---@return U16Vec2 +function DVec2:as_u16vec2(_self) end + +---@package +---@param _self DVec2 + +---@param normal DVec2 + +---@return DVec2 +function DVec2:reflect(_self,normal) end + +---@package +---@param _self DVec2 + +---@return UVec2 +function DVec2:as_uvec2(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:midpoint(_self,rhs) end + +---@package +---@param _self DVec2 + +---@param min number + +---@param max number + +---@return DVec2 +function DVec2:clamp_length(_self,min,max) end + +---@package +---@param x number + +---@param y number + +---@return DVec2 +function DVec2.new(x,y) end + +---@package +---@param _self DVec2 + +---@return I16Vec2 +function DVec2:as_i16vec2(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return number +function DVec2:perp_dot(_self,rhs) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return number +function DVec2:distance_squared(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return number[] +function DVec2:to_array(_self) end + +---@package +---@param _self DVec2 + +---@return number +function DVec2:max_element(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:copysign(_self,rhs) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:sub(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return Vec2 +function DVec2:as_vec2(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:add(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:exp(_self) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:floor(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return number +function DVec2:angle_to(_self,rhs) end + +---@package +---@param _self DVec2 + +---@param x number + +---@return DVec2 +function DVec2:with_x(_self,x) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:reject_from_normalized(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:fract_gl(_self) end + +---@package +---@param _self DVec2 + +---@return number +function DVec2:length_squared(_self) end + +---@package +---@param _self DVec2 + +---@param a DVec2 + +---@param b DVec2 + +---@return DVec2 +function DVec2:mul_add(_self,a,b) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return number +function DVec2:dot(_self,rhs) end + +---@package +---@param angle number + +---@return DVec2 +function DVec2.from_angle(angle) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:recip(_self) end + +---@package +---@param _self DVec2 + +---@return U64Vec2 +function DVec2:as_u64vec2(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@param d number + +---@return DVec2 +function DVec2:move_towards(_self,rhs,d) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:abs(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:rem_euclid(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return IVec2 +function DVec2:as_ivec2(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@param max_abs_diff number + +---@return boolean +function DVec2:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:reject_from(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:signum(_self) end + +---@package +---@param _self DVec2 + +---@return number +function DVec2:length(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:max(_self,rhs) end + +---@package +---@param _self DVec2 + +---@param normal DVec2 + +---@param eta number + +---@return DVec2 +function DVec2:refract(_self,normal,eta) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:round(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:project_onto(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return boolean +function DVec2:is_nan(_self) end + +---@package +---@param _self DVec2 + +---@param other DVec2 + +---@return boolean +function DVec2:eq(_self,other) end + +---@package +---@param _self DVec2 + +---@return boolean +function DVec2:is_finite(_self) end + +---@package +---@param _self DVec2 + +---@param fallback DVec2 + +---@return DVec2 +function DVec2:normalize_or(_self,fallback) end + +---@package +---@param _self DVec2 + +---@return I8Vec2 +function DVec2:as_i8vec2(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return number +function DVec2:distance(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return number +function DVec2:min_element(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:mul(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:neg(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return BVec2 +function DVec2:cmpne(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:fract(_self) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:trunc(_self) end + +---@package +---@param _self DVec2 + +---@param n number + +---@return DVec2 +function DVec2:powf(_self,n) end + +---@package +---@param a number[] + +---@return DVec2 +function DVec2.from_array(a) end + +---@package +---@param _self DVec2 + +---@return number +function DVec2:element_product(_self) end + +---@package +---@param _self DVec2 + +---@param min number + +---@return DVec2 +function DVec2:clamp_length_min(_self,min) end + +---@package +---@param _self DVec2 + +---@return U8Vec2 +function DVec2:as_u8vec2(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return number +function DVec2:angle_between(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return I64Vec2 +function DVec2:as_i64vec2(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:div_euclid(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:ceil(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return BVec2 +function DVec2:cmple(_self,rhs) end + +---@package +---@param v number + +---@return DVec2 +function DVec2.splat(v) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@param s number + +---@return DVec2 +function DVec2:lerp(_self,rhs,s) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:rem(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:perp(_self) end + +---@package +---@param _self DVec2 + +---@param z number + +---@return DVec3 +function DVec2:extend(_self,z) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:normalize(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:min(_self,rhs) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:div(_self,rhs) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:project_onto_normalized(_self,rhs) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return BVec2 +function DVec2:cmpge(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return DVec2 +function DVec2:clone(_self) end + +---@package +---@param _self DVec2 + +---@param rhs DVec2 + +---@return DVec2 +function DVec2:dot_into_vec(_self,rhs) end + +---@package +---@param _self DVec2 + +---@return BVec2 +function DVec2:is_finite_mask(_self) end + + +---@class DVec3 + +---@field x ? number +---@field y ? number +---@field z ? number +DVec3 = {} + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return number +function DVec3:distance(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return number +function DVec3:length(_self) end + +---@package +---@param _self DVec3 + +---@return UVec3 +function DVec3:as_uvec3(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@param max_abs_diff number + +---@return boolean +function DVec3:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:add(_self,rhs) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return BVec3 +function DVec3:cmpne(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return number +function DVec3:element_sum(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:copysign(_self,rhs) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:sub(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:clone(_self) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:normalize(_self) end + +---@package +---@param x number + +---@param y number + +---@param z number + +---@return DVec3 +function DVec3.new(x,y,z) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:rem_euclid(_self,rhs) end + +---@package +---@param _self DVec3 + +---@param fallback DVec3 + +---@return DVec3 +function DVec3:normalize_or(_self,fallback) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:midpoint(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:normalize_or_zero(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return BVec3 +function DVec3:cmpeq(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return number +function DVec3:length_recip(_self) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:signum(_self) end + +---@package +---@param _self DVec3 + +---@param x number + +---@return DVec3 +function DVec3:with_x(_self,x) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@param d number + +---@return DVec3 +function DVec3:move_towards(_self,rhs,d) end + +---@package +---@param _self DVec3 + +---@return I16Vec3 +function DVec3:as_i16vec3(_self) end + +---@package +---@param _self DVec3 + +---@return number +function DVec3:length_squared(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:div_euclid(_self,rhs) end + +---@package +---@param _self DVec3 + +---@param w number + +---@return DVec4 +function DVec3:extend(_self,w) end + +---@package +---@param _self DVec3 + +---@return Vec3A +function DVec3:as_vec3a(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return BVec3 +function DVec3:cmpgt(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:floor(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:div(_self,rhs) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@param s number + +---@return DVec3 +function DVec3:lerp(_self,rhs,s) end + +---@package +---@param _self DVec3 + +---@return I8Vec3 +function DVec3:as_i8vec3(_self) end + +---@package +---@param _self DVec3 + +---@return boolean +function DVec3:is_finite(_self) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:ceil(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:dot_into_vec(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return boolean +function DVec3:is_nan(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return BVec3 +function DVec3:cmple(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return number +function DVec3:min_element(_self) end + +---@package +---@param mask BVec3 + +---@param if_true DVec3 + +---@param if_false DVec3 + +---@return DVec3 +function DVec3.select(mask,if_true,if_false) end + +---@package +---@param _self DVec3 + +---@param min number + +---@param max number + +---@return DVec3 +function DVec3:clamp_length(_self,min,max) end + +---@package +---@param _self DVec3 + +---@param n number + +---@return DVec3 +function DVec3:powf(_self,n) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return number +function DVec3:distance_squared(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return number[] +function DVec3:to_array(_self) end + +---@package +---@param _self DVec3 + +---@return U64Vec3 +function DVec3:as_u64vec3(_self) end + +---@package +---@param _self DVec3 + +---@param z number + +---@return DVec3 +function DVec3:with_z(_self,z) end + +---@package +---@param _self DVec3 + +---@return boolean +function DVec3:is_normalized(_self) end + +---@package +---@param _self DVec3 + +---@param y number + +---@return DVec3 +function DVec3:with_y(_self,y) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:exp(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:project_onto_normalized(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:fract_gl(_self) end + +---@package +---@param _self DVec3 + +---@return BVec3 +function DVec3:is_finite_mask(_self) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:fract(_self) end + +---@package +---@param _self DVec3 + +---@param a DVec3 + +---@param b DVec3 + +---@return DVec3 +function DVec3:mul_add(_self,a,b) end + +---@package +---@param _self DVec3 + +---@param normal DVec3 + +---@return DVec3 +function DVec3:reflect(_self,normal) end + +---@package +---@param _self DVec3 + +---@param min number + +---@return DVec3 +function DVec3:clamp_length_min(_self,min) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:cross(_self,rhs) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:max(_self,rhs) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:reject_from_normalized(_self,rhs) end + +---@package +---@param _self DVec3 + +---@param other DVec3 + +---@return boolean +function DVec3:eq(_self,other) end + +---@package +---@param _self DVec3 + +---@return number +function DVec3:element_product(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:min(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:any_orthogonal_vector(_self) end + +---@package +---@param _self DVec3 + +---@param normal DVec3 + +---@param eta number + +---@return DVec3 +function DVec3:refract(_self,normal,eta) end + +---@package +---@param _self DVec3 + +---@return I64Vec3 +function DVec3:as_i64vec3(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:mul(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:recip(_self) end + +---@package +---@param a number[] + +---@return DVec3 +function DVec3.from_array(a) end + +---@package +---@param v number + +---@return DVec3 +function DVec3.splat(v) end + +---@package +---@param _self DVec3 + +---@return IVec3 +function DVec3:as_ivec3(_self) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:round(_self) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:trunc(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:rem(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return BVec3 +function DVec3:is_nan_mask(_self) end + +---@package +---@param _self DVec3 + +---@return U16Vec3 +function DVec3:as_u16vec3(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return number +function DVec3:angle_between(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return Vec3 +function DVec3:as_vec3(_self) end + +---@package +---@param _self DVec3 + +---@param min DVec3 + +---@param max DVec3 + +---@return DVec3 +function DVec3:clamp(_self,min,max) end + +---@package +---@param _self DVec3 + +---@return number +function DVec3:max_element(_self) end + +---@package +---@param _self DVec3 + +---@return DVec2 +function DVec3:truncate(_self) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:neg(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return BVec3 +function DVec3:cmpge(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return integer +function DVec3:is_negative_bitmask(_self) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:any_orthonormal_vector(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:reject_from(_self,rhs) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return BVec3 +function DVec3:cmplt(_self,rhs) end + +---@package +---@param _self DVec3 + +---@param max number + +---@return DVec3 +function DVec3:clamp_length_max(_self,max) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return DVec3 +function DVec3:project_onto(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return U8Vec3 +function DVec3:as_u8vec3(_self) end + +---@package +---@param _self DVec3 + +---@param rhs DVec3 + +---@return number +function DVec3:dot(_self,rhs) end + +---@package +---@param _self DVec3 + +---@return DVec3 +function DVec3:abs(_self) end + + +---@class DVec4 + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number +DVec4 = {} + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:div_euclid(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param normal DVec4 + +---@param eta number + +---@return DVec4 +function DVec4:refract(_self,normal,eta) end + +---@package +---@param _self DVec4 + +---@param n number + +---@return DVec4 +function DVec4:powf(_self,n) end + +---@package +---@param _self DVec4 + +---@return I16Vec4 +function DVec4:as_i16vec4(_self) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:ceil(_self) end + +---@package +---@param _self DVec4 + +---@return number +function DVec4:min_element(_self) end + +---@package +---@param _self DVec4 + +---@param min DVec4 + +---@param max DVec4 + +---@return DVec4 +function DVec4:clamp(_self,min,max) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@param d number + +---@return DVec4 +function DVec4:move_towards(_self,rhs,d) end + +---@package +---@param _self DVec4 + +---@return boolean +function DVec4:is_nan(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:max(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:normalize_or_zero(_self) end + +---@package +---@param _self DVec4 + +---@return boolean +function DVec4:is_normalized(_self) end + +---@package +---@param _self DVec4 + +---@param a DVec4 + +---@param b DVec4 + +---@return DVec4 +function DVec4:mul_add(_self,a,b) end + +---@package +---@param _self DVec4 + +---@return UVec4 +function DVec4:as_uvec4(_self) end + +---@package +---@param _self DVec4 + +---@param min number + +---@return DVec4 +function DVec4:clamp_length_min(_self,min) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:floor(_self) end + +---@package +---@param v number + +---@return DVec4 +function DVec4.splat(v) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:fract(_self) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:exp(_self) end + +---@package +---@param _self DVec4 + +---@param normal DVec4 + +---@return DVec4 +function DVec4:reflect(_self,normal) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:recip(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return number +function DVec4:distance(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@param s number + +---@return DVec4 +function DVec4:lerp(_self,rhs,s) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:neg(_self) end + +---@package +---@param _self DVec4 + +---@param w number + +---@return DVec4 +function DVec4:with_w(_self,w) end + +---@package +---@param _self DVec4 + +---@return number +function DVec4:element_product(_self) end + +---@package +---@param _self DVec4 + +---@param z number + +---@return DVec4 +function DVec4:with_z(_self,z) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return BVec4 +function DVec4:cmple(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:dot_into_vec(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return integer +function DVec4:is_negative_bitmask(_self) end + +---@package +---@param _self DVec4 + +---@return number +function DVec4:element_sum(_self) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:clone(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:reject_from_normalized(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:midpoint(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param min number + +---@param max number + +---@return DVec4 +function DVec4:clamp_length(_self,min,max) end + +---@package +---@param a number[] + +---@return DVec4 +function DVec4.from_array(a) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return BVec4 +function DVec4:cmpne(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return BVec4 +function DVec4:cmpge(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:round(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:reject_from(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:project_onto_normalized(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return BVec4 +function DVec4:is_nan_mask(_self) end + +---@package +---@param _self DVec4 + +---@return U64Vec4 +function DVec4:as_u64vec4(_self) end + +---@package +---@param _self DVec4 + +---@return I64Vec4 +function DVec4:as_i64vec4(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:rem_euclid(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param x number + +---@return DVec4 +function DVec4:with_x(_self,x) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:trunc(_self) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:fract_gl(_self) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:signum(_self) end + +---@package +---@param _self DVec4 + +---@param fallback DVec4 + +---@return DVec4 +function DVec4:normalize_or(_self,fallback) end + +---@package +---@param _self DVec4 + +---@return IVec4 +function DVec4:as_ivec4(_self) end + +---@package +---@param _self DVec4 + +---@param max number + +---@return DVec4 +function DVec4:clamp_length_max(_self,max) end + +---@package +---@param _self DVec4 + +---@return boolean +function DVec4:is_finite(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:sub(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return number +function DVec4:length_squared(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:add(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:mul(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return U8Vec4 +function DVec4:as_u8vec4(_self) end + +---@package +---@param x number + +---@param y number + +---@param z number + +---@param w number + +---@return DVec4 +function DVec4.new(x,y,z,w) end + +---@package +---@param _self DVec4 + +---@param other DVec4 + +---@return boolean +function DVec4:eq(_self,other) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:project_onto(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return number[] +function DVec4:to_array(_self) end + +---@package +---@param mask BVec4 + +---@param if_true DVec4 + +---@param if_false DVec4 + +---@return DVec4 +function DVec4.select(mask,if_true,if_false) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:copysign(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return I8Vec4 +function DVec4:as_i8vec4(_self) end + +---@package +---@param _self DVec4 + +---@param y number + +---@return DVec4 +function DVec4:with_y(_self,y) end + +---@package +---@param _self DVec4 + +---@return U16Vec4 +function DVec4:as_u16vec4(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return BVec4 +function DVec4:cmpeq(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return number +function DVec4:distance_squared(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:rem(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return number +function DVec4:length_recip(_self) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:normalize(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:div(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return DVec4 +function DVec4:abs(_self) end + +---@package +---@param _self DVec4 + +---@return DVec3 +function DVec4:truncate(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@param max_abs_diff number + +---@return boolean +function DVec4:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return BVec4 +function DVec4:cmpgt(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return BVec4 +function DVec4:is_finite_mask(_self) end + +---@package +---@param _self DVec4 + +---@return number +function DVec4:length(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return BVec4 +function DVec4:cmplt(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return Vec4 +function DVec4:as_vec4(_self) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return number +function DVec4:dot(_self,rhs) end + +---@package +---@param _self DVec4 + +---@param rhs DVec4 + +---@return DVec4 +function DVec4:min(_self,rhs) end + +---@package +---@param _self DVec4 + +---@return number +function DVec4:max_element(_self) end + + +---@class EulerRot + +EulerRot = {} + +---@package +---@param _self EulerRot + +---@param other EulerRot + +---@return boolean +function EulerRot:eq(_self,other) end + +---@package +---@param _self EulerRot + +---@return EulerRot +function EulerRot:clone(_self) end + +---@package +---@param _self EulerRot + +---@return [] +function EulerRot:assert_receiver_is_total_eq(_self) end + + +---@class I16Vec2 + +---@field x ? integer +---@field y ? integer +I16Vec2 = {} + +---@package +---@param _self I16Vec2 + +---@param rhs U16Vec2 + +---@return I16Vec2 +function I16Vec2:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@return I16Vec2 +function I16Vec2.new(x,y) end + +---@package +---@param _self I16Vec2 + +---@return UVec2 +function I16Vec2:as_uvec2(_self) end + +---@package +---@param _self I16Vec2 + +---@return integer +function I16Vec2:length_squared(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:sub(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@return I8Vec2 +function I16Vec2:as_i8vec2(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs U16Vec2 + +---@return I16Vec2 +function I16Vec2:saturating_add_unsigned(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@return I64Vec2 +function I16Vec2:as_i64vec2(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return BVec2 +function I16Vec2:cmplt(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return integer +function I16Vec2:distance_squared(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@return I16Vec2 +function I16Vec2:neg(_self) end + +---@package +---@param _self I16Vec2 + +---@return integer +function I16Vec2:min_element(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:saturating_add(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:add(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:wrapping_div(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return BVec2 +function I16Vec2:cmpge(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:mul(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return BVec2 +function I16Vec2:cmple(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:saturating_div(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs U16Vec2 + +---@return I16Vec2 +function I16Vec2:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param other I16Vec2 + +---@return boolean +function I16Vec2:eq(_self,other) end + +---@package +---@param _self I16Vec2 + +---@return DVec2 +function I16Vec2:as_dvec2(_self) end + +---@package +---@param _self I16Vec2 + +---@return integer +function I16Vec2:max_element(_self) end + +---@package +---@param _self I16Vec2 + +---@return I16Vec2 +function I16Vec2:clone(_self) end + +---@package +---@param _self I16Vec2 + +---@param min I16Vec2 + +---@param max I16Vec2 + +---@return I16Vec2 +function I16Vec2:clamp(_self,min,max) end + +---@package +---@param _self I16Vec2 + +---@return integer[] +function I16Vec2:to_array(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:saturating_mul(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:min(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param z integer + +---@return I16Vec3 +function I16Vec2:extend(_self,z) end + +---@package +---@param _self I16Vec2 + +---@return I16Vec2 +function I16Vec2:signum(_self) end + +---@package +---@param _self I16Vec2 + +---@return Vec2 +function I16Vec2:as_vec2(_self) end + +---@package +---@param _self I16Vec2 + +---@return U64Vec2 +function I16Vec2:as_u64vec2(_self) end + +---@package +---@param v integer + +---@return I16Vec2 +function I16Vec2.splat(v) end + +---@package +---@param _self I16Vec2 + +---@return integer +function I16Vec2:is_negative_bitmask(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:rem_euclid(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@return IVec2 +function I16Vec2:as_ivec2(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:div(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:rotate(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return integer +function I16Vec2:perp_dot(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@return integer +function I16Vec2:element_sum(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:max(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:rem(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@return I16Vec2 +function I16Vec2:abs(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:saturating_sub(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return BVec2 +function I16Vec2:cmpgt(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@return U16Vec2 +function I16Vec2:as_u16vec2(_self) end + +---@package +---@param _self I16Vec2 + +---@param y integer + +---@return I16Vec2 +function I16Vec2:with_y(_self,y) end + +---@package +---@param mask BVec2 + +---@param if_true I16Vec2 + +---@param if_false I16Vec2 + +---@return I16Vec2 +function I16Vec2.select(mask,if_true,if_false) end + +---@package +---@param _self I16Vec2 + +---@return integer +function I16Vec2:element_product(_self) end + +---@package +---@param _self I16Vec2 + +---@return [] +function I16Vec2:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:wrapping_mul(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return BVec2 +function I16Vec2:cmpeq(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:div_euclid(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs U16Vec2 + +---@return I16Vec2 +function I16Vec2:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return integer +function I16Vec2:dot(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:wrapping_add(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:wrapping_sub(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@return U8Vec2 +function I16Vec2:as_u8vec2(_self) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return I16Vec2 +function I16Vec2:dot_into_vec(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param rhs I16Vec2 + +---@return BVec2 +function I16Vec2:cmpne(_self,rhs) end + +---@package +---@param _self I16Vec2 + +---@param x integer + +---@return I16Vec2 +function I16Vec2:with_x(_self,x) end + +---@package +---@param _self I16Vec2 + +---@return I16Vec2 +function I16Vec2:perp(_self) end + +---@package +---@param a integer[] + +---@return I16Vec2 +function I16Vec2.from_array(a) end + + +---@class I16Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +I16Vec3 = {} + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return BVec3 +function I16Vec3:cmplt(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return integer[] +function I16Vec3:to_array(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return BVec3 +function I16Vec3:cmple(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:mul(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs U16Vec3 + +---@return I16Vec3 +function I16Vec3:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return integer +function I16Vec3:element_sum(_self) end + +---@package +---@param _self I16Vec3 + +---@return integer +function I16Vec3:element_product(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs U16Vec3 + +---@return I16Vec3 +function I16Vec3:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return I16Vec2 +function I16Vec3:truncate(_self) end + +---@package +---@param _self I16Vec3 + +---@return I16Vec3 +function I16Vec3:neg(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return BVec3 +function I16Vec3:cmpne(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return integer +function I16Vec3:length_squared(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return BVec3 +function I16Vec3:cmpge(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:add(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return Vec3 +function I16Vec3:as_vec3(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:saturating_mul(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:saturating_add(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:cross(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param min I16Vec3 + +---@param max I16Vec3 + +---@return I16Vec3 +function I16Vec3:clamp(_self,min,max) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:wrapping_div(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return BVec3 +function I16Vec3:cmpeq(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return Vec3A +function I16Vec3:as_vec3a(_self) end + +---@package +---@param _self I16Vec3 + +---@return I16Vec3 +function I16Vec3:clone(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:saturating_sub(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:min(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param w integer + +---@return I16Vec4 +function I16Vec3:extend(_self,w) end + +---@package +---@param _self I16Vec3 + +---@return I64Vec3 +function I16Vec3:as_i64vec3(_self) end + +---@package +---@param _self I16Vec3 + +---@param y integer + +---@return I16Vec3 +function I16Vec3:with_y(_self,y) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:max(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return BVec3 +function I16Vec3:cmpgt(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return U16Vec3 +function I16Vec3:as_u16vec3(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:wrapping_mul(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return I16Vec3 +function I16Vec3:signum(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:sub(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return integer +function I16Vec3:dot(_self,rhs) end + +---@package +---@param mask BVec3 + +---@param if_true I16Vec3 + +---@param if_false I16Vec3 + +---@return I16Vec3 +function I16Vec3.select(mask,if_true,if_false) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:wrapping_sub(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return I8Vec3 +function I16Vec3:as_i8vec3(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:div(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param z integer + +---@return I16Vec3 +function I16Vec3:with_z(_self,z) end + +---@package +---@param _self I16Vec3 + +---@return integer +function I16Vec3:max_element(_self) end + +---@package +---@param _self I16Vec3 + +---@return integer +function I16Vec3:min_element(_self) end + +---@package +---@param a integer[] + +---@return I16Vec3 +function I16Vec3.from_array(a) end + +---@package +---@param _self I16Vec3 + +---@return [] +function I16Vec3:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return integer +function I16Vec3:distance_squared(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return DVec3 +function I16Vec3:as_dvec3(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs U16Vec3 + +---@return I16Vec3 +function I16Vec3:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:div_euclid(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return integer +function I16Vec3:is_negative_bitmask(_self) end + +---@package +---@param _self I16Vec3 + +---@return UVec3 +function I16Vec3:as_uvec3(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:rem_euclid(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return U64Vec3 +function I16Vec3:as_u64vec3(_self) end + +---@package +---@param _self I16Vec3 + +---@param other I16Vec3 + +---@return boolean +function I16Vec3:eq(_self,other) end + +---@package +---@param _self I16Vec3 + +---@return U8Vec3 +function I16Vec3:as_u8vec3(_self) end + +---@package +---@param _self I16Vec3 + +---@return IVec3 +function I16Vec3:as_ivec3(_self) end + +---@package +---@param _self I16Vec3 + +---@param x integer + +---@return I16Vec3 +function I16Vec3:with_x(_self,x) end + +---@package +---@param v integer + +---@return I16Vec3 +function I16Vec3.splat(v) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:dot_into_vec(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:wrapping_add(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@return I16Vec3 +function I16Vec3:abs(_self) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:rem(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs I16Vec3 + +---@return I16Vec3 +function I16Vec3:saturating_div(_self,rhs) end + +---@package +---@param _self I16Vec3 + +---@param rhs U16Vec3 + +---@return I16Vec3 +function I16Vec3:saturating_add_unsigned(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@return I16Vec3 +function I16Vec3.new(x,y,z) end + + +---@class I16Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer +I16Vec4 = {} + +---@package +---@param _self I16Vec4 + +---@param rhs U16Vec4 + +---@return I16Vec4 +function I16Vec4:saturating_add_unsigned(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@return [] +function I16Vec4:assert_receiver_is_total_eq(_self) end + +---@package +---@param v integer + +---@return I16Vec4 +function I16Vec4.splat(v) end + +---@package +---@param _self I16Vec4 + +---@param w integer + +---@return I16Vec4 +function I16Vec4:with_w(_self,w) end + +---@package +---@param a integer[] + +---@return I16Vec4 +function I16Vec4.from_array(a) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:saturating_sub(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@param w integer + +---@return I16Vec4 +function I16Vec4.new(x,y,z,w) end + +---@package +---@param _self I16Vec4 + +---@return I8Vec4 +function I16Vec4:as_i8vec4(_self) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:rem(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@return I16Vec4 +function I16Vec4:neg(_self) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return BVec4 +function I16Vec4:cmpgt(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@return Vec4 +function I16Vec4:as_vec4(_self) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:wrapping_mul(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs U16Vec4 + +---@return I16Vec4 +function I16Vec4:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param min I16Vec4 + +---@param max I16Vec4 + +---@return I16Vec4 +function I16Vec4:clamp(_self,min,max) end + +---@package +---@param _self I16Vec4 + +---@return integer[] +function I16Vec4:to_array(_self) end + +---@package +---@param _self I16Vec4 + +---@param other I16Vec4 + +---@return boolean +function I16Vec4:eq(_self,other) end + +---@package +---@param _self I16Vec4 + +---@return integer +function I16Vec4:length_squared(_self) end + +---@package +---@param _self I16Vec4 + +---@return I16Vec3 +function I16Vec4:truncate(_self) end + +---@package +---@param _self I16Vec4 + +---@param y integer + +---@return I16Vec4 +function I16Vec4:with_y(_self,y) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return BVec4 +function I16Vec4:cmple(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return BVec4 +function I16Vec4:cmpne(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:saturating_add(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:div_euclid(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return BVec4 +function I16Vec4:cmpge(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:saturating_mul(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:wrapping_add(_self,rhs) end + +---@package +---@param mask BVec4 + +---@param if_true I16Vec4 + +---@param if_false I16Vec4 + +---@return I16Vec4 +function I16Vec4.select(mask,if_true,if_false) end + +---@package +---@param _self I16Vec4 + +---@return DVec4 +function I16Vec4:as_dvec4(_self) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:wrapping_sub(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@return U64Vec4 +function I16Vec4:as_u64vec4(_self) end + +---@package +---@param _self I16Vec4 + +---@param rhs U16Vec4 + +---@return I16Vec4 +function I16Vec4:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:max(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@return IVec4 +function I16Vec4:as_ivec4(_self) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return BVec4 +function I16Vec4:cmpeq(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:div(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param x integer + +---@return I16Vec4 +function I16Vec4:with_x(_self,x) end + +---@package +---@param _self I16Vec4 + +---@return I64Vec4 +function I16Vec4:as_i64vec4(_self) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return BVec4 +function I16Vec4:cmplt(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@return integer +function I16Vec4:is_negative_bitmask(_self) end + +---@package +---@param _self I16Vec4 + +---@return I16Vec4 +function I16Vec4:abs(_self) end + +---@package +---@param _self I16Vec4 + +---@return I16Vec4 +function I16Vec4:signum(_self) end + +---@package +---@param _self I16Vec4 + +---@return U16Vec4 +function I16Vec4:as_u16vec4(_self) end + +---@package +---@param _self I16Vec4 + +---@return U8Vec4 +function I16Vec4:as_u8vec4(_self) end + +---@package +---@param _self I16Vec4 + +---@return integer +function I16Vec4:min_element(_self) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:sub(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:wrapping_div(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:min(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:mul(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:add(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs U16Vec4 + +---@return I16Vec4 +function I16Vec4:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param z integer + +---@return I16Vec4 +function I16Vec4:with_z(_self,z) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:rem_euclid(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return integer +function I16Vec4:dot(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@return integer +function I16Vec4:element_product(_self) end + +---@package +---@param _self I16Vec4 + +---@return integer +function I16Vec4:max_element(_self) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return integer +function I16Vec4:distance_squared(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@return UVec4 +function I16Vec4:as_uvec4(_self) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:saturating_div(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@param rhs I16Vec4 + +---@return I16Vec4 +function I16Vec4:dot_into_vec(_self,rhs) end + +---@package +---@param _self I16Vec4 + +---@return I16Vec4 +function I16Vec4:clone(_self) end + +---@package +---@param _self I16Vec4 + +---@return integer +function I16Vec4:element_sum(_self) end + + +---@class I64Vec2 + +---@field x ? integer +---@field y ? integer +I64Vec2 = {} + +---@package +---@param _self I64Vec2 + +---@return U8Vec2 +function I64Vec2:as_u8vec2(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs U64Vec2 + +---@return I64Vec2 +function I64Vec2:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:div(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return I64Vec2 +function I64Vec2:abs(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return BVec2 +function I64Vec2:cmpeq(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return I64Vec2 +function I64Vec2:signum(_self) end + +---@package +---@param _self I64Vec2 + +---@return I64Vec2 +function I64Vec2:neg(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return BVec2 +function I64Vec2:cmpgt(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return integer +function I64Vec2:element_product(_self) end + +---@package +---@param _self I64Vec2 + +---@param z integer + +---@return I64Vec3 +function I64Vec2:extend(_self,z) end + +---@package +---@param _self I64Vec2 + +---@return [] +function I64Vec2:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:wrapping_add(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:wrapping_sub(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return integer +function I64Vec2:distance_squared(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param other I64Vec2 + +---@return boolean +function I64Vec2:eq(_self,other) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return BVec2 +function I64Vec2:cmpne(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs U64Vec2 + +---@return I64Vec2 +function I64Vec2:saturating_add_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:saturating_mul(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:saturating_sub(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return integer +function I64Vec2:element_sum(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:min(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return Vec2 +function I64Vec2:as_vec2(_self) end + +---@package +---@param _self I64Vec2 + +---@return IVec2 +function I64Vec2:as_ivec2(_self) end + +---@package +---@param _self I64Vec2 + +---@return integer[] +function I64Vec2:to_array(_self) end + +---@package +---@param x integer + +---@param y integer + +---@return I64Vec2 +function I64Vec2.new(x,y) end + +---@package +---@param _self I64Vec2 + +---@param y integer + +---@return I64Vec2 +function I64Vec2:with_y(_self,y) end + +---@package +---@param _self I64Vec2 + +---@return DVec2 +function I64Vec2:as_dvec2(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:dot_into_vec(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:saturating_add(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:rem_euclid(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs U64Vec2 + +---@return I64Vec2 +function I64Vec2:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param min I64Vec2 + +---@param max I64Vec2 + +---@return I64Vec2 +function I64Vec2:clamp(_self,min,max) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:rotate(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return UVec2 +function I64Vec2:as_uvec2(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return BVec2 +function I64Vec2:cmpge(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return BVec2 +function I64Vec2:cmplt(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return integer +function I64Vec2:dot(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:add(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return BVec2 +function I64Vec2:cmple(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return U16Vec2 +function I64Vec2:as_u16vec2(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:max(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:wrapping_div(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:saturating_div(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return integer +function I64Vec2:min_element(_self) end + +---@package +---@param _self I64Vec2 + +---@param x integer + +---@return I64Vec2 +function I64Vec2:with_x(_self,x) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:rem(_self,rhs) end + +---@package +---@param mask BVec2 + +---@param if_true I64Vec2 + +---@param if_false I64Vec2 + +---@return I64Vec2 +function I64Vec2.select(mask,if_true,if_false) end + +---@package +---@param _self I64Vec2 + +---@return I16Vec2 +function I64Vec2:as_i16vec2(_self) end + +---@package +---@param v integer + +---@return I64Vec2 +function I64Vec2.splat(v) end + +---@package +---@param _self I64Vec2 + +---@return integer +function I64Vec2:length_squared(_self) end + +---@package +---@param _self I64Vec2 + +---@return I8Vec2 +function I64Vec2:as_i8vec2(_self) end + +---@package +---@param _self I64Vec2 + +---@return integer +function I64Vec2:max_element(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:mul(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return U64Vec2 +function I64Vec2:as_u64vec2(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:wrapping_mul(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return integer +function I64Vec2:is_negative_bitmask(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:div_euclid(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return I64Vec2 +function I64Vec2:sub(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return I64Vec2 +function I64Vec2:perp(_self) end + +---@package +---@param _self I64Vec2 + +---@param rhs U64Vec2 + +---@return I64Vec2 +function I64Vec2:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param a integer[] + +---@return I64Vec2 +function I64Vec2.from_array(a) end + +---@package +---@param _self I64Vec2 + +---@param rhs I64Vec2 + +---@return integer +function I64Vec2:perp_dot(_self,rhs) end + +---@package +---@param _self I64Vec2 + +---@return I64Vec2 +function I64Vec2:clone(_self) end + + +---@class I64Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +I64Vec3 = {} + +---@package +---@param _self I64Vec3 + +---@return integer +function I64Vec3:element_sum(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:div_euclid(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param min I64Vec3 + +---@param max I64Vec3 + +---@return I64Vec3 +function I64Vec3:clamp(_self,min,max) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return BVec3 +function I64Vec3:cmpne(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:cross(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return I64Vec2 +function I64Vec3:truncate(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs U64Vec3 + +---@return I64Vec3 +function I64Vec3:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return I64Vec3 +function I64Vec3:neg(_self) end + +---@package +---@param _self I64Vec3 + +---@return U16Vec3 +function I64Vec3:as_u16vec3(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:saturating_div(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param other I64Vec3 + +---@return boolean +function I64Vec3:eq(_self,other) end + +---@package +---@param _self I64Vec3 + +---@return integer +function I64Vec3:is_negative_bitmask(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:saturating_mul(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param rhs U64Vec3 + +---@return I64Vec3 +function I64Vec3:saturating_add_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:max(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:saturating_add(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return integer +function I64Vec3:dot(_self,rhs) end + +---@package +---@param v integer + +---@return I64Vec3 +function I64Vec3.splat(v) end + +---@package +---@param a integer[] + +---@return I64Vec3 +function I64Vec3.from_array(a) end + +---@package +---@param _self I64Vec3 + +---@param w integer + +---@return I64Vec4 +function I64Vec3:extend(_self,w) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return BVec3 +function I64Vec3:cmpgt(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return I64Vec3 +function I64Vec3:clone(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:rem(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:div(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@return I64Vec3 +function I64Vec3.new(x,y,z) end + +---@package +---@param _self I64Vec3 + +---@return [] +function I64Vec3:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self I64Vec3 + +---@return U64Vec3 +function I64Vec3:as_u64vec3(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:rem_euclid(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:wrapping_mul(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return I8Vec3 +function I64Vec3:as_i8vec3(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:mul(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return I64Vec3 +function I64Vec3:abs(_self) end + +---@package +---@param mask BVec3 + +---@param if_true I64Vec3 + +---@param if_false I64Vec3 + +---@return I64Vec3 +function I64Vec3.select(mask,if_true,if_false) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:add(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param z integer + +---@return I64Vec3 +function I64Vec3:with_z(_self,z) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return integer +function I64Vec3:distance_squared(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return integer +function I64Vec3:min_element(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:min(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return I64Vec3 +function I64Vec3:signum(_self) end + +---@package +---@param _self I64Vec3 + +---@return integer[] +function I64Vec3:to_array(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:dot_into_vec(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return integer +function I64Vec3:element_product(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:wrapping_div(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return BVec3 +function I64Vec3:cmpeq(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return DVec3 +function I64Vec3:as_dvec3(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:wrapping_sub(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return integer +function I64Vec3:length_squared(_self) end + +---@package +---@param _self I64Vec3 + +---@return Vec3A +function I64Vec3:as_vec3a(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:sub(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return BVec3 +function I64Vec3:cmple(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return U8Vec3 +function I64Vec3:as_u8vec3(_self) end + +---@package +---@param _self I64Vec3 + +---@return I16Vec3 +function I64Vec3:as_i16vec3(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs U64Vec3 + +---@return I64Vec3 +function I64Vec3:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return IVec3 +function I64Vec3:as_ivec3(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:wrapping_add(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return Vec3 +function I64Vec3:as_vec3(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return BVec3 +function I64Vec3:cmpge(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return integer +function I64Vec3:max_element(_self) end + +---@package +---@param _self I64Vec3 + +---@param rhs U64Vec3 + +---@return I64Vec3 +function I64Vec3:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return BVec3 +function I64Vec3:cmplt(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@return UVec3 +function I64Vec3:as_uvec3(_self) end + +---@package +---@param _self I64Vec3 + +---@param x integer + +---@return I64Vec3 +function I64Vec3:with_x(_self,x) end + +---@package +---@param _self I64Vec3 + +---@param rhs I64Vec3 + +---@return I64Vec3 +function I64Vec3:saturating_sub(_self,rhs) end + +---@package +---@param _self I64Vec3 + +---@param y integer + +---@return I64Vec3 +function I64Vec3:with_y(_self,y) end + + +---@class I64Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer +I64Vec4 = {} + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return BVec4 +function I64Vec4:cmple(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return I64Vec4 +function I64Vec4:signum(_self) end + +---@package +---@param _self I64Vec4 + +---@return integer +function I64Vec4:min_element(_self) end + +---@package +---@param _self I64Vec4 + +---@return I64Vec4 +function I64Vec4:neg(_self) end + +---@package +---@param _self I64Vec4 + +---@param w integer + +---@return I64Vec4 +function I64Vec4:with_w(_self,w) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:wrapping_add(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return integer +function I64Vec4:dot(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return I16Vec4 +function I64Vec4:as_i16vec4(_self) end + +---@package +---@param _self I64Vec4 + +---@return I64Vec3 +function I64Vec4:truncate(_self) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return BVec4 +function I64Vec4:cmplt(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs U64Vec4 + +---@return I64Vec4 +function I64Vec4:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return integer +function I64Vec4:length_squared(_self) end + +---@package +---@param _self I64Vec4 + +---@return integer +function I64Vec4:max_element(_self) end + +---@package +---@param _self I64Vec4 + +---@param z integer + +---@return I64Vec4 +function I64Vec4:with_z(_self,z) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:add(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return UVec4 +function I64Vec4:as_uvec4(_self) end + +---@package +---@param _self I64Vec4 + +---@param min I64Vec4 + +---@param max I64Vec4 + +---@return I64Vec4 +function I64Vec4:clamp(_self,min,max) end + +---@package +---@param _self I64Vec4 + +---@param y integer + +---@return I64Vec4 +function I64Vec4:with_y(_self,y) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:sub(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:mul(_self,rhs) end + +---@package +---@param mask BVec4 + +---@param if_true I64Vec4 + +---@param if_false I64Vec4 + +---@return I64Vec4 +function I64Vec4.select(mask,if_true,if_false) end + +---@package +---@param _self I64Vec4 + +---@param rhs U64Vec4 + +---@return I64Vec4 +function I64Vec4:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return BVec4 +function I64Vec4:cmpgt(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:rem_euclid(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@param w integer + +---@return I64Vec4 +function I64Vec4.new(x,y,z,w) end + +---@package +---@param _self I64Vec4 + +---@param x integer + +---@return I64Vec4 +function I64Vec4:with_x(_self,x) end + +---@package +---@param _self I64Vec4 + +---@return integer[] +function I64Vec4:to_array(_self) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return BVec4 +function I64Vec4:cmpge(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:div(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return Vec4 +function I64Vec4:as_vec4(_self) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:saturating_sub(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:wrapping_mul(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:div_euclid(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs U64Vec4 + +---@return I64Vec4 +function I64Vec4:saturating_add_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:saturating_add(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs U64Vec4 + +---@return I64Vec4 +function I64Vec4:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return IVec4 +function I64Vec4:as_ivec4(_self) end + +---@package +---@param _self I64Vec4 + +---@param other I64Vec4 + +---@return boolean +function I64Vec4:eq(_self,other) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:saturating_div(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:wrapping_div(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return [] +function I64Vec4:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:rem(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return integer +function I64Vec4:element_product(_self) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:min(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return integer +function I64Vec4:element_sum(_self) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return BVec4 +function I64Vec4:cmpne(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:wrapping_sub(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:dot_into_vec(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return BVec4 +function I64Vec4:cmpeq(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:saturating_mul(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return I64Vec4 +function I64Vec4:clone(_self) end + +---@package +---@param _self I64Vec4 + +---@return I64Vec4 +function I64Vec4:abs(_self) end + +---@package +---@param _self I64Vec4 + +---@return U8Vec4 +function I64Vec4:as_u8vec4(_self) end + +---@package +---@param _self I64Vec4 + +---@return U16Vec4 +function I64Vec4:as_u16vec4(_self) end + +---@package +---@param _self I64Vec4 + +---@return U64Vec4 +function I64Vec4:as_u64vec4(_self) end + +---@package +---@param _self I64Vec4 + +---@return DVec4 +function I64Vec4:as_dvec4(_self) end + +---@package +---@param a integer[] + +---@return I64Vec4 +function I64Vec4.from_array(a) end + +---@package +---@param _self I64Vec4 + +---@return I8Vec4 +function I64Vec4:as_i8vec4(_self) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return I64Vec4 +function I64Vec4:max(_self,rhs) end + +---@package +---@param _self I64Vec4 + +---@return integer +function I64Vec4:is_negative_bitmask(_self) end + +---@package +---@param v integer + +---@return I64Vec4 +function I64Vec4.splat(v) end + +---@package +---@param _self I64Vec4 + +---@param rhs I64Vec4 + +---@return integer +function I64Vec4:distance_squared(_self,rhs) end + + +---@class I8Vec2 + +---@field x ? integer +---@field y ? integer +I8Vec2 = {} + +---@package +---@param v integer + +---@return I8Vec2 +function I8Vec2.splat(v) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:mul(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:sub(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@return DVec2 +function I8Vec2:as_dvec2(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs U8Vec2 + +---@return I8Vec2 +function I8Vec2:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param other I8Vec2 + +---@return boolean +function I8Vec2:eq(_self,other) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:add(_self,rhs) end + +---@package +---@param mask BVec2 + +---@param if_true I8Vec2 + +---@param if_false I8Vec2 + +---@return I8Vec2 +function I8Vec2.select(mask,if_true,if_false) end + +---@package +---@param _self I8Vec2 + +---@return integer[] +function I8Vec2:to_array(_self) end + +---@package +---@param _self I8Vec2 + +---@return U8Vec2 +function I8Vec2:as_u8vec2(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:wrapping_add(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return BVec2 +function I8Vec2:cmpgt(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@return U16Vec2 +function I8Vec2:as_u16vec2(_self) end + +---@package +---@param _self I8Vec2 + +---@return Vec2 +function I8Vec2:as_vec2(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:saturating_div(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return BVec2 +function I8Vec2:cmplt(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@return I8Vec2 +function I8Vec2.new(x,y) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:div(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param y integer + +---@return I8Vec2 +function I8Vec2:with_y(_self,y) end + +---@package +---@param _self I8Vec2 + +---@return integer +function I8Vec2:is_negative_bitmask(_self) end + +---@package +---@param a integer[] + +---@return I8Vec2 +function I8Vec2.from_array(a) end + +---@package +---@param _self I8Vec2 + +---@param x integer + +---@return I8Vec2 +function I8Vec2:with_x(_self,x) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:wrapping_sub(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:saturating_mul(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@return I8Vec2 +function I8Vec2:perp(_self) end + +---@package +---@param _self I8Vec2 + +---@return I64Vec2 +function I8Vec2:as_i64vec2(_self) end + +---@package +---@param _self I8Vec2 + +---@return integer +function I8Vec2:element_product(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:max(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@return U64Vec2 +function I8Vec2:as_u64vec2(_self) end + +---@package +---@param _self I8Vec2 + +---@return I16Vec2 +function I8Vec2:as_i16vec2(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:min(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:rem(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@return integer +function I8Vec2:max_element(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return BVec2 +function I8Vec2:cmpeq(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@return IVec2 +function I8Vec2:as_ivec2(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return BVec2 +function I8Vec2:cmpge(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:rotate(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return BVec2 +function I8Vec2:cmpne(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs U8Vec2 + +---@return I8Vec2 +function I8Vec2:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:rem_euclid(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return integer +function I8Vec2:distance_squared(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param z integer + +---@return I8Vec3 +function I8Vec2:extend(_self,z) end + +---@package +---@param _self I8Vec2 + +---@return I8Vec2 +function I8Vec2:neg(_self) end + +---@package +---@param _self I8Vec2 + +---@return integer +function I8Vec2:min_element(_self) end + +---@package +---@param _self I8Vec2 + +---@return I8Vec2 +function I8Vec2:signum(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return integer +function I8Vec2:perp_dot(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return BVec2 +function I8Vec2:cmple(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param min I8Vec2 + +---@param max I8Vec2 + +---@return I8Vec2 +function I8Vec2:clamp(_self,min,max) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:wrapping_div(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return integer +function I8Vec2:dot(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:dot_into_vec(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@return I8Vec2 +function I8Vec2:clone(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:wrapping_mul(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:saturating_add(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@return I8Vec2 +function I8Vec2:abs(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs U8Vec2 + +---@return I8Vec2 +function I8Vec2:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@return [] +function I8Vec2:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self I8Vec2 + +---@param rhs U8Vec2 + +---@return I8Vec2 +function I8Vec2:saturating_add_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:div_euclid(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@param rhs I8Vec2 + +---@return I8Vec2 +function I8Vec2:saturating_sub(_self,rhs) end + +---@package +---@param _self I8Vec2 + +---@return integer +function I8Vec2:length_squared(_self) end + +---@package +---@param _self I8Vec2 + +---@return UVec2 +function I8Vec2:as_uvec2(_self) end + +---@package +---@param _self I8Vec2 + +---@return integer +function I8Vec2:element_sum(_self) end + + +---@class I8Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +I8Vec3 = {} + +---@package +---@param _self I8Vec3 + +---@return Vec3 +function I8Vec3:as_vec3(_self) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:rem_euclid(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param w integer + +---@return I8Vec4 +function I8Vec3:extend(_self,w) end + +---@package +---@param _self I8Vec3 + +---@return U16Vec3 +function I8Vec3:as_u16vec3(_self) end + +---@package +---@param _self I8Vec3 + +---@return I8Vec3 +function I8Vec3:signum(_self) end + +---@package +---@param _self I8Vec3 + +---@return DVec3 +function I8Vec3:as_dvec3(_self) end + +---@package +---@param _self I8Vec3 + +---@return integer +function I8Vec3:element_product(_self) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return BVec3 +function I8Vec3:cmpgt(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs U8Vec3 + +---@return I8Vec3 +function I8Vec3:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs U8Vec3 + +---@return I8Vec3 +function I8Vec3:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs U8Vec3 + +---@return I8Vec3 +function I8Vec3:saturating_add_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return UVec3 +function I8Vec3:as_uvec3(_self) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:add(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:max(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:cross(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:div_euclid(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param min I8Vec3 + +---@param max I8Vec3 + +---@return I8Vec3 +function I8Vec3:clamp(_self,min,max) end + +---@package +---@param _self I8Vec3 + +---@return integer +function I8Vec3:max_element(_self) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:wrapping_sub(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return Vec3A +function I8Vec3:as_vec3a(_self) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return BVec3 +function I8Vec3:cmpeq(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return I8Vec3 +function I8Vec3:neg(_self) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return BVec3 +function I8Vec3:cmpne(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:wrapping_div(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return U64Vec3 +function I8Vec3:as_u64vec3(_self) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@return I8Vec3 +function I8Vec3.new(x,y,z) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:saturating_add(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return I8Vec2 +function I8Vec3:truncate(_self) end + +---@package +---@param _self I8Vec3 + +---@return [] +function I8Vec3:assert_receiver_is_total_eq(_self) end + +---@package +---@param v integer + +---@return I8Vec3 +function I8Vec3.splat(v) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return BVec3 +function I8Vec3:cmplt(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return I64Vec3 +function I8Vec3:as_i64vec3(_self) end + +---@package +---@param mask BVec3 + +---@param if_true I8Vec3 + +---@param if_false I8Vec3 + +---@return I8Vec3 +function I8Vec3.select(mask,if_true,if_false) end + +---@package +---@param a integer[] + +---@return I8Vec3 +function I8Vec3.from_array(a) end + +---@package +---@param _self I8Vec3 + +---@return integer +function I8Vec3:is_negative_bitmask(_self) end + +---@package +---@param _self I8Vec3 + +---@param other I8Vec3 + +---@return boolean +function I8Vec3:eq(_self,other) end + +---@package +---@param _self I8Vec3 + +---@param y integer + +---@return I8Vec3 +function I8Vec3:with_y(_self,y) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:mul(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return integer[] +function I8Vec3:to_array(_self) end + +---@package +---@param _self I8Vec3 + +---@return I8Vec3 +function I8Vec3:abs(_self) end + +---@package +---@param _self I8Vec3 + +---@param z integer + +---@return I8Vec3 +function I8Vec3:with_z(_self,z) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:sub(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param x integer + +---@return I8Vec3 +function I8Vec3:with_x(_self,x) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return integer +function I8Vec3:distance_squared(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:div(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:dot_into_vec(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return integer +function I8Vec3:dot(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:wrapping_add(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return integer +function I8Vec3:min_element(_self) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:saturating_sub(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs U8Vec3 + +---@return I8Vec3 +function I8Vec3:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return U8Vec3 +function I8Vec3:as_u8vec3(_self) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return BVec3 +function I8Vec3:cmple(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return I8Vec3 +function I8Vec3:clone(_self) end + +---@package +---@param _self I8Vec3 + +---@return I16Vec3 +function I8Vec3:as_i16vec3(_self) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:saturating_mul(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:saturating_div(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return BVec3 +function I8Vec3:cmpge(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return integer +function I8Vec3:length_squared(_self) end + +---@package +---@param _self I8Vec3 + +---@return IVec3 +function I8Vec3:as_ivec3(_self) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:min(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:wrapping_mul(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@param rhs I8Vec3 + +---@return I8Vec3 +function I8Vec3:rem(_self,rhs) end + +---@package +---@param _self I8Vec3 + +---@return integer +function I8Vec3:element_sum(_self) end + + +---@class I8Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer +I8Vec4 = {} + +---@package +---@param _self I8Vec4 + +---@return IVec4 +function I8Vec4:as_ivec4(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return BVec4 +function I8Vec4:cmple(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:max(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return integer +function I8Vec4:dot(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param w integer + +---@return I8Vec4 +function I8Vec4:with_w(_self,w) end + +---@package +---@param _self I8Vec4 + +---@return integer +function I8Vec4:length_squared(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs U8Vec4 + +---@return I8Vec4 +function I8Vec4:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return integer +function I8Vec4:max_element(_self) end + +---@package +---@param _self I8Vec4 + +---@return I8Vec3 +function I8Vec4:truncate(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:sub(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:rem_euclid(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return integer[] +function I8Vec4:to_array(_self) end + +---@package +---@param _self I8Vec4 + +---@param other I8Vec4 + +---@return boolean +function I8Vec4:eq(_self,other) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:add(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return U8Vec4 +function I8Vec4:as_u8vec4(_self) end + +---@package +---@param _self I8Vec4 + +---@return [] +function I8Vec4:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self I8Vec4 + +---@return U64Vec4 +function I8Vec4:as_u64vec4(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:mul(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return BVec4 +function I8Vec4:cmpge(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return I16Vec4 +function I8Vec4:as_i16vec4(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:saturating_mul(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:min(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return integer +function I8Vec4:min_element(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:saturating_add(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return I64Vec4 +function I8Vec4:as_i64vec4(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return BVec4 +function I8Vec4:cmplt(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return integer +function I8Vec4:is_negative_bitmask(_self) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@param w integer + +---@return I8Vec4 +function I8Vec4.new(x,y,z,w) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:saturating_div(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return DVec4 +function I8Vec4:as_dvec4(_self) end + +---@package +---@param v integer + +---@return I8Vec4 +function I8Vec4.splat(v) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:div_euclid(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return I8Vec4 +function I8Vec4:signum(_self) end + +---@package +---@param _self I8Vec4 + +---@return integer +function I8Vec4:element_product(_self) end + +---@package +---@param _self I8Vec4 + +---@param x integer + +---@return I8Vec4 +function I8Vec4:with_x(_self,x) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:rem(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return UVec4 +function I8Vec4:as_uvec4(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:wrapping_div(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param min I8Vec4 + +---@param max I8Vec4 + +---@return I8Vec4 +function I8Vec4:clamp(_self,min,max) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:wrapping_mul(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return I8Vec4 +function I8Vec4:clone(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs U8Vec4 + +---@return I8Vec4 +function I8Vec4:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return BVec4 +function I8Vec4:cmpeq(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param z integer + +---@return I8Vec4 +function I8Vec4:with_z(_self,z) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return BVec4 +function I8Vec4:cmpne(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return I8Vec4 +function I8Vec4:neg(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:wrapping_sub(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param rhs U8Vec4 + +---@return I8Vec4 +function I8Vec4:saturating_add_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:dot_into_vec(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return BVec4 +function I8Vec4:cmpgt(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return U16Vec4 +function I8Vec4:as_u16vec4(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs U8Vec4 + +---@return I8Vec4 +function I8Vec4:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:div(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return I8Vec4 +function I8Vec4:abs(_self) end + +---@package +---@param _self I8Vec4 + +---@param y integer + +---@return I8Vec4 +function I8Vec4:with_y(_self,y) end + +---@package +---@param _self I8Vec4 + +---@return integer +function I8Vec4:element_sum(_self) end + +---@package +---@param a integer[] + +---@return I8Vec4 +function I8Vec4.from_array(a) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:saturating_sub(_self,rhs) end + +---@package +---@param mask BVec4 + +---@param if_true I8Vec4 + +---@param if_false I8Vec4 + +---@return I8Vec4 +function I8Vec4.select(mask,if_true,if_false) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return I8Vec4 +function I8Vec4:wrapping_add(_self,rhs) end + +---@package +---@param _self I8Vec4 + +---@return Vec4 +function I8Vec4:as_vec4(_self) end + +---@package +---@param _self I8Vec4 + +---@param rhs I8Vec4 + +---@return integer +function I8Vec4:distance_squared(_self,rhs) end + + +---@class IVec2 + +---@field x ? integer +---@field y ? integer +IVec2 = {} + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:rotate(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return DVec2 +function IVec2:as_dvec2(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:add(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return I8Vec2 +function IVec2:as_i8vec2(_self) end + +---@package +---@param _self IVec2 + +---@param min IVec2 + +---@param max IVec2 + +---@return IVec2 +function IVec2:clamp(_self,min,max) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return integer +function IVec2:distance_squared(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:saturating_mul(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:div(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs UVec2 + +---@return IVec2 +function IVec2:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return BVec2 +function IVec2:cmpne(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:mul(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return UVec2 +function IVec2:as_uvec2(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:wrapping_add(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return integer +function IVec2:element_sum(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return BVec2 +function IVec2:cmpeq(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:rem(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:div_euclid(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return integer[] +function IVec2:to_array(_self) end + +---@package +---@param _self IVec2 + +---@return [] +function IVec2:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self IVec2 + +---@return integer +function IVec2:max_element(_self) end + +---@package +---@param _self IVec2 + +---@param other IVec2 + +---@return boolean +function IVec2:eq(_self,other) end + +---@package +---@param _self IVec2 + +---@param rhs UVec2 + +---@return IVec2 +function IVec2:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return BVec2 +function IVec2:cmple(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:saturating_div(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs UVec2 + +---@return IVec2 +function IVec2:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param a integer[] + +---@return IVec2 +function IVec2.from_array(a) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return BVec2 +function IVec2:cmpgt(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return BVec2 +function IVec2:cmplt(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param x integer + +---@return IVec2 +function IVec2:with_x(_self,x) end + +---@package +---@param v integer + +---@return IVec2 +function IVec2.splat(v) end + +---@package +---@param _self IVec2 + +---@return integer +function IVec2:is_negative_bitmask(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:wrapping_mul(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return IVec2 +function IVec2:perp(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return integer +function IVec2:perp_dot(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:dot_into_vec(_self,rhs) end + +---@package +---@param mask BVec2 + +---@param if_true IVec2 + +---@param if_false IVec2 + +---@return IVec2 +function IVec2.select(mask,if_true,if_false) end + +---@package +---@param _self IVec2 + +---@return U64Vec2 +function IVec2:as_u64vec2(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:rem_euclid(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return integer +function IVec2:length_squared(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return integer +function IVec2:dot(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return U8Vec2 +function IVec2:as_u8vec2(_self) end + +---@package +---@param _self IVec2 + +---@return Vec2 +function IVec2:as_vec2(_self) end + +---@package +---@param _self IVec2 + +---@return U16Vec2 +function IVec2:as_u16vec2(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return BVec2 +function IVec2:cmpge(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return IVec2 +function IVec2:neg(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:wrapping_sub(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param z integer + +---@return IVec3 +function IVec2:extend(_self,z) end + +---@package +---@param _self IVec2 + +---@param y integer + +---@return IVec2 +function IVec2:with_y(_self,y) end + +---@package +---@param _self IVec2 + +---@return IVec2 +function IVec2:clone(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:wrapping_div(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return I64Vec2 +function IVec2:as_i64vec2(_self) end + +---@package +---@param x integer + +---@param y integer + +---@return IVec2 +function IVec2.new(x,y) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:saturating_sub(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:saturating_add(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return integer +function IVec2:element_product(_self) end + +---@package +---@param _self IVec2 + +---@return IVec2 +function IVec2:signum(_self) end + +---@package +---@param _self IVec2 + +---@return I16Vec2 +function IVec2:as_i16vec2(_self) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:min(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:max(_self,rhs) end + +---@package +---@param _self IVec2 + +---@param rhs IVec2 + +---@return IVec2 +function IVec2:sub(_self,rhs) end + +---@package +---@param _self IVec2 + +---@return integer +function IVec2:min_element(_self) end + +---@package +---@param _self IVec2 + +---@return IVec2 +function IVec2:abs(_self) end + +---@package +---@param _self IVec2 + +---@param rhs UVec2 + +---@return IVec2 +function IVec2:saturating_add_unsigned(_self,rhs) end + + +---@class IVec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +IVec3 = {} + +---@package +---@param _self IVec3 + +---@param other IVec3 + +---@return boolean +function IVec3:eq(_self,other) end + +---@package +---@param a integer[] + +---@return IVec3 +function IVec3.from_array(a) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:saturating_sub(_self,rhs) end + +---@package +---@param _self IVec3 + +---@return U64Vec3 +function IVec3:as_u64vec3(_self) end + +---@package +---@param _self IVec3 + +---@return integer +function IVec3:min_element(_self) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return BVec3 +function IVec3:cmpne(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param y integer + +---@return IVec3 +function IVec3:with_y(_self,y) end + +---@package +---@param _self IVec3 + +---@return IVec2 +function IVec3:truncate(_self) end + +---@package +---@param _self IVec3 + +---@return Vec3 +function IVec3:as_vec3(_self) end + +---@package +---@param mask BVec3 + +---@param if_true IVec3 + +---@param if_false IVec3 + +---@return IVec3 +function IVec3.select(mask,if_true,if_false) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:mul(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param min IVec3 + +---@param max IVec3 + +---@return IVec3 +function IVec3:clamp(_self,min,max) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:wrapping_div(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param x integer + +---@return IVec3 +function IVec3:with_x(_self,x) end + +---@package +---@param _self IVec3 + +---@param rhs UVec3 + +---@return IVec3 +function IVec3:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:wrapping_add(_self,rhs) end + +---@package +---@param _self IVec3 + +---@return I16Vec3 +function IVec3:as_i16vec3(_self) end + +---@package +---@param _self IVec3 + +---@return I64Vec3 +function IVec3:as_i64vec3(_self) end + +---@package +---@param _self IVec3 + +---@return integer +function IVec3:max_element(_self) end + +---@package +---@param _self IVec3 + +---@param rhs UVec3 + +---@return IVec3 +function IVec3:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param _self IVec3 + +---@return integer +function IVec3:element_sum(_self) end + +---@package +---@param _self IVec3 + +---@param rhs UVec3 + +---@return IVec3 +function IVec3:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self IVec3 + +---@return U8Vec3 +function IVec3:as_u8vec3(_self) end + +---@package +---@param _self IVec3 + +---@return IVec3 +function IVec3:clone(_self) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:saturating_div(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param w integer + +---@return IVec4 +function IVec3:extend(_self,w) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:div_euclid(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:sub(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:max(_self,rhs) end + +---@package +---@param _self IVec3 + +---@return integer +function IVec3:length_squared(_self) end + +---@package +---@param _self IVec3 + +---@return IVec3 +function IVec3:signum(_self) end + +---@package +---@param _self IVec3 + +---@return U16Vec3 +function IVec3:as_u16vec3(_self) end + +---@package +---@param _self IVec3 + +---@return UVec3 +function IVec3:as_uvec3(_self) end + +---@package +---@param v integer + +---@return IVec3 +function IVec3.splat(v) end + +---@package +---@param _self IVec3 + +---@return IVec3 +function IVec3:abs(_self) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:cross(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return BVec3 +function IVec3:cmpgt(_self,rhs) end + +---@package +---@param _self IVec3 + +---@return Vec3A +function IVec3:as_vec3a(_self) end + +---@package +---@param _self IVec3 + +---@return [] +function IVec3:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self IVec3 + +---@param z integer + +---@return IVec3 +function IVec3:with_z(_self,z) end + +---@package +---@param _self IVec3 + +---@return integer +function IVec3:is_negative_bitmask(_self) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return integer +function IVec3:distance_squared(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:wrapping_sub(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@return IVec3 +function IVec3.new(x,y,z) end + +---@package +---@param _self IVec3 + +---@param rhs UVec3 + +---@return IVec3 +function IVec3:saturating_add_unsigned(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:saturating_add(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:rem_euclid(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:min(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return integer +function IVec3:dot(_self,rhs) end + +---@package +---@param _self IVec3 + +---@return IVec3 +function IVec3:neg(_self) end + +---@package +---@param _self IVec3 + +---@return integer[] +function IVec3:to_array(_self) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:dot_into_vec(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:div(_self,rhs) end + +---@package +---@param _self IVec3 + +---@return I8Vec3 +function IVec3:as_i8vec3(_self) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:rem(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:saturating_mul(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return BVec3 +function IVec3:cmpge(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return BVec3 +function IVec3:cmple(_self,rhs) end + +---@package +---@param _self IVec3 + +---@return DVec3 +function IVec3:as_dvec3(_self) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return BVec3 +function IVec3:cmpeq(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:add(_self,rhs) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return BVec3 +function IVec3:cmplt(_self,rhs) end + +---@package +---@param _self IVec3 + +---@return integer +function IVec3:element_product(_self) end + +---@package +---@param _self IVec3 + +---@param rhs IVec3 + +---@return IVec3 +function IVec3:wrapping_mul(_self,rhs) end + + +---@class IVec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer +IVec4 = {} + +---@package +---@param _self IVec4 + +---@return [] +function IVec4:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:saturating_add(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param min IVec4 + +---@param max IVec4 + +---@return IVec4 +function IVec4:clamp(_self,min,max) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return BVec4 +function IVec4:cmpeq(_self,rhs) end + +---@package +---@param v integer + +---@return IVec4 +function IVec4.splat(v) end + +---@package +---@param _self IVec4 + +---@param rhs UVec4 + +---@return IVec4 +function IVec4:saturating_sub_unsigned(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return integer +function IVec4:distance_squared(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return integer +function IVec4:length_squared(_self) end + +---@package +---@param _self IVec4 + +---@param z integer + +---@return IVec4 +function IVec4:with_z(_self,z) end + +---@package +---@param _self IVec4 + +---@return IVec4 +function IVec4:neg(_self) end + +---@package +---@param _self IVec4 + +---@return integer +function IVec4:min_element(_self) end + +---@package +---@param _self IVec4 + +---@return I16Vec4 +function IVec4:as_i16vec4(_self) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:wrapping_div(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return integer +function IVec4:max_element(_self) end + +---@package +---@param _self IVec4 + +---@return UVec4 +function IVec4:as_uvec4(_self) end + +---@package +---@param mask BVec4 + +---@param if_true IVec4 + +---@param if_false IVec4 + +---@return IVec4 +function IVec4.select(mask,if_true,if_false) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:dot_into_vec(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return U8Vec4 +function IVec4:as_u8vec4(_self) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:saturating_div(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return integer +function IVec4:element_product(_self) end + +---@package +---@param _self IVec4 + +---@return integer[] +function IVec4:to_array(_self) end + +---@package +---@param _self IVec4 + +---@param rhs UVec4 + +---@return IVec4 +function IVec4:wrapping_add_unsigned(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:rem_euclid(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return DVec4 +function IVec4:as_dvec4(_self) end + +---@package +---@param _self IVec4 + +---@return IVec4 +function IVec4:abs(_self) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:add(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:max(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:div(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return integer +function IVec4:is_negative_bitmask(_self) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:mul(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return U16Vec4 +function IVec4:as_u16vec4(_self) end + +---@package +---@param _self IVec4 + +---@return U64Vec4 +function IVec4:as_u64vec4(_self) end + +---@package +---@param _self IVec4 + +---@param rhs UVec4 + +---@return IVec4 +function IVec4:wrapping_sub_unsigned(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:saturating_sub(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:min(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return BVec4 +function IVec4:cmpge(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return IVec4 +function IVec4:clone(_self) end + +---@package +---@param _self IVec4 + +---@return Vec4 +function IVec4:as_vec4(_self) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return BVec4 +function IVec4:cmpgt(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:sub(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:rem(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return BVec4 +function IVec4:cmpne(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return I8Vec4 +function IVec4:as_i8vec4(_self) end + +---@package +---@param _self IVec4 + +---@param y integer + +---@return IVec4 +function IVec4:with_y(_self,y) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:div_euclid(_self,rhs) end + +---@package +---@param a integer[] + +---@return IVec4 +function IVec4.from_array(a) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:saturating_mul(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return integer +function IVec4:element_sum(_self) end + +---@package +---@param _self IVec4 + +---@param other IVec4 + +---@return boolean +function IVec4:eq(_self,other) end + +---@package +---@param _self IVec4 + +---@param w integer + +---@return IVec4 +function IVec4:with_w(_self,w) end + +---@package +---@param _self IVec4 + +---@return IVec4 +function IVec4:signum(_self) end + +---@package +---@param _self IVec4 + +---@param x integer + +---@return IVec4 +function IVec4:with_x(_self,x) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:wrapping_mul(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return BVec4 +function IVec4:cmplt(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:wrapping_add(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@param w integer + +---@return IVec4 +function IVec4.new(x,y,z,w) end + +---@package +---@param _self IVec4 + +---@return I64Vec4 +function IVec4:as_i64vec4(_self) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return IVec4 +function IVec4:wrapping_sub(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return BVec4 +function IVec4:cmple(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs UVec4 + +---@return IVec4 +function IVec4:saturating_add_unsigned(_self,rhs) end + +---@package +---@param _self IVec4 + +---@param rhs IVec4 + +---@return integer +function IVec4:dot(_self,rhs) end + +---@package +---@param _self IVec4 + +---@return IVec3 +function IVec4:truncate(_self) end + + +---@class Mat2 + +---@field x_axis ? Vec2 +---@field y_axis ? Vec2 +Mat2 = {} + +---@package +---@param _self Mat2 + +---@return Mat2 +function Mat2:clone(_self) end + +---@package +---@param _self Mat2 + +---@param rhs Mat2 + +---@return Mat2 +function Mat2:mul(_self,rhs) end + +---@package +---@param _self Mat2 + +---@param index integer + +---@return Vec2 +function Mat2:row(_self,index) end + +---@package +---@param m Mat3A + +---@return Mat2 +function Mat2.from_mat3a(m) end + +---@package +---@param _self Mat2 + +---@param rhs number + +---@return Mat2 +function Mat2:div(_self,rhs) end + +---@package +---@param _self Mat2 + +---@return boolean +function Mat2:is_nan(_self) end + +---@package +---@param _self Mat2 + +---@param rhs Mat2 + +---@param max_abs_diff number + +---@return boolean +function Mat2:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self Mat2 + +---@param rhs number + +---@return Mat2 +function Mat2:mul_scalar(_self,rhs) end + +---@package +---@param _self Mat2 + +---@param rhs Mat2 + +---@return Mat2 +function Mat2:add_mat2(_self,rhs) end + +---@package +---@param _self Mat2 + +---@return number[][] +function Mat2:to_cols_array_2d(_self) end + +---@package +---@param x_axis Vec2 + +---@param y_axis Vec2 + +---@return Mat2 +function Mat2.from_cols(x_axis,y_axis) end + +---@package +---@param _self Mat2 + +---@param rhs number + +---@return Mat2 +function Mat2:div_scalar(_self,rhs) end + +---@package +---@param _self Mat2 + +---@return number[] +function Mat2:to_cols_array(_self) end + +---@package +---@param _self Mat2 + +---@return Mat2 +function Mat2:transpose(_self) end + +---@package +---@param _self Mat2 + +---@return boolean +function Mat2:is_finite(_self) end + +---@package +---@param _self Mat2 + +---@return Mat2 +function Mat2:inverse(_self) end + +---@package +---@param _self Mat2 + +---@param rhs Mat2 + +---@return boolean +function Mat2:eq(_self,rhs) end + +---@package +---@param _self Mat2 + +---@return DMat2 +function Mat2:as_dmat2(_self) end + +---@package +---@param _self Mat2 + +---@return Mat2 +function Mat2:abs(_self) end + +---@package +---@param m Mat3 + +---@return Mat2 +function Mat2.from_mat3(m) end + +---@package +---@param m Mat3A + +---@param i integer + +---@param j integer + +---@return Mat2 +function Mat2.from_mat3a_minor(m,i,j) end + +---@package +---@param _self Mat2 + +---@param rhs Mat2 + +---@return Mat2 +function Mat2:mul_mat2(_self,rhs) end + +---@package +---@param angle number + +---@return Mat2 +function Mat2.from_angle(angle) end + +---@package +---@param diagonal Vec2 + +---@return Mat2 +function Mat2.from_diagonal(diagonal) end + +---@package +---@param _self Mat2 + +---@param index integer + +---@return Vec2 +function Mat2:col(_self,index) end + +---@package +---@param _self Mat2 + +---@param rhs Vec2 + +---@return Vec2 +function Mat2:mul_vec2(_self,rhs) end + +---@package +---@param _self Mat2 + +---@return number +function Mat2:determinant(_self) end + +---@package +---@param _self Mat2 + +---@param rhs Mat2 + +---@return Mat2 +function Mat2:add(_self,rhs) end + +---@package +---@param _self Mat2 + +---@param rhs Mat2 + +---@return Mat2 +function Mat2:sub_mat2(_self,rhs) end + +---@package +---@param _self Mat2 + +---@param rhs Mat2 + +---@return Mat2 +function Mat2:sub(_self,rhs) end + +---@package +---@param _self Mat2 + +---@return Mat2 +function Mat2:neg(_self) end + +---@package +---@param m Mat3 + +---@param i integer + +---@param j integer + +---@return Mat2 +function Mat2.from_mat3_minor(m,i,j) end + +---@package +---@param scale Vec2 + +---@param angle number + +---@return Mat2 +function Mat2.from_scale_angle(scale,angle) end + + +---@class Mat3 + +---@field x_axis ? Vec3 +---@field y_axis ? Vec3 +---@field z_axis ? Vec3 +Mat3 = {} + +---@package +---@param translation Vec2 + +---@return Mat3 +function Mat3.from_translation(translation) end + +---@package +---@param x_axis Vec3 + +---@param y_axis Vec3 + +---@param z_axis Vec3 + +---@return Mat3 +function Mat3.from_cols(x_axis,y_axis,z_axis) end + +---@package +---@param m Mat2 + +---@return Mat3 +function Mat3.from_mat2(m) end + +---@package +---@param _self Mat3 + +---@return boolean +function Mat3:is_finite(_self) end + +---@package +---@param m Mat4 + +---@return Mat3 +function Mat3.from_mat4(m) end + +---@package +---@param _self Mat3 + +---@param rhs Mat3 + +---@return Mat3 +function Mat3:add(_self,rhs) end + +---@package +---@param diagonal Vec3 + +---@return Mat3 +function Mat3.from_diagonal(diagonal) end + +---@package +---@param _self Mat3 + +---@return Mat3 +function Mat3:clone(_self) end + +---@package +---@param _self Mat3 + +---@param index integer + +---@return Vec3 +function Mat3:col(_self,index) end + +---@package +---@param order EulerRot + +---@param a number + +---@param b number + +---@param c number + +---@return Mat3 +function Mat3.from_euler(order,a,b,c) end + +---@package +---@param _self Mat3 + +---@param rhs Mat3 + +---@param max_abs_diff number + +---@return boolean +function Mat3:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param scale Vec2 + +---@param angle number + +---@param translation Vec2 + +---@return Mat3 +function Mat3.from_scale_angle_translation(scale,angle,translation) end + +---@package +---@param _self Mat3 + +---@param rhs Mat3 + +---@return Mat3 +function Mat3:sub(_self,rhs) end + +---@package +---@param scale Vec2 + +---@return Mat3 +function Mat3.from_scale(scale) end + +---@package +---@param angle number + +---@return Mat3 +function Mat3.from_rotation_y(angle) end + +---@package +---@param angle number + +---@return Mat3 +function Mat3.from_angle(angle) end + +---@package +---@param rotation Quat + +---@return Mat3 +function Mat3.from_quat(rotation) end + +---@package +---@param _self Mat3 + +---@return number[] +function Mat3:to_cols_array(_self) end + +---@package +---@param _self Mat3 + +---@return Mat3 +function Mat3:abs(_self) end + +---@package +---@param _self Mat3 + +---@param rhs Mat3 + +---@return Mat3 +function Mat3:add_mat3(_self,rhs) end + +---@package +---@param _self Mat3 + +---@param order EulerRot + +---@return [number, number, number] +function Mat3:to_euler(_self,order) end + +---@package +---@param _self Mat3 + +---@return Mat3 +function Mat3:transpose(_self) end + +---@package +---@param _self Mat3 + +---@param rhs Vec3A + +---@return Vec3A +function Mat3:mul_vec3a(_self,rhs) end + +---@package +---@param axis Vec3 + +---@param angle number + +---@return Mat3 +function Mat3.from_axis_angle(axis,angle) end + +---@package +---@param angle number + +---@return Mat3 +function Mat3.from_rotation_x(angle) end + +---@package +---@param _self Mat3 + +---@return boolean +function Mat3:is_nan(_self) end + +---@package +---@param _self Mat3 + +---@return number +function Mat3:determinant(_self) end + +---@package +---@param _self Mat3 + +---@return Mat3 +function Mat3:inverse(_self) end + +---@package +---@param _self Mat3 + +---@param index integer + +---@return Vec3 +function Mat3:row(_self,index) end + +---@package +---@param _self Mat3 + +---@param rhs Vec2 + +---@return Vec2 +function Mat3:transform_vector2(_self,rhs) end + +---@package +---@param _self Mat3 + +---@return DMat3 +function Mat3:as_dmat3(_self) end + +---@package +---@param _self Mat3 + +---@return number[][] +function Mat3:to_cols_array_2d(_self) end + +---@package +---@param _self Mat3 + +---@param rhs Vec2 + +---@return Vec2 +function Mat3:transform_point2(_self,rhs) end + +---@package +---@param _self Mat3 + +---@return Mat3 +function Mat3:neg(_self) end + +---@package +---@param angle number + +---@return Mat3 +function Mat3.from_rotation_z(angle) end + +---@package +---@param m Mat4 + +---@param i integer + +---@param j integer + +---@return Mat3 +function Mat3.from_mat4_minor(m,i,j) end + +---@package +---@param _self Mat3 + +---@param rhs number + +---@return Mat3 +function Mat3:div_scalar(_self,rhs) end + +---@package +---@param _self Mat3 + +---@param rhs number + +---@return Mat3 +function Mat3:div(_self,rhs) end + +---@package +---@param _self Mat3 + +---@param rhs number + +---@return Mat3 +function Mat3:mul_scalar(_self,rhs) end + +---@package +---@param _self Mat3 + +---@param rhs Mat3 + +---@return Mat3 +function Mat3:mul_mat3(_self,rhs) end + +---@package +---@param _self Mat3 + +---@param rhs Vec3 + +---@return Vec3 +function Mat3:mul_vec3(_self,rhs) end + +---@package +---@param _self Mat3 + +---@param rhs Affine2 + +---@return Mat3 +function Mat3:mul(_self,rhs) end + +---@package +---@param _self Mat3 + +---@param rhs Mat3 + +---@return boolean +function Mat3:eq(_self,rhs) end + +---@package +---@param _self Mat3 + +---@param rhs Mat3 + +---@return Mat3 +function Mat3:sub_mat3(_self,rhs) end + + +---@class Mat3A + +---@field x_axis ? Vec3A +---@field y_axis ? Vec3A +---@field z_axis ? Vec3A +Mat3A = {} + +---@package +---@param _self Mat3A + +---@return number[] +function Mat3A:to_cols_array(_self) end + +---@package +---@param _self Mat3A + +---@param rhs Mat3A + +---@return Mat3A +function Mat3A:sub(_self,rhs) end + +---@package +---@param _self Mat3A + +---@param order EulerRot + +---@return [number, number, number] +function Mat3A:to_euler(_self,order) end + +---@package +---@param _self Mat3A + +---@return Mat3A +function Mat3A:inverse(_self) end + +---@package +---@param angle number + +---@return Mat3A +function Mat3A.from_angle(angle) end + +---@package +---@param _self Mat3A + +---@param rhs Mat3A + +---@return Mat3A +function Mat3A:add(_self,rhs) end + +---@package +---@param rotation Quat + +---@return Mat3A +function Mat3A.from_quat(rotation) end + +---@package +---@param _self Mat3A + +---@return DMat3 +function Mat3A:as_dmat3(_self) end + +---@package +---@param _self Mat3A + +---@return boolean +function Mat3A:is_finite(_self) end + +---@package +---@param _self Mat3A + +---@param rhs Affine2 + +---@return Mat3A +function Mat3A:mul(_self,rhs) end + +---@package +---@param _self Mat3A + +---@param rhs Mat3A + +---@return boolean +function Mat3A:eq(_self,rhs) end + +---@package +---@param axis Vec3 + +---@param angle number + +---@return Mat3A +function Mat3A.from_axis_angle(axis,angle) end + +---@package +---@param _self Mat3A + +---@param rhs Mat3A + +---@return Mat3A +function Mat3A:add_mat3(_self,rhs) end + +---@package +---@param _self Mat3A + +---@param rhs number + +---@return Mat3A +function Mat3A:div(_self,rhs) end + +---@package +---@param _self Mat3A + +---@param rhs Mat3A + +---@param max_abs_diff number + +---@return boolean +function Mat3A:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self Mat3A + +---@param rhs Mat3A + +---@return Mat3A +function Mat3A:mul_mat3(_self,rhs) end + +---@package +---@param _self Mat3A + +---@return Mat3A +function Mat3A:neg(_self) end + +---@package +---@param scale Vec2 + +---@return Mat3A +function Mat3A.from_scale(scale) end + +---@package +---@param _self Mat3A + +---@return boolean +function Mat3A:is_nan(_self) end + +---@package +---@param _self Mat3A + +---@return number[][] +function Mat3A:to_cols_array_2d(_self) end + +---@package +---@param angle number + +---@return Mat3A +function Mat3A.from_rotation_x(angle) end + +---@package +---@param _self Mat3A + +---@return number +function Mat3A:determinant(_self) end + +---@package +---@param angle number + +---@return Mat3A +function Mat3A.from_rotation_z(angle) end + +---@package +---@param m Mat4 + +---@return Mat3A +function Mat3A.from_mat4(m) end + +---@package +---@param _self Mat3A + +---@param index integer + +---@return Vec3A +function Mat3A:row(_self,index) end + +---@package +---@param _self Mat3A + +---@param rhs Vec2 + +---@return Vec2 +function Mat3A:transform_point2(_self,rhs) end + +---@package +---@param scale Vec2 + +---@param angle number + +---@param translation Vec2 + +---@return Mat3A +function Mat3A.from_scale_angle_translation(scale,angle,translation) end + +---@package +---@param _self Mat3A + +---@param rhs number + +---@return Mat3A +function Mat3A:mul_scalar(_self,rhs) end + +---@package +---@param _self Mat3A + +---@param rhs Vec3A + +---@return Vec3A +function Mat3A:mul_vec3a(_self,rhs) end + +---@package +---@param diagonal Vec3 + +---@return Mat3A +function Mat3A.from_diagonal(diagonal) end + +---@package +---@param _self Mat3A + +---@param rhs Vec2 + +---@return Vec2 +function Mat3A:transform_vector2(_self,rhs) end + +---@package +---@param _self Mat3A + +---@return Mat3A +function Mat3A:transpose(_self) end + +---@package +---@param _self Mat3A + +---@param rhs Vec3 + +---@return Vec3 +function Mat3A:mul_vec3(_self,rhs) end + +---@package +---@param x_axis Vec3A + +---@param y_axis Vec3A + +---@param z_axis Vec3A + +---@return Mat3A +function Mat3A.from_cols(x_axis,y_axis,z_axis) end + +---@package +---@param order EulerRot + +---@param a number + +---@param b number + +---@param c number + +---@return Mat3A +function Mat3A.from_euler(order,a,b,c) end + +---@package +---@param _self Mat3A + +---@param rhs Mat3A + +---@return Mat3A +function Mat3A:sub_mat3(_self,rhs) end + +---@package +---@param angle number + +---@return Mat3A +function Mat3A.from_rotation_y(angle) end + +---@package +---@param _self Mat3A + +---@return Mat3A +function Mat3A:clone(_self) end + +---@package +---@param _self Mat3A + +---@param index integer + +---@return Vec3A +function Mat3A:col(_self,index) end + +---@package +---@param m Mat2 + +---@return Mat3A +function Mat3A.from_mat2(m) end + +---@package +---@param _self Mat3A + +---@param rhs number + +---@return Mat3A +function Mat3A:div_scalar(_self,rhs) end + +---@package +---@param _self Mat3A + +---@return Mat3A +function Mat3A:abs(_self) end + +---@package +---@param translation Vec2 + +---@return Mat3A +function Mat3A.from_translation(translation) end + +---@package +---@param m Mat4 + +---@param i integer + +---@param j integer + +---@return Mat3A +function Mat3A.from_mat4_minor(m,i,j) end + + +---@class Mat4 + +---@field x_axis ? Vec4 +---@field y_axis ? Vec4 +---@field z_axis ? Vec4 +---@field w_axis ? Vec4 +Mat4 = {} + +---@package +---@param eye Vec3 + +---@param dir Vec3 + +---@param up Vec3 + +---@return Mat4 +function Mat4.look_to_rh(eye,dir,up) end + +---@package +---@param left number + +---@param right number + +---@param bottom number + +---@param top number + +---@param near number + +---@param far number + +---@return Mat4 +function Mat4.orthographic_rh(left,right,bottom,top,near,far) end + +---@package +---@param diagonal Vec4 + +---@return Mat4 +function Mat4.from_diagonal(diagonal) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@param z_far number + +---@return Mat4 +function Mat4.perspective_rh(fov_y_radians,aspect_ratio,z_near,z_far) end + +---@package +---@param angle number + +---@return Mat4 +function Mat4.from_rotation_x(angle) end + +---@package +---@param eye Vec3 + +---@param dir Vec3 + +---@param up Vec3 + +---@return Mat4 +function Mat4.look_to_lh(eye,dir,up) end + +---@package +---@param _self Mat4 + +---@param order EulerRot + +---@return [number, number, number] +function Mat4:to_euler(_self,order) end + +---@package +---@param _self Mat4 + +---@param rhs Mat4 + +---@return Mat4 +function Mat4:add(_self,rhs) end + +---@package +---@param _self Mat4 + +---@param index integer + +---@return Vec4 +function Mat4:col(_self,index) end + +---@package +---@param _self Mat4 + +---@param rhs Vec3A + +---@return Vec3A +function Mat4:transform_vector3a(_self,rhs) end + +---@package +---@param _self Mat4 + +---@param rhs Mat4 + +---@return Mat4 +function Mat4:sub_mat4(_self,rhs) end + +---@package +---@param rotation Quat + +---@param translation Vec3 + +---@return Mat4 +function Mat4.from_rotation_translation(rotation,translation) end + +---@package +---@param _self Mat4 + +---@param rhs Vec3 + +---@return Vec3 +function Mat4:project_point3(_self,rhs) end + +---@package +---@param _self Mat4 + +---@param rhs number + +---@return Mat4 +function Mat4:div_scalar(_self,rhs) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@return Mat4 +function Mat4.perspective_infinite_lh(fov_y_radians,aspect_ratio,z_near) end + +---@package +---@param left number + +---@param right number + +---@param bottom number + +---@param top number + +---@param near number + +---@param far number + +---@return Mat4 +function Mat4.orthographic_lh(left,right,bottom,top,near,far) end + +---@package +---@param left number + +---@param right number + +---@param bottom number + +---@param top number + +---@param near number + +---@param far number + +---@return Mat4 +function Mat4.orthographic_rh_gl(left,right,bottom,top,near,far) end + +---@package +---@param _self Mat4 + +---@return Mat4 +function Mat4:neg(_self) end + +---@package +---@param scale Vec3 + +---@return Mat4 +function Mat4.from_scale(scale) end + +---@package +---@param _self Mat4 + +---@return Mat4 +function Mat4:transpose(_self) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@param z_far number + +---@return Mat4 +function Mat4.perspective_rh_gl(fov_y_radians,aspect_ratio,z_near,z_far) end + +---@package +---@param _self Mat4 + +---@param rhs Vec3A + +---@return Vec3A +function Mat4:project_point3a(_self,rhs) end + +---@package +---@param translation Vec3 + +---@return Mat4 +function Mat4.from_translation(translation) end + +---@package +---@param _self Mat4 + +---@param rhs Mat4 + +---@return boolean +function Mat4:eq(_self,rhs) end + +---@package +---@param m Mat3 + +---@return Mat4 +function Mat4.from_mat3(m) end + +---@package +---@param _self Mat4 + +---@param rhs Vec3A + +---@return Vec3A +function Mat4:transform_point3a(_self,rhs) end + +---@package +---@param m Mat3A + +---@return Mat4 +function Mat4.from_mat3a(m) end + +---@package +---@param order EulerRot + +---@param a number + +---@param b number + +---@param c number + +---@return Mat4 +function Mat4.from_euler(order,a,b,c) end + +---@package +---@param _self Mat4 + +---@param rhs number + +---@return Mat4 +function Mat4:mul_scalar(_self,rhs) end + +---@package +---@param _self Mat4 + +---@param rhs Mat4 + +---@return Mat4 +function Mat4:add_mat4(_self,rhs) end + +---@package +---@param _self Mat4 + +---@return boolean +function Mat4:is_nan(_self) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@return Mat4 +function Mat4.perspective_infinite_reverse_rh(fov_y_radians,aspect_ratio,z_near) end + +---@package +---@param _self Mat4 + +---@param rhs Affine3A + +---@return Mat4 +function Mat4:mul(_self,rhs) end + +---@package +---@param _self Mat4 + +---@param rhs Mat4 + +---@return Mat4 +function Mat4:sub(_self,rhs) end + +---@package +---@param _self Mat4 + +---@return Mat4 +function Mat4:clone(_self) end + +---@package +---@param _self Mat4 + +---@param index integer + +---@return Vec4 +function Mat4:row(_self,index) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@param z_far number + +---@return Mat4 +function Mat4.perspective_lh(fov_y_radians,aspect_ratio,z_near,z_far) end + +---@package +---@param _self Mat4 + +---@param rhs Vec4 + +---@return Vec4 +function Mat4:mul_vec4(_self,rhs) end + +---@package +---@param rotation Quat + +---@return Mat4 +function Mat4.from_quat(rotation) end + +---@package +---@param _self Mat4 + +---@return boolean +function Mat4:is_finite(_self) end + +---@package +---@param _self Mat4 + +---@return Mat4 +function Mat4:inverse(_self) end + +---@package +---@param angle number + +---@return Mat4 +function Mat4.from_rotation_z(angle) end + +---@package +---@param _self Mat4 + +---@return number +function Mat4:determinant(_self) end + +---@package +---@param eye Vec3 + +---@param center Vec3 + +---@param up Vec3 + +---@return Mat4 +function Mat4.look_at_rh(eye,center,up) end + +---@package +---@param _self Mat4 + +---@return number[] +function Mat4:to_cols_array(_self) end + +---@package +---@param _self Mat4 + +---@param rhs Mat4 + +---@param max_abs_diff number + +---@return boolean +function Mat4:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self Mat4 + +---@param rhs Vec3 + +---@return Vec3 +function Mat4:transform_vector3(_self,rhs) end + +---@package +---@param x_axis Vec4 + +---@param y_axis Vec4 + +---@param z_axis Vec4 + +---@param w_axis Vec4 + +---@return Mat4 +function Mat4.from_cols(x_axis,y_axis,z_axis,w_axis) end + +---@package +---@param scale Vec3 + +---@param rotation Quat + +---@param translation Vec3 + +---@return Mat4 +function Mat4.from_scale_rotation_translation(scale,rotation,translation) end + +---@package +---@param _self Mat4 + +---@return number[][] +function Mat4:to_cols_array_2d(_self) end + +---@package +---@param _self Mat4 + +---@return DMat4 +function Mat4:as_dmat4(_self) end + +---@package +---@param _self Mat4 + +---@param rhs Vec3 + +---@return Vec3 +function Mat4:transform_point3(_self,rhs) end + +---@package +---@param axis Vec3 + +---@param angle number + +---@return Mat4 +function Mat4.from_axis_angle(axis,angle) end + +---@package +---@param eye Vec3 + +---@param center Vec3 + +---@param up Vec3 + +---@return Mat4 +function Mat4.look_at_lh(eye,center,up) end + +---@package +---@param _self Mat4 + +---@param rhs Mat4 + +---@return Mat4 +function Mat4:mul_mat4(_self,rhs) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@return Mat4 +function Mat4.perspective_infinite_rh(fov_y_radians,aspect_ratio,z_near) end + +---@package +---@param fov_y_radians number + +---@param aspect_ratio number + +---@param z_near number + +---@return Mat4 +function Mat4.perspective_infinite_reverse_lh(fov_y_radians,aspect_ratio,z_near) end + +---@package +---@param _self Mat4 + +---@param rhs number + +---@return Mat4 +function Mat4:div(_self,rhs) end + +---@package +---@param _self Mat4 + +---@return Mat4 +function Mat4:abs(_self) end + +---@package +---@param angle number + +---@return Mat4 +function Mat4.from_rotation_y(angle) end + + +---@class Quat + +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number +Quat = {} + +---@package +---@param _self Quat + +---@param rhs Quat + +---@return Quat +function Quat:sub(_self,rhs) end + +---@package +---@param _self Quat + +---@return boolean +function Quat:is_normalized(_self) end + +---@package +---@param _self Quat + +---@return Quat +function Quat:conjugate(_self) end + +---@package +---@param euler EulerRot + +---@param a number + +---@param b number + +---@param c number + +---@return Quat +function Quat.from_euler(euler,a,b,c) end + +---@package +---@param _self Quat + +---@return Quat +function Quat:inverse(_self) end + +---@package +---@param _self Quat + +---@return DQuat +function Quat:as_dquat(_self) end + +---@package +---@param angle number + +---@return Quat +function Quat.from_rotation_y(angle) end + +---@package +---@param _self Quat + +---@return number[] +function Quat:to_array(_self) end + +---@package +---@param _self Quat + +---@return boolean +function Quat:is_nan(_self) end + +---@package +---@param _self Quat + +---@param rhs Quat + +---@return Quat +function Quat:add(_self,rhs) end + +---@package +---@param x number + +---@param y number + +---@param z number + +---@param w number + +---@return Quat +function Quat.from_xyzw(x,y,z,w) end + +---@package +---@param angle number + +---@return Quat +function Quat.from_rotation_z(angle) end + +---@package +---@param _self Quat + +---@param rhs Quat + +---@return number +function Quat:angle_between(_self,rhs) end + +---@package +---@param _self Quat + +---@param _end Quat + +---@param s number + +---@return Quat +function Quat:slerp(_self,_end,s) end + +---@package +---@param from Vec3 + +---@param to Vec3 + +---@return Quat +function Quat.from_rotation_arc_colinear(from,to) end + +---@package +---@param _self Quat + +---@return Quat +function Quat:neg(_self) end + +---@package +---@param _self Quat + +---@param rhs Quat + +---@param max_angle number + +---@return Quat +function Quat:rotate_towards(_self,rhs,max_angle) end + +---@package +---@param angle number + +---@return Quat +function Quat.from_rotation_x(angle) end + +---@package +---@param _self Quat + +---@param rhs Vec3 + +---@return Vec3 +function Quat:mul_vec3(_self,rhs) end + +---@package +---@param mat Mat3A + +---@return Quat +function Quat.from_mat3a(mat) end + +---@package +---@param _self Quat + +---@return Vec3 +function Quat:to_scaled_axis(_self) end + +---@package +---@param from Vec2 + +---@param to Vec2 + +---@return Quat +function Quat.from_rotation_arc_2d(from,to) end + +---@package +---@param _self Quat + +---@param rhs Quat + +---@return Quat +function Quat:mul(_self,rhs) end + +---@package +---@param _self Quat + +---@param rhs number + +---@return Quat +function Quat:div(_self,rhs) end + +---@package +---@param _self Quat + +---@param rhs Quat + +---@return number +function Quat:dot(_self,rhs) end + +---@package +---@param from Vec3 + +---@param to Vec3 + +---@return Quat +function Quat.from_rotation_arc(from,to) end + +---@package +---@param _self Quat + +---@param rhs Quat + +---@return boolean +function Quat:eq(_self,rhs) end + +---@package +---@param _self Quat + +---@param order EulerRot + +---@return [number, number, number] +function Quat:to_euler(_self,order) end + +---@package +---@param _self Quat + +---@param _end Quat + +---@param s number + +---@return Quat +function Quat:lerp(_self,_end,s) end + +---@package +---@param _self Quat + +---@param rhs Quat + +---@param max_abs_diff number + +---@return boolean +function Quat:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self Quat + +---@return number +function Quat:length_squared(_self) end + +---@package +---@param _self Quat + +---@param rhs Vec3A + +---@return Vec3A +function Quat:mul_vec3a(_self,rhs) end + +---@package +---@param a number[] + +---@return Quat +function Quat.from_array(a) end + +---@package +---@param v Vec4 + +---@return Quat +function Quat.from_vec4(v) end + +---@package +---@param a Affine3A + +---@return Quat +function Quat.from_affine3(a) end + +---@package +---@param _self Quat + +---@return Quat +function Quat:clone(_self) end + +---@package +---@param _self Quat + +---@return Vec3 +function Quat:xyz(_self) end + +---@package +---@param mat Mat4 + +---@return Quat +function Quat.from_mat4(mat) end + +---@package +---@param axis Vec3 + +---@param angle number + +---@return Quat +function Quat.from_axis_angle(axis,angle) end + +---@package +---@param _self Quat + +---@return Quat +function Quat:normalize(_self) end + +---@package +---@param _self Quat + +---@return boolean +function Quat:is_finite(_self) end + +---@package +---@param _self Quat + +---@return boolean +function Quat:is_near_identity(_self) end + +---@package +---@param mat Mat3 + +---@return Quat +function Quat.from_mat3(mat) end + +---@package +---@param _self Quat + +---@return number +function Quat:length(_self) end + +---@package +---@param v Vec3 + +---@return Quat +function Quat.from_scaled_axis(v) end + +---@package +---@param _self Quat + +---@param rhs Quat + +---@return Quat +function Quat:mul_quat(_self,rhs) end + +---@package +---@param _self Quat + +---@return number +function Quat:length_recip(_self) end + + +---@class U16Vec2 + +---@field x ? integer +---@field y ? integer +U16Vec2 = {} + +---@package +---@param _self U16Vec2 + +---@return integer[] +function U16Vec2:to_array(_self) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:min(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return BVec2 +function U16Vec2:cmplt(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return integer +function U16Vec2:min_element(_self) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:wrapping_mul(_self,rhs) end + +---@package +---@param mask BVec2 + +---@param if_true U16Vec2 + +---@param if_false U16Vec2 + +---@return U16Vec2 +function U16Vec2.select(mask,if_true,if_false) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:max(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return [] +function U16Vec2:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:saturating_add(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:dot_into_vec(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return U64Vec2 +function U16Vec2:as_u64vec2(_self) end + +---@package +---@param _self U16Vec2 + +---@return DVec2 +function U16Vec2:as_dvec2(_self) end + +---@package +---@param _self U16Vec2 + +---@return I64Vec2 +function U16Vec2:as_i64vec2(_self) end + +---@package +---@param _self U16Vec2 + +---@return U8Vec2 +function U16Vec2:as_u8vec2(_self) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return BVec2 +function U16Vec2:cmple(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return U16Vec2 +function U16Vec2:clone(_self) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:div(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return UVec2 +function U16Vec2:as_uvec2(_self) end + +---@package +---@param _self U16Vec2 + +---@param rhs I16Vec2 + +---@return U16Vec2 +function U16Vec2:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return BVec2 +function U16Vec2:cmpeq(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param x integer + +---@return U16Vec2 +function U16Vec2:with_x(_self,x) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return BVec2 +function U16Vec2:cmpne(_self,rhs) end + +---@package +---@param v integer + +---@return U16Vec2 +function U16Vec2.splat(v) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return BVec2 +function U16Vec2:cmpgt(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return integer +function U16Vec2:dot(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:wrapping_sub(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:wrapping_div(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:saturating_sub(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:mul(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param other U16Vec2 + +---@return boolean +function U16Vec2:eq(_self,other) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return BVec2 +function U16Vec2:cmpge(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return integer +function U16Vec2:element_product(_self) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:saturating_mul(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return IVec2 +function U16Vec2:as_ivec2(_self) end + +---@package +---@param _self U16Vec2 + +---@param rhs I16Vec2 + +---@return U16Vec2 +function U16Vec2:saturating_add_signed(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return integer +function U16Vec2:length_squared(_self) end + +---@package +---@param _self U16Vec2 + +---@param z integer + +---@return U16Vec3 +function U16Vec2:extend(_self,z) end + +---@package +---@param _self U16Vec2 + +---@return integer +function U16Vec2:element_sum(_self) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:saturating_div(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return integer +function U16Vec2:max_element(_self) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:rem(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@param y integer + +---@return U16Vec2 +function U16Vec2:with_y(_self,y) end + +---@package +---@param x integer + +---@param y integer + +---@return U16Vec2 +function U16Vec2.new(x,y) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:sub(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return I8Vec2 +function U16Vec2:as_i8vec2(_self) end + +---@package +---@param _self U16Vec2 + +---@param min U16Vec2 + +---@param max U16Vec2 + +---@return U16Vec2 +function U16Vec2:clamp(_self,min,max) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:wrapping_add(_self,rhs) end + +---@package +---@param _self U16Vec2 + +---@return Vec2 +function U16Vec2:as_vec2(_self) end + +---@package +---@param _self U16Vec2 + +---@return I16Vec2 +function U16Vec2:as_i16vec2(_self) end + +---@package +---@param a integer[] + +---@return U16Vec2 +function U16Vec2.from_array(a) end + +---@package +---@param _self U16Vec2 + +---@param rhs U16Vec2 + +---@return U16Vec2 +function U16Vec2:add(_self,rhs) end + + +---@class U16Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +U16Vec3 = {} + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:add(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return [] +function U16Vec3:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:saturating_mul(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return integer +function U16Vec3:element_product(_self) end + +---@package +---@param _self U16Vec3 + +---@return Vec3A +function U16Vec3:as_vec3a(_self) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:wrapping_add(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return integer +function U16Vec3:element_sum(_self) end + +---@package +---@param _self U16Vec3 + +---@return U8Vec3 +function U16Vec3:as_u8vec3(_self) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return BVec3 +function U16Vec3:cmpge(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return integer +function U16Vec3:min_element(_self) end + +---@package +---@param _self U16Vec3 + +---@param w integer + +---@return U16Vec4 +function U16Vec3:extend(_self,w) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:div(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:max(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return I16Vec3 +function U16Vec3:as_i16vec3(_self) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:dot_into_vec(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return integer +function U16Vec3:dot(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return integer +function U16Vec3:length_squared(_self) end + +---@package +---@param _self U16Vec3 + +---@return U64Vec3 +function U16Vec3:as_u64vec3(_self) end + +---@package +---@param _self U16Vec3 + +---@return U16Vec3 +function U16Vec3:clone(_self) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:saturating_add(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return U16Vec2 +function U16Vec3:truncate(_self) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return BVec3 +function U16Vec3:cmpeq(_self,rhs) end + +---@package +---@param a integer[] + +---@return U16Vec3 +function U16Vec3.from_array(a) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:wrapping_div(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:saturating_div(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return BVec3 +function U16Vec3:cmple(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs I16Vec3 + +---@return U16Vec3 +function U16Vec3:saturating_add_signed(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:mul(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return IVec3 +function U16Vec3:as_ivec3(_self) end + +---@package +---@param _self U16Vec3 + +---@return I8Vec3 +function U16Vec3:as_i8vec3(_self) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:sub(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return BVec3 +function U16Vec3:cmplt(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param other U16Vec3 + +---@return boolean +function U16Vec3:eq(_self,other) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:rem(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:min(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return DVec3 +function U16Vec3:as_dvec3(_self) end + +---@package +---@param _self U16Vec3 + +---@return integer +function U16Vec3:max_element(_self) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@return U16Vec3 +function U16Vec3.new(x,y,z) end + +---@package +---@param _self U16Vec3 + +---@param y integer + +---@return U16Vec3 +function U16Vec3:with_y(_self,y) end + +---@package +---@param v integer + +---@return U16Vec3 +function U16Vec3.splat(v) end + +---@package +---@param mask BVec3 + +---@param if_true U16Vec3 + +---@param if_false U16Vec3 + +---@return U16Vec3 +function U16Vec3.select(mask,if_true,if_false) end + +---@package +---@param _self U16Vec3 + +---@param x integer + +---@return U16Vec3 +function U16Vec3:with_x(_self,x) end + +---@package +---@param _self U16Vec3 + +---@param min U16Vec3 + +---@param max U16Vec3 + +---@return U16Vec3 +function U16Vec3:clamp(_self,min,max) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:wrapping_sub(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return integer[] +function U16Vec3:to_array(_self) end + +---@package +---@param _self U16Vec3 + +---@return Vec3 +function U16Vec3:as_vec3(_self) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return BVec3 +function U16Vec3:cmpgt(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:cross(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:saturating_sub(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return BVec3 +function U16Vec3:cmpne(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return UVec3 +function U16Vec3:as_uvec3(_self) end + +---@package +---@param _self U16Vec3 + +---@param rhs I16Vec3 + +---@return U16Vec3 +function U16Vec3:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@return I64Vec3 +function U16Vec3:as_i64vec3(_self) end + +---@package +---@param _self U16Vec3 + +---@param rhs U16Vec3 + +---@return U16Vec3 +function U16Vec3:wrapping_mul(_self,rhs) end + +---@package +---@param _self U16Vec3 + +---@param z integer + +---@return U16Vec3 +function U16Vec3:with_z(_self,z) end + + +---@class U16Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer +U16Vec4 = {} + +---@package +---@param _self U16Vec4 + +---@param y integer + +---@return U16Vec4 +function U16Vec4:with_y(_self,y) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:add(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return integer +function U16Vec4:element_product(_self) end + +---@package +---@param _self U16Vec4 + +---@param w integer + +---@return U16Vec4 +function U16Vec4:with_w(_self,w) end + +---@package +---@param _self U16Vec4 + +---@return I8Vec4 +function U16Vec4:as_i8vec4(_self) end + +---@package +---@param _self U16Vec4 + +---@param rhs I16Vec4 + +---@return U16Vec4 +function U16Vec4:saturating_add_signed(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return BVec4 +function U16Vec4:cmpeq(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return integer +function U16Vec4:min_element(_self) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return BVec4 +function U16Vec4:cmplt(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return integer[] +function U16Vec4:to_array(_self) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:saturating_mul(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return U64Vec4 +function U16Vec4:as_u64vec4(_self) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:wrapping_mul(_self,rhs) end + +---@package +---@param mask BVec4 + +---@param if_true U16Vec4 + +---@param if_false U16Vec4 + +---@return U16Vec4 +function U16Vec4.select(mask,if_true,if_false) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return BVec4 +function U16Vec4:cmpge(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:wrapping_sub(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:saturating_sub(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:wrapping_div(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return integer +function U16Vec4:length_squared(_self) end + +---@package +---@param _self U16Vec4 + +---@return U8Vec4 +function U16Vec4:as_u8vec4(_self) end + +---@package +---@param _self U16Vec4 + +---@return I16Vec4 +function U16Vec4:as_i16vec4(_self) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return integer +function U16Vec4:dot(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return U16Vec3 +function U16Vec4:truncate(_self) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return BVec4 +function U16Vec4:cmpne(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@param min U16Vec4 + +---@param max U16Vec4 + +---@return U16Vec4 +function U16Vec4:clamp(_self,min,max) end + +---@package +---@param v integer + +---@return U16Vec4 +function U16Vec4.splat(v) end + +---@package +---@param _self U16Vec4 + +---@param rhs I16Vec4 + +---@return U16Vec4 +function U16Vec4:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return IVec4 +function U16Vec4:as_ivec4(_self) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:dot_into_vec(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return integer +function U16Vec4:element_sum(_self) end + +---@package +---@param _self U16Vec4 + +---@param x integer + +---@return U16Vec4 +function U16Vec4:with_x(_self,x) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:div(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return UVec4 +function U16Vec4:as_uvec4(_self) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return BVec4 +function U16Vec4:cmple(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return Vec4 +function U16Vec4:as_vec4(_self) end + +---@package +---@param _self U16Vec4 + +---@return U16Vec4 +function U16Vec4:clone(_self) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:mul(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@param z integer + +---@return U16Vec4 +function U16Vec4:with_z(_self,z) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:saturating_div(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return I64Vec4 +function U16Vec4:as_i64vec4(_self) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:rem(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return BVec4 +function U16Vec4:cmpgt(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@param w integer + +---@return U16Vec4 +function U16Vec4.new(x,y,z,w) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:saturating_add(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:max(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:min(_self,rhs) end + +---@package +---@param a integer[] + +---@return U16Vec4 +function U16Vec4.from_array(a) end + +---@package +---@param _self U16Vec4 + +---@return [] +function U16Vec4:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self U16Vec4 + +---@return integer +function U16Vec4:max_element(_self) end + +---@package +---@param _self U16Vec4 + +---@param other U16Vec4 + +---@return boolean +function U16Vec4:eq(_self,other) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:sub(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@param rhs U16Vec4 + +---@return U16Vec4 +function U16Vec4:wrapping_add(_self,rhs) end + +---@package +---@param _self U16Vec4 + +---@return DVec4 +function U16Vec4:as_dvec4(_self) end + + +---@class U64Vec2 + +---@field x ? integer +---@field y ? integer +U64Vec2 = {} + +---@package +---@param _self U64Vec2 + +---@return U64Vec2 +function U64Vec2:clone(_self) end + +---@package +---@param _self U64Vec2 + +---@param z integer + +---@return U64Vec3 +function U64Vec2:extend(_self,z) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:wrapping_sub(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:sub(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:min(_self,rhs) end + +---@package +---@param a integer[] + +---@return U64Vec2 +function U64Vec2.from_array(a) end + +---@package +---@param _self U64Vec2 + +---@return I8Vec2 +function U64Vec2:as_i8vec2(_self) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return BVec2 +function U64Vec2:cmple(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@return DVec2 +function U64Vec2:as_dvec2(_self) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:rem(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:wrapping_mul(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs I64Vec2 + +---@return U64Vec2 +function U64Vec2:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@return [] +function U64Vec2:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self U64Vec2 + +---@param x integer + +---@return U64Vec2 +function U64Vec2:with_x(_self,x) end + +---@package +---@param _self U64Vec2 + +---@return integer[] +function U64Vec2:to_array(_self) end + +---@package +---@param _self U64Vec2 + +---@return integer +function U64Vec2:length_squared(_self) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:max(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:div(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param other U64Vec2 + +---@return boolean +function U64Vec2:eq(_self,other) end + +---@package +---@param _self U64Vec2 + +---@param min U64Vec2 + +---@param max U64Vec2 + +---@return U64Vec2 +function U64Vec2:clamp(_self,min,max) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return BVec2 +function U64Vec2:cmplt(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@return U8Vec2 +function U64Vec2:as_u8vec2(_self) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:wrapping_div(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@return Vec2 +function U64Vec2:as_vec2(_self) end + +---@package +---@param _self U64Vec2 + +---@return integer +function U64Vec2:element_sum(_self) end + +---@package +---@param _self U64Vec2 + +---@return I64Vec2 +function U64Vec2:as_i64vec2(_self) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return BVec2 +function U64Vec2:cmpeq(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return BVec2 +function U64Vec2:cmpge(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:dot_into_vec(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@return integer +function U64Vec2:element_product(_self) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:add(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@return UVec2 +function U64Vec2:as_uvec2(_self) end + +---@package +---@param _self U64Vec2 + +---@return integer +function U64Vec2:min_element(_self) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:saturating_div(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@return I16Vec2 +function U64Vec2:as_i16vec2(_self) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:mul(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:saturating_add(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs I64Vec2 + +---@return U64Vec2 +function U64Vec2:saturating_add_signed(_self,rhs) end + +---@package +---@param mask BVec2 + +---@param if_true U64Vec2 + +---@param if_false U64Vec2 + +---@return U64Vec2 +function U64Vec2.select(mask,if_true,if_false) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return BVec2 +function U64Vec2:cmpne(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:wrapping_add(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@return U16Vec2 +function U64Vec2:as_u16vec2(_self) end + +---@package +---@param v integer + +---@return U64Vec2 +function U64Vec2.splat(v) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return integer +function U64Vec2:dot(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return BVec2 +function U64Vec2:cmpgt(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@return U64Vec2 +function U64Vec2.new(x,y) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:saturating_sub(_self,rhs) end + +---@package +---@param _self U64Vec2 + +---@param y integer + +---@return U64Vec2 +function U64Vec2:with_y(_self,y) end + +---@package +---@param _self U64Vec2 + +---@return IVec2 +function U64Vec2:as_ivec2(_self) end + +---@package +---@param _self U64Vec2 + +---@return integer +function U64Vec2:max_element(_self) end + +---@package +---@param _self U64Vec2 + +---@param rhs U64Vec2 + +---@return U64Vec2 +function U64Vec2:saturating_mul(_self,rhs) end + + +---@class U64Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +U64Vec3 = {} + +---@package +---@param _self U64Vec3 + +---@return IVec3 +function U64Vec3:as_ivec3(_self) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:wrapping_div(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return BVec3 +function U64Vec3:cmpge(_self,rhs) end + +---@package +---@param a integer[] + +---@return U64Vec3 +function U64Vec3.from_array(a) end + +---@package +---@param _self U64Vec3 + +---@return I8Vec3 +function U64Vec3:as_i8vec3(_self) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:saturating_div(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:min(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param w integer + +---@return U64Vec4 +function U64Vec3:extend(_self,w) end + +---@package +---@param _self U64Vec3 + +---@return U64Vec2 +function U64Vec3:truncate(_self) end + +---@package +---@param _self U64Vec3 + +---@return Vec3 +function U64Vec3:as_vec3(_self) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:wrapping_mul(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:add(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param z integer + +---@return U64Vec3 +function U64Vec3:with_z(_self,z) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:rem(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs I64Vec3 + +---@return U64Vec3 +function U64Vec3:saturating_add_signed(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:saturating_add(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:saturating_sub(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@return integer +function U64Vec3:max_element(_self) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:saturating_mul(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@return I16Vec3 +function U64Vec3:as_i16vec3(_self) end + +---@package +---@param v integer + +---@return U64Vec3 +function U64Vec3.splat(v) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:wrapping_sub(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:cross(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@return U64Vec3 +function U64Vec3:clone(_self) end + +---@package +---@param _self U64Vec3 + +---@return DVec3 +function U64Vec3:as_dvec3(_self) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:mul(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return integer +function U64Vec3:dot(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@return U8Vec3 +function U64Vec3:as_u8vec3(_self) end + +---@package +---@param _self U64Vec3 + +---@return I64Vec3 +function U64Vec3:as_i64vec3(_self) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return BVec3 +function U64Vec3:cmpgt(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@return [] +function U64Vec3:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self U64Vec3 + +---@return U16Vec3 +function U64Vec3:as_u16vec3(_self) end + +---@package +---@param _self U64Vec3 + +---@param min U64Vec3 + +---@param max U64Vec3 + +---@return U64Vec3 +function U64Vec3:clamp(_self,min,max) end + +---@package +---@param _self U64Vec3 + +---@param y integer + +---@return U64Vec3 +function U64Vec3:with_y(_self,y) end + +---@package +---@param _self U64Vec3 + +---@param x integer + +---@return U64Vec3 +function U64Vec3:with_x(_self,x) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return BVec3 +function U64Vec3:cmpeq(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param other U64Vec3 + +---@return boolean +function U64Vec3:eq(_self,other) end + +---@package +---@param _self U64Vec3 + +---@return integer +function U64Vec3:length_squared(_self) end + +---@package +---@param _self U64Vec3 + +---@return Vec3A +function U64Vec3:as_vec3a(_self) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return BVec3 +function U64Vec3:cmplt(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:div(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@return integer +function U64Vec3:element_product(_self) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:dot_into_vec(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:sub(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return BVec3 +function U64Vec3:cmpne(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@return U64Vec3 +function U64Vec3.new(x,y,z) end + +---@package +---@param _self U64Vec3 + +---@return integer +function U64Vec3:min_element(_self) end + +---@package +---@param _self U64Vec3 + +---@return UVec3 +function U64Vec3:as_uvec3(_self) end + +---@package +---@param _self U64Vec3 + +---@param rhs I64Vec3 + +---@return U64Vec3 +function U64Vec3:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:max(_self,rhs) end + +---@package +---@param mask BVec3 + +---@param if_true U64Vec3 + +---@param if_false U64Vec3 + +---@return U64Vec3 +function U64Vec3.select(mask,if_true,if_false) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return BVec3 +function U64Vec3:cmple(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@return integer +function U64Vec3:element_sum(_self) end + +---@package +---@param _self U64Vec3 + +---@param rhs U64Vec3 + +---@return U64Vec3 +function U64Vec3:wrapping_add(_self,rhs) end + +---@package +---@param _self U64Vec3 + +---@return integer[] +function U64Vec3:to_array(_self) end + + +---@class U64Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer +U64Vec4 = {} + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:rem(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@return [] +function U64Vec4:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self U64Vec4 + +---@return UVec4 +function U64Vec4:as_uvec4(_self) end + +---@package +---@param _self U64Vec4 + +---@return integer +function U64Vec4:max_element(_self) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:saturating_mul(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:saturating_div(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:wrapping_sub(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return BVec4 +function U64Vec4:cmpeq(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:sub(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return BVec4 +function U64Vec4:cmpge(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@return integer +function U64Vec4:length_squared(_self) end + +---@package +---@param _self U64Vec4 + +---@param z integer + +---@return U64Vec4 +function U64Vec4:with_z(_self,z) end + +---@package +---@param _self U64Vec4 + +---@return integer +function U64Vec4:element_product(_self) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return BVec4 +function U64Vec4:cmpgt(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@param w integer + +---@return U64Vec4 +function U64Vec4.new(x,y,z,w) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:dot_into_vec(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@return DVec4 +function U64Vec4:as_dvec4(_self) end + +---@package +---@param _self U64Vec4 + +---@return I8Vec4 +function U64Vec4:as_i8vec4(_self) end + +---@package +---@param _self U64Vec4 + +---@param rhs I64Vec4 + +---@return U64Vec4 +function U64Vec4:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@return U64Vec3 +function U64Vec4:truncate(_self) end + +---@package +---@param _self U64Vec4 + +---@return I64Vec4 +function U64Vec4:as_i64vec4(_self) end + +---@package +---@param mask BVec4 + +---@param if_true U64Vec4 + +---@param if_false U64Vec4 + +---@return U64Vec4 +function U64Vec4.select(mask,if_true,if_false) end + +---@package +---@param _self U64Vec4 + +---@return integer +function U64Vec4:min_element(_self) end + +---@package +---@param _self U64Vec4 + +---@return integer +function U64Vec4:element_sum(_self) end + +---@package +---@param _self U64Vec4 + +---@param x integer + +---@return U64Vec4 +function U64Vec4:with_x(_self,x) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return BVec4 +function U64Vec4:cmple(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:saturating_add(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:div(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@return Vec4 +function U64Vec4:as_vec4(_self) end + +---@package +---@param _self U64Vec4 + +---@return IVec4 +function U64Vec4:as_ivec4(_self) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:wrapping_div(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:saturating_sub(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@return integer[] +function U64Vec4:to_array(_self) end + +---@package +---@param _self U64Vec4 + +---@param rhs I64Vec4 + +---@return U64Vec4 +function U64Vec4:saturating_add_signed(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param w integer + +---@return U64Vec4 +function U64Vec4:with_w(_self,w) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:min(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param y integer + +---@return U64Vec4 +function U64Vec4:with_y(_self,y) end + +---@package +---@param a integer[] + +---@return U64Vec4 +function U64Vec4.from_array(a) end + +---@package +---@param _self U64Vec4 + +---@return U64Vec4 +function U64Vec4:clone(_self) end + +---@package +---@param v integer + +---@return U64Vec4 +function U64Vec4.splat(v) end + +---@package +---@param _self U64Vec4 + +---@return U8Vec4 +function U64Vec4:as_u8vec4(_self) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:add(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return BVec4 +function U64Vec4:cmplt(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param other U64Vec4 + +---@return boolean +function U64Vec4:eq(_self,other) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:wrapping_mul(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@return I16Vec4 +function U64Vec4:as_i16vec4(_self) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:wrapping_add(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return integer +function U64Vec4:dot(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:max(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return BVec4 +function U64Vec4:cmpne(_self,rhs) end + +---@package +---@param _self U64Vec4 + +---@return U16Vec4 +function U64Vec4:as_u16vec4(_self) end + +---@package +---@param _self U64Vec4 + +---@param min U64Vec4 + +---@param max U64Vec4 + +---@return U64Vec4 +function U64Vec4:clamp(_self,min,max) end + +---@package +---@param _self U64Vec4 + +---@param rhs U64Vec4 + +---@return U64Vec4 +function U64Vec4:mul(_self,rhs) end + + +---@class U8Vec2 + +---@field x ? integer +---@field y ? integer +U8Vec2 = {} + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:rem(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param y integer + +---@return U8Vec2 +function U8Vec2:with_y(_self,y) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:min(_self,rhs) end + +---@package +---@param v integer + +---@return U8Vec2 +function U8Vec2.splat(v) end + +---@package +---@param _self U8Vec2 + +---@param x integer + +---@return U8Vec2 +function U8Vec2:with_x(_self,x) end + +---@package +---@param _self U8Vec2 + +---@param rhs I8Vec2 + +---@return U8Vec2 +function U8Vec2:saturating_add_signed(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:saturating_sub(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return BVec2 +function U8Vec2:cmpne(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param min U8Vec2 + +---@param max U8Vec2 + +---@return U8Vec2 +function U8Vec2:clamp(_self,min,max) end + +---@package +---@param _self U8Vec2 + +---@param other U8Vec2 + +---@return boolean +function U8Vec2:eq(_self,other) end + +---@package +---@param _self U8Vec2 + +---@return U8Vec2 +function U8Vec2:clone(_self) end + +---@package +---@param _self U8Vec2 + +---@return UVec2 +function U8Vec2:as_uvec2(_self) end + +---@package +---@param _self U8Vec2 + +---@return integer +function U8Vec2:min_element(_self) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:saturating_mul(_self,rhs) end + +---@package +---@param a integer[] + +---@return U8Vec2 +function U8Vec2.from_array(a) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:wrapping_sub(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return BVec2 +function U8Vec2:cmpgt(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:saturating_add(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@return [] +function U8Vec2:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self U8Vec2 + +---@param z integer + +---@return U8Vec3 +function U8Vec2:extend(_self,z) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return BVec2 +function U8Vec2:cmpge(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:saturating_div(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:wrapping_mul(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@return integer +function U8Vec2:element_product(_self) end + +---@package +---@param _self U8Vec2 + +---@return I16Vec2 +function U8Vec2:as_i16vec2(_self) end + +---@package +---@param _self U8Vec2 + +---@return IVec2 +function U8Vec2:as_ivec2(_self) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return integer +function U8Vec2:dot(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@return U8Vec2 +function U8Vec2.new(x,y) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:sub(_self,rhs) end + +---@package +---@param mask BVec2 + +---@param if_true U8Vec2 + +---@param if_false U8Vec2 + +---@return U8Vec2 +function U8Vec2.select(mask,if_true,if_false) end + +---@package +---@param _self U8Vec2 + +---@return integer[] +function U8Vec2:to_array(_self) end + +---@package +---@param _self U8Vec2 + +---@return integer +function U8Vec2:max_element(_self) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:wrapping_add(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:mul(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@return Vec2 +function U8Vec2:as_vec2(_self) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:wrapping_div(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@return I64Vec2 +function U8Vec2:as_i64vec2(_self) end + +---@package +---@param _self U8Vec2 + +---@return DVec2 +function U8Vec2:as_dvec2(_self) end + +---@package +---@param _self U8Vec2 + +---@return integer +function U8Vec2:length_squared(_self) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:max(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return BVec2 +function U8Vec2:cmpeq(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@return U16Vec2 +function U8Vec2:as_u16vec2(_self) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:div(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:add(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return BVec2 +function U8Vec2:cmple(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return BVec2 +function U8Vec2:cmplt(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@return integer +function U8Vec2:element_sum(_self) end + +---@package +---@param _self U8Vec2 + +---@return I8Vec2 +function U8Vec2:as_i8vec2(_self) end + +---@package +---@param _self U8Vec2 + +---@param rhs U8Vec2 + +---@return U8Vec2 +function U8Vec2:dot_into_vec(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@param rhs I8Vec2 + +---@return U8Vec2 +function U8Vec2:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self U8Vec2 + +---@return U64Vec2 +function U8Vec2:as_u64vec2(_self) end + + +---@class U8Vec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +U8Vec3 = {} + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return BVec3 +function U8Vec3:cmpne(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@return IVec3 +function U8Vec3:as_ivec3(_self) end + +---@package +---@param _self U8Vec3 + +---@return integer +function U8Vec3:element_product(_self) end + +---@package +---@param _self U8Vec3 + +---@return integer[] +function U8Vec3:to_array(_self) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return BVec3 +function U8Vec3:cmpgt(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:saturating_sub(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:saturating_mul(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:mul(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return integer +function U8Vec3:dot(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@return UVec3 +function U8Vec3:as_uvec3(_self) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:add(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:rem(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@return integer +function U8Vec3:element_sum(_self) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:saturating_add(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param y integer + +---@return U8Vec3 +function U8Vec3:with_y(_self,y) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:cross(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@return Vec3A +function U8Vec3:as_vec3a(_self) end + +---@package +---@param _self U8Vec3 + +---@param x integer + +---@return U8Vec3 +function U8Vec3:with_x(_self,x) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:div(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@return U8Vec3 +function U8Vec3:clone(_self) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:wrapping_add(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@return integer +function U8Vec3:min_element(_self) end + +---@package +---@param _self U8Vec3 + +---@return DVec3 +function U8Vec3:as_dvec3(_self) end + +---@package +---@param _self U8Vec3 + +---@param z integer + +---@return U8Vec3 +function U8Vec3:with_z(_self,z) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@return U8Vec3 +function U8Vec3.new(x,y,z) end + +---@package +---@param _self U8Vec3 + +---@return I8Vec3 +function U8Vec3:as_i8vec3(_self) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:wrapping_mul(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@return Vec3 +function U8Vec3:as_vec3(_self) end + +---@package +---@param _self U8Vec3 + +---@return U16Vec3 +function U8Vec3:as_u16vec3(_self) end + +---@package +---@param _self U8Vec3 + +---@return integer +function U8Vec3:max_element(_self) end + +---@package +---@param _self U8Vec3 + +---@param rhs I8Vec3 + +---@return U8Vec3 +function U8Vec3:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@return U8Vec2 +function U8Vec3:truncate(_self) end + +---@package +---@param mask BVec3 + +---@param if_true U8Vec3 + +---@param if_false U8Vec3 + +---@return U8Vec3 +function U8Vec3.select(mask,if_true,if_false) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:wrapping_div(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@return U64Vec3 +function U8Vec3:as_u64vec3(_self) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:saturating_div(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param w integer + +---@return U8Vec4 +function U8Vec3:extend(_self,w) end + +---@package +---@param _self U8Vec3 + +---@return integer +function U8Vec3:length_squared(_self) end + +---@package +---@param _self U8Vec3 + +---@return I64Vec3 +function U8Vec3:as_i64vec3(_self) end + +---@package +---@param _self U8Vec3 + +---@return [] +function U8Vec3:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self U8Vec3 + +---@param rhs I8Vec3 + +---@return U8Vec3 +function U8Vec3:saturating_add_signed(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:dot_into_vec(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return BVec3 +function U8Vec3:cmplt(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@return I16Vec3 +function U8Vec3:as_i16vec3(_self) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:wrapping_sub(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param other U8Vec3 + +---@return boolean +function U8Vec3:eq(_self,other) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return BVec3 +function U8Vec3:cmpge(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:max(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return BVec3 +function U8Vec3:cmple(_self,rhs) end + +---@package +---@param v integer + +---@return U8Vec3 +function U8Vec3.splat(v) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return BVec3 +function U8Vec3:cmpeq(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:min(_self,rhs) end + +---@package +---@param a integer[] + +---@return U8Vec3 +function U8Vec3.from_array(a) end + +---@package +---@param _self U8Vec3 + +---@param rhs U8Vec3 + +---@return U8Vec3 +function U8Vec3:sub(_self,rhs) end + +---@package +---@param _self U8Vec3 + +---@param min U8Vec3 + +---@param max U8Vec3 + +---@return U8Vec3 +function U8Vec3:clamp(_self,min,max) end + + +---@class U8Vec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer +U8Vec4 = {} + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:max(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:saturating_mul(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return U16Vec4 +function U8Vec4:as_u16vec4(_self) end + +---@package +---@param _self U8Vec4 + +---@param other U8Vec4 + +---@return boolean +function U8Vec4:eq(_self,other) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:add(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param rhs I8Vec4 + +---@return U8Vec4 +function U8Vec4:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:dot_into_vec(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return I8Vec4 +function U8Vec4:as_i8vec4(_self) end + +---@package +---@param _self U8Vec4 + +---@return U8Vec3 +function U8Vec4:truncate(_self) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:div(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@param w integer + +---@return U8Vec4 +function U8Vec4.new(x,y,z,w) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return BVec4 +function U8Vec4:cmpeq(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return integer[] +function U8Vec4:to_array(_self) end + +---@package +---@param _self U8Vec4 + +---@param x integer + +---@return U8Vec4 +function U8Vec4:with_x(_self,x) end + +---@package +---@param _self U8Vec4 + +---@param rhs I8Vec4 + +---@return U8Vec4 +function U8Vec4:saturating_add_signed(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return BVec4 +function U8Vec4:cmpgt(_self,rhs) end + +---@package +---@param a integer[] + +---@return U8Vec4 +function U8Vec4.from_array(a) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:saturating_sub(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return IVec4 +function U8Vec4:as_ivec4(_self) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:wrapping_add(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param min U8Vec4 + +---@param max U8Vec4 + +---@return U8Vec4 +function U8Vec4:clamp(_self,min,max) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:wrapping_mul(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param z integer + +---@return U8Vec4 +function U8Vec4:with_z(_self,z) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:wrapping_sub(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return integer +function U8Vec4:element_product(_self) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return integer +function U8Vec4:dot(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:wrapping_div(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return UVec4 +function U8Vec4:as_uvec4(_self) end + +---@package +---@param _self U8Vec4 + +---@return integer +function U8Vec4:element_sum(_self) end + +---@package +---@param v integer + +---@return U8Vec4 +function U8Vec4.splat(v) end + +---@package +---@param mask BVec4 + +---@param if_true U8Vec4 + +---@param if_false U8Vec4 + +---@return U8Vec4 +function U8Vec4.select(mask,if_true,if_false) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:sub(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return integer +function U8Vec4:max_element(_self) end + +---@package +---@param _self U8Vec4 + +---@param w integer + +---@return U8Vec4 +function U8Vec4:with_w(_self,w) end + +---@package +---@param _self U8Vec4 + +---@return integer +function U8Vec4:min_element(_self) end + +---@package +---@param _self U8Vec4 + +---@return [] +function U8Vec4:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return BVec4 +function U8Vec4:cmpge(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:mul(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return BVec4 +function U8Vec4:cmpne(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return BVec4 +function U8Vec4:cmplt(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return integer +function U8Vec4:length_squared(_self) end + +---@package +---@param _self U8Vec4 + +---@return I64Vec4 +function U8Vec4:as_i64vec4(_self) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:saturating_add(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:rem(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return U8Vec4 +function U8Vec4:clone(_self) end + +---@package +---@param _self U8Vec4 + +---@param y integer + +---@return U8Vec4 +function U8Vec4:with_y(_self,y) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:min(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return DVec4 +function U8Vec4:as_dvec4(_self) end + +---@package +---@param _self U8Vec4 + +---@return Vec4 +function U8Vec4:as_vec4(_self) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return U8Vec4 +function U8Vec4:saturating_div(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return I16Vec4 +function U8Vec4:as_i16vec4(_self) end + +---@package +---@param _self U8Vec4 + +---@param rhs U8Vec4 + +---@return BVec4 +function U8Vec4:cmple(_self,rhs) end + +---@package +---@param _self U8Vec4 + +---@return U64Vec4 +function U8Vec4:as_u64vec4(_self) end + + +---@class UVec2 + +---@field x ? integer +---@field y ? integer +UVec2 = {} + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return BVec2 +function UVec2:cmpeq(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param rhs IVec2 + +---@return UVec2 +function UVec2:saturating_add_signed(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:mul(_self,rhs) end + +---@package +---@param _self UVec2 + +---@return U64Vec2 +function UVec2:as_u64vec2(_self) end + +---@package +---@param _self UVec2 + +---@return I16Vec2 +function UVec2:as_i16vec2(_self) end + +---@package +---@param _self UVec2 + +---@return integer +function UVec2:element_sum(_self) end + +---@package +---@param _self UVec2 + +---@return integer +function UVec2:length_squared(_self) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:wrapping_add(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return BVec2 +function UVec2:cmplt(_self,rhs) end + +---@package +---@param _self UVec2 + +---@return U16Vec2 +function UVec2:as_u16vec2(_self) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:saturating_div(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return BVec2 +function UVec2:cmple(_self,rhs) end + +---@package +---@param v integer + +---@return UVec2 +function UVec2.splat(v) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:sub(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return BVec2 +function UVec2:cmpgt(_self,rhs) end + +---@package +---@param _self UVec2 + +---@return integer[] +function UVec2:to_array(_self) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:max(_self,rhs) end + +---@package +---@param _self UVec2 + +---@return integer +function UVec2:max_element(_self) end + +---@package +---@param _self UVec2 + +---@param rhs IVec2 + +---@return UVec2 +function UVec2:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param y integer + +---@return UVec2 +function UVec2:with_y(_self,y) end + +---@package +---@param _self UVec2 + +---@return IVec2 +function UVec2:as_ivec2(_self) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return BVec2 +function UVec2:cmpge(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:wrapping_sub(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:min(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:div(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:add(_self,rhs) end + +---@package +---@param _self UVec2 + +---@return U8Vec2 +function UVec2:as_u8vec2(_self) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:saturating_add(_self,rhs) end + +---@package +---@param _self UVec2 + +---@return Vec2 +function UVec2:as_vec2(_self) end + +---@package +---@param _self UVec2 + +---@return DVec2 +function UVec2:as_dvec2(_self) end + +---@package +---@param _self UVec2 + +---@return integer +function UVec2:element_product(_self) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:wrapping_div(_self,rhs) end + +---@package +---@param a integer[] + +---@return UVec2 +function UVec2.from_array(a) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return BVec2 +function UVec2:cmpne(_self,rhs) end + +---@package +---@param _self UVec2 + +---@return I8Vec2 +function UVec2:as_i8vec2(_self) end + +---@package +---@param _self UVec2 + +---@return integer +function UVec2:min_element(_self) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:dot_into_vec(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param other UVec2 + +---@return boolean +function UVec2:eq(_self,other) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:saturating_mul(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param z integer + +---@return UVec3 +function UVec2:extend(_self,z) end + +---@package +---@param _self UVec2 + +---@return I64Vec2 +function UVec2:as_i64vec2(_self) end + +---@package +---@param mask BVec2 + +---@param if_true UVec2 + +---@param if_false UVec2 + +---@return UVec2 +function UVec2.select(mask,if_true,if_false) end + +---@package +---@param _self UVec2 + +---@param x integer + +---@return UVec2 +function UVec2:with_x(_self,x) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return integer +function UVec2:dot(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@return UVec2 +function UVec2.new(x,y) end + +---@package +---@param _self UVec2 + +---@return [] +function UVec2:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:rem(_self,rhs) end + +---@package +---@param _self UVec2 + +---@param min UVec2 + +---@param max UVec2 + +---@return UVec2 +function UVec2:clamp(_self,min,max) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:wrapping_mul(_self,rhs) end + +---@package +---@param _self UVec2 + +---@return UVec2 +function UVec2:clone(_self) end + +---@package +---@param _self UVec2 + +---@param rhs UVec2 + +---@return UVec2 +function UVec2:saturating_sub(_self,rhs) end + + +---@class UVec3 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +UVec3 = {} + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:rem(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param z integer + +---@return UVec3 +function UVec3:with_z(_self,z) end + +---@package +---@param _self UVec3 + +---@return Vec3 +function UVec3:as_vec3(_self) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:saturating_div(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:saturating_sub(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return I64Vec3 +function UVec3:as_i64vec3(_self) end + +---@package +---@param _self UVec3 + +---@return integer +function UVec3:min_element(_self) end + +---@package +---@param _self UVec3 + +---@return Vec3A +function UVec3:as_vec3a(_self) end + +---@package +---@param _self UVec3 + +---@param min UVec3 + +---@param max UVec3 + +---@return UVec3 +function UVec3:clamp(_self,min,max) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:saturating_mul(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return BVec3 +function UVec3:cmple(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:dot_into_vec(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return DVec3 +function UVec3:as_dvec3(_self) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return BVec3 +function UVec3:cmplt(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:min(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:sub(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return IVec3 +function UVec3:as_ivec3(_self) end + +---@package +---@param _self UVec3 + +---@return UVec2 +function UVec3:truncate(_self) end + +---@package +---@param _self UVec3 + +---@return I8Vec3 +function UVec3:as_i8vec3(_self) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return BVec3 +function UVec3:cmpgt(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return integer[] +function UVec3:to_array(_self) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return BVec3 +function UVec3:cmpne(_self,rhs) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@return UVec3 +function UVec3.new(x,y,z) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:max(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return integer +function UVec3:length_squared(_self) end + +---@package +---@param _self UVec3 + +---@param rhs IVec3 + +---@return UVec3 +function UVec3:saturating_add_signed(_self,rhs) end + +---@package +---@param a integer[] + +---@return UVec3 +function UVec3.from_array(a) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:cross(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param other UVec3 + +---@return boolean +function UVec3:eq(_self,other) end + +---@package +---@param _self UVec3 + +---@param w integer + +---@return UVec4 +function UVec3:extend(_self,w) end + +---@package +---@param _self UVec3 + +---@param x integer + +---@return UVec3 +function UVec3:with_x(_self,x) end + +---@package +---@param _self UVec3 + +---@return integer +function UVec3:max_element(_self) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:wrapping_div(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return U64Vec3 +function UVec3:as_u64vec3(_self) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:wrapping_add(_self,rhs) end + +---@package +---@param v integer + +---@return UVec3 +function UVec3.splat(v) end + +---@package +---@param _self UVec3 + +---@return U16Vec3 +function UVec3:as_u16vec3(_self) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:wrapping_sub(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param y integer + +---@return UVec3 +function UVec3:with_y(_self,y) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return BVec3 +function UVec3:cmpeq(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return [] +function UVec3:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return integer +function UVec3:dot(_self,rhs) end + +---@package +---@param mask BVec3 + +---@param if_true UVec3 + +---@param if_false UVec3 + +---@return UVec3 +function UVec3.select(mask,if_true,if_false) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:mul(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:saturating_add(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return BVec3 +function UVec3:cmpge(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return integer +function UVec3:element_sum(_self) end + +---@package +---@param _self UVec3 + +---@param rhs IVec3 + +---@return UVec3 +function UVec3:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return I16Vec3 +function UVec3:as_i16vec3(_self) end + +---@package +---@param _self UVec3 + +---@return U8Vec3 +function UVec3:as_u8vec3(_self) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:add(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return UVec3 +function UVec3:clone(_self) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:div(_self,rhs) end + +---@package +---@param _self UVec3 + +---@param rhs UVec3 + +---@return UVec3 +function UVec3:wrapping_mul(_self,rhs) end + +---@package +---@param _self UVec3 + +---@return integer +function UVec3:element_product(_self) end + + +---@class UVec4 + +---@field x ? integer +---@field y ? integer +---@field z ? integer +---@field w ? integer +UVec4 = {} + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return BVec4 +function UVec4:cmpne(_self,rhs) end + +---@package +---@param _self UVec4 + +---@return integer +function UVec4:element_product(_self) end + +---@package +---@param x integer + +---@param y integer + +---@param z integer + +---@param w integer + +---@return UVec4 +function UVec4.new(x,y,z,w) end + +---@package +---@param _self UVec4 + +---@return UVec4 +function UVec4:clone(_self) end + +---@package +---@param _self UVec4 + +---@param rhs IVec4 + +---@return UVec4 +function UVec4:wrapping_add_signed(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return BVec4 +function UVec4:cmple(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param x integer + +---@return UVec4 +function UVec4:with_x(_self,x) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return BVec4 +function UVec4:cmpge(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param other UVec4 + +---@return boolean +function UVec4:eq(_self,other) end + +---@package +---@param _self UVec4 + +---@return IVec4 +function UVec4:as_ivec4(_self) end + +---@package +---@param _self UVec4 + +---@return integer +function UVec4:length_squared(_self) end + +---@package +---@param _self UVec4 + +---@return U16Vec4 +function UVec4:as_u16vec4(_self) end + +---@package +---@param _self UVec4 + +---@param min UVec4 + +---@param max UVec4 + +---@return UVec4 +function UVec4:clamp(_self,min,max) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:min(_self,rhs) end + +---@package +---@param _self UVec4 + +---@return DVec4 +function UVec4:as_dvec4(_self) end + +---@package +---@param _self UVec4 + +---@return [] +function UVec4:assert_receiver_is_total_eq(_self) end + +---@package +---@param _self UVec4 + +---@return U64Vec4 +function UVec4:as_u64vec4(_self) end + +---@package +---@param _self UVec4 + +---@return I8Vec4 +function UVec4:as_i8vec4(_self) end + +---@package +---@param v integer + +---@return UVec4 +function UVec4.splat(v) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:saturating_mul(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param w integer + +---@return UVec4 +function UVec4:with_w(_self,w) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:sub(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:wrapping_div(_self,rhs) end + +---@package +---@param a integer[] + +---@return UVec4 +function UVec4.from_array(a) end + +---@package +---@param _self UVec4 + +---@return integer +function UVec4:element_sum(_self) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return BVec4 +function UVec4:cmpgt(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param z integer + +---@return UVec4 +function UVec4:with_z(_self,z) end + +---@package +---@param _self UVec4 + +---@return integer +function UVec4:max_element(_self) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:max(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:rem(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:mul(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return BVec4 +function UVec4:cmpeq(_self,rhs) end + +---@package +---@param _self UVec4 + +---@return I64Vec4 +function UVec4:as_i64vec4(_self) end + +---@package +---@param _self UVec4 + +---@return integer[] +function UVec4:to_array(_self) end + +---@package +---@param _self UVec4 + +---@return I16Vec4 +function UVec4:as_i16vec4(_self) end + +---@package +---@param _self UVec4 + +---@return integer +function UVec4:min_element(_self) end + +---@package +---@param _self UVec4 + +---@return Vec4 +function UVec4:as_vec4(_self) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return integer +function UVec4:dot(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:wrapping_mul(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:saturating_sub(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs IVec4 + +---@return UVec4 +function UVec4:saturating_add_signed(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:dot_into_vec(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:div(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:saturating_div(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param y integer + +---@return UVec4 +function UVec4:with_y(_self,y) end + +---@package +---@param mask BVec4 + +---@param if_true UVec4 + +---@param if_false UVec4 + +---@return UVec4 +function UVec4.select(mask,if_true,if_false) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return BVec4 +function UVec4:cmplt(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:saturating_add(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:wrapping_sub(_self,rhs) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:add(_self,rhs) end + +---@package +---@param _self UVec4 + +---@return UVec3 +function UVec4:truncate(_self) end + +---@package +---@param _self UVec4 + +---@return U8Vec4 +function UVec4:as_u8vec4(_self) end + +---@package +---@param _self UVec4 + +---@param rhs UVec4 + +---@return UVec4 +function UVec4:wrapping_add(_self,rhs) end + + +---@class Vec2 + +---@field x ? number +---@field y ? number +Vec2 = {} + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return BVec2 +function Vec2:cmpeq(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:fract(_self) end + +---@package +---@param _self Vec2 + +---@param max number + +---@return Vec2 +function Vec2:clamp_length_max(_self,max) end + +---@package +---@param a number[] + +---@return Vec2 +function Vec2.from_array(a) end + +---@package +---@param _self Vec2 + +---@return integer +function Vec2:is_negative_bitmask(_self) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:clone(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:project_onto_normalized(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:div(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param min Vec2 + +---@param max Vec2 + +---@return Vec2 +function Vec2:clamp(_self,min,max) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@param s number + +---@return Vec2 +function Vec2:lerp(_self,rhs,s) end + +---@package +---@param _self Vec2 + +---@return number +function Vec2:element_sum(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:div_euclid(_self,rhs) end + +---@package +---@param angle number + +---@return Vec2 +function Vec2.from_angle(angle) end + +---@package +---@param _self Vec2 + +---@param normal Vec2 + +---@param eta number + +---@return Vec2 +function Vec2:refract(_self,normal,eta) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@param max_angle number + +---@return Vec2 +function Vec2:rotate_towards(_self,rhs,max_angle) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:mul(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return U64Vec2 +function Vec2:as_u64vec2(_self) end + +---@package +---@param _self Vec2 + +---@return number +function Vec2:max_element(_self) end + +---@package +---@param _self Vec2 + +---@param other Vec2 + +---@return boolean +function Vec2:eq(_self,other) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return BVec2 +function Vec2:cmpgt(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:trunc(_self) end + +---@package +---@param _self Vec2 + +---@return BVec2 +function Vec2:is_nan_mask(_self) end + +---@package +---@param _self Vec2 + +---@param y number + +---@return Vec2 +function Vec2:with_y(_self,y) end + +---@package +---@param _self Vec2 + +---@param x number + +---@return Vec2 +function Vec2:with_x(_self,x) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:recip(_self) end + +---@package +---@param _self Vec2 + +---@return boolean +function Vec2:is_nan(_self) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:signum(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:project_onto(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param z number + +---@return Vec3 +function Vec2:extend(_self,z) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:midpoint(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return U8Vec2 +function Vec2:as_u8vec2(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return number +function Vec2:dot(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return UVec2 +function Vec2:as_uvec2(_self) end + +---@package +---@param _self Vec2 + +---@return BVec2 +function Vec2:is_finite_mask(_self) end + +---@package +---@param _self Vec2 + +---@param n number + +---@return Vec2 +function Vec2:powf(_self,n) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:normalize_or_zero(_self) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:round(_self) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:perp(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return BVec2 +function Vec2:cmplt(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param min number + +---@param max number + +---@return Vec2 +function Vec2:clamp_length(_self,min,max) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return BVec2 +function Vec2:cmpge(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return number +function Vec2:to_angle(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:rotate(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:dot_into_vec(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:exp(_self) end + +---@package +---@param _self Vec2 + +---@param normal Vec2 + +---@return Vec2 +function Vec2:reflect(_self,normal) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:add(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:neg(_self) end + +---@package +---@param mask BVec2 + +---@param if_true Vec2 + +---@param if_false Vec2 + +---@return Vec2 +function Vec2.select(mask,if_true,if_false) end + +---@package +---@param _self Vec2 + +---@return U16Vec2 +function Vec2:as_u16vec2(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:rem_euclid(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return number +function Vec2:distance_squared(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:ceil(_self) end + +---@package +---@param _self Vec2 + +---@return number +function Vec2:length_squared(_self) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:floor(_self) end + +---@package +---@param _self Vec2 + +---@return DVec2 +function Vec2:as_dvec2(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:max(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return boolean +function Vec2:is_finite(_self) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:abs(_self) end + +---@package +---@param _self Vec2 + +---@param a Vec2 + +---@param b Vec2 + +---@return Vec2 +function Vec2:mul_add(_self,a,b) end + +---@package +---@param _self Vec2 + +---@param fallback Vec2 + +---@return Vec2 +function Vec2:normalize_or(_self,fallback) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:reject_from(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return number +function Vec2:angle_to(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return I16Vec2 +function Vec2:as_i16vec2(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return number +function Vec2:distance(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:fract_gl(_self) end + +---@package +---@param _self Vec2 + +---@return number +function Vec2:length_recip(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:sub(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return number +function Vec2:angle_between(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return number +function Vec2:min_element(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:copysign(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:rem(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return IVec2 +function Vec2:as_ivec2(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return BVec2 +function Vec2:cmpne(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:reject_from_normalized(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return boolean +function Vec2:is_normalized(_self) end + +---@package +---@param _self Vec2 + +---@return number +function Vec2:element_product(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@param d number + +---@return Vec2 +function Vec2:move_towards(_self,rhs,d) end + +---@package +---@param v number + +---@return Vec2 +function Vec2.splat(v) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return Vec2 +function Vec2:min(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return I8Vec2 +function Vec2:as_i8vec2(_self) end + +---@package +---@param _self Vec2 + +---@return I64Vec2 +function Vec2:as_i64vec2(_self) end + +---@package +---@param _self Vec2 + +---@return number +function Vec2:length(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return number +function Vec2:perp_dot(_self,rhs) end + +---@package +---@param _self Vec2 + +---@param min number + +---@return Vec2 +function Vec2:clamp_length_min(_self,min) end + +---@package +---@param x number + +---@param y number + +---@return Vec2 +function Vec2.new(x,y) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@param max_abs_diff number + +---@return boolean +function Vec2:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self Vec2 + +---@return Vec2 +function Vec2:normalize(_self) end + +---@package +---@param _self Vec2 + +---@param rhs Vec2 + +---@return BVec2 +function Vec2:cmple(_self,rhs) end + +---@package +---@param _self Vec2 + +---@return number[] +function Vec2:to_array(_self) end + + +---@class Vec3 + +---@field x ? number +---@field y ? number +---@field z ? number +Vec3 = {} + +---@package +---@param _self Vec3 + +---@return integer +function Vec3:is_negative_bitmask(_self) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:clone(_self) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:ceil(_self) end + +---@package +---@param _self Vec3 + +---@return number +function Vec3:max_element(_self) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:min(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param a Vec3 + +---@param b Vec3 + +---@return Vec3 +function Vec3:mul_add(_self,a,b) end + +---@package +---@param v number + +---@return Vec3 +function Vec3.splat(v) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:any_orthogonal_vector(_self) end + +---@package +---@param _self Vec3 + +---@return I64Vec3 +function Vec3:as_i64vec3(_self) end + +---@package +---@param _self Vec3 + +---@return boolean +function Vec3:is_finite(_self) end + +---@package +---@param _self Vec3 + +---@return number[] +function Vec3:to_array(_self) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:copysign(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@param s number + +---@return Vec3 +function Vec3:lerp(_self,rhs,s) end + +---@package +---@param _self Vec3 + +---@param fallback Vec3 + +---@return Vec3 +function Vec3:normalize_or(_self,fallback) end + +---@package +---@param _self Vec3 + +---@return number +function Vec3:length(_self) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:floor(_self) end + +---@package +---@param _self Vec3 + +---@return number +function Vec3:element_product(_self) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:normalize_or_zero(_self) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@param d number + +---@return Vec3 +function Vec3:move_towards(_self,rhs,d) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return number +function Vec3:angle_between(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return BVec3 +function Vec3:cmplt(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:mul(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@param max_abs_diff number + +---@return boolean +function Vec3:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return BVec3 +function Vec3:cmpge(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param min number + +---@param max number + +---@return Vec3 +function Vec3:clamp_length(_self,min,max) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:div(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:midpoint(_self,rhs) end + +---@package +---@param _self Vec3 + +---@return boolean +function Vec3:is_nan(_self) end + +---@package +---@param _self Vec3 + +---@return BVec3 +function Vec3:is_nan_mask(_self) end + +---@package +---@param _self Vec3 + +---@return U64Vec3 +function Vec3:as_u64vec3(_self) end + +---@package +---@param _self Vec3 + +---@return BVec3 +function Vec3:is_finite_mask(_self) end + +---@package +---@param _self Vec3 + +---@param w number + +---@return Vec4 +function Vec3:extend(_self,w) end + +---@package +---@param _self Vec3 + +---@param normal Vec3 + +---@param eta number + +---@return Vec3 +function Vec3:refract(_self,normal,eta) end + +---@package +---@param _self Vec3 + +---@param min number + +---@return Vec3 +function Vec3:clamp_length_min(_self,min) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:rem_euclid(_self,rhs) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:neg(_self) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:fract(_self) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return number +function Vec3:distance(_self,rhs) end + +---@package +---@param _self Vec3 + +---@return UVec3 +function Vec3:as_uvec3(_self) end + +---@package +---@param _self Vec3 + +---@return boolean +function Vec3:is_normalized(_self) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:cross(_self,rhs) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:signum(_self) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:fract_gl(_self) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:recip(_self) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:sub(_self,rhs) end + +---@package +---@param a number[] + +---@return Vec3 +function Vec3.from_array(a) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:round(_self) end + +---@package +---@param x number + +---@param y number + +---@param z number + +---@return Vec3 +function Vec3.new(x,y,z) end + +---@package +---@param _self Vec3 + +---@return U16Vec3 +function Vec3:as_u16vec3(_self) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:add(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return BVec3 +function Vec3:cmpne(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return BVec3 +function Vec3:cmpgt(_self,rhs) end + +---@package +---@param _self Vec3 + +---@return number +function Vec3:length_squared(_self) end + +---@package +---@param _self Vec3 + +---@return number +function Vec3:element_sum(_self) end + +---@package +---@param _self Vec3 + +---@return IVec3 +function Vec3:as_ivec3(_self) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:any_orthonormal_vector(_self) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return BVec3 +function Vec3:cmple(_self,rhs) end + +---@package +---@param mask BVec3 + +---@param if_true Vec3 + +---@param if_false Vec3 + +---@return Vec3 +function Vec3.select(mask,if_true,if_false) end + +---@package +---@param _self Vec3 + +---@param max number + +---@return Vec3 +function Vec3:clamp_length_max(_self,max) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:trunc(_self) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:max(_self,rhs) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:abs(_self) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:exp(_self) end + +---@package +---@param _self Vec3 + +---@return number +function Vec3:length_recip(_self) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 +---@return Vec3 +function Vec3:rem(_self,rhs) end ----@class ButtonState ---- The current "press" state of an element +---@package +---@param _self Vec3 +---@param normal Vec3 ----@class AxisSettings ---- Settings for a [`GamepadAxis`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for an axis.--- Values that are higher than `livezone_upperbound` will be rounded up to 1.0.--- Values that are lower than `livezone_lowerbound` will be rounded down to -1.0.--- Values that are in-between `deadzone_lowerbound` and `deadzone_upperbound` will be rounded to 0.0.--- Otherwise, values will be linearly rescaled to fit into the sensitivity range.--- For example, a value that is one fourth of the way from `deadzone_upperbound` to `livezone_upperbound` will be scaled to 0.25.--- --- The valid range is `[-1.0, 1.0]`. ----@field livezone_upperbound ? number ----@field deadzone_upperbound ? number ----@field deadzone_lowerbound ? number ----@field livezone_lowerbound ? number ----@field threshold ? number +---@return Vec3 +function Vec3:reflect(_self,normal) end +---@package +---@param _self Vec3 ----@class ButtonAxisSettings ---- Settings for a [`GamepadButton`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for a button axis.--- --- ## Logic--- --- - Values that are higher than or equal to `high` will be rounded to 1.0.--- - Values that are lower than or equal to `low` will be rounded to 0.0.--- - Otherwise, values will not be rounded.--- --- The valid range is from 0.0 to 1.0, inclusive. ----@field high ? number ----@field low ? number ----@field threshold ? number +---@param rhs Vec3 +---@return Vec3 +function Vec3:project_onto_normalized(_self,rhs) end ----@class ButtonSettings ---- Manages settings for gamepad buttons.--- --- It is used inside [`GamepadSettings`] to define the threshold for a [`GamepadButton`]--- to be considered pressed or released. A button is considered pressed if the `press_threshold`--- value is surpassed and released if the `release_threshold` value is undercut.--- --- Allowed values: `0.0 <= ``release_threshold`` <= ``press_threshold`` <= 1.0` ----@field press_threshold ? number ----@field release_threshold ? number +---@package +---@param _self Vec3 +---@param rhs Vec3 ----@class Gamepad ---- Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`].--- --- An entity with this component is spawned automatically after [`GamepadConnectionEvent`]--- and updated by [`gamepad_event_processing_system`].--- --- See also [`GamepadSettings`] for configuration.--- --- # Examples--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadAxis, GamepadButton};--- # use bevy_ecs::system::Query;--- # use bevy_ecs::name::Name;--- #--- fn gamepad_usage_system(gamepads: Query<(&Name, &Gamepad)>) {--- for (name, gamepad) in &gamepads {--- println!("{name}");--- --- if gamepad.just_pressed(GamepadButton::North) {--- println!("{} just pressed North", name)--- }--- --- if let Some(left_stick_x) = gamepad.get(GamepadAxis::LeftStickX) {--- println!("left stick X: {}", left_stick_x)--- }--- }--- }--- ``` ----@field vendor_id ? Option ----@field product_id ? Option ----@field digital ? ButtonInput ----@field analog ? Axis +---@return BVec3 +function Vec3:cmpeq(_self,rhs) end +---@package +---@param _self Vec3 ----@class GamepadAxis ---- Represents gamepad input types that are mapped in the range [-1.0, 1.0].--- --- ## Usage--- --- This is used to determine which axis has changed its value when receiving a--- gamepad axis event. It is also used in the [`Gamepad`] component. +---@return I16Vec3 +function Vec3:as_i16vec3(_self) end +---@package +---@param _self Vec3 ----@class GamepadAxisChangedEvent ---- [`GamepadAxis`] event triggered by an analog state change. ----@field entity ? Entity ----@field axis ? GamepadAxis ----@field value ? number +---@param other Vec3 +---@return boolean +function Vec3:eq(_self,other) end ----@class GamepadButton ---- Represents gamepad input types that are mapped in the range [0.0, 1.0].--- --- ## Usage--- --- This is used to determine which button has changed its value when receiving gamepad button events.--- It is also used in the [`Gamepad`] component. +---@package +---@param _self Vec3 +---@return I8Vec3 +function Vec3:as_i8vec3(_self) end ----@class GamepadButtonChangedEvent ---- [`GamepadButton`] event triggered by an analog state change. ----@field entity ? Entity ----@field button ? GamepadButton ----@field state ? ButtonState ----@field value ? number +---@package +---@param _self Vec3 +---@param rhs Vec3 ----@class GamepadButtonStateChangedEvent ---- [`GamepadButton`] event triggered by a digital state change. ----@field entity ? Entity ----@field button ? GamepadButton ----@field state ? ButtonState +---@return number +function Vec3:dot(_self,rhs) end +---@package +---@param _self Vec3 ----@class GamepadConnection ---- The connection status of a gamepad. +---@param rhs Vec3 +---@return Vec3 +function Vec3:reject_from_normalized(_self,rhs) end ----@class GamepadConnectionEvent ---- A Gamepad connection event. Created when a connection to a gamepad--- is established and when a gamepad is disconnected. ----@field gamepad ? Entity ----@field connection ? GamepadConnection +---@package +---@param _self Vec3 +---@param rhs Vec3 ----@class GamepadEvent ---- A gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`GamepadButtonChangedEvent`] and [`GamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event is produced by `bevy_input`. +---@return Vec3 +function Vec3:div_euclid(_self,rhs) end +---@package +---@param _self Vec3 ----@class GamepadInput ---- Encapsulation over [`GamepadAxis`] and [`GamepadButton`]. +---@param y number +---@return Vec3 +function Vec3:with_y(_self,y) end ----@class GamepadRumbleIntensity ---- The intensity at which a gamepad's force-feedback motors may rumble. ----@field strong_motor ? number ----@field weak_motor ? number +---@package +---@param _self Vec3 +---@return U8Vec3 +function Vec3:as_u8vec3(_self) end ----@class GamepadRumbleRequest ---- An event that controls force-feedback rumbling of a [`Gamepad`] [`entity`](Entity).--- --- # Notes--- --- Does nothing if the gamepad or platform does not support rumble.--- --- # Example--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadRumbleRequest, GamepadRumbleIntensity};--- # use bevy_ecs::prelude::{EventWriter, Res, Query, Entity, With};--- # use core::time::Duration;--- fn rumble_gamepad_system(--- mut rumble_requests: EventWriter,--- gamepads: Query>,--- ) {--- for entity in gamepads.iter() {--- rumble_requests.write(GamepadRumbleRequest::Add {--- gamepad: entity,--- intensity: GamepadRumbleIntensity::MAX,--- duration: Duration::from_secs_f32(0.5),--- });--- }--- }--- ``` +---@package +---@param _self Vec3 +---@return number +function Vec3:min_element(_self) end ----@class GamepadSettings ---- Gamepad settings component.--- --- ## Usage--- --- It is used to create a `bevy` component that stores the settings of [`GamepadButton`] and [`GamepadAxis`] in [`Gamepad`].--- If no user defined [`ButtonSettings`], [`AxisSettings`], or [`ButtonAxisSettings`]--- are defined, the default settings of each are used as a fallback accordingly.--- --- ## Note--- --- The [`GamepadSettings`] are used to determine when raw gamepad events--- should register. Events that don't meet the change thresholds defined in [`GamepadSettings`]--- will not register. To modify these settings, mutate the corresponding component. ----@field default_button_settings ? ButtonSettings ----@field default_axis_settings ? AxisSettings ----@field default_button_axis_settings ? ButtonAxisSettings ----@field button_settings ? HashMap ----@field axis_settings ? HashMap ----@field button_axis_settings ? HashMap +---@package +---@param _self Vec3 +---@param rhs Vec3 ----@class RawGamepadAxisChangedEvent ---- [`GamepadAxis`] changed event unfiltered by [`GamepadSettings`]. ----@field gamepad ? Entity ----@field axis ? GamepadAxis ----@field value ? number +---@return Vec3 +function Vec3:project_onto(_self,rhs) end +---@package +---@param _self Vec3 ----@class RawGamepadButtonChangedEvent ---- [`GamepadButton`] changed event unfiltered by [`GamepadSettings`]. ----@field gamepad ? Entity ----@field button ? GamepadButton ----@field value ? number +---@param rhs Vec3 +---@return Vec3 +function Vec3:reject_from(_self,rhs) end ----@class RawGamepadEvent ---- A raw gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`RawGamepadButtonChangedEvent`] and [`RawGamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event type is used by `bevy_input` to feed its components. +---@package +---@param _self Vec3 +---@param z number ----@class DoubleTapGesture ---- Double tap gesture.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +---@return Vec3 +function Vec3:with_z(_self,z) end +---@package +---@param _self Vec3 ----@class PanGesture ---- Pan gesture.--- --- ## Platform-specific--- --- - On **`iOS`**, must be enabled first ----@field [1] ? Vec2 +---@return DVec3 +function Vec3:as_dvec3(_self) end + +---@package +---@param _self Vec3 + +---@return Vec3 +function Vec3:normalize(_self) end + +---@package +---@param _self Vec3 + +---@param n number + +---@return Vec3 +function Vec3:powf(_self,n) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return number +function Vec3:distance_squared(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param x number + +---@return Vec3 +function Vec3:with_x(_self,x) end + +---@package +---@param _self Vec3 + +---@param rhs Vec3 + +---@return Vec3 +function Vec3:dot_into_vec(_self,rhs) end + +---@package +---@param _self Vec3 + +---@param min Vec3 + +---@param max Vec3 + +---@return Vec3 +function Vec3:clamp(_self,min,max) end + +---@package +---@param _self Vec3 + +---@return Vec2 +function Vec3:truncate(_self) end + + +---@class Vec3A + +---@field x ? number +---@field y ? number +---@field z ? number +Vec3A = {} + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:copysign(_self,rhs) end + +---@package +---@param _self Vec3A + +---@return boolean +function Vec3A:is_finite(_self) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return number +function Vec3A:distance(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param min number + +---@return Vec3A +function Vec3A:clamp_length_min(_self,min) end + +---@package +---@param _self Vec3A + +---@return boolean +function Vec3A:is_normalized(_self) end + +---@package +---@param _self Vec3A + +---@return I64Vec3 +function Vec3A:as_i64vec3(_self) end + +---@package +---@param _self Vec3A + +---@return number[] +function Vec3A:to_array(_self) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:reject_from_normalized(_self,rhs) end + +---@package +---@param _self Vec3A + +---@return Vec3A +function Vec3A:round(_self) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:max(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:midpoint(_self,rhs) end + +---@package +---@param _self Vec3A + +---@return BVec3A +function Vec3A:is_finite_mask(_self) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:project_onto_normalized(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param y number + +---@return Vec3A +function Vec3A:with_y(_self,y) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:div_euclid(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param fallback Vec3A + +---@return Vec3A +function Vec3A:normalize_or(_self,fallback) end + +---@package +---@param _self Vec3A + +---@return Vec3A +function Vec3A:fract(_self) end + +---@package +---@param _self Vec3A + +---@return U16Vec3 +function Vec3A:as_u16vec3(_self) end + +---@package +---@param a number[] + +---@return Vec3A +function Vec3A.from_array(a) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@param d number + +---@return Vec3A +function Vec3A:move_towards(_self,rhs,d) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:cross(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return BVec3A +function Vec3A:cmpne(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return BVec3A +function Vec3A:cmpeq(_self,rhs) end + +---@package +---@param _self Vec3A + +---@return Vec3A +function Vec3A:neg(_self) end + +---@package +---@param _self Vec3A + +---@param normal Vec3A + +---@param eta number + +---@return Vec3A +function Vec3A:refract(_self,normal,eta) end + +---@package +---@param _self Vec3A + +---@return DVec3 +function Vec3A:as_dvec3(_self) end + +---@package +---@param _self Vec3A + +---@return Vec3A +function Vec3A:signum(_self) end + +---@package +---@param _self Vec3A + +---@param n number + +---@return Vec3A +function Vec3A:powf(_self,n) end + +---@package +---@param _self Vec3A + +---@return number +function Vec3A:min_element(_self) end + +---@package +---@param _self Vec3A + +---@return boolean +function Vec3A:is_nan(_self) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:rem_euclid(_self,rhs) end + +---@package +---@param _self Vec3A + +---@return number +function Vec3A:element_product(_self) end + +---@package +---@param x number + +---@param y number + +---@param z number + +---@return Vec3A +function Vec3A.new(x,y,z) end + +---@package +---@param _self Vec3A + +---@return Vec3A +function Vec3A:ceil(_self) end + +---@package +---@param _self Vec3A + +---@return Vec3A +function Vec3A:abs(_self) end + +---@package +---@param v Vec4 + +---@return Vec3A +function Vec3A.from_vec4(v) end + +---@package +---@param _self Vec3A + +---@return Vec3A +function Vec3A:trunc(_self) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:project_onto(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:reject_from(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return BVec3A +function Vec3A:cmpgt(_self,rhs) end + +---@package +---@param _self Vec3A + +---@return Vec3A +function Vec3A:normalize(_self) end + +---@package +---@param _self Vec3A + +---@return number +function Vec3A:length(_self) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return boolean +function Vec3A:eq(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@param max_abs_diff number + +---@return boolean +function Vec3A:abs_diff_eq(_self,rhs,max_abs_diff) end + +---@package +---@param _self Vec3A + +---@return number +function Vec3A:max_element(_self) end + +---@package +---@param _self Vec3A + +---@return I8Vec3 +function Vec3A:as_i8vec3(_self) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:sub(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return number +function Vec3A:angle_between(_self,rhs) end + +---@package +---@param _self Vec3A + +---@return I16Vec3 +function Vec3A:as_i16vec3(_self) end + +---@package +---@param _self Vec3A + +---@param a Vec3A + +---@param b Vec3A + +---@return Vec3A +function Vec3A:mul_add(_self,a,b) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:min(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:rem(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return Vec3A +function Vec3A:dot_into_vec(_self,rhs) end + +---@package +---@param _self Vec3A + +---@param rhs Vec3A + +---@return number +function Vec3A:dot(_self,rhs) end + +---@package +---@param _self Vec3A +---@param rhs Vec3A ----@class PinchGesture ---- Two-finger pinch gesture, often used for magnifications.--- --- Positive delta values indicate magnification (zooming in) and--- negative delta values indicate shrinking (zooming out).--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first ----@field [1] ? number +---@return BVec3A +function Vec3A:cmple(_self,rhs) end +---@package +---@param _self Vec3A ----@class RotationGesture ---- Two-finger rotation gesture.--- --- Positive delta values indicate rotation counterclockwise and--- negative delta values indicate rotation clockwise.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first ----@field [1] ? number +---@return IVec3 +function Vec3A:as_ivec3(_self) end +---@package +---@param _self Vec3A ----@class Key ---- The logical key code of a [`KeyboardInput`].--- --- ## Technical--- --- Its values map 1 to 1 to winit's Key. +---@return number +function Vec3A:length_squared(_self) end +---@package +---@param _self Vec3A ----@class KeyCode ---- The key code of a [`KeyboardInput`].--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `Res>`.--- --- Code representing the location of a physical key--- This mostly conforms to the UI Events Specification's [`KeyboardEvent.code`] with a few--- exceptions:--- - The keys that the specification calls `MetaLeft` and `MetaRight` are named `SuperLeft` and--- `SuperRight` here.--- - The key that the specification calls "Super" is reported as `Unidentified` here.--- --- [`KeyboardEvent.code`]: https://w3c.github.io/uievents-code/#code-value-tables--- --- ## Updating--- --- The resource is updated inside of the [`keyboard_input_system`]. +---@return number +function Vec3A:element_sum(_self) end +---@package +---@param _self Vec3A ----@class KeyboardFocusLost ---- Gets generated from `bevy_winit::winit_runner`--- --- Used for clearing all cached states to avoid having 'stuck' key presses--- when, for example, switching between windows with 'Alt-Tab' or using any other--- OS specific key combination that leads to Bevy window losing focus and not receiving any--- input events +---@param max number +---@return Vec3A +function Vec3A:clamp_length_max(_self,max) end ----@class KeyboardInput ---- A keyboard input event.--- --- This event is the translated version of the `WindowEvent::KeyboardInput` from the `winit` crate.--- It is available to the end user and can be used for game logic.--- --- ## Usage--- --- The event is consumed inside of the [`keyboard_input_system`]--- to update the [`ButtonInput`](ButtonInput) resource. ----@field key_code ? KeyCode ----@field logical_key ? Key ----@field state ? ButtonState ----@field text ? Option ----@field repeat ? boolean ----@field window ? Entity +---@package +---@param _self Vec3A +---@return BVec3A +function Vec3A:is_nan_mask(_self) end ----@class NativeKey ---- Contains the platform-native logical key identifier, known as keysym.--- --- Exactly what that means differs from platform to platform, but the values are to some degree--- tied to the currently active keyboard layout. The same key on the same keyboard may also report--- different values on different platforms, which is one of the reasons this is a per-platform--- enum.--- --- This enum is primarily used to store raw keysym when Winit doesn't map a given native logical--- key identifier to a meaningful [`Key`] variant. This lets you use [`Key`], and let the user--- define keybinds which work in the presence of identifiers we haven't mapped for you yet. +---@package +---@param _self Vec3A +---@param rhs Vec3A ----@class NativeKeyCode ---- Contains the platform-native physical key identifier--- --- The exact values vary from platform to platform (which is part of why this is a per-platform--- enum), but the values are primarily tied to the key's physical location on the keyboard.--- --- This enum is primarily used to store raw keycodes when Winit doesn't map a given native--- physical key identifier to a meaningful [`KeyCode`] variant. In the presence of identifiers we--- haven't mapped for you yet, this lets you use [`KeyCode`] to:--- --- - Correctly match key press and release events.--- - On non-web platforms, support assigning keybinds to virtually any key through a UI. +---@return Vec3A +function Vec3A:div(_self,rhs) end +---@package +---@param _self Vec3A ----@class AccumulatedMouseMotion ---- Tracks how much the mouse has moved every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseMotion`] events received this frame. ----@field delta ? Vec2 +---@return integer +function Vec3A:is_negative_bitmask(_self) end +---@package +---@param _self Vec3A ----@class AccumulatedMouseScroll ---- Tracks how much the mouse has scrolled every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseWheel`] events received this frame. ----@field unit ? MouseScrollUnit ----@field delta ? Vec2 +---@param rhs Vec3A +---@return Vec3A +function Vec3A:mul(_self,rhs) end ----@class MouseButton ---- A button on a mouse device.--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `bevy`--- resource.--- --- ## Updating--- --- The resource is updated inside of the [`mouse_button_input_system`]. +---@package +---@param _self Vec3A +---@return Vec3A +function Vec3A:recip(_self) end ----@class MouseButtonInput ---- A mouse button input event.--- --- This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate.--- --- ## Usage--- --- The event is read inside of the [`mouse_button_input_system`]--- to update the [`ButtonInput`] resource. ----@field button ? MouseButton ----@field state ? ButtonState ----@field window ? Entity +---@package +---@param _self Vec3A +---@return Vec3A +function Vec3A:any_orthogonal_vector(_self) end ----@class MouseMotion ---- An event reporting the change in physical position of a pointing device.--- --- This represents raw, unfiltered physical motion.--- It is the translated version of [`DeviceEvent::MouseMotion`] from the `winit` crate.--- --- All pointing devices connected to a single machine at the same time can emit the event independently.--- However, the event data does not make it possible to distinguish which device it is referring to.--- --- [`DeviceEvent::MouseMotion`]: https://docs.rs/winit/latest/winit/event/enum.DeviceEvent.html#variant.MouseMotion ----@field delta ? Vec2 +---@package +---@param _self Vec3A +---@param min Vec3A ----@class MouseScrollUnit ---- The scroll unit.--- --- Describes how a value of a [`MouseWheel`] event has to be interpreted.--- --- The value of the event can either be interpreted as the amount of lines or the amount of pixels--- to scroll. +---@param max Vec3A +---@return Vec3A +function Vec3A:clamp(_self,min,max) end ----@class MouseWheel ---- A mouse wheel event.--- --- This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate. ----@field unit ? MouseScrollUnit ----@field x ? number ----@field y ? number ----@field window ? Entity +---@package +---@param _self Vec3A +---@param rhs Vec3A ----@class ForceTouch ---- A force description of a [`Touch`] input. +---@return number +function Vec3A:distance_squared(_self,rhs) end +---@package +---@param _self Vec3A ----@class TouchInput ---- A touch input event.--- --- ## Logic--- --- Every time the user touches the screen, a new [`TouchPhase::Started`] event with an unique--- identifier for the finger is generated. When the finger is lifted, the [`TouchPhase::Ended`]--- event is generated with the same finger id.--- --- After a [`TouchPhase::Started`] event has been emitted, there may be zero or more [`TouchPhase::Moved`]--- events when the finger is moved or the touch pressure changes.--- --- The finger id may be reused by the system after an [`TouchPhase::Ended`] event. The user--- should assume that a new [`TouchPhase::Started`] event received with the same id has nothing--- to do with the old finger and is a new finger.--- --- A [`TouchPhase::Canceled`] event is emitted when the system has canceled tracking this--- touch, such as when the window loses focus, or on iOS if the user moves the--- device against their face.--- --- ## Note--- --- This event is the translated version of the `WindowEvent::Touch` from the `winit` crate.--- It is available to the end user and can be used for game logic. ----@field phase ? TouchPhase ----@field position ? Vec2 ----@field window ? Entity ----@field force ? Option ----@field id ? integer +---@param rhs Vec3A +---@return BVec3A +function Vec3A:cmpge(_self,rhs) end ----@class TouchPhase ---- A phase of a [`TouchInput`].--- --- ## Usage--- --- It is used to describe the phase of the touch input that is currently active.--- This includes a phase that indicates that a touch input has started or ended,--- or that a finger has moved. There is also a canceled phase that indicates that--- the system canceled the tracking of the finger. +---@package +---@param _self Vec3A +---@param w number ----@class AspectRatio ---- An `AspectRatio` is the ratio of width to height. ----@field [1] ? number +---@return Vec4 +function Vec3A:extend(_self,w) end +---@package +---@param _self Vec3A ----@class Aabb2d ---- A 2D axis-aligned bounding box, or bounding rectangle ----@field min ? Vec2 ----@field max ? Vec2 +---@param x number +---@return Vec3A +function Vec3A:with_x(_self,x) end ----@class BoundingCircle ---- A bounding circle ----@field center ? Vec2 ----@field circle ? Circle +---@package +---@param v number +---@return Vec3A +function Vec3A.splat(v) end ----@class Aabb3d ---- A 3D axis-aligned bounding box ----@field min ? Vec3A ----@field max ? Vec3A +---@package +---@param _self Vec3A +---@return Vec3A +function Vec3A:any_orthonormal_vector(_self) end ----@class BoundingSphere ---- A bounding sphere ----@field center ? Vec3A ----@field sphere ? Sphere +---@package +---@param _self Vec3A +---@return UVec3 +function Vec3A:as_uvec3(_self) end ----@class AabbCast2d ---- An intersection test that casts an [`Aabb2d`] along a ray. ----@field ray ? RayCast2d ----@field aabb ? Aabb2d +---@package +---@param _self Vec3A +---@param rhs Vec3A ----@class BoundingCircleCast ---- An intersection test that casts a [`BoundingCircle`] along a ray. ----@field ray ? RayCast2d ----@field circle ? BoundingCircle +---@param s number +---@return Vec3A +function Vec3A:lerp(_self,rhs,s) end ----@class RayCast2d ---- A raycast intersection test for 2D bounding volumes ----@field ray ? Ray2d ----@field max ? number ----@field direction_recip ? Vec2 +---@package +---@param _self Vec3A +---@return Vec3A +function Vec3A:clone(_self) end ----@class AabbCast3d ---- An intersection test that casts an [`Aabb3d`] along a ray. ----@field ray ? RayCast3d ----@field aabb ? Aabb3d +---@package +---@param _self Vec3A +---@return number +function Vec3A:length_recip(_self) end ----@class BoundingSphereCast ---- An intersection test that casts a [`BoundingSphere`] along a ray. ----@field ray ? RayCast3d ----@field sphere ? BoundingSphere +---@package +---@param _self Vec3A +---@return U64Vec3 +function Vec3A:as_u64vec3(_self) end ----@class RayCast3d ---- A raycast intersection test for 3D bounding volumes ----@field origin ? Vec3A ----@field direction ? Dir3A ----@field max ? number ----@field direction_recip ? Vec3A +---@package +---@param _self Vec3A +---@return Vec2 +function Vec3A:truncate(_self) end ----@class CompassOctant ---- A compass enum with 8 directions.--- ```text--- N (North)--- ▲--- NW │ NE--- ╲ │ ╱--- W (West) ┼─────► E (East)--- ╱ │ ╲--- SW │ SE--- ▼--- S (South)--- ``` +---@package +---@param _self Vec3A +---@param normal Vec3A ----@class CompassQuadrant ---- A compass enum with 4 directions.--- ```text--- N (North)--- ▲--- │--- │--- W (West) ┼─────► E (East)--- │--- │--- ▼--- S (South)--- ``` +---@return Vec3A +function Vec3A:reflect(_self,normal) end +---@package +---@param _self Vec3A ----@class EaseFunction ---- Curve functions over the [unit interval], commonly used for easing transitions.--- --- `EaseFunction` can be used on its own to interpolate between `0.0` and `1.0`.--- It can also be combined with [`EasingCurve`] to interpolate between other--- intervals and types, including vectors and rotations.--- --- # Example--- --- [`sample`] the smoothstep function at various points. This will return `None`--- if the parameter is outside the unit interval.--- --- ```--- # use bevy_math::prelude::*;--- let f = EaseFunction::SmoothStep;--- --- assert_eq!(f.sample(-1.0), None);--- assert_eq!(f.sample(0.0), Some(0.0));--- assert_eq!(f.sample(0.5), Some(0.5));--- assert_eq!(f.sample(1.0), Some(1.0));--- assert_eq!(f.sample(2.0), None);--- ```--- --- [`sample_clamped`] will clamp the parameter to the unit interval, so it--- always returns a value.--- --- ```--- # use bevy_math::prelude::*;--- # let f = EaseFunction::SmoothStep;--- assert_eq!(f.sample_clamped(-1.0), 0.0);--- assert_eq!(f.sample_clamped(0.0), 0.0);--- assert_eq!(f.sample_clamped(0.5), 0.5);--- assert_eq!(f.sample_clamped(1.0), 1.0);--- assert_eq!(f.sample_clamped(2.0), 1.0);--- ```--- --- [`sample`]: EaseFunction::sample--- [`sample_clamped`]: EaseFunction::sample_clamped--- [unit interval]: `Interval::UNIT` +---@param rhs Vec3A +---@return BVec3A +function Vec3A:cmplt(_self,rhs) end ----@class JumpAt ---- Configuration options for the [`EaseFunction::Steps`] curves. This closely replicates the--- [CSS step function specification].--- --- [CSS step function specification]: https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#description +---@package +---@param _self Vec3A +---@return Vec3A +function Vec3A:floor(_self) end ----@class Interval ---- A nonempty closed interval, possibly unbounded in either direction.--- --- In other words, the interval may stretch all the way to positive or negative infinity, but it--- will always have some nonempty interior. ----@field start ? number ----@field end ? number +---@package +---@param _self Vec3A +---@param z number ----@class Dir2 ---- A normalized vector pointing in a direction in 2D space ----@field [1] ? Vec2 +---@return Vec3A +function Vec3A:with_z(_self,z) end +---@package +---@param _self Vec3A ----@class Dir3 ---- A normalized vector pointing in a direction in 3D space ----@field [1] ? Vec3 +---@param min number +---@param max number ----@class Dir3A ---- A normalized SIMD vector pointing in a direction in 3D space.--- --- This type stores a 16 byte aligned [`Vec3A`].--- This may or may not be faster than [`Dir3`]: make sure to benchmark! ----@field [1] ? Vec3A +---@return Vec3A +function Vec3A:clamp_length(_self,min,max) end +---@package +---@param _self Vec3A ----@class FloatOrd ---- A wrapper for floats that implements [`Ord`], [`Eq`], and [`Hash`] traits.--- --- This is a work around for the fact that the IEEE 754-2008 standard,--- implemented by Rust's [`f32`] type,--- doesn't define an ordering for [`NaN`](f32::NAN),--- and `NaN` is not considered equal to any other `NaN`.--- --- Wrapping a float with `FloatOrd` breaks conformance with the standard--- by sorting `NaN` as less than all other numbers and equal to any other `NaN`. ----@field [1] ? number +---@return U8Vec3 +function Vec3A:as_u8vec3(_self) end +---@package +---@param _self Vec3A ----@class Isometry2d ---- An isometry in two dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(2). This includes translation and rotation, but excludes reflection.--- --- For the three-dimensional version, see [`Isometry3d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_abs_diff_eq;--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- let point = Vec2::new(4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_eq!(result, Vec2::new(-2.0, 5.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- # let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- # let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- # let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let circle_iso = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let rectangle_iso = Isometry2d::from_rotation(Rot2::degrees(90.0));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = circle_iso.inverse() * rectangle_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = circle_iso.inverse_mul(rectangle_iso);--- ``` ----@field rotation ? Rot2 ----@field translation ? Vec2 +---@return Vec3A +function Vec3A:fract_gl(_self) end +---@package +---@param _self Vec3A ----@class Isometry3d ---- An isometry in three dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(3). This includes translation and rotation, but excludes reflection.--- --- For the two-dimensional version, see [`Isometry2d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- let point = Vec3::new(4.0, 4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_relative_eq!(result, Vec3::new(-2.0, 5.0, 7.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- # let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- # let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- # let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let sphere_iso = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let cuboid_iso = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = sphere_iso.inverse() * cuboid_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = sphere_iso.inverse_mul(cuboid_iso);--- ``` ----@field rotation ? Quat ----@field translation ? Vec3A +---@param rhs Vec3A +---@return Vec3A +function Vec3A:add(_self,rhs) end ----@class Annulus ---- A primitive shape formed by the region between two circles, also known as a ring. ----@field inner_circle ? Circle ----@field outer_circle ? Circle +---@package +---@param _self Vec3A +---@return Vec3A +function Vec3A:normalize_or_zero(_self) end ----@class Arc2d ---- A primitive representing an arc between two points on a circle.--- --- An arc has no area.--- If you want to include the portion of a circle's area swept out by the arc,--- use the pie-shaped [`CircularSector`].--- If you want to include only the space inside the convex hull of the arc,--- use the bowl-shaped [`CircularSegment`].--- --- The arc is drawn starting from [`Vec2::Y`], extending by `half_angle` radians on--- either side. The center of the circle is the origin [`Vec2::ZERO`]. Note that this--- means that the origin may not be within the `Arc2d`'s convex hull.--- --- **Warning:** Arcs with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- It is recommended to normalize arcs to have an angle in [0, 2π]. ----@field radius ? number ----@field half_angle ? number +---@package +---@param _self Vec3A +---@return Vec3A +function Vec3A:exp(_self) end ----@class Capsule2d ---- A 2D capsule primitive, also known as a stadium or pill shape.--- --- A two-dimensional capsule is defined as a neighborhood of points at a distance (radius) from a line ----@field radius ? number ----@field half_length ? number +---@package +---@param mask BVec3A +---@param if_true Vec3A ----@class Circle ---- A circle primitive, representing the set of points some distance from the origin ----@field radius ? number +---@param if_false Vec3A +---@return Vec3A +function Vec3A.select(mask,if_true,if_false) end ----@class CircularSector ---- A primitive representing a circular sector: a pie slice of a circle.--- --- The segment is positioned so that it always includes [`Vec2::Y`] and is vertically symmetrical.--- To orient the sector differently, apply a rotation.--- The sector is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- --- **Warning:** Circular sectors with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular sectors to have an angle in [0, 2π]. ----@field arc ? Arc2d +---@class Vec4 ----@class CircularSegment ---- A primitive representing a circular segment:--- the area enclosed by the arc of a circle and its chord (the line between its endpoints).--- --- The segment is drawn starting from [`Vec2::Y`], extending equally on either side.--- To orient the segment differently, apply a rotation.--- The segment is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- When positioning a segment, the [`apothem`](Self::apothem) function may be particularly useful.--- --- **Warning:** Circular segments with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular segments to have an angle in [0, 2π]. ----@field arc ? Arc2d +---@field x ? number +---@field y ? number +---@field z ? number +---@field w ? number +Vec4 = {} +---@package +---@param a number[] ----@class Ellipse ---- An ellipse primitive, which is like a circle, but the width and height can be different ----@field half_size ? Vec2 +---@return Vec4 +function Vec4.from_array(a) end +---@package +---@param _self Vec4 ----@class Line2d ---- An infinite line going through the origin along a direction in 2D space.--- --- For a finite line: [`Segment2d`] ----@field direction ? Dir2 +---@param a Vec4 +---@param b Vec4 ----@class Plane2d ---- An unbounded plane in 2D space. It forms a separating surface through the origin,--- stretching infinitely far ----@field normal ? Dir2 +---@return Vec4 +function Vec4:mul_add(_self,a,b) end +---@package +---@param _self Vec4 ----@class Rectangle ---- A rectangle primitive, which is like a square, except that the width and height can be different ----@field half_size ? Vec2 +---@return Vec4 +function Vec4:abs(_self) end +---@package +---@param _self Vec4 ----@class RegularPolygon ---- A polygon centered on the origin where all vertices lie on a circle, equally far apart. ----@field circumcircle ? Circle ----@field sides ? integer +---@return boolean +function Vec4:is_normalized(_self) end +---@package +---@param x number ----@class Rhombus ---- A rhombus primitive, also known as a diamond shape.--- A four sided polygon, centered on the origin, where opposite sides are parallel but without--- requiring right angles. ----@field half_diagonals ? Vec2 +---@param y number +---@param z number ----@class Segment2d ---- A line segment defined by two endpoints in 2D space. ----@field vertices ? [glam::Vec2; 2] +---@param w number +---@return Vec4 +function Vec4.new(x,y,z,w) end ----@class Triangle2d ---- A triangle in 2D space ----@field vertices ? [glam::Vec2; 3] +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class Capsule3d ---- A 3D capsule primitive centered on the origin--- A three-dimensional capsule is defined as a surface at a distance (radius) from a line ----@field radius ? number ----@field half_length ? number +---@return Vec4 +function Vec4:reject_from_normalized(_self,rhs) end +---@package +---@param _self Vec4 ----@class Cone ---- A cone primitive centered on the midpoint between the tip of the cone and the center of its base.--- --- The cone is oriented with its tip pointing towards the Y axis. ----@field radius ? number ----@field height ? number +---@param rhs Vec4 +---@return Vec4 +function Vec4:midpoint(_self,rhs) end ----@class ConicalFrustum ---- A conical frustum primitive.--- A conical frustum can be created--- by slicing off a section of a cone. ----@field radius_top ? number ----@field radius_bottom ? number ----@field height ? number +---@package +---@param _self Vec4 +---@return Vec4 +function Vec4:fract(_self) end ----@class Cuboid ---- A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not--- required to be the same. ----@field half_size ? Vec3 +---@package +---@param _self Vec4 +---@return Vec4 +function Vec4:signum(_self) end ----@class Cylinder ---- A cylinder primitive centered on the origin ----@field radius ? number ----@field half_height ? number +---@package +---@param mask BVec4A +---@param if_true Vec4 ----@class InfinitePlane3d ---- An unbounded plane in 3D space. It forms a separating surface through the origin,--- stretching infinitely far ----@field normal ? Dir3 +---@param if_false Vec4 +---@return Vec4 +function Vec4.select(mask,if_true,if_false) end ----@class Line3d ---- An infinite line going through the origin along a direction in 3D space.--- --- For a finite line: [`Segment3d`] ----@field direction ? Dir3 +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class Plane3d ---- A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width. ----@field normal ? Dir3 ----@field half_size ? Vec2 +---@return BVec4A +function Vec4:cmpgt(_self,rhs) end +---@package +---@param _self Vec4 ----@class Segment3d ---- A line segment defined by two endpoints in 3D space. ----@field vertices ? [glam::Vec3; 2] +---@return Vec4 +function Vec4:ceil(_self) end +---@package +---@param _self Vec4 ----@class Sphere ---- A sphere primitive, representing the set of all points some distance from the origin ----@field radius ? number +---@param rhs Vec4 +---@return Vec4 +function Vec4:div(_self,rhs) end ----@class Tetrahedron ---- A tetrahedron primitive. ----@field vertices ? [glam::Vec3; 4] +---@package +---@param _self Vec4 +---@return number +function Vec4:element_sum(_self) end ----@class Torus ---- A torus primitive, often representing a ring or donut shape--- The set of points some distance from a circle centered at the origin ----@field minor_radius ? number ----@field major_radius ? number +---@package +---@param _self Vec4 +---@return U16Vec4 +function Vec4:as_u16vec4(_self) end ----@class Triangle3d ---- A 3D triangle primitive. ----@field vertices ? [glam::Vec3; 3] +---@package +---@param _self Vec4 +---@return Vec4 +function Vec4:normalize_or_zero(_self) end ----@class Ray2d ---- An infinite half-line starting at `origin` and going in `direction` in 2D space. ----@field origin ? Vec2 ----@field direction ? Dir2 +---@package +---@param _self Vec4 +---@return U8Vec4 +function Vec4:as_u8vec4(_self) end ----@class Ray3d ---- An infinite half-line starting at `origin` and going in `direction` in 3D space. ----@field origin ? Vec3 ----@field direction ? Dir3 +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class IRect ---- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `IRect::min` and `IRect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. ----@field min ? IVec2 ----@field max ? IVec2 +---@return Vec4 +function Vec4:rem(_self,rhs) end +---@package +---@param _self Vec4 ----@class Rect ---- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `Rect::min` and `Rect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. ----@field min ? Vec2 ----@field max ? Vec2 +---@param rhs Vec4 +---@return number +function Vec4:dot(_self,rhs) end ----@class URect ---- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `URect::min` and `URect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. ----@field min ? UVec2 ----@field max ? UVec2 +---@package +---@param _self Vec4 + +---@param min number +---@return Vec4 +function Vec4:clamp_length_min(_self,min) end ----@class Rot2 ---- A counterclockwise 2D rotation.--- --- # Example--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Rot2, Vec2};--- use std::f32::consts::PI;--- --- // Create rotations from radians or degrees--- let rotation1 = Rot2::radians(PI / 2.0);--- let rotation2 = Rot2::degrees(45.0);--- --- // Get the angle back as radians or degrees--- assert_eq!(rotation1.as_degrees(), 90.0);--- assert_eq!(rotation2.as_radians(), PI / 4.0);--- --- // "Add" rotations together using `*`--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * rotation2, Rot2::degrees(135.0));--- --- // Rotate vectors--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * Vec2::X, Vec2::Y);--- ``` ----@field cos ? number ----@field sin ? number +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class Instant +---@return BVec4A +function Vec4:cmpne(_self,rhs) end +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class Fixed ---- The fixed timestep game clock following virtual time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Virtual). The fixed clock is automatically set as the--- generic [`Time`] resource during [`FixedUpdate`](bevy_app::FixedUpdate)--- schedule processing.--- --- The fixed timestep clock advances in fixed-size increments, which is--- extremely useful for writing logic (like physics) that should have--- consistent behavior, regardless of framerate.--- --- The default [`timestep()`](Time::timestep) is 64 hertz, or 15625--- microseconds. This value was chosen because using 60 hertz has the potential--- for a pathological interaction with the monitor refresh rate where the game--- alternates between running two fixed timesteps and zero fixed timesteps per--- frame (for example when running two fixed timesteps takes longer than a--- frame). Additionally, the value is a power of two which losslessly converts--- into [`f32`] and [`f64`].--- --- To run a system on a fixed timestep, add it to one of the [`FixedMain`]--- schedules, most commonly [`FixedUpdate`](bevy_app::FixedUpdate).--- --- This schedule is run a number of times between--- [`PreUpdate`](bevy_app::PreUpdate) and [`Update`](bevy_app::Update)--- according to the accumulated [`overstep()`](Time::overstep) time divided by--- the [`timestep()`](Time::timestep). This means the schedule may run 0, 1 or--- more times during a single update (which typically corresponds to a rendered--- frame).--- --- `Time` and the generic [`Time`] resource will report a--- [`delta()`](Time::delta) equal to [`timestep()`](Time::timestep) and always--- grow [`elapsed()`](Time::elapsed) by one [`timestep()`](Time::timestep) per--- iteration.--- --- The fixed timestep clock follows the [`Time`](Virtual) clock, which--- means it is affected by [`pause()`](Time::pause),--- [`set_relative_speed()`](Time::set_relative_speed) and--- [`set_max_delta()`](Time::set_max_delta) from virtual time. If the virtual--- clock is paused, the [`FixedUpdate`](bevy_app::FixedUpdate) schedule will--- not run. It is guaranteed that the [`elapsed()`](Time::elapsed) time in--- `Time` is always between the previous `elapsed()` and the current--- `elapsed()` value in `Time`, so the values are compatible.--- --- Changing the timestep size while the game is running should not normally be--- done, as having a regular interval is the point of this schedule, but it may--- be necessary for effects like "bullet-time" if the normal granularity of the--- fixed timestep is too big for the slowed down time. In this case,--- [`set_timestep()`](Time::set_timestep) and be called to set a new value. The--- new value will be used immediately for the next run of the--- [`FixedUpdate`](bevy_app::FixedUpdate) schedule, meaning that it will affect--- the [`delta()`](Time::delta) value for the very next--- [`FixedUpdate`](bevy_app::FixedUpdate), even if it is still during the same--- frame. Any [`overstep()`](Time::overstep) present in the accumulator will be--- processed according to the new [`timestep()`](Time::timestep) value. ----@field timestep ? Duration ----@field overstep ? Duration +---@param d number +---@return Vec4 +function Vec4:move_towards(_self,rhs,d) end ----@class Real ---- Real time clock representing elapsed wall clock time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated with time instants according--- to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).[^disclaimer]--- --- Note:--- Using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration)--- allows for mocking the wall clock for testing purposes.--- Besides this use case, it is not recommended to do this, as it will no longer--- represent "wall clock" time as intended.--- --- The [`delta()`](Time::delta) and [`elapsed()`](Time::elapsed) values of this--- clock should be used for anything which deals specifically with real time--- (wall clock time). It will not be affected by relative game speed--- adjustments, pausing or other adjustments.[^disclaimer]--- --- The clock does not count time from [`startup()`](Time::startup) to--- [`first_update()`](Time::first_update()) into elapsed, but instead will--- start counting time from the first update call. [`delta()`](Time::delta) and--- [`elapsed()`](Time::elapsed) will report zero on the first update as there--- is no previous update instant. This means that a [`delta()`](Time::delta) of--- zero must be handled without errors in application logic, as it may--- theoretically also happen at other times.--- --- [`Instant`]s for [`startup()`](Time::startup),--- [`first_update()`](Time::first_update) and--- [`last_update()`](Time::last_update) are recorded and accessible.--- --- [^disclaimer]: When using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration),--- [`Time#impl-Time`] is only a *mock* of wall clock time.--- ----@field startup ? Instant ----@field first_update ? Option ----@field last_update ? Option +---@package +---@param _self Vec4 +---@return Vec4 +function Vec4:exp(_self) end ----@class Stopwatch ---- A Stopwatch is a struct that tracks elapsed time when started.--- --- Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called.--- # Examples--- --- ```--- # use bevy_time::*;--- use std::time::Duration;--- let mut stopwatch = Stopwatch::new();--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- --- stopwatch.tick(Duration::from_secs_f32(1.0)); // tick one second--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.pause();--- stopwatch.tick(Duration::from_secs_f32(1.0)); // paused stopwatches don't tick--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.reset(); // reset the stopwatch--- assert!(stopwatch.is_paused());--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- ``` ----@field elapsed ? Duration ----@field is_paused ? boolean +---@package +---@param _self Vec4 +---@return Vec4 +function Vec4:floor(_self) end ----@class Timer ---- Tracks elapsed time. Enters the finished state once `duration` is reached.--- --- Non repeating timers will stop tracking and stay in the finished state until reset.--- Repeating timers will only be in the finished state on each tick `duration` is reached or--- exceeded, and can still be reset at any given point.--- --- Paused timers will not have elapsed time increased.--- --- Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called. ----@field stopwatch ? Stopwatch ----@field duration ? Duration ----@field mode ? TimerMode ----@field finished ? boolean ----@field times_finished_this_tick ? integer +---@package +---@param _self Vec4 +---@param fallback Vec4 ----@class TimerMode ---- Specifies [`Timer`] behavior. +---@return Vec4 +function Vec4:normalize_or(_self,fallback) end +---@package +---@param _self Vec4 ----@class Virtual ---- The virtual game clock representing game time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- Normally used as `Time`. It is automatically inserted as a resource--- by [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Real). The virtual clock is automatically set as the default--- generic [`Time`] resource for the update.--- --- The virtual clock differs from real time clock in that it can be paused, sped up--- and slowed down. It also limits how much it can advance in a single update--- in order to prevent unexpected behavior in cases where updates do not happen--- at regular intervals (e.g. coming back after the program was suspended a long time).--- --- The virtual clock can be paused by calling [`pause()`](Time::pause) and--- unpaused by calling [`unpause()`](Time::unpause). When the game clock is--- paused [`delta()`](Time::delta) will be zero on each update, and--- [`elapsed()`](Time::elapsed) will not grow.--- [`effective_speed()`](Time::effective_speed) will return `0.0`. Calling--- [`pause()`](Time::pause) will not affect value the [`delta()`](Time::delta)--- value for the update currently being processed.--- --- The speed of the virtual clock can be changed by calling--- [`set_relative_speed()`](Time::set_relative_speed). A value of `2.0` means--- that virtual clock should advance twice as fast as real time, meaning that--- [`delta()`](Time::delta) values will be double of what--- [`Time::delta()`](Time::delta) reports and--- [`elapsed()`](Time::elapsed) will go twice as fast as--- [`Time::elapsed()`](Time::elapsed). Calling--- [`set_relative_speed()`](Time::set_relative_speed) will not affect the--- [`delta()`](Time::delta) value for the update currently being processed.--- --- The maximum amount of delta time that can be added by a single update can be--- set by [`set_max_delta()`](Time::set_max_delta). This value serves a dual--- purpose in the virtual clock.--- --- If the game temporarily freezes due to any reason, such as disk access, a--- blocking system call, or operating system level suspend, reporting the full--- elapsed delta time is likely to cause bugs in game logic. Usually if a--- laptop is suspended for an hour, it doesn't make sense to try to simulate--- the game logic for the elapsed hour when resuming. Instead it is better to--- lose the extra time and pretend a shorter duration of time passed. Setting--- [`max_delta()`](Time::max_delta) to a relatively short time means that the--- impact on game logic will be minimal.--- --- If the game lags for some reason, meaning that it will take a longer time to--- compute a frame than the real time that passes during the computation, then--- we would fall behind in processing virtual time. If this situation persists,--- and computing a frame takes longer depending on how much virtual time has--- passed, the game would enter a "death spiral" where computing each frame--- takes longer and longer and the game will appear to freeze. By limiting the--- maximum time that can be added at once, we also limit the amount of virtual--- time the game needs to compute for each frame. This means that the game will--- run slow, and it will run slower than real time, but it will not freeze and--- it will recover as soon as computation becomes fast again.--- --- You should set [`max_delta()`](Time::max_delta) to a value that is--- approximately the minimum FPS your game should have even if heavily lagged--- for a moment. The actual FPS when lagged will be somewhat lower than this,--- depending on how much more time it takes to compute a frame compared to real--- time. You should also consider how stable your FPS is, as the limit will--- also dictate how big of an FPS drop you can accept without losing time and--- falling behind real time. ----@field max_delta ? Duration ----@field paused ? boolean ----@field relative_speed ? number ----@field effective_speed ? number +---@param rhs Vec4 +---@return Vec4 +function Vec4:reject_from(_self,rhs) end ----@class GlobalTransform ---- [`GlobalTransform`] is an affine transformation from entity-local coordinates to worldspace coordinates.--- --- You cannot directly mutate [`GlobalTransform`]; instead, you change an entity's transform by manipulating--- its [`Transform`], which indirectly causes Bevy to update its [`GlobalTransform`].--- --- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * For transform hierarchies to work correctly, you must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] transforms an entity relative to its parent's reference frame, or relative to world space coordinates,--- if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is managed by Bevy; it is computed by successively applying the [`Transform`] of each ancestor--- entity which has a Transform. This is done automatically by Bevy-internal systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity in this schedule or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs ----@field [1] ? Affine3A +---@package +---@param _self Vec4 +---@return I16Vec4 +function Vec4:as_i16vec4(_self) end ----@class Transform ---- Describe the position of an entity. If the entity has a parent, the position is relative--- to its parent position.--- --- * To place or move an entity, you should set its [`Transform`].--- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * To be displayed, an entity must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] is the position of an entity relative to its parent position, or the reference--- frame if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is the position of an entity relative to the reference frame.--- --- [`GlobalTransform`] is updated from [`Transform`] by systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity during this set or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs ----@field translation ? Vec3 ----@field rotation ? Quat ----@field scale ? Vec3 +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class TransformTreeChanged ---- An optimization for transform propagation. This ZST marker component uses change detection to--- mark all entities of the hierarchy as "dirty" if any of their descendants have a changed--- `Transform`. If this component is *not* marked `is_changed()`, propagation will halt. +---@return Vec4 +function Vec4:copysign(_self,rhs) end +---@package +---@param _self Vec4 ----@class TypeId +---@param rhs Vec4 +---@return number +function Vec4:distance_squared(_self,rhs) end +---@package +---@param _self Vec4 ----@class SocketAddr +---@return boolean +function Vec4:is_nan(_self) end +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class RangeFull +---@return Vec4 +function Vec4:add(_self,rhs) end +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class AtomicBool +---@return Vec4 +function Vec4:mul(_self,rhs) end +---@package +---@param _self Vec4 +---@return number +function Vec4:length_recip(_self) end ----@class AtomicI16 +---@package +---@param _self Vec4 +---@return number +function Vec4:length_squared(_self) end +---@package +---@param _self Vec4 ----@class AtomicI32 +---@return Vec4 +function Vec4:trunc(_self) end +---@package +---@param _self Vec4 +---@return number[] +function Vec4:to_array(_self) end ----@class AtomicI64 +---@package +---@param _self Vec4 +---@param rhs Vec4 +---@return Vec4 +function Vec4:project_onto(_self,rhs) end ----@class AtomicI8 +---@package +---@param _self Vec4 +---@param rhs Vec4 +---@return Vec4 +function Vec4:sub(_self,rhs) end ----@class AtomicIsize +---@package +---@param _self Vec4 +---@return DVec4 +function Vec4:as_dvec4(_self) end +---@package +---@param _self Vec4 ----@class AtomicU16 +---@param rhs Vec4 +---@return BVec4A +function Vec4:cmple(_self,rhs) end +---@package +---@param _self Vec4 ----@class AtomicU32 +---@param max number +---@return Vec4 +function Vec4:clamp_length_max(_self,max) end +---@package +---@param _self Vec4 ----@class AtomicU64 +---@return I64Vec4 +function Vec4:as_i64vec4(_self) end +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class AtomicU8 +---@return Vec4 +function Vec4:max(_self,rhs) end +---@package +---@param _self Vec4 +---@param normal Vec4 ----@class AtomicUsize +---@return Vec4 +function Vec4:reflect(_self,normal) end +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class Duration +---@return Vec4 +function Vec4:dot_into_vec(_self,rhs) end +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class Affine2 +---@return Vec4 +function Vec4:rem_euclid(_self,rhs) end ----@field matrix2 ? Mat2 ----@field translation ? Vec2 +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class Affine3A +---@return boolean +function Vec4:eq(_self,rhs) end ----@field matrix3 ? Mat3A ----@field translation ? Vec3A +---@package +---@param _self Vec4 +---@param n number ----@class BVec2 +---@return Vec4 +function Vec4:powf(_self,n) end ----@field x ? boolean ----@field y ? boolean +---@package +---@param _self Vec4 +---@return Vec4 +function Vec4:clone(_self) end ----@class BVec3 +---@package +---@param _self Vec4 ----@field x ? boolean ----@field y ? boolean ----@field z ? boolean +---@param rhs Vec4 +---@return BVec4A +function Vec4:cmpge(_self,rhs) end ----@class BVec3A +---@package +---@param _self Vec4 +---@return integer +function Vec4:is_negative_bitmask(_self) end +---@package +---@param _self Vec4 ----@class BVec4 +---@return number +function Vec4:max_element(_self) end ----@field x ? boolean ----@field y ? boolean ----@field z ? boolean ----@field w ? boolean +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class BVec4A +---@param s number +---@return Vec4 +function Vec4:lerp(_self,rhs,s) end +---@package +---@param _self Vec4 ----@class DAffine2 +---@param min number ----@field matrix2 ? DMat2 ----@field translation ? DVec2 +---@param max number +---@return Vec4 +function Vec4:clamp_length(_self,min,max) end ----@class DAffine3 +---@package +---@param _self Vec4 ----@field matrix3 ? DMat3 ----@field translation ? DVec3 +---@param rhs Vec4 +---@param max_abs_diff number ----@class DMat2 +---@return boolean +function Vec4:abs_diff_eq(_self,rhs,max_abs_diff) end ----@field x_axis ? DVec2 ----@field y_axis ? DVec2 +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class DMat3 +---@return Vec4 +function Vec4:project_onto_normalized(_self,rhs) end ----@field x_axis ? DVec3 ----@field y_axis ? DVec3 ----@field z_axis ? DVec3 +---@package +---@param _self Vec4 +---@return BVec4A +function Vec4:is_nan_mask(_self) end ----@class DMat4 +---@package +---@param _self Vec4 ----@field x_axis ? DVec4 ----@field y_axis ? DVec4 ----@field z_axis ? DVec4 ----@field w_axis ? DVec4 +---@return number +function Vec4:length(_self) end +---@package +---@param _self Vec4 ----@class DQuat +---@param y number ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number +---@return Vec4 +function Vec4:with_y(_self,y) end +---@package +---@param _self Vec4 ----@class DVec2 +---@param rhs Vec4 ----@field x ? number ----@field y ? number +---@return Vec4 +function Vec4:min(_self,rhs) end +---@package +---@param _self Vec4 ----@class DVec3 +---@return Vec4 +function Vec4:recip(_self) end ----@field x ? number ----@field y ? number ----@field z ? number +---@package +---@param _self Vec4 +---@return Vec4 +function Vec4:fract_gl(_self) end ----@class DVec4 +---@package +---@param _self Vec4 ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number +---@param w number +---@return Vec4 +function Vec4:with_w(_self,w) end ----@class EulerRot +---@package +---@param _self Vec4 +---@return Vec3 +function Vec4:truncate(_self) end +---@package +---@param _self Vec4 ----@class I16Vec2 +---@return number +function Vec4:min_element(_self) end ----@field x ? integer ----@field y ? integer +---@package +---@param _self Vec4 +---@return I8Vec4 +function Vec4:as_i8vec4(_self) end ----@class I16Vec3 +---@package +---@param _self Vec4 ----@field x ? integer ----@field y ? integer ----@field z ? integer +---@return boolean +function Vec4:is_finite(_self) end +---@package +---@param _self Vec4 ----@class I16Vec4 +---@param z number ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer +---@return Vec4 +function Vec4:with_z(_self,z) end +---@package +---@param _self Vec4 ----@class I64Vec2 +---@return Vec4 +function Vec4:neg(_self) end ----@field x ? integer ----@field y ? integer +---@package +---@param _self Vec4 +---@return BVec4A +function Vec4:is_finite_mask(_self) end ----@class I64Vec3 +---@package +---@param _self Vec4 ----@field x ? integer ----@field y ? integer ----@field z ? integer +---@param rhs Vec4 +---@return number +function Vec4:distance(_self,rhs) end ----@class I64Vec4 +---@package +---@param _self Vec4 ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer +---@return UVec4 +function Vec4:as_uvec4(_self) end +---@package +---@param _self Vec4 ----@class I8Vec2 +---@param x number ----@field x ? integer ----@field y ? integer +---@return Vec4 +function Vec4:with_x(_self,x) end +---@package +---@param _self Vec4 ----@class I8Vec3 +---@param rhs Vec4 ----@field x ? integer ----@field y ? integer ----@field z ? integer +---@return BVec4A +function Vec4:cmplt(_self,rhs) end +---@package +---@param _self Vec4 ----@class I8Vec4 +---@param min Vec4 ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer +---@param max Vec4 +---@return Vec4 +function Vec4:clamp(_self,min,max) end ----@class IVec2 +---@package +---@param _self Vec4 ----@field x ? integer ----@field y ? integer +---@return IVec4 +function Vec4:as_ivec4(_self) end +---@package +---@param _self Vec4 ----@class IVec3 +---@param rhs Vec4 ----@field x ? integer ----@field y ? integer ----@field z ? integer +---@return BVec4A +function Vec4:cmpeq(_self,rhs) end +---@package +---@param _self Vec4 ----@class IVec4 +---@return number +function Vec4:element_product(_self) end ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer +---@package +---@param _self Vec4 +---@return Vec4 +function Vec4:round(_self) end ----@class Mat2 +---@package +---@param _self Vec4 ----@field x_axis ? Vec2 ----@field y_axis ? Vec2 +---@param normal Vec4 +---@param eta number ----@class Mat3 +---@return Vec4 +function Vec4:refract(_self,normal,eta) end ----@field x_axis ? Vec3 ----@field y_axis ? Vec3 ----@field z_axis ? Vec3 +---@package +---@param v number +---@return Vec4 +function Vec4.splat(v) end ----@class Mat3A +---@package +---@param _self Vec4 ----@field x_axis ? Vec3A ----@field y_axis ? Vec3A ----@field z_axis ? Vec3A +---@return Vec4 +function Vec4:normalize(_self) end +---@package +---@param _self Vec4 ----@class Mat4 +---@return U64Vec4 +function Vec4:as_u64vec4(_self) end ----@field x_axis ? Vec4 ----@field y_axis ? Vec4 ----@field z_axis ? Vec4 ----@field w_axis ? Vec4 +---@package +---@param _self Vec4 +---@param rhs Vec4 ----@class Quat +---@return Vec4 +function Vec4:div_euclid(_self,rhs) end ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number +---@class SmolStr ----@class U16Vec2 +SmolStr = {} ----@field x ? integer ----@field y ? integer +---@package +---@param _self SmolStr +---@return string +function SmolStr:to_string(_self) end ----@class U16Vec3 +---@package +---@param _self SmolStr ----@field x ? integer ----@field y ? integer ----@field z ? integer +---@return integer +function SmolStr:len(_self) end +---@package +---@param _self SmolStr ----@class U16Vec4 +---@return boolean +function SmolStr:is_empty(_self) end ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer +---@package +---@param _self SmolStr +---@return boolean +function SmolStr:is_heap_allocated(_self) end ----@class U64Vec2 +---@package +---@param _self SmolStr ----@field x ? integer ----@field y ? integer +---@param other SmolStr +---@return boolean +function SmolStr:eq(_self,other) end ----@class U64Vec3 +---@package +---@param _self SmolStr ----@field x ? integer ----@field y ? integer ----@field z ? integer +---@return SmolStr +function SmolStr:clone(_self) end ----@class U64Vec4 +---@class Uuid ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer +Uuid = {} +---@package +---@param _self Uuid ----@class U8Vec2 +---@param other Uuid ----@field x ? integer ----@field y ? integer +---@return boolean +function Uuid:eq(_self,other) end +---@package +---@return integer[] +function Uuid.encode_buffer() end ----@class U8Vec3 +---@package +---@param _self Uuid ----@field x ? integer ----@field y ? integer ----@field z ? integer +---@return boolean +function Uuid:is_max(_self) end +---@package +---@param _self Uuid ----@class U8Vec4 +---@return Uuid +function Uuid:clone(_self) end ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer +---@package +---@return Uuid +function Uuid.new_v4() end +---@package +---@param _self Uuid ----@class UVec2 +---@return [integer, integer] +function Uuid:as_u64_pair(_self) end ----@field x ? integer ----@field y ? integer +---@package +---@param _self Uuid +---@return integer[] +function Uuid:into_bytes(_self) end ----@class UVec3 +---@package +---@param _self Uuid ----@field x ? integer ----@field y ? integer ----@field z ? integer +---@return integer[] | nil +function Uuid:get_node_id(_self) end +---@package +---@param bytes integer[] ----@class UVec4 +---@return Uuid +function Uuid.from_bytes(bytes) end ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer +---@package +---@param _self Uuid +---@return integer +function Uuid:as_u128(_self) end ----@class Vec2 +---@package +---@param _self Uuid ----@field x ? number ----@field y ? number +---@return integer +function Uuid:get_version_num(_self) end +---@package +---@param _self Uuid ----@class Vec3 +---@return integer[] +function Uuid:to_bytes_le(_self) end ----@field x ? number ----@field y ? number ----@field z ? number +---@package +---@param v integer +---@return Uuid +function Uuid.from_u128_le(v) end ----@class Vec3A +---@package +---@param v integer ----@field x ? number ----@field y ? number ----@field z ? number +---@return Uuid +function Uuid.from_u128(v) end +---@package +---@param _self Uuid ----@class Vec4 +---@return [] +function Uuid:assert_receiver_is_total_eq(_self) end ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number +---@package +---@param _self Uuid +---@return integer +function Uuid:to_u128_le(_self) end ----@class SmolStr +---@package +---@return Uuid +function Uuid.max() end +---@package +---@param b integer[] +---@return Uuid +function Uuid.from_bytes_le(b) end ----@class Uuid +---@package +---@param _self Uuid + +---@return boolean +function Uuid:is_nil(_self) end + +---@package +---@param high_bits integer +---@param low_bits integer + +---@return Uuid +function Uuid.from_u64_pair(high_bits,low_bits) end ---@class AssetIndex --- A generational runtime-only identifier for a specific [`Asset`] stored in [`Assets`]. This is optimized for efficient runtime--- usage and is not suitable for identifying assets across app runs. ---@field generation ? integer ---@field index ? integer +AssetIndex = {} ---@class AssetPath --- Represents a path to an asset in a "virtual filesystem".--- --- Asset paths consist of three main parts:--- * [`AssetPath::source`]: The name of the [`AssetSource`](crate::io::AssetSource) to load the asset from.--- This is optional. If one is not set the default source will be used (which is the `assets` folder by default).--- * [`AssetPath::path`]: The "virtual filesystem path" pointing to an asset source file.--- * [`AssetPath::label`]: An optional "named sub asset". When assets are loaded, they are--- allowed to load "sub assets" of any type, which are identified by a named "label".--- --- Asset paths are generally constructed (and visualized) as strings:--- --- ```no_run--- # use bevy_asset::{Asset, AssetServer, Handle};--- # use bevy_reflect::TypePath;--- #--- # #[derive(Asset, TypePath, Default)]--- # struct Mesh;--- #--- # #[derive(Asset, TypePath, Default)]--- # struct Scene;--- #--- # let asset_server: AssetServer = panic!();--- // This loads the `my_scene.scn` base asset from the default asset source.--- let scene: Handle = asset_server.load("my_scene.scn");--- --- // This loads the `PlayerMesh` labeled asset from the `my_scene.scn` base asset in the default asset source.--- let mesh: Handle = asset_server.load("my_scene.scn#PlayerMesh");--- --- // This loads the `my_scene.scn` base asset from a custom 'remote' asset source.--- let scene: Handle = asset_server.load("remote://my_scene.scn");--- ```--- --- [`AssetPath`] implements [`From`] for `&'static str`, `&'static Path`, and `&'a String`,--- which allows us to optimize the static cases.--- This means that the common case of `asset_server.load("my_scene.scn")` when it creates and--- clones internal owned [`AssetPaths`](AssetPath).--- This also means that you should use [`AssetPath::parse`] in cases where `&str` is the explicit type. +AssetPath = {} ---@class RenderAssetUsages --- Defines where the asset will be used.--- --- If an asset is set to the `RENDER_WORLD` but not the `MAIN_WORLD`, the asset will be--- unloaded from the asset server once it's been extracted and prepared in the render world.--- --- Unloading the asset saves on memory, as for most cases it is no longer necessary to keep--- it in RAM once it's been uploaded to the GPU's VRAM. However, this means you can no longer--- access the asset from the CPU (via the `Assets` resource) once unloaded (without re-loading it).--- --- If you never need access to the asset from the CPU past the first frame it's loaded on,--- or only need very infrequent access, then set this to `RENDER_WORLD`. Otherwise, set this to--- `RENDER_WORLD | MAIN_WORLD`.--- --- If you have an asset that doesn't actually need to end up in the render world, like an Image--- that will be decoded into another Image asset, use `MAIN_WORLD` only.--- --- ## Platform-specific--- --- On Wasm, it is not possible for now to free reserved memory. To control memory usage, load assets--- in sequence and unload one before loading the next. See this--- [discussion about memory management](https://github.com/WebAssembly/design/issues/1397) for more--- details. +RenderAssetUsages = {} ---@class DeferredPrepass --- If added to a [`crate::prelude::Camera3d`] then deferred materials will be rendered to the deferred gbuffer texture and will be available to subsequent passes.--- Note the default deferred lighting plugin also requires `DepthPrepass` to work correctly. +DeferredPrepass = {} ---@class SystemIdMarker --- Marker [`Component`](bevy_ecs::component::Component) for identifying [`SystemId`] [`Entity`]s. +SystemIdMarker = {} ---@class OnAdd --- Trigger emitted when a component is inserted onto an entity that does not already have that--- component. Runs before `OnInsert`.--- See [`crate::component::ComponentHooks::on_add`] for more information. +OnAdd = {} ---@class OnDespawn --- Trigger emitted for each component on an entity when it is despawned.--- See [`crate::component::ComponentHooks::on_despawn`] for more information. +OnDespawn = {} ---@class OnInsert --- Trigger emitted when a component is inserted, regardless of whether or not the entity already--- had that component. Runs after `OnAdd`, if it ran.--- See [`crate::component::ComponentHooks::on_insert`] for more information. +OnInsert = {} ---@class OnRemove --- Trigger emitted when a component is removed from an entity, and runs before the component is--- removed, so you can still access the component data.--- See [`crate::component::ComponentHooks::on_remove`] for more information. +OnRemove = {} ---@class OnReplace --- Trigger emitted when a component is inserted onto an entity that already has that component.--- Runs before the value is replaced, so you can still access the original component data.--- See [`crate::component::ComponentHooks::on_replace`] for more information. +OnReplace = {} ---@class Image +Image = {} ---@class TextureAtlas --- An index into a [`TextureAtlasLayout`], which corresponds to a specific section of a texture.--- --- It stores a handle to [`TextureAtlasLayout`] and the index of the current section of the atlas.--- The texture atlas contains various *sections* of a given texture, allowing users to have a single--- image file for either sprite animation or global mapping.--- You can change the texture [`index`](Self::index) of the atlas to animate the sprite or display only a *section* of the texture--- for efficient rendering of related game objects.--- --- Check the following examples for usage:--- - [`animated sprite sheet example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs)--- - [`sprite animation event example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs)--- - [`texture atlas example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) ---@field layout ? Handle ---@field index ? integer +TextureAtlas = {} ---@class TextureAtlasLayout --- Stores a map used to lookup the position of a texture in a [`TextureAtlas`].--- This can be used to either use and look up a specific section of a texture, or animate frame-by-frame as a sprite sheet.--- --- Optionally it can store a mapping from sub texture handles to the related area index (see--- [`TextureAtlasBuilder`]).--- --- [Example usage animating sprite.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs)--- [Example usage animating sprite in response to an event.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs)--- [Example usage loading sprite sheet.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs)--- --- [`TextureAtlasBuilder`]: crate::TextureAtlasBuilder ---@field size ? UVec2 ---@field textures ? Vec +TextureAtlasLayout = {} ---@class Affine3 --- Reduced-size version of `glam::Affine3A` for use when storage has--- significant performance impact. Convert to `glam::Affine3A` to do--- non-trivial calculations. ---@field matrix3 ? Mat3 ---@field translation ? Vec3 +Affine3 = {} ---@class Indices --- An array of indices into the [`VertexAttributeValues`](super::VertexAttributeValues) for a mesh.--- --- It describes the order in which the vertex attributes should be joined into faces. +Indices = {} ---@class Mesh @@ -1428,39 +27976,46 @@ ---@field morph_targets ? Option ---@field morph_target_names ? Option ---@field asset_usage ? RenderAssetUsages +Mesh = {} ---@class MeshMorphWeights --- Control a specific [`Mesh`] instance's [morph targets]. These control the weights of--- specific "mesh primitives" in scene formats like GLTF. They can be set manually, but--- in most cases they should "automatically" synced by setting the [`MorphWeights`] component--- on a parent entity.--- --- See [`MorphWeights`] for more details on Bevy's morph target implementation.--- --- Add this to an [`Entity`] with a `Mesh3d` with a [`MorphAttributes`] set--- to control individual weights of each morph target.--- --- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation ---@field weights ? Vec +MeshMorphWeights = {} ---@class MorphWeights --- Controls the [morph targets] for all child `Mesh3d` entities. In most cases, [`MorphWeights`] should be considered--- the "source of truth" when writing morph targets for meshes. However you can choose to write child [`MeshMorphWeights`]--- if your situation requires more granularity. Just note that if you set [`MorphWeights`], it will overwrite child--- [`MeshMorphWeights`] values.--- --- This exists because Bevy's [`Mesh`] corresponds to a _single_ surface / material, whereas morph targets--- as defined in the GLTF spec exist on "multi-primitive meshes" (where each primitive is its own surface with its own material).--- Therefore in Bevy [`MorphWeights`] an a parent entity are the "canonical weights" from a GLTF perspective, which then--- synchronized to child `Mesh3d` / [`MeshMorphWeights`] (which correspond to "primitives" / "surfaces" from a GLTF perspective).--- --- Add this to the parent of one or more [`Entities`](`Entity`) with a `Mesh3d` with a [`MeshMorphWeights`].--- --- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation ---@field weights ? Vec ---@field first_mesh ? Option +MorphWeights = {} ---@class AnnulusMeshBuilder --- A builder for creating a [`Mesh`] with an [`Annulus`] shape. ---@field annulus ? Annulus ---@field resolution ? integer +AnnulusMeshBuilder = {} ---@class Capsule2dMeshBuilder --- A builder used for creating a [`Mesh`] with a [`Capsule2d`] shape. ---@field capsule ? Capsule2d ---@field resolution ? integer +Capsule2dMeshBuilder = {} ---@class CircleMeshBuilder --- A builder used for creating a [`Mesh`] with a [`Circle`] shape. ---@field circle ? Circle ---@field resolution ? integer +CircleMeshBuilder = {} ---@class CircularMeshUvMode --- Specifies how to generate UV-mappings for the [`CircularSector`] and [`CircularSegment`] shapes.--- --- Currently the only variant is `Mask`, which is good for showing a portion of a texture that includes--- the entire circle, particularly the same texture will be displayed with different fractions of a--- complete circle.--- --- It's expected that more will be added in the future, such as a variant that causes the texture to be--- scaled to fit the bounding box of the shape, which would be good for packed textures only including the--- portion of the circle that is needed to display. +CircularMeshUvMode = {} ---@class CircularSectorMeshBuilder @@ -1468,6 +28023,7 @@ ---@field sector ? CircularSector ---@field resolution ? integer ---@field uv_mode ? CircularMeshUvMode +CircularSectorMeshBuilder = {} ---@class CircularSegmentMeshBuilder @@ -1475,33 +28031,39 @@ ---@field segment ? CircularSegment ---@field resolution ? integer ---@field uv_mode ? CircularMeshUvMode +CircularSegmentMeshBuilder = {} ---@class EllipseMeshBuilder --- A builder used for creating a [`Mesh`] with an [`Ellipse`] shape. ---@field ellipse ? Ellipse ---@field resolution ? integer +EllipseMeshBuilder = {} ---@class RectangleMeshBuilder --- A builder used for creating a [`Mesh`] with a [`Rectangle`] shape. ---@field half_size ? Vec2 +RectangleMeshBuilder = {} ---@class RegularPolygonMeshBuilder --- A builder used for creating a [`Mesh`] with a [`RegularPolygon`] shape. ---@field circumradius ? number ---@field sides ? integer +RegularPolygonMeshBuilder = {} ---@class RhombusMeshBuilder --- A builder for creating a [`Mesh`] with an [`Rhombus`] shape. ---@field half_diagonals ? Vec2 +RhombusMeshBuilder = {} ---@class Triangle2dMeshBuilder --- A builder used for creating a [`Mesh`] with a [`Triangle2d`] shape. ---@field triangle ? Triangle2d +Triangle2dMeshBuilder = {} ---@class Capsule3dMeshBuilder @@ -1511,14 +28073,17 @@ ---@field longitudes ? integer ---@field latitudes ? integer ---@field uv_profile ? CapsuleUvProfile +Capsule3dMeshBuilder = {} ---@class CapsuleUvProfile --- Manner in which UV coordinates are distributed vertically. +CapsuleUvProfile = {} ---@class ConeAnchor --- Anchoring options for [`ConeMeshBuilder`] +ConeAnchor = {} ---@class ConeMeshBuilder @@ -1526,6 +28091,7 @@ ---@field cone ? Cone ---@field resolution ? integer ---@field anchor ? ConeAnchor +ConeMeshBuilder = {} ---@class ConicalFrustumMeshBuilder @@ -1533,15 +28099,18 @@ ---@field frustum ? ConicalFrustum ---@field resolution ? integer ---@field segments ? integer +ConicalFrustumMeshBuilder = {} ---@class CuboidMeshBuilder --- A builder used for creating a [`Mesh`] with a [`Cuboid`] shape. ---@field half_size ? Vec3 +CuboidMeshBuilder = {} ---@class CylinderAnchor --- Anchoring options for [`CylinderMeshBuilder`] +CylinderAnchor = {} ---@class CylinderMeshBuilder @@ -1551,27 +28120,32 @@ ---@field segments ? integer ---@field caps ? boolean ---@field anchor ? CylinderAnchor +CylinderMeshBuilder = {} ---@class PlaneMeshBuilder --- A builder used for creating a [`Mesh`] with a [`Plane3d`] shape. ---@field plane ? Plane3d ---@field subdivisions ? integer +PlaneMeshBuilder = {} ---@class SphereKind --- A type of sphere mesh. +SphereKind = {} ---@class SphereMeshBuilder --- A builder used for creating a [`Mesh`] with an [`Sphere`] shape. ---@field sphere ? Sphere ---@field kind ? SphereKind +SphereMeshBuilder = {} ---@class TetrahedronMeshBuilder --- A builder used for creating a [`Mesh`] with a [`Tetrahedron`] shape. ---@field tetrahedron ? Tetrahedron +TetrahedronMeshBuilder = {} ---@class TorusMeshBuilder @@ -1580,21 +28154,25 @@ ---@field minor_resolution ? integer ---@field major_resolution ? integer ---@field angle_range ? RangeInclusive +TorusMeshBuilder = {} ---@class Triangle3dMeshBuilder --- A builder used for creating a [`Mesh`] with a [`Triangle3d`] shape. ---@field triangle ? Triangle3d +Triangle3dMeshBuilder = {} ---@class SkinnedMesh ---@field inverse_bindposes ? bevy_asset::handle::Handle ---@field joints ? Vec +SkinnedMesh = {} ---@class ScriptAsset --- Represents a script loaded into memory as an asset +ScriptAsset = {} ---@class FunctionArgInfo @@ -1602,6 +28180,7 @@ ---@field name ? Option ---@field arg_index ? integer ---@field type_id ? TypeId +FunctionArgInfo = {} ---@class FunctionInfo @@ -1611,32 +28190,39 @@ ---@field arg_info ? Vec ---@field return_info ? FunctionReturnInfo ---@field docs ? Option +FunctionInfo = {} ---@class FunctionReturnInfo --- Information about a function return value. ---@field type_id ? TypeId +FunctionReturnInfo = {} ---@class InteropError --- An error occurring when converting between rust and a script context. +InteropError = {} ---@class Namespace --- A namespace for functions +Namespace = {} ---@class DynamicComponent --- A dynamic script component ---@field data ? ScriptValue +DynamicComponent = {} ---@class ScriptValue --- An abstraction of values that can be passed to and from scripts.--- This allows us to re-use logic between scripting languages. +ScriptValue = {} ---@class AlphaMode --- Sets how a material's base color alpha channel is used for transparency. +AlphaMode = {} ---@class Camera @@ -1649,33 +28235,40 @@ ---@field msaa_writeback ? boolean ---@field clear_color ? ClearColorConfig ---@field sub_camera_view ? Option +Camera = {} ---@class CameraMainTextureUsages --- This component lets you control the [`TextureUsages`] field of the main texture generated for the camera +CameraMainTextureUsages = {} ---@class CameraRenderGraph --- Configures the [`RenderGraph`](crate::render_graph::RenderGraph) name assigned to be run for a given [`Camera`] entity. +CameraRenderGraph = {} ---@class Exposure --- How much energy a `Camera3d` absorbs from incoming light.--- --- +Exposure = {} ---@class ImageRenderTarget --- A render target that renders to an [`Image`]. ---@field handle ? Handle ---@field scale_factor ? FloatOrd +ImageRenderTarget = {} ---@class MipBias --- Camera component specifying a mip bias to apply when sampling from material textures.--- --- Often used in conjunction with antialiasing post-process effects to reduce textures blurriness. ---@field [1] ? number +MipBias = {} ---@class RenderTarget --- The "target" that a [`Camera`] will render to. For example, this could be a [`Window`]--- swapchain or an [`Image`]. +RenderTarget = {} ---@class SubCameraView @@ -1683,11 +28276,13 @@ ---@field full_size ? UVec2 ---@field offset ? Vec2 ---@field size ? UVec2 +SubCameraView = {} ---@class TemporalJitter --- A subpixel offset to jitter a perspective camera's frustum by.--- --- Useful for temporal rendering techniques.--- --- Do not use with [`OrthographicProjection`].--- --- [`OrthographicProjection`]: crate::camera::OrthographicProjection ---@field offset ? Vec2 +TemporalJitter = {} ---@class Viewport @@ -1695,24 +28290,29 @@ ---@field physical_position ? UVec2 ---@field physical_size ? UVec2 ---@field depth ? Range +Viewport = {} ---@class ClearColor --- A [`Resource`] that stores the color that is used to clear the screen between frames.--- --- This color appears as the "background" color for simple apps,--- when there are portions of the screen with nothing rendered. ---@field [1] ? Color +ClearColor = {} ---@class ClearColorConfig --- For a camera, specifies the color used to clear the viewport before rendering. +ClearColorConfig = {} ---@class ManualTextureViewHandle --- A unique id that corresponds to a specific [`ManualTextureView`] in the [`ManualTextureViews`] collection. ---@field [1] ? integer +ManualTextureViewHandle = {} ---@class CustomProjection --- Holds a dynamic [`CameraProjection`] trait object. Use [`Projection::custom()`] to construct a--- custom projection.--- --- The contained dynamic object can be downcast into a static type using [`CustomProjection::get`]. +CustomProjection = {} ---@class OrthographicProjection @@ -1723,6 +28323,7 @@ ---@field scaling_mode ? ScalingMode ---@field scale ? number ---@field area ? Rect +OrthographicProjection = {} ---@class PerspectiveProjection @@ -1731,14 +28332,17 @@ ---@field aspect_ratio ? number ---@field near ? number ---@field far ? number +PerspectiveProjection = {} ---@class Projection --- Component that defines how to compute a [`Camera`]'s projection matrix.--- --- Common projections, like perspective and orthographic, are provided out of the box to handle the--- majority of use cases. Custom projections can be added using the [`CameraProjection`] trait and--- the [`Projection::custom`] constructor.--- --- ## What's a projection?--- --- A camera projection essentially describes how 3d points from the point of view of a camera are--- projected onto a 2d screen. This is where properties like a camera's field of view are defined.--- More specifically, a projection is a 4x4 matrix that transforms points from view space (the--- point of view of the camera) into clip space. Clip space is almost, but not quite, equivalent to--- the rectangle that is rendered to your screen, with a depth axis. Any points that land outside--- the bounds of this cuboid are "clipped" and not rendered.--- --- You can also think of the projection as the thing that describes the shape of a camera's--- frustum: the volume in 3d space that is visible to a camera.--- --- [`Camera`]: crate::camera::Camera +Projection = {} ---@class OcclusionCulling --- Add this component to a view in order to enable experimental GPU occlusion--- culling.--- --- *Bevy's occlusion culling is currently marked as experimental.* There are--- known issues whereby, in rare circumstances, occlusion culling can result in--- meshes being culled that shouldn't be (i.e. meshes that turn invisible).--- Please try it out and report issues.--- --- *Occlusion culling* allows Bevy to avoid rendering objects that are fully--- behind other opaque or alpha tested objects. This is different from, and--- complements, depth fragment rejection as the `DepthPrepass` enables. While--- depth rejection allows Bevy to avoid rendering *pixels* that are behind--- other objects, the GPU still has to examine those pixels to reject them,--- which requires transforming the vertices of the objects and performing--- skinning if the objects were skinned. Occlusion culling allows the GPU to go--- a step further, avoiding even transforming the vertices of objects that it--- can quickly prove to be behind other objects.--- --- Occlusion culling inherently has some overhead, because Bevy must examine--- the objects' bounding boxes, and create an acceleration structure--- (hierarchical Z-buffer) to perform the occlusion tests. Therefore, occlusion--- culling is disabled by default. Only enable it if you measure it to be a--- speedup on your scene. Note that, because Bevy's occlusion culling runs on--- the GPU and is quite efficient, it's rare for occlusion culling to result in--- a significant slowdown.--- --- Occlusion culling currently requires a `DepthPrepass`. If no depth prepass--- is present on the view, the [`OcclusionCulling`] component will be ignored.--- Additionally, occlusion culling is currently incompatible with deferred--- shading; including both `DeferredPrepass` and [`OcclusionCulling`] results--- in unspecified behavior.--- --- The algorithm that Bevy uses is known as [*two-phase occlusion culling*].--- When you enable occlusion culling, Bevy splits the depth prepass into two:--- an *early* depth prepass and a *late* depth prepass. The early depth prepass--- renders all the meshes that were visible last frame to produce a--- conservative approximation of the depth buffer. Then, after producing an--- acceleration structure known as a hierarchical Z-buffer or depth pyramid,--- Bevy tests the bounding boxes of all meshes against that depth buffer. Those--- that can be quickly proven to be behind the geometry rendered during the--- early depth prepass are skipped entirely. The other potentially-visible--- meshes are rendered during the late prepass, and finally all the visible--- meshes are rendered as usual during the opaque, transparent, etc. passes.--- --- Unlike other occlusion culling systems you may be familiar with, Bevy's--- occlusion culling is fully dynamic and requires no baking step. The CPU--- overhead is minimal. Large skinned meshes and other dynamic objects can--- occlude other objects.--- --- [*two-phase occlusion culling*]:--- https://medium.com/@mil_kru/two-pass-occlusion-culling-4100edcad501 +OcclusionCulling = {} ---@class GlobalsUniform @@ -1746,42 +28350,51 @@ ---@field time ? number ---@field delta_time ? number ---@field frame_count ? integer +GlobalsUniform = {} ---@class Mesh2d --- A component for 2D meshes. Requires a [`MeshMaterial2d`] to be rendered, commonly using a [`ColorMaterial`].--- --- [`MeshMaterial2d`]: --- [`ColorMaterial`]: --- --- # Example--- --- ```ignore--- # use bevy_sprite::{ColorMaterial, Mesh2d, MeshMaterial2d};--- # use bevy_ecs::prelude::*;--- # use bevy_render::mesh::Mesh;--- # use bevy_color::palettes::basic::RED;--- # use bevy_asset::Assets;--- # use bevy_math::primitives::Circle;--- #--- // Spawn an entity with a mesh using `ColorMaterial`.--- fn setup(--- mut commands: Commands,--- mut meshes: ResMut>,--- mut materials: ResMut>,--- ) {--- commands.spawn((--- Mesh2d(meshes.add(Circle::new(50.0))),--- MeshMaterial2d(materials.add(ColorMaterial::from_color(RED))),--- ));--- }--- ``` ---@field [1] ? Handle +Mesh2d = {} ---@class Mesh3d --- A component for 3D meshes. Requires a [`MeshMaterial3d`] to be rendered, commonly using a [`StandardMaterial`].--- --- [`MeshMaterial3d`]: --- [`StandardMaterial`]: --- --- # Example--- --- ```ignore--- # use bevy_pbr::{Material, MeshMaterial3d, StandardMaterial};--- # use bevy_ecs::prelude::*;--- # use bevy_render::mesh::{Mesh, Mesh3d};--- # use bevy_color::palettes::basic::RED;--- # use bevy_asset::Assets;--- # use bevy_math::primitives::Capsule3d;--- #--- // Spawn an entity with a mesh using `StandardMaterial`.--- fn setup(--- mut commands: Commands,--- mut meshes: ResMut>,--- mut materials: ResMut>,--- ) {--- commands.spawn((--- Mesh3d(meshes.add(Capsule3d::default())),--- MeshMaterial3d(materials.add(StandardMaterial {--- base_color: RED.into(),--- ..Default::default()--- })),--- ));--- }--- ``` ---@field [1] ? Handle +Mesh3d = {} ---@class Aabb --- An axis-aligned bounding box, defined by:--- - a center,--- - the distances from the center to each faces along the axis,--- the faces are orthogonal to the axis.--- --- It is typically used as a component on an entity to represent the local space--- occupied by this entity, with faces orthogonal to its local axis.--- --- This component is notably used during "frustum culling", a process to determine--- if an entity should be rendered by a [`Camera`] if its bounding box intersects--- with the camera's [`Frustum`].--- --- It will be added automatically by the systems in [`CalculateBounds`] to entities that:--- - could be subject to frustum culling, for example with a [`Mesh3d`]--- or `Sprite` component,--- - don't have the [`NoFrustumCulling`] component.--- --- It won't be updated automatically if the space occupied by the entity changes,--- for example if the vertex positions of a [`Mesh3d`] are updated.--- --- [`Camera`]: crate::camera::Camera--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling--- [`CalculateBounds`]: crate::view::visibility::VisibilitySystems::CalculateBounds--- [`Mesh3d`]: crate::mesh::Mesh ---@field center ? Vec3A ---@field half_extents ? Vec3A +Aabb = {} ---@class CascadesFrusta +CascadesFrusta = {} ---@class CubemapFrusta +CubemapFrusta = {} ---@class Frustum --- A region of 3D space defined by the intersection of 6 [`HalfSpace`]s.--- --- Frustums are typically an apex-truncated square pyramid (a pyramid without the top) or a cuboid.--- --- Half spaces are ordered left, right, top, bottom, near, far. The normal vectors--- of the half-spaces point towards the interior of the frustum.--- --- A frustum component is used on an entity with a [`Camera`] component to--- determine which entities will be considered for rendering by this camera.--- All entities with an [`Aabb`] component that are not contained by (or crossing--- the boundary of) the frustum will not be rendered, and not be used in rendering computations.--- --- This process is called frustum culling, and entities can opt out of it using--- the [`NoFrustumCulling`] component.--- --- The frustum component is typically added automatically for cameras, either `Camera2d` or `Camera3d`.--- It is usually updated automatically by [`update_frusta`] from the--- [`CameraProjection`] component and [`GlobalTransform`] of the camera entity.--- --- [`Camera`]: crate::camera::Camera--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling--- [`update_frusta`]: crate::view::visibility::update_frusta--- [`CameraProjection`]: crate::camera::CameraProjection--- [`GlobalTransform`]: bevy_transform::components::GlobalTransform +Frustum = {} ---@class ShaderStorageBuffer --- A storage buffer that is prepared as a [`RenderAsset`] and uploaded to the GPU. +ShaderStorageBuffer = {} ---@class SyncToRenderWorld --- Marker component that indicates that its entity needs to be synchronized to the render world.--- --- This component is automatically added as a required component by [`ExtractComponentPlugin`] and [`SyncComponentPlugin`].--- For more information see [`SyncWorldPlugin`].--- --- NOTE: This component should persist throughout the entity's entire lifecycle.--- If this component is removed from its entity, the entity will be despawned.--- --- [`ExtractComponentPlugin`]: crate::extract_component::ExtractComponentPlugin--- [`SyncComponentPlugin`]: crate::sync_component::SyncComponentPlugin +SyncToRenderWorld = {} ---@class ColorGrading @@ -1790,6 +28403,7 @@ ---@field shadows ? ColorGradingSection ---@field midtones ? ColorGradingSection ---@field highlights ? ColorGradingSection +ColorGrading = {} ---@class ColorGradingGlobal @@ -1800,6 +28414,7 @@ ---@field hue ? number ---@field post_saturation ? number ---@field midtones_range ? Range +ColorGradingGlobal = {} ---@class ColorGradingSection @@ -1809,37 +28424,45 @@ ---@field gamma ? number ---@field gain ? number ---@field lift ? number +ColorGradingSection = {} ---@class Msaa --- Component for configuring the number of samples for [Multi-Sample Anti-Aliasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing)--- for a [`Camera`](crate::camera::Camera).--- --- Defaults to 4 samples. A higher number of samples results in smoother edges.--- --- Some advanced rendering features may require that MSAA is disabled.--- --- Note that the web currently only supports 1 or 4 samples. +Msaa = {} ---@class InheritedVisibility --- Whether or not an entity is visible in the hierarchy.--- This will not be accurate until [`VisibilityPropagate`] runs in the [`PostUpdate`] schedule.--- --- If this is false, then [`ViewVisibility`] should also be false.--- --- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate ---@field [1] ? boolean +InheritedVisibility = {} ---@class NoFrustumCulling --- Use this component to opt-out of built-in frustum culling for entities, see--- [`Frustum`].--- --- It can be used for example:--- - when a [`Mesh`] is updated but its [`Aabb`] is not, which might happen with animations,--- - when using some light effects, like wanting a [`Mesh`] out of the [`Frustum`]--- to appear in the reflection of a [`Mesh`] within. +NoFrustumCulling = {} ---@class ViewVisibility --- Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering.--- --- Each frame, this will be reset to `false` during [`VisibilityPropagate`] systems in [`PostUpdate`].--- Later in the frame, systems in [`CheckVisibility`] will mark any visible entities using [`ViewVisibility::set`].--- Because of this, values of this type will be marked as changed every frame, even when they do not change.--- --- If you wish to add custom visibility system that sets this value, make sure you add it to the [`CheckVisibility`] set.--- --- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate--- [`CheckVisibility`]: VisibilitySystems::CheckVisibility ---@field [1] ? boolean +ViewVisibility = {} ---@class Visibility --- User indication of whether an entity is visible. Propagates down the entity hierarchy.--- --- If an entity is hidden in this way, all [`Children`] (and all of their children and so on) who--- are set to [`Inherited`](Self::Inherited) will also be hidden.--- --- This is done by the `visibility_propagate_system` which uses the entity hierarchy and--- `Visibility` to set the values of each entity's [`InheritedVisibility`] component. +Visibility = {} ---@class VisibilityClass --- A bucket into which we group entities for the purposes of visibility.--- --- Bevy's various rendering subsystems (3D, 2D, UI, etc.) want to be able to--- quickly winnow the set of entities to only those that the subsystem is--- tasked with rendering, to avoid spending time examining irrelevant entities.--- At the same time, Bevy wants the [`check_visibility`] system to determine--- all entities' visibilities at the same time, regardless of what rendering--- subsystem is responsible for drawing them. Additionally, your application--- may want to add more types of renderable objects that Bevy determines--- visibility for just as it does for Bevy's built-in objects.--- --- The solution to this problem is *visibility classes*. A visibility class is--- a type, typically the type of a component, that represents the subsystem--- that renders it: for example, `Mesh3d`, `Mesh2d`, and `Sprite`. The--- [`VisibilityClass`] component stores the visibility class or classes that--- the entity belongs to. (Generally, an object will belong to only one--- visibility class, but in rare cases it may belong to multiple.)--- --- When adding a new renderable component, you'll typically want to write an--- add-component hook that adds the type ID of that component to the--- [`VisibilityClass`] array. See `custom_phase_item` for an example. ---@field [1] ? SmallVec +VisibilityClass = {} ---@class VisibleEntities --- Collection of entities visible from the current view.--- --- This component contains all entities which are visible from the currently--- rendered view. The collection is updated automatically by the [`VisibilitySystems::CheckVisibility`]--- system set. Renderers can use the equivalent [`RenderVisibleEntities`] to optimize rendering of--- a particular view, to prevent drawing items not visible from that view.--- --- This component is intended to be attached to the same entity as the [`Camera`] and--- the [`Frustum`] defining the view. +VisibleEntities = {} ---@class VisibilityRange @@ -1847,21 +28470,25 @@ ---@field start_margin ? Range ---@field end_margin ? Range ---@field use_aabb ? boolean +VisibilityRange = {} ---@class RenderLayers --- Describes which rendering layers an entity belongs to.--- --- Cameras with this component will only render entities with intersecting--- layers.--- --- Entities may belong to one or more layers, or no layer at all.--- --- The [`Default`] instance of `RenderLayers` contains layer `0`, the first layer.--- --- An entity with this component without any layers is invisible.--- --- Entities without this component belong to layer `0`. ---@field [1] ? SmallVec +RenderLayers = {} ---@class Screenshot --- A component that signals to the renderer to capture a screenshot this frame.--- --- This component should be spawned on a new entity with an observer that will trigger--- with [`ScreenshotCaptured`] when the screenshot is ready.--- --- Screenshots are captured asynchronously and may not be available immediately after the frame--- that the component is spawned on. The observer should be used to handle the screenshot when it--- is ready.--- --- Note that the screenshot entity will be despawned after the screenshot is captured and the--- observer is triggered.--- --- # Usage--- --- ```--- # use bevy_ecs::prelude::*;--- # use bevy_render::view::screenshot::{save_to_disk, Screenshot};--- --- fn take_screenshot(mut commands: Commands) {--- commands.spawn(Screenshot::primary_window())--- .observe(save_to_disk("screenshot.png"));--- }--- ``` ---@field [1] ? RenderTarget +Screenshot = {} ---@class ScreenshotCaptured ---@field [1] ? Image +ScreenshotCaptured = {} ---@class ColorMaterial @@ -1870,14 +28497,17 @@ ---@field alpha_mode ? AlphaMode2d ---@field uv_transform ? Affine2 ---@field texture ? Option +ColorMaterial = {} ---@class AlphaMode2d --- Sets how a 2d material's base color alpha channel is used for transparency.--- Currently, this only works with [`Mesh2d`]. Sprites are always transparent.--- --- This is very similar to [`AlphaMode`](bevy_render::alpha::AlphaMode) but this only applies to 2d meshes.--- We use a separate type because 2d doesn't support all the transparency modes that 3d does. +AlphaMode2d = {} ---@class Anchor --- How a sprite is positioned relative to its [`Transform`].--- It defaults to `Anchor::Center`. +Anchor = {} ---@class Sprite @@ -1891,10 +28521,12 @@ ---@field rect ? Option ---@field anchor ? Anchor ---@field image_mode ? SpriteImageMode +Sprite = {} ---@class SpriteImageMode --- Controls how the image is altered when scaled. +SpriteImageMode = {} ---@class BorderRect @@ -1903,10 +28535,12 @@ ---@field right ? number ---@field top ? number ---@field bottom ? number +BorderRect = {} ---@class SliceScaleMode --- Defines how a texture slice scales when resized +SliceScaleMode = {} ---@class TextureSlicer @@ -1915,24 +28549,29 @@ ---@field center_scale_mode ? SliceScaleMode ---@field sides_scale_mode ? SliceScaleMode ---@field max_corner_scale ? number +TextureSlicer = {} ---@class ReflectableScheduleLabel +ReflectableScheduleLabel = {} ---@class AppLifecycle --- Application lifetime events +AppLifecycle = {} ---@class CursorEntered --- An event that is sent whenever the user's cursor enters a window. ---@field window ? Entity +CursorEntered = {} ---@class CursorLeft --- An event that is sent whenever the user's cursor leaves a window. ---@field window ? Entity +CursorLeft = {} ---@class CursorMoved @@ -1940,71 +28579,85 @@ ---@field window ? Entity ---@field position ? Vec2 ---@field delta ? Option +CursorMoved = {} ---@class FileDragAndDrop --- Events related to files being dragged and dropped on a window. +FileDragAndDrop = {} ---@class Ime --- An Input Method Editor event.--- --- This event is the translated version of the `WindowEvent::Ime` from the `winit` crate.--- --- It is only sent if IME was enabled on the window with [`Window::ime_enabled`](crate::window::Window::ime_enabled). +Ime = {} ---@class RequestRedraw --- An event that indicates all of the application's windows should be redrawn,--- even if their control flow is set to `Wait` and there have been no window events. +RequestRedraw = {} ---@class WindowBackendScaleFactorChanged --- An event that indicates a window's OS-reported scale factor has changed. ---@field window ? Entity ---@field scale_factor ? number +WindowBackendScaleFactorChanged = {} ---@class WindowCloseRequested --- An event that is sent whenever the operating systems requests that a window--- be closed. This will be sent when the close button of the window is pressed.--- --- If the default [`WindowPlugin`] is used, these events are handled--- by closing the corresponding [`Window`].--- To disable this behavior, set `close_when_requested` on the [`WindowPlugin`]--- to `false`.--- --- [`WindowPlugin`]: crate::WindowPlugin--- [`Window`]: crate::Window ---@field window ? Entity +WindowCloseRequested = {} ---@class WindowClosed --- An event that is sent whenever a window is closed. This will be sent when--- the window entity loses its [`Window`](crate::window::Window) component or is despawned. ---@field window ? Entity +WindowClosed = {} ---@class WindowClosing --- An event that is sent whenever a window is closing. This will be sent when--- after a [`WindowCloseRequested`] event is received and the window is in the process of closing. ---@field window ? Entity +WindowClosing = {} ---@class WindowCreated --- An event that is sent whenever a new window is created.--- --- To create a new window, spawn an entity with a [`crate::Window`] on it. ---@field window ? Entity +WindowCreated = {} ---@class WindowDestroyed --- An event that is sent whenever a window is destroyed by the underlying window system.--- --- Note that if your application only has a single window, this event may be your last chance to--- persist state before the application terminates. ---@field window ? Entity +WindowDestroyed = {} ---@class WindowEvent --- Wraps all `bevy_window` and `bevy_input` events in a common enum.--- --- Read these events with `EventReader` if you need to--- access window events in the order they were received from the--- operating system. Otherwise, the event types are individually--- readable with `EventReader` (e.g. `EventReader`). +WindowEvent = {} ---@class WindowFocused --- An event that indicates a window has received or lost focus. ---@field window ? Entity ---@field focused ? boolean +WindowFocused = {} ---@class WindowMoved --- An event that is sent when a window is repositioned in physical pixels. ---@field window ? Entity ---@field position ? IVec2 +WindowMoved = {} ---@class WindowOccluded --- The window has been occluded (completely hidden from view).--- --- This is different to window visibility as it depends on--- whether the window is closed, minimized, set invisible,--- or fully occluded by another window.--- --- It is the translated version of [`WindowEvent::Occluded`] from the `winit` crate.--- --- [`WindowEvent::Occluded`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.Occluded ---@field window ? Entity ---@field occluded ? boolean +WindowOccluded = {} ---@class WindowResized @@ -2012,18 +28665,21 @@ ---@field window ? Entity ---@field width ? number ---@field height ? number +WindowResized = {} ---@class WindowScaleFactorChanged --- An event that indicates a window's scale factor has changed. ---@field window ? Entity ---@field scale_factor ? number +WindowScaleFactorChanged = {} ---@class WindowThemeChanged --- An event sent when the system theme changes for a window.--- --- This event is only sent when the window is relying on the system theme to control its appearance.--- i.e. It is only sent when [`Window::window_theme`](crate::window::Window::window_theme) is `None` and the system theme changes. ---@field window ? Entity ---@field theme ? WindowTheme +WindowThemeChanged = {} ---@class Monitor @@ -2035,6 +28691,7 @@ ---@field refresh_rate_millihertz ? Option ---@field scale_factor ? number ---@field video_modes ? Vec +Monitor = {} ---@class VideoMode @@ -2042,18 +28699,22 @@ ---@field physical_size ? UVec2 ---@field bit_depth ? integer ---@field refresh_rate_millihertz ? integer +VideoMode = {} ---@class SystemCursorIcon --- The icon to display for a window.--- --- Examples of all of these cursors can be found [here](https://www.w3schools.com/cssref/playit.php?filename=playcss_cursor&preval=crosshair).--- This `enum` is simply a copy of a similar `enum` found in [`winit`](https://docs.rs/winit/latest/winit/window/enum.CursorIcon.html).--- `winit`, in turn, is based upon the [CSS3 UI spec](https://www.w3.org/TR/css-ui-3/#cursor).--- --- See the [`window_settings`] example for usage.--- --- [`window_settings`]: https://github.com/bevyengine/bevy/blob/latest/examples/window/window_settings.rs +SystemCursorIcon = {} ---@class CompositeAlphaMode --- Specifies how the alpha channel of the textures should be handled during compositing, for a [`Window`]. +CompositeAlphaMode = {} ---@class CursorGrabMode --- Defines if and how the cursor is grabbed by a [`Window`].--- --- ## Platform-specific--- --- - **`Windows`** doesn't support [`CursorGrabMode::Locked`]--- - **`macOS`** doesn't support [`CursorGrabMode::Confined`]--- - **`iOS/Android`** don't have cursors.--- --- Since `Windows` and `macOS` have different [`CursorGrabMode`] support, we first try to set the grab mode that was asked for. If it doesn't work then use the alternate grab mode. +CursorGrabMode = {} ---@class CursorOptions @@ -2061,6 +28722,7 @@ ---@field visible ? boolean ---@field grab_mode ? CursorGrabMode ---@field hit_test ? boolean +CursorOptions = {} ---@class EnabledButtons @@ -2068,6 +28730,7 @@ ---@field minimize ? boolean ---@field maximize ? boolean ---@field close ? boolean +EnabledButtons = {} ---@class InternalWindowState @@ -2077,22 +28740,27 @@ ---@field drag_move_request ? boolean ---@field drag_resize_request ? Option ---@field physical_cursor_position ? Option +InternalWindowState = {} ---@class MonitorSelection --- References a screen monitor.--- --- Used when centering a [`Window`] on a monitor. +MonitorSelection = {} ---@class PresentMode --- Presentation mode for a [`Window`].--- --- The presentation mode specifies when a frame is presented to the window. The [`Fifo`]--- option corresponds to a traditional `VSync`, where the framerate is capped by the--- display refresh rate. Both [`Immediate`] and [`Mailbox`] are low-latency and are not--- capped by the refresh rate, but may not be available on all platforms. Tearing--- may be observed with [`Immediate`] mode, but will not be observed with [`Mailbox`] or--- [`Fifo`].--- --- [`AutoVsync`] or [`AutoNoVsync`] will gracefully fallback to [`Fifo`] when unavailable.--- --- [`Immediate`] or [`Mailbox`] will panic if not supported by the platform.--- --- [`Fifo`]: PresentMode::Fifo--- [`FifoRelaxed`]: PresentMode::FifoRelaxed--- [`Immediate`]: PresentMode::Immediate--- [`Mailbox`]: PresentMode::Mailbox--- [`AutoVsync`]: PresentMode::AutoVsync--- [`AutoNoVsync`]: PresentMode::AutoNoVsync +PresentMode = {} ---@class PrimaryWindow --- Marker [`Component`] for the window considered the primary window.--- --- Currently this is assumed to only exist on 1 entity at a time.--- --- [`WindowPlugin`](crate::WindowPlugin) will spawn a [`Window`] entity--- with this component if [`primary_window`](crate::WindowPlugin::primary_window)--- is `Some`. +PrimaryWindow = {} ---@class VideoModeSelection --- References an exclusive fullscreen video mode.--- --- Used when setting [`WindowMode::Fullscreen`] on a window. +VideoModeSelection = {} ---@class Window @@ -2136,22 +28804,27 @@ ---@field titlebar_show_buttons ? boolean ---@field prefers_home_indicator_hidden ? boolean ---@field prefers_status_bar_hidden ? boolean +Window = {} ---@class WindowLevel --- Specifies where a [`Window`] should appear relative to other overlapping windows (on top or under) .--- --- Levels are groups of windows with respect to their z-position.--- --- The relative ordering between windows in different window levels is fixed.--- The z-order of windows within the same window level may change dynamically on user interaction.--- --- ## Platform-specific--- --- - **iOS / Android / Web / Wayland:** Unsupported. +WindowLevel = {} ---@class WindowMode --- Defines the way a [`Window`] is displayed. +WindowMode = {} ---@class WindowPosition --- Defines where a [`Window`] should be placed on the screen. +WindowPosition = {} ---@class WindowRef --- Reference to a [`Window`], whether it be a direct link to a specific entity or--- a more vague defaulting choice. +WindowRef = {} ---@class WindowResizeConstraints @@ -2160,6 +28833,7 @@ ---@field min_height ? number ---@field max_width ? number ---@field max_height ? number +WindowResizeConstraints = {} ---@class WindowResolution @@ -2168,30 +28842,41 @@ ---@field physical_height ? integer ---@field scale_factor_override ? Option ---@field scale_factor ? number +WindowResolution = {} ---@class WindowTheme --- The [`Window`] theme variant to use. +WindowTheme = {} ---@class CursorIcon --- Insert into a window entity to set the cursor for that window. +CursorIcon = {} ---@class NonZeroU32 +NonZeroU32 = {} ---@class Cow +Cow = {} ---@class Arc +Arc = {} ---@class Range +Range = {} ---@class RangeInclusive + +RangeInclusive = {} + + diff --git a/crates/lad_backends/lua_language_server_lad_backend/bindings.lua/bindings.lua b/crates/lad_backends/lua_language_server_lad_backend/bindings.lua/bindings.lua deleted file mode 100644 index 73622c0f0e..0000000000 --- a/crates/lad_backends/lua_language_server_lad_backend/bindings.lua/bindings.lua +++ /dev/null @@ -1,2201 +0,0 @@ ----@meta ----@module "World" - ----@class World ---- The ECS world containing all Components, Resources and Systems. Main point of interaction with a Bevy App. - - ----@class ScriptComponentRegistration ---- A reference to a component type's reflection registration.--- --- In general think of this as a handle to a type.--- --- Not to be confused with script registered dynamic components, although this can point to a script registered component. ----@field registration ? ScriptTypeRegistration ----@field component_id ? ComponentId ----@field is_dynamic_script_component ? boolean - - ----@class ScriptQueryBuilder ---- The query builder is used to build ECS queries which retrieve spefific components filtered by specific conditions.--- --- For example:--- ```rust,ignore--- builder.component(componentA)--- .component(componentB)--- .with(componentC)--- .without(componentD) --- ```--- --- Will retrieve entities which:--- - Have componentA--- - Have componentB--- - Have componentC--- - Do not have componentD--- --- As well as references to components:--- - componentA--- - componentB - - ----@class ScriptQueryResult ---- A result from a query. - - ----@class ScriptResourceRegistration ---- A reference to a resource type's reflection registration.--- --- In general think of this as a handle to a type. ----@field registration ? ScriptTypeRegistration ----@field resource_id ? ComponentId - - ----@class ScriptTypeRegistration ---- A reference to a type which is not a `Resource` or `Component`.--- --- In general think of this as a handle to a type. - - ----@class ScriptSystemBuilder ---- A builder for systems living in scripts - - ----@class ScriptAttachment ---- Specifies a unique attachment of a script. These attachments are mapped to [`ContextKey`]'s depending on the context policy used. - - ----@class ReflectSchedule ---- A reflectable schedule. ----@field type_path ? string ----@field label ? ReflectableScheduleLabel - - ----@class ReflectSystem ---- A reflectable system. - - ----@class Color ---- An enumerated type that can represent any of the color types in this crate.--- --- This is useful when you need to store a color in a data structure that can't be generic over--- the color type.---
---
--- --- # Operations--- --- [`Color`] supports all the standard color operations, such as [mixing](Mix),--- [luminance](Luminance) and [hue](Hue) adjustment,--- and [diffing](EuclideanDistance). These operations delegate to the concrete color space contained--- by [`Color`], but will convert to [`Oklch`](Oklcha) for operations which aren't supported in the--- current space. After performing the operation, if a conversion was required, the result will be--- converted back into the original color space.--- --- ```rust--- # use bevy_color::{Hue, Color};--- let red_hsv = Color::hsv(0., 1., 1.);--- let red_srgb = Color::srgb(1., 0., 0.);--- --- // HSV has a definition of hue, so it will be returned.--- red_hsv.hue();--- --- // SRGB doesn't have a native definition for hue.--- // Converts to Oklch and returns that result.--- red_srgb.hue();--- ```--- --- [`Oklch`](Oklcha) has been chosen as the intermediary space in cases where conversion is required--- due to its perceptual uniformity and broad support for Bevy's color operations.--- To avoid the cost of repeated conversion, and ensure consistent results where that is desired,--- first convert this [`Color`] into your desired color space. - - ----@class Hsla ---- Color in Hue-Saturation-Lightness (HSL) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV).---
---
----@field hue ? number ----@field saturation ? number ----@field lightness ? number ----@field alpha ? number - - ----@class Hsva ---- Color in Hue-Saturation-Value (HSV) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV).---
---
----@field hue ? number ----@field saturation ? number ----@field value ? number ----@field alpha ? number - - ----@class Hwba ---- Color in Hue-Whiteness-Blackness (HWB) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HWB_color_model).---
---
----@field hue ? number ----@field whiteness ? number ----@field blackness ? number ----@field alpha ? number - - ----@class Laba ---- Color in LAB color space, with alpha---
---
----@field lightness ? number ----@field a ? number ----@field b ? number ----@field alpha ? number - - ----@class Lcha ---- Color in LCH color space, with alpha---
---
----@field lightness ? number ----@field chroma ? number ----@field hue ? number ----@field alpha ? number - - ----@class LinearRgba ---- Linear RGB color with alpha.---
---
----@field red ? number ----@field green ? number ----@field blue ? number ----@field alpha ? number - - ----@class Oklaba ---- Color in Oklab color space, with alpha---
---
----@field lightness ? number ----@field a ? number ----@field b ? number ----@field alpha ? number - - ----@class Oklcha ---- Color in Oklch color space, with alpha---
---
----@field lightness ? number ----@field chroma ? number ----@field hue ? number ----@field alpha ? number - - ----@class Srgba ---- Non-linear standard RGB with alpha.---
---
----@field red ? number ----@field green ? number ----@field blue ? number ----@field alpha ? number - - ----@class Xyza ---- [CIE 1931](https://en.wikipedia.org/wiki/CIE_1931_color_space) color space, also known as XYZ, with an alpha channel.---
---
----@field x ? number ----@field y ? number ----@field z ? number ----@field alpha ? number - - ----@class AutoExposureCompensationCurve ---- An auto exposure compensation curve.--- This curve is used to map the average log luminance of a scene to an--- exposure compensation value, to allow for fine control over the final exposure. ----@field min_log_lum ? number ----@field max_log_lum ? number ----@field min_compensation ? number ----@field max_compensation ? number ----@field lut ? [u8; 256] - - ----@class AutoExposure ---- Component that enables auto exposure for an HDR-enabled 2d or 3d camera.--- --- Auto exposure adjusts the exposure of the camera automatically to--- simulate the human eye's ability to adapt to different lighting conditions.--- --- Bevy's implementation builds a 64 bin histogram of the scene's luminance,--- and then adjusts the exposure so that the average brightness of the final--- render will be middle gray. Because it's using a histogram, some details can--- be selectively ignored or emphasized. Outliers like shadows and specular--- highlights can be ignored, and certain areas can be given more (or less)--- weight based on a mask.--- --- # Usage Notes--- --- **Auto Exposure requires compute shaders and is not compatible with WebGL2.** ----@field range ? RangeInclusive ----@field filter ? RangeInclusive ----@field speed_brighten ? number ----@field speed_darken ? number ----@field exponential_transition_distance ? number ----@field metering_mask ? Handle ----@field compensation_curve ? Handle - - ----@class Bloom ---- Applies a bloom effect to an HDR-enabled 2d or 3d camera.--- --- Bloom emulates an effect found in real cameras and the human eye,--- causing halos to appear around very bright parts of the scene.--- --- See also .--- --- # Usage Notes--- --- **Bloom is currently not compatible with WebGL2.**--- --- Often used in conjunction with `bevy_pbr::StandardMaterial::emissive` for 3d meshes.--- --- Bloom is best used alongside a tonemapping function that desaturates bright colors,--- such as [`crate::tonemapping::Tonemapping::TonyMcMapface`].--- --- Bevy's implementation uses a parametric curve to blend between a set of--- blurred (lower frequency) images generated from the camera's view.--- See for a visualization of the parametric curve--- used in Bevy as well as a visualization of the curve's respective scattering profile. ----@field intensity ? number ----@field low_frequency_boost ? number ----@field low_frequency_boost_curvature ? number ----@field high_pass_frequency ? number ----@field prefilter ? BloomPrefilter ----@field composite_mode ? BloomCompositeMode ----@field max_mip_dimension ? integer ----@field scale ? Vec2 - - ----@class BloomCompositeMode - - - ----@class BloomPrefilter ---- Applies a threshold filter to the input image to extract the brightest--- regions before blurring them and compositing back onto the original image.--- These settings are useful when emulating the 1990s-2000s game look.--- --- # Considerations--- * Changing these settings creates a physically inaccurate image--- * Changing these settings makes it easy to make the final result look worse--- * Non-default prefilter settings should be used in conjunction with [`BloomCompositeMode::Additive`] ----@field threshold ? number ----@field threshold_softness ? number - - ----@class ContrastAdaptiveSharpening ---- Applies a contrast adaptive sharpening (CAS) filter to the camera.--- --- CAS is usually used in combination with shader based anti-aliasing methods--- such as FXAA or TAA to regain some of the lost detail from the blurring that they introduce.--- --- CAS is designed to adjust the amount of sharpening applied to different areas of an image--- based on the local contrast. This can help avoid over-sharpening areas with high contrast--- and under-sharpening areas with low contrast.--- --- To use this, add the [`ContrastAdaptiveSharpening`] component to a 2D or 3D camera. ----@field enabled ? boolean ----@field sharpening_strength ? number ----@field denoise ? boolean - - ----@class DenoiseCas - ----@field [1] ? boolean - - ----@class Camera2d ---- A 2D camera component. Enables the 2D render graph for a [`Camera`]. - - ----@class Camera3d ---- A 3D camera component. Enables the main 3D render graph for a [`Camera`].--- --- The camera coordinate space is right-handed X-right, Y-up, Z-back.--- This means "forward" is -Z. ----@field depth_load_op ? Camera3dDepthLoadOp ----@field depth_texture_usages ? Camera3dDepthTextureUsage ----@field screen_space_specular_transmission_steps ? integer ----@field screen_space_specular_transmission_quality ? ScreenSpaceTransmissionQuality - - ----@class Camera3dDepthLoadOp ---- The depth clear operation to perform for the main 3d pass. - - ----@class Camera3dDepthTextureUsage - ----@field [1] ? integer - - ----@class ScreenSpaceTransmissionQuality ---- The quality of the screen space transmission blur effect, applied to whatever's “behind” transmissive--- objects when their `roughness` is greater than `0.0`.--- --- Higher qualities are more GPU-intensive.--- --- **Note:** You can get better-looking results at any quality level by enabling TAA. See: [`TemporalAntiAliasPlugin`](crate::experimental::taa::TemporalAntiAliasPlugin). - - ----@class DepthOfField ---- A component that enables a [depth of field] postprocessing effect when attached to a [`Camera3d`],--- simulating the focus of a camera lens.--- --- [depth of field]: https://en.wikipedia.org/wiki/Depth_of_field ----@field mode ? DepthOfFieldMode ----@field focal_distance ? number ----@field sensor_height ? number ----@field aperture_f_stops ? number ----@field max_circle_of_confusion_diameter ? number ----@field max_depth ? number - - ----@class DepthOfFieldMode ---- Controls the appearance of the effect. - - ----@class Fxaa ---- A component for enabling Fast Approximate Anti-Aliasing (FXAA)--- for a [`bevy_render::camera::Camera`]. ----@field enabled ? boolean ----@field edge_threshold ? Sensitivity ----@field edge_threshold_min ? Sensitivity - - ----@class Sensitivity - - - ----@class MotionBlur ---- A component that enables and configures motion blur when added to a camera.--- --- Motion blur is an effect that simulates how moving objects blur as they change position during--- the exposure of film, a sensor, or an eyeball.--- --- Because rendering simulates discrete steps in time, we use per-pixel motion vectors to estimate--- the path of objects between frames. This kind of implementation has some artifacts:--- - Fast moving objects in front of a stationary object or when in front of empty space, will not--- have their edges blurred.--- - Transparent objects do not write to depth or motion vectors, so they cannot be blurred.--- --- Other approaches, such as *A Reconstruction Filter for Plausible Motion Blur* produce more--- correct results, but are more expensive and complex, and have other kinds of artifacts. This--- implementation is relatively inexpensive and effective.--- --- # Usage--- --- Add the [`MotionBlur`] component to a camera to enable and configure motion blur for that--- camera.--- --- ```--- # use bevy_core_pipeline::{core_3d::Camera3d, motion_blur::MotionBlur};--- # use bevy_ecs::prelude::*;--- # fn test(mut commands: Commands) {--- commands.spawn((--- Camera3d::default(),--- MotionBlur::default(),--- ));--- # }--- ```` ----@field shutter_angle ? number ----@field samples ? integer - - ----@class OrderIndependentTransparencySettings ---- Used to identify which camera will use OIT to render transparent meshes--- and to configure OIT. ----@field layer_count ? integer ----@field alpha_threshold ? number - - ----@class ChromaticAberration ---- Adds colored fringes to the edges of objects in the scene.--- --- [Chromatic aberration] simulates the effect when lenses fail to focus all--- colors of light toward a single point. It causes rainbow-colored streaks to--- appear, which are especially apparent on the edges of objects. Chromatic--- aberration is commonly used for collision effects, especially in horror--- games.--- --- Bevy's implementation is based on that of *Inside* ([Gjøl & Svendsen 2016]).--- It's based on a customizable lookup texture, which allows for changing the--- color pattern. By default, the color pattern is simply a 3×1 pixel texture--- consisting of red, green, and blue, in that order, but you can change it to--- any image in order to achieve different effects.--- --- [Chromatic aberration]: https://en.wikipedia.org/wiki/Chromatic_aberration--- --- [Gjøl & Svendsen 2016]: https://github.com/playdeadgames/publications/blob/master/INSIDE/rendering_inside_gdc2016.pdf ----@field color_lut ? Handle ----@field intensity ? number ----@field max_samples ? integer - - ----@class DepthPrepass ---- If added to a [`crate::prelude::Camera3d`] then depth values will be copied to a separate texture available to the main pass. - - ----@class MotionVectorPrepass ---- If added to a [`crate::prelude::Camera3d`] then screen space motion vectors will be copied to a separate texture available to the main pass. - - ----@class NormalPrepass ---- If added to a [`crate::prelude::Camera3d`] then vertex world normals will be copied to a separate texture available to the main pass.--- Normals will have normal map textures already applied. - - ----@class Skybox ---- Adds a skybox to a 3D camera, based on a cubemap texture.--- --- Note that this component does not (currently) affect the scene's lighting.--- To do so, use `EnvironmentMapLight` alongside this component.--- --- See also . ----@field image ? Handle ----@field brightness ? number ----@field rotation ? Quat - - ----@class Smaa ---- A component for enabling Subpixel Morphological Anti-Aliasing (SMAA)--- for a [`bevy_render::camera::Camera`]. ----@field preset ? SmaaPreset - - ----@class SmaaPreset ---- A preset quality level for SMAA.--- --- Higher values are slower but result in a higher-quality image.--- --- The default value is *high*. - - ----@class TemporalAntiAliasing ---- Component to apply temporal anti-aliasing to a 3D perspective camera.--- --- Temporal anti-aliasing (TAA) is a form of image smoothing/filtering, like--- multisample anti-aliasing (MSAA), or fast approximate anti-aliasing (FXAA).--- TAA works by blending (averaging) each frame with the past few frames.--- --- # Tradeoffs--- --- Pros:--- * Filters more types of aliasing than MSAA, such as textures and singular bright pixels (specular aliasing)--- * Cost scales with screen/view resolution, unlike MSAA which scales with number of triangles--- * Greatly increases the quality of stochastic rendering techniques such as SSAO, certain shadow map sampling methods, etc--- --- Cons:--- * Chance of "ghosting" - ghostly trails left behind moving objects--- * Thin geometry, lighting detail, or texture lines may flicker noisily or disappear--- --- Because TAA blends past frames with the current frame, when the frames differ too much--- (such as with fast moving objects or camera cuts), ghosting artifacts may occur.--- --- Artifacts tend to be reduced at higher framerates and rendering resolution.--- --- # Usage Notes--- --- The [`TemporalAntiAliasPlugin`] must be added to your app.--- Any camera with this component must also disable [`Msaa`] by setting it to [`Msaa::Off`].--- --- [Currently](https://github.com/bevyengine/bevy/issues/8423), TAA cannot be used with [`bevy_render::camera::OrthographicProjection`].--- --- TAA also does not work well with alpha-blended meshes, as it requires depth writing to determine motion.--- --- It is very important that correct motion vectors are written for everything on screen.--- Failure to do so will lead to ghosting artifacts. For instance, if particle effects--- are added using a third party library, the library must either:--- --- 1. Write particle motion vectors to the motion vectors prepass texture--- 2. Render particles after TAA--- --- If no [`MipBias`] component is attached to the camera, TAA will add a `MipBias(-1.0)` component. ----@field reset ? boolean - - ----@class DebandDither ---- Enables a debanding shader that applies dithering to mitigate color banding in the final image for a given [`Camera`] entity. - - ----@class Tonemapping ---- Optionally enables a tonemapping shader that attempts to map linear input stimulus into a perceptually uniform image for a given [`Camera`] entity. - - ----@class ComponentId ---- A value which uniquely identifies the type of a [`Component`] or [`Resource`] within a--- [`World`].--- --- Each time a new `Component` type is registered within a `World` using--- e.g. [`World::register_component`] or [`World::register_component_with_descriptor`]--- or a Resource with e.g. [`World::init_resource`],--- a corresponding `ComponentId` is created to track it.--- --- While the distinction between `ComponentId` and [`TypeId`] may seem superficial, breaking them--- into two separate but related concepts allows components to exist outside of Rust's type system.--- Each Rust type registered as a `Component` will have a corresponding `ComponentId`, but additional--- `ComponentId`s may exist in a `World` to track components which cannot be--- represented as Rust types for scripting or other advanced use-cases.--- --- A `ComponentId` is tightly coupled to its parent `World`. Attempting to use a `ComponentId` from--- one `World` to access the metadata of a `Component` in a different `World` is undefined behavior--- and must not be attempted.--- --- Given a type `T` which implements [`Component`], the `ComponentId` for `T` can be retrieved--- from a `World` using [`World::component_id()`] or via [`Components::component_id()`]. Access--- to the `ComponentId` for a [`Resource`] is available via [`Components::resource_id()`]. ----@field [1] ? integer - - ----@class ComponentTicks ---- Records when a component or resource was added and when it was last mutably dereferenced (or added). ----@field added ? Tick ----@field changed ? Tick - - ----@class Tick ---- A value that tracks when a system ran relative to other systems.--- This is used to power change detection.--- --- *Note* that a system that hasn't been run yet has a `Tick` of 0. ----@field tick ? integer - - ----@class Entity ---- Lightweight identifier of an [entity](crate::entity).--- --- The identifier is implemented using a [generational index]: a combination of an index and a generation.--- This allows fast insertion after data removal in an array while minimizing loss of spatial locality.--- --- These identifiers are only valid on the [`World`] it's sourced from. Attempting to use an `Entity` to--- fetch entity components or metadata from a different world will either fail or return unexpected results.--- --- [generational index]: https://lucassardois.medium.com/generational-indices-guide-8e3c5f7fd594--- --- # Stability warning--- For all intents and purposes, `Entity` should be treated as an opaque identifier. The internal bit--- representation is liable to change from release to release as are the behaviors or performance--- characteristics of any of its trait implementations (i.e. `Ord`, `Hash`, etc.). This means that changes in--- `Entity`'s representation, though made readable through various functions on the type, are not considered--- breaking changes under [SemVer].--- --- In particular, directly serializing with `Serialize` and `Deserialize` make zero guarantee of long--- term wire format compatibility. Changes in behavior will cause serialized `Entity` values persisted--- to long term storage (i.e. disk, databases, etc.) will fail to deserialize upon being updated.--- --- # Usage--- --- This data type is returned by iterating a `Query` that has `Entity` as part of its query fetch type parameter ([learn more]).--- It can also be obtained by calling [`EntityCommands::id`] or [`EntityWorldMut::id`].--- --- ```--- # use bevy_ecs::prelude::*;--- # #[derive(Component)]--- # struct SomeComponent;--- fn setup(mut commands: Commands) {--- // Calling `spawn` returns `EntityCommands`.--- let entity = commands.spawn(SomeComponent).id();--- }--- --- fn exclusive_system(world: &mut World) {--- // Calling `spawn` returns `EntityWorldMut`.--- let entity = world.spawn(SomeComponent).id();--- }--- #--- # bevy_ecs::system::assert_is_system(setup);--- # bevy_ecs::system::assert_is_system(exclusive_system);--- ```--- --- 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.--- --- ```--- # use bevy_ecs::prelude::*;--- #--- # #[derive(Component)]--- # struct Expired;--- #--- fn dispose_expired_food(mut commands: Commands, query: Query>) {--- for food_entity in &query {--- commands.entity(food_entity).despawn();--- }--- }--- #--- # bevy_ecs::system::assert_is_system(dispose_expired_food);--- ```--- --- [learn more]: crate::system::Query#entity-id-access--- [`EntityCommands::id`]: crate::system::EntityCommands::id--- [`EntityWorldMut::id`]: crate::world::EntityWorldMut::id--- [`EntityCommands`]: crate::system::EntityCommands--- [`Query::get`]: crate::system::Query::get--- [`World`]: crate::world::World--- [SemVer]: https://semver.org/ - - ----@class EntityHash ---- A [`BuildHasher`] that results in a [`EntityHasher`]. - - ----@class EntityHashSet ---- A [`HashSet`] pre-configured to use [`EntityHash`] hashing. ----@field [1] ? HashSet - - ----@class DefaultQueryFilters ---- Default query filters work by excluding entities with certain components from most queries.--- --- If a query does not explicitly mention a given disabling component, it will not include entities with that component.--- To be more precise, this checks if the query's [`FilteredAccess`] contains the component,--- and if it does not, adds a [`Without`](crate::prelude::Without) filter for that component to the query.--- --- This resource is initialized in the [`World`] whenever a new world is created,--- with the [`Disabled`] component as a disabling component.--- --- Note that you can remove default query filters by overwriting the [`DefaultQueryFilters`] resource.--- This can be useful as a last resort escape hatch, but is liable to break compatibility with other libraries.--- --- See the [module docs](crate::entity_disabling) for more info.--- --- --- # Warning--- --- Default query filters are a global setting that affects all queries in the [`World`],--- and incur a small performance cost for each query.--- --- They can cause significant interoperability issues within the ecosystem,--- as users must be aware of each disabling component in use.--- --- Think carefully about whether you need to use a new disabling component,--- and clearly communicate their presence in any libraries you publish. ----@field disabling ? SmallVec - - ----@class Disabled ---- A marker component for disabled entities.--- --- Semantically, this component is used to mark entities that are temporarily disabled (typically for gameplay reasons),--- but will likely be re-enabled at some point.--- --- Like all disabling components, this only disables the entity itself,--- not its children or other entities that reference it.--- To disable an entire tree of entities, use [`EntityCommands::insert_recursive`](crate::prelude::EntityCommands::insert_recursive).--- --- Every [`World`] has a default query filter that excludes entities with this component,--- registered in the [`DefaultQueryFilters`] resource.--- See [the module docs] for more info.--- --- [the module docs]: crate::entity_disabling - - ----@class ChildOf ---- Stores the parent entity of this child entity with this component.--- --- This is a [`Relationship`] component, and creates the canonical--- "parent / child" hierarchy. This is the "source of truth" component, and it pairs with--- the [`Children`] [`RelationshipTarget`](crate::relationship::RelationshipTarget).--- --- This relationship should be used for things like:--- --- 1. Organizing entities in a scene--- 2. Propagating configuration or data inherited from a parent, such as "visibility" or "world-space global transforms".--- 3. Ensuring a hierarchy is despawned when an entity is despawned.--- --- [`ChildOf`] contains a single "target" [`Entity`]. When [`ChildOf`] is inserted on a "source" entity,--- the "target" entity will automatically (and immediately, via a component hook) have a [`Children`]--- component inserted, and the "source" entity will be added to that [`Children`] instance.--- --- If the [`ChildOf`] component is replaced with a different "target" entity, the old target's [`Children`]--- will be automatically (and immediately, via a component hook) be updated to reflect that change.--- --- Likewise, when the [`ChildOf`] component is removed, the "source" entity will be removed from the old--- target's [`Children`]. If this results in [`Children`] being empty, [`Children`] will be automatically removed.--- --- When a parent is despawned, all children (and their descendants) will _also_ be despawned.--- --- You can create parent-child relationships in a variety of ways. The most direct way is to insert a [`ChildOf`] component:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let root = world.spawn_empty().id();--- let child1 = world.spawn(ChildOf(root)).id();--- let child2 = world.spawn(ChildOf(root)).id();--- let grandchild = world.spawn(ChildOf(child1)).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- --- world.entity_mut(child2).remove::();--- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1]);--- --- world.entity_mut(root).despawn();--- assert!(world.get_entity(root).is_err());--- assert!(world.get_entity(child1).is_err());--- assert!(world.get_entity(grandchild).is_err());--- ```--- --- However if you are spawning many children, you might want to use the [`EntityWorldMut::with_children`] helper instead:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let mut child1 = Entity::PLACEHOLDER;--- let mut child2 = Entity::PLACEHOLDER;--- let mut grandchild = Entity::PLACEHOLDER;--- let root = world.spawn_empty().with_children(|p| {--- child1 = p.spawn_empty().with_children(|p| {--- grandchild = p.spawn_empty().id();--- }).id();--- child2 = p.spawn_empty().id();--- }).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- ```--- --- [`Relationship`]: crate::relationship::Relationship ----@field [1] ? Entity - - ----@class Children ---- Tracks which entities are children of this parent entity.--- --- A [`RelationshipTarget`] collection component that is populated--- with entities that "target" this entity with the [`ChildOf`] [`Relationship`] component.--- --- Together, these components form the "canonical parent-child hierarchy". See the [`ChildOf`] component for the full--- description of this relationship and instructions on how to use it.--- --- # Usage--- --- Like all [`RelationshipTarget`] components, this data should not be directly manipulated to avoid desynchronization.--- Instead, modify the [`ChildOf`] components on the "source" entities.--- --- To access the children of an entity, you can iterate over the [`Children`] component,--- using the [`IntoIterator`] trait.--- For more complex access patterns, see the [`RelationshipTarget`] trait.--- --- [`Relationship`]: crate::relationship::Relationship--- [`RelationshipTarget`]: crate::relationship::RelationshipTarget ----@field [1] ? Vec - - ----@class Identifier ---- A unified identifier for all entity and similar IDs.--- --- Has the same size as a `u64` integer, but the layout is split between a 32-bit low--- segment, a 31-bit high segment, and the significant bit reserved as type flags to denote--- entity kinds. - - ----@class Name ---- Component used to identify an entity. Stores a hash for faster comparisons.--- --- The hash is eagerly re-computed upon each update to the name.--- --- [`Name`] should not be treated as a globally unique identifier for entities,--- as multiple entities can have the same name. [`Entity`] should be--- used instead as the default unique identifier. ----@field hash ? integer ----@field name ? Cow - - ----@class RemovedComponentEntity ---- Wrapper around [`Entity`] for [`RemovedComponents`].--- Internally, `RemovedComponents` uses these as an `Events`. ----@field [1] ? Entity - - ----@class ButtonState ---- The current "press" state of an element - - ----@class AxisSettings ---- Settings for a [`GamepadAxis`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for an axis.--- Values that are higher than `livezone_upperbound` will be rounded up to 1.0.--- Values that are lower than `livezone_lowerbound` will be rounded down to -1.0.--- Values that are in-between `deadzone_lowerbound` and `deadzone_upperbound` will be rounded to 0.0.--- Otherwise, values will be linearly rescaled to fit into the sensitivity range.--- For example, a value that is one fourth of the way from `deadzone_upperbound` to `livezone_upperbound` will be scaled to 0.25.--- --- The valid range is `[-1.0, 1.0]`. ----@field livezone_upperbound ? number ----@field deadzone_upperbound ? number ----@field deadzone_lowerbound ? number ----@field livezone_lowerbound ? number ----@field threshold ? number - - ----@class ButtonAxisSettings ---- Settings for a [`GamepadButton`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for a button axis.--- --- ## Logic--- --- - Values that are higher than or equal to `high` will be rounded to 1.0.--- - Values that are lower than or equal to `low` will be rounded to 0.0.--- - Otherwise, values will not be rounded.--- --- The valid range is from 0.0 to 1.0, inclusive. ----@field high ? number ----@field low ? number ----@field threshold ? number - - ----@class ButtonSettings ---- Manages settings for gamepad buttons.--- --- It is used inside [`GamepadSettings`] to define the threshold for a [`GamepadButton`]--- to be considered pressed or released. A button is considered pressed if the `press_threshold`--- value is surpassed and released if the `release_threshold` value is undercut.--- --- Allowed values: `0.0 <= ``release_threshold`` <= ``press_threshold`` <= 1.0` ----@field press_threshold ? number ----@field release_threshold ? number - - ----@class Gamepad ---- Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`].--- --- An entity with this component is spawned automatically after [`GamepadConnectionEvent`]--- and updated by [`gamepad_event_processing_system`].--- --- See also [`GamepadSettings`] for configuration.--- --- # Examples--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadAxis, GamepadButton};--- # use bevy_ecs::system::Query;--- # use bevy_ecs::name::Name;--- #--- fn gamepad_usage_system(gamepads: Query<(&Name, &Gamepad)>) {--- for (name, gamepad) in &gamepads {--- println!("{name}");--- --- if gamepad.just_pressed(GamepadButton::North) {--- println!("{} just pressed North", name)--- }--- --- if let Some(left_stick_x) = gamepad.get(GamepadAxis::LeftStickX) {--- println!("left stick X: {}", left_stick_x)--- }--- }--- }--- ``` ----@field vendor_id ? Option ----@field product_id ? Option ----@field digital ? ButtonInput ----@field analog ? Axis - - ----@class GamepadAxis ---- Represents gamepad input types that are mapped in the range [-1.0, 1.0].--- --- ## Usage--- --- This is used to determine which axis has changed its value when receiving a--- gamepad axis event. It is also used in the [`Gamepad`] component. - - ----@class GamepadAxisChangedEvent ---- [`GamepadAxis`] event triggered by an analog state change. ----@field entity ? Entity ----@field axis ? GamepadAxis ----@field value ? number - - ----@class GamepadButton ---- Represents gamepad input types that are mapped in the range [0.0, 1.0].--- --- ## Usage--- --- This is used to determine which button has changed its value when receiving gamepad button events.--- It is also used in the [`Gamepad`] component. - - ----@class GamepadButtonChangedEvent ---- [`GamepadButton`] event triggered by an analog state change. ----@field entity ? Entity ----@field button ? GamepadButton ----@field state ? ButtonState ----@field value ? number - - ----@class GamepadButtonStateChangedEvent ---- [`GamepadButton`] event triggered by a digital state change. ----@field entity ? Entity ----@field button ? GamepadButton ----@field state ? ButtonState - - ----@class GamepadConnection ---- The connection status of a gamepad. - - ----@class GamepadConnectionEvent ---- A Gamepad connection event. Created when a connection to a gamepad--- is established and when a gamepad is disconnected. ----@field gamepad ? Entity ----@field connection ? GamepadConnection - - ----@class GamepadEvent ---- A gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`GamepadButtonChangedEvent`] and [`GamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event is produced by `bevy_input`. - - ----@class GamepadInput ---- Encapsulation over [`GamepadAxis`] and [`GamepadButton`]. - - ----@class GamepadRumbleIntensity ---- The intensity at which a gamepad's force-feedback motors may rumble. ----@field strong_motor ? number ----@field weak_motor ? number - - ----@class GamepadRumbleRequest ---- An event that controls force-feedback rumbling of a [`Gamepad`] [`entity`](Entity).--- --- # Notes--- --- Does nothing if the gamepad or platform does not support rumble.--- --- # Example--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadRumbleRequest, GamepadRumbleIntensity};--- # use bevy_ecs::prelude::{EventWriter, Res, Query, Entity, With};--- # use core::time::Duration;--- fn rumble_gamepad_system(--- mut rumble_requests: EventWriter,--- gamepads: Query>,--- ) {--- for entity in gamepads.iter() {--- rumble_requests.write(GamepadRumbleRequest::Add {--- gamepad: entity,--- intensity: GamepadRumbleIntensity::MAX,--- duration: Duration::from_secs_f32(0.5),--- });--- }--- }--- ``` - - ----@class GamepadSettings ---- Gamepad settings component.--- --- ## Usage--- --- It is used to create a `bevy` component that stores the settings of [`GamepadButton`] and [`GamepadAxis`] in [`Gamepad`].--- If no user defined [`ButtonSettings`], [`AxisSettings`], or [`ButtonAxisSettings`]--- are defined, the default settings of each are used as a fallback accordingly.--- --- ## Note--- --- The [`GamepadSettings`] are used to determine when raw gamepad events--- should register. Events that don't meet the change thresholds defined in [`GamepadSettings`]--- will not register. To modify these settings, mutate the corresponding component. ----@field default_button_settings ? ButtonSettings ----@field default_axis_settings ? AxisSettings ----@field default_button_axis_settings ? ButtonAxisSettings ----@field button_settings ? HashMap ----@field axis_settings ? HashMap ----@field button_axis_settings ? HashMap - - ----@class RawGamepadAxisChangedEvent ---- [`GamepadAxis`] changed event unfiltered by [`GamepadSettings`]. ----@field gamepad ? Entity ----@field axis ? GamepadAxis ----@field value ? number - - ----@class RawGamepadButtonChangedEvent ---- [`GamepadButton`] changed event unfiltered by [`GamepadSettings`]. ----@field gamepad ? Entity ----@field button ? GamepadButton ----@field value ? number - - ----@class RawGamepadEvent ---- A raw gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`RawGamepadButtonChangedEvent`] and [`RawGamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event type is used by `bevy_input` to feed its components. - - ----@class DoubleTapGesture ---- Double tap gesture.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first - - ----@class PanGesture ---- Pan gesture.--- --- ## Platform-specific--- --- - On **`iOS`**, must be enabled first ----@field [1] ? Vec2 - - ----@class PinchGesture ---- Two-finger pinch gesture, often used for magnifications.--- --- Positive delta values indicate magnification (zooming in) and--- negative delta values indicate shrinking (zooming out).--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first ----@field [1] ? number - - ----@class RotationGesture ---- Two-finger rotation gesture.--- --- Positive delta values indicate rotation counterclockwise and--- negative delta values indicate rotation clockwise.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first ----@field [1] ? number - - ----@class Key ---- The logical key code of a [`KeyboardInput`].--- --- ## Technical--- --- Its values map 1 to 1 to winit's Key. - - ----@class KeyCode ---- The key code of a [`KeyboardInput`].--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `Res>`.--- --- Code representing the location of a physical key--- This mostly conforms to the UI Events Specification's [`KeyboardEvent.code`] with a few--- exceptions:--- - The keys that the specification calls `MetaLeft` and `MetaRight` are named `SuperLeft` and--- `SuperRight` here.--- - The key that the specification calls "Super" is reported as `Unidentified` here.--- --- [`KeyboardEvent.code`]: https://w3c.github.io/uievents-code/#code-value-tables--- --- ## Updating--- --- The resource is updated inside of the [`keyboard_input_system`]. - - ----@class KeyboardFocusLost ---- Gets generated from `bevy_winit::winit_runner`--- --- Used for clearing all cached states to avoid having 'stuck' key presses--- when, for example, switching between windows with 'Alt-Tab' or using any other--- OS specific key combination that leads to Bevy window losing focus and not receiving any--- input events - - ----@class KeyboardInput ---- A keyboard input event.--- --- This event is the translated version of the `WindowEvent::KeyboardInput` from the `winit` crate.--- It is available to the end user and can be used for game logic.--- --- ## Usage--- --- The event is consumed inside of the [`keyboard_input_system`]--- to update the [`ButtonInput`](ButtonInput) resource. ----@field key_code ? KeyCode ----@field logical_key ? Key ----@field state ? ButtonState ----@field text ? Option ----@field repeat ? boolean ----@field window ? Entity - - ----@class NativeKey ---- Contains the platform-native logical key identifier, known as keysym.--- --- Exactly what that means differs from platform to platform, but the values are to some degree--- tied to the currently active keyboard layout. The same key on the same keyboard may also report--- different values on different platforms, which is one of the reasons this is a per-platform--- enum.--- --- This enum is primarily used to store raw keysym when Winit doesn't map a given native logical--- key identifier to a meaningful [`Key`] variant. This lets you use [`Key`], and let the user--- define keybinds which work in the presence of identifiers we haven't mapped for you yet. - - ----@class NativeKeyCode ---- Contains the platform-native physical key identifier--- --- The exact values vary from platform to platform (which is part of why this is a per-platform--- enum), but the values are primarily tied to the key's physical location on the keyboard.--- --- This enum is primarily used to store raw keycodes when Winit doesn't map a given native--- physical key identifier to a meaningful [`KeyCode`] variant. In the presence of identifiers we--- haven't mapped for you yet, this lets you use [`KeyCode`] to:--- --- - Correctly match key press and release events.--- - On non-web platforms, support assigning keybinds to virtually any key through a UI. - - ----@class AccumulatedMouseMotion ---- Tracks how much the mouse has moved every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseMotion`] events received this frame. ----@field delta ? Vec2 - - ----@class AccumulatedMouseScroll ---- Tracks how much the mouse has scrolled every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseWheel`] events received this frame. ----@field unit ? MouseScrollUnit ----@field delta ? Vec2 - - ----@class MouseButton ---- A button on a mouse device.--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `bevy`--- resource.--- --- ## Updating--- --- The resource is updated inside of the [`mouse_button_input_system`]. - - ----@class MouseButtonInput ---- A mouse button input event.--- --- This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate.--- --- ## Usage--- --- The event is read inside of the [`mouse_button_input_system`]--- to update the [`ButtonInput`] resource. ----@field button ? MouseButton ----@field state ? ButtonState ----@field window ? Entity - - ----@class MouseMotion ---- An event reporting the change in physical position of a pointing device.--- --- This represents raw, unfiltered physical motion.--- It is the translated version of [`DeviceEvent::MouseMotion`] from the `winit` crate.--- --- All pointing devices connected to a single machine at the same time can emit the event independently.--- However, the event data does not make it possible to distinguish which device it is referring to.--- --- [`DeviceEvent::MouseMotion`]: https://docs.rs/winit/latest/winit/event/enum.DeviceEvent.html#variant.MouseMotion ----@field delta ? Vec2 - - ----@class MouseScrollUnit ---- The scroll unit.--- --- Describes how a value of a [`MouseWheel`] event has to be interpreted.--- --- The value of the event can either be interpreted as the amount of lines or the amount of pixels--- to scroll. - - ----@class MouseWheel ---- A mouse wheel event.--- --- This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate. ----@field unit ? MouseScrollUnit ----@field x ? number ----@field y ? number ----@field window ? Entity - - ----@class ForceTouch ---- A force description of a [`Touch`] input. - - ----@class TouchInput ---- A touch input event.--- --- ## Logic--- --- Every time the user touches the screen, a new [`TouchPhase::Started`] event with an unique--- identifier for the finger is generated. When the finger is lifted, the [`TouchPhase::Ended`]--- event is generated with the same finger id.--- --- After a [`TouchPhase::Started`] event has been emitted, there may be zero or more [`TouchPhase::Moved`]--- events when the finger is moved or the touch pressure changes.--- --- The finger id may be reused by the system after an [`TouchPhase::Ended`] event. The user--- should assume that a new [`TouchPhase::Started`] event received with the same id has nothing--- to do with the old finger and is a new finger.--- --- A [`TouchPhase::Canceled`] event is emitted when the system has canceled tracking this--- touch, such as when the window loses focus, or on iOS if the user moves the--- device against their face.--- --- ## Note--- --- This event is the translated version of the `WindowEvent::Touch` from the `winit` crate.--- It is available to the end user and can be used for game logic. ----@field phase ? TouchPhase ----@field position ? Vec2 ----@field window ? Entity ----@field force ? Option ----@field id ? integer - - ----@class TouchPhase ---- A phase of a [`TouchInput`].--- --- ## Usage--- --- It is used to describe the phase of the touch input that is currently active.--- This includes a phase that indicates that a touch input has started or ended,--- or that a finger has moved. There is also a canceled phase that indicates that--- the system canceled the tracking of the finger. - - ----@class AspectRatio ---- An `AspectRatio` is the ratio of width to height. ----@field [1] ? number - - ----@class Aabb2d ---- A 2D axis-aligned bounding box, or bounding rectangle ----@field min ? Vec2 ----@field max ? Vec2 - - ----@class BoundingCircle ---- A bounding circle ----@field center ? Vec2 ----@field circle ? Circle - - ----@class Aabb3d ---- A 3D axis-aligned bounding box ----@field min ? Vec3A ----@field max ? Vec3A - - ----@class BoundingSphere ---- A bounding sphere ----@field center ? Vec3A ----@field sphere ? Sphere - - ----@class AabbCast2d ---- An intersection test that casts an [`Aabb2d`] along a ray. ----@field ray ? RayCast2d ----@field aabb ? Aabb2d - - ----@class BoundingCircleCast ---- An intersection test that casts a [`BoundingCircle`] along a ray. ----@field ray ? RayCast2d ----@field circle ? BoundingCircle - - ----@class RayCast2d ---- A raycast intersection test for 2D bounding volumes ----@field ray ? Ray2d ----@field max ? number ----@field direction_recip ? Vec2 - - ----@class AabbCast3d ---- An intersection test that casts an [`Aabb3d`] along a ray. ----@field ray ? RayCast3d ----@field aabb ? Aabb3d - - ----@class BoundingSphereCast ---- An intersection test that casts a [`BoundingSphere`] along a ray. ----@field ray ? RayCast3d ----@field sphere ? BoundingSphere - - ----@class RayCast3d ---- A raycast intersection test for 3D bounding volumes ----@field origin ? Vec3A ----@field direction ? Dir3A ----@field max ? number ----@field direction_recip ? Vec3A - - ----@class CompassOctant ---- A compass enum with 8 directions.--- ```text--- N (North)--- ▲--- NW │ NE--- ╲ │ ╱--- W (West) ┼─────► E (East)--- ╱ │ ╲--- SW │ SE--- ▼--- S (South)--- ``` - - ----@class CompassQuadrant ---- A compass enum with 4 directions.--- ```text--- N (North)--- ▲--- │--- │--- W (West) ┼─────► E (East)--- │--- │--- ▼--- S (South)--- ``` - - ----@class EaseFunction ---- Curve functions over the [unit interval], commonly used for easing transitions.--- --- `EaseFunction` can be used on its own to interpolate between `0.0` and `1.0`.--- It can also be combined with [`EasingCurve`] to interpolate between other--- intervals and types, including vectors and rotations.--- --- # Example--- --- [`sample`] the smoothstep function at various points. This will return `None`--- if the parameter is outside the unit interval.--- --- ```--- # use bevy_math::prelude::*;--- let f = EaseFunction::SmoothStep;--- --- assert_eq!(f.sample(-1.0), None);--- assert_eq!(f.sample(0.0), Some(0.0));--- assert_eq!(f.sample(0.5), Some(0.5));--- assert_eq!(f.sample(1.0), Some(1.0));--- assert_eq!(f.sample(2.0), None);--- ```--- --- [`sample_clamped`] will clamp the parameter to the unit interval, so it--- always returns a value.--- --- ```--- # use bevy_math::prelude::*;--- # let f = EaseFunction::SmoothStep;--- assert_eq!(f.sample_clamped(-1.0), 0.0);--- assert_eq!(f.sample_clamped(0.0), 0.0);--- assert_eq!(f.sample_clamped(0.5), 0.5);--- assert_eq!(f.sample_clamped(1.0), 1.0);--- assert_eq!(f.sample_clamped(2.0), 1.0);--- ```--- --- [`sample`]: EaseFunction::sample--- [`sample_clamped`]: EaseFunction::sample_clamped--- [unit interval]: `Interval::UNIT` - - ----@class JumpAt ---- Configuration options for the [`EaseFunction::Steps`] curves. This closely replicates the--- [CSS step function specification].--- --- [CSS step function specification]: https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#description - - ----@class Interval ---- A nonempty closed interval, possibly unbounded in either direction.--- --- In other words, the interval may stretch all the way to positive or negative infinity, but it--- will always have some nonempty interior. ----@field start ? number ----@field end ? number - - ----@class Dir2 ---- A normalized vector pointing in a direction in 2D space ----@field [1] ? Vec2 - - ----@class Dir3 ---- A normalized vector pointing in a direction in 3D space ----@field [1] ? Vec3 - - ----@class Dir3A ---- A normalized SIMD vector pointing in a direction in 3D space.--- --- This type stores a 16 byte aligned [`Vec3A`].--- This may or may not be faster than [`Dir3`]: make sure to benchmark! ----@field [1] ? Vec3A - - ----@class FloatOrd ---- A wrapper for floats that implements [`Ord`], [`Eq`], and [`Hash`] traits.--- --- This is a work around for the fact that the IEEE 754-2008 standard,--- implemented by Rust's [`f32`] type,--- doesn't define an ordering for [`NaN`](f32::NAN),--- and `NaN` is not considered equal to any other `NaN`.--- --- Wrapping a float with `FloatOrd` breaks conformance with the standard--- by sorting `NaN` as less than all other numbers and equal to any other `NaN`. ----@field [1] ? number - - ----@class Isometry2d ---- An isometry in two dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(2). This includes translation and rotation, but excludes reflection.--- --- For the three-dimensional version, see [`Isometry3d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_abs_diff_eq;--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- let point = Vec2::new(4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_eq!(result, Vec2::new(-2.0, 5.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- # let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- # let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- # let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let circle_iso = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let rectangle_iso = Isometry2d::from_rotation(Rot2::degrees(90.0));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = circle_iso.inverse() * rectangle_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = circle_iso.inverse_mul(rectangle_iso);--- ``` ----@field rotation ? Rot2 ----@field translation ? Vec2 - - ----@class Isometry3d ---- An isometry in three dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(3). This includes translation and rotation, but excludes reflection.--- --- For the two-dimensional version, see [`Isometry2d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- let point = Vec3::new(4.0, 4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_relative_eq!(result, Vec3::new(-2.0, 5.0, 7.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- # let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- # let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- # let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let sphere_iso = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let cuboid_iso = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = sphere_iso.inverse() * cuboid_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = sphere_iso.inverse_mul(cuboid_iso);--- ``` ----@field rotation ? Quat ----@field translation ? Vec3A - - ----@class Annulus ---- A primitive shape formed by the region between two circles, also known as a ring. ----@field inner_circle ? Circle ----@field outer_circle ? Circle - - ----@class Arc2d ---- A primitive representing an arc between two points on a circle.--- --- An arc has no area.--- If you want to include the portion of a circle's area swept out by the arc,--- use the pie-shaped [`CircularSector`].--- If you want to include only the space inside the convex hull of the arc,--- use the bowl-shaped [`CircularSegment`].--- --- The arc is drawn starting from [`Vec2::Y`], extending by `half_angle` radians on--- either side. The center of the circle is the origin [`Vec2::ZERO`]. Note that this--- means that the origin may not be within the `Arc2d`'s convex hull.--- --- **Warning:** Arcs with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- It is recommended to normalize arcs to have an angle in [0, 2π]. ----@field radius ? number ----@field half_angle ? number - - ----@class Capsule2d ---- A 2D capsule primitive, also known as a stadium or pill shape.--- --- A two-dimensional capsule is defined as a neighborhood of points at a distance (radius) from a line ----@field radius ? number ----@field half_length ? number - - ----@class Circle ---- A circle primitive, representing the set of points some distance from the origin ----@field radius ? number - - ----@class CircularSector ---- A primitive representing a circular sector: a pie slice of a circle.--- --- The segment is positioned so that it always includes [`Vec2::Y`] and is vertically symmetrical.--- To orient the sector differently, apply a rotation.--- The sector is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- --- **Warning:** Circular sectors with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular sectors to have an angle in [0, 2π]. ----@field arc ? Arc2d - - ----@class CircularSegment ---- A primitive representing a circular segment:--- the area enclosed by the arc of a circle and its chord (the line between its endpoints).--- --- The segment is drawn starting from [`Vec2::Y`], extending equally on either side.--- To orient the segment differently, apply a rotation.--- The segment is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- When positioning a segment, the [`apothem`](Self::apothem) function may be particularly useful.--- --- **Warning:** Circular segments with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular segments to have an angle in [0, 2π]. ----@field arc ? Arc2d - - ----@class Ellipse ---- An ellipse primitive, which is like a circle, but the width and height can be different ----@field half_size ? Vec2 - - ----@class Line2d ---- An infinite line going through the origin along a direction in 2D space.--- --- For a finite line: [`Segment2d`] ----@field direction ? Dir2 - - ----@class Plane2d ---- An unbounded plane in 2D space. It forms a separating surface through the origin,--- stretching infinitely far ----@field normal ? Dir2 - - ----@class Rectangle ---- A rectangle primitive, which is like a square, except that the width and height can be different ----@field half_size ? Vec2 - - ----@class RegularPolygon ---- A polygon centered on the origin where all vertices lie on a circle, equally far apart. ----@field circumcircle ? Circle ----@field sides ? integer - - ----@class Rhombus ---- A rhombus primitive, also known as a diamond shape.--- A four sided polygon, centered on the origin, where opposite sides are parallel but without--- requiring right angles. ----@field half_diagonals ? Vec2 - - ----@class Segment2d ---- A line segment defined by two endpoints in 2D space. ----@field vertices ? [glam::Vec2; 2] - - ----@class Triangle2d ---- A triangle in 2D space ----@field vertices ? [glam::Vec2; 3] - - ----@class Capsule3d ---- A 3D capsule primitive centered on the origin--- A three-dimensional capsule is defined as a surface at a distance (radius) from a line ----@field radius ? number ----@field half_length ? number - - ----@class Cone ---- A cone primitive centered on the midpoint between the tip of the cone and the center of its base.--- --- The cone is oriented with its tip pointing towards the Y axis. ----@field radius ? number ----@field height ? number - - ----@class ConicalFrustum ---- A conical frustum primitive.--- A conical frustum can be created--- by slicing off a section of a cone. ----@field radius_top ? number ----@field radius_bottom ? number ----@field height ? number - - ----@class Cuboid ---- A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not--- required to be the same. ----@field half_size ? Vec3 - - ----@class Cylinder ---- A cylinder primitive centered on the origin ----@field radius ? number ----@field half_height ? number - - ----@class InfinitePlane3d ---- An unbounded plane in 3D space. It forms a separating surface through the origin,--- stretching infinitely far ----@field normal ? Dir3 - - ----@class Line3d ---- An infinite line going through the origin along a direction in 3D space.--- --- For a finite line: [`Segment3d`] ----@field direction ? Dir3 - - ----@class Plane3d ---- A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width. ----@field normal ? Dir3 ----@field half_size ? Vec2 - - ----@class Segment3d ---- A line segment defined by two endpoints in 3D space. ----@field vertices ? [glam::Vec3; 2] - - ----@class Sphere ---- A sphere primitive, representing the set of all points some distance from the origin ----@field radius ? number - - ----@class Tetrahedron ---- A tetrahedron primitive. ----@field vertices ? [glam::Vec3; 4] - - ----@class Torus ---- A torus primitive, often representing a ring or donut shape--- The set of points some distance from a circle centered at the origin ----@field minor_radius ? number ----@field major_radius ? number - - ----@class Triangle3d ---- A 3D triangle primitive. ----@field vertices ? [glam::Vec3; 3] - - ----@class Ray2d ---- An infinite half-line starting at `origin` and going in `direction` in 2D space. ----@field origin ? Vec2 ----@field direction ? Dir2 - - ----@class Ray3d ---- An infinite half-line starting at `origin` and going in `direction` in 3D space. ----@field origin ? Vec3 ----@field direction ? Dir3 - - ----@class IRect ---- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `IRect::min` and `IRect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. ----@field min ? IVec2 ----@field max ? IVec2 - - ----@class Rect ---- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `Rect::min` and `Rect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. ----@field min ? Vec2 ----@field max ? Vec2 - - ----@class URect ---- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `URect::min` and `URect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. ----@field min ? UVec2 ----@field max ? UVec2 - - ----@class Rot2 ---- A counterclockwise 2D rotation.--- --- # Example--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Rot2, Vec2};--- use std::f32::consts::PI;--- --- // Create rotations from radians or degrees--- let rotation1 = Rot2::radians(PI / 2.0);--- let rotation2 = Rot2::degrees(45.0);--- --- // Get the angle back as radians or degrees--- assert_eq!(rotation1.as_degrees(), 90.0);--- assert_eq!(rotation2.as_radians(), PI / 4.0);--- --- // "Add" rotations together using `*`--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * rotation2, Rot2::degrees(135.0));--- --- // Rotate vectors--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * Vec2::X, Vec2::Y);--- ``` ----@field cos ? number ----@field sin ? number - - ----@class Instant - - - ----@class Fixed ---- The fixed timestep game clock following virtual time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Virtual). The fixed clock is automatically set as the--- generic [`Time`] resource during [`FixedUpdate`](bevy_app::FixedUpdate)--- schedule processing.--- --- The fixed timestep clock advances in fixed-size increments, which is--- extremely useful for writing logic (like physics) that should have--- consistent behavior, regardless of framerate.--- --- The default [`timestep()`](Time::timestep) is 64 hertz, or 15625--- microseconds. This value was chosen because using 60 hertz has the potential--- for a pathological interaction with the monitor refresh rate where the game--- alternates between running two fixed timesteps and zero fixed timesteps per--- frame (for example when running two fixed timesteps takes longer than a--- frame). Additionally, the value is a power of two which losslessly converts--- into [`f32`] and [`f64`].--- --- To run a system on a fixed timestep, add it to one of the [`FixedMain`]--- schedules, most commonly [`FixedUpdate`](bevy_app::FixedUpdate).--- --- This schedule is run a number of times between--- [`PreUpdate`](bevy_app::PreUpdate) and [`Update`](bevy_app::Update)--- according to the accumulated [`overstep()`](Time::overstep) time divided by--- the [`timestep()`](Time::timestep). This means the schedule may run 0, 1 or--- more times during a single update (which typically corresponds to a rendered--- frame).--- --- `Time` and the generic [`Time`] resource will report a--- [`delta()`](Time::delta) equal to [`timestep()`](Time::timestep) and always--- grow [`elapsed()`](Time::elapsed) by one [`timestep()`](Time::timestep) per--- iteration.--- --- The fixed timestep clock follows the [`Time`](Virtual) clock, which--- means it is affected by [`pause()`](Time::pause),--- [`set_relative_speed()`](Time::set_relative_speed) and--- [`set_max_delta()`](Time::set_max_delta) from virtual time. If the virtual--- clock is paused, the [`FixedUpdate`](bevy_app::FixedUpdate) schedule will--- not run. It is guaranteed that the [`elapsed()`](Time::elapsed) time in--- `Time` is always between the previous `elapsed()` and the current--- `elapsed()` value in `Time`, so the values are compatible.--- --- Changing the timestep size while the game is running should not normally be--- done, as having a regular interval is the point of this schedule, but it may--- be necessary for effects like "bullet-time" if the normal granularity of the--- fixed timestep is too big for the slowed down time. In this case,--- [`set_timestep()`](Time::set_timestep) and be called to set a new value. The--- new value will be used immediately for the next run of the--- [`FixedUpdate`](bevy_app::FixedUpdate) schedule, meaning that it will affect--- the [`delta()`](Time::delta) value for the very next--- [`FixedUpdate`](bevy_app::FixedUpdate), even if it is still during the same--- frame. Any [`overstep()`](Time::overstep) present in the accumulator will be--- processed according to the new [`timestep()`](Time::timestep) value. ----@field timestep ? Duration ----@field overstep ? Duration - - ----@class Real ---- Real time clock representing elapsed wall clock time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated with time instants according--- to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).[^disclaimer]--- --- Note:--- Using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration)--- allows for mocking the wall clock for testing purposes.--- Besides this use case, it is not recommended to do this, as it will no longer--- represent "wall clock" time as intended.--- --- The [`delta()`](Time::delta) and [`elapsed()`](Time::elapsed) values of this--- clock should be used for anything which deals specifically with real time--- (wall clock time). It will not be affected by relative game speed--- adjustments, pausing or other adjustments.[^disclaimer]--- --- The clock does not count time from [`startup()`](Time::startup) to--- [`first_update()`](Time::first_update()) into elapsed, but instead will--- start counting time from the first update call. [`delta()`](Time::delta) and--- [`elapsed()`](Time::elapsed) will report zero on the first update as there--- is no previous update instant. This means that a [`delta()`](Time::delta) of--- zero must be handled without errors in application logic, as it may--- theoretically also happen at other times.--- --- [`Instant`]s for [`startup()`](Time::startup),--- [`first_update()`](Time::first_update) and--- [`last_update()`](Time::last_update) are recorded and accessible.--- --- [^disclaimer]: When using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration),--- [`Time#impl-Time`] is only a *mock* of wall clock time.--- ----@field startup ? Instant ----@field first_update ? Option ----@field last_update ? Option - - ----@class Stopwatch ---- A Stopwatch is a struct that tracks elapsed time when started.--- --- Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called.--- # Examples--- --- ```--- # use bevy_time::*;--- use std::time::Duration;--- let mut stopwatch = Stopwatch::new();--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- --- stopwatch.tick(Duration::from_secs_f32(1.0)); // tick one second--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.pause();--- stopwatch.tick(Duration::from_secs_f32(1.0)); // paused stopwatches don't tick--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.reset(); // reset the stopwatch--- assert!(stopwatch.is_paused());--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- ``` ----@field elapsed ? Duration ----@field is_paused ? boolean - - ----@class Timer ---- Tracks elapsed time. Enters the finished state once `duration` is reached.--- --- Non repeating timers will stop tracking and stay in the finished state until reset.--- Repeating timers will only be in the finished state on each tick `duration` is reached or--- exceeded, and can still be reset at any given point.--- --- Paused timers will not have elapsed time increased.--- --- Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called. ----@field stopwatch ? Stopwatch ----@field duration ? Duration ----@field mode ? TimerMode ----@field finished ? boolean ----@field times_finished_this_tick ? integer - - ----@class TimerMode ---- Specifies [`Timer`] behavior. - - ----@class Virtual ---- The virtual game clock representing game time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- Normally used as `Time`. It is automatically inserted as a resource--- by [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Real). The virtual clock is automatically set as the default--- generic [`Time`] resource for the update.--- --- The virtual clock differs from real time clock in that it can be paused, sped up--- and slowed down. It also limits how much it can advance in a single update--- in order to prevent unexpected behavior in cases where updates do not happen--- at regular intervals (e.g. coming back after the program was suspended a long time).--- --- The virtual clock can be paused by calling [`pause()`](Time::pause) and--- unpaused by calling [`unpause()`](Time::unpause). When the game clock is--- paused [`delta()`](Time::delta) will be zero on each update, and--- [`elapsed()`](Time::elapsed) will not grow.--- [`effective_speed()`](Time::effective_speed) will return `0.0`. Calling--- [`pause()`](Time::pause) will not affect value the [`delta()`](Time::delta)--- value for the update currently being processed.--- --- The speed of the virtual clock can be changed by calling--- [`set_relative_speed()`](Time::set_relative_speed). A value of `2.0` means--- that virtual clock should advance twice as fast as real time, meaning that--- [`delta()`](Time::delta) values will be double of what--- [`Time::delta()`](Time::delta) reports and--- [`elapsed()`](Time::elapsed) will go twice as fast as--- [`Time::elapsed()`](Time::elapsed). Calling--- [`set_relative_speed()`](Time::set_relative_speed) will not affect the--- [`delta()`](Time::delta) value for the update currently being processed.--- --- The maximum amount of delta time that can be added by a single update can be--- set by [`set_max_delta()`](Time::set_max_delta). This value serves a dual--- purpose in the virtual clock.--- --- If the game temporarily freezes due to any reason, such as disk access, a--- blocking system call, or operating system level suspend, reporting the full--- elapsed delta time is likely to cause bugs in game logic. Usually if a--- laptop is suspended for an hour, it doesn't make sense to try to simulate--- the game logic for the elapsed hour when resuming. Instead it is better to--- lose the extra time and pretend a shorter duration of time passed. Setting--- [`max_delta()`](Time::max_delta) to a relatively short time means that the--- impact on game logic will be minimal.--- --- If the game lags for some reason, meaning that it will take a longer time to--- compute a frame than the real time that passes during the computation, then--- we would fall behind in processing virtual time. If this situation persists,--- and computing a frame takes longer depending on how much virtual time has--- passed, the game would enter a "death spiral" where computing each frame--- takes longer and longer and the game will appear to freeze. By limiting the--- maximum time that can be added at once, we also limit the amount of virtual--- time the game needs to compute for each frame. This means that the game will--- run slow, and it will run slower than real time, but it will not freeze and--- it will recover as soon as computation becomes fast again.--- --- You should set [`max_delta()`](Time::max_delta) to a value that is--- approximately the minimum FPS your game should have even if heavily lagged--- for a moment. The actual FPS when lagged will be somewhat lower than this,--- depending on how much more time it takes to compute a frame compared to real--- time. You should also consider how stable your FPS is, as the limit will--- also dictate how big of an FPS drop you can accept without losing time and--- falling behind real time. ----@field max_delta ? Duration ----@field paused ? boolean ----@field relative_speed ? number ----@field effective_speed ? number - - ----@class GlobalTransform ---- [`GlobalTransform`] is an affine transformation from entity-local coordinates to worldspace coordinates.--- --- You cannot directly mutate [`GlobalTransform`]; instead, you change an entity's transform by manipulating--- its [`Transform`], which indirectly causes Bevy to update its [`GlobalTransform`].--- --- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * For transform hierarchies to work correctly, you must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] transforms an entity relative to its parent's reference frame, or relative to world space coordinates,--- if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is managed by Bevy; it is computed by successively applying the [`Transform`] of each ancestor--- entity which has a Transform. This is done automatically by Bevy-internal systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity in this schedule or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs ----@field [1] ? Affine3A - - ----@class Transform ---- Describe the position of an entity. If the entity has a parent, the position is relative--- to its parent position.--- --- * To place or move an entity, you should set its [`Transform`].--- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * To be displayed, an entity must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] is the position of an entity relative to its parent position, or the reference--- frame if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is the position of an entity relative to the reference frame.--- --- [`GlobalTransform`] is updated from [`Transform`] by systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity during this set or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs ----@field translation ? Vec3 ----@field rotation ? Quat ----@field scale ? Vec3 - - ----@class TransformTreeChanged ---- An optimization for transform propagation. This ZST marker component uses change detection to--- mark all entities of the hierarchy as "dirty" if any of their descendants have a changed--- `Transform`. If this component is *not* marked `is_changed()`, propagation will halt. - - ----@class TypeId - - - ----@class SocketAddr - - - ----@class RangeFull - - - ----@class AtomicBool - - - ----@class AtomicI16 - - - ----@class AtomicI32 - - - ----@class AtomicI64 - - - ----@class AtomicI8 - - - ----@class AtomicIsize - - - ----@class AtomicU16 - - - ----@class AtomicU32 - - - ----@class AtomicU64 - - - ----@class AtomicU8 - - - ----@class AtomicUsize - - - ----@class Duration - - - ----@class Affine2 - ----@field matrix2 ? Mat2 ----@field translation ? Vec2 - - ----@class Affine3A - ----@field matrix3 ? Mat3A ----@field translation ? Vec3A - - ----@class BVec2 - ----@field x ? boolean ----@field y ? boolean - - ----@class BVec3 - ----@field x ? boolean ----@field y ? boolean ----@field z ? boolean - - ----@class BVec3A - - - ----@class BVec4 - ----@field x ? boolean ----@field y ? boolean ----@field z ? boolean ----@field w ? boolean - - ----@class BVec4A - - - ----@class DAffine2 - ----@field matrix2 ? DMat2 ----@field translation ? DVec2 - - ----@class DAffine3 - ----@field matrix3 ? DMat3 ----@field translation ? DVec3 - - ----@class DMat2 - ----@field x_axis ? DVec2 ----@field y_axis ? DVec2 - - ----@class DMat3 - ----@field x_axis ? DVec3 ----@field y_axis ? DVec3 ----@field z_axis ? DVec3 - - ----@class DMat4 - ----@field x_axis ? DVec4 ----@field y_axis ? DVec4 ----@field z_axis ? DVec4 ----@field w_axis ? DVec4 - - ----@class DQuat - ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number - - ----@class DVec2 - ----@field x ? number ----@field y ? number - - ----@class DVec3 - ----@field x ? number ----@field y ? number ----@field z ? number - - ----@class DVec4 - ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number - - ----@class EulerRot - - - ----@class I16Vec2 - ----@field x ? integer ----@field y ? integer - - ----@class I16Vec3 - ----@field x ? integer ----@field y ? integer ----@field z ? integer - - ----@class I16Vec4 - ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer - - ----@class I64Vec2 - ----@field x ? integer ----@field y ? integer - - ----@class I64Vec3 - ----@field x ? integer ----@field y ? integer ----@field z ? integer - - ----@class I64Vec4 - ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer - - ----@class I8Vec2 - ----@field x ? integer ----@field y ? integer - - ----@class I8Vec3 - ----@field x ? integer ----@field y ? integer ----@field z ? integer - - ----@class I8Vec4 - ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer - - ----@class IVec2 - ----@field x ? integer ----@field y ? integer - - ----@class IVec3 - ----@field x ? integer ----@field y ? integer ----@field z ? integer - - ----@class IVec4 - ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer - - ----@class Mat2 - ----@field x_axis ? Vec2 ----@field y_axis ? Vec2 - - ----@class Mat3 - ----@field x_axis ? Vec3 ----@field y_axis ? Vec3 ----@field z_axis ? Vec3 - - ----@class Mat3A - ----@field x_axis ? Vec3A ----@field y_axis ? Vec3A ----@field z_axis ? Vec3A - - ----@class Mat4 - ----@field x_axis ? Vec4 ----@field y_axis ? Vec4 ----@field z_axis ? Vec4 ----@field w_axis ? Vec4 - - ----@class Quat - ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number - - ----@class U16Vec2 - ----@field x ? integer ----@field y ? integer - - ----@class U16Vec3 - ----@field x ? integer ----@field y ? integer ----@field z ? integer - - ----@class U16Vec4 - ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer - - ----@class U64Vec2 - ----@field x ? integer ----@field y ? integer - - ----@class U64Vec3 - ----@field x ? integer ----@field y ? integer ----@field z ? integer - - ----@class U64Vec4 - ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer - - ----@class U8Vec2 - ----@field x ? integer ----@field y ? integer - - ----@class U8Vec3 - ----@field x ? integer ----@field y ? integer ----@field z ? integer - - ----@class U8Vec4 - ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer - - ----@class UVec2 - ----@field x ? integer ----@field y ? integer - - ----@class UVec3 - ----@field x ? integer ----@field y ? integer ----@field z ? integer - - ----@class UVec4 - ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer - - ----@class Vec2 - ----@field x ? number ----@field y ? number - - ----@class Vec3 - ----@field x ? number ----@field y ? number ----@field z ? number - - ----@class Vec3A - ----@field x ? number ----@field y ? number ----@field z ? number - - ----@class Vec4 - ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number - - ----@class SmolStr - - - ----@class Uuid - - - ----@class AssetIndex ---- A generational runtime-only identifier for a specific [`Asset`] stored in [`Assets`]. This is optimized for efficient runtime--- usage and is not suitable for identifying assets across app runs. ----@field generation ? integer ----@field index ? integer - - ----@class AssetPath ---- Represents a path to an asset in a "virtual filesystem".--- --- Asset paths consist of three main parts:--- * [`AssetPath::source`]: The name of the [`AssetSource`](crate::io::AssetSource) to load the asset from.--- This is optional. If one is not set the default source will be used (which is the `assets` folder by default).--- * [`AssetPath::path`]: The "virtual filesystem path" pointing to an asset source file.--- * [`AssetPath::label`]: An optional "named sub asset". When assets are loaded, they are--- allowed to load "sub assets" of any type, which are identified by a named "label".--- --- Asset paths are generally constructed (and visualized) as strings:--- --- ```no_run--- # use bevy_asset::{Asset, AssetServer, Handle};--- # use bevy_reflect::TypePath;--- #--- # #[derive(Asset, TypePath, Default)]--- # struct Mesh;--- #--- # #[derive(Asset, TypePath, Default)]--- # struct Scene;--- #--- # let asset_server: AssetServer = panic!();--- // This loads the `my_scene.scn` base asset from the default asset source.--- let scene: Handle = asset_server.load("my_scene.scn");--- --- // This loads the `PlayerMesh` labeled asset from the `my_scene.scn` base asset in the default asset source.--- let mesh: Handle = asset_server.load("my_scene.scn#PlayerMesh");--- --- // This loads the `my_scene.scn` base asset from a custom 'remote' asset source.--- let scene: Handle = asset_server.load("remote://my_scene.scn");--- ```--- --- [`AssetPath`] implements [`From`] for `&'static str`, `&'static Path`, and `&'a String`,--- which allows us to optimize the static cases.--- This means that the common case of `asset_server.load("my_scene.scn")` when it creates and--- clones internal owned [`AssetPaths`](AssetPath).--- This also means that you should use [`AssetPath::parse`] in cases where `&str` is the explicit type. - - ----@class RenderAssetUsages ---- Defines where the asset will be used.--- --- If an asset is set to the `RENDER_WORLD` but not the `MAIN_WORLD`, the asset will be--- unloaded from the asset server once it's been extracted and prepared in the render world.--- --- Unloading the asset saves on memory, as for most cases it is no longer necessary to keep--- it in RAM once it's been uploaded to the GPU's VRAM. However, this means you can no longer--- access the asset from the CPU (via the `Assets` resource) once unloaded (without re-loading it).--- --- If you never need access to the asset from the CPU past the first frame it's loaded on,--- or only need very infrequent access, then set this to `RENDER_WORLD`. Otherwise, set this to--- `RENDER_WORLD | MAIN_WORLD`.--- --- If you have an asset that doesn't actually need to end up in the render world, like an Image--- that will be decoded into another Image asset, use `MAIN_WORLD` only.--- --- ## Platform-specific--- --- On Wasm, it is not possible for now to free reserved memory. To control memory usage, load assets--- in sequence and unload one before loading the next. See this--- [discussion about memory management](https://github.com/WebAssembly/design/issues/1397) for more--- details. - - ----@class DeferredPrepass ---- If added to a [`crate::prelude::Camera3d`] then deferred materials will be rendered to the deferred gbuffer texture and will be available to subsequent passes.--- Note the default deferred lighting plugin also requires `DepthPrepass` to work correctly. - - ----@class SystemIdMarker ---- Marker [`Component`](bevy_ecs::component::Component) for identifying [`SystemId`] [`Entity`]s. - - ----@class OnAdd ---- Trigger emitted when a component is inserted onto an entity that does not already have that--- component. Runs before `OnInsert`.--- See [`crate::component::ComponentHooks::on_add`] for more information. - - ----@class OnDespawn ---- Trigger emitted for each component on an entity when it is despawned.--- See [`crate::component::ComponentHooks::on_despawn`] for more information. - - ----@class OnInsert ---- Trigger emitted when a component is inserted, regardless of whether or not the entity already--- had that component. Runs after `OnAdd`, if it ran.--- See [`crate::component::ComponentHooks::on_insert`] for more information. - - ----@class OnRemove ---- Trigger emitted when a component is removed from an entity, and runs before the component is--- removed, so you can still access the component data.--- See [`crate::component::ComponentHooks::on_remove`] for more information. - - ----@class OnReplace ---- Trigger emitted when a component is inserted onto an entity that already has that component.--- Runs before the value is replaced, so you can still access the original component data.--- See [`crate::component::ComponentHooks::on_replace`] for more information. - - ----@class Image - - - ----@class TextureAtlas ---- An index into a [`TextureAtlasLayout`], which corresponds to a specific section of a texture.--- --- It stores a handle to [`TextureAtlasLayout`] and the index of the current section of the atlas.--- The texture atlas contains various *sections* of a given texture, allowing users to have a single--- image file for either sprite animation or global mapping.--- You can change the texture [`index`](Self::index) of the atlas to animate the sprite or display only a *section* of the texture--- for efficient rendering of related game objects.--- --- Check the following examples for usage:--- - [`animated sprite sheet example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs)--- - [`sprite animation event example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs)--- - [`texture atlas example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) ----@field layout ? Handle ----@field index ? integer - - ----@class TextureAtlasLayout ---- Stores a map used to lookup the position of a texture in a [`TextureAtlas`].--- This can be used to either use and look up a specific section of a texture, or animate frame-by-frame as a sprite sheet.--- --- Optionally it can store a mapping from sub texture handles to the related area index (see--- [`TextureAtlasBuilder`]).--- --- [Example usage animating sprite.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs)--- [Example usage animating sprite in response to an event.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs)--- [Example usage loading sprite sheet.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs)--- --- [`TextureAtlasBuilder`]: crate::TextureAtlasBuilder ----@field size ? UVec2 ----@field textures ? Vec - - ----@class Affine3 ---- Reduced-size version of `glam::Affine3A` for use when storage has--- significant performance impact. Convert to `glam::Affine3A` to do--- non-trivial calculations. ----@field matrix3 ? Mat3 ----@field translation ? Vec3 - - ----@class Indices ---- An array of indices into the [`VertexAttributeValues`](super::VertexAttributeValues) for a mesh.--- --- It describes the order in which the vertex attributes should be joined into faces. - - ----@class Mesh ---- A 3D object made out of vertices representing triangles, lines, or points,--- with "attribute" values for each vertex.--- --- Meshes can be automatically generated by a bevy `AssetLoader` (generally by loading a `Gltf` file),--- or by converting a [primitive](bevy_math::primitives) using [`into`](Into).--- It is also possible to create one manually. They can be edited after creation.--- --- Meshes can be rendered with a `Mesh2d` and `MeshMaterial2d`--- or `Mesh3d` and `MeshMaterial3d` for 2D and 3D respectively.--- --- A [`Mesh`] in Bevy is equivalent to a "primitive" in the glTF format, for a--- glTF Mesh representation, see `GltfMesh`.--- --- ## Manual creation--- --- The following function will construct a flat mesh, to be rendered with a--- `StandardMaterial` or `ColorMaterial`:--- --- ```--- # use bevy_mesh::{Mesh, Indices, PrimitiveTopology};--- # use bevy_asset::RenderAssetUsages;--- fn create_simple_parallelogram() -> Mesh {--- // Create a new mesh using a triangle list topology, where each set of 3 vertices composes a triangle.--- Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsages::default())--- // Add 4 vertices, each with its own position attribute (coordinate in--- // 3D space), for each of the corners of the parallelogram.--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_POSITION,--- vec![[0.0, 0.0, 0.0], [1.0, 2.0, 0.0], [2.0, 2.0, 0.0], [1.0, 0.0, 0.0]]--- )--- // Assign a UV coordinate to each vertex.--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_UV_0,--- vec![[0.0, 1.0], [0.5, 0.0], [1.0, 0.0], [0.5, 1.0]]--- )--- // Assign normals (everything points outwards)--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_NORMAL,--- vec![[0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0]]--- )--- // After defining all the vertices and their attributes, build each triangle using the--- // indices of the vertices that make it up in a counter-clockwise order.--- .with_inserted_indices(Indices::U32(vec![--- // First triangle--- 0, 3, 1,--- // Second triangle--- 1, 3, 2--- ]))--- }--- ```--- --- You can see how it looks like [here](https://github.com/bevyengine/bevy/blob/main/assets/docs/Mesh.png),--- used in a `Mesh3d` with a square bevy logo texture, with added axis, points,--- lines and text for clarity.--- --- ## Other examples--- --- For further visualization, explanation, and examples, see the built-in Bevy examples,--- and the [implementation of the built-in shapes](https://github.com/bevyengine/bevy/tree/main/crates/bevy_mesh/src/primitives).--- In particular, [generate_custom_mesh](https://github.com/bevyengine/bevy/blob/main/examples/3d/generate_custom_mesh.rs)--- teaches you to access and modify the attributes of a [`Mesh`] after creating it.--- --- ## Common points of confusion--- --- - UV maps in Bevy start at the top-left, see [`ATTRIBUTE_UV_0`](Mesh::ATTRIBUTE_UV_0),--- other APIs can have other conventions, `OpenGL` starts at bottom-left.--- - It is possible and sometimes useful for multiple vertices to have the same--- [position attribute](Mesh::ATTRIBUTE_POSITION) value,--- it's a common technique in 3D modeling for complex UV mapping or other calculations.--- - Bevy performs frustum culling based on the `Aabb` of meshes, which is calculated--- and added automatically for new meshes only. If a mesh is modified, the entity's `Aabb`--- needs to be updated manually or deleted so that it is re-calculated.--- --- ## Use with `StandardMaterial`--- --- To render correctly with `StandardMaterial`, a mesh needs to have properly defined:--- - [`UVs`](Mesh::ATTRIBUTE_UV_0): Bevy needs to know how to map a texture onto the mesh--- (also true for `ColorMaterial`).--- - [`Normals`](Mesh::ATTRIBUTE_NORMAL): Bevy needs to know how light interacts with your mesh.--- [0.0, 0.0, 1.0] is very common for simple flat meshes on the XY plane,--- because simple meshes are smooth and they don't require complex light calculations.--- - Vertex winding order: by default, `StandardMaterial.cull_mode` is `Some(Face::Back)`,--- which means that Bevy would *only* render the "front" of each triangle, which--- is the side of the triangle from where the vertices appear in a *counter-clockwise* order. ----@field indices ? Option ----@field morph_targets ? Option ----@field morph_target_names ? Option ----@field asset_usage ? RenderAssetUsages - - ----@class MeshMorphWeights ---- Control a specific [`Mesh`] instance's [morph targets]. These control the weights of--- specific "mesh primitives" in scene formats like GLTF. They can be set manually, but--- in most cases they should "automatically" synced by setting the [`MorphWeights`] component--- on a parent entity.--- --- See [`MorphWeights`] for more details on Bevy's morph target implementation.--- --- Add this to an [`Entity`] with a `Mesh3d` with a [`MorphAttributes`] set--- to control individual weights of each morph target.--- --- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation ----@field weights ? Vec - - ----@class MorphWeights ---- Controls the [morph targets] for all child `Mesh3d` entities. In most cases, [`MorphWeights`] should be considered--- the "source of truth" when writing morph targets for meshes. However you can choose to write child [`MeshMorphWeights`]--- if your situation requires more granularity. Just note that if you set [`MorphWeights`], it will overwrite child--- [`MeshMorphWeights`] values.--- --- This exists because Bevy's [`Mesh`] corresponds to a _single_ surface / material, whereas morph targets--- as defined in the GLTF spec exist on "multi-primitive meshes" (where each primitive is its own surface with its own material).--- Therefore in Bevy [`MorphWeights`] an a parent entity are the "canonical weights" from a GLTF perspective, which then--- synchronized to child `Mesh3d` / [`MeshMorphWeights`] (which correspond to "primitives" / "surfaces" from a GLTF perspective).--- --- Add this to the parent of one or more [`Entities`](`Entity`) with a `Mesh3d` with a [`MeshMorphWeights`].--- --- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation ----@field weights ? Vec ----@field first_mesh ? Option - - ----@class AnnulusMeshBuilder ---- A builder for creating a [`Mesh`] with an [`Annulus`] shape. ----@field annulus ? Annulus ----@field resolution ? integer - - ----@class Capsule2dMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Capsule2d`] shape. ----@field capsule ? Capsule2d ----@field resolution ? integer - - ----@class CircleMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Circle`] shape. ----@field circle ? Circle ----@field resolution ? integer - - ----@class CircularMeshUvMode ---- Specifies how to generate UV-mappings for the [`CircularSector`] and [`CircularSegment`] shapes.--- --- Currently the only variant is `Mask`, which is good for showing a portion of a texture that includes--- the entire circle, particularly the same texture will be displayed with different fractions of a--- complete circle.--- --- It's expected that more will be added in the future, such as a variant that causes the texture to be--- scaled to fit the bounding box of the shape, which would be good for packed textures only including the--- portion of the circle that is needed to display. - - ----@class CircularSectorMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`CircularSector`] shape.--- --- The resulting mesh will have a UV-map such that the center of the circle is--- at the center of the texture. ----@field sector ? CircularSector ----@field resolution ? integer ----@field uv_mode ? CircularMeshUvMode - - ----@class CircularSegmentMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`CircularSegment`] shape.--- --- The resulting mesh will have a UV-map such that the center of the circle is--- at the center of the texture. ----@field segment ? CircularSegment ----@field resolution ? integer ----@field uv_mode ? CircularMeshUvMode - - ----@class EllipseMeshBuilder ---- A builder used for creating a [`Mesh`] with an [`Ellipse`] shape. ----@field ellipse ? Ellipse ----@field resolution ? integer - - ----@class RectangleMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Rectangle`] shape. ----@field half_size ? Vec2 - - ----@class RegularPolygonMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`RegularPolygon`] shape. ----@field circumradius ? number ----@field sides ? integer - - ----@class RhombusMeshBuilder ---- A builder for creating a [`Mesh`] with an [`Rhombus`] shape. ----@field half_diagonals ? Vec2 - - ----@class Triangle2dMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Triangle2d`] shape. ----@field triangle ? Triangle2d - - ----@class Capsule3dMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Capsule3d`] shape. ----@field capsule ? Capsule3d ----@field rings ? integer ----@field longitudes ? integer ----@field latitudes ? integer ----@field uv_profile ? CapsuleUvProfile - - ----@class CapsuleUvProfile ---- Manner in which UV coordinates are distributed vertically. - - ----@class ConeAnchor ---- Anchoring options for [`ConeMeshBuilder`] - - ----@class ConeMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Cone`] shape. ----@field cone ? Cone ----@field resolution ? integer ----@field anchor ? ConeAnchor - - ----@class ConicalFrustumMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`ConicalFrustum`] shape. ----@field frustum ? ConicalFrustum ----@field resolution ? integer ----@field segments ? integer - - ----@class CuboidMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Cuboid`] shape. ----@field half_size ? Vec3 - - ----@class CylinderAnchor ---- Anchoring options for [`CylinderMeshBuilder`] - - ----@class CylinderMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Cylinder`] shape. ----@field cylinder ? Cylinder ----@field resolution ? integer ----@field segments ? integer ----@field caps ? boolean ----@field anchor ? CylinderAnchor - - ----@class PlaneMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Plane3d`] shape. ----@field plane ? Plane3d ----@field subdivisions ? integer - - ----@class SphereKind ---- A type of sphere mesh. - - ----@class SphereMeshBuilder ---- A builder used for creating a [`Mesh`] with an [`Sphere`] shape. ----@field sphere ? Sphere ----@field kind ? SphereKind - - ----@class TetrahedronMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Tetrahedron`] shape. ----@field tetrahedron ? Tetrahedron - - ----@class TorusMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Torus`] shape. ----@field torus ? Torus ----@field minor_resolution ? integer ----@field major_resolution ? integer ----@field angle_range ? RangeInclusive - - ----@class Triangle3dMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`Triangle3d`] shape. ----@field triangle ? Triangle3d - - ----@class SkinnedMesh - ----@field inverse_bindposes ? bevy_asset::handle::Handle ----@field joints ? Vec - - ----@class ScriptAsset ---- Represents a script loaded into memory as an asset - - ----@class FunctionArgInfo ---- Information about a function argument. ----@field name ? Option ----@field arg_index ? integer ----@field type_id ? TypeId - - ----@class FunctionInfo ---- Information about a function. ----@field name ? Cow ----@field namespace ? Namespace ----@field arg_info ? Vec ----@field return_info ? FunctionReturnInfo ----@field docs ? Option - - ----@class FunctionReturnInfo ---- Information about a function return value. ----@field type_id ? TypeId - - ----@class InteropError ---- An error occurring when converting between rust and a script context. - - ----@class Namespace ---- A namespace for functions - - ----@class DynamicComponent ---- A dynamic script component ----@field data ? ScriptValue - - ----@class ScriptValue ---- An abstraction of values that can be passed to and from scripts.--- This allows us to re-use logic between scripting languages. - - ----@class AlphaMode ---- Sets how a material's base color alpha channel is used for transparency. - - ----@class Camera ---- The defining [`Component`] for camera entities,--- storing information about how and what to render through this camera.--- --- The [`Camera`] component is added to an entity to define the properties of the viewpoint from--- which rendering occurs. It defines the position of the view to render, the projection method--- to transform the 3D objects into a 2D image, as well as the render target into which that image--- is produced.--- --- Note that a [`Camera`] needs a [`CameraRenderGraph`] to render anything.--- This is typically provided by adding a [`Camera2d`] or [`Camera3d`] component,--- but custom render graphs can also be defined. Inserting a [`Camera`] with no render--- graph will emit an error at runtime.--- --- [`Camera2d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_2d/struct.Camera2d.html--- [`Camera3d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_3d/struct.Camera3d.html ----@field viewport ? Option ----@field order ? integer ----@field is_active ? boolean ----@field target ? RenderTarget ----@field hdr ? boolean ----@field msaa_writeback ? boolean ----@field clear_color ? ClearColorConfig ----@field sub_camera_view ? Option - - ----@class CameraMainTextureUsages ---- This component lets you control the [`TextureUsages`] field of the main texture generated for the camera - - ----@class CameraRenderGraph ---- Configures the [`RenderGraph`](crate::render_graph::RenderGraph) name assigned to be run for a given [`Camera`] entity. - - ----@class Exposure ---- How much energy a `Camera3d` absorbs from incoming light.--- --- - - ----@class ImageRenderTarget ---- A render target that renders to an [`Image`]. ----@field handle ? Handle ----@field scale_factor ? FloatOrd - - ----@class MipBias ---- Camera component specifying a mip bias to apply when sampling from material textures.--- --- Often used in conjunction with antialiasing post-process effects to reduce textures blurriness. ----@field [1] ? number - - ----@class RenderTarget ---- The "target" that a [`Camera`] will render to. For example, this could be a [`Window`]--- swapchain or an [`Image`]. - - ----@class SubCameraView ---- Settings to define a camera sub view.--- --- When [`Camera::sub_camera_view`] is `Some`, only the sub-section of the--- image defined by `size` and `offset` (relative to the `full_size` of the--- whole image) is projected to the cameras viewport.--- --- Take the example of the following multi-monitor setup:--- ```css--- ┌───┬───┐--- │ A │ B │--- ├───┼───┤--- │ C │ D │--- └───┴───┘--- ```--- If each monitor is 1920x1080, the whole image will have a resolution of--- 3840x2160. For each monitor we can use a single camera with a viewport of--- the same size as the monitor it corresponds to. To ensure that the image is--- cohesive, we can use a different sub view on each camera:--- - Camera A: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,0--- - Camera B: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 1920,0--- - Camera C: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,1080--- - Camera D: `full_size` = 3840x2160, `size` = 1920x1080, `offset` =--- 1920,1080--- --- However since only the ratio between the values is important, they could all--- be divided by 120 and still produce the same image. Camera D would for--- example have the following values:--- `full_size` = 32x18, `size` = 16x9, `offset` = 16,9 ----@field full_size ? UVec2 ----@field offset ? Vec2 ----@field size ? UVec2 - - ----@class TemporalJitter ---- A subpixel offset to jitter a perspective camera's frustum by.--- --- Useful for temporal rendering techniques.--- --- Do not use with [`OrthographicProjection`].--- --- [`OrthographicProjection`]: crate::camera::OrthographicProjection ----@field offset ? Vec2 - - ----@class Viewport ---- Render viewport configuration for the [`Camera`] component.--- --- The viewport defines the area on the render target to which the camera renders its image.--- You can overlay multiple cameras in a single window using viewports to create effects like--- split screen, minimaps, and character viewers. ----@field physical_position ? UVec2 ----@field physical_size ? UVec2 ----@field depth ? Range - - ----@class ClearColor ---- A [`Resource`] that stores the color that is used to clear the screen between frames.--- --- This color appears as the "background" color for simple apps,--- when there are portions of the screen with nothing rendered. ----@field [1] ? Color - - ----@class ClearColorConfig ---- For a camera, specifies the color used to clear the viewport before rendering. - - ----@class ManualTextureViewHandle ---- A unique id that corresponds to a specific [`ManualTextureView`] in the [`ManualTextureViews`] collection. ----@field [1] ? integer - - ----@class CustomProjection ---- Holds a dynamic [`CameraProjection`] trait object. Use [`Projection::custom()`] to construct a--- custom projection.--- --- The contained dynamic object can be downcast into a static type using [`CustomProjection::get`]. - - ----@class OrthographicProjection ---- Project a 3D space onto a 2D surface using parallel lines, i.e., unlike [`PerspectiveProjection`],--- the size of objects remains the same regardless of their distance to the camera.--- --- The volume contained in the projection is called the *view frustum*. Since the viewport is rectangular--- and projection lines are parallel, the view frustum takes the shape of a cuboid.--- --- Note that the scale of the projection and the apparent size of objects are inversely proportional.--- As the size of the projection increases, the size of objects decreases.--- --- # Examples--- --- Configure the orthographic projection to one world unit per 100 window pixels:--- --- ```--- # use bevy_render::camera::{OrthographicProjection, Projection, ScalingMode};--- let projection = Projection::Orthographic(OrthographicProjection {--- scaling_mode: ScalingMode::WindowSize,--- scale: 0.01,--- ..OrthographicProjection::default_2d()--- });--- ``` ----@field near ? number ----@field far ? number ----@field viewport_origin ? Vec2 ----@field scaling_mode ? ScalingMode ----@field scale ? number ----@field area ? Rect - - ----@class PerspectiveProjection ---- A 3D camera projection in which distant objects appear smaller than close objects. ----@field fov ? number ----@field aspect_ratio ? number ----@field near ? number ----@field far ? number - - ----@class Projection ---- Component that defines how to compute a [`Camera`]'s projection matrix.--- --- Common projections, like perspective and orthographic, are provided out of the box to handle the--- majority of use cases. Custom projections can be added using the [`CameraProjection`] trait and--- the [`Projection::custom`] constructor.--- --- ## What's a projection?--- --- A camera projection essentially describes how 3d points from the point of view of a camera are--- projected onto a 2d screen. This is where properties like a camera's field of view are defined.--- More specifically, a projection is a 4x4 matrix that transforms points from view space (the--- point of view of the camera) into clip space. Clip space is almost, but not quite, equivalent to--- the rectangle that is rendered to your screen, with a depth axis. Any points that land outside--- the bounds of this cuboid are "clipped" and not rendered.--- --- You can also think of the projection as the thing that describes the shape of a camera's--- frustum: the volume in 3d space that is visible to a camera.--- --- [`Camera`]: crate::camera::Camera - - ----@class OcclusionCulling ---- Add this component to a view in order to enable experimental GPU occlusion--- culling.--- --- *Bevy's occlusion culling is currently marked as experimental.* There are--- known issues whereby, in rare circumstances, occlusion culling can result in--- meshes being culled that shouldn't be (i.e. meshes that turn invisible).--- Please try it out and report issues.--- --- *Occlusion culling* allows Bevy to avoid rendering objects that are fully--- behind other opaque or alpha tested objects. This is different from, and--- complements, depth fragment rejection as the `DepthPrepass` enables. While--- depth rejection allows Bevy to avoid rendering *pixels* that are behind--- other objects, the GPU still has to examine those pixels to reject them,--- which requires transforming the vertices of the objects and performing--- skinning if the objects were skinned. Occlusion culling allows the GPU to go--- a step further, avoiding even transforming the vertices of objects that it--- can quickly prove to be behind other objects.--- --- Occlusion culling inherently has some overhead, because Bevy must examine--- the objects' bounding boxes, and create an acceleration structure--- (hierarchical Z-buffer) to perform the occlusion tests. Therefore, occlusion--- culling is disabled by default. Only enable it if you measure it to be a--- speedup on your scene. Note that, because Bevy's occlusion culling runs on--- the GPU and is quite efficient, it's rare for occlusion culling to result in--- a significant slowdown.--- --- Occlusion culling currently requires a `DepthPrepass`. If no depth prepass--- is present on the view, the [`OcclusionCulling`] component will be ignored.--- Additionally, occlusion culling is currently incompatible with deferred--- shading; including both `DeferredPrepass` and [`OcclusionCulling`] results--- in unspecified behavior.--- --- The algorithm that Bevy uses is known as [*two-phase occlusion culling*].--- When you enable occlusion culling, Bevy splits the depth prepass into two:--- an *early* depth prepass and a *late* depth prepass. The early depth prepass--- renders all the meshes that were visible last frame to produce a--- conservative approximation of the depth buffer. Then, after producing an--- acceleration structure known as a hierarchical Z-buffer or depth pyramid,--- Bevy tests the bounding boxes of all meshes against that depth buffer. Those--- that can be quickly proven to be behind the geometry rendered during the--- early depth prepass are skipped entirely. The other potentially-visible--- meshes are rendered during the late prepass, and finally all the visible--- meshes are rendered as usual during the opaque, transparent, etc. passes.--- --- Unlike other occlusion culling systems you may be familiar with, Bevy's--- occlusion culling is fully dynamic and requires no baking step. The CPU--- overhead is minimal. Large skinned meshes and other dynamic objects can--- occlude other objects.--- --- [*two-phase occlusion culling*]:--- https://medium.com/@mil_kru/two-pass-occlusion-culling-4100edcad501 - - ----@class GlobalsUniform ---- Contains global values useful when writing shaders.--- Currently only contains values related to time. ----@field time ? number ----@field delta_time ? number ----@field frame_count ? integer - - ----@class Mesh2d ---- A component for 2D meshes. Requires a [`MeshMaterial2d`] to be rendered, commonly using a [`ColorMaterial`].--- --- [`MeshMaterial2d`]: --- [`ColorMaterial`]: --- --- # Example--- --- ```ignore--- # use bevy_sprite::{ColorMaterial, Mesh2d, MeshMaterial2d};--- # use bevy_ecs::prelude::*;--- # use bevy_render::mesh::Mesh;--- # use bevy_color::palettes::basic::RED;--- # use bevy_asset::Assets;--- # use bevy_math::primitives::Circle;--- #--- // Spawn an entity with a mesh using `ColorMaterial`.--- fn setup(--- mut commands: Commands,--- mut meshes: ResMut>,--- mut materials: ResMut>,--- ) {--- commands.spawn((--- Mesh2d(meshes.add(Circle::new(50.0))),--- MeshMaterial2d(materials.add(ColorMaterial::from_color(RED))),--- ));--- }--- ``` ----@field [1] ? Handle - - ----@class Mesh3d ---- A component for 3D meshes. Requires a [`MeshMaterial3d`] to be rendered, commonly using a [`StandardMaterial`].--- --- [`MeshMaterial3d`]: --- [`StandardMaterial`]: --- --- # Example--- --- ```ignore--- # use bevy_pbr::{Material, MeshMaterial3d, StandardMaterial};--- # use bevy_ecs::prelude::*;--- # use bevy_render::mesh::{Mesh, Mesh3d};--- # use bevy_color::palettes::basic::RED;--- # use bevy_asset::Assets;--- # use bevy_math::primitives::Capsule3d;--- #--- // Spawn an entity with a mesh using `StandardMaterial`.--- fn setup(--- mut commands: Commands,--- mut meshes: ResMut>,--- mut materials: ResMut>,--- ) {--- commands.spawn((--- Mesh3d(meshes.add(Capsule3d::default())),--- MeshMaterial3d(materials.add(StandardMaterial {--- base_color: RED.into(),--- ..Default::default()--- })),--- ));--- }--- ``` ----@field [1] ? Handle - - ----@class Aabb ---- An axis-aligned bounding box, defined by:--- - a center,--- - the distances from the center to each faces along the axis,--- the faces are orthogonal to the axis.--- --- It is typically used as a component on an entity to represent the local space--- occupied by this entity, with faces orthogonal to its local axis.--- --- This component is notably used during "frustum culling", a process to determine--- if an entity should be rendered by a [`Camera`] if its bounding box intersects--- with the camera's [`Frustum`].--- --- It will be added automatically by the systems in [`CalculateBounds`] to entities that:--- - could be subject to frustum culling, for example with a [`Mesh3d`]--- or `Sprite` component,--- - don't have the [`NoFrustumCulling`] component.--- --- It won't be updated automatically if the space occupied by the entity changes,--- for example if the vertex positions of a [`Mesh3d`] are updated.--- --- [`Camera`]: crate::camera::Camera--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling--- [`CalculateBounds`]: crate::view::visibility::VisibilitySystems::CalculateBounds--- [`Mesh3d`]: crate::mesh::Mesh ----@field center ? Vec3A ----@field half_extents ? Vec3A - - ----@class CascadesFrusta - - - ----@class CubemapFrusta - - - ----@class Frustum ---- A region of 3D space defined by the intersection of 6 [`HalfSpace`]s.--- --- Frustums are typically an apex-truncated square pyramid (a pyramid without the top) or a cuboid.--- --- Half spaces are ordered left, right, top, bottom, near, far. The normal vectors--- of the half-spaces point towards the interior of the frustum.--- --- A frustum component is used on an entity with a [`Camera`] component to--- determine which entities will be considered for rendering by this camera.--- All entities with an [`Aabb`] component that are not contained by (or crossing--- the boundary of) the frustum will not be rendered, and not be used in rendering computations.--- --- This process is called frustum culling, and entities can opt out of it using--- the [`NoFrustumCulling`] component.--- --- The frustum component is typically added automatically for cameras, either `Camera2d` or `Camera3d`.--- It is usually updated automatically by [`update_frusta`] from the--- [`CameraProjection`] component and [`GlobalTransform`] of the camera entity.--- --- [`Camera`]: crate::camera::Camera--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling--- [`update_frusta`]: crate::view::visibility::update_frusta--- [`CameraProjection`]: crate::camera::CameraProjection--- [`GlobalTransform`]: bevy_transform::components::GlobalTransform - - ----@class ShaderStorageBuffer ---- A storage buffer that is prepared as a [`RenderAsset`] and uploaded to the GPU. - - ----@class SyncToRenderWorld ---- Marker component that indicates that its entity needs to be synchronized to the render world.--- --- This component is automatically added as a required component by [`ExtractComponentPlugin`] and [`SyncComponentPlugin`].--- For more information see [`SyncWorldPlugin`].--- --- NOTE: This component should persist throughout the entity's entire lifecycle.--- If this component is removed from its entity, the entity will be despawned.--- --- [`ExtractComponentPlugin`]: crate::extract_component::ExtractComponentPlugin--- [`SyncComponentPlugin`]: crate::sync_component::SyncComponentPlugin - - ----@class ColorGrading ---- Configures filmic color grading parameters to adjust the image appearance.--- --- Color grading is applied just before tonemapping for a given--- [`Camera`](crate::camera::Camera) entity, with the sole exception of the--- `post_saturation` value in [`ColorGradingGlobal`], which is applied after--- tonemapping. ----@field global ? ColorGradingGlobal ----@field shadows ? ColorGradingSection ----@field midtones ? ColorGradingSection ----@field highlights ? ColorGradingSection - - ----@class ColorGradingGlobal ---- Filmic color grading values applied to the image as a whole (as opposed to--- individual sections, like shadows and highlights). ----@field exposure ? number ----@field temperature ? number ----@field tint ? number ----@field hue ? number ----@field post_saturation ? number ----@field midtones_range ? Range - - ----@class ColorGradingSection ---- A section of color grading values that can be selectively applied to--- shadows, midtones, and highlights. ----@field saturation ? number ----@field contrast ? number ----@field gamma ? number ----@field gain ? number ----@field lift ? number - - ----@class Msaa ---- Component for configuring the number of samples for [Multi-Sample Anti-Aliasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing)--- for a [`Camera`](crate::camera::Camera).--- --- Defaults to 4 samples. A higher number of samples results in smoother edges.--- --- Some advanced rendering features may require that MSAA is disabled.--- --- Note that the web currently only supports 1 or 4 samples. - - ----@class InheritedVisibility ---- Whether or not an entity is visible in the hierarchy.--- This will not be accurate until [`VisibilityPropagate`] runs in the [`PostUpdate`] schedule.--- --- If this is false, then [`ViewVisibility`] should also be false.--- --- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate ----@field [1] ? boolean - - ----@class NoFrustumCulling ---- Use this component to opt-out of built-in frustum culling for entities, see--- [`Frustum`].--- --- It can be used for example:--- - when a [`Mesh`] is updated but its [`Aabb`] is not, which might happen with animations,--- - when using some light effects, like wanting a [`Mesh`] out of the [`Frustum`]--- to appear in the reflection of a [`Mesh`] within. - - ----@class ViewVisibility ---- Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering.--- --- Each frame, this will be reset to `false` during [`VisibilityPropagate`] systems in [`PostUpdate`].--- Later in the frame, systems in [`CheckVisibility`] will mark any visible entities using [`ViewVisibility::set`].--- Because of this, values of this type will be marked as changed every frame, even when they do not change.--- --- If you wish to add custom visibility system that sets this value, make sure you add it to the [`CheckVisibility`] set.--- --- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate--- [`CheckVisibility`]: VisibilitySystems::CheckVisibility ----@field [1] ? boolean - - ----@class Visibility ---- User indication of whether an entity is visible. Propagates down the entity hierarchy.--- --- If an entity is hidden in this way, all [`Children`] (and all of their children and so on) who--- are set to [`Inherited`](Self::Inherited) will also be hidden.--- --- This is done by the `visibility_propagate_system` which uses the entity hierarchy and--- `Visibility` to set the values of each entity's [`InheritedVisibility`] component. - - ----@class VisibilityClass ---- A bucket into which we group entities for the purposes of visibility.--- --- Bevy's various rendering subsystems (3D, 2D, UI, etc.) want to be able to--- quickly winnow the set of entities to only those that the subsystem is--- tasked with rendering, to avoid spending time examining irrelevant entities.--- At the same time, Bevy wants the [`check_visibility`] system to determine--- all entities' visibilities at the same time, regardless of what rendering--- subsystem is responsible for drawing them. Additionally, your application--- may want to add more types of renderable objects that Bevy determines--- visibility for just as it does for Bevy's built-in objects.--- --- The solution to this problem is *visibility classes*. A visibility class is--- a type, typically the type of a component, that represents the subsystem--- that renders it: for example, `Mesh3d`, `Mesh2d`, and `Sprite`. The--- [`VisibilityClass`] component stores the visibility class or classes that--- the entity belongs to. (Generally, an object will belong to only one--- visibility class, but in rare cases it may belong to multiple.)--- --- When adding a new renderable component, you'll typically want to write an--- add-component hook that adds the type ID of that component to the--- [`VisibilityClass`] array. See `custom_phase_item` for an example. ----@field [1] ? SmallVec - - ----@class VisibleEntities ---- Collection of entities visible from the current view.--- --- This component contains all entities which are visible from the currently--- rendered view. The collection is updated automatically by the [`VisibilitySystems::CheckVisibility`]--- system set. Renderers can use the equivalent [`RenderVisibleEntities`] to optimize rendering of--- a particular view, to prevent drawing items not visible from that view.--- --- This component is intended to be attached to the same entity as the [`Camera`] and--- the [`Frustum`] defining the view. - - ----@class VisibilityRange ---- Specifies the range of distances that this entity must be from the camera in--- order to be rendered.--- --- This is also known as *hierarchical level of detail* or *HLOD*.--- --- Use this component when you want to render a high-polygon mesh when the--- camera is close and a lower-polygon mesh when the camera is far away. This--- is a common technique for improving performance, because fine details are--- hard to see in a mesh at a distance. To avoid an artifact known as *popping*--- between levels, each level has a *margin*, within which the object--- transitions gradually from invisible to visible using a dithering effect.--- --- You can also use this feature to replace multiple meshes with a single mesh--- when the camera is distant. This is the reason for the term "*hierarchical*--- level of detail". Reducing the number of meshes can be useful for reducing--- drawcall count. Note that you must place the [`VisibilityRange`] component--- on each entity you want to be part of a LOD group, as [`VisibilityRange`]--- isn't automatically propagated down to children.--- --- A typical use of this feature might look like this:--- --- | Entity | `start_margin` | `end_margin` |--- |-------------------------|----------------|--------------|--- | Root | N/A | N/A |--- | ├─ High-poly mesh | [0, 0) | [20, 25) |--- | ├─ Low-poly mesh | [20, 25) | [70, 75) |--- | └─ Billboard *imposter* | [70, 75) | [150, 160) |--- --- With this setup, the user will see a high-poly mesh when the camera is--- closer than 20 units. As the camera zooms out, between 20 units to 25 units,--- the high-poly mesh will gradually fade to a low-poly mesh. When the camera--- is 70 to 75 units away, the low-poly mesh will fade to a single textured--- quad. And between 150 and 160 units, the object fades away entirely. Note--- that the `end_margin` of a higher LOD is always identical to the--- `start_margin` of the next lower LOD; this is important for the crossfade--- effect to function properly. ----@field start_margin ? Range ----@field end_margin ? Range ----@field use_aabb ? boolean - - ----@class RenderLayers ---- Describes which rendering layers an entity belongs to.--- --- Cameras with this component will only render entities with intersecting--- layers.--- --- Entities may belong to one or more layers, or no layer at all.--- --- The [`Default`] instance of `RenderLayers` contains layer `0`, the first layer.--- --- An entity with this component without any layers is invisible.--- --- Entities without this component belong to layer `0`. ----@field [1] ? SmallVec - - ----@class Screenshot ---- A component that signals to the renderer to capture a screenshot this frame.--- --- This component should be spawned on a new entity with an observer that will trigger--- with [`ScreenshotCaptured`] when the screenshot is ready.--- --- Screenshots are captured asynchronously and may not be available immediately after the frame--- that the component is spawned on. The observer should be used to handle the screenshot when it--- is ready.--- --- Note that the screenshot entity will be despawned after the screenshot is captured and the--- observer is triggered.--- --- # Usage--- --- ```--- # use bevy_ecs::prelude::*;--- # use bevy_render::view::screenshot::{save_to_disk, Screenshot};--- --- fn take_screenshot(mut commands: Commands) {--- commands.spawn(Screenshot::primary_window())--- .observe(save_to_disk("screenshot.png"));--- }--- ``` ----@field [1] ? RenderTarget - - ----@class ScreenshotCaptured - ----@field [1] ? Image - - ----@class ColorMaterial ---- A [2d material](Material2d) that renders [2d meshes](crate::Mesh2d) with a texture tinted by a uniform color ----@field color ? Color ----@field alpha_mode ? AlphaMode2d ----@field uv_transform ? Affine2 ----@field texture ? Option - - ----@class AlphaMode2d ---- Sets how a 2d material's base color alpha channel is used for transparency.--- Currently, this only works with [`Mesh2d`]. Sprites are always transparent.--- --- This is very similar to [`AlphaMode`](bevy_render::alpha::AlphaMode) but this only applies to 2d meshes.--- We use a separate type because 2d doesn't support all the transparency modes that 3d does. - - ----@class Anchor ---- How a sprite is positioned relative to its [`Transform`].--- It defaults to `Anchor::Center`. - - ----@class Sprite ---- Describes a sprite to be rendered to a 2D camera ----@field image ? Handle ----@field texture_atlas ? Option ----@field color ? Color ----@field flip_x ? boolean ----@field flip_y ? boolean ----@field custom_size ? Option ----@field rect ? Option ----@field anchor ? Anchor ----@field image_mode ? SpriteImageMode - - ----@class SpriteImageMode ---- Controls how the image is altered when scaled. - - ----@class BorderRect ---- Defines the extents of the border of a rectangle.--- --- This struct is used to represent thickness or offsets from the edges--- of a rectangle (left, right, top, and bottom), with values increasing inwards. ----@field left ? number ----@field right ? number ----@field top ? number ----@field bottom ? number - - ----@class SliceScaleMode ---- Defines how a texture slice scales when resized - - ----@class TextureSlicer ---- Slices a texture using the **9-slicing** technique. This allows to reuse an image at various sizes--- without needing to prepare multiple assets. The associated texture will be split into nine portions,--- so that on resize the different portions scale or tile in different ways to keep the texture in proportion.--- --- For example, when resizing a 9-sliced texture the corners will remain unscaled while the other--- sections will be scaled or tiled.--- --- See [9-sliced](https://en.wikipedia.org/wiki/9-slice_scaling) textures. ----@field border ? BorderRect ----@field center_scale_mode ? SliceScaleMode ----@field sides_scale_mode ? SliceScaleMode ----@field max_corner_scale ? number - - ----@class ReflectableScheduleLabel - - - ----@class AppLifecycle ---- Application lifetime events - - ----@class CursorEntered ---- An event that is sent whenever the user's cursor enters a window. ----@field window ? Entity - - ----@class CursorLeft ---- An event that is sent whenever the user's cursor leaves a window. ----@field window ? Entity - - ----@class CursorMoved ---- An event reporting that the mouse cursor has moved inside a window.--- --- The event is sent only if the cursor is over one of the application's windows.--- It is the translated version of [`WindowEvent::CursorMoved`] from the `winit` crate with the addition of `delta`.--- --- Not to be confused with the `MouseMotion` event from `bevy_input`.--- --- Because the range of data is limited by the window area and it may have been transformed by the OS to implement certain effects like acceleration,--- you should not use it for non-cursor-like behavior such as 3D camera control. Please see `MouseMotion` instead.--- --- [`WindowEvent::CursorMoved`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.CursorMoved ----@field window ? Entity ----@field position ? Vec2 ----@field delta ? Option - - ----@class FileDragAndDrop ---- Events related to files being dragged and dropped on a window. - - ----@class Ime ---- An Input Method Editor event.--- --- This event is the translated version of the `WindowEvent::Ime` from the `winit` crate.--- --- It is only sent if IME was enabled on the window with [`Window::ime_enabled`](crate::window::Window::ime_enabled). - - ----@class RequestRedraw ---- An event that indicates all of the application's windows should be redrawn,--- even if their control flow is set to `Wait` and there have been no window events. - - ----@class WindowBackendScaleFactorChanged ---- An event that indicates a window's OS-reported scale factor has changed. ----@field window ? Entity ----@field scale_factor ? number - - ----@class WindowCloseRequested ---- An event that is sent whenever the operating systems requests that a window--- be closed. This will be sent when the close button of the window is pressed.--- --- If the default [`WindowPlugin`] is used, these events are handled--- by closing the corresponding [`Window`].--- To disable this behavior, set `close_when_requested` on the [`WindowPlugin`]--- to `false`.--- --- [`WindowPlugin`]: crate::WindowPlugin--- [`Window`]: crate::Window ----@field window ? Entity - - ----@class WindowClosed ---- An event that is sent whenever a window is closed. This will be sent when--- the window entity loses its [`Window`](crate::window::Window) component or is despawned. ----@field window ? Entity - - ----@class WindowClosing ---- An event that is sent whenever a window is closing. This will be sent when--- after a [`WindowCloseRequested`] event is received and the window is in the process of closing. ----@field window ? Entity - - ----@class WindowCreated ---- An event that is sent whenever a new window is created.--- --- To create a new window, spawn an entity with a [`crate::Window`] on it. ----@field window ? Entity - - ----@class WindowDestroyed ---- An event that is sent whenever a window is destroyed by the underlying window system.--- --- Note that if your application only has a single window, this event may be your last chance to--- persist state before the application terminates. ----@field window ? Entity - - ----@class WindowEvent ---- Wraps all `bevy_window` and `bevy_input` events in a common enum.--- --- Read these events with `EventReader` if you need to--- access window events in the order they were received from the--- operating system. Otherwise, the event types are individually--- readable with `EventReader` (e.g. `EventReader`). - - ----@class WindowFocused ---- An event that indicates a window has received or lost focus. ----@field window ? Entity ----@field focused ? boolean - - ----@class WindowMoved ---- An event that is sent when a window is repositioned in physical pixels. ----@field window ? Entity ----@field position ? IVec2 - - ----@class WindowOccluded ---- The window has been occluded (completely hidden from view).--- --- This is different to window visibility as it depends on--- whether the window is closed, minimized, set invisible,--- or fully occluded by another window.--- --- It is the translated version of [`WindowEvent::Occluded`] from the `winit` crate.--- --- [`WindowEvent::Occluded`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.Occluded ----@field window ? Entity ----@field occluded ? boolean - - ----@class WindowResized ---- A window event that is sent whenever a window's logical size has changed. ----@field window ? Entity ----@field width ? number ----@field height ? number - - ----@class WindowScaleFactorChanged ---- An event that indicates a window's scale factor has changed. ----@field window ? Entity ----@field scale_factor ? number - - ----@class WindowThemeChanged ---- An event sent when the system theme changes for a window.--- --- This event is only sent when the window is relying on the system theme to control its appearance.--- i.e. It is only sent when [`Window::window_theme`](crate::window::Window::window_theme) is `None` and the system theme changes. ----@field window ? Entity ----@field theme ? WindowTheme - - ----@class Monitor ---- Represents an available monitor as reported by the user's operating system, which can be used--- to query information about the display, such as its size, position, and video modes.--- --- Each monitor corresponds to an entity and can be used to position a monitor using--- [`crate::window::MonitorSelection::Entity`].--- --- # Warning--- --- This component is synchronized with `winit` through `bevy_winit`, but is effectively--- read-only as `winit` does not support changing monitor properties. ----@field name ? Option ----@field physical_height ? integer ----@field physical_width ? integer ----@field physical_position ? IVec2 ----@field refresh_rate_millihertz ? Option ----@field scale_factor ? number ----@field video_modes ? Vec - - ----@class VideoMode ---- Represents a video mode that a monitor supports ----@field physical_size ? UVec2 ----@field bit_depth ? integer ----@field refresh_rate_millihertz ? integer - - ----@class SystemCursorIcon ---- The icon to display for a window.--- --- Examples of all of these cursors can be found [here](https://www.w3schools.com/cssref/playit.php?filename=playcss_cursor&preval=crosshair).--- This `enum` is simply a copy of a similar `enum` found in [`winit`](https://docs.rs/winit/latest/winit/window/enum.CursorIcon.html).--- `winit`, in turn, is based upon the [CSS3 UI spec](https://www.w3.org/TR/css-ui-3/#cursor).--- --- See the [`window_settings`] example for usage.--- --- [`window_settings`]: https://github.com/bevyengine/bevy/blob/latest/examples/window/window_settings.rs - - ----@class CompositeAlphaMode ---- Specifies how the alpha channel of the textures should be handled during compositing, for a [`Window`]. - - ----@class CursorGrabMode ---- Defines if and how the cursor is grabbed by a [`Window`].--- --- ## Platform-specific--- --- - **`Windows`** doesn't support [`CursorGrabMode::Locked`]--- - **`macOS`** doesn't support [`CursorGrabMode::Confined`]--- - **`iOS/Android`** don't have cursors.--- --- Since `Windows` and `macOS` have different [`CursorGrabMode`] support, we first try to set the grab mode that was asked for. If it doesn't work then use the alternate grab mode. - - ----@class CursorOptions ---- Cursor data for a [`Window`]. ----@field visible ? boolean ----@field grab_mode ? CursorGrabMode ----@field hit_test ? boolean - - ----@class EnabledButtons ---- Specifies which [`Window`] control buttons should be enabled.--- --- ## Platform-specific--- --- **`iOS`**, **`Android`**, and the **`Web`** do not have window control buttons.--- --- On some **`Linux`** environments these values have no effect. ----@field minimize ? boolean ----@field maximize ? boolean ----@field close ? boolean - - ----@class InternalWindowState ---- Stores internal [`Window`] state that isn't directly accessible. ----@field minimize_request ? Option ----@field maximize_request ? Option ----@field drag_move_request ? boolean ----@field drag_resize_request ? Option ----@field physical_cursor_position ? Option - - ----@class MonitorSelection ---- References a screen monitor.--- --- Used when centering a [`Window`] on a monitor. - - ----@class PresentMode ---- Presentation mode for a [`Window`].--- --- The presentation mode specifies when a frame is presented to the window. The [`Fifo`]--- option corresponds to a traditional `VSync`, where the framerate is capped by the--- display refresh rate. Both [`Immediate`] and [`Mailbox`] are low-latency and are not--- capped by the refresh rate, but may not be available on all platforms. Tearing--- may be observed with [`Immediate`] mode, but will not be observed with [`Mailbox`] or--- [`Fifo`].--- --- [`AutoVsync`] or [`AutoNoVsync`] will gracefully fallback to [`Fifo`] when unavailable.--- --- [`Immediate`] or [`Mailbox`] will panic if not supported by the platform.--- --- [`Fifo`]: PresentMode::Fifo--- [`FifoRelaxed`]: PresentMode::FifoRelaxed--- [`Immediate`]: PresentMode::Immediate--- [`Mailbox`]: PresentMode::Mailbox--- [`AutoVsync`]: PresentMode::AutoVsync--- [`AutoNoVsync`]: PresentMode::AutoNoVsync - - ----@class PrimaryWindow ---- Marker [`Component`] for the window considered the primary window.--- --- Currently this is assumed to only exist on 1 entity at a time.--- --- [`WindowPlugin`](crate::WindowPlugin) will spawn a [`Window`] entity--- with this component if [`primary_window`](crate::WindowPlugin::primary_window)--- is `Some`. - - ----@class VideoModeSelection ---- References an exclusive fullscreen video mode.--- --- Used when setting [`WindowMode::Fullscreen`] on a window. - - ----@class Window ---- The defining [`Component`] for window entities,--- storing information about how it should appear and behave.--- --- Each window corresponds to an entity, and is uniquely identified by the value of their [`Entity`].--- When the [`Window`] component is added to an entity, a new window will be opened.--- When it is removed or the entity is despawned, the window will close.--- --- The primary window entity (and the corresponding window) is spawned by default--- by [`WindowPlugin`](crate::WindowPlugin) and is marked with the [`PrimaryWindow`] component.--- --- This component is synchronized with `winit` through `bevy_winit`:--- it will reflect the current state of the window and can be modified to change this state.--- --- # Example--- --- Because this component is synchronized with `winit`, it can be used to perform--- OS-integrated windowing operations. For example, here's a simple system--- to change the window mode:--- --- ```--- # use bevy_ecs::query::With;--- # use bevy_ecs::system::Query;--- # use bevy_window::{WindowMode, PrimaryWindow, Window, MonitorSelection, VideoModeSelection};--- fn change_window_mode(mut windows: Query<&mut Window, With>) {--- // Query returns one window typically.--- for mut window in windows.iter_mut() {--- window.mode =--- WindowMode::Fullscreen(MonitorSelection::Current, VideoModeSelection::Current);--- }--- }--- ``` ----@field cursor_options ? CursorOptions ----@field present_mode ? PresentMode ----@field mode ? WindowMode ----@field position ? WindowPosition ----@field resolution ? WindowResolution ----@field title ? string ----@field name ? Option ----@field composite_alpha_mode ? CompositeAlphaMode ----@field resize_constraints ? WindowResizeConstraints ----@field resizable ? boolean ----@field enabled_buttons ? EnabledButtons ----@field decorations ? boolean ----@field transparent ? boolean ----@field focused ? boolean ----@field window_level ? WindowLevel ----@field canvas ? Option ----@field fit_canvas_to_parent ? boolean ----@field prevent_default_event_handling ? boolean ----@field internal ? InternalWindowState ----@field ime_enabled ? boolean ----@field ime_position ? Vec2 ----@field window_theme ? Option ----@field visible ? boolean ----@field skip_taskbar ? boolean ----@field clip_children ? boolean ----@field desired_maximum_frame_latency ? Option ----@field recognize_pinch_gesture ? boolean ----@field recognize_rotation_gesture ? boolean ----@field recognize_doubletap_gesture ? boolean ----@field recognize_pan_gesture ? Option ----@field movable_by_window_background ? boolean ----@field fullsize_content_view ? boolean ----@field has_shadow ? boolean ----@field titlebar_shown ? boolean ----@field titlebar_transparent ? boolean ----@field titlebar_show_title ? boolean ----@field titlebar_show_buttons ? boolean ----@field prefers_home_indicator_hidden ? boolean ----@field prefers_status_bar_hidden ? boolean - - ----@class WindowLevel ---- Specifies where a [`Window`] should appear relative to other overlapping windows (on top or under) .--- --- Levels are groups of windows with respect to their z-position.--- --- The relative ordering between windows in different window levels is fixed.--- The z-order of windows within the same window level may change dynamically on user interaction.--- --- ## Platform-specific--- --- - **iOS / Android / Web / Wayland:** Unsupported. - - ----@class WindowMode ---- Defines the way a [`Window`] is displayed. - - ----@class WindowPosition ---- Defines where a [`Window`] should be placed on the screen. - - ----@class WindowRef ---- Reference to a [`Window`], whether it be a direct link to a specific entity or--- a more vague defaulting choice. - - ----@class WindowResizeConstraints ---- The size limits on a [`Window`].--- --- These values are measured in logical pixels (see [`WindowResolution`]), so the user's--- scale factor does affect the size limits on the window.--- --- Please note that if the window is resizable, then when the window is--- maximized it may have a size outside of these limits. The functionality--- required to disable maximizing is not yet exposed by winit. ----@field min_width ? number ----@field min_height ? number ----@field max_width ? number ----@field max_height ? number - - ----@class WindowResolution ---- Controls the size of a [`Window`]--- --- ## Physical, logical and requested sizes--- --- There are three sizes associated with a window:--- - the physical size,--- which represents the actual height and width in physical pixels--- the window occupies on the monitor,--- - the logical size,--- which represents the size that should be used to scale elements--- inside the window, measured in logical pixels,--- - the requested size,--- measured in logical pixels, which is the value submitted--- to the API when creating the window, or requesting that it be resized.--- --- ## Scale factor--- --- The reason logical size and physical size are separated and can be different--- is to account for the cases where:--- - several monitors have different pixel densities,--- - the user has set up a pixel density preference in its operating system,--- - the Bevy `App` has specified a specific scale factor between both.--- --- The factor between physical size and logical size can be retrieved with--- [`WindowResolution::scale_factor`].--- --- For the first two cases, a scale factor is set automatically by the operating--- system through the window backend. You can get it with--- [`WindowResolution::base_scale_factor`].--- --- For the third case, you can override this automatic scale factor with--- [`WindowResolution::set_scale_factor_override`].--- --- ## Requested and obtained sizes--- --- The logical size should be equal to the requested size after creating/resizing,--- when possible.--- The reason the requested size and logical size might be different--- is because the corresponding physical size might exceed limits (either the--- size limits of the monitor, or limits defined in [`WindowResizeConstraints`]).--- --- Note: The requested size is not kept in memory, for example requesting a size--- too big for the screen, making the logical size different from the requested size,--- and then setting a scale factor that makes the previous requested size within--- the limits of the screen will not get back that previous requested size. ----@field physical_width ? integer ----@field physical_height ? integer ----@field scale_factor_override ? Option ----@field scale_factor ? number - - ----@class WindowTheme ---- The [`Window`] theme variant to use. - - ----@class CursorIcon ---- Insert into a window entity to set the cursor for that window. - - ----@class NonZeroU32 - - - ----@class Cow - - - ----@class Arc - - - ----@class Range - - - ----@class RangeInclusive - - - diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs index bb9512a049..cbd0dff75e 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -3,9 +3,12 @@ use std::ops::Index; use indexmap::IndexMap; use ladfile::{LadFile, LadFunction, LadTypeId, LadTypeKind}; -use crate::lua_declaration_file::{ - ClassField, FunctionParam, FunctionSignature, LuaClass, LuaDefinitionFile, LuaModule, - LuaPrimitiveType, LuaType, +use crate::{ + keywords::ForbiddenKeywords, + lua_declaration_file::{ + ClassField, FunctionParam, FunctionSignature, LuaClass, LuaDefinitionFile, LuaModule, + LuaPrimitiveType, LuaType, + }, }; pub fn convert_ladfile_to_lua_declaration_file( @@ -152,17 +155,35 @@ pub fn lad_function_to_lua_function( ladfile: &LadFile, function: &LadFunction, ) -> Result { - let params = function + if let Some((name, idx)) = function.as_overload() { + return Err(anyhow::anyhow!( + "overloads are not yet supported: {name}-{idx}", + )); + } + + ForbiddenKeywords::is_forbidden_err(&function.identifier)?; + + let mut params = function .arguments .iter() + .filter(|a| { + !matches!( + a.kind, + LadTypeKind::Primitive(ladfile::LadBMSPrimitiveKind::FunctionCallContext) + ) + }) .enumerate() .map(|(idx, a)| { + let ident = a + .name + .as_ref() + .map(|v| v.to_string()) + .unwrap_or(format!("p{}", idx + 1)); Ok(FunctionParam { - name: a - .name - .as_ref() - .map(|v| v.to_string()) - .unwrap_or(format!("p{}", idx + 1)), + name: match ForbiddenKeywords::is_forbidden_err(&ident) { + Ok(_) => ident, + Err(_) => format!("_{ident}"), + }, ty: lad_instance_to_lua_type(ladfile, &a.kind)?, optional: matches!(a.kind, LadTypeKind::Option(..)), description: a.documentation.as_ref().map(|d| d.to_string()), @@ -170,6 +191,18 @@ pub fn lad_function_to_lua_function( }) .collect::, anyhow::Error>>()?; + let self_type = match &function.namespace { + ladfile::LadFunctionNamespace::Type(lad_type_id) => function + .arguments + .first() + .is_some_and(|a| match &a.kind { + LadTypeKind::Ref(i) | LadTypeKind::Mut(i) | LadTypeKind::Val(i) => lad_type_id == i, + _ => false, + }) + .then_some(lad_type_id), + ladfile::LadFunctionNamespace::Global => None, + }; + let returns = lad_instance_to_lua_type(ladfile, &function.return_type.kind)?; Ok(FunctionSignature { @@ -183,6 +216,7 @@ pub fn lad_function_to_lua_function( overloads: vec![], generics: vec![], documentation: function.documentation.as_ref().map(|d| d.to_string()), + has_self: self_type.is_some(), }) } @@ -192,7 +226,7 @@ pub fn to_lua_many( ) -> Result, anyhow::Error> { let lua_types = lad_types .iter() - .map(|lad_type| lad_instance_to_lua_type(ladfile, &lad_type)) + .map(|lad_type| lad_instance_to_lua_type(ladfile, lad_type)) .collect::, _>>()?; Ok(lua_types) } diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/keywords.rs b/crates/lad_backends/lua_language_server_lad_backend/src/keywords.rs new file mode 100644 index 0000000000..b5fd31b1f1 --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/src/keywords.rs @@ -0,0 +1,38 @@ +use std::str::FromStr; + +#[derive(strum::EnumString)] +#[strum(serialize_all = "snake_case")] +pub(crate) enum ForbiddenKeywords { + End, + And, + Break, + Do, + Else, + Elseif, + False, + For, + Function, + If, + In, + Local, + Nil, + Not, + Or, + Repeat, + Return, + Then, + True, + Until, + While, +} + +impl ForbiddenKeywords { + /// Checks if a keyword is forbidden + pub fn is_forbidden_err(word: &str) -> anyhow::Result<&str> { + if ForbiddenKeywords::from_str(word).is_ok() { + Err(anyhow::anyhow!("{word} is a reserved keyword in lua")) + } else { + Ok(word) + } + } +} diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs index 5c9182fdcf..70d0fc6b93 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs @@ -7,6 +7,7 @@ use anyhow::Context; use crate::{convert::convert_ladfile_to_lua_declaration_file, templating::render_template}; mod convert; +mod keywords; mod lua_declaration_file; mod templating; diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs index 7805b1b13a..b84d82d600 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs @@ -145,6 +145,7 @@ pub struct FunctionSignature { pub overloads: Vec, pub generics: Vec, pub documentation: Option, + pub has_self: bool, } // Class-related definitions diff --git a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera index fc76d22804..fefa5707a2 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera +++ b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera @@ -10,6 +10,8 @@ {% for field in class.fields -%} {{- self::class_field(field=field) -}} {%- endfor -%} +{{ class.name }} = {} +{# newline #} {%- for function in module.functions -%} {# newline #} {# newline #} @@ -38,7 +40,11 @@ {%- endfor -%} {%- for return in function.returns -%} ---@return {{ self::lua_type(ty=return) }} -local function {{ function.name }}() end +function {% if function.has_self -%}{{class.name}}:{%- else -%}{{class.name}}.{%- endif -%} {{ function.name }}( + {%- for param in function.params -%} + {{ param.name }} {%- if not loop.last -%},{%- endif -%} + {%- endfor -%} +) end {# newline #} {%- endfor -%} {%- endfor -%} {# functions #} @@ -51,6 +57,7 @@ local function {{ function.name }}() end ---@field {{ field.scope }} {{ field.name }} {% if field.optional %}?{% endif %} {{ self::lua_type(ty=field.ty) }} {# newline #} {{- self::multiline_description(description=field.description) -}} +{# newline #} {%- endmacro class_field -%} {%- macro lua_type(ty) -%} @@ -107,6 +114,8 @@ local function {{ function.name }}() end ---@param {{ arg.name }} {{ self::lua_type(ty=arg.ty) }} {% if arg.optional %}?{% endif %} {# newline #} {{- self::multiline_description(description=arg.description) -}} +{# newline #} +{# newline #} {%- endmacro function_param -%} {%- macro multiline_description(description) -%} diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua b/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua index 5c24908720..298a583358 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua @@ -4,25 +4,29 @@ ---@class PlainStructType --- I am a simple plain struct type ---@field int_field ? integer +PlainStructType = {} ---@package ---@param p1 PlainStructType ---@param p2 integer ---@return any -local function plain_struct_function() end +local function plain_struct_function(p1,p2) end ---@class EnumType +EnumType = {} ---@class TupleStructType --- I am a tuple test type ---@field [1] ? integer ---@field [2] ? string +TupleStructType = {} ---@class UnitType --- I am a unit test type +UnitType = {} diff --git a/crates/ladfile/src/lib.rs b/crates/ladfile/src/lib.rs index ecb621b566..48810aabc2 100644 --- a/crates/ladfile/src/lib.rs +++ b/crates/ladfile/src/lib.rs @@ -204,6 +204,17 @@ pub struct LadFunction { pub documentation: Option>, } +impl LadFunction { + /// Checks if the function is an overload, and if so parses the overload number and the true name. + pub fn as_overload(&self) -> Option<(String, usize)> { + let split = self.identifier.split('-').collect::>(); + if split.len() == 2 { + return Some((split[0].to_string(), split[1].parse().ok()?)); + } + None + } +} + #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] #[serde(untagged)] /// A function namespace used in a LAD file. From 3d21e2acd8f3bfc3c8f3aa043c3d0cccb5eb31f1 Mon Sep 17 00:00:00 2001 From: makspll Date: Wed, 29 Oct 2025 08:15:48 +0000 Subject: [PATCH 08/20] get globals going --- .luarc.json | 3 +- assets/definitions/bindings.lua | 1639 ++++++++++++++++- .../src/convert.rs | 31 +- .../src/lua_declaration_file.rs | 23 +- .../templates/declaration_file.tera | 10 +- .../tests/example_ladfile/expected.lua | 18 +- 6 files changed, 1710 insertions(+), 14 deletions(-) diff --git a/.luarc.json b/.luarc.json index a57d8b1c34..6defa13128 100644 --- a/.luarc.json +++ b/.luarc.json @@ -4,5 +4,6 @@ "assets" ], "runtime.version": "Lua 5.4", - "hint.enable": false + "hint.enable": false, + "diagnostics.workspaceDelay": 30000 } \ No newline at end of file diff --git a/assets/definitions/bindings.lua b/assets/definitions/bindings.lua index 3fbbf01067..1568055fa1 100644 --- a/assets/definitions/bindings.lua +++ b/assets/definitions/bindings.lua @@ -121,7 +121,6 @@ function World.despawn_descendants(entity) end ---@return ReflectReference | nil function World.get_asset(handle_reference,registration) end ----@package ---@param registration ScriptResourceRegistration --- The registration of the resource to retrieve. ---@return ReflectReference | nil @@ -28880,3 +28879,1641 @@ Range = {} RangeInclusive = {} + + +---@type Annulus +--- A static class allowing calls through the "." operator only. +Annulus = {} + +---@type CompositeAlphaMode +--- A static class allowing calls through the "." operator only. +CompositeAlphaMode = {} + +---@type FunctionInfo +--- A static class allowing calls through the "." operator only. +FunctionInfo = {} + +---@type GamepadSettings +--- A static class allowing calls through the "." operator only. +GamepadSettings = {} + +---@type WindowBackendScaleFactorChanged +--- A static class allowing calls through the "." operator only. +WindowBackendScaleFactorChanged = {} + +---@type Aabb2d +--- A static class allowing calls through the "." operator only. +Aabb2d = {} + +---@type Camera3d +--- A static class allowing calls through the "." operator only. +Camera3d = {} + +---@type Arc +--- A static class allowing calls through the "." operator only. +Arc = {} + +---@type ClearColorConfig +--- A static class allowing calls through the "." operator only. +ClearColorConfig = {} + +---@type DVec3 +--- A static class allowing calls through the "." operator only. +DVec3 = {} + +---@type GamepadRumbleRequest +--- A static class allowing calls through the "." operator only. +GamepadRumbleRequest = {} + +---@type AtomicU16 +--- A static class allowing calls through the "." operator only. +AtomicU16 = {} + +---@type ConeMeshBuilder +--- A static class allowing calls through the "." operator only. +ConeMeshBuilder = {} + +---@type Segment2d +--- A static class allowing calls through the "." operator only. +Segment2d = {} + +---@type KeyboardFocusLost +--- A static class allowing calls through the "." operator only. +KeyboardFocusLost = {} + +---@type Hwba +--- A static class allowing calls through the "." operator only. +Hwba = {} + +---@type DMat3 +--- A static class allowing calls through the "." operator only. +DMat3 = {} + +---@type Identifier +--- A static class allowing calls through the "." operator only. +Identifier = {} + +---@type DynamicFunctionMut +--- A static class allowing calls through the "." operator only. +DynamicScriptFunctionMut = {} + +---@type MotionVectorPrepass +--- A static class allowing calls through the "." operator only. +MotionVectorPrepass = {} + +---@type RegularPolygonMeshBuilder +--- A static class allowing calls through the "." operator only. +RegularPolygonMeshBuilder = {} + +---@type SmolStr +--- A static class allowing calls through the "." operator only. +SmolStr = {} + +---@type ButtonAxisSettings +--- A static class allowing calls through the "." operator only. +ButtonAxisSettings = {} + +---@type ChromaticAberration +--- A static class allowing calls through the "." operator only. +ChromaticAberration = {} + +---@type OnInsert +--- A static class allowing calls through the "." operator only. +OnInsert = {} + +---@type U8Vec3 +--- A static class allowing calls through the "." operator only. +U8Vec3 = {} + +---@type DQuat +--- A static class allowing calls through the "." operator only. +DQuat = {} + +---@type DynamicComponent +--- A static class allowing calls through the "." operator only. +DynamicComponent = {} + +---@type OrthographicProjection +--- A static class allowing calls through the "." operator only. +OrthographicProjection = {} + +---@type U16Vec4 +--- A static class allowing calls through the "." operator only. +U16Vec4 = {} + +---@type CursorLeft +--- A static class allowing calls through the "." operator only. +CursorLeft = {} + +---@type Arc2d +--- A static class allowing calls through the "." operator only. +Arc2d = {} + +---@type SystemCursorIcon +--- A static class allowing calls through the "." operator only. +SystemCursorIcon = {} + +---@type CameraRenderGraph +--- A static class allowing calls through the "." operator only. +CameraRenderGraph = {} + +---@type BloomCompositeMode +--- A static class allowing calls through the "." operator only. +BloomCompositeMode = {} + +---@type FileDragAndDrop +--- A static class allowing calls through the "." operator only. +FileDragAndDrop = {} + +---@type U64Vec3 +--- A static class allowing calls through the "." operator only. +U64Vec3 = {} + +---@type BVec4 +--- A static class allowing calls through the "." operator only. +BVec4 = {} + +---@type Mat3 +--- A static class allowing calls through the "." operator only. +Mat3 = {} + +---@type Uuid +--- A static class allowing calls through the "." operator only. +Uuid = {} + +---@type Frustum +--- A static class allowing calls through the "." operator only. +Frustum = {} + +---@type ColorGradingSection +--- A static class allowing calls through the "." operator only. +ColorGradingSection = {} + +---@type bool +--- A static class allowing calls through the "." operator only. +bool = {} + +---@type ShaderStorageBuffer +--- A static class allowing calls through the "." operator only. +ShaderStorageBuffer = {} + +---@type Mesh2d +--- A static class allowing calls through the "." operator only. +Mesh2d = {} + +---@type GamepadButtonStateChangedEvent +--- A static class allowing calls through the "." operator only. +GamepadButtonStateChangedEvent = {} + +---@type AabbCast2d +--- A static class allowing calls through the "." operator only. +AabbCast2d = {} + +---@type ReflectableScheduleLabel +--- A static class allowing calls through the "." operator only. +ReflectableScheduleLabel = {} + +---@type AutoExposureCompensationCurve +--- A static class allowing calls through the "." operator only. +AutoExposureCompensationCurve = {} + +---@type SystemIdMarker +--- A static class allowing calls through the "." operator only. +SystemIdMarker = {} + +---@type WindowPosition +--- A static class allowing calls through the "." operator only. +WindowPosition = {} + +---@type AccumulatedMouseMotion +--- A static class allowing calls through the "." operator only. +AccumulatedMouseMotion = {} + +---@type ClearColor +--- A static class allowing calls through the "." operator only. +ClearColor = {} + +---@type CircularSectorMeshBuilder +--- A static class allowing calls through the "." operator only. +CircularSectorMeshBuilder = {} + +---@type Plane3d +--- A static class allowing calls through the "." operator only. +Plane3d = {} + +---@type WindowDestroyed +--- A static class allowing calls through the "." operator only. +WindowDestroyed = {} + +---@type Capsule3d +--- A static class allowing calls through the "." operator only. +Capsule3d = {} + +---@type WindowCreated +--- A static class allowing calls through the "." operator only. +WindowCreated = {} + +---@type MouseWheel +--- A static class allowing calls through the "." operator only. +MouseWheel = {} + +---@type BoundingSphereCast +--- A static class allowing calls through the "." operator only. +BoundingSphereCast = {} + +---@type SmaaPreset +--- A static class allowing calls through the "." operator only. +SmaaPreset = {} + +---@type NativeKeyCode +--- A static class allowing calls through the "." operator only. +NativeKeyCode = {} + +---@type DMat2 +--- A static class allowing calls through the "." operator only. +DMat2 = {} + +---@type i16 +--- A static class allowing calls through the "." operator only. +i16 = {} + +---@type PathBuf +--- A static class allowing calls through the "." operator only. +PathBuf = {} + +---@type IVec2 +--- A static class allowing calls through the "." operator only. +IVec2 = {} + +---@type WindowClosing +--- A static class allowing calls through the "." operator only. +WindowClosing = {} + +---@type ReflectSchedule +--- A static class allowing calls through the "." operator only. +ReflectSchedule = {} + +---@type Entity +--- A static class allowing calls through the "." operator only. +Entity = {} + +---@type Namespace +--- A static class allowing calls through the "." operator only. +Namespace = {} + +---@type DefaultQueryFilters +--- A static class allowing calls through the "." operator only. +DefaultQueryFilters = {} + +---@type Isometry2d +--- A static class allowing calls through the "." operator only. +Isometry2d = {} + +---@type f64 +--- A static class allowing calls through the "." operator only. +f64 = {} + +---@type Sensitivity +--- A static class allowing calls through the "." operator only. +Sensitivity = {} + +---@type Capsule2d +--- A static class allowing calls through the "." operator only. +Capsule2d = {} + +---@type RemovedComponentEntity +--- A static class allowing calls through the "." operator only. +RemovedComponentEntity = {} + +---@type FloatOrd +--- A static class allowing calls through the "." operator only. +FloatOrd = {} + +---@type Anchor +--- A static class allowing calls through the "." operator only. +Anchor = {} + +---@type Hsla +--- A static class allowing calls through the "." operator only. +Hsla = {} + +---@type AtomicU64 +--- A static class allowing calls through the "." operator only. +AtomicU64 = {} + +---@type NormalPrepass +--- A static class allowing calls through the "." operator only. +NormalPrepass = {} + +---@type BloomPrefilter +--- A static class allowing calls through the "." operator only. +BloomPrefilter = {} + +---@type Torus +--- A static class allowing calls through the "." operator only. +Torus = {} + +---@type ScriptSystemBuilder +--- A static class allowing calls through the "." operator only. +ScriptSystemBuilder = {} + +---@type ComponentTicks +--- A static class allowing calls through the "." operator only. +ComponentTicks = {} + +---@type Interval +--- A static class allowing calls through the "." operator only. +Interval = {} + +---@type AtomicU8 +--- A static class allowing calls through the "." operator only. +AtomicU8 = {} + +---@type TouchPhase +--- A static class allowing calls through the "." operator only. +TouchPhase = {} + +---@type TorusMeshBuilder +--- A static class allowing calls through the "." operator only. +TorusMeshBuilder = {} + +---@type CompassQuadrant +--- A static class allowing calls through the "." operator only. +CompassQuadrant = {} + +---@type EulerRot +--- A static class allowing calls through the "." operator only. +EulerRot = {} + +---@type DepthPrepass +--- A static class allowing calls through the "." operator only. +DepthPrepass = {} + +---@type AlphaMode2d +--- A static class allowing calls through the "." operator only. +AlphaMode2d = {} + +---@type NativeKey +--- A static class allowing calls through the "." operator only. +NativeKey = {} + +---@type SocketAddr +--- A static class allowing calls through the "." operator only. +SocketAddr = {} + +---@type Camera3dDepthTextureUsage +--- A static class allowing calls through the "." operator only. +Camera3dDepthTextureUsage = {} + +---@type U64Vec2 +--- A static class allowing calls through the "." operator only. +U64Vec2 = {} + +---@type IVec3 +--- A static class allowing calls through the "." operator only. +IVec3 = {} + +---@type I8Vec2 +--- A static class allowing calls through the "." operator only. +I8Vec2 = {} + +---@type DVec2 +--- A static class allowing calls through the "." operator only. +DVec2 = {} + +---@type Viewport +--- A static class allowing calls through the "." operator only. +Viewport = {} + +---@type I64Vec3 +--- A static class allowing calls through the "." operator only. +I64Vec3 = {} + +---@type OrderIndependentTransparencySettings +--- A static class allowing calls through the "." operator only. +OrderIndependentTransparencySettings = {} + +---@type WindowFocused +--- A static class allowing calls through the "." operator only. +WindowFocused = {} + +---@type Oklaba +--- A static class allowing calls through the "." operator only. +Oklaba = {} + +---@type MouseMotion +--- A static class allowing calls through the "." operator only. +MouseMotion = {} + +---@type Cuboid +--- A static class allowing calls through the "." operator only. +Cuboid = {} + +---@type Tetrahedron +--- A static class allowing calls through the "." operator only. +Tetrahedron = {} + +---@type ScriptAttachment +--- A static class allowing calls through the "." operator only. +ScriptAttachment = {} + +---@type BVec3 +--- A static class allowing calls through the "." operator only. +BVec3 = {} + +---@type WindowOccluded +--- A static class allowing calls through the "." operator only. +WindowOccluded = {} + +---@type ScreenshotCaptured +--- A static class allowing calls through the "." operator only. +ScreenshotCaptured = {} + +---@type Quat +--- A static class allowing calls through the "." operator only. +Quat = {} + +---@type Plane2d +--- A static class allowing calls through the "." operator only. +Plane2d = {} + +---@type I16Vec4 +--- A static class allowing calls through the "." operator only. +I16Vec4 = {} + +---@type ImageRenderTarget +--- A static class allowing calls through the "." operator only. +ImageRenderTarget = {} + +---@type DenoiseCas +--- A static class allowing calls through the "." operator only. +DenoiseCas = {} + +---@type GamepadButtonChangedEvent +--- A static class allowing calls through the "." operator only. +GamepadButtonChangedEvent = {} + +---@type Key +--- A static class allowing calls through the "." operator only. +Key = {} + +---@type PinchGesture +--- A static class allowing calls through the "." operator only. +PinchGesture = {} + +---@type Monitor +--- A static class allowing calls through the "." operator only. +Monitor = {} + +---@type Cone +--- A static class allowing calls through the "." operator only. +Cone = {} + +---@type Ime +--- A static class allowing calls through the "." operator only. +Ime = {} + +---@type OnRemove +--- A static class allowing calls through the "." operator only. +OnRemove = {} + +---@type Line2d +--- A static class allowing calls through the "." operator only. +Line2d = {} + +---@type AtomicI8 +--- A static class allowing calls through the "." operator only. +AtomicI8 = {} + +---@type DeferredPrepass +--- A static class allowing calls through the "." operator only. +DeferredPrepass = {} + +---@type KeyCode +--- A static class allowing calls through the "." operator only. +KeyCode = {} + +---@type TetrahedronMeshBuilder +--- A static class allowing calls through the "." operator only. +TetrahedronMeshBuilder = {} + +---@type WindowResized +--- A static class allowing calls through the "." operator only. +WindowResized = {} + +---@type BVec2 +--- A static class allowing calls through the "." operator only. +BVec2 = {} + +---@type AspectRatio +--- A static class allowing calls through the "." operator only. +AspectRatio = {} + +---@type TemporalJitter +--- A static class allowing calls through the "." operator only. +TemporalJitter = {} + +---@type AtomicI32 +--- A static class allowing calls through the "." operator only. +AtomicI32 = {} + +---@type Color +--- A static class allowing calls through the "." operator only. +Color = {} + +---@type WindowMode +--- A static class allowing calls through the "." operator only. +WindowMode = {} + +---@type I64Vec4 +--- A static class allowing calls through the "." operator only. +I64Vec4 = {} + +---@type WindowRef +--- A static class allowing calls through the "." operator only. +WindowRef = {} + +---@type ViewVisibility +--- A static class allowing calls through the "." operator only. +ViewVisibility = {} + +---@type RawGamepadAxisChangedEvent +--- A static class allowing calls through the "." operator only. +RawGamepadAxisChangedEvent = {} + +---@type GlobalTransform +--- A static class allowing calls through the "." operator only. +GlobalTransform = {} + +---@type Rectangle +--- A static class allowing calls through the "." operator only. +Rectangle = {} + +---@type Dir3 +--- A static class allowing calls through the "." operator only. +Dir3 = {} + +---@type Sprite +--- A static class allowing calls through the "." operator only. +Sprite = {} + +---@type ButtonSettings +--- A static class allowing calls through the "." operator only. +ButtonSettings = {} + +---@type IVec4 +--- A static class allowing calls through the "." operator only. +IVec4 = {} + +---@type PerspectiveProjection +--- A static class allowing calls through the "." operator only. +PerspectiveProjection = {} + +---@type RequestRedraw +--- A static class allowing calls through the "." operator only. +RequestRedraw = {} + +---@type WindowThemeChanged +--- A static class allowing calls through the "." operator only. +WindowThemeChanged = {} + +---@type Line3d +--- A static class allowing calls through the "." operator only. +Line3d = {} + +---@type Mat2 +--- A static class allowing calls through the "." operator only. +Mat2 = {} + +---@type IRect +--- A static class allowing calls through the "." operator only. +IRect = {} + +---@type Mesh3d +--- A static class allowing calls through the "." operator only. +Mesh3d = {} + +---@type TextureAtlas +--- A static class allowing calls through the "." operator only. +TextureAtlas = {} + +---@type ContrastAdaptiveSharpening +--- A static class allowing calls through the "." operator only. +ContrastAdaptiveSharpening = {} + +---@type Msaa +--- A static class allowing calls through the "." operator only. +Msaa = {} + +---@type CubemapFrusta +--- A static class allowing calls through the "." operator only. +CubemapFrusta = {} + +---@type PrimaryWindow +--- A static class allowing calls through the "." operator only. +PrimaryWindow = {} + +---@type AlphaMode +--- A static class allowing calls through the "." operator only. +AlphaMode = {} + +---@type U8Vec2 +--- A static class allowing calls through the "." operator only. +U8Vec2 = {} + +---@type ScalingMode +--- A static class allowing calls through the "." operator only. +ScalingMode = {} + +---@type CameraMainTextureUsages +--- A static class allowing calls through the "." operator only. +CameraMainTextureUsages = {} + +---@type U64Vec4 +--- A static class allowing calls through the "." operator only. +U64Vec4 = {} + +---@type Exposure +--- A static class allowing calls through the "." operator only. +Exposure = {} + +---@type SphereKind +--- A static class allowing calls through the "." operator only. +SphereKind = {} + +---@type SubCameraView +--- A static class allowing calls through the "." operator only. +SubCameraView = {} + +---@type Triangle2dMeshBuilder +--- A static class allowing calls through the "." operator only. +Triangle2dMeshBuilder = {} + +---@type UVec3 +--- A static class allowing calls through the "." operator only. +UVec3 = {} + +---@type MotionBlur +--- A static class allowing calls through the "." operator only. +MotionBlur = {} + +---@type GamepadButton +--- A static class allowing calls through the "." operator only. +GamepadButton = {} + +---@type WindowLevel +--- A static class allowing calls through the "." operator only. +WindowLevel = {} + +---@type TemporalAntiAliasing +--- A static class allowing calls through the "." operator only. +TemporalAntiAliasing = {} + +---@type Screenshot +--- A static class allowing calls through the "." operator only. +Screenshot = {} + +---@type i64 +--- A static class allowing calls through the "." operator only. +i64 = {} + +---@type UVec4 +--- A static class allowing calls through the "." operator only. +UVec4 = {} + +---@type ButtonState +--- A static class allowing calls through the "." operator only. +ButtonState = {} + +---@type RegularPolygon +--- A static class allowing calls through the "." operator only. +RegularPolygon = {} + +---@type Hsva +--- A static class allowing calls through the "." operator only. +Hsva = {} + +---@type ScriptQueryBuilder +--- A static class allowing calls through the "." operator only. +ScriptQueryBuilder = {} + +---@type I8Vec3 +--- A static class allowing calls through the "." operator only. +I8Vec3 = {} + +---@type Fixed +--- A static class allowing calls through the "." operator only. +Fixed = {} + +---@type Duration +--- A static class allowing calls through the "." operator only. +Duration = {} + +---@type CursorGrabMode +--- A static class allowing calls through the "." operator only. +CursorGrabMode = {} + +---@type Lcha +--- A static class allowing calls through the "." operator only. +Lcha = {} + +---@type WindowMoved +--- A static class allowing calls through the "." operator only. +WindowMoved = {} + +---@type Vec2 +--- A static class allowing calls through the "." operator only. +Vec2 = {} + +---@type Triangle3d +--- A static class allowing calls through the "." operator only. +Triangle3d = {} + +---@type Image +--- A static class allowing calls through the "." operator only. +Image = {} + +---@type Laba +--- A static class allowing calls through the "." operator only. +Laba = {} + +---@type AssetPath +--- A static class allowing calls through the "." operator only. +AssetPath = {} + +---@type Capsule3dMeshBuilder +--- A static class allowing calls through the "." operator only. +Capsule3dMeshBuilder = {} + +---@type EllipseMeshBuilder +--- A static class allowing calls through the "." operator only. +EllipseMeshBuilder = {} + +---@type BoundingCircle +--- A static class allowing calls through the "." operator only. +BoundingCircle = {} + +---@type ScriptValue +--- A static class allowing calls through the "." operator only. +ScriptValue = {} + +---@type CircleMeshBuilder +--- A static class allowing calls through the "." operator only. +CircleMeshBuilder = {} + +---@type GamepadAxisChangedEvent +--- A static class allowing calls through the "." operator only. +GamepadAxisChangedEvent = {} + +---@type VisibleEntities +--- A static class allowing calls through the "." operator only. +VisibleEntities = {} + +---@type Camera +--- A static class allowing calls through the "." operator only. +Camera = {} + +---@type BorderRect +--- A static class allowing calls through the "." operator only. +BorderRect = {} + +---@type f32 +--- A static class allowing calls through the "." operator only. +f32 = {} + +---@type MipBias +--- A static class allowing calls through the "." operator only. +MipBias = {} + +---@type DepthOfField +--- A static class allowing calls through the "." operator only. +DepthOfField = {} + +---@type i8 +--- A static class allowing calls through the "." operator only. +i8 = {} + +---@type CascadesFrusta +--- A static class allowing calls through the "." operator only. +CascadesFrusta = {} + +---@type DAffine3 +--- A static class allowing calls through the "." operator only. +DAffine3 = {} + +---@type RawGamepadButtonChangedEvent +--- A static class allowing calls through the "." operator only. +RawGamepadButtonChangedEvent = {} + +---@type MorphWeights +--- A static class allowing calls through the "." operator only. +MorphWeights = {} + +---@type Range +--- A static class allowing calls through the "." operator only. +Range = {} + +---@type Rect +--- A static class allowing calls through the "." operator only. +Rect = {} + +---@type NonZeroU32 +--- A static class allowing calls through the "." operator only. +NonZeroU32 = {} + +---@type BoundingCircleCast +--- A static class allowing calls through the "." operator only. +BoundingCircleCast = {} + +---@type ScriptResourceRegistration +--- A static class allowing calls through the "." operator only. +ScriptResourceRegistration = {} + +---@type Indices +--- A static class allowing calls through the "." operator only. +Indices = {} + +---@type AxisSettings +--- A static class allowing calls through the "." operator only. +AxisSettings = {} + +---@type SliceScaleMode +--- A static class allowing calls through the "." operator only. +SliceScaleMode = {} + +---@type Vec3 +--- A static class allowing calls through the "." operator only. +Vec3 = {} + +---@type u64 +--- A static class allowing calls through the "." operator only. +u64 = {} + +---@type Transform +--- A static class allowing calls through the "." operator only. +Transform = {} + +---@type Vec4 +--- A static class allowing calls through the "." operator only. +Vec4 = {} + +---@type Ellipse +--- A static class allowing calls through the "." operator only. +Ellipse = {} + +---@type DebandDither +--- A static class allowing calls through the "." operator only. +DebandDither = {} + +---@type Ray3d +--- A static class allowing calls through the "." operator only. +Ray3d = {} + +---@type AssetIndex +--- A static class allowing calls through the "." operator only. +AssetIndex = {} + +---@type CompassOctant +--- A static class allowing calls through the "." operator only. +CompassOctant = {} + +---@type CircularSegmentMeshBuilder +--- A static class allowing calls through the "." operator only. +CircularSegmentMeshBuilder = {} + +---@type FunctionReturnInfo +--- A static class allowing calls through the "." operator only. +FunctionReturnInfo = {} + +---@type VideoMode +--- A static class allowing calls through the "." operator only. +VideoMode = {} + +---@type AtomicUsize +--- A static class allowing calls through the "." operator only. +AtomicUsize = {} + +---@type BVec3A +--- A static class allowing calls through the "." operator only. +BVec3A = {} + +---@type RenderAssetUsages +--- A static class allowing calls through the "." operator only. +RenderAssetUsages = {} + +---@type Fxaa +--- A static class allowing calls through the "." operator only. +Fxaa = {} + +---@type Vec3A +--- A static class allowing calls through the "." operator only. +Vec3A = {} + +---@type Ray2d +--- A static class allowing calls through the "." operator only. +Ray2d = {} + +---@type RotationGesture +--- A static class allowing calls through the "." operator only. +RotationGesture = {} + +---@type AtomicIsize +--- A static class allowing calls through the "." operator only. +AtomicIsize = {} + +---@type TransformTreeChanged +--- A static class allowing calls through the "." operator only. +TransformTreeChanged = {} + +---@type ScriptComponentRegistration +--- A static class allowing calls through the "." operator only. +ScriptComponentRegistration = {} + +---@type AtomicI64 +--- A static class allowing calls through the "." operator only. +AtomicI64 = {} + +---@type MouseButton +--- A static class allowing calls through the "." operator only. +MouseButton = {} + +---@type CircularSector +--- A static class allowing calls through the "." operator only. +CircularSector = {} + +---@type VisibilityClass +--- A static class allowing calls through the "." operator only. +VisibilityClass = {} + +---@type Rot2 +--- A static class allowing calls through the "." operator only. +Rot2 = {} + +---@type RayCast2d +--- A static class allowing calls through the "." operator only. +RayCast2d = {} + +---@type TextureSlicer +--- A static class allowing calls through the "." operator only. +TextureSlicer = {} + +---@type GamepadConnection +--- A static class allowing calls through the "." operator only. +GamepadConnection = {} + +---@type AutoExposure +--- A static class allowing calls through the "." operator only. +AutoExposure = {} + +---@type DVec4 +--- A static class allowing calls through the "." operator only. +DVec4 = {} + +---@type Srgba +--- A static class allowing calls through the "." operator only. +Srgba = {} + +---@type Camera2d +--- A static class allowing calls through the "." operator only. +Camera2d = {} + +---@type Visibility +--- A static class allowing calls through the "." operator only. +Visibility = {} + +---@type Instant +--- A static class allowing calls through the "." operator only. +Instant = {} + +---@type Xyza +--- A static class allowing calls through the "." operator only. +Xyza = {} + +---@type CuboidMeshBuilder +--- A static class allowing calls through the "." operator only. +CuboidMeshBuilder = {} + +---@type ScriptAsset +--- A static class allowing calls through the "." operator only. +ScriptAsset = {} + +---@type EntityHashSet +--- A static class allowing calls through the "." operator only. +EntityHashSet = {} + +---@type DynamicFunction +--- A static class allowing calls through the "." operator only. +DynamicScriptFunction = {} + +---@type CircularMeshUvMode +--- A static class allowing calls through the "." operator only. +CircularMeshUvMode = {} + +---@type BoundingSphere +--- A static class allowing calls through the "." operator only. +BoundingSphere = {} + +---@type OnAdd +--- A static class allowing calls through the "." operator only. +OnAdd = {} + +---@type u8 +--- A static class allowing calls through the "." operator only. +u8 = {} + +---@type CapsuleUvProfile +--- A static class allowing calls through the "." operator only. +CapsuleUvProfile = {} + +---@type ReflectReference +--- A static class allowing calls through the "." operator only. +ReflectReference = {} + +---@type CustomProjection +--- A static class allowing calls through the "." operator only. +CustomProjection = {} + +---@type Mesh +--- A static class allowing calls through the "." operator only. +Mesh = {} + +---@type ReflectSystem +--- A static class allowing calls through the "." operator only. +ReflectSystem = {} + +---@type GamepadAxis +--- A static class allowing calls through the "." operator only. +GamepadAxis = {} + +---@type Mat4 +--- A static class allowing calls through the "." operator only. +Mat4 = {} + +---@type OnDespawn +--- A static class allowing calls through the "." operator only. +OnDespawn = {} + +---@type RawGamepadEvent +--- A static class allowing calls through the "." operator only. +RawGamepadEvent = {} + +---@type Virtual +--- A static class allowing calls through the "." operator only. +Virtual = {} + +---@type ColorGradingGlobal +--- A static class allowing calls through the "." operator only. +ColorGradingGlobal = {} + +---@type CursorIcon +--- A static class allowing calls through the "." operator only. +CursorIcon = {} + +---@type Affine2 +--- A static class allowing calls through the "." operator only. +Affine2 = {} + +---@type isize +--- A static class allowing calls through the "." operator only. +isize = {} + +---@type AtomicU32 +--- A static class allowing calls through the "." operator only. +AtomicU32 = {} + +---@type FunctionCallContext +--- A static class allowing calls through the "." operator only. +FunctionCallContext = {} + +---@type i128 +--- A static class allowing calls through the "." operator only. +i128 = {} + +---@type Circle +--- A static class allowing calls through the "." operator only. +Circle = {} + +---@type ComponentId +--- A static class allowing calls through the "." operator only. +ComponentId = {} + +---@type FunctionArgInfo +--- A static class allowing calls through the "." operator only. +FunctionArgInfo = {} + +---@type SpriteImageMode +--- A static class allowing calls through the "." operator only. +SpriteImageMode = {} + +---@type MonitorSelection +--- A static class allowing calls through the "." operator only. +MonitorSelection = {} + +---@type AtomicBool +--- A static class allowing calls through the "." operator only. +AtomicBool = {} + +---@type Isometry3d +--- A static class allowing calls through the "." operator only. +Isometry3d = {} + +---@type JumpAt +--- A static class allowing calls through the "." operator only. +JumpAt = {} + +---@type Bloom +--- A static class allowing calls through the "." operator only. +Bloom = {} + +---@type OcclusionCulling +--- A static class allowing calls through the "." operator only. +OcclusionCulling = {} + +---@type InfinitePlane3d +--- A static class allowing calls through the "." operator only. +InfinitePlane3d = {} + +---@type Tonemapping +--- A static class allowing calls through the "." operator only. +Tonemapping = {} + +---@type ManualTextureViewHandle +--- A static class allowing calls through the "." operator only. +ManualTextureViewHandle = {} + +---@type ScriptTypeRegistration +--- A static class allowing calls through the "." operator only. +ScriptTypeRegistration = {} + +---@type Disabled +--- A static class allowing calls through the "." operator only. +Disabled = {} + +---@type RangeFull +--- A static class allowing calls through the "." operator only. +RangeFull = {} + +---@type Segment3d +--- A static class allowing calls through the "." operator only. +Segment3d = {} + +---@type U16Vec3 +--- A static class allowing calls through the "." operator only. +U16Vec3 = {} + +---@type u32 +--- A static class allowing calls through the "." operator only. +u32 = {} + +---@type WindowClosed +--- A static class allowing calls through the "." operator only. +WindowClosed = {} + +---@type Cow +--- A static class allowing calls through the "." operator only. +Cow = {} + +---@type ColorGrading +--- A static class allowing calls through the "." operator only. +ColorGrading = {} + +---@type ScriptQueryResult +--- A static class allowing calls through the "." operator only. +ScriptQueryResult = {} + +---@type EnabledButtons +--- A static class allowing calls through the "." operator only. +EnabledButtons = {} + +---@type RangeInclusive +--- A static class allowing calls through the "." operator only. +RangeInclusive = {} + +---@type Timer +--- A static class allowing calls through the "." operator only. +Timer = {} + +---@type usize +--- A static class allowing calls through the "." operator only. +usize = {} + +---@type InternalWindowState +--- A static class allowing calls through the "." operator only. +InternalWindowState = {} + +---@type WindowScaleFactorChanged +--- A static class allowing calls through the "." operator only. +WindowScaleFactorChanged = {} + +---@type RenderTarget +--- A static class allowing calls through the "." operator only. +RenderTarget = {} + +---@type GamepadConnectionEvent +--- A static class allowing calls through the "." operator only. +GamepadConnectionEvent = {} + +---@type DAffine2 +--- A static class allowing calls through the "." operator only. +DAffine2 = {} + +---@type AnnulusMeshBuilder +--- A static class allowing calls through the "." operator only. +AnnulusMeshBuilder = {} + +---@type VideoModeSelection +--- A static class allowing calls through the "." operator only. +VideoModeSelection = {} + +---@type ForceTouch +--- A static class allowing calls through the "." operator only. +ForceTouch = {} + +---@type InteropError +--- A static class allowing calls through the "." operator only. +InteropError = {} + +---@type WindowResolution +--- A static class allowing calls through the "." operator only. +WindowResolution = {} + +---@type ChildOf +--- A static class allowing calls through the "." operator only. +ChildOf = {} + +---@type CylinderAnchor +--- A static class allowing calls through the "." operator only. +CylinderAnchor = {} + +---@type U16Vec2 +--- A static class allowing calls through the "." operator only. +U16Vec2 = {} + +---@type u128 +--- A static class allowing calls through the "." operator only. +u128 = {} + +---@type GamepadRumbleIntensity +--- A static class allowing calls through the "." operator only. +GamepadRumbleIntensity = {} + +---@type table +--- An global instance of this type +types = {} + +---@type Skybox +--- A static class allowing calls through the "." operator only. +Skybox = {} + +---@type CylinderMeshBuilder +--- A static class allowing calls through the "." operator only. +CylinderMeshBuilder = {} + +---@type Camera3dDepthLoadOp +--- A static class allowing calls through the "." operator only. +Camera3dDepthLoadOp = {} + +---@type AccumulatedMouseScroll +--- A static class allowing calls through the "." operator only. +AccumulatedMouseScroll = {} + +---@type WindowEvent +--- A static class allowing calls through the "." operator only. +WindowEvent = {} + +---@type ScreenSpaceTransmissionQuality +--- A static class allowing calls through the "." operator only. +ScreenSpaceTransmissionQuality = {} + +---@type Dir2 +--- A static class allowing calls through the "." operator only. +Dir2 = {} + +---@type Sphere +--- A static class allowing calls through the "." operator only. +Sphere = {} + +---@type ConicalFrustum +--- A static class allowing calls through the "." operator only. +ConicalFrustum = {} + +---@type CircularSegment +--- A static class allowing calls through the "." operator only. +CircularSegment = {} + +---@type LinearRgba +--- A static class allowing calls through the "." operator only. +LinearRgba = {} + +---@type NoFrustumCulling +--- A static class allowing calls through the "." operator only. +NoFrustumCulling = {} + +---@type Dir3A +--- A static class allowing calls through the "." operator only. +Dir3A = {} + +---@type DepthOfFieldMode +--- A static class allowing calls through the "." operator only. +DepthOfFieldMode = {} + +---@type TypeId +--- A static class allowing calls through the "." operator only. +TypeId = {} + +---@type I16Vec2 +--- A static class allowing calls through the "." operator only. +I16Vec2 = {} + +---@type RectangleMeshBuilder +--- A static class allowing calls through the "." operator only. +RectangleMeshBuilder = {} + +---@type KeyboardInput +--- A static class allowing calls through the "." operator only. +KeyboardInput = {} + +---@type Name +--- A static class allowing calls through the "." operator only. +Name = {} + +---@type AppLifecycle +--- A static class allowing calls through the "." operator only. +AppLifecycle = {} + +---@type URect +--- A static class allowing calls through the "." operator only. +URect = {} + +---@type MouseScrollUnit +--- A static class allowing calls through the "." operator only. +MouseScrollUnit = {} + +---@type char +--- A static class allowing calls through the "." operator only. +char = {} + +---@type TouchInput +--- A static class allowing calls through the "." operator only. +TouchInput = {} + +---@type Capsule2dMeshBuilder +--- A static class allowing calls through the "." operator only. +Capsule2dMeshBuilder = {} + +---@type EaseFunction +--- A static class allowing calls through the "." operator only. +EaseFunction = {} + +---@type GamepadEvent +--- A static class allowing calls through the "." operator only. +GamepadEvent = {} + +---@type Triangle2d +--- A static class allowing calls through the "." operator only. +Triangle2d = {} + +---@type u16 +--- A static class allowing calls through the "." operator only. +u16 = {} + +---@type String +--- A static class allowing calls through the "." operator only. +String = {} + +---@type ConeAnchor +--- A static class allowing calls through the "." operator only. +ConeAnchor = {} + +---@type i32 +--- A static class allowing calls through the "." operator only. +i32 = {} + +---@type CursorOptions +--- A static class allowing calls through the "." operator only. +CursorOptions = {} + +---@type AtomicI16 +--- A static class allowing calls through the "." operator only. +AtomicI16 = {} + +---@type Children +--- A static class allowing calls through the "." operator only. +Children = {} + +---@type I64Vec2 +--- A static class allowing calls through the "." operator only. +I64Vec2 = {} + +---@type SphereMeshBuilder +--- A static class allowing calls through the "." operator only. +SphereMeshBuilder = {} + +---@type MouseButtonInput +--- A static class allowing calls through the "." operator only. +MouseButtonInput = {} + +---@type MeshMorphWeights +--- A static class allowing calls through the "." operator only. +MeshMorphWeights = {} + +---@type Projection +--- A static class allowing calls through the "." operator only. +Projection = {} + +---@type DMat4 +--- A static class allowing calls through the "." operator only. +DMat4 = {} + +---@type GamepadInput +--- A static class allowing calls through the "." operator only. +GamepadInput = {} + +---@type CursorMoved +--- A static class allowing calls through the "." operator only. +CursorMoved = {} + +---@type Gamepad +--- A static class allowing calls through the "." operator only. +Gamepad = {} + +---@type ColorMaterial +--- A static class allowing calls through the "." operator only. +ColorMaterial = {} + +---@type GlobalsUniform +--- A static class allowing calls through the "." operator only. +GlobalsUniform = {} + +---@type TimerMode +--- A static class allowing calls through the "." operator only. +TimerMode = {} + +---@type Affine3 +--- A static class allowing calls through the "." operator only. +Affine3 = {} + +---@type Tick +--- A static class allowing calls through the "." operator only. +Tick = {} + +---@type RhombusMeshBuilder +--- A static class allowing calls through the "." operator only. +RhombusMeshBuilder = {} + +---@type VisibilityRange +--- A static class allowing calls through the "." operator only. +VisibilityRange = {} + +---@type OnReplace +--- A static class allowing calls through the "." operator only. +OnReplace = {} + +---@type U8Vec4 +--- A static class allowing calls through the "." operator only. +U8Vec4 = {} + +---@type BVec4A +--- A static class allowing calls through the "." operator only. +BVec4A = {} + +---@type Affine3A +--- A static class allowing calls through the "." operator only. +Affine3A = {} + +---@type RenderLayers +--- A static class allowing calls through the "." operator only. +RenderLayers = {} + +---@type SyncToRenderWorld +--- A static class allowing calls through the "." operator only. +SyncToRenderWorld = {} + +---@type DoubleTapGesture +--- A static class allowing calls through the "." operator only. +DoubleTapGesture = {} + +---@type Stopwatch +--- A static class allowing calls through the "." operator only. +Stopwatch = {} + +---@type AabbCast3d +--- A static class allowing calls through the "." operator only. +AabbCast3d = {} + +---@type I8Vec4 +--- A static class allowing calls through the "." operator only. +I8Vec4 = {} + +---@type ConicalFrustumMeshBuilder +--- A static class allowing calls through the "." operator only. +ConicalFrustumMeshBuilder = {} + +---@type WindowTheme +--- A static class allowing calls through the "." operator only. +WindowTheme = {} + +---@type Real +--- A static class allowing calls through the "." operator only. +Real = {} + +---@type PlaneMeshBuilder +--- A static class allowing calls through the "." operator only. +PlaneMeshBuilder = {} + +---@type WindowCloseRequested +--- A static class allowing calls through the "." operator only. +WindowCloseRequested = {} + +---@type RayCast3d +--- A static class allowing calls through the "." operator only. +RayCast3d = {} + +---@type Mat3A +--- A static class allowing calls through the "." operator only. +Mat3A = {} + +---@type SkinnedMesh +--- A static class allowing calls through the "." operator only. +SkinnedMesh = {} + +---@type PresentMode +--- A static class allowing calls through the "." operator only. +PresentMode = {} + +---@type Aabb3d +--- A static class allowing calls through the "." operator only. +Aabb3d = {} + +---@type EntityHash +--- A static class allowing calls through the "." operator only. +EntityHash = {} + +---@type UVec2 +--- A static class allowing calls through the "." operator only. +UVec2 = {} + +---@type Window +--- A static class allowing calls through the "." operator only. +Window = {} + +---@type InheritedVisibility +--- A static class allowing calls through the "." operator only. +InheritedVisibility = {} + +---@type CursorEntered +--- A static class allowing calls through the "." operator only. +CursorEntered = {} + +---@type TextureAtlasLayout +--- A static class allowing calls through the "." operator only. +TextureAtlasLayout = {} + +---@type Triangle3dMeshBuilder +--- A static class allowing calls through the "." operator only. +Triangle3dMeshBuilder = {} + +---@type Aabb +--- A static class allowing calls through the "." operator only. +Aabb = {} + +---@type I16Vec3 +--- A static class allowing calls through the "." operator only. +I16Vec3 = {} + +---@type PanGesture +--- A static class allowing calls through the "." operator only. +PanGesture = {} + +---@type Smaa +--- A static class allowing calls through the "." operator only. +Smaa = {} + +---@type Rhombus +--- A static class allowing calls through the "." operator only. +Rhombus = {} + +---@type WindowResizeConstraints +--- A static class allowing calls through the "." operator only. +WindowResizeConstraints = {} + +---@type Oklcha +--- A static class allowing calls through the "." operator only. +Oklcha = {} + +---@type Cylinder +--- A static class allowing calls through the "." operator only. +Cylinder = {} + +---@type Handle +--- An global instance of this type +script_asset = {} + +---@type World +--- An global instance of this type +world = {} + +---@type Entity +--- An global instance of this type +entity = {} + diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs index cbd0dff75e..57d2efec19 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -54,6 +54,35 @@ pub fn convert_ladfile_to_lua_declaration_file( }); } + let mut globals_module = LuaModule { + name: "globals".to_string(), + ..Default::default() + }; + for (name, instance) in ladfile.globals.iter() { + let class = match lad_instance_to_lua_type(&ladfile, &instance.type_kind) { + Ok(c) => c, + Err(e) => { + log::error!("Could not generate global: {e}"); + continue; + } + }; + + let description = if instance.is_static { + "A static class allowing calls through the \".\" operator only. " + } else { + "An global instance of this type" + }; + + globals_module + .globals + .push(crate::lua_declaration_file::TypeInstance { + name: name.to_string(), + definition: class, + description: Some(description.into()), + }) + } + definition_file.modules.push(globals_module); + Ok(definition_file) } @@ -212,7 +241,7 @@ pub fn lad_function_to_lua_function( async_fn: false, deprecated: false, nodiscard: false, - package: true, + package: false, overloads: vec![], generics: vec![], documentation: function.documentation.as_ref().map(|d| d.to_string()), diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs index b84d82d600..2aa70c1b4a 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs @@ -306,18 +306,24 @@ pub struct EnumVariant { /// ---| "green" /// ---| "blue" /// -/// ---@enum Status -/// local Status = { -/// PENDING = 0, -/// SUCCESS = 1, -/// ERROR = 2 -/// } /// ``` #[derive(Debug, Clone, Serialize)] pub struct TypeAlias { + pub instance: TypeInstance, +} + +/// Represents a local/global +////// +/// # Examples +/// ```lua +/// ---@type MyType +/// MyType = {} +/// +/// ``` +#[derive(Debug, Clone, Serialize)] +pub struct TypeInstance { pub name: String, pub definition: LuaType, - pub enum_variants: Vec, // For enum-like aliases pub description: Option, } @@ -344,9 +350,8 @@ pub struct TypeAlias { pub struct LuaModule { pub name: String, pub classes: Vec, - pub aliases: Vec, + pub globals: Vec, pub functions: Vec, - pub enums: Vec, pub documentation: Option, pub is_meta: bool, } diff --git a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera index fefa5707a2..a393d4e3ec 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera +++ b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera @@ -51,6 +51,14 @@ function {% if function.has_self -%}{{class.name}}:{%- else -%}{{class.name}}.{% {%- endfor -%} {# class #} {# newline #} {# newline #} +{%- for global in module.globals -%} +---@type {{self::lua_type(ty=global.definition)}} +{{self::multiline_description(description=global.description)}} +{{global.name}} = {} +{# newline #} +{# newline #} +{%- endfor -%} + {%- endfor -%} {# modules #} {%- macro class_field(field) -%} @@ -84,7 +92,7 @@ function {% if function.has_self -%}{{class.name}}:{%- else -%}{{class.name}}.{% {%- endfor -%} ] {%- elif ty.kind == "Dictionary" -%} - table<{{ self::lua_type(ty=ty.key) }}, {{ self::lua_type(ty=ty.value) }}> + table<{{ self::lua_type(ty=ty.value.key) }}, {{ self::lua_type(ty=ty.value.value) }}> {%- elif ty.kind == "TableLiteral" -%} { {%- for key in ty.value | keys -%} diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua b/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua index 298a583358..70490565ad 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua @@ -8,9 +8,11 @@ PlainStructType = {} ---@package ---@param p1 PlainStructType + ---@param p2 integer + ---@return any -local function plain_struct_function(p1,p2) end +function PlainStructType:plain_struct_function(p1,p2) end ---@class EnumType @@ -30,3 +32,17 @@ TupleStructType = {} UnitType = {} + + +---@type GenericStructType +--- A static class allowing calls through the "." operator only. +my_static_instance = {} + +---@type UnitType[] +--- An global instance of this type +my_non_static_instance = {} + +---@type table +--- An global instance of this type +map = {} + From 37ac2a97714a5959f51b20148ec28ac35dbcc2cc Mon Sep 17 00:00:00 2001 From: makspll Date: Sat, 1 Nov 2025 19:37:14 +0000 Subject: [PATCH 09/20] support multiple overrides --- assets/definitions/bindings.lua | 17894 ++++++---------- crates/bevy_mod_scripting_core/src/lib.rs | 1 + .../src/convert.rs | 110 +- .../src/lua_declaration_file.rs | 8 +- .../templates/declaration_file.tera | 40 +- .../tests/integration_tests.rs | 9 +- crates/ladfile/src/lib.rs | 41 +- crates/ladfile_builder/src/lib.rs | 26 +- 8 files changed, 7072 insertions(+), 11057 deletions(-) diff --git a/assets/definitions/bindings.lua b/assets/definitions/bindings.lua index 1568055fa1..dafefcb241 100644 --- a/assets/definitions/bindings.lua +++ b/assets/definitions/bindings.lua @@ -1,47 +1,37 @@ ---@meta ---@module "World" ----@class World +---@class World : ReflectReference --- The ECS world containing all Components, Resources and Systems. Main point of interaction with a Bevy App. World = {} ----@package ---@return ScriptQueryBuilder function World.query() end ----@package ---@param e Entity - ---@return boolean function World.has_entity(e) end ----@package ---@param entity Entity - ---@param registration ScriptComponentRegistration --- The resource to add. ----@return [] +---@return nil function World.add_default_component(entity,registration) end ----@package ---@param handle_reference ReflectReference - ---@return boolean function World.has_asset(handle_reference) end ----@package ---@param entity Entity --- The entity to retrieve the parent of. ---@return Entity | nil function World.get_parent(entity) end ----@package ---@param registration ScriptResourceRegistration --- The registration of the resource to check for. ---@return boolean function World.has_resource(registration) end ----@package ---@param entity Entity --- The entity to retrieve the component from. ---@param registration ScriptComponentRegistration @@ -49,7 +39,6 @@ function World.has_resource(registration) end ---@return ReflectReference | nil function World.get_component(entity,registration) end ----@package ---@param entity Entity --- The entity to check. ---@param registration ScriptComponentRegistration @@ -57,63 +46,54 @@ function World.get_component(entity,registration) end ---@return boolean function World.has_component(entity,registration) end ----@package ---@param entity Entity --- The entity to despawn. ----@return [] +---@return nil function World.despawn(entity) end ----@package ---@param entity Entity --- The parent entity to receive children ---@param index integer --- The index to insert the children at ---@param children Entity[] --- The children entities to insert ----@return [] +---@return nil function World.insert_children(entity,index,children) end ----@package ----@return [] +---@return nil function World.exit() end ----@package ---@param entity Entity --- The entity to insert the component into. ---@param registration ScriptComponentRegistration --- The component registration of the component to insert. ---@param value ReflectReference --- The value of the component to insert. Can be constructed using `construct` ----@return [] +---@return nil function World.insert_component(entity,registration,value) end ----@package ---@param name string --- The name of the component type ---@return ScriptComponentRegistration function World.register_new_component(name) end ----@package ---@param registration ScriptResourceRegistration --- The resource to remove. ----@return [] +---@return nil function World.remove_resource(registration) end ----@package ---@param entity Entity --- The entity to remove the component from. ---@param registration ScriptComponentRegistration --- The component to remove. ----@return [] +---@return nil function World.remove_component(entity,registration) end ----@package ---@param entity Entity --- The entity to despawn the descendants of. ----@return [] +---@return nil function World.despawn_descendants(entity) end ----@package ---@param handle_reference ReflectReference --- The handle to the asset (as a reflect reference). ---@param registration ScriptTypeRegistration @@ -126,39 +106,33 @@ function World.get_asset(handle_reference,registration) end ---@return ReflectReference | nil function World.get_resource(registration) end ----@package ---@param entity Entity --- The entity to despawn recursively. ----@return [] +---@return nil function World.despawn_recursive(entity) end ----@package ---@param entity Entity --- The parent entity to receive children ---@param children Entity[] --- The children entities to push ----@return [] +---@return nil function World.push_children(entity,children) end ----@package ---@param name string --- The name of the schedule to retrieve. ---@return ReflectSchedule | nil function World.get_schedule_by_name(name) end ----@package ---@param entity Entity --- The entity to retrieve the children of. ---@return Entity[] function World.get_children(entity) end ----@package ---@param type_name string --- The name of the type to retrieve. ---@return ScriptTypeRegistration | ScriptComponentRegistration | ScriptResourceRegistration | nil function World.get_type_by_name(type_name) end ----@package ---@param schedule ReflectSchedule --- The schedule to add the system to. ---@param builder ScriptSystemBuilder @@ -166,138 +140,230 @@ function World.get_type_by_name(type_name) end ---@return ReflectSystem function World.add_system(schedule,builder) end ----@package ---@return Entity function World.spawn() end ----@class ScriptComponentRegistration ---- A reference to a component type's reflection registration.--- --- In general think of this as a handle to a type.--- --- Not to be confused with script registered dynamic components, although this can point to a script registered component. +---@class ReflectReference : ReflectReference +--- A reference to an arbitrary reflected instance. +--- +--- The reference can point to either the ECS, or to the allocator. +--- +--- References are composed of two parts: +--- - The base kind, which specifies where the reference points to +--- - The path, which specifies how to access the value from the base. +--- +--- Bindings defined on this type, apply to ALL references. +ReflectReference = {} + +---@param reference ReflectReference +--- The reference to remove the value from. +---@param key any +--- The key to remove the value at. +---@return any +function ReflectReference.remove(reference,key) end + +---@param reference ReflectReference +--- The reference to clear. +---@return nil +function ReflectReference.clear(reference) end + +---@param reference ReflectReference +--- The reference to pop the value from. +---@return any +function ReflectReference.pop(reference) end + +---@param reference ReflectReference +--- The reference to index into. +---@param key any +--- The key to index with. +---@return any | nil +function ReflectReference.map_get(reference,key) end + +---@param reference ReflectReference +--- The reference to get the variant name of. +---@return string | nil +function ReflectReference.variant_name(reference) end + +---@param reference ReflectReference +--- The reference to get the length of. +---@return integer | nil +function ReflectReference.len(reference) end + +---@param reference ReflectReference +--- The reference to insert the value into. +---@param key any +--- The index to insert the value at. +---@param value any +--- The value to insert. +---@return nil +function ReflectReference.insert(reference,key,value) end + +---@param reference ReflectReference +--- The reference to list the functions of. +---@return FunctionInfo[] +function ReflectReference.functions(reference) end + +---@param reference ReflectReference +--- The reference to iterate over. +---@return function +function ReflectReference.iter(reference) end + +---@param reference ReflectReference +--- The reference to display. +---@return string +function ReflectReference.debug(reference) end + +---@param reference ReflectReference +--- The reference to display. +---@return string +function ReflectReference.display(reference) end + +---@param reference ReflectReference +--- The reference to push the value into. +---@param value any +--- The value to push. +---@return nil +function ReflectReference.push(reference,value) end + + +---@class ScriptComponentRegistration : ReflectReference +--- A reference to a component type's reflection registration. +--- +--- In general think of this as a handle to a type. +--- +--- Not to be confused with script registered dynamic components, although this can point to a script registered component. ---@field registration ? ScriptTypeRegistration ---@field component_id ? ComponentId ---@field is_dynamic_script_component ? boolean ScriptComponentRegistration = {} ----@package ---@param registration ScriptComponentRegistration --- The type registration. ---@return string function ScriptComponentRegistration:type_name(registration) end ----@package ---@param registration ScriptComponentRegistration --- The type registration. ---@return string function ScriptComponentRegistration:short_name(registration) end ----@class ScriptQueryBuilder ---- The query builder is used to build ECS queries which retrieve spefific components filtered by specific conditions.--- --- For example:--- ```rust,ignore--- builder.component(componentA)--- .component(componentB)--- .with(componentC)--- .without(componentD) --- ```--- --- Will retrieve entities which:--- - Have componentA--- - Have componentB--- - Have componentC--- - Do not have componentD--- --- As well as references to components:--- - componentA--- - componentB +---@class ScriptQueryBuilder : ReflectReference +--- The query builder is used to build ECS queries which retrieve spefific components filtered by specific conditions. +--- +--- For example: +--- ```rust,ignore +--- builder.component(componentA) +--- .component(componentB) +--- .with(componentC) +--- .without(componentD) +--- ``` +--- +--- Will retrieve entities which: +--- - Have componentA +--- - Have componentB +--- - Have componentC +--- - Do not have componentD +--- +--- As well as references to components: +--- - componentA +--- - componentB ScriptQueryBuilder = {} ----@package ---@param query ScriptQueryBuilder --- The query to add the component to ----@param with ScriptComponentRegistration - +---@param without ScriptComponentRegistration ---@return ScriptQueryBuilder -function ScriptQueryBuilder:with(query,with) end +function ScriptQueryBuilder:without(query,without) end ----@package ---@param query ScriptQueryBuilder --- The query to add the component to ---@param components ScriptComponentRegistration - ---@return ScriptQueryBuilder function ScriptQueryBuilder:component(query,components) end ----@package ----@param query ScriptQueryBuilder ---- The query to add the component to ----@param without ScriptComponentRegistration - ----@return ScriptQueryBuilder -function ScriptQueryBuilder:without(query,without) end - ----@package ---@param query ScriptQueryBuilder --- The query to build. ---@return ScriptQueryResult[] function ScriptQueryBuilder.build(query) end +---@param query ScriptQueryBuilder +--- The query to add the component to +---@param with ScriptComponentRegistration +---@return ScriptQueryBuilder +function ScriptQueryBuilder:with(query,with) end + ----@class ScriptQueryResult +---@class ScriptQueryResult : ReflectReference --- A result from a query. ScriptQueryResult = {} ----@package ----@param query ScriptQueryResult ---- The query result to retrieve the components from. ----@return ReflectReference[] -function ScriptQueryResult:components(query) end - ----@package ---@param query ScriptQueryResult --- The query result to retrieve the entity from. ---@return Entity function ScriptQueryResult:entity(query) end +---@param query ScriptQueryResult +--- The query result to retrieve the components from. +---@return ReflectReference[] +function ScriptQueryResult:components(query) end + ----@class ScriptResourceRegistration ---- A reference to a resource type's reflection registration.--- --- In general think of this as a handle to a type. +---@class ScriptResourceRegistration : ReflectReference +--- A reference to a resource type's reflection registration. +--- +--- In general think of this as a handle to a type. ---@field registration ? ScriptTypeRegistration ---@field resource_id ? ComponentId ScriptResourceRegistration = {} ----@package ---@param registration ScriptResourceRegistration --- The type registration. ---@return string -function ScriptResourceRegistration:type_name(registration) end +function ScriptResourceRegistration:short_name(registration) end ----@package ---@param registration ScriptResourceRegistration --- The type registration. ---@return string -function ScriptResourceRegistration:short_name(registration) end +function ScriptResourceRegistration:type_name(registration) end ----@class ScriptTypeRegistration ---- A reference to a type which is not a `Resource` or `Component`.--- --- In general think of this as a handle to a type. +---@class ScriptTypeRegistration : ReflectReference +--- A reference to a type which is not a `Resource` or `Component`. +--- +--- In general think of this as a handle to a type. ScriptTypeRegistration = {} ----@package ---@param registration ScriptTypeRegistration --- The type registration. ---@return string -function ScriptTypeRegistration:type_name(registration) end +function ScriptTypeRegistration:short_name(registration) end ----@package ---@param registration ScriptTypeRegistration --- The type registration. ---@return string -function ScriptTypeRegistration:short_name(registration) end +function ScriptTypeRegistration:type_name(registration) end ----@class ScriptSystemBuilder +---@class ScriptSystemBuilder : ReflectReference --- A builder for systems living in scripts ScriptSystemBuilder = {} ----@package ---@param builder ScriptSystemBuilder ---- The system builder to add the dependency to. ----@param system ReflectSystem ---- The system to run after. +--- The system builder to add the resource to. +---@param resource ScriptResourceRegistration +--- The resource to add. ---@return ScriptSystemBuilder -function ScriptSystemBuilder:after(builder,system) end +function ScriptSystemBuilder:resource(builder,resource) end ----@package ---@param builder ScriptSystemBuilder ---- The system builder to make exclusive. +--- The system builder to add the query to. +---@param query ScriptQueryBuilder +--- The query to add. ---@return ScriptSystemBuilder -function ScriptSystemBuilder:exclusive(builder) end +function ScriptSystemBuilder:query(builder,query) end ----@package ---@param builder ScriptSystemBuilder --- The system builder to add the dependency to. ---@param system ReflectSystem @@ -305,28 +371,28 @@ function ScriptSystemBuilder:exclusive(builder) end ---@return ScriptSystemBuilder function ScriptSystemBuilder:before(builder,system) end ----@package ---@param builder ScriptSystemBuilder ---- The system builder to add the query to. ----@param query ScriptQueryBuilder ---- The query to add. +--- The system builder to add the dependency to. +---@param system ReflectSystem +--- The system to run after. ---@return ScriptSystemBuilder -function ScriptSystemBuilder:query(builder,query) end +function ScriptSystemBuilder:after(builder,system) end ----@package ---@param builder ScriptSystemBuilder ---- The system builder to add the resource to. ----@param resource ScriptResourceRegistration ---- The resource to add. +--- The system builder to make exclusive. ---@return ScriptSystemBuilder -function ScriptSystemBuilder:resource(builder,resource) end +function ScriptSystemBuilder:exclusive(builder) end ----@class ScriptAttachment ---- Specifies a unique attachment of a script. These attachments are mapped to [`ContextKey`]'s depending on the context policy used. +---@class ScriptAttachment : ReflectReference +--- Specifies a unique attachment of a script. These attachments are mapped to [`bevy_mod_scripting_core::ContextKey`]'s depending on the context policy used. ScriptAttachment = {} ----@package +---@param script Handle +--- The script asset to create the attachment from. +---@return ScriptAttachment +function ScriptAttachment.new_static_script(script) end + ---@param entity Entity --- The entity to attach the script to. ---@param script Handle @@ -334,26 +400,18 @@ ScriptAttachment = {} ---@return ScriptAttachment function ScriptAttachment.new_entity_script(entity,script) end ----@package ----@param script Handle ---- The script asset to create the attachment from. ----@return ScriptAttachment -function ScriptAttachment.new_static_script(script) end - ----@class ReflectSchedule +---@class ReflectSchedule : ReflectReference --- A reflectable schedule. ---@field type_path ? string ---@field label ? ReflectableScheduleLabel ReflectSchedule = {} ----@package ---@param schedule ReflectSchedule --- The schedule to retrieve the systems from. ---@return ReflectSystem[] function ReflectSchedule.systems(schedule) end ----@package ---@param schedule ReflectSchedule --- The schedule to retrieve the system from. ---@param name string @@ -361,41 +419,67 @@ function ReflectSchedule.systems(schedule) end ---@return ReflectSystem | nil function ReflectSchedule.get_system_by_name(schedule,name) end ----@package ---@param schedule ReflectSchedule --- The schedule to render. ---@return string function ReflectSchedule.render_dot(schedule) end ----@class ReflectSystem +---@class ReflectSystem : ReflectReference --- A reflectable system. ReflectSystem = {} ----@package ---@param system ReflectSystem --- The system to retrieve the identifier from. ---@return string function ReflectSystem:identifier(system) end ----@package ---@param system ReflectSystem --- The system to retrieve the path from. ---@return string function ReflectSystem:path(system) end ----@class Color ---- An enumerated type that can represent any of the color types in this crate.--- --- This is useful when you need to store a color in a data structure that can't be generic over--- the color type.---
---
--- --- # Operations--- --- [`Color`] supports all the standard color operations, such as [mixing](Mix),--- [luminance](Luminance) and [hue](Hue) adjustment,--- and [diffing](EuclideanDistance). These operations delegate to the concrete color space contained--- by [`Color`], but will convert to [`Oklch`](Oklcha) for operations which aren't supported in the--- current space. After performing the operation, if a conversion was required, the result will be--- converted back into the original color space.--- --- ```rust--- # use bevy_color::{Hue, Color};--- let red_hsv = Color::hsv(0., 1., 1.);--- let red_srgb = Color::srgb(1., 0., 0.);--- --- // HSV has a definition of hue, so it will be returned.--- red_hsv.hue();--- --- // SRGB doesn't have a native definition for hue.--- // Converts to Oklch and returns that result.--- red_srgb.hue();--- ```--- --- [`Oklch`](Oklcha) has been chosen as the intermediary space in cases where conversion is required--- due to its perceptual uniformity and broad support for Bevy's color operations.--- To avoid the cost of repeated conversion, and ensure consistent results where that is desired,--- first convert this [`Color`] into your desired color space. +---@class Color : ReflectReference +--- An enumerated type that can represent any of the color types in this crate. +--- +--- This is useful when you need to store a color in a data structure that can't be generic over +--- the color type. +---
+---
+--- +--- # Operations +--- +--- [`Color`] supports all the standard color operations, such as [mixing](Mix), +--- [luminance](Luminance) and [hue](Hue) adjustment, +--- and [diffing](EuclideanDistance). These operations delegate to the concrete color space contained +--- by [`Color`], but will convert to [`Oklch`](Oklcha) for operations which aren't supported in the +--- current space. After performing the operation, if a conversion was required, the result will be +--- converted back into the original color space. +--- +--- ```rust +--- # use bevy_color::{Hue, Color}; +--- let red_hsv = Color::hsv(0., 1., 1.); +--- let red_srgb = Color::srgb(1., 0., 0.); +--- +--- // HSV has a definition of hue, so it will be returned. +--- red_hsv.hue(); +--- +--- // SRGB doesn't have a native definition for hue. +--- // Converts to Oklch and returns that result. +--- red_srgb.hue(); +--- ``` +--- +--- [`Oklch`](Oklcha) has been chosen as the intermediary space in cases where conversion is required +--- due to its perceptual uniformity and broad support for Bevy's color operations. +--- To avoid the cost of repeated conversion, and ensure consistent results where that is desired, +--- first convert this [`Color`] into your desired color space. Color = {} ----@package ---@param _self Color - ---@return LinearRgba function Color:to_linear(_self) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.5] ---@param chroma number @@ -407,7 +491,6 @@ function Color:to_linear(_self) end ---@return Color function Color.lcha(lightness,chroma,hue,alpha) end ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param saturation number @@ -417,7 +500,6 @@ function Color.lcha(lightness,chroma,hue,alpha) end ---@return Color function Color.hsv(hue,saturation,value) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.0] ---@param chroma number @@ -429,7 +511,6 @@ function Color.hsv(hue,saturation,value) end ---@return Color function Color.oklcha(lightness,chroma,hue,alpha) end ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param whiteness number @@ -441,7 +522,6 @@ function Color.oklcha(lightness,chroma,hue,alpha) end ---@return Color function Color.hwba(hue,whiteness,blackness,alpha) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.0] ---@param a number @@ -453,7 +533,6 @@ function Color.hwba(hue,whiteness,blackness,alpha) end ---@return Color function Color.oklaba(lightness,a,b,alpha) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.5] ---@param a number @@ -465,13 +544,10 @@ function Color.oklaba(lightness,a,b,alpha) end ---@return Color function Color.laba(lightness,a,b,alpha) end ----@package ---@param _self Color - ---@return Srgba function Color:to_srgba(_self) end ----@package ---@param red number --- Red channel. [0.0, 1.0] ---@param green number @@ -483,7 +559,6 @@ function Color:to_srgba(_self) end ---@return Color function Color.srgba(red,green,blue,alpha) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.0] ---@param a number @@ -493,7 +568,6 @@ function Color.srgba(red,green,blue,alpha) end ---@return Color function Color.oklab(lightness,a,b) end ----@package ---@param x number --- x-axis. [0.0, 1.0] ---@param y number @@ -503,7 +577,6 @@ function Color.oklab(lightness,a,b) end ---@return Color function Color.xyz(x,y,z) end ----@package ---@param red number --- Red channel. [0.0, 1.0] ---@param green number @@ -513,7 +586,6 @@ function Color.xyz(x,y,z) end ---@return Color function Color.srgb(red,green,blue) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.0] ---@param chroma number @@ -523,7 +595,6 @@ function Color.srgb(red,green,blue) end ---@return Color function Color.oklch(lightness,chroma,hue) end ----@package ---@param red number --- Red channel. [0.0, 1.0] ---@param green number @@ -533,7 +604,6 @@ function Color.oklch(lightness,chroma,hue) end ---@return Color function Color.linear_rgb(red,green,blue) end ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param whiteness number @@ -543,7 +613,6 @@ function Color.linear_rgb(red,green,blue) end ---@return Color function Color.hwb(hue,whiteness,blackness) end ----@package ---@param red integer --- Red channel. [0, 255] ---@param green integer @@ -553,13 +622,10 @@ function Color.hwb(hue,whiteness,blackness) end ---@return Color function Color.srgb_u8(red,green,blue) end ----@package ---@param _self Color - ---@return Color function Color:clone(_self) end ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param saturation number @@ -571,7 +637,6 @@ function Color:clone(_self) end ---@return Color function Color.hsla(hue,saturation,lightness,alpha) end ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param saturation number @@ -583,15 +648,11 @@ function Color.hsla(hue,saturation,lightness,alpha) end ---@return Color function Color.hsva(hue,saturation,value,alpha) end ----@package ---@param _self Color - ---@param other Color - ---@return boolean function Color:eq(_self,other) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.5] ---@param a number @@ -601,7 +662,6 @@ function Color:eq(_self,other) end ---@return Color function Color.lab(lightness,a,b) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.5] ---@param chroma number @@ -611,7 +671,6 @@ function Color.lab(lightness,a,b) end ---@return Color function Color.lch(lightness,chroma,hue) end ----@package ---@param x number --- x-axis. [0.0, 1.0] ---@param y number @@ -623,7 +682,6 @@ function Color.lch(lightness,chroma,hue) end ---@return Color function Color.xyza(x,y,z,alpha) end ----@package ---@param red number --- Red channel. [0.0, 1.0] ---@param green number @@ -635,7 +693,6 @@ function Color.xyza(x,y,z,alpha) end ---@return Color function Color.linear_rgba(red,green,blue,alpha) end ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param saturation number @@ -645,7 +702,6 @@ function Color.linear_rgba(red,green,blue,alpha) end ---@return Color function Color.hsl(hue,saturation,lightness) end ----@package ---@param red integer --- Red channel. [0, 255] ---@param green integer @@ -657,36 +713,32 @@ function Color.hsl(hue,saturation,lightness) end ---@return Color function Color.srgba_u8(red,green,blue,alpha) end ----@package ---@param array number[] --- Red, Green and Blue channels. Each channel is in the range [0.0, 1.0] ---@return Color function Color.srgb_from_array(array) end ----@class Hsla ---- Color in Hue-Saturation-Lightness (HSL) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV).---
---
+---@class Hsla : ReflectReference +--- Color in Hue-Saturation-Lightness (HSL) color space with alpha. +--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV). +---
+---
---@field hue ? number ---@field saturation ? number ---@field lightness ? number ---@field alpha ? number Hsla = {} ----@package ---@param _self Hsla - ---@param lightness number - ---@return Hsla function Hsla:with_lightness(_self,lightness) end ----@package ---@param _self Hsla - ---@return Hsla function Hsla:clone(_self) end ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param saturation number @@ -698,7 +750,6 @@ function Hsla:clone(_self) end ---@return Hsla function Hsla.new(hue,saturation,lightness,alpha) end ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param saturation number @@ -708,38 +759,32 @@ function Hsla.new(hue,saturation,lightness,alpha) end ---@return Hsla function Hsla.hsl(hue,saturation,lightness) end ----@package ---@param _self Hsla - ---@param saturation number - ---@return Hsla function Hsla:with_saturation(_self,saturation) end ----@package ---@param index integer - ---@return Hsla function Hsla.sequential_dispersed(index) end ----@package ---@param _self Hsla - ---@param other Hsla - ---@return boolean function Hsla:eq(_self,other) end ----@class Hsva ---- Color in Hue-Saturation-Value (HSV) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV).---
---
+---@class Hsva : ReflectReference +--- Color in Hue-Saturation-Value (HSV) color space with alpha. +--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV). +---
+---
---@field hue ? number ---@field saturation ? number ---@field value ? number ---@field alpha ? number Hsva = {} ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param saturation number @@ -751,15 +796,11 @@ Hsva = {} ---@return Hsva function Hsva.new(hue,saturation,value,alpha) end ----@package ---@param _self Hsva - ---@param value number - ---@return Hsva function Hsva:with_value(_self,value) end ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param saturation number @@ -769,38 +810,32 @@ function Hsva:with_value(_self,value) end ---@return Hsva function Hsva.hsv(hue,saturation,value) end ----@package ---@param _self Hsva - ---@return Hsva function Hsva:clone(_self) end ----@package ---@param _self Hsva - ---@param other Hsva - ---@return boolean function Hsva:eq(_self,other) end ----@package ---@param _self Hsva - ---@param saturation number - ---@return Hsva function Hsva:with_saturation(_self,saturation) end ----@class Hwba ---- Color in Hue-Whiteness-Blackness (HWB) color space with alpha.--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HWB_color_model).---
---
+---@class Hwba : ReflectReference +--- Color in Hue-Whiteness-Blackness (HWB) color space with alpha. +--- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HWB_color_model). +---
+---
---@field hue ? number ---@field whiteness ? number ---@field blackness ? number ---@field alpha ? number Hwba = {} ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param whiteness number @@ -810,29 +845,20 @@ Hwba = {} ---@return Hwba function Hwba.hwb(hue,whiteness,blackness) end ----@package ---@param _self Hwba - ---@param blackness number - ---@return Hwba function Hwba:with_blackness(_self,blackness) end ----@package ---@param _self Hwba - ---@return Hwba function Hwba:clone(_self) end ----@package ---@param _self Hwba - ---@param other Hwba - ---@return boolean function Hwba:eq(_self,other) end ----@package ---@param hue number --- Hue channel. [0.0, 360.0] ---@param whiteness number @@ -844,30 +870,26 @@ function Hwba:eq(_self,other) end ---@return Hwba function Hwba.new(hue,whiteness,blackness,alpha) end ----@package ---@param _self Hwba - ---@param whiteness number - ---@return Hwba function Hwba:with_whiteness(_self,whiteness) end ----@class Laba ---- Color in LAB color space, with alpha---
---
+---@class Laba : ReflectReference +--- Color in LAB color space, with alpha +---
+---
---@field lightness ? number ---@field a ? number ---@field b ? number ---@field alpha ? number Laba = {} ----@package ---@param _self Laba - ---@return Laba function Laba:neg(_self) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.5] ---@param a number @@ -879,39 +901,26 @@ function Laba:neg(_self) end ---@return Laba function Laba.new(lightness,a,b,alpha) end ----@package ---@param _self Laba - ---@param rhs number - ---@return Laba function Laba:div(_self,rhs) end ----@package ---@param _self Laba - ---@param rhs Laba - ---@return Laba function Laba:add(_self,rhs) end ----@package ---@param _self Laba - ---@param lightness number - ---@return Laba function Laba:with_lightness(_self,lightness) end ----@package ---@param _self Laba - ---@param rhs number - ---@return Laba function Laba:mul(_self,rhs) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.5] ---@param a number @@ -921,46 +930,36 @@ function Laba:mul(_self,rhs) end ---@return Laba function Laba.lab(lightness,a,b) end ----@package ---@param _self Laba - ---@param other Laba - ---@return boolean function Laba:eq(_self,other) end ----@package ---@param _self Laba - ---@param rhs Laba - ---@return Laba function Laba:sub(_self,rhs) end ----@package ---@param _self Laba - ---@return Laba function Laba:clone(_self) end ----@class Lcha ---- Color in LCH color space, with alpha---
---
+---@class Lcha : ReflectReference +--- Color in LCH color space, with alpha +---
+---
---@field lightness ? number ---@field chroma ? number ---@field hue ? number ---@field alpha ? number Lcha = {} ----@package ---@param _self Lcha - ---@param chroma number - ---@return Lcha function Lcha:with_chroma(_self,chroma) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.5] ---@param chroma number @@ -972,7 +971,6 @@ function Lcha:with_chroma(_self,chroma) end ---@return Lcha function Lcha.new(lightness,chroma,hue,alpha) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.5] ---@param chroma number @@ -982,58 +980,44 @@ function Lcha.new(lightness,chroma,hue,alpha) end ---@return Lcha function Lcha.lch(lightness,chroma,hue) end ----@package ---@param _self Lcha - ---@param other Lcha - ---@return boolean function Lcha:eq(_self,other) end ----@package ---@param index integer - ---@return Lcha function Lcha.sequential_dispersed(index) end ----@package ---@param _self Lcha - ---@param lightness number - ---@return Lcha function Lcha:with_lightness(_self,lightness) end ----@package ---@param _self Lcha - ---@return Lcha function Lcha:clone(_self) end ----@class LinearRgba ---- Linear RGB color with alpha.---
---
+---@class LinearRgba : ReflectReference +--- Linear RGB color with alpha. +---
+---
---@field red ? number ---@field green ? number ---@field blue ? number ---@field alpha ? number LinearRgba = {} ----@package ---@param _self LinearRgba - ---@return integer function LinearRgba:as_u32(_self) end ----@package ---@param _self LinearRgba - ---@param other LinearRgba - ---@return boolean function LinearRgba:eq(_self,other) end ----@package ---@param red number --- Red channel. [0.0, 1.0] ---@param green number @@ -1043,148 +1027,100 @@ function LinearRgba:eq(_self,other) end ---@return LinearRgba function LinearRgba.rgb(red,green,blue) end ----@package ---@param _self LinearRgba - ---@param rhs number - ---@return LinearRgba function LinearRgba:div(_self,rhs) end ----@package ---@param red number - ---@param green number - ---@param blue number - ---@param alpha number - ---@return LinearRgba function LinearRgba.new(red,green,blue,alpha) end ----@package ---@param _self LinearRgba - ---@param rhs LinearRgba - ---@return LinearRgba function LinearRgba:sub(_self,rhs) end ----@package ---@param _self LinearRgba - ---@return LinearRgba function LinearRgba:clone(_self) end ----@package ---@param _self LinearRgba - ---@param rhs LinearRgba - ---@return LinearRgba function LinearRgba:add(_self,rhs) end ----@package ---@param _self LinearRgba - ---@param rhs number - ---@return LinearRgba function LinearRgba:mul(_self,rhs) end ----@package ---@param _self LinearRgba - ---@param red number - ---@return LinearRgba function LinearRgba:with_red(_self,red) end ----@package ---@param _self LinearRgba - ---@param green number - ---@return LinearRgba function LinearRgba:with_green(_self,green) end ----@package ---@param _self LinearRgba - ---@return LinearRgba function LinearRgba:neg(_self) end ----@package ---@param _self LinearRgba - ---@param blue number - ---@return LinearRgba function LinearRgba:with_blue(_self,blue) end ----@class Oklaba ---- Color in Oklab color space, with alpha---
---
+---@class Oklaba : ReflectReference +--- Color in Oklab color space, with alpha +---
+---
---@field lightness ? number ---@field a ? number ---@field b ? number ---@field alpha ? number Oklaba = {} ----@package ---@param _self Oklaba - ---@param rhs Oklaba - ---@return Oklaba function Oklaba:sub(_self,rhs) end ----@package ---@param _self Oklaba - ---@return Oklaba function Oklaba:neg(_self) end ----@package ---@param _self Oklaba - ---@param b number - ---@return Oklaba function Oklaba:with_b(_self,b) end ----@package ---@param _self Oklaba - ---@param rhs number - ---@return Oklaba function Oklaba:div(_self,rhs) end ----@package ---@param _self Oklaba - ---@return Oklaba function Oklaba:clone(_self) end ----@package ---@param _self Oklaba - ---@param other Oklaba - ---@return boolean function Oklaba:eq(_self,other) end ----@package ---@param _self Oklaba - ---@param rhs Oklaba - ---@return Oklaba function Oklaba:add(_self,rhs) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.0] ---@param a number @@ -1194,15 +1130,11 @@ function Oklaba:add(_self,rhs) end ---@return Oklaba function Oklaba.lab(lightness,a,b) end ----@package ---@param _self Oklaba - ---@param rhs number - ---@return Oklaba function Oklaba:mul(_self,rhs) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.0] ---@param a number @@ -1214,40 +1146,32 @@ function Oklaba:mul(_self,rhs) end ---@return Oklaba function Oklaba.new(lightness,a,b,alpha) end ----@package ---@param _self Oklaba - ---@param a number - ---@return Oklaba function Oklaba:with_a(_self,a) end ----@package ---@param _self Oklaba - ---@param lightness number - ---@return Oklaba function Oklaba:with_lightness(_self,lightness) end ----@class Oklcha ---- Color in Oklch color space, with alpha---
---
+---@class Oklcha : ReflectReference +--- Color in Oklch color space, with alpha +---
+---
---@field lightness ? number ---@field chroma ? number ---@field hue ? number ---@field alpha ? number Oklcha = {} ----@package ---@param _self Oklcha - ---@param lightness number - ---@return Oklcha function Oklcha:with_lightness(_self,lightness) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.0] ---@param chroma number @@ -1259,7 +1183,6 @@ function Oklcha:with_lightness(_self,lightness) end ---@return Oklcha function Oklcha.new(lightness,chroma,hue,alpha) end ----@package ---@param lightness number --- Lightness channel. [0.0, 1.0] ---@param chroma number @@ -1269,50 +1192,39 @@ function Oklcha.new(lightness,chroma,hue,alpha) end ---@return Oklcha function Oklcha.lch(lightness,chroma,hue) end ----@package ---@param _self Oklcha - ---@return Oklcha function Oklcha:clone(_self) end ----@package ---@param index integer - ---@return Oklcha function Oklcha.sequential_dispersed(index) end ----@package ---@param _self Oklcha - ---@param other Oklcha - ---@return boolean function Oklcha:eq(_self,other) end ----@package ---@param _self Oklcha - ---@param chroma number - ---@return Oklcha function Oklcha:with_chroma(_self,chroma) end ----@class Srgba ---- Non-linear standard RGB with alpha.---
---
+---@class Srgba : ReflectReference +--- Non-linear standard RGB with alpha. +---
+---
---@field red ? number ---@field green ? number ---@field blue ? number ---@field alpha ? number Srgba = {} ----@package ---@param _self Srgba - ---@return Srgba function Srgba:neg(_self) end ----@package ---@param red number --- Red channel. [0.0, 1.0] ---@param green number @@ -1324,23 +1236,16 @@ function Srgba:neg(_self) end ---@return Srgba function Srgba.new(red,green,blue,alpha) end ----@package ---@param _self Srgba - ---@param rhs number - ---@return Srgba function Srgba:mul(_self,rhs) end ----@package ---@param _self Srgba - ---@param rhs Srgba - ---@return Srgba function Srgba:add(_self,rhs) end ----@package ---@param r integer --- Red channel. [0, 255] ---@param g integer @@ -1350,15 +1255,11 @@ function Srgba:add(_self,rhs) end ---@return Srgba function Srgba.rgb_u8(r,g,b) end ----@package ---@param _self Srgba - ---@param rhs Srgba - ---@return Srgba function Srgba:sub(_self,rhs) end ----@package ---@param red number --- Red channel. [0.0, 1.0] ---@param green number @@ -1368,37 +1269,25 @@ function Srgba:sub(_self,rhs) end ---@return Srgba function Srgba.rgb(red,green,blue) end ----@package ---@param _self Srgba - ---@return Srgba function Srgba:clone(_self) end ----@package ---@param _self Srgba - ---@param rhs number - ---@return Srgba function Srgba:div(_self,rhs) end ----@package ---@param _self Srgba - ---@param other Srgba - ---@return boolean function Srgba:eq(_self,other) end ----@package ---@param _self Srgba - ---@param green number - ---@return Srgba function Srgba:with_green(_self,green) end ----@package ---@param r integer --- Red channel. [0, 255] ---@param g integer @@ -1410,58 +1299,44 @@ function Srgba:with_green(_self,green) end ---@return Srgba function Srgba.rgba_u8(r,g,b,a) end ----@package ---@param _self Srgba - ---@param blue number - ---@return Srgba function Srgba:with_blue(_self,blue) end ----@package ---@param _self Srgba - ---@return string function Srgba:to_hex(_self) end ----@package ---@param value number - ---@return number function Srgba.gamma_function(value) end ----@package ---@param _self Srgba - ---@param red number - ---@return Srgba function Srgba:with_red(_self,red) end ----@package ---@param value number - ---@return number function Srgba.gamma_function_inverse(value) end ----@class Xyza ---- [CIE 1931](https://en.wikipedia.org/wiki/CIE_1931_color_space) color space, also known as XYZ, with an alpha channel.---
---
+---@class Xyza : ReflectReference +--- [CIE 1931](https://en.wikipedia.org/wiki/CIE_1931_color_space) color space, also known as XYZ, with an alpha channel. +---
+---
---@field x ? number ---@field y ? number ---@field z ? number ---@field alpha ? number Xyza = {} ----@package ---@param _self Xyza - ---@param rhs number - ---@return Xyza function Xyza:div(_self,rhs) end ----@package ---@param x number --- x-axis. [0.0, 1.0] ---@param y number @@ -1473,31 +1348,21 @@ function Xyza:div(_self,rhs) end ---@return Xyza function Xyza.new(x,y,z,alpha) end ----@package ---@param _self Xyza - ---@param rhs number - ---@return Xyza function Xyza:mul(_self,rhs) end ----@package ---@param _self Xyza - ---@param x number - ---@return Xyza function Xyza:with_x(_self,x) end ----@package ---@param _self Xyza - ---@param rhs Xyza - ---@return Xyza function Xyza:sub(_self,rhs) end ----@package ---@param x number --- x-axis. [0.0, 1.0] ---@param y number @@ -1507,53 +1372,39 @@ function Xyza:sub(_self,rhs) end ---@return Xyza function Xyza.xyz(x,y,z) end ----@package ---@param _self Xyza - ---@return Xyza function Xyza:neg(_self) end ----@package ---@param _self Xyza - ---@param other Xyza - ---@return boolean function Xyza:eq(_self,other) end ----@package ---@param _self Xyza - ---@return Xyza function Xyza:clone(_self) end ----@package ---@param _self Xyza - ---@param y number - ---@return Xyza function Xyza:with_y(_self,y) end ----@package ---@param _self Xyza - ---@param z number - ---@return Xyza function Xyza:with_z(_self,z) end ----@package ---@param _self Xyza - ---@param rhs Xyza - ---@return Xyza function Xyza:add(_self,rhs) end ----@class AutoExposureCompensationCurve ---- An auto exposure compensation curve.--- This curve is used to map the average log luminance of a scene to an--- exposure compensation value, to allow for fine control over the final exposure. +---@class AutoExposureCompensationCurve : ReflectReference +--- An auto exposure compensation curve. +--- This curve is used to map the average log luminance of a scene to an +--- exposure compensation value, to allow for fine control over the final exposure. ---@field min_log_lum ? number ---@field max_log_lum ? number ---@field min_compensation ? number @@ -1561,15 +1412,27 @@ function Xyza:add(_self,rhs) end ---@field lut ? [u8; 256] AutoExposureCompensationCurve = {} ----@package ---@param _self AutoExposureCompensationCurve - ---@return AutoExposureCompensationCurve function AutoExposureCompensationCurve:clone(_self) end ----@class AutoExposure ---- Component that enables auto exposure for an HDR-enabled 2d or 3d camera.--- --- Auto exposure adjusts the exposure of the camera automatically to--- simulate the human eye's ability to adapt to different lighting conditions.--- --- Bevy's implementation builds a 64 bin histogram of the scene's luminance,--- and then adjusts the exposure so that the average brightness of the final--- render will be middle gray. Because it's using a histogram, some details can--- be selectively ignored or emphasized. Outliers like shadows and specular--- highlights can be ignored, and certain areas can be given more (or less)--- weight based on a mask.--- --- # Usage Notes--- --- **Auto Exposure requires compute shaders and is not compatible with WebGL2.** +---@class AutoExposure : ReflectReference +--- Component that enables auto exposure for an HDR-enabled 2d or 3d camera. +--- +--- Auto exposure adjusts the exposure of the camera automatically to +--- simulate the human eye's ability to adapt to different lighting conditions. +--- +--- Bevy's implementation builds a 64 bin histogram of the scene's luminance, +--- and then adjusts the exposure so that the average brightness of the final +--- render will be middle gray. Because it's using a histogram, some details can +--- be selectively ignored or emphasized. Outliers like shadows and specular +--- highlights can be ignored, and certain areas can be given more (or less) +--- weight based on a mask. +--- +--- # Usage Notes +--- +--- **Auto Exposure requires compute shaders and is not compatible with WebGL2.** ---@field range ? RangeInclusive ---@field filter ? RangeInclusive ---@field speed_brighten ? number @@ -1579,15 +1442,32 @@ function AutoExposureCompensationCurve:clone(_self) end ---@field compensation_curve ? Handle AutoExposure = {} ----@package ---@param _self AutoExposure - ---@return AutoExposure function AutoExposure:clone(_self) end ----@class Bloom ---- Applies a bloom effect to an HDR-enabled 2d or 3d camera.--- --- Bloom emulates an effect found in real cameras and the human eye,--- causing halos to appear around very bright parts of the scene.--- --- See also .--- --- # Usage Notes--- --- **Bloom is currently not compatible with WebGL2.**--- --- Often used in conjunction with `bevy_pbr::StandardMaterial::emissive` for 3d meshes.--- --- Bloom is best used alongside a tonemapping function that desaturates bright colors,--- such as [`crate::tonemapping::Tonemapping::TonyMcMapface`].--- --- Bevy's implementation uses a parametric curve to blend between a set of--- blurred (lower frequency) images generated from the camera's view.--- See for a visualization of the parametric curve--- used in Bevy as well as a visualization of the curve's respective scattering profile. +---@class Bloom : ReflectReference +--- Applies a bloom effect to an HDR-enabled 2d or 3d camera. +--- +--- Bloom emulates an effect found in real cameras and the human eye, +--- causing halos to appear around very bright parts of the scene. +--- +--- See also . +--- +--- # Usage Notes +--- +--- **Bloom is currently not compatible with WebGL2.** +--- +--- Often used in conjunction with `bevy_pbr::StandardMaterial::emissive` for 3d meshes. +--- +--- Bloom is best used alongside a tonemapping function that desaturates bright colors, +--- such as [`crate::tonemapping::Tonemapping::TonyMcMapface`]. +--- +--- Bevy's implementation uses a parametric curve to blend between a set of +--- blurred (lower frequency) images generated from the camera's view. +--- See for a visualization of the parametric curve +--- used in Bevy as well as a visualization of the curve's respective scattering profile. ---@field intensity ? number ---@field low_frequency_boost ? number ---@field low_frequency_boost_curvature ? number @@ -1598,147 +1478,143 @@ function AutoExposure:clone(_self) end ---@field scale ? Vec2 Bloom = {} ----@package ---@param _self Bloom - ---@return Bloom function Bloom:clone(_self) end ----@class BloomCompositeMode - +---@class BloomCompositeMode : ReflectReference BloomCompositeMode = {} ----@package ----@param _self BloomCompositeMode - ----@return BloomCompositeMode -function BloomCompositeMode:clone(_self) end - ----@package ---@param _self BloomCompositeMode - ----@return [] +---@return nil function BloomCompositeMode:assert_receiver_is_total_eq(_self) end ----@package ---@param _self BloomCompositeMode - ---@param other BloomCompositeMode - ---@return boolean function BloomCompositeMode:eq(_self,other) end +---@param _self BloomCompositeMode +---@return BloomCompositeMode +function BloomCompositeMode:clone(_self) end + ----@class BloomPrefilter ---- Applies a threshold filter to the input image to extract the brightest--- regions before blurring them and compositing back onto the original image.--- These settings are useful when emulating the 1990s-2000s game look.--- --- # Considerations--- * Changing these settings creates a physically inaccurate image--- * Changing these settings makes it easy to make the final result look worse--- * Non-default prefilter settings should be used in conjunction with [`BloomCompositeMode::Additive`] +---@class BloomPrefilter : ReflectReference +--- Applies a threshold filter to the input image to extract the brightest +--- regions before blurring them and compositing back onto the original image. +--- These settings are useful when emulating the 1990s-2000s game look. +--- +--- # Considerations +--- * Changing these settings creates a physically inaccurate image +--- * Changing these settings makes it easy to make the final result look worse +--- * Non-default prefilter settings should be used in conjunction with [`BloomCompositeMode::Additive`] ---@field threshold ? number ---@field threshold_softness ? number BloomPrefilter = {} ----@package ---@param _self BloomPrefilter - ---@return BloomPrefilter function BloomPrefilter:clone(_self) end ----@class ContrastAdaptiveSharpening ---- Applies a contrast adaptive sharpening (CAS) filter to the camera.--- --- CAS is usually used in combination with shader based anti-aliasing methods--- such as FXAA or TAA to regain some of the lost detail from the blurring that they introduce.--- --- CAS is designed to adjust the amount of sharpening applied to different areas of an image--- based on the local contrast. This can help avoid over-sharpening areas with high contrast--- and under-sharpening areas with low contrast.--- --- To use this, add the [`ContrastAdaptiveSharpening`] component to a 2D or 3D camera. +---@class ContrastAdaptiveSharpening : ReflectReference +--- Applies a contrast adaptive sharpening (CAS) filter to the camera. +--- +--- CAS is usually used in combination with shader based anti-aliasing methods +--- such as FXAA or TAA to regain some of the lost detail from the blurring that they introduce. +--- +--- CAS is designed to adjust the amount of sharpening applied to different areas of an image +--- based on the local contrast. This can help avoid over-sharpening areas with high contrast +--- and under-sharpening areas with low contrast. +--- +--- To use this, add the [`ContrastAdaptiveSharpening`] component to a 2D or 3D camera. ---@field enabled ? boolean ---@field sharpening_strength ? number ---@field denoise ? boolean ContrastAdaptiveSharpening = {} ----@package ---@param _self ContrastAdaptiveSharpening - ---@return ContrastAdaptiveSharpening function ContrastAdaptiveSharpening:clone(_self) end ----@class DenoiseCas - +---@class DenoiseCas : ReflectReference ---@field [1] ? boolean DenoiseCas = {} ----@package ---@param _self DenoiseCas - ---@return DenoiseCas function DenoiseCas:clone(_self) end ----@class Camera2d +---@class Camera2d : ReflectReference --- A 2D camera component. Enables the 2D render graph for a [`Camera`]. Camera2d = {} ----@package ---@param _self Camera2d - ---@return Camera2d function Camera2d:clone(_self) end ----@class Camera3d ---- A 3D camera component. Enables the main 3D render graph for a [`Camera`].--- --- The camera coordinate space is right-handed X-right, Y-up, Z-back.--- This means "forward" is -Z. +---@class Camera3d : ReflectReference +--- A 3D camera component. Enables the main 3D render graph for a [`Camera`]. +--- +--- The camera coordinate space is right-handed X-right, Y-up, Z-back. +--- This means "forward" is -Z. ---@field depth_load_op ? Camera3dDepthLoadOp ---@field depth_texture_usages ? Camera3dDepthTextureUsage ---@field screen_space_specular_transmission_steps ? integer ---@field screen_space_specular_transmission_quality ? ScreenSpaceTransmissionQuality Camera3d = {} ----@package ---@param _self Camera3d - ---@return Camera3d function Camera3d:clone(_self) end ----@class Camera3dDepthLoadOp +---@class Camera3dDepthLoadOp : ReflectReference --- The depth clear operation to perform for the main 3d pass. Camera3dDepthLoadOp = {} ----@package ---@param _self Camera3dDepthLoadOp - ---@return Camera3dDepthLoadOp function Camera3dDepthLoadOp:clone(_self) end ----@class Camera3dDepthTextureUsage - +---@class Camera3dDepthTextureUsage : ReflectReference ---@field [1] ? integer Camera3dDepthTextureUsage = {} ----@package ---@param _self Camera3dDepthTextureUsage - ---@return Camera3dDepthTextureUsage function Camera3dDepthTextureUsage:clone(_self) end ----@class ScreenSpaceTransmissionQuality ---- The quality of the screen space transmission blur effect, applied to whatever's “behind” transmissive--- objects when their `roughness` is greater than `0.0`.--- --- Higher qualities are more GPU-intensive.--- --- **Note:** You can get better-looking results at any quality level by enabling TAA. See: [`TemporalAntiAliasPlugin`](crate::experimental::taa::TemporalAntiAliasPlugin). +---@class ScreenSpaceTransmissionQuality : ReflectReference +--- The quality of the screen space transmission blur effect, applied to whatever's “behind” transmissive +--- objects when their `roughness` is greater than `0.0`. +--- +--- Higher qualities are more GPU-intensive. +--- +--- **Note:** You can get better-looking results at any quality level by enabling TAA. See: [`TemporalAntiAliasPlugin`](crate::experimental::taa::TemporalAntiAliasPlugin). ScreenSpaceTransmissionQuality = {} ----@package ---@param _self ScreenSpaceTransmissionQuality +---@return ScreenSpaceTransmissionQuality +function ScreenSpaceTransmissionQuality:clone(_self) end +---@param _self ScreenSpaceTransmissionQuality ---@param other ScreenSpaceTransmissionQuality - ---@return boolean function ScreenSpaceTransmissionQuality:eq(_self,other) end ----@package ----@param _self ScreenSpaceTransmissionQuality - ----@return ScreenSpaceTransmissionQuality -function ScreenSpaceTransmissionQuality:clone(_self) end - ----@class DepthOfField ---- A component that enables a [depth of field] postprocessing effect when attached to a [`Camera3d`],--- simulating the focus of a camera lens.--- --- [depth of field]: https://en.wikipedia.org/wiki/Depth_of_field +---@class DepthOfField : ReflectReference +--- A component that enables a [depth of field] postprocessing effect when attached to a [`Camera3d`], +--- simulating the focus of a camera lens. +--- +--- [depth of field]: https://en.wikipedia.org/wiki/Depth_of_field ---@field mode ? DepthOfFieldMode ---@field focal_distance ? number ---@field sensor_height ? number @@ -1747,718 +1623,857 @@ function ScreenSpaceTransmissionQuality:clone(_self) end ---@field max_depth ? number DepthOfField = {} ----@package ---@param _self DepthOfField - ---@return DepthOfField function DepthOfField:clone(_self) end ----@class DepthOfFieldMode +---@class DepthOfFieldMode : ReflectReference --- Controls the appearance of the effect. DepthOfFieldMode = {} ----@package ---@param _self DepthOfFieldMode - ---@return DepthOfFieldMode function DepthOfFieldMode:clone(_self) end ----@package ---@param _self DepthOfFieldMode - ---@param other DepthOfFieldMode - ---@return boolean function DepthOfFieldMode:eq(_self,other) end ----@class Fxaa ---- A component for enabling Fast Approximate Anti-Aliasing (FXAA)--- for a [`bevy_render::camera::Camera`]. +---@class Fxaa : ReflectReference +--- A component for enabling Fast Approximate Anti-Aliasing (FXAA) +--- for a [`bevy_render::camera::Camera`]. ---@field enabled ? boolean ---@field edge_threshold ? Sensitivity ---@field edge_threshold_min ? Sensitivity Fxaa = {} ----@package ---@param _self Fxaa - ---@return Fxaa function Fxaa:clone(_self) end ----@class Sensitivity - +---@class Sensitivity : ReflectReference Sensitivity = {} ----@package ---@param _self Sensitivity - ---@return Sensitivity function Sensitivity:clone(_self) end ----@package ---@param _self Sensitivity - ----@return [] +---@return nil function Sensitivity:assert_receiver_is_total_eq(_self) end ----@package ---@param _self Sensitivity - ---@param other Sensitivity - ---@return boolean function Sensitivity:eq(_self,other) end ----@class MotionBlur ---- A component that enables and configures motion blur when added to a camera.--- --- Motion blur is an effect that simulates how moving objects blur as they change position during--- the exposure of film, a sensor, or an eyeball.--- --- Because rendering simulates discrete steps in time, we use per-pixel motion vectors to estimate--- the path of objects between frames. This kind of implementation has some artifacts:--- - Fast moving objects in front of a stationary object or when in front of empty space, will not--- have their edges blurred.--- - Transparent objects do not write to depth or motion vectors, so they cannot be blurred.--- --- Other approaches, such as *A Reconstruction Filter for Plausible Motion Blur* produce more--- correct results, but are more expensive and complex, and have other kinds of artifacts. This--- implementation is relatively inexpensive and effective.--- --- # Usage--- --- Add the [`MotionBlur`] component to a camera to enable and configure motion blur for that--- camera.--- --- ```--- # use bevy_core_pipeline::{core_3d::Camera3d, motion_blur::MotionBlur};--- # use bevy_ecs::prelude::*;--- # fn test(mut commands: Commands) {--- commands.spawn((--- Camera3d::default(),--- MotionBlur::default(),--- ));--- # }--- ```` +---@class MotionBlur : ReflectReference +--- A component that enables and configures motion blur when added to a camera. +--- +--- Motion blur is an effect that simulates how moving objects blur as they change position during +--- the exposure of film, a sensor, or an eyeball. +--- +--- Because rendering simulates discrete steps in time, we use per-pixel motion vectors to estimate +--- the path of objects between frames. This kind of implementation has some artifacts: +--- - Fast moving objects in front of a stationary object or when in front of empty space, will not +--- have their edges blurred. +--- - Transparent objects do not write to depth or motion vectors, so they cannot be blurred. +--- +--- Other approaches, such as *A Reconstruction Filter for Plausible Motion Blur* produce more +--- correct results, but are more expensive and complex, and have other kinds of artifacts. This +--- implementation is relatively inexpensive and effective. +--- +--- # Usage +--- +--- Add the [`MotionBlur`] component to a camera to enable and configure motion blur for that +--- camera. +--- +--- ``` +--- # use bevy_core_pipeline::{core_3d::Camera3d, motion_blur::MotionBlur}; +--- # use bevy_ecs::prelude::*; +--- # fn test(mut commands: Commands) { +--- commands.spawn(( +--- Camera3d::default(), +--- MotionBlur::default(), +--- )); +--- # } +--- ```` ---@field shutter_angle ? number ---@field samples ? integer MotionBlur = {} ----@package ---@param _self MotionBlur - ---@return MotionBlur function MotionBlur:clone(_self) end ----@class OrderIndependentTransparencySettings ---- Used to identify which camera will use OIT to render transparent meshes--- and to configure OIT. +---@class OrderIndependentTransparencySettings : ReflectReference +--- Used to identify which camera will use OIT to render transparent meshes +--- and to configure OIT. ---@field layer_count ? integer ---@field alpha_threshold ? number OrderIndependentTransparencySettings = {} ----@package ---@param _self OrderIndependentTransparencySettings - ---@return OrderIndependentTransparencySettings function OrderIndependentTransparencySettings:clone(_self) end ----@class ChromaticAberration ---- Adds colored fringes to the edges of objects in the scene.--- --- [Chromatic aberration] simulates the effect when lenses fail to focus all--- colors of light toward a single point. It causes rainbow-colored streaks to--- appear, which are especially apparent on the edges of objects. Chromatic--- aberration is commonly used for collision effects, especially in horror--- games.--- --- Bevy's implementation is based on that of *Inside* ([Gjøl & Svendsen 2016]).--- It's based on a customizable lookup texture, which allows for changing the--- color pattern. By default, the color pattern is simply a 3×1 pixel texture--- consisting of red, green, and blue, in that order, but you can change it to--- any image in order to achieve different effects.--- --- [Chromatic aberration]: https://en.wikipedia.org/wiki/Chromatic_aberration--- --- [Gjøl & Svendsen 2016]: https://github.com/playdeadgames/publications/blob/master/INSIDE/rendering_inside_gdc2016.pdf +---@class ChromaticAberration : ReflectReference +--- Adds colored fringes to the edges of objects in the scene. +--- +--- [Chromatic aberration] simulates the effect when lenses fail to focus all +--- colors of light toward a single point. It causes rainbow-colored streaks to +--- appear, which are especially apparent on the edges of objects. Chromatic +--- aberration is commonly used for collision effects, especially in horror +--- games. +--- +--- Bevy's implementation is based on that of *Inside* ([Gjøl & Svendsen 2016]). +--- It's based on a customizable lookup texture, which allows for changing the +--- color pattern. By default, the color pattern is simply a 3×1 pixel texture +--- consisting of red, green, and blue, in that order, but you can change it to +--- any image in order to achieve different effects. +--- +--- [Chromatic aberration]: https://en.wikipedia.org/wiki/Chromatic_aberration +--- +--- [Gjøl & Svendsen 2016]: https://github.com/playdeadgames/publications/blob/master/INSIDE/rendering_inside_gdc2016.pdf ---@field color_lut ? Handle ---@field intensity ? number ---@field max_samples ? integer ChromaticAberration = {} ----@package ---@param _self ChromaticAberration - ---@return ChromaticAberration function ChromaticAberration:clone(_self) end ----@class DepthPrepass +---@class DepthPrepass : ReflectReference --- If added to a [`crate::prelude::Camera3d`] then depth values will be copied to a separate texture available to the main pass. DepthPrepass = {} ----@package ---@param _self DepthPrepass - ---@return DepthPrepass function DepthPrepass:clone(_self) end ----@class MotionVectorPrepass +---@class MotionVectorPrepass : ReflectReference --- If added to a [`crate::prelude::Camera3d`] then screen space motion vectors will be copied to a separate texture available to the main pass. MotionVectorPrepass = {} ----@package ---@param _self MotionVectorPrepass - ---@return MotionVectorPrepass function MotionVectorPrepass:clone(_self) end ----@class NormalPrepass ---- If added to a [`crate::prelude::Camera3d`] then vertex world normals will be copied to a separate texture available to the main pass.--- Normals will have normal map textures already applied. +---@class NormalPrepass : ReflectReference +--- If added to a [`crate::prelude::Camera3d`] then vertex world normals will be copied to a separate texture available to the main pass. +--- Normals will have normal map textures already applied. NormalPrepass = {} ----@package ---@param _self NormalPrepass - ---@return NormalPrepass function NormalPrepass:clone(_self) end ----@class Skybox ---- Adds a skybox to a 3D camera, based on a cubemap texture.--- --- Note that this component does not (currently) affect the scene's lighting.--- To do so, use `EnvironmentMapLight` alongside this component.--- --- See also . +---@class Skybox : ReflectReference +--- Adds a skybox to a 3D camera, based on a cubemap texture. +--- +--- Note that this component does not (currently) affect the scene's lighting. +--- To do so, use `EnvironmentMapLight` alongside this component. +--- +--- See also . ---@field image ? Handle ---@field brightness ? number ---@field rotation ? Quat Skybox = {} ----@package ---@param _self Skybox - ---@return Skybox function Skybox:clone(_self) end ----@class Smaa ---- A component for enabling Subpixel Morphological Anti-Aliasing (SMAA)--- for a [`bevy_render::camera::Camera`]. +---@class Smaa : ReflectReference +--- A component for enabling Subpixel Morphological Anti-Aliasing (SMAA) +--- for a [`bevy_render::camera::Camera`]. ---@field preset ? SmaaPreset Smaa = {} ----@package ---@param _self Smaa - ---@return Smaa function Smaa:clone(_self) end ----@class SmaaPreset ---- A preset quality level for SMAA.--- --- Higher values are slower but result in a higher-quality image.--- --- The default value is *high*. +---@class SmaaPreset : ReflectReference +--- A preset quality level for SMAA. +--- +--- Higher values are slower but result in a higher-quality image. +--- +--- The default value is *high*. SmaaPreset = {} ----@package ---@param _self SmaaPreset - ---@return SmaaPreset function SmaaPreset:clone(_self) end ----@package ---@param _self SmaaPreset - ----@return [] +---@return nil function SmaaPreset:assert_receiver_is_total_eq(_self) end ----@package ---@param _self SmaaPreset - ---@param other SmaaPreset - ---@return boolean function SmaaPreset:eq(_self,other) end ----@class TemporalAntiAliasing ---- Component to apply temporal anti-aliasing to a 3D perspective camera.--- --- Temporal anti-aliasing (TAA) is a form of image smoothing/filtering, like--- multisample anti-aliasing (MSAA), or fast approximate anti-aliasing (FXAA).--- TAA works by blending (averaging) each frame with the past few frames.--- --- # Tradeoffs--- --- Pros:--- * Filters more types of aliasing than MSAA, such as textures and singular bright pixels (specular aliasing)--- * Cost scales with screen/view resolution, unlike MSAA which scales with number of triangles--- * Greatly increases the quality of stochastic rendering techniques such as SSAO, certain shadow map sampling methods, etc--- --- Cons:--- * Chance of "ghosting" - ghostly trails left behind moving objects--- * Thin geometry, lighting detail, or texture lines may flicker noisily or disappear--- --- Because TAA blends past frames with the current frame, when the frames differ too much--- (such as with fast moving objects or camera cuts), ghosting artifacts may occur.--- --- Artifacts tend to be reduced at higher framerates and rendering resolution.--- --- # Usage Notes--- --- The [`TemporalAntiAliasPlugin`] must be added to your app.--- Any camera with this component must also disable [`Msaa`] by setting it to [`Msaa::Off`].--- --- [Currently](https://github.com/bevyengine/bevy/issues/8423), TAA cannot be used with [`bevy_render::camera::OrthographicProjection`].--- --- TAA also does not work well with alpha-blended meshes, as it requires depth writing to determine motion.--- --- It is very important that correct motion vectors are written for everything on screen.--- Failure to do so will lead to ghosting artifacts. For instance, if particle effects--- are added using a third party library, the library must either:--- --- 1. Write particle motion vectors to the motion vectors prepass texture--- 2. Render particles after TAA--- --- If no [`MipBias`] component is attached to the camera, TAA will add a `MipBias(-1.0)` component. +---@class TemporalAntiAliasing : ReflectReference +--- Component to apply temporal anti-aliasing to a 3D perspective camera. +--- +--- Temporal anti-aliasing (TAA) is a form of image smoothing/filtering, like +--- multisample anti-aliasing (MSAA), or fast approximate anti-aliasing (FXAA). +--- TAA works by blending (averaging) each frame with the past few frames. +--- +--- # Tradeoffs +--- +--- Pros: +--- * Filters more types of aliasing than MSAA, such as textures and singular bright pixels (specular aliasing) +--- * Cost scales with screen/view resolution, unlike MSAA which scales with number of triangles +--- * Greatly increases the quality of stochastic rendering techniques such as SSAO, certain shadow map sampling methods, etc +--- +--- Cons: +--- * Chance of "ghosting" - ghostly trails left behind moving objects +--- * Thin geometry, lighting detail, or texture lines may flicker noisily or disappear +--- +--- Because TAA blends past frames with the current frame, when the frames differ too much +--- (such as with fast moving objects or camera cuts), ghosting artifacts may occur. +--- +--- Artifacts tend to be reduced at higher framerates and rendering resolution. +--- +--- # Usage Notes +--- +--- The [`TemporalAntiAliasPlugin`] must be added to your app. +--- Any camera with this component must also disable [`Msaa`] by setting it to [`Msaa::Off`]. +--- +--- [Currently](https://github.com/bevyengine/bevy/issues/8423), TAA cannot be used with [`bevy_render::camera::OrthographicProjection`]. +--- +--- TAA also does not work well with alpha-blended meshes, as it requires depth writing to determine motion. +--- +--- It is very important that correct motion vectors are written for everything on screen. +--- Failure to do so will lead to ghosting artifacts. For instance, if particle effects +--- are added using a third party library, the library must either: +--- +--- 1. Write particle motion vectors to the motion vectors prepass texture +--- 2. Render particles after TAA +--- +--- If no [`MipBias`] component is attached to the camera, TAA will add a `MipBias(-1.0)` component. ---@field reset ? boolean TemporalAntiAliasing = {} ----@package ---@param _self TemporalAntiAliasing - ---@return TemporalAntiAliasing function TemporalAntiAliasing:clone(_self) end ----@class DebandDither +---@class DebandDither : ReflectReference --- Enables a debanding shader that applies dithering to mitigate color banding in the final image for a given [`Camera`] entity. DebandDither = {} ----@package ----@param _self DebandDither - ----@return [] -function DebandDither:assert_receiver_is_total_eq(_self) end - ----@package ---@param _self DebandDither - ---@return DebandDither function DebandDither:clone(_self) end ----@package ---@param _self DebandDither - ---@param other DebandDither - ---@return boolean function DebandDither:eq(_self,other) end +---@param _self DebandDither +---@return nil +function DebandDither:assert_receiver_is_total_eq(_self) end + ----@class Tonemapping +---@class Tonemapping : ReflectReference --- Optionally enables a tonemapping shader that attempts to map linear input stimulus into a perceptually uniform image for a given [`Camera`] entity. Tonemapping = {} ----@package ---@param _self Tonemapping - ----@param other Tonemapping - ----@return boolean -function Tonemapping:eq(_self,other) end - ----@package ----@param _self Tonemapping - ----@return [] +---@return nil function Tonemapping:assert_receiver_is_total_eq(_self) end ----@package ---@param _self Tonemapping - ---@return boolean function Tonemapping:is_enabled(_self) end ----@package ---@param _self Tonemapping - ---@return Tonemapping function Tonemapping:clone(_self) end +---@param _self Tonemapping +---@param other Tonemapping +---@return boolean +function Tonemapping:eq(_self,other) end + ----@class ComponentId ---- A value which uniquely identifies the type of a [`Component`] or [`Resource`] within a--- [`World`].--- --- Each time a new `Component` type is registered within a `World` using--- e.g. [`World::register_component`] or [`World::register_component_with_descriptor`]--- or a Resource with e.g. [`World::init_resource`],--- a corresponding `ComponentId` is created to track it.--- --- While the distinction between `ComponentId` and [`TypeId`] may seem superficial, breaking them--- into two separate but related concepts allows components to exist outside of Rust's type system.--- Each Rust type registered as a `Component` will have a corresponding `ComponentId`, but additional--- `ComponentId`s may exist in a `World` to track components which cannot be--- represented as Rust types for scripting or other advanced use-cases.--- --- A `ComponentId` is tightly coupled to its parent `World`. Attempting to use a `ComponentId` from--- one `World` to access the metadata of a `Component` in a different `World` is undefined behavior--- and must not be attempted.--- --- Given a type `T` which implements [`Component`], the `ComponentId` for `T` can be retrieved--- from a `World` using [`World::component_id()`] or via [`Components::component_id()`]. Access--- to the `ComponentId` for a [`Resource`] is available via [`Components::resource_id()`]. +---@class ComponentId : ReflectReference +--- A value which uniquely identifies the type of a [`Component`] or [`Resource`] within a +--- [`World`]. +--- +--- Each time a new `Component` type is registered within a `World` using +--- e.g. [`World::register_component`] or [`World::register_component_with_descriptor`] +--- or a Resource with e.g. [`World::init_resource`], +--- a corresponding `ComponentId` is created to track it. +--- +--- While the distinction between `ComponentId` and [`TypeId`] may seem superficial, breaking them +--- into two separate but related concepts allows components to exist outside of Rust's type system. +--- Each Rust type registered as a `Component` will have a corresponding `ComponentId`, but additional +--- `ComponentId`s may exist in a `World` to track components which cannot be +--- represented as Rust types for scripting or other advanced use-cases. +--- +--- A `ComponentId` is tightly coupled to its parent `World`. Attempting to use a `ComponentId` from +--- one `World` to access the metadata of a `Component` in a different `World` is undefined behavior +--- and must not be attempted. +--- +--- Given a type `T` which implements [`Component`], the `ComponentId` for `T` can be retrieved +--- from a `World` using [`World::component_id()`] or via [`Components::component_id()`]. Access +--- to the `ComponentId` for a [`Resource`] is available via [`Components::resource_id()`]. ---@field [1] ? integer ComponentId = {} ----@package ---@param index integer - ---@return ComponentId function ComponentId.new(index) end ----@package ---@param _self ComponentId - ---@return ComponentId function ComponentId:clone(_self) end ----@package ---@param _self ComponentId - ----@return [] +---@return nil function ComponentId:assert_receiver_is_total_eq(_self) end ----@package ---@param _self ComponentId - ---@return integer function ComponentId:index(_self) end ----@package ---@param _self ComponentId - ---@param other ComponentId - ---@return boolean function ComponentId:eq(_self,other) end ----@class ComponentTicks +---@class ComponentTicks : ReflectReference --- Records when a component or resource was added and when it was last mutably dereferenced (or added). ---@field added ? Tick ---@field changed ? Tick ComponentTicks = {} ----@package ---@param _self ComponentTicks - ---@return ComponentTicks function ComponentTicks:clone(_self) end ----@package ---@param _self ComponentTicks - ---@param last_run Tick - ---@param this_run Tick - ---@return boolean function ComponentTicks:is_changed(_self,last_run,this_run) end ----@package ---@param change_tick Tick - ---@return ComponentTicks function ComponentTicks.new(change_tick) end ----@package ---@param _self ComponentTicks - ---@param last_run Tick - ---@param this_run Tick - ---@return boolean function ComponentTicks:is_added(_self,last_run,this_run) end ----@package ---@param _self ComponentTicks - ---@param change_tick Tick - ----@return [] +---@return nil function ComponentTicks:set_changed(_self,change_tick) end ----@class Tick ---- A value that tracks when a system ran relative to other systems.--- This is used to power change detection.--- --- *Note* that a system that hasn't been run yet has a `Tick` of 0. +---@class Tick : ReflectReference +--- A value that tracks when a system ran relative to other systems. +--- This is used to power change detection. +--- +--- *Note* that a system that hasn't been run yet has a `Tick` of 0. ---@field tick ? integer Tick = {} ----@package ---@param _self Tick - ---@return Tick function Tick:clone(_self) end ----@package ---@param _self Tick - ---@return integer function Tick:get(_self) end ----@package ---@param _self Tick - ---@param last_run Tick - ---@param this_run Tick - ---@return boolean function Tick:is_newer_than(_self,last_run,this_run) end ----@package ---@param tick integer - ---@return Tick function Tick.new(tick) end ----@package ---@param _self Tick - ---@param other Tick - ---@return boolean function Tick:eq(_self,other) end ----@package ---@param _self Tick - ----@return [] +---@return nil function Tick:assert_receiver_is_total_eq(_self) end ----@package ---@param _self Tick - ---@param tick integer - ----@return [] +---@return nil function Tick:set(_self,tick) end ----@class Entity ---- Lightweight identifier of an [entity](crate::entity).--- --- The identifier is implemented using a [generational index]: a combination of an index and a generation.--- This allows fast insertion after data removal in an array while minimizing loss of spatial locality.--- --- These identifiers are only valid on the [`World`] it's sourced from. Attempting to use an `Entity` to--- fetch entity components or metadata from a different world will either fail or return unexpected results.--- --- [generational index]: https://lucassardois.medium.com/generational-indices-guide-8e3c5f7fd594--- --- # Stability warning--- For all intents and purposes, `Entity` should be treated as an opaque identifier. The internal bit--- representation is liable to change from release to release as are the behaviors or performance--- characteristics of any of its trait implementations (i.e. `Ord`, `Hash`, etc.). This means that changes in--- `Entity`'s representation, though made readable through various functions on the type, are not considered--- breaking changes under [SemVer].--- --- In particular, directly serializing with `Serialize` and `Deserialize` make zero guarantee of long--- term wire format compatibility. Changes in behavior will cause serialized `Entity` values persisted--- to long term storage (i.e. disk, databases, etc.) will fail to deserialize upon being updated.--- --- # Usage--- --- This data type is returned by iterating a `Query` that has `Entity` as part of its query fetch type parameter ([learn more]).--- It can also be obtained by calling [`EntityCommands::id`] or [`EntityWorldMut::id`].--- --- ```--- # use bevy_ecs::prelude::*;--- # #[derive(Component)]--- # struct SomeComponent;--- fn setup(mut commands: Commands) {--- // Calling `spawn` returns `EntityCommands`.--- let entity = commands.spawn(SomeComponent).id();--- }--- --- fn exclusive_system(world: &mut World) {--- // Calling `spawn` returns `EntityWorldMut`.--- let entity = world.spawn(SomeComponent).id();--- }--- #--- # bevy_ecs::system::assert_is_system(setup);--- # bevy_ecs::system::assert_is_system(exclusive_system);--- ```--- --- 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.--- --- ```--- # use bevy_ecs::prelude::*;--- #--- # #[derive(Component)]--- # struct Expired;--- #--- fn dispose_expired_food(mut commands: Commands, query: Query>) {--- for food_entity in &query {--- commands.entity(food_entity).despawn();--- }--- }--- #--- # bevy_ecs::system::assert_is_system(dispose_expired_food);--- ```--- --- [learn more]: crate::system::Query#entity-id-access--- [`EntityCommands::id`]: crate::system::EntityCommands::id--- [`EntityWorldMut::id`]: crate::world::EntityWorldMut::id--- [`EntityCommands`]: crate::system::EntityCommands--- [`Query::get`]: crate::system::Query::get--- [`World`]: crate::world::World--- [SemVer]: https://semver.org/ +---@class Entity : ReflectReference +--- Lightweight identifier of an [entity](crate::entity). +--- +--- The identifier is implemented using a [generational index]: a combination of an index and a generation. +--- This allows fast insertion after data removal in an array while minimizing loss of spatial locality. +--- +--- These identifiers are only valid on the [`World`] it's sourced from. Attempting to use an `Entity` to +--- fetch entity components or metadata from a different world will either fail or return unexpected results. +--- +--- [generational index]: https://lucassardois.medium.com/generational-indices-guide-8e3c5f7fd594 +--- +--- # Stability warning +--- For all intents and purposes, `Entity` should be treated as an opaque identifier. The internal bit +--- representation is liable to change from release to release as are the behaviors or performance +--- characteristics of any of its trait implementations (i.e. `Ord`, `Hash`, etc.). This means that changes in +--- `Entity`'s representation, though made readable through various functions on the type, are not considered +--- breaking changes under [SemVer]. +--- +--- In particular, directly serializing with `Serialize` and `Deserialize` make zero guarantee of long +--- term wire format compatibility. Changes in behavior will cause serialized `Entity` values persisted +--- to long term storage (i.e. disk, databases, etc.) will fail to deserialize upon being updated. +--- +--- # Usage +--- +--- This data type is returned by iterating a `Query` that has `Entity` as part of its query fetch type parameter ([learn more]). +--- It can also be obtained by calling [`EntityCommands::id`] or [`EntityWorldMut::id`]. +--- +--- ``` +--- # use bevy_ecs::prelude::*; +--- # #[derive(Component)] +--- # struct SomeComponent; +--- fn setup(mut commands: Commands) { +--- // Calling `spawn` returns `EntityCommands`. +--- let entity = commands.spawn(SomeComponent).id(); +--- } +--- +--- fn exclusive_system(world: &mut World) { +--- // Calling `spawn` returns `EntityWorldMut`. +--- let entity = world.spawn(SomeComponent).id(); +--- } +--- # +--- # bevy_ecs::system::assert_is_system(setup); +--- # bevy_ecs::system::assert_is_system(exclusive_system); +--- ``` +--- +--- 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. +--- +--- ``` +--- # use bevy_ecs::prelude::*; +--- # +--- # #[derive(Component)] +--- # struct Expired; +--- # +--- fn dispose_expired_food(mut commands: Commands, query: Query>) { +--- for food_entity in &query { +--- commands.entity(food_entity).despawn(); +--- } +--- } +--- # +--- # bevy_ecs::system::assert_is_system(dispose_expired_food); +--- ``` +--- +--- [learn more]: crate::system::Query#entity-id-access +--- [`EntityCommands::id`]: crate::system::EntityCommands::id +--- [`EntityWorldMut::id`]: crate::world::EntityWorldMut::id +--- [`EntityCommands`]: crate::system::EntityCommands +--- [`Query::get`]: crate::system::Query::get +--- [`World`]: crate::world::World +--- [SemVer]: https://semver.org/ Entity = {} ----@package ---@param _self Entity - ---@return integer function Entity:generation(_self) end ----@package ---@param index integer - ---@return Entity function Entity.from_raw(index) end ----@package ---@param bits integer - ---@return Entity function Entity.from_bits(bits) end ----@package ---@param _self Entity - ---@return integer function Entity:to_bits(_self) end ----@package ---@param _self Entity - ---@param other Entity - ---@return boolean function Entity:eq(_self,other) end ----@package ---@param _self Entity - ---@return Entity function Entity:clone(_self) end ----@package ---@param _self Entity - ---@return integer function Entity:index(_self) end ----@class EntityHash +---@class EntityHash : ReflectReference --- A [`BuildHasher`] that results in a [`EntityHasher`]. EntityHash = {} ----@package ---@param _self EntityHash - ---@return EntityHash function EntityHash:clone(_self) end ----@class EntityHashSet +---@class EntityHashSet : ReflectReference --- A [`HashSet`] pre-configured to use [`EntityHash`] hashing. ---@field [1] ? HashSet EntityHashSet = {} ----@package ---@param _self EntityHashSet - ---@param other EntityHashSet - ---@return boolean function EntityHashSet:eq(_self,other) end ----@package ---@param n integer - ---@return EntityHashSet function EntityHashSet.with_capacity(n) end ----@package ---@return EntityHashSet function EntityHashSet.new() end ----@package ---@param _self EntityHashSet - ---@return boolean function EntityHashSet:is_empty(_self) end ----@package ---@param _self EntityHashSet - ---@return integer function EntityHashSet:len(_self) end ----@package ---@param _self EntityHashSet - ----@return [] +---@return nil function EntityHashSet:assert_receiver_is_total_eq(_self) end ----@package ---@param _self EntityHashSet - ---@return EntityHashSet function EntityHashSet:clone(_self) end ----@class DefaultQueryFilters ---- Default query filters work by excluding entities with certain components from most queries.--- --- If a query does not explicitly mention a given disabling component, it will not include entities with that component.--- To be more precise, this checks if the query's [`FilteredAccess`] contains the component,--- and if it does not, adds a [`Without`](crate::prelude::Without) filter for that component to the query.--- --- This resource is initialized in the [`World`] whenever a new world is created,--- with the [`Disabled`] component as a disabling component.--- --- Note that you can remove default query filters by overwriting the [`DefaultQueryFilters`] resource.--- This can be useful as a last resort escape hatch, but is liable to break compatibility with other libraries.--- --- See the [module docs](crate::entity_disabling) for more info.--- --- --- # Warning--- --- Default query filters are a global setting that affects all queries in the [`World`],--- and incur a small performance cost for each query.--- --- They can cause significant interoperability issues within the ecosystem,--- as users must be aware of each disabling component in use.--- --- Think carefully about whether you need to use a new disabling component,--- and clearly communicate their presence in any libraries you publish. +---@class DefaultQueryFilters : ReflectReference +--- Default query filters work by excluding entities with certain components from most queries. +--- +--- If a query does not explicitly mention a given disabling component, it will not include entities with that component. +--- To be more precise, this checks if the query's [`FilteredAccess`] contains the component, +--- and if it does not, adds a [`Without`](crate::prelude::Without) filter for that component to the query. +--- +--- This resource is initialized in the [`World`] whenever a new world is created, +--- with the [`Disabled`] component as a disabling component. +--- +--- Note that you can remove default query filters by overwriting the [`DefaultQueryFilters`] resource. +--- This can be useful as a last resort escape hatch, but is liable to break compatibility with other libraries. +--- +--- See the [module docs](crate::entity_disabling) for more info. +--- +--- +--- # Warning +--- +--- Default query filters are a global setting that affects all queries in the [`World`], +--- and incur a small performance cost for each query. +--- +--- They can cause significant interoperability issues within the ecosystem, +--- as users must be aware of each disabling component in use. +--- +--- Think carefully about whether you need to use a new disabling component, +--- and clearly communicate their presence in any libraries you publish. ---@field disabling ? SmallVec DefaultQueryFilters = {} ----@package ---@param _self DefaultQueryFilters - ---@param component_id ComponentId - ----@return [] +---@return nil function DefaultQueryFilters:register_disabling_component(_self,component_id) end ----@package ---@return DefaultQueryFilters function DefaultQueryFilters.empty() end ----@class Disabled ---- A marker component for disabled entities.--- --- Semantically, this component is used to mark entities that are temporarily disabled (typically for gameplay reasons),--- but will likely be re-enabled at some point.--- --- Like all disabling components, this only disables the entity itself,--- not its children or other entities that reference it.--- To disable an entire tree of entities, use [`EntityCommands::insert_recursive`](crate::prelude::EntityCommands::insert_recursive).--- --- Every [`World`] has a default query filter that excludes entities with this component,--- registered in the [`DefaultQueryFilters`] resource.--- See [the module docs] for more info.--- --- [the module docs]: crate::entity_disabling +---@class Disabled : ReflectReference +--- A marker component for disabled entities. +--- +--- Semantically, this component is used to mark entities that are temporarily disabled (typically for gameplay reasons), +--- but will likely be re-enabled at some point. +--- +--- Like all disabling components, this only disables the entity itself, +--- not its children or other entities that reference it. +--- To disable an entire tree of entities, use [`EntityCommands::insert_recursive`](crate::prelude::EntityCommands::insert_recursive). +--- +--- Every [`World`] has a default query filter that excludes entities with this component, +--- registered in the [`DefaultQueryFilters`] resource. +--- See [the module docs] for more info. +--- +--- [the module docs]: crate::entity_disabling Disabled = {} ----@package ---@param _self Disabled - ---@return Disabled function Disabled:clone(_self) end ----@class ChildOf ---- Stores the parent entity of this child entity with this component.--- --- This is a [`Relationship`] component, and creates the canonical--- "parent / child" hierarchy. This is the "source of truth" component, and it pairs with--- the [`Children`] [`RelationshipTarget`](crate::relationship::RelationshipTarget).--- --- This relationship should be used for things like:--- --- 1. Organizing entities in a scene--- 2. Propagating configuration or data inherited from a parent, such as "visibility" or "world-space global transforms".--- 3. Ensuring a hierarchy is despawned when an entity is despawned.--- --- [`ChildOf`] contains a single "target" [`Entity`]. When [`ChildOf`] is inserted on a "source" entity,--- the "target" entity will automatically (and immediately, via a component hook) have a [`Children`]--- component inserted, and the "source" entity will be added to that [`Children`] instance.--- --- If the [`ChildOf`] component is replaced with a different "target" entity, the old target's [`Children`]--- will be automatically (and immediately, via a component hook) be updated to reflect that change.--- --- Likewise, when the [`ChildOf`] component is removed, the "source" entity will be removed from the old--- target's [`Children`]. If this results in [`Children`] being empty, [`Children`] will be automatically removed.--- --- When a parent is despawned, all children (and their descendants) will _also_ be despawned.--- --- You can create parent-child relationships in a variety of ways. The most direct way is to insert a [`ChildOf`] component:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let root = world.spawn_empty().id();--- let child1 = world.spawn(ChildOf(root)).id();--- let child2 = world.spawn(ChildOf(root)).id();--- let grandchild = world.spawn(ChildOf(child1)).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- --- world.entity_mut(child2).remove::();--- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1]);--- --- world.entity_mut(root).despawn();--- assert!(world.get_entity(root).is_err());--- assert!(world.get_entity(child1).is_err());--- assert!(world.get_entity(grandchild).is_err());--- ```--- --- However if you are spawning many children, you might want to use the [`EntityWorldMut::with_children`] helper instead:--- --- ```--- # use bevy_ecs::prelude::*;--- # let mut world = World::new();--- let mut child1 = Entity::PLACEHOLDER;--- let mut child2 = Entity::PLACEHOLDER;--- let mut grandchild = Entity::PLACEHOLDER;--- let root = world.spawn_empty().with_children(|p| {--- child1 = p.spawn_empty().with_children(|p| {--- grandchild = p.spawn_empty().id();--- }).id();--- child2 = p.spawn_empty().id();--- }).id();--- --- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]);--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]);--- ```--- --- [`Relationship`]: crate::relationship::Relationship +---@class ChildOf : ReflectReference +--- Stores the parent entity of this child entity with this component. +--- +--- This is a [`Relationship`] component, and creates the canonical +--- "parent / child" hierarchy. This is the "source of truth" component, and it pairs with +--- the [`Children`] [`RelationshipTarget`](crate::relationship::RelationshipTarget). +--- +--- This relationship should be used for things like: +--- +--- 1. Organizing entities in a scene +--- 2. Propagating configuration or data inherited from a parent, such as "visibility" or "world-space global transforms". +--- 3. Ensuring a hierarchy is despawned when an entity is despawned. +--- +--- [`ChildOf`] contains a single "target" [`Entity`]. When [`ChildOf`] is inserted on a "source" entity, +--- the "target" entity will automatically (and immediately, via a component hook) have a [`Children`] +--- component inserted, and the "source" entity will be added to that [`Children`] instance. +--- +--- If the [`ChildOf`] component is replaced with a different "target" entity, the old target's [`Children`] +--- will be automatically (and immediately, via a component hook) be updated to reflect that change. +--- +--- Likewise, when the [`ChildOf`] component is removed, the "source" entity will be removed from the old +--- target's [`Children`]. If this results in [`Children`] being empty, [`Children`] will be automatically removed. +--- +--- When a parent is despawned, all children (and their descendants) will _also_ be despawned. +--- +--- You can create parent-child relationships in a variety of ways. The most direct way is to insert a [`ChildOf`] component: +--- +--- ``` +--- # use bevy_ecs::prelude::*; +--- # let mut world = World::new(); +--- let root = world.spawn_empty().id(); +--- let child1 = world.spawn(ChildOf(root)).id(); +--- let child2 = world.spawn(ChildOf(root)).id(); +--- let grandchild = world.spawn(ChildOf(child1)).id(); +--- +--- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]); +--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]); +--- +--- world.entity_mut(child2).remove::(); +--- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1]); +--- +--- world.entity_mut(root).despawn(); +--- assert!(world.get_entity(root).is_err()); +--- assert!(world.get_entity(child1).is_err()); +--- assert!(world.get_entity(grandchild).is_err()); +--- ``` +--- +--- However if you are spawning many children, you might want to use the [`EntityWorldMut::with_children`] helper instead: +--- +--- ``` +--- # use bevy_ecs::prelude::*; +--- # let mut world = World::new(); +--- let mut child1 = Entity::PLACEHOLDER; +--- let mut child2 = Entity::PLACEHOLDER; +--- let mut grandchild = Entity::PLACEHOLDER; +--- let root = world.spawn_empty().with_children(|p| { +--- child1 = p.spawn_empty().with_children(|p| { +--- grandchild = p.spawn_empty().id(); +--- }).id(); +--- child2 = p.spawn_empty().id(); +--- }).id(); +--- +--- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]); +--- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]); +--- ``` +--- +--- [`Relationship`]: crate::relationship::Relationship ---@field [1] ? Entity ChildOf = {} ----@package ---@param _self ChildOf - ---@return ChildOf function ChildOf:clone(_self) end ----@package ---@param _self ChildOf - ---@return Entity function ChildOf:get(_self) end ----@package ---@param _self ChildOf - ----@return [] +---@return nil function ChildOf:assert_receiver_is_total_eq(_self) end ----@package ---@param _self ChildOf - ---@param other ChildOf - ---@return boolean function ChildOf:eq(_self,other) end ----@package ---@param _self ChildOf - ---@return Entity function ChildOf:parent(_self) end ----@class Children ---- Tracks which entities are children of this parent entity.--- --- A [`RelationshipTarget`] collection component that is populated--- with entities that "target" this entity with the [`ChildOf`] [`Relationship`] component.--- --- Together, these components form the "canonical parent-child hierarchy". See the [`ChildOf`] component for the full--- description of this relationship and instructions on how to use it.--- --- # Usage--- --- Like all [`RelationshipTarget`] components, this data should not be directly manipulated to avoid desynchronization.--- Instead, modify the [`ChildOf`] components on the "source" entities.--- --- To access the children of an entity, you can iterate over the [`Children`] component,--- using the [`IntoIterator`] trait.--- For more complex access patterns, see the [`RelationshipTarget`] trait.--- --- [`Relationship`]: crate::relationship::Relationship--- [`RelationshipTarget`]: crate::relationship::RelationshipTarget +---@class Children : ReflectReference +--- Tracks which entities are children of this parent entity. +--- +--- A [`RelationshipTarget`] collection component that is populated +--- with entities that "target" this entity with the [`ChildOf`] [`Relationship`] component. +--- +--- Together, these components form the "canonical parent-child hierarchy". See the [`ChildOf`] component for the full +--- description of this relationship and instructions on how to use it. +--- +--- # Usage +--- +--- Like all [`RelationshipTarget`] components, this data should not be directly manipulated to avoid desynchronization. +--- Instead, modify the [`ChildOf`] components on the "source" entities. +--- +--- To access the children of an entity, you can iterate over the [`Children`] component, +--- using the [`IntoIterator`] trait. +--- For more complex access patterns, see the [`RelationshipTarget`] trait. +--- +--- [`Relationship`]: crate::relationship::Relationship +--- [`RelationshipTarget`]: crate::relationship::RelationshipTarget ---@field [1] ? Vec Children = {} ----@package ---@param _self Children - ---@param other Children - ---@return boolean function Children:eq(_self,other) end ----@package ---@param _self Children - ----@return [] +---@return nil function Children:assert_receiver_is_total_eq(_self) end ----@package ---@param _self Children - ---@param a_index integer - ---@param b_index integer - ----@return [] +---@return nil function Children:swap(_self,a_index,b_index) end ----@class Identifier ---- A unified identifier for all entity and similar IDs.--- --- Has the same size as a `u64` integer, but the layout is split between a 32-bit low--- segment, a 31-bit high segment, and the significant bit reserved as type flags to denote--- entity kinds. +---@class Identifier : ReflectReference +--- A unified identifier for all entity and similar IDs. +--- +--- Has the same size as a `u64` integer, but the layout is split between a 32-bit low +--- segment, a 31-bit high segment, and the significant bit reserved as type flags to denote +--- entity kinds. Identifier = {} ----@package ---@param _self Identifier - ---@return integer function Identifier:to_bits(_self) end ----@package ---@param _self Identifier - ---@return integer function Identifier:masked_high(_self) end ----@package ---@param value integer - ---@return Identifier function Identifier.from_bits(value) end ----@package ---@param _self Identifier - ---@return integer function Identifier:low(_self) end ----@package ---@param _self Identifier - ---@param other Identifier - ---@return boolean function Identifier:eq(_self,other) end ----@package ---@param _self Identifier - ---@return Identifier function Identifier:clone(_self) end ----@class Name ---- Component used to identify an entity. Stores a hash for faster comparisons.--- --- The hash is eagerly re-computed upon each update to the name.--- --- [`Name`] should not be treated as a globally unique identifier for entities,--- as multiple entities can have the same name. [`Entity`] should be--- used instead as the default unique identifier. +---@class Name : ReflectReference +--- Component used to identify an entity. Stores a hash for faster comparisons. +--- +--- The hash is eagerly re-computed upon each update to the name. +--- +--- [`Name`] should not be treated as a globally unique identifier for entities, +--- as multiple entities can have the same name. [`Entity`] should be +--- used instead as the default unique identifier. ---@field hash ? integer ---@field name ? Cow Name = {} ----@package ---@param _self Name - ---@return Name function Name:clone(_self) end ----@package ---@param _self Name - ---@param other Name - ---@return boolean function Name:eq(_self,other) end ----@class RemovedComponentEntity ---- Wrapper around [`Entity`] for [`RemovedComponents`].--- Internally, `RemovedComponents` uses these as an `Events`. +---@class RemovedComponentEntity : ReflectReference +--- Wrapper around [`Entity`] for [`RemovedComponents`]. +--- Internally, `RemovedComponents` uses these as an `Events`. ---@field [1] ? Entity RemovedComponentEntity = {} ----@package ---@param _self RemovedComponentEntity - ---@return RemovedComponentEntity function RemovedComponentEntity:clone(_self) end ----@class ButtonState +---@class ButtonState : ReflectReference --- The current "press" state of an element ButtonState = {} ----@package ---@param _self ButtonState - ---@return ButtonState function ButtonState:clone(_self) end ----@package ---@param _self ButtonState - ---@return boolean function ButtonState:is_pressed(_self) end ----@package ---@param _self ButtonState - ---@param other ButtonState - ---@return boolean function ButtonState:eq(_self,other) end ----@package ---@param _self ButtonState - ----@return [] +---@return nil function ButtonState:assert_receiver_is_total_eq(_self) end ----@class AxisSettings ---- Settings for a [`GamepadAxis`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for an axis.--- Values that are higher than `livezone_upperbound` will be rounded up to 1.0.--- Values that are lower than `livezone_lowerbound` will be rounded down to -1.0.--- Values that are in-between `deadzone_lowerbound` and `deadzone_upperbound` will be rounded to 0.0.--- Otherwise, values will be linearly rescaled to fit into the sensitivity range.--- For example, a value that is one fourth of the way from `deadzone_upperbound` to `livezone_upperbound` will be scaled to 0.25.--- --- The valid range is `[-1.0, 1.0]`. +---@class AxisSettings : ReflectReference +--- Settings for a [`GamepadAxis`]. +--- +--- It is used inside the [`GamepadSettings`] to define the sensitivity range and +--- threshold for an axis. +--- Values that are higher than `livezone_upperbound` will be rounded up to 1.0. +--- Values that are lower than `livezone_lowerbound` will be rounded down to -1.0. +--- Values that are in-between `deadzone_lowerbound` and `deadzone_upperbound` will be rounded to 0.0. +--- Otherwise, values will be linearly rescaled to fit into the sensitivity range. +--- For example, a value that is one fourth of the way from `deadzone_upperbound` to `livezone_upperbound` will be scaled to 0.25. +--- +--- The valid range is `[-1.0, 1.0]`. ---@field livezone_upperbound ? number ---@field deadzone_upperbound ? number ---@field deadzone_lowerbound ? number @@ -2466,324 +2481,280 @@ function ButtonState:assert_receiver_is_total_eq(_self) end ---@field threshold ? number AxisSettings = {} ----@package ---@param _self AxisSettings - ---@return number function AxisSettings:livezone_upperbound(_self) end ----@package ---@param _self AxisSettings - ---@param value number - ---@return number function AxisSettings:set_livezone_upperbound(_self,value) end ----@package ---@param _self AxisSettings - ---@param value number - ---@return number function AxisSettings:set_deadzone_lowerbound(_self,value) end ----@package ---@param _self AxisSettings - ---@return number function AxisSettings:deadzone_upperbound(_self) end ----@package ---@param _self AxisSettings - ---@param other AxisSettings - ---@return boolean function AxisSettings:eq(_self,other) end ----@package ---@param _self AxisSettings - ---@return number function AxisSettings:deadzone_lowerbound(_self) end ----@package ---@param _self AxisSettings - ---@param value number - ---@return number function AxisSettings:set_livezone_lowerbound(_self,value) end ----@package ---@param _self AxisSettings - ---@param raw_value number - ---@return number function AxisSettings:clamp(_self,raw_value) end ----@package ---@param _self AxisSettings - ---@return number function AxisSettings:livezone_lowerbound(_self) end ----@package ---@param _self AxisSettings - ---@return AxisSettings function AxisSettings:clone(_self) end ----@package ---@param _self AxisSettings - ---@return number function AxisSettings:threshold(_self) end ----@package ---@param _self AxisSettings - ---@param value number - ---@return number function AxisSettings:set_deadzone_upperbound(_self,value) end ----@package ---@param _self AxisSettings - ---@param value number - ---@return number function AxisSettings:set_threshold(_self,value) end ----@class ButtonAxisSettings ---- Settings for a [`GamepadButton`].--- --- It is used inside the [`GamepadSettings`] to define the sensitivity range and--- threshold for a button axis.--- --- ## Logic--- --- - Values that are higher than or equal to `high` will be rounded to 1.0.--- - Values that are lower than or equal to `low` will be rounded to 0.0.--- - Otherwise, values will not be rounded.--- --- The valid range is from 0.0 to 1.0, inclusive. +---@class ButtonAxisSettings : ReflectReference +--- Settings for a [`GamepadButton`]. +--- +--- It is used inside the [`GamepadSettings`] to define the sensitivity range and +--- threshold for a button axis. +--- +--- ## Logic +--- +--- - Values that are higher than or equal to `high` will be rounded to 1.0. +--- - Values that are lower than or equal to `low` will be rounded to 0.0. +--- - Otherwise, values will not be rounded. +--- +--- The valid range is from 0.0 to 1.0, inclusive. ---@field high ? number ---@field low ? number ---@field threshold ? number ButtonAxisSettings = {} ----@package ---@param _self ButtonAxisSettings - ---@return ButtonAxisSettings function ButtonAxisSettings:clone(_self) end ----@class ButtonSettings ---- Manages settings for gamepad buttons.--- --- It is used inside [`GamepadSettings`] to define the threshold for a [`GamepadButton`]--- to be considered pressed or released. A button is considered pressed if the `press_threshold`--- value is surpassed and released if the `release_threshold` value is undercut.--- --- Allowed values: `0.0 <= ``release_threshold`` <= ``press_threshold`` <= 1.0` +---@class ButtonSettings : ReflectReference +--- Manages settings for gamepad buttons. +--- +--- It is used inside [`GamepadSettings`] to define the threshold for a [`GamepadButton`] +--- to be considered pressed or released. A button is considered pressed if the `press_threshold` +--- value is surpassed and released if the `release_threshold` value is undercut. +--- +--- Allowed values: `0.0 <= ``release_threshold`` <= ``press_threshold`` <= 1.0` ---@field press_threshold ? number ---@field release_threshold ? number ButtonSettings = {} ----@package ---@param _self ButtonSettings - ---@param value number - ---@return boolean function ButtonSettings:is_released(_self,value) end ----@package ---@param _self ButtonSettings - ---@param value number - ---@return number function ButtonSettings:set_press_threshold(_self,value) end ----@package ---@param _self ButtonSettings - ---@param other ButtonSettings - ---@return boolean function ButtonSettings:eq(_self,other) end ----@package ---@param _self ButtonSettings - ---@param value number - ---@return boolean function ButtonSettings:is_pressed(_self,value) end ----@package ---@param _self ButtonSettings - ---@return number function ButtonSettings:release_threshold(_self) end ----@package ---@param _self ButtonSettings - ---@param value number - ---@return number function ButtonSettings:set_release_threshold(_self,value) end ----@package ---@param _self ButtonSettings - ---@return ButtonSettings function ButtonSettings:clone(_self) end ----@package ---@param _self ButtonSettings - ---@return number function ButtonSettings:press_threshold(_self) end ----@class Gamepad ---- Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`].--- --- An entity with this component is spawned automatically after [`GamepadConnectionEvent`]--- and updated by [`gamepad_event_processing_system`].--- --- See also [`GamepadSettings`] for configuration.--- --- # Examples--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadAxis, GamepadButton};--- # use bevy_ecs::system::Query;--- # use bevy_ecs::name::Name;--- #--- fn gamepad_usage_system(gamepads: Query<(&Name, &Gamepad)>) {--- for (name, gamepad) in &gamepads {--- println!("{name}");--- --- if gamepad.just_pressed(GamepadButton::North) {--- println!("{} just pressed North", name)--- }--- --- if let Some(left_stick_x) = gamepad.get(GamepadAxis::LeftStickX) {--- println!("left stick X: {}", left_stick_x)--- }--- }--- }--- ``` +---@class Gamepad : ReflectReference +--- Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`]. +--- +--- An entity with this component is spawned automatically after [`GamepadConnectionEvent`] +--- and updated by [`gamepad_event_processing_system`]. +--- +--- See also [`GamepadSettings`] for configuration. +--- +--- # Examples +--- +--- ``` +--- # use bevy_input::gamepad::{Gamepad, GamepadAxis, GamepadButton}; +--- # use bevy_ecs::system::Query; +--- # use bevy_ecs::name::Name; +--- # +--- fn gamepad_usage_system(gamepads: Query<(&Name, &Gamepad)>) { +--- for (name, gamepad) in &gamepads { +--- println!("{name}"); +--- +--- if gamepad.just_pressed(GamepadButton::North) { +--- println!("{} just pressed North", name) +--- } +--- +--- if let Some(left_stick_x) = gamepad.get(GamepadAxis::LeftStickX) { +--- println!("left stick X: {}", left_stick_x) +--- } +--- } +--- } +--- ``` ---@field vendor_id ? Option ---@field product_id ? Option ---@field digital ? ButtonInput ---@field analog ? Axis Gamepad = {} ----@package ---@param _self Gamepad - ---@return Vec2 function Gamepad:right_stick(_self) end ----@package ---@param _self Gamepad - ---@return Vec2 function Gamepad:dpad(_self) end ----@package ---@param _self Gamepad - ---@return integer | nil function Gamepad:vendor_id(_self) end ----@package ---@param _self Gamepad - ---@param button_type GamepadButton - ---@return boolean function Gamepad:just_released(_self,button_type) end ----@package ---@param _self Gamepad - ---@param button_type GamepadButton - ---@return boolean function Gamepad:pressed(_self,button_type) end ----@package ---@param _self Gamepad - ---@return Vec2 function Gamepad:left_stick(_self) end ----@package ---@param _self Gamepad - ---@param button_type GamepadButton - ---@return boolean function Gamepad:just_pressed(_self,button_type) end ----@package ---@param _self Gamepad - ---@return integer | nil function Gamepad:product_id(_self) end ----@class GamepadAxis ---- Represents gamepad input types that are mapped in the range [-1.0, 1.0].--- --- ## Usage--- --- This is used to determine which axis has changed its value when receiving a--- gamepad axis event. It is also used in the [`Gamepad`] component. +---@class GamepadAxis : ReflectReference +--- Represents gamepad input types that are mapped in the range [-1.0, 1.0]. +--- +--- ## Usage +--- +--- This is used to determine which axis has changed its value when receiving a +--- gamepad axis event. It is also used in the [`Gamepad`] component. GamepadAxis = {} ----@package ---@param _self GamepadAxis - ----@return [] +---@return nil function GamepadAxis:assert_receiver_is_total_eq(_self) end ----@package ---@param _self GamepadAxis - ---@param other GamepadAxis - ---@return boolean function GamepadAxis:eq(_self,other) end ----@package ---@param _self GamepadAxis - ---@return GamepadAxis function GamepadAxis:clone(_self) end ----@class GamepadAxisChangedEvent +---@class GamepadAxisChangedEvent : ReflectReference --- [`GamepadAxis`] event triggered by an analog state change. ---@field entity ? Entity ---@field axis ? GamepadAxis ---@field value ? number GamepadAxisChangedEvent = {} ----@package ---@param entity Entity - ---@param axis GamepadAxis - ---@param value number - ---@return GamepadAxisChangedEvent function GamepadAxisChangedEvent.new(entity,axis,value) end ----@package ---@param _self GamepadAxisChangedEvent - ---@return GamepadAxisChangedEvent function GamepadAxisChangedEvent:clone(_self) end ----@package ---@param _self GamepadAxisChangedEvent - ---@param other GamepadAxisChangedEvent - ---@return boolean function GamepadAxisChangedEvent:eq(_self,other) end ----@class GamepadButton ---- Represents gamepad input types that are mapped in the range [0.0, 1.0].--- --- ## Usage--- --- This is used to determine which button has changed its value when receiving gamepad button events.--- It is also used in the [`Gamepad`] component. +---@class GamepadButton : ReflectReference +--- Represents gamepad input types that are mapped in the range [0.0, 1.0]. +--- +--- ## Usage +--- +--- This is used to determine which button has changed its value when receiving gamepad button events. +--- It is also used in the [`Gamepad`] component. GamepadButton = {} ----@package ---@param _self GamepadButton - ---@return GamepadButton function GamepadButton:clone(_self) end ----@package ---@param _self GamepadButton - ----@return [] +---@return nil function GamepadButton:assert_receiver_is_total_eq(_self) end ----@package ---@param _self GamepadButton - ---@param other GamepadButton - ---@return boolean function GamepadButton:eq(_self,other) end ----@class GamepadButtonChangedEvent +---@class GamepadButtonChangedEvent : ReflectReference --- [`GamepadButton`] event triggered by an analog state change. ---@field entity ? Entity ---@field button ? GamepadButton @@ -2791,227 +2762,207 @@ function GamepadButton:eq(_self,other) end ---@field value ? number GamepadButtonChangedEvent = {} ----@package ---@param entity Entity - ---@param button GamepadButton - ---@param state ButtonState - ---@param value number - ---@return GamepadButtonChangedEvent function GamepadButtonChangedEvent.new(entity,button,state,value) end ----@package ---@param _self GamepadButtonChangedEvent - ---@param other GamepadButtonChangedEvent - ---@return boolean function GamepadButtonChangedEvent:eq(_self,other) end ----@package ---@param _self GamepadButtonChangedEvent - ---@return GamepadButtonChangedEvent function GamepadButtonChangedEvent:clone(_self) end ----@class GamepadButtonStateChangedEvent +---@class GamepadButtonStateChangedEvent : ReflectReference --- [`GamepadButton`] event triggered by a digital state change. ---@field entity ? Entity ---@field button ? GamepadButton ---@field state ? ButtonState GamepadButtonStateChangedEvent = {} ----@package ---@param _self GamepadButtonStateChangedEvent - ---@param other GamepadButtonStateChangedEvent - ---@return boolean function GamepadButtonStateChangedEvent:eq(_self,other) end ----@package ---@param entity Entity - ---@param button GamepadButton - ---@param state ButtonState - ---@return GamepadButtonStateChangedEvent function GamepadButtonStateChangedEvent.new(entity,button,state) end ----@package ---@param _self GamepadButtonStateChangedEvent - ---@return GamepadButtonStateChangedEvent function GamepadButtonStateChangedEvent:clone(_self) end ----@package ---@param _self GamepadButtonStateChangedEvent - ----@return [] +---@return nil function GamepadButtonStateChangedEvent:assert_receiver_is_total_eq(_self) end ----@class GamepadConnection +---@class GamepadConnection : ReflectReference --- The connection status of a gamepad. GamepadConnection = {} ----@package ---@param _self GamepadConnection - ---@return GamepadConnection function GamepadConnection:clone(_self) end ----@package ---@param _self GamepadConnection - ---@param other GamepadConnection - ---@return boolean function GamepadConnection:eq(_self,other) end ----@class GamepadConnectionEvent ---- A Gamepad connection event. Created when a connection to a gamepad--- is established and when a gamepad is disconnected. +---@class GamepadConnectionEvent : ReflectReference +--- A Gamepad connection event. Created when a connection to a gamepad +--- is established and when a gamepad is disconnected. ---@field gamepad ? Entity ---@field connection ? GamepadConnection GamepadConnectionEvent = {} ----@package ---@param gamepad Entity - ---@param connection GamepadConnection - ---@return GamepadConnectionEvent function GamepadConnectionEvent.new(gamepad,connection) end ----@package ---@param _self GamepadConnectionEvent - ---@return boolean function GamepadConnectionEvent:disconnected(_self) end ----@package ---@param _self GamepadConnectionEvent - ---@return GamepadConnectionEvent function GamepadConnectionEvent:clone(_self) end ----@package ---@param _self GamepadConnectionEvent - ---@param other GamepadConnectionEvent - ---@return boolean function GamepadConnectionEvent:eq(_self,other) end ----@package ---@param _self GamepadConnectionEvent - ---@return boolean function GamepadConnectionEvent:connected(_self) end ----@class GamepadEvent ---- A gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`GamepadButtonChangedEvent`] and [`GamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event is produced by `bevy_input`. +---@class GamepadEvent : ReflectReference +--- A gamepad event. +--- +--- This event type is used over the [`GamepadConnectionEvent`], +--- [`GamepadButtonChangedEvent`] and [`GamepadAxisChangedEvent`] when +--- the in-frame relative ordering of events is important. +--- +--- This event is produced by `bevy_input`. GamepadEvent = {} ----@package ---@param _self GamepadEvent - ---@return GamepadEvent function GamepadEvent:clone(_self) end ----@package ---@param _self GamepadEvent - ---@param other GamepadEvent - ---@return boolean function GamepadEvent:eq(_self,other) end ----@class GamepadInput +---@class GamepadInput : ReflectReference --- Encapsulation over [`GamepadAxis`] and [`GamepadButton`]. GamepadInput = {} ----@package ---@param _self GamepadInput - ---@return GamepadInput function GamepadInput:clone(_self) end ----@package ---@param _self GamepadInput - ---@param other GamepadInput - ---@return boolean function GamepadInput:eq(_self,other) end ----@package ---@param _self GamepadInput - ----@return [] +---@return nil function GamepadInput:assert_receiver_is_total_eq(_self) end ----@class GamepadRumbleIntensity +---@class GamepadRumbleIntensity : ReflectReference --- The intensity at which a gamepad's force-feedback motors may rumble. ---@field strong_motor ? number ---@field weak_motor ? number GamepadRumbleIntensity = {} ----@package ---@param _self GamepadRumbleIntensity - ---@param other GamepadRumbleIntensity - ---@return boolean function GamepadRumbleIntensity:eq(_self,other) end ----@package ---@param _self GamepadRumbleIntensity - ---@return GamepadRumbleIntensity function GamepadRumbleIntensity:clone(_self) end ----@package ---@param intensity number - ---@return GamepadRumbleIntensity function GamepadRumbleIntensity.strong_motor(intensity) end ----@package ---@param intensity number - ---@return GamepadRumbleIntensity function GamepadRumbleIntensity.weak_motor(intensity) end ----@class GamepadRumbleRequest ---- An event that controls force-feedback rumbling of a [`Gamepad`] [`entity`](Entity).--- --- # Notes--- --- Does nothing if the gamepad or platform does not support rumble.--- --- # Example--- --- ```--- # use bevy_input::gamepad::{Gamepad, GamepadRumbleRequest, GamepadRumbleIntensity};--- # use bevy_ecs::prelude::{EventWriter, Res, Query, Entity, With};--- # use core::time::Duration;--- fn rumble_gamepad_system(--- mut rumble_requests: EventWriter,--- gamepads: Query>,--- ) {--- for entity in gamepads.iter() {--- rumble_requests.write(GamepadRumbleRequest::Add {--- gamepad: entity,--- intensity: GamepadRumbleIntensity::MAX,--- duration: Duration::from_secs_f32(0.5),--- });--- }--- }--- ``` +---@class GamepadRumbleRequest : ReflectReference +--- An event that controls force-feedback rumbling of a [`Gamepad`] [`entity`](Entity). +--- +--- # Notes +--- +--- Does nothing if the gamepad or platform does not support rumble. +--- +--- # Example +--- +--- ``` +--- # use bevy_input::gamepad::{Gamepad, GamepadRumbleRequest, GamepadRumbleIntensity}; +--- # use bevy_ecs::prelude::{EventWriter, Res, Query, Entity, With}; +--- # use core::time::Duration; +--- fn rumble_gamepad_system( +--- mut rumble_requests: EventWriter, +--- gamepads: Query>, +--- ) { +--- for entity in gamepads.iter() { +--- rumble_requests.write(GamepadRumbleRequest::Add { +--- gamepad: entity, +--- intensity: GamepadRumbleIntensity::MAX, +--- duration: Duration::from_secs_f32(0.5), +--- }); +--- } +--- } +--- ``` GamepadRumbleRequest = {} ----@package ---@param _self GamepadRumbleRequest - ---@return GamepadRumbleRequest function GamepadRumbleRequest:clone(_self) end ----@package ---@param _self GamepadRumbleRequest - ---@return Entity function GamepadRumbleRequest:gamepad(_self) end ----@class GamepadSettings ---- Gamepad settings component.--- --- ## Usage--- --- It is used to create a `bevy` component that stores the settings of [`GamepadButton`] and [`GamepadAxis`] in [`Gamepad`].--- If no user defined [`ButtonSettings`], [`AxisSettings`], or [`ButtonAxisSettings`]--- are defined, the default settings of each are used as a fallback accordingly.--- --- ## Note--- --- The [`GamepadSettings`] are used to determine when raw gamepad events--- should register. Events that don't meet the change thresholds defined in [`GamepadSettings`]--- will not register. To modify these settings, mutate the corresponding component. +---@class GamepadSettings : ReflectReference +--- Gamepad settings component. +--- +--- ## Usage +--- +--- It is used to create a `bevy` component that stores the settings of [`GamepadButton`] and [`GamepadAxis`] in [`Gamepad`]. +--- If no user defined [`ButtonSettings`], [`AxisSettings`], or [`ButtonAxisSettings`] +--- are defined, the default settings of each are used as a fallback accordingly. +--- +--- ## Note +--- +--- The [`GamepadSettings`] are used to determine when raw gamepad events +--- should register. Events that don't meet the change thresholds defined in [`GamepadSettings`] +--- will not register. To modify these settings, mutate the corresponding component. ---@field default_button_settings ? ButtonSettings ---@field default_axis_settings ? AxisSettings ---@field default_button_axis_settings ? ButtonAxisSettings @@ -3020,252 +2971,251 @@ function GamepadRumbleRequest:gamepad(_self) end ---@field button_axis_settings ? HashMap GamepadSettings = {} ----@package ---@param _self GamepadSettings - ---@return GamepadSettings function GamepadSettings:clone(_self) end ----@class RawGamepadAxisChangedEvent +---@class RawGamepadAxisChangedEvent : ReflectReference --- [`GamepadAxis`] changed event unfiltered by [`GamepadSettings`]. ---@field gamepad ? Entity ---@field axis ? GamepadAxis ---@field value ? number RawGamepadAxisChangedEvent = {} ----@package ---@param gamepad Entity - ---@param axis_type GamepadAxis - ---@param value number - ---@return RawGamepadAxisChangedEvent function RawGamepadAxisChangedEvent.new(gamepad,axis_type,value) end ----@package ---@param _self RawGamepadAxisChangedEvent - ---@param other RawGamepadAxisChangedEvent - ---@return boolean function RawGamepadAxisChangedEvent:eq(_self,other) end ----@package ---@param _self RawGamepadAxisChangedEvent - ---@return RawGamepadAxisChangedEvent function RawGamepadAxisChangedEvent:clone(_self) end ----@class RawGamepadButtonChangedEvent +---@class RawGamepadButtonChangedEvent : ReflectReference --- [`GamepadButton`] changed event unfiltered by [`GamepadSettings`]. ---@field gamepad ? Entity ---@field button ? GamepadButton ---@field value ? number RawGamepadButtonChangedEvent = {} ----@package ---@param gamepad Entity - ---@param button_type GamepadButton - ---@param value number - ---@return RawGamepadButtonChangedEvent function RawGamepadButtonChangedEvent.new(gamepad,button_type,value) end ----@package ---@param _self RawGamepadButtonChangedEvent - ---@return RawGamepadButtonChangedEvent function RawGamepadButtonChangedEvent:clone(_self) end ----@package ---@param _self RawGamepadButtonChangedEvent - ---@param other RawGamepadButtonChangedEvent - ---@return boolean function RawGamepadButtonChangedEvent:eq(_self,other) end ----@class RawGamepadEvent ---- A raw gamepad event.--- --- This event type is used over the [`GamepadConnectionEvent`],--- [`RawGamepadButtonChangedEvent`] and [`RawGamepadAxisChangedEvent`] when--- the in-frame relative ordering of events is important.--- --- This event type is used by `bevy_input` to feed its components. +---@class RawGamepadEvent : ReflectReference +--- A raw gamepad event. +--- +--- This event type is used over the [`GamepadConnectionEvent`], +--- [`RawGamepadButtonChangedEvent`] and [`RawGamepadAxisChangedEvent`] when +--- the in-frame relative ordering of events is important. +--- +--- This event type is used by `bevy_input` to feed its components. RawGamepadEvent = {} ----@package ---@param _self RawGamepadEvent - ---@return RawGamepadEvent function RawGamepadEvent:clone(_self) end ----@package ---@param _self RawGamepadEvent - ---@param other RawGamepadEvent - ---@return boolean function RawGamepadEvent:eq(_self,other) end ----@class DoubleTapGesture ---- Double tap gesture.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +---@class DoubleTapGesture : ReflectReference +--- Double tap gesture. +--- +--- ## Platform-specific +--- +--- - Only available on **`macOS`** and **`iOS`**. +--- - On **`iOS`**, must be enabled first DoubleTapGesture = {} ----@package ---@param _self DoubleTapGesture - ---@param other DoubleTapGesture - ---@return boolean function DoubleTapGesture:eq(_self,other) end ----@package ---@param _self DoubleTapGesture - ---@return DoubleTapGesture function DoubleTapGesture:clone(_self) end ----@class PanGesture ---- Pan gesture.--- --- ## Platform-specific--- --- - On **`iOS`**, must be enabled first +---@class PanGesture : ReflectReference +--- Pan gesture. +--- +--- ## Platform-specific +--- +--- - On **`iOS`**, must be enabled first ---@field [1] ? Vec2 PanGesture = {} ----@package ---@param _self PanGesture - ---@param other PanGesture - ---@return boolean function PanGesture:eq(_self,other) end ----@package ---@param _self PanGesture - ---@return PanGesture function PanGesture:clone(_self) end ----@class PinchGesture ---- Two-finger pinch gesture, often used for magnifications.--- --- Positive delta values indicate magnification (zooming in) and--- negative delta values indicate shrinking (zooming out).--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +---@class PinchGesture : ReflectReference +--- Two-finger pinch gesture, often used for magnifications. +--- +--- Positive delta values indicate magnification (zooming in) and +--- negative delta values indicate shrinking (zooming out). +--- +--- ## Platform-specific +--- +--- - Only available on **`macOS`** and **`iOS`**. +--- - On **`iOS`**, must be enabled first ---@field [1] ? number PinchGesture = {} ----@package ---@param _self PinchGesture - ---@return PinchGesture function PinchGesture:clone(_self) end ----@package ---@param _self PinchGesture - ---@param other PinchGesture - ---@return boolean function PinchGesture:eq(_self,other) end ----@class RotationGesture ---- Two-finger rotation gesture.--- --- Positive delta values indicate rotation counterclockwise and--- negative delta values indicate rotation clockwise.--- --- ## Platform-specific--- --- - Only available on **`macOS`** and **`iOS`**.--- - On **`iOS`**, must be enabled first +---@class RotationGesture : ReflectReference +--- Two-finger rotation gesture. +--- +--- Positive delta values indicate rotation counterclockwise and +--- negative delta values indicate rotation clockwise. +--- +--- ## Platform-specific +--- +--- - Only available on **`macOS`** and **`iOS`**. +--- - On **`iOS`**, must be enabled first ---@field [1] ? number RotationGesture = {} ----@package ---@param _self RotationGesture - ---@return RotationGesture function RotationGesture:clone(_self) end ----@package ---@param _self RotationGesture - ---@param other RotationGesture - ---@return boolean function RotationGesture:eq(_self,other) end ----@class Key ---- The logical key code of a [`KeyboardInput`].--- --- ## Technical--- --- Its values map 1 to 1 to winit's Key. +---@class Key : ReflectReference +--- The logical key code of a [`KeyboardInput`]. +--- +--- ## Technical +--- +--- Its values map 1 to 1 to winit's Key. Key = {} ----@package ---@param _self Key - ---@param other Key - ---@return boolean function Key:eq(_self,other) end ----@package ---@param _self Key - ---@return Key function Key:clone(_self) end ----@package ---@param _self Key - ----@return [] +---@return nil function Key:assert_receiver_is_total_eq(_self) end ----@class KeyCode ---- The key code of a [`KeyboardInput`].--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `Res>`.--- --- Code representing the location of a physical key--- This mostly conforms to the UI Events Specification's [`KeyboardEvent.code`] with a few--- exceptions:--- - The keys that the specification calls `MetaLeft` and `MetaRight` are named `SuperLeft` and--- `SuperRight` here.--- - The key that the specification calls "Super" is reported as `Unidentified` here.--- --- [`KeyboardEvent.code`]: https://w3c.github.io/uievents-code/#code-value-tables--- --- ## Updating--- --- The resource is updated inside of the [`keyboard_input_system`]. +---@class KeyCode : ReflectReference +--- The key code of a [`KeyboardInput`]. +--- +--- ## Usage +--- +--- It is used as the generic `T` value of an [`ButtonInput`] to create a `Res>`. +--- +--- Code representing the location of a physical key +--- This mostly conforms to the UI Events Specification's [`KeyboardEvent.code`] with a few +--- exceptions: +--- - The keys that the specification calls `MetaLeft` and `MetaRight` are named `SuperLeft` and +--- `SuperRight` here. +--- - The key that the specification calls "Super" is reported as `Unidentified` here. +--- +--- [`KeyboardEvent.code`]: https://w3c.github.io/uievents-code/#code-value-tables +--- +--- ## Updating +--- +--- The resource is updated inside of the [`keyboard_input_system`]. KeyCode = {} ----@package ---@param _self KeyCode - ---@return KeyCode function KeyCode:clone(_self) end ----@package ---@param _self KeyCode - ----@return [] +---@return nil function KeyCode:assert_receiver_is_total_eq(_self) end ----@package ---@param _self KeyCode - ---@param other KeyCode - ---@return boolean function KeyCode:eq(_self,other) end ----@class KeyboardFocusLost ---- Gets generated from `bevy_winit::winit_runner`--- --- Used for clearing all cached states to avoid having 'stuck' key presses--- when, for example, switching between windows with 'Alt-Tab' or using any other--- OS specific key combination that leads to Bevy window losing focus and not receiving any--- input events +---@class KeyboardFocusLost : ReflectReference +--- Gets generated from `bevy_winit::winit_runner` +--- +--- Used for clearing all cached states to avoid having 'stuck' key presses +--- when, for example, switching between windows with 'Alt-Tab' or using any other +--- OS specific key combination that leads to Bevy window losing focus and not receiving any +--- input events KeyboardFocusLost = {} ----@package ---@param _self KeyboardFocusLost - ---@return KeyboardFocusLost function KeyboardFocusLost:clone(_self) end ----@package ---@param _self KeyboardFocusLost - ---@param other KeyboardFocusLost - ---@return boolean function KeyboardFocusLost:eq(_self,other) end ----@package ---@param _self KeyboardFocusLost - ----@return [] +---@return nil function KeyboardFocusLost:assert_receiver_is_total_eq(_self) end ----@class KeyboardInput ---- A keyboard input event.--- --- This event is the translated version of the `WindowEvent::KeyboardInput` from the `winit` crate.--- It is available to the end user and can be used for game logic.--- --- ## Usage--- --- The event is consumed inside of the [`keyboard_input_system`]--- to update the [`ButtonInput`](ButtonInput) resource. +---@class KeyboardInput : ReflectReference +--- A keyboard input event. +--- +--- This event is the translated version of the `WindowEvent::KeyboardInput` from the `winit` crate. +--- It is available to the end user and can be used for game logic. +--- +--- ## Usage +--- +--- The event is consumed inside of the [`keyboard_input_system`] +--- to update the [`ButtonInput`](ButtonInput) resource. ---@field key_code ? KeyCode ---@field logical_key ? Key ---@field state ? ButtonState @@ -3274,260 +3224,273 @@ function KeyboardFocusLost:assert_receiver_is_total_eq(_self) end ---@field window ? Entity KeyboardInput = {} ----@package ---@param _self KeyboardInput - ---@return KeyboardInput function KeyboardInput:clone(_self) end ----@package ---@param _self KeyboardInput - ----@return [] +---@return nil function KeyboardInput:assert_receiver_is_total_eq(_self) end ----@package ---@param _self KeyboardInput - ---@param other KeyboardInput - ---@return boolean function KeyboardInput:eq(_self,other) end ----@class NativeKey ---- Contains the platform-native logical key identifier, known as keysym.--- --- Exactly what that means differs from platform to platform, but the values are to some degree--- tied to the currently active keyboard layout. The same key on the same keyboard may also report--- different values on different platforms, which is one of the reasons this is a per-platform--- enum.--- --- This enum is primarily used to store raw keysym when Winit doesn't map a given native logical--- key identifier to a meaningful [`Key`] variant. This lets you use [`Key`], and let the user--- define keybinds which work in the presence of identifiers we haven't mapped for you yet. +---@class NativeKey : ReflectReference +--- Contains the platform-native logical key identifier, known as keysym. +--- +--- Exactly what that means differs from platform to platform, but the values are to some degree +--- tied to the currently active keyboard layout. The same key on the same keyboard may also report +--- different values on different platforms, which is one of the reasons this is a per-platform +--- enum. +--- +--- This enum is primarily used to store raw keysym when Winit doesn't map a given native logical +--- key identifier to a meaningful [`Key`] variant. This lets you use [`Key`], and let the user +--- define keybinds which work in the presence of identifiers we haven't mapped for you yet. NativeKey = {} ----@package ---@param _self NativeKey - ---@return NativeKey function NativeKey:clone(_self) end ----@package ---@param _self NativeKey - ----@return [] +---@return nil function NativeKey:assert_receiver_is_total_eq(_self) end ----@package ---@param _self NativeKey - ---@param other NativeKey - ---@return boolean function NativeKey:eq(_self,other) end ----@class NativeKeyCode ---- Contains the platform-native physical key identifier--- --- The exact values vary from platform to platform (which is part of why this is a per-platform--- enum), but the values are primarily tied to the key's physical location on the keyboard.--- --- This enum is primarily used to store raw keycodes when Winit doesn't map a given native--- physical key identifier to a meaningful [`KeyCode`] variant. In the presence of identifiers we--- haven't mapped for you yet, this lets you use [`KeyCode`] to:--- --- - Correctly match key press and release events.--- - On non-web platforms, support assigning keybinds to virtually any key through a UI. +---@class NativeKeyCode : ReflectReference +--- Contains the platform-native physical key identifier +--- +--- The exact values vary from platform to platform (which is part of why this is a per-platform +--- enum), but the values are primarily tied to the key's physical location on the keyboard. +--- +--- This enum is primarily used to store raw keycodes when Winit doesn't map a given native +--- physical key identifier to a meaningful [`KeyCode`] variant. In the presence of identifiers we +--- haven't mapped for you yet, this lets you use [`KeyCode`] to: +--- +--- - Correctly match key press and release events. +--- - On non-web platforms, support assigning keybinds to virtually any key through a UI. NativeKeyCode = {} ----@package ---@param _self NativeKeyCode - ----@return [] +---@return nil function NativeKeyCode:assert_receiver_is_total_eq(_self) end ----@package ---@param _self NativeKeyCode - ---@param other NativeKeyCode - ---@return boolean function NativeKeyCode:eq(_self,other) end ----@package ---@param _self NativeKeyCode - ---@return NativeKeyCode function NativeKeyCode:clone(_self) end ----@class AccumulatedMouseMotion ---- Tracks how much the mouse has moved every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseMotion`] events received this frame. +---@class AccumulatedMouseMotion : ReflectReference +--- Tracks how much the mouse has moved every frame. +--- +--- This resource is reset to zero every frame. +--- +--- This resource sums the total [`MouseMotion`] events received this frame. ---@field delta ? Vec2 AccumulatedMouseMotion = {} ----@package ---@param _self AccumulatedMouseMotion - ---@param other AccumulatedMouseMotion - ---@return boolean function AccumulatedMouseMotion:eq(_self,other) end ----@package ---@param _self AccumulatedMouseMotion - ---@return AccumulatedMouseMotion function AccumulatedMouseMotion:clone(_self) end ----@class AccumulatedMouseScroll ---- Tracks how much the mouse has scrolled every frame.--- --- This resource is reset to zero every frame.--- --- This resource sums the total [`MouseWheel`] events received this frame. +---@class AccumulatedMouseScroll : ReflectReference +--- Tracks how much the mouse has scrolled every frame. +--- +--- This resource is reset to zero every frame. +--- +--- This resource sums the total [`MouseWheel`] events received this frame. ---@field unit ? MouseScrollUnit ---@field delta ? Vec2 AccumulatedMouseScroll = {} ----@package ---@param _self AccumulatedMouseScroll - ---@param other AccumulatedMouseScroll - ---@return boolean function AccumulatedMouseScroll:eq(_self,other) end ----@package ---@param _self AccumulatedMouseScroll - ---@return AccumulatedMouseScroll function AccumulatedMouseScroll:clone(_self) end ----@class MouseButton ---- A button on a mouse device.--- --- ## Usage--- --- It is used as the generic `T` value of an [`ButtonInput`] to create a `bevy`--- resource.--- --- ## Updating--- --- The resource is updated inside of the [`mouse_button_input_system`]. +---@class MouseButton : ReflectReference +--- A button on a mouse device. +--- +--- ## Usage +--- +--- It is used as the generic `T` value of an [`ButtonInput`] to create a `bevy` +--- resource. +--- +--- ## Updating +--- +--- The resource is updated inside of the [`mouse_button_input_system`]. MouseButton = {} ----@package ---@param _self MouseButton - ---@return MouseButton function MouseButton:clone(_self) end ----@package ---@param _self MouseButton - ---@param other MouseButton - ---@return boolean function MouseButton:eq(_self,other) end ----@package ---@param _self MouseButton - ----@return [] +---@return nil function MouseButton:assert_receiver_is_total_eq(_self) end ----@class MouseButtonInput ---- A mouse button input event.--- --- This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate.--- --- ## Usage--- --- The event is read inside of the [`mouse_button_input_system`]--- to update the [`ButtonInput`] resource. +---@class MouseButtonInput : ReflectReference +--- A mouse button input event. +--- +--- This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate. +--- +--- ## Usage +--- +--- The event is read inside of the [`mouse_button_input_system`] +--- to update the [`ButtonInput`] resource. ---@field button ? MouseButton ---@field state ? ButtonState ---@field window ? Entity MouseButtonInput = {} ----@package ---@param _self MouseButtonInput - ----@return [] +---@return nil function MouseButtonInput:assert_receiver_is_total_eq(_self) end ----@package ---@param _self MouseButtonInput - ---@return MouseButtonInput function MouseButtonInput:clone(_self) end ----@package ---@param _self MouseButtonInput - ---@param other MouseButtonInput - ---@return boolean function MouseButtonInput:eq(_self,other) end ----@class MouseMotion ---- An event reporting the change in physical position of a pointing device.--- --- This represents raw, unfiltered physical motion.--- It is the translated version of [`DeviceEvent::MouseMotion`] from the `winit` crate.--- --- All pointing devices connected to a single machine at the same time can emit the event independently.--- However, the event data does not make it possible to distinguish which device it is referring to.--- --- [`DeviceEvent::MouseMotion`]: https://docs.rs/winit/latest/winit/event/enum.DeviceEvent.html#variant.MouseMotion +---@class MouseMotion : ReflectReference +--- An event reporting the change in physical position of a pointing device. +--- +--- This represents raw, unfiltered physical motion. +--- It is the translated version of [`DeviceEvent::MouseMotion`] from the `winit` crate. +--- +--- All pointing devices connected to a single machine at the same time can emit the event independently. +--- However, the event data does not make it possible to distinguish which device it is referring to. +--- +--- [`DeviceEvent::MouseMotion`]: https://docs.rs/winit/latest/winit/event/enum.DeviceEvent.html#variant.MouseMotion ---@field delta ? Vec2 MouseMotion = {} ----@package ---@param _self MouseMotion - ---@param other MouseMotion - ---@return boolean function MouseMotion:eq(_self,other) end ----@package ---@param _self MouseMotion - ---@return MouseMotion function MouseMotion:clone(_self) end ----@class MouseScrollUnit ---- The scroll unit.--- --- Describes how a value of a [`MouseWheel`] event has to be interpreted.--- --- The value of the event can either be interpreted as the amount of lines or the amount of pixels--- to scroll. +---@class MouseScrollUnit : ReflectReference +--- The scroll unit. +--- +--- Describes how a value of a [`MouseWheel`] event has to be interpreted. +--- +--- The value of the event can either be interpreted as the amount of lines or the amount of pixels +--- to scroll. MouseScrollUnit = {} ----@package ---@param _self MouseScrollUnit - ---@param other MouseScrollUnit - ---@return boolean function MouseScrollUnit:eq(_self,other) end ----@package ---@param _self MouseScrollUnit - ----@return [] +---@return nil function MouseScrollUnit:assert_receiver_is_total_eq(_self) end ----@package ---@param _self MouseScrollUnit - ---@return MouseScrollUnit function MouseScrollUnit:clone(_self) end ----@class MouseWheel ---- A mouse wheel event.--- --- This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate. +---@class MouseWheel : ReflectReference +--- A mouse wheel event. +--- +--- This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate. ---@field unit ? MouseScrollUnit ---@field x ? number ---@field y ? number ---@field window ? Entity MouseWheel = {} ----@package ---@param _self MouseWheel - ---@param other MouseWheel - ---@return boolean function MouseWheel:eq(_self,other) end ----@package ---@param _self MouseWheel - ---@return MouseWheel function MouseWheel:clone(_self) end ----@class ForceTouch +---@class ForceTouch : ReflectReference --- A force description of a [`Touch`] input. ForceTouch = {} ----@package ---@param _self ForceTouch - ---@param other ForceTouch - ---@return boolean function ForceTouch:eq(_self,other) end ----@package ---@param _self ForceTouch - ---@return ForceTouch function ForceTouch:clone(_self) end ----@class TouchInput ---- A touch input event.--- --- ## Logic--- --- Every time the user touches the screen, a new [`TouchPhase::Started`] event with an unique--- identifier for the finger is generated. When the finger is lifted, the [`TouchPhase::Ended`]--- event is generated with the same finger id.--- --- After a [`TouchPhase::Started`] event has been emitted, there may be zero or more [`TouchPhase::Moved`]--- events when the finger is moved or the touch pressure changes.--- --- The finger id may be reused by the system after an [`TouchPhase::Ended`] event. The user--- should assume that a new [`TouchPhase::Started`] event received with the same id has nothing--- to do with the old finger and is a new finger.--- --- A [`TouchPhase::Canceled`] event is emitted when the system has canceled tracking this--- touch, such as when the window loses focus, or on iOS if the user moves the--- device against their face.--- --- ## Note--- --- This event is the translated version of the `WindowEvent::Touch` from the `winit` crate.--- It is available to the end user and can be used for game logic. +---@class TouchInput : ReflectReference +--- A touch input event. +--- +--- ## Logic +--- +--- Every time the user touches the screen, a new [`TouchPhase::Started`] event with an unique +--- identifier for the finger is generated. When the finger is lifted, the [`TouchPhase::Ended`] +--- event is generated with the same finger id. +--- +--- After a [`TouchPhase::Started`] event has been emitted, there may be zero or more [`TouchPhase::Moved`] +--- events when the finger is moved or the touch pressure changes. +--- +--- The finger id may be reused by the system after an [`TouchPhase::Ended`] event. The user +--- should assume that a new [`TouchPhase::Started`] event received with the same id has nothing +--- to do with the old finger and is a new finger. +--- +--- A [`TouchPhase::Canceled`] event is emitted when the system has canceled tracking this +--- touch, such as when the window loses focus, or on iOS if the user moves the +--- device against their face. +--- +--- ## Note +--- +--- This event is the translated version of the `WindowEvent::Touch` from the `winit` crate. +--- It is available to the end user and can be used for game logic. ---@field phase ? TouchPhase ---@field position ? Vec2 ---@field window ? Entity @@ -3535,451 +3498,324 @@ function ForceTouch:clone(_self) end ---@field id ? integer TouchInput = {} ----@package ---@param _self TouchInput - ---@param other TouchInput - ---@return boolean function TouchInput:eq(_self,other) end ----@package ---@param _self TouchInput - ---@return TouchInput function TouchInput:clone(_self) end ----@class TouchPhase ---- A phase of a [`TouchInput`].--- --- ## Usage--- --- It is used to describe the phase of the touch input that is currently active.--- This includes a phase that indicates that a touch input has started or ended,--- or that a finger has moved. There is also a canceled phase that indicates that--- the system canceled the tracking of the finger. +---@class TouchPhase : ReflectReference +--- A phase of a [`TouchInput`]. +--- +--- ## Usage +--- +--- It is used to describe the phase of the touch input that is currently active. +--- This includes a phase that indicates that a touch input has started or ended, +--- or that a finger has moved. There is also a canceled phase that indicates that +--- the system canceled the tracking of the finger. TouchPhase = {} ----@package ---@param _self TouchPhase - ---@param other TouchPhase - ---@return boolean function TouchPhase:eq(_self,other) end ----@package ---@param _self TouchPhase - ---@return TouchPhase function TouchPhase:clone(_self) end ----@package ---@param _self TouchPhase - ----@return [] +---@return nil function TouchPhase:assert_receiver_is_total_eq(_self) end ----@class AspectRatio +---@class AspectRatio : ReflectReference --- An `AspectRatio` is the ratio of width to height. ---@field [1] ? number AspectRatio = {} ----@package ---@param _self AspectRatio - ---@return boolean function AspectRatio:is_landscape(_self) end ----@package ---@param _self AspectRatio - ---@param other AspectRatio - ---@return boolean function AspectRatio:eq(_self,other) end ----@package ---@param _self AspectRatio - ---@return number function AspectRatio:ratio(_self) end ----@package ---@param _self AspectRatio - ---@return boolean function AspectRatio:is_square(_self) end ----@package ---@param _self AspectRatio - ---@return boolean function AspectRatio:is_portrait(_self) end ----@package ---@param _self AspectRatio - ---@return AspectRatio function AspectRatio:inverse(_self) end ----@package ---@param _self AspectRatio - ---@return AspectRatio function AspectRatio:clone(_self) end ----@class Aabb2d +---@class Aabb2d : ReflectReference --- A 2D axis-aligned bounding box, or bounding rectangle ---@field min ? Vec2 ---@field max ? Vec2 Aabb2d = {} ----@package ---@param _self Aabb2d - ---@param other Aabb2d - ---@return boolean function Aabb2d:eq(_self,other) end ----@package ---@param _self Aabb2d - ---@param point Vec2 - ---@return Vec2 function Aabb2d:closest_point(_self,point) end ----@package ---@param center Vec2 - ---@param half_size Vec2 - ---@return Aabb2d function Aabb2d.new(center,half_size) end ----@package ---@param _self Aabb2d - ---@return BoundingCircle function Aabb2d:bounding_circle(_self) end ----@package ---@param _self Aabb2d - ---@return Aabb2d function Aabb2d:clone(_self) end ----@class BoundingCircle +---@class BoundingCircle : ReflectReference --- A bounding circle ---@field center ? Vec2 ---@field circle ? Circle BoundingCircle = {} ----@package ---@param _self BoundingCircle - ---@return number function BoundingCircle:radius(_self) end ----@package ---@param _self BoundingCircle - ---@return BoundingCircle function BoundingCircle:clone(_self) end ----@package ---@param _self BoundingCircle - ---@param point Vec2 - ---@return Vec2 function BoundingCircle:closest_point(_self,point) end ----@package ---@param center Vec2 - ---@param radius number - ---@return BoundingCircle function BoundingCircle.new(center,radius) end ----@package ---@param _self BoundingCircle - ---@return Aabb2d function BoundingCircle:aabb_2d(_self) end ----@package ---@param _self BoundingCircle - ---@param other BoundingCircle - ---@return boolean function BoundingCircle:eq(_self,other) end ----@class Aabb3d +---@class Aabb3d : ReflectReference --- A 3D axis-aligned bounding box ---@field min ? Vec3A ---@field max ? Vec3A Aabb3d = {} ----@package ---@param _self Aabb3d - ---@return Aabb3d function Aabb3d:clone(_self) end ----@package ---@param _self Aabb3d - ---@return BoundingSphere function Aabb3d:bounding_sphere(_self) end ----@package ---@param _self Aabb3d - ---@param other Aabb3d - ---@return boolean function Aabb3d:eq(_self,other) end ----@class BoundingSphere +---@class BoundingSphere : ReflectReference --- A bounding sphere ---@field center ? Vec3A ---@field sphere ? Sphere BoundingSphere = {} ----@package ---@param _self BoundingSphere - ---@param other BoundingSphere - ---@return boolean function BoundingSphere:eq(_self,other) end ----@package ---@param _self BoundingSphere - ---@return number function BoundingSphere:radius(_self) end ----@package ---@param _self BoundingSphere - ---@return BoundingSphere function BoundingSphere:clone(_self) end ----@package ---@param _self BoundingSphere - ---@return Aabb3d function BoundingSphere:aabb_3d(_self) end ----@class AabbCast2d +---@class AabbCast2d : ReflectReference --- An intersection test that casts an [`Aabb2d`] along a ray. ---@field ray ? RayCast2d ---@field aabb ? Aabb2d AabbCast2d = {} ----@package ---@param aabb Aabb2d - ---@param origin Vec2 - ---@param direction Dir2 - ---@param max number - ---@return AabbCast2d function AabbCast2d.new(aabb,origin,direction,max) end ----@package ---@param aabb Aabb2d - ---@param ray Ray2d - ---@param max number - ---@return AabbCast2d function AabbCast2d.from_ray(aabb,ray,max) end ----@package ---@param _self AabbCast2d - ---@param aabb Aabb2d - ---@return number | nil function AabbCast2d:aabb_collision_at(_self,aabb) end ----@package ---@param _self AabbCast2d - ---@return AabbCast2d function AabbCast2d:clone(_self) end ----@class BoundingCircleCast +---@class BoundingCircleCast : ReflectReference --- An intersection test that casts a [`BoundingCircle`] along a ray. ---@field ray ? RayCast2d ---@field circle ? BoundingCircle BoundingCircleCast = {} ----@package ---@param circle BoundingCircle - ---@param ray Ray2d - ---@param max number - ---@return BoundingCircleCast function BoundingCircleCast.from_ray(circle,ray,max) end ----@package ---@param circle BoundingCircle - ---@param origin Vec2 - ---@param direction Dir2 - ---@param max number - ---@return BoundingCircleCast function BoundingCircleCast.new(circle,origin,direction,max) end ----@package ---@param _self BoundingCircleCast - ---@param circle BoundingCircle - ---@return number | nil function BoundingCircleCast:circle_collision_at(_self,circle) end ----@package ---@param _self BoundingCircleCast - ---@return BoundingCircleCast function BoundingCircleCast:clone(_self) end ----@class RayCast2d +---@class RayCast2d : ReflectReference --- A raycast intersection test for 2D bounding volumes ---@field ray ? Ray2d ---@field max ? number ---@field direction_recip ? Vec2 RayCast2d = {} ----@package ---@param _self RayCast2d - ---@param aabb Aabb2d - ---@return number | nil function RayCast2d:aabb_intersection_at(_self,aabb) end ----@package ---@param ray Ray2d - ---@param max number - ---@return RayCast2d function RayCast2d.from_ray(ray,max) end ----@package ---@param _self RayCast2d - ---@return RayCast2d function RayCast2d:clone(_self) end ----@package ---@param origin Vec2 - ---@param direction Dir2 - ---@param max number - ---@return RayCast2d function RayCast2d.new(origin,direction,max) end ----@package ---@param _self RayCast2d - ---@return Vec2 function RayCast2d:direction_recip(_self) end ----@package ---@param _self RayCast2d - ---@param circle BoundingCircle - ---@return number | nil function RayCast2d:circle_intersection_at(_self,circle) end ----@class AabbCast3d +---@class AabbCast3d : ReflectReference --- An intersection test that casts an [`Aabb3d`] along a ray. ---@field ray ? RayCast3d ---@field aabb ? Aabb3d AabbCast3d = {} ----@package ---@param _self AabbCast3d - ---@param aabb Aabb3d - ---@return number | nil function AabbCast3d:aabb_collision_at(_self,aabb) end ----@package ---@param _self AabbCast3d - ---@return AabbCast3d function AabbCast3d:clone(_self) end ----@package ---@param aabb Aabb3d - ---@param ray Ray3d - ---@param max number - ---@return AabbCast3d function AabbCast3d.from_ray(aabb,ray,max) end ----@class BoundingSphereCast +---@class BoundingSphereCast : ReflectReference --- An intersection test that casts a [`BoundingSphere`] along a ray. ---@field ray ? RayCast3d ---@field sphere ? BoundingSphere BoundingSphereCast = {} ----@package ---@param sphere BoundingSphere - ---@param ray Ray3d - ---@param max number - ---@return BoundingSphereCast function BoundingSphereCast.from_ray(sphere,ray,max) end ----@package ---@param _self BoundingSphereCast - ---@return BoundingSphereCast function BoundingSphereCast:clone(_self) end ----@package ---@param _self BoundingSphereCast - ---@param sphere BoundingSphere - ---@return number | nil function BoundingSphereCast:sphere_collision_at(_self,sphere) end ----@class RayCast3d +---@class RayCast3d : ReflectReference --- A raycast intersection test for 3D bounding volumes ---@field origin ? Vec3A ---@field direction ? Dir3A @@ -3987,3254 +3823,2684 @@ function BoundingSphereCast:sphere_collision_at(_self,sphere) end ---@field direction_recip ? Vec3A RayCast3d = {} ----@package ---@param ray Ray3d - ---@param max number - ---@return RayCast3d function RayCast3d.from_ray(ray,max) end ----@package ---@param _self RayCast3d - ---@return Vec3A function RayCast3d:direction_recip(_self) end ----@package ---@param _self RayCast3d - ---@param sphere BoundingSphere - ---@return number | nil function RayCast3d:sphere_intersection_at(_self,sphere) end ----@package ---@param _self RayCast3d - ---@return RayCast3d function RayCast3d:clone(_self) end ----@package ---@param _self RayCast3d - ---@param aabb Aabb3d - ---@return number | nil function RayCast3d:aabb_intersection_at(_self,aabb) end ----@class CompassOctant ---- A compass enum with 8 directions.--- ```text--- N (North)--- ▲--- NW │ NE--- ╲ │ ╱--- W (West) ┼─────► E (East)--- ╱ │ ╲--- SW │ SE--- ▼--- S (South)--- ``` +---@class CompassOctant : ReflectReference +--- A compass enum with 8 directions. +--- ```text +--- N (North) +--- ▲ +--- NW │ NE +--- ╲ │ ╱ +--- W (West) ┼─────► E (East) +--- ╱ │ ╲ +--- SW │ SE +--- ▼ +--- S (South) +--- ``` CompassOctant = {} ----@package ---@param _self CompassOctant - ---@return integer function CompassOctant:to_index(_self) end ----@package ---@param _self CompassOctant - ---@return CompassOctant function CompassOctant:opposite(_self) end ----@package ---@param _self CompassOctant - ---@return CompassOctant function CompassOctant:clone(_self) end ----@package ---@param _self CompassOctant - ---@param other CompassOctant - ---@return boolean function CompassOctant:eq(_self,other) end ----@package ---@param _self CompassOctant - ---@return CompassOctant function CompassOctant:neg(_self) end ----@package ---@param _self CompassOctant - ----@return [] +---@return nil function CompassOctant:assert_receiver_is_total_eq(_self) end ----@class CompassQuadrant ---- A compass enum with 4 directions.--- ```text--- N (North)--- ▲--- │--- │--- W (West) ┼─────► E (East)--- │--- │--- ▼--- S (South)--- ``` +---@class CompassQuadrant : ReflectReference +--- A compass enum with 4 directions. +--- ```text +--- N (North) +--- ▲ +--- │ +--- │ +--- W (West) ┼─────► E (East) +--- │ +--- │ +--- ▼ +--- S (South) +--- ``` CompassQuadrant = {} ----@package ---@param _self CompassQuadrant - ---@return integer function CompassQuadrant:to_index(_self) end ----@package ---@param _self CompassQuadrant - ---@param other CompassQuadrant - ---@return boolean function CompassQuadrant:eq(_self,other) end ----@package ---@param _self CompassQuadrant - ---@return CompassQuadrant function CompassQuadrant:opposite(_self) end ----@package ---@param _self CompassQuadrant - ---@return CompassQuadrant function CompassQuadrant:clone(_self) end ----@package ---@param _self CompassQuadrant - ---@return CompassQuadrant function CompassQuadrant:neg(_self) end ----@package ---@param _self CompassQuadrant - ----@return [] +---@return nil function CompassQuadrant:assert_receiver_is_total_eq(_self) end ----@class EaseFunction ---- Curve functions over the [unit interval], commonly used for easing transitions.--- --- `EaseFunction` can be used on its own to interpolate between `0.0` and `1.0`.--- It can also be combined with [`EasingCurve`] to interpolate between other--- intervals and types, including vectors and rotations.--- --- # Example--- --- [`sample`] the smoothstep function at various points. This will return `None`--- if the parameter is outside the unit interval.--- --- ```--- # use bevy_math::prelude::*;--- let f = EaseFunction::SmoothStep;--- --- assert_eq!(f.sample(-1.0), None);--- assert_eq!(f.sample(0.0), Some(0.0));--- assert_eq!(f.sample(0.5), Some(0.5));--- assert_eq!(f.sample(1.0), Some(1.0));--- assert_eq!(f.sample(2.0), None);--- ```--- --- [`sample_clamped`] will clamp the parameter to the unit interval, so it--- always returns a value.--- --- ```--- # use bevy_math::prelude::*;--- # let f = EaseFunction::SmoothStep;--- assert_eq!(f.sample_clamped(-1.0), 0.0);--- assert_eq!(f.sample_clamped(0.0), 0.0);--- assert_eq!(f.sample_clamped(0.5), 0.5);--- assert_eq!(f.sample_clamped(1.0), 1.0);--- assert_eq!(f.sample_clamped(2.0), 1.0);--- ```--- --- [`sample`]: EaseFunction::sample--- [`sample_clamped`]: EaseFunction::sample_clamped--- [unit interval]: `Interval::UNIT` +---@class EaseFunction : ReflectReference +--- Curve functions over the [unit interval], commonly used for easing transitions. +--- +--- `EaseFunction` can be used on its own to interpolate between `0.0` and `1.0`. +--- It can also be combined with [`EasingCurve`] to interpolate between other +--- intervals and types, including vectors and rotations. +--- +--- # Example +--- +--- [`sample`] the smoothstep function at various points. This will return `None` +--- if the parameter is outside the unit interval. +--- +--- ``` +--- # use bevy_math::prelude::*; +--- let f = EaseFunction::SmoothStep; +--- +--- assert_eq!(f.sample(-1.0), None); +--- assert_eq!(f.sample(0.0), Some(0.0)); +--- assert_eq!(f.sample(0.5), Some(0.5)); +--- assert_eq!(f.sample(1.0), Some(1.0)); +--- assert_eq!(f.sample(2.0), None); +--- ``` +--- +--- [`sample_clamped`] will clamp the parameter to the unit interval, so it +--- always returns a value. +--- +--- ``` +--- # use bevy_math::prelude::*; +--- # let f = EaseFunction::SmoothStep; +--- assert_eq!(f.sample_clamped(-1.0), 0.0); +--- assert_eq!(f.sample_clamped(0.0), 0.0); +--- assert_eq!(f.sample_clamped(0.5), 0.5); +--- assert_eq!(f.sample_clamped(1.0), 1.0); +--- assert_eq!(f.sample_clamped(2.0), 1.0); +--- ``` +--- +--- [`sample`]: EaseFunction::sample +--- [`sample_clamped`]: EaseFunction::sample_clamped +--- [unit interval]: `Interval::UNIT` EaseFunction = {} ----@package ---@param _self EaseFunction - ---@return EaseFunction function EaseFunction:clone(_self) end ----@package ---@param _self EaseFunction - ---@param other EaseFunction - ---@return boolean function EaseFunction:eq(_self,other) end ----@class JumpAt ---- Configuration options for the [`EaseFunction::Steps`] curves. This closely replicates the--- [CSS step function specification].--- --- [CSS step function specification]: https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#description +---@class JumpAt : ReflectReference +--- Configuration options for the [`EaseFunction::Steps`] curves. This closely replicates the +--- [CSS step function specification]. +--- +--- [CSS step function specification]: https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#description JumpAt = {} ----@package ---@param _self JumpAt - ----@return [] +---@return nil function JumpAt:assert_receiver_is_total_eq(_self) end ----@package ---@param _self JumpAt - ---@param other JumpAt - ---@return boolean function JumpAt:eq(_self,other) end ----@package ---@param _self JumpAt - ---@return JumpAt function JumpAt:clone(_self) end ----@class Interval ---- A nonempty closed interval, possibly unbounded in either direction.--- --- In other words, the interval may stretch all the way to positive or negative infinity, but it--- will always have some nonempty interior. +---@class Interval : ReflectReference +--- A nonempty closed interval, possibly unbounded in either direction. +--- +--- In other words, the interval may stretch all the way to positive or negative infinity, but it +--- will always have some nonempty interior. ---@field start ? number ---@field end ? number Interval = {} ----@package ---@param _self Interval - ---@param other Interval - ---@return boolean function Interval:eq(_self,other) end ----@package ---@param _self Interval - ---@return boolean function Interval:has_finite_start(_self) end ----@package ---@param _self Interval - ---@param value number - ---@return number function Interval:clamp(_self,value) end ----@package ---@param _self Interval - ---@return number function Interval:length(_self) end ----@package ---@param _self Interval - ---@return boolean function Interval:has_finite_end(_self) end ----@package ---@param _self Interval - ---@return boolean function Interval:is_bounded(_self) end ----@package ---@param _self Interval - ---@param item number - ---@return boolean function Interval:contains(_self,item) end ----@package ----@param _self Interval +---@param _self Interval ---@return Interval function Interval:clone(_self) end ----@package ---@param _self Interval - ---@return number function Interval:start(_self) end ----@package ---@param _self Interval - ---@param other Interval - ---@return boolean function Interval:contains_interval(_self,other) end ----@class Dir2 +---@class Dir2 : ReflectReference --- A normalized vector pointing in a direction in 2D space ---@field [1] ? Vec2 Dir2 = {} ----@package ---@param _self Dir2 - ---@param rhs number - ---@return Vec2 function Dir2:mul(_self,rhs) end ----@package ---@param _self Dir2 - ---@param rhs Dir2 - ---@param s number - ---@return Dir2 function Dir2:slerp(_self,rhs,s) end ----@package ---@param _self Dir2 - ---@return Dir2 function Dir2:fast_renormalize(_self) end ----@package ---@param _self Dir2 - ---@return Vec2 function Dir2:as_vec2(_self) end ----@package ---@param _self Dir2 - ---@return Rot2 function Dir2:rotation_to_x(_self) end ----@package ---@param _self Dir2 - ---@return Dir2 function Dir2:clone(_self) end ----@package ---@param _self Dir2 - ---@return Rot2 function Dir2:rotation_from_x(_self) end ----@package ---@param _self Dir2 - ---@return Dir2 function Dir2:neg(_self) end ----@package ---@param x number - ---@param y number - ---@return Dir2 function Dir2.from_xy_unchecked(x,y) end ----@package ---@param _self Dir2 - ---@param other Dir2 - ---@return boolean function Dir2:eq(_self,other) end ----@package ---@param value Vec2 - ---@return Dir2 function Dir2.new_unchecked(value) end ----@package ---@param _self Dir2 - ---@return Rot2 function Dir2:rotation_from_y(_self) end ----@package ---@param _self Dir2 - ---@return Rot2 function Dir2:rotation_to_y(_self) end ----@package ---@param _self Dir2 - ---@param other Dir2 - ---@return Rot2 function Dir2:rotation_from(_self,other) end ----@package ---@param _self Dir2 - ---@param other Dir2 - ---@return Rot2 function Dir2:rotation_to(_self,other) end ----@class Dir3 +---@class Dir3 : ReflectReference --- A normalized vector pointing in a direction in 3D space ---@field [1] ? Vec3 Dir3 = {} ----@package ---@param value Vec3 - ---@return Dir3 function Dir3.new_unchecked(value) end ----@package ---@param _self Dir3 - ---@return Dir3 function Dir3:neg(_self) end ----@package ---@param _self Dir3 - ---@param rhs Dir3 - ---@param s number - ---@return Dir3 function Dir3:slerp(_self,rhs,s) end ----@package ---@param _self Dir3 - ---@param rhs number - ---@return Vec3 function Dir3:mul(_self,rhs) end ----@package ---@param _self Dir3 - ---@return Dir3 function Dir3:clone(_self) end ----@package ---@param _self Dir3 - ---@return Vec3 function Dir3:as_vec3(_self) end ----@package ---@param _self Dir3 - ---@return Dir3 function Dir3:fast_renormalize(_self) end ----@package ---@param _self Dir3 - ---@param other Dir3 - ---@return boolean function Dir3:eq(_self,other) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@return Dir3 function Dir3.from_xyz_unchecked(x,y,z) end ----@class Dir3A ---- A normalized SIMD vector pointing in a direction in 3D space.--- --- This type stores a 16 byte aligned [`Vec3A`].--- This may or may not be faster than [`Dir3`]: make sure to benchmark! +---@class Dir3A : ReflectReference +--- A normalized SIMD vector pointing in a direction in 3D space. +--- +--- This type stores a 16 byte aligned [`Vec3A`]. +--- This may or may not be faster than [`Dir3`]: make sure to benchmark! ---@field [1] ? Vec3A Dir3A = {} ----@package ---@param _self Dir3A - ---@return Dir3A function Dir3A:fast_renormalize(_self) end ----@package ---@param _self Dir3A - ---@return Vec3A function Dir3A:as_vec3a(_self) end ----@package ---@param _self Dir3A - ---@param rhs Dir3A - ---@param s number - ---@return Dir3A function Dir3A:slerp(_self,rhs,s) end ----@package ---@param value Vec3A - ---@return Dir3A function Dir3A.new_unchecked(value) end ----@package ---@param _self Dir3A - ---@return Dir3A function Dir3A:clone(_self) end ----@package ---@param _self Dir3A - ---@param other Dir3A - ---@return boolean function Dir3A:eq(_self,other) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@return Dir3A function Dir3A.from_xyz_unchecked(x,y,z) end ----@package ---@param _self Dir3A - ---@param rhs number - ---@return Vec3A function Dir3A:mul(_self,rhs) end ----@package ---@param _self Dir3A - ---@return Dir3A function Dir3A:neg(_self) end ----@class FloatOrd ---- A wrapper for floats that implements [`Ord`], [`Eq`], and [`Hash`] traits.--- --- This is a work around for the fact that the IEEE 754-2008 standard,--- implemented by Rust's [`f32`] type,--- doesn't define an ordering for [`NaN`](f32::NAN),--- and `NaN` is not considered equal to any other `NaN`.--- --- Wrapping a float with `FloatOrd` breaks conformance with the standard--- by sorting `NaN` as less than all other numbers and equal to any other `NaN`. +---@class FloatOrd : ReflectReference +--- A wrapper for floats that implements [`Ord`], [`Eq`], and [`Hash`] traits. +--- +--- This is a work around for the fact that the IEEE 754-2008 standard, +--- implemented by Rust's [`f32`] type, +--- doesn't define an ordering for [`NaN`](f32::NAN), +--- and `NaN` is not considered equal to any other `NaN`. +--- +--- Wrapping a float with `FloatOrd` breaks conformance with the standard +--- by sorting `NaN` as less than all other numbers and equal to any other `NaN`. ---@field [1] ? number FloatOrd = {} ----@package ---@param _self FloatOrd - ---@param other FloatOrd - ---@return boolean function FloatOrd:eq(_self,other) end ----@package ---@param _self FloatOrd - ---@param other FloatOrd - ---@return boolean function FloatOrd:lt(_self,other) end ----@package ---@param _self FloatOrd - ---@return FloatOrd function FloatOrd:neg(_self) end ----@package ---@param _self FloatOrd - ---@param other FloatOrd - ---@return boolean function FloatOrd:ge(_self,other) end ----@package ---@param _self FloatOrd - ---@param other FloatOrd - ---@return boolean function FloatOrd:le(_self,other) end ----@package ---@param _self FloatOrd - ---@return FloatOrd function FloatOrd:clone(_self) end ----@package ---@param _self FloatOrd - ---@param other FloatOrd - ---@return boolean function FloatOrd:gt(_self,other) end ----@class Isometry2d ---- An isometry in two dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(2). This includes translation and rotation, but excludes reflection.--- --- For the three-dimensional version, see [`Isometry3d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_abs_diff_eq;--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- let point = Vec2::new(4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_eq!(result, Vec2::new(-2.0, 5.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- # let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0));--- # let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- # let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry2d, Rot2, Vec2};--- #--- let circle_iso = Isometry2d::from_translation(Vec2::new(2.0, 1.0));--- let rectangle_iso = Isometry2d::from_rotation(Rot2::degrees(90.0));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = circle_iso.inverse() * rectangle_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = circle_iso.inverse_mul(rectangle_iso);--- ``` +---@class Isometry2d : ReflectReference +--- An isometry in two dimensions, representing a rotation followed by a translation. +--- This can often be useful for expressing relative positions and transformations from one position to another. +--- +--- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*, +--- and belongs to the special [Euclidean group] SE(2). This includes translation and rotation, but excludes reflection. +--- +--- For the three-dimensional version, see [`Isometry3d`]. +--- +--- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group +--- +--- # Example +--- +--- Isometries can be created from a given translation and rotation: +--- +--- ``` +--- # use bevy_math::{Isometry2d, Rot2, Vec2}; +--- # +--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0)); +--- ``` +--- +--- Or from separate parts: +--- +--- ``` +--- # use bevy_math::{Isometry2d, Rot2, Vec2}; +--- # +--- let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0)); +--- let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0)); +--- ``` +--- +--- The isometries can be used to transform points: +--- +--- ``` +--- # use approx::assert_abs_diff_eq; +--- # use bevy_math::{Isometry2d, Rot2, Vec2}; +--- # +--- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0)); +--- let point = Vec2::new(4.0, 4.0); +--- +--- // These are equivalent +--- let result = iso.transform_point(point); +--- let result = iso * point; +--- +--- assert_eq!(result, Vec2::new(-2.0, 5.0)); +--- ``` +--- +--- Isometries can also be composed together: +--- +--- ``` +--- # use bevy_math::{Isometry2d, Rot2, Vec2}; +--- # +--- # let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0)); +--- # let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0)); +--- # let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0)); +--- # +--- assert_eq!(iso1 * iso2, iso); +--- ``` +--- +--- One common operation is to compute an isometry representing the relative positions of two objects +--- for things like intersection tests. This can be done with an inverse transformation: +--- +--- ``` +--- # use bevy_math::{Isometry2d, Rot2, Vec2}; +--- # +--- let circle_iso = Isometry2d::from_translation(Vec2::new(2.0, 1.0)); +--- let rectangle_iso = Isometry2d::from_rotation(Rot2::degrees(90.0)); +--- +--- // Compute the relative position and orientation between the two shapes +--- let relative_iso = circle_iso.inverse() * rectangle_iso; +--- +--- // Or alternatively, to skip an extra rotation operation: +--- let relative_iso = circle_iso.inverse_mul(rectangle_iso); +--- ``` ---@field rotation ? Rot2 ---@field translation ? Vec2 Isometry2d = {} ----@package ---@param translation Vec2 - ---@param rotation Rot2 - ---@return Isometry2d function Isometry2d.new(translation,rotation) end ----@package ---@param rotation Rot2 - ---@return Isometry2d function Isometry2d.from_rotation(rotation) end ----@package ---@param x number - ---@param y number - ---@return Isometry2d function Isometry2d.from_xy(x,y) end ----@package ---@param _self Isometry2d - ---@return Isometry2d function Isometry2d:clone(_self) end ----@package ---@param _self Isometry2d - ---@param point Vec2 - ---@return Vec2 function Isometry2d:transform_point(_self,point) end ----@package ---@param _self Isometry2d - ---@return Isometry2d function Isometry2d:inverse(_self) end ----@package ---@param translation Vec2 - ---@return Isometry2d function Isometry2d.from_translation(translation) end ----@package ----@param _self Isometry2d +---@param p1 Isometry2d +---@param p2 Dir2 +---@return Dir2 +function Isometry2d:mul(p1,p2) end +---@param _self Isometry2d ---@param point Vec2 - ---@return Vec2 function Isometry2d:inverse_transform_point(_self,point) end ----@package ---@param _self Isometry2d - ---@param rhs Isometry2d - ---@return Isometry2d function Isometry2d:mul(_self,rhs) end ----@package ---@param _self Isometry2d - ---@param rhs Isometry2d - ---@return Isometry2d function Isometry2d:inverse_mul(_self,rhs) end ----@package ---@param _self Isometry2d - ---@param other Isometry2d - ---@return boolean function Isometry2d:eq(_self,other) end - ----@class Isometry3d ---- An isometry in three dimensions, representing a rotation followed by a translation.--- This can often be useful for expressing relative positions and transformations from one position to another.--- --- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*,--- and belongs to the special [Euclidean group] SE(3). This includes translation and rotation, but excludes reflection.--- --- For the two-dimensional version, see [`Isometry2d`].--- --- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group--- --- # Example--- --- Isometries can be created from a given translation and rotation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- Or from separate parts:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- ```--- --- The isometries can be used to transform points:--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- let point = Vec3::new(4.0, 4.0, 4.0);--- --- // These are equivalent--- let result = iso.transform_point(point);--- let result = iso * point;--- --- assert_relative_eq!(result, Vec3::new(-2.0, 5.0, 7.0));--- ```--- --- Isometries can also be composed together:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- # let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2));--- # let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- # let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- #--- assert_eq!(iso1 * iso2, iso);--- ```--- --- One common operation is to compute an isometry representing the relative positions of two objects--- for things like intersection tests. This can be done with an inverse transformation:--- --- ```--- # use bevy_math::{Isometry3d, Quat, Vec3};--- # use std::f32::consts::FRAC_PI_2;--- #--- let sphere_iso = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0));--- let cuboid_iso = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2));--- --- // Compute the relative position and orientation between the two shapes--- let relative_iso = sphere_iso.inverse() * cuboid_iso;--- --- // Or alternatively, to skip an extra rotation operation:--- let relative_iso = sphere_iso.inverse_mul(cuboid_iso);--- ``` +---@param p1 Isometry2d +---@param p2 Vec2 +---@return Vec2 +function Isometry2d:mul(p1,p2) end + + +---@class Isometry3d : ReflectReference +--- An isometry in three dimensions, representing a rotation followed by a translation. +--- This can often be useful for expressing relative positions and transformations from one position to another. +--- +--- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*, +--- and belongs to the special [Euclidean group] SE(3). This includes translation and rotation, but excludes reflection. +--- +--- For the two-dimensional version, see [`Isometry2d`]. +--- +--- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group +--- +--- # Example +--- +--- Isometries can be created from a given translation and rotation: +--- +--- ``` +--- # use bevy_math::{Isometry3d, Quat, Vec3}; +--- # use std::f32::consts::FRAC_PI_2; +--- # +--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2)); +--- ``` +--- +--- Or from separate parts: +--- +--- ``` +--- # use bevy_math::{Isometry3d, Quat, Vec3}; +--- # use std::f32::consts::FRAC_PI_2; +--- # +--- let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0)); +--- let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2)); +--- ``` +--- +--- The isometries can be used to transform points: +--- +--- ``` +--- # use approx::assert_relative_eq; +--- # use bevy_math::{Isometry3d, Quat, Vec3}; +--- # use std::f32::consts::FRAC_PI_2; +--- # +--- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2)); +--- let point = Vec3::new(4.0, 4.0, 4.0); +--- +--- // These are equivalent +--- let result = iso.transform_point(point); +--- let result = iso * point; +--- +--- assert_relative_eq!(result, Vec3::new(-2.0, 5.0, 7.0)); +--- ``` +--- +--- Isometries can also be composed together: +--- +--- ``` +--- # use bevy_math::{Isometry3d, Quat, Vec3}; +--- # use std::f32::consts::FRAC_PI_2; +--- # +--- # let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2)); +--- # let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0)); +--- # let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2)); +--- # +--- assert_eq!(iso1 * iso2, iso); +--- ``` +--- +--- One common operation is to compute an isometry representing the relative positions of two objects +--- for things like intersection tests. This can be done with an inverse transformation: +--- +--- ``` +--- # use bevy_math::{Isometry3d, Quat, Vec3}; +--- # use std::f32::consts::FRAC_PI_2; +--- # +--- let sphere_iso = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0)); +--- let cuboid_iso = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2)); +--- +--- // Compute the relative position and orientation between the two shapes +--- let relative_iso = sphere_iso.inverse() * cuboid_iso; +--- +--- // Or alternatively, to skip an extra rotation operation: +--- let relative_iso = sphere_iso.inverse_mul(cuboid_iso); +--- ``` ---@field rotation ? Quat ---@field translation ? Vec3A Isometry3d = {} ----@package ---@param x number - ---@param y number - ---@param z number - ---@return Isometry3d function Isometry3d.from_xyz(x,y,z) end ----@package ---@param rotation Quat - ---@return Isometry3d function Isometry3d.from_rotation(rotation) end ----@package ---@param _self Isometry3d - ---@param other Isometry3d - ---@return boolean function Isometry3d:eq(_self,other) end ----@package ---@param _self Isometry3d - ---@param rhs Isometry3d - ---@return Isometry3d function Isometry3d:mul(_self,rhs) end ----@package ---@param _self Isometry3d - ---@param rhs Isometry3d - ---@return Isometry3d function Isometry3d:inverse_mul(_self,rhs) end ----@package ---@param _self Isometry3d - ---@return Isometry3d function Isometry3d:inverse(_self) end ----@package ----@param _self Isometry3d +---@param p1 Isometry3d +---@param p2 Vec3A +---@return Vec3A +function Isometry3d:mul(p1,p2) end +---@param p1 Isometry3d +---@param p2 Vec3 +---@return Vec3 +function Isometry3d:mul(p1,p2) end + +---@param _self Isometry3d ---@return Isometry3d function Isometry3d:clone(_self) end +---@param p1 Isometry3d +---@param p2 Dir3 +---@return Dir3 +function Isometry3d:mul(p1,p2) end + ----@class Annulus +---@class Annulus : ReflectReference --- A primitive shape formed by the region between two circles, also known as a ring. ---@field inner_circle ? Circle ---@field outer_circle ? Circle Annulus = {} ----@package ---@param _self Annulus - ---@return number function Annulus:thickness(_self) end ----@package ---@param _self Annulus - ---@return number function Annulus:diameter(_self) end ----@package ---@param inner_radius number - ---@param outer_radius number - ---@return Annulus function Annulus.new(inner_radius,outer_radius) end ----@package ---@param _self Annulus - ---@param point Vec2 - ---@return Vec2 function Annulus:closest_point(_self,point) end ----@package ---@param _self Annulus - ---@return Annulus function Annulus:clone(_self) end ----@package ---@param _self Annulus - ---@param other Annulus - ---@return boolean function Annulus:eq(_self,other) end ----@class Arc2d ---- A primitive representing an arc between two points on a circle.--- --- An arc has no area.--- If you want to include the portion of a circle's area swept out by the arc,--- use the pie-shaped [`CircularSector`].--- If you want to include only the space inside the convex hull of the arc,--- use the bowl-shaped [`CircularSegment`].--- --- The arc is drawn starting from [`Vec2::Y`], extending by `half_angle` radians on--- either side. The center of the circle is the origin [`Vec2::ZERO`]. Note that this--- means that the origin may not be within the `Arc2d`'s convex hull.--- --- **Warning:** Arcs with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- It is recommended to normalize arcs to have an angle in [0, 2π]. +---@class Arc2d : ReflectReference +--- A primitive representing an arc between two points on a circle. +--- +--- An arc has no area. +--- If you want to include the portion of a circle's area swept out by the arc, +--- use the pie-shaped [`CircularSector`]. +--- If you want to include only the space inside the convex hull of the arc, +--- use the bowl-shaped [`CircularSegment`]. +--- +--- The arc is drawn starting from [`Vec2::Y`], extending by `half_angle` radians on +--- either side. The center of the circle is the origin [`Vec2::ZERO`]. Note that this +--- means that the origin may not be within the `Arc2d`'s convex hull. +--- +--- **Warning:** Arcs with negative angle or radius, or with angle greater than an entire circle, are not officially supported. +--- It is recommended to normalize arcs to have an angle in [0, 2π]. ---@field radius ? number ---@field half_angle ? number Arc2d = {} ----@package ---@param _self Arc2d - ---@return Arc2d function Arc2d:clone(_self) end ----@package ---@param _self Arc2d - ---@return boolean function Arc2d:is_major(_self) end ----@package ---@param _self Arc2d - ---@return number function Arc2d:angle(_self) end ----@package ---@param _self Arc2d - ---@return number function Arc2d:length(_self) end ----@package ---@param _self Arc2d - ---@param other Arc2d - ---@return boolean function Arc2d:eq(_self,other) end ----@package ---@param _self Arc2d - ---@return boolean function Arc2d:is_minor(_self) end ----@package ---@param radius number - ---@param angle number - ---@return Arc2d function Arc2d.from_degrees(radius,angle) end ----@package ---@param _self Arc2d - ---@return Vec2 function Arc2d:chord_midpoint(_self) end ----@package ---@param _self Arc2d - ---@return Vec2 function Arc2d:midpoint(_self) end ----@package ---@param _self Arc2d - ---@return number function Arc2d:apothem(_self) end ----@package ---@param _self Arc2d - ---@return number function Arc2d:chord_length(_self) end ----@package ---@param _self Arc2d - ---@return Vec2 function Arc2d:right_endpoint(_self) end ----@package ---@param _self Arc2d - ---@return Vec2 function Arc2d:left_endpoint(_self) end ----@package ---@param _self Arc2d - ---@return number function Arc2d:sagitta(_self) end ----@package ---@param radius number - ---@param angle number - ---@return Arc2d function Arc2d.from_radians(radius,angle) end ----@package ---@param radius number - ---@param half_angle number - ---@return Arc2d function Arc2d.new(radius,half_angle) end ----@package ---@param _self Arc2d - ---@return number function Arc2d:half_chord_length(_self) end ----@package ---@param radius number - ---@param fraction number - ---@return Arc2d function Arc2d.from_turns(radius,fraction) end ----@class Capsule2d ---- A 2D capsule primitive, also known as a stadium or pill shape.--- --- A two-dimensional capsule is defined as a neighborhood of points at a distance (radius) from a line +---@class Capsule2d : ReflectReference +--- A 2D capsule primitive, also known as a stadium or pill shape. +--- +--- A two-dimensional capsule is defined as a neighborhood of points at a distance (radius) from a line ---@field radius ? number ---@field half_length ? number Capsule2d = {} ----@package ---@param _self Capsule2d - ---@return Rectangle function Capsule2d:to_inner_rectangle(_self) end ----@package ---@param radius number - ---@param length number - ---@return Capsule2d function Capsule2d.new(radius,length) end ----@package ---@param _self Capsule2d - ---@param other Capsule2d - ---@return boolean function Capsule2d:eq(_self,other) end ----@package ---@param _self Capsule2d - ---@return Capsule2d function Capsule2d:clone(_self) end ----@class Circle +---@class Circle : ReflectReference --- A circle primitive, representing the set of points some distance from the origin ---@field radius ? number Circle = {} ----@package ---@param _self Circle - ---@param other Circle - ---@return boolean function Circle:eq(_self,other) end ----@package ---@param _self Circle - ---@return number function Circle:diameter(_self) end ----@package ---@param _self Circle - ---@param point Vec2 - ---@return Vec2 function Circle:closest_point(_self,point) end ----@package ---@param radius number - ---@return Circle function Circle.new(radius) end ----@package ---@param _self Circle - ---@return Circle function Circle:clone(_self) end ----@class CircularSector ---- A primitive representing a circular sector: a pie slice of a circle.--- --- The segment is positioned so that it always includes [`Vec2::Y`] and is vertically symmetrical.--- To orient the sector differently, apply a rotation.--- The sector is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- --- **Warning:** Circular sectors with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular sectors to have an angle in [0, 2π]. +---@class CircularSector : ReflectReference +--- A primitive representing a circular sector: a pie slice of a circle. +--- +--- The segment is positioned so that it always includes [`Vec2::Y`] and is vertically symmetrical. +--- To orient the sector differently, apply a rotation. +--- The sector is drawn with the center of its circle at the origin [`Vec2::ZERO`]. +--- +--- **Warning:** Circular sectors with negative angle or radius, or with angle greater than an entire circle, are not officially supported. +--- We recommend normalizing circular sectors to have an angle in [0, 2π]. ---@field arc ? Arc2d CircularSector = {} ----@package ---@param _self CircularSector - ---@return number function CircularSector:sagitta(_self) end ----@package ---@param _self CircularSector - ---@return number function CircularSector:angle(_self) end ----@package ---@param _self CircularSector - ---@param other CircularSector - ---@return boolean function CircularSector:eq(_self,other) end ----@package ---@param _self CircularSector - ---@return number function CircularSector:apothem(_self) end ----@package ---@param _self CircularSector - ---@return Vec2 function CircularSector:chord_midpoint(_self) end ----@package ---@param _self CircularSector - ---@return CircularSector function CircularSector:clone(_self) end ----@package ---@param radius number - ---@param angle number - ---@return CircularSector function CircularSector.new(radius,angle) end ----@package ---@param _self CircularSector - ---@return number function CircularSector:half_angle(_self) end ----@package ---@param _self CircularSector - ---@return number function CircularSector:arc_length(_self) end ----@package ---@param _self CircularSector - ---@return number function CircularSector:chord_length(_self) end ----@package ---@param _self CircularSector - ---@return number function CircularSector:radius(_self) end ----@package ---@param radius number - ---@param angle number - ---@return CircularSector function CircularSector.from_radians(radius,angle) end ----@package ---@param radius number - ---@param angle number - ---@return CircularSector function CircularSector.from_degrees(radius,angle) end ----@package ---@param _self CircularSector - ---@return number function CircularSector:half_chord_length(_self) end ----@package ---@param radius number - ---@param fraction number - ---@return CircularSector function CircularSector.from_turns(radius,fraction) end ----@class CircularSegment ---- A primitive representing a circular segment:--- the area enclosed by the arc of a circle and its chord (the line between its endpoints).--- --- The segment is drawn starting from [`Vec2::Y`], extending equally on either side.--- To orient the segment differently, apply a rotation.--- The segment is drawn with the center of its circle at the origin [`Vec2::ZERO`].--- When positioning a segment, the [`apothem`](Self::apothem) function may be particularly useful.--- --- **Warning:** Circular segments with negative angle or radius, or with angle greater than an entire circle, are not officially supported.--- We recommend normalizing circular segments to have an angle in [0, 2π]. +---@class CircularSegment : ReflectReference +--- A primitive representing a circular segment: +--- the area enclosed by the arc of a circle and its chord (the line between its endpoints). +--- +--- The segment is drawn starting from [`Vec2::Y`], extending equally on either side. +--- To orient the segment differently, apply a rotation. +--- The segment is drawn with the center of its circle at the origin [`Vec2::ZERO`]. +--- When positioning a segment, the [`apothem`](Self::apothem) function may be particularly useful. +--- +--- **Warning:** Circular segments with negative angle or radius, or with angle greater than an entire circle, are not officially supported. +--- We recommend normalizing circular segments to have an angle in [0, 2π]. ---@field arc ? Arc2d CircularSegment = {} ----@package ---@param radius number - ---@param angle number - ---@return CircularSegment function CircularSegment.from_degrees(radius,angle) end ----@package ---@param _self CircularSegment - ---@return Vec2 function CircularSegment:chord_midpoint(_self) end ----@package ---@param _self CircularSegment - ---@return number function CircularSegment:chord_length(_self) end ----@package ---@param _self CircularSegment - ---@param other CircularSegment - ---@return boolean function CircularSegment:eq(_self,other) end ----@package ---@param _self CircularSegment - ---@return number function CircularSegment:radius(_self) end ----@package ---@param _self CircularSegment - ---@return number function CircularSegment:half_angle(_self) end ----@package ---@param _self CircularSegment - ---@return number function CircularSegment:apothem(_self) end ----@package ---@param _self CircularSegment - ---@return number function CircularSegment:angle(_self) end ----@package ---@param _self CircularSegment - ---@return CircularSegment function CircularSegment:clone(_self) end ----@package ---@param radius number - ---@param fraction number - ---@return CircularSegment function CircularSegment.from_turns(radius,fraction) end ----@package ---@param radius number - ---@param angle number - ---@return CircularSegment function CircularSegment.from_radians(radius,angle) end ----@package ---@param _self CircularSegment - ---@return number function CircularSegment:arc_length(_self) end ----@package ---@param _self CircularSegment - ---@return number function CircularSegment:half_chord_length(_self) end ----@package ---@param _self CircularSegment - ---@return number function CircularSegment:sagitta(_self) end ----@package ---@param radius number - ---@param angle number - ---@return CircularSegment function CircularSegment.new(radius,angle) end ----@class Ellipse +---@class Ellipse : ReflectReference --- An ellipse primitive, which is like a circle, but the width and height can be different ---@field half_size ? Vec2 Ellipse = {} ----@package ---@param _self Ellipse - ---@return number function Ellipse:focal_length(_self) end ----@package ---@param _self Ellipse - ---@param other Ellipse - ---@return boolean function Ellipse:eq(_self,other) end ----@package ---@param half_width number - ---@param half_height number - ---@return Ellipse function Ellipse.new(half_width,half_height) end ----@package ---@param size Vec2 - ---@return Ellipse function Ellipse.from_size(size) end ----@package ---@param _self Ellipse - ---@return number function Ellipse:semi_major(_self) end ----@package ---@param _self Ellipse - ---@return number function Ellipse:eccentricity(_self) end ----@package ---@param _self Ellipse - ---@return number function Ellipse:semi_minor(_self) end ----@package ---@param _self Ellipse - ---@return Ellipse function Ellipse:clone(_self) end ----@class Line2d ---- An infinite line going through the origin along a direction in 2D space.--- --- For a finite line: [`Segment2d`] +---@class Line2d : ReflectReference +--- An infinite line going through the origin along a direction in 2D space. +--- +--- For a finite line: [`Segment2d`] ---@field direction ? Dir2 Line2d = {} ----@package ---@param _self Line2d - ---@param other Line2d - ---@return boolean function Line2d:eq(_self,other) end ----@package ---@param _self Line2d - ---@return Line2d function Line2d:clone(_self) end ----@class Plane2d ---- An unbounded plane in 2D space. It forms a separating surface through the origin,--- stretching infinitely far +---@class Plane2d : ReflectReference +--- An unbounded plane in 2D space. It forms a separating surface through the origin, +--- stretching infinitely far ---@field normal ? Dir2 Plane2d = {} ----@package ---@param _self Plane2d - ---@param other Plane2d - ---@return boolean function Plane2d:eq(_self,other) end ----@package ---@param normal Vec2 - ---@return Plane2d function Plane2d.new(normal) end ----@package ---@param _self Plane2d - ---@return Plane2d function Plane2d:clone(_self) end ----@class Rectangle +---@class Rectangle : ReflectReference --- A rectangle primitive, which is like a square, except that the width and height can be different ---@field half_size ? Vec2 Rectangle = {} ----@package ---@param _self Rectangle - ---@param other Rectangle - ---@return boolean function Rectangle:eq(_self,other) end ----@package ---@param _self Rectangle - ---@param point Vec2 - ---@return Vec2 function Rectangle:closest_point(_self,point) end ----@package ---@param length number - ---@return Rectangle function Rectangle.from_length(length) end ----@package ---@param point1 Vec2 - ---@param point2 Vec2 - ---@return Rectangle function Rectangle.from_corners(point1,point2) end ----@package ---@param _self Rectangle - ---@return Rectangle function Rectangle:clone(_self) end ----@package ---@param _self Rectangle - ---@return Vec2 function Rectangle:size(_self) end ----@package ---@param size Vec2 - ---@return Rectangle function Rectangle.from_size(size) end ----@package ---@param width number - ---@param height number - ---@return Rectangle function Rectangle.new(width,height) end ----@class RegularPolygon +---@class RegularPolygon : ReflectReference --- A polygon centered on the origin where all vertices lie on a circle, equally far apart. ---@field circumcircle ? Circle ---@field sides ? integer RegularPolygon = {} ----@package ---@param _self RegularPolygon - ---@return number function RegularPolygon:external_angle_degrees(_self) end ----@package ---@param _self RegularPolygon - ---@return number function RegularPolygon:side_length(_self) end ----@package ---@param _self RegularPolygon - ---@return number function RegularPolygon:circumradius(_self) end ----@package ---@param _self RegularPolygon - ---@return number function RegularPolygon:external_angle_radians(_self) end ----@package ---@param _self RegularPolygon - ---@return number function RegularPolygon:internal_angle_degrees(_self) end ----@package ---@param _self RegularPolygon - ---@param other RegularPolygon - ---@return boolean function RegularPolygon:eq(_self,other) end ----@package ---@param _self RegularPolygon - ---@return number function RegularPolygon:internal_angle_radians(_self) end ----@package ---@param circumradius number - ---@param sides integer - ---@return RegularPolygon function RegularPolygon.new(circumradius,sides) end ----@package ---@param _self RegularPolygon - ---@return RegularPolygon function RegularPolygon:clone(_self) end ----@package ---@param _self RegularPolygon - ---@return number function RegularPolygon:inradius(_self) end ----@class Rhombus ---- A rhombus primitive, also known as a diamond shape.--- A four sided polygon, centered on the origin, where opposite sides are parallel but without--- requiring right angles. +---@class Rhombus : ReflectReference +--- A rhombus primitive, also known as a diamond shape. +--- A four sided polygon, centered on the origin, where opposite sides are parallel but without +--- requiring right angles. ---@field half_diagonals ? Vec2 Rhombus = {} ----@package ---@param _self Rhombus - ---@return Rhombus function Rhombus:clone(_self) end ----@package ---@param _self Rhombus - ---@return number function Rhombus:inradius(_self) end ----@package ---@param horizontal_diagonal number - ---@param vertical_diagonal number - ---@return Rhombus function Rhombus.new(horizontal_diagonal,vertical_diagonal) end ----@package ---@param side number - ---@return Rhombus function Rhombus.from_side(side) end ----@package ---@param _self Rhombus - ---@param point Vec2 - ---@return Vec2 function Rhombus:closest_point(_self,point) end ----@package ---@param _self Rhombus - ---@return number function Rhombus:circumradius(_self) end ----@package ---@param _self Rhombus - ---@param other Rhombus - ---@return boolean function Rhombus:eq(_self,other) end ----@package ---@param _self Rhombus - ---@return number function Rhombus:side(_self) end ----@package ---@param inradius number - ---@return Rhombus function Rhombus.from_inradius(inradius) end ----@class Segment2d +---@class Segment2d : ReflectReference --- A line segment defined by two endpoints in 2D space. ---@field vertices ? [glam::Vec2; 2] Segment2d = {} ----@package ---@param _self Segment2d - ---@return number function Segment2d:length_squared(_self) end ----@package ---@param ray Ray2d - ---@param length number - ---@return Segment2d function Segment2d.from_ray_and_length(ray,length) end ----@package ---@param _self Segment2d - ---@return Dir2 function Segment2d:left_normal(_self) end ----@package ---@param _self Segment2d - ---@return Vec2 function Segment2d:point2(_self) end ----@package ---@param point1 Vec2 - ---@param point2 Vec2 - ---@return Segment2d function Segment2d.new(point1,point2) end ----@package ---@param _self Segment2d - ---@return Vec2 function Segment2d:center(_self) end ----@package ---@param _self Segment2d - ---@return Vec2 function Segment2d:point1(_self) end ----@package ---@param _self Segment2d - ---@param rotation Rot2 - ---@return Segment2d function Segment2d:rotated(_self,rotation) end ----@package ---@param _self Segment2d - ---@param rotation Rot2 - ---@return Segment2d function Segment2d:rotated_around_center(_self,rotation) end ----@package ---@param _self Segment2d - ---@param rotation Rot2 - ---@param point Vec2 - ---@return Segment2d function Segment2d:rotated_around(_self,rotation,point) end ----@package ---@param direction Dir2 - ---@param length number - ---@return Segment2d function Segment2d.from_direction_and_length(direction,length) end ----@package ---@param _self Segment2d - ---@return Vec2 function Segment2d:scaled_left_normal(_self) end ----@package ---@param _self Segment2d - ---@return Segment2d function Segment2d:centered(_self) end ----@package ---@param _self Segment2d - ---@return Dir2 function Segment2d:right_normal(_self) end ----@package ---@param scaled_direction Vec2 - ---@return Segment2d function Segment2d.from_scaled_direction(scaled_direction) end ----@package ---@param _self Segment2d - ---@return Dir2 function Segment2d:direction(_self) end ----@package ---@param _self Segment2d - ---@return Vec2 function Segment2d:scaled_right_normal(_self) end ----@package ---@param _self Segment2d - ---@return Segment2d function Segment2d:reversed(_self) end ----@package ---@param _self Segment2d - ---@param length number - ---@return Segment2d function Segment2d:resized(_self,length) end ----@package ---@param _self Segment2d - ---@return Segment2d function Segment2d:clone(_self) end ----@package ---@param _self Segment2d - ----@return [] +---@return nil function Segment2d:reverse(_self) end ----@package ---@param _self Segment2d - ---@param other Segment2d - ---@return boolean function Segment2d:eq(_self,other) end ----@package ---@param _self Segment2d - ---@return number function Segment2d:length(_self) end ----@package ---@param _self Segment2d - ---@param translation Vec2 - ---@return Segment2d function Segment2d:translated(_self,translation) end ----@package ---@param _self Segment2d - ---@return Vec2 function Segment2d:scaled_direction(_self) end ----@class Triangle2d +---@class Triangle2d : ReflectReference --- A triangle in 2D space ---@field vertices ? [glam::Vec2; 3] Triangle2d = {} ----@package ---@param _self Triangle2d - ----@return [] +---@return nil function Triangle2d:reverse(_self) end ----@package ---@param _self Triangle2d - ---@return Triangle2d function Triangle2d:reversed(_self) end ----@package ---@param _self Triangle2d - ---@return boolean function Triangle2d:is_acute(_self) end ----@package ---@param _self Triangle2d - ---@return boolean function Triangle2d:is_obtuse(_self) end ----@package ---@param _self Triangle2d - ---@param other Triangle2d - ---@return boolean function Triangle2d:eq(_self,other) end ----@package ---@param a Vec2 - ---@param b Vec2 - ---@param c Vec2 - ---@return Triangle2d function Triangle2d.new(a,b,c) end ----@package ---@param _self Triangle2d - ---@return Triangle2d function Triangle2d:clone(_self) end ----@package ---@param _self Triangle2d - ---@return boolean function Triangle2d:is_degenerate(_self) end ----@class Capsule3d ---- A 3D capsule primitive centered on the origin--- A three-dimensional capsule is defined as a surface at a distance (radius) from a line +---@class Capsule3d : ReflectReference +--- A 3D capsule primitive centered on the origin +--- A three-dimensional capsule is defined as a surface at a distance (radius) from a line ---@field radius ? number ---@field half_length ? number Capsule3d = {} ----@package ---@param _self Capsule3d - ---@return Cylinder function Capsule3d:to_cylinder(_self) end ----@package ---@param _self Capsule3d - ---@return Capsule3d function Capsule3d:clone(_self) end ----@package ---@param _self Capsule3d - ---@param other Capsule3d - ---@return boolean function Capsule3d:eq(_self,other) end ----@package ---@param radius number - ---@param length number - ---@return Capsule3d function Capsule3d.new(radius,length) end ----@class Cone ---- A cone primitive centered on the midpoint between the tip of the cone and the center of its base.--- --- The cone is oriented with its tip pointing towards the Y axis. +---@class Cone : ReflectReference +--- A cone primitive centered on the midpoint between the tip of the cone and the center of its base. +--- +--- The cone is oriented with its tip pointing towards the Y axis. ---@field radius ? number ---@field height ? number Cone = {} ----@package ---@param _self Cone - ---@return number function Cone:slant_height(_self) end ----@package ---@param _self Cone - ---@return number function Cone:base_area(_self) end ----@package ---@param radius number - ---@param height number - ---@return Cone function Cone.new(radius,height) end ----@package ---@param _self Cone - ---@return Cone function Cone:clone(_self) end ----@package ---@param _self Cone - ---@param other Cone - ---@return boolean function Cone:eq(_self,other) end ----@package ---@param _self Cone - ---@return number function Cone:lateral_area(_self) end ----@package ---@param _self Cone - ---@return Circle function Cone:base(_self) end ----@class ConicalFrustum ---- A conical frustum primitive.--- A conical frustum can be created--- by slicing off a section of a cone. +---@class ConicalFrustum : ReflectReference +--- A conical frustum primitive. +--- A conical frustum can be created +--- by slicing off a section of a cone. ---@field radius_top ? number ---@field radius_bottom ? number ---@field height ? number ConicalFrustum = {} ----@package ---@param _self ConicalFrustum - ---@param other ConicalFrustum - ---@return boolean function ConicalFrustum:eq(_self,other) end ----@package ---@param _self ConicalFrustum - ---@return ConicalFrustum function ConicalFrustum:clone(_self) end ----@class Cuboid ---- A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not--- required to be the same. +---@class Cuboid : ReflectReference +--- A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not +--- required to be the same. ---@field half_size ? Vec3 Cuboid = {} ----@package ---@param _self Cuboid - ---@param point Vec3 - ---@return Vec3 function Cuboid:closest_point(_self,point) end ----@package ---@param length number - ---@return Cuboid function Cuboid.from_length(length) end ----@package ---@param _self Cuboid - ---@return Cuboid function Cuboid:clone(_self) end ----@package ---@param _self Cuboid - ---@param other Cuboid - ---@return boolean function Cuboid:eq(_self,other) end ----@package ---@param size Vec3 - ---@return Cuboid function Cuboid.from_size(size) end ----@package ---@param _self Cuboid - ---@return Vec3 function Cuboid:size(_self) end ----@package ---@param x_length number - ---@param y_length number - ---@param z_length number - ---@return Cuboid function Cuboid.new(x_length,y_length,z_length) end ----@package ---@param point1 Vec3 - ---@param point2 Vec3 - ---@return Cuboid function Cuboid.from_corners(point1,point2) end ----@class Cylinder +---@class Cylinder : ReflectReference --- A cylinder primitive centered on the origin ---@field radius ? number ---@field half_height ? number Cylinder = {} ----@package ---@param _self Cylinder - ---@param other Cylinder - ---@return boolean function Cylinder:eq(_self,other) end ----@package ---@param _self Cylinder - ---@return number function Cylinder:lateral_area(_self) end ----@package ---@param radius number - ---@param height number - ---@return Cylinder function Cylinder.new(radius,height) end ----@package ---@param _self Cylinder - ---@return Circle function Cylinder:base(_self) end ----@package ---@param _self Cylinder - ---@return Cylinder function Cylinder:clone(_self) end ----@package ---@param _self Cylinder - ---@return number function Cylinder:base_area(_self) end ----@class InfinitePlane3d ---- An unbounded plane in 3D space. It forms a separating surface through the origin,--- stretching infinitely far +---@class InfinitePlane3d : ReflectReference +--- An unbounded plane in 3D space. It forms a separating surface through the origin, +--- stretching infinitely far ---@field normal ? Dir3 InfinitePlane3d = {} ----@package ---@param _self InfinitePlane3d - ---@param other InfinitePlane3d - ---@return boolean function InfinitePlane3d:eq(_self,other) end ----@package ---@param _self InfinitePlane3d - ---@return InfinitePlane3d function InfinitePlane3d:clone(_self) end ----@package ---@param _self InfinitePlane3d - ---@param origin Vec3 - ---@return Isometry3d function InfinitePlane3d:isometry_from_xy(_self,origin) end ----@package ---@param _self InfinitePlane3d - ---@param origin Vec3 - ---@return Isometry3d function InfinitePlane3d:isometry_into_xy(_self,origin) end ----@class Line3d ---- An infinite line going through the origin along a direction in 3D space.--- --- For a finite line: [`Segment3d`] +---@class Line3d : ReflectReference +--- An infinite line going through the origin along a direction in 3D space. +--- +--- For a finite line: [`Segment3d`] ---@field direction ? Dir3 Line3d = {} ----@package ---@param _self Line3d - ---@return Line3d function Line3d:clone(_self) end ----@package ---@param _self Line3d - ---@param other Line3d - ---@return boolean function Line3d:eq(_self,other) end ----@class Plane3d +---@class Plane3d : ReflectReference --- A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width. ---@field normal ? Dir3 ---@field half_size ? Vec2 Plane3d = {} ----@package ---@param _self Plane3d - ---@return Plane3d function Plane3d:clone(_self) end ----@package ---@param normal Vec3 - ---@param half_size Vec2 - ---@return Plane3d function Plane3d.new(normal,half_size) end ----@package ---@param _self Plane3d - ---@param other Plane3d - ---@return boolean function Plane3d:eq(_self,other) end ----@class Segment3d +---@class Segment3d : ReflectReference --- A line segment defined by two endpoints in 3D space. ---@field vertices ? [glam::Vec3; 2] Segment3d = {} ----@package ---@param _self Segment3d - ---@return Vec3 function Segment3d:scaled_direction(_self) end ----@package ---@param scaled_direction Vec3 - ---@return Segment3d function Segment3d.from_scaled_direction(scaled_direction) end ----@package ---@param direction Dir3 - ---@param length number - ---@return Segment3d function Segment3d.from_direction_and_length(direction,length) end ----@package ---@param _self Segment3d - ---@param rotation Quat - ---@return Segment3d function Segment3d:rotated(_self,rotation) end ----@package ---@param _self Segment3d - ---@return number function Segment3d:length(_self) end ----@package ---@param _self Segment3d - ---@param translation Vec3 - ---@return Segment3d function Segment3d:translated(_self,translation) end ----@package ---@param _self Segment3d - ----@return [] +---@return nil function Segment3d:reverse(_self) end ----@package ---@param _self Segment3d - ---@return Vec3 function Segment3d:center(_self) end ----@package ---@param _self Segment3d - ---@return Dir3 function Segment3d:direction(_self) end ----@package ---@param _self Segment3d - ---@return number function Segment3d:length_squared(_self) end ----@package ---@param _self Segment3d - ---@return Vec3 function Segment3d:point1(_self) end ----@package ---@param _self Segment3d - ---@param rotation Quat - ---@param point Vec3 - ---@return Segment3d function Segment3d:rotated_around(_self,rotation,point) end ----@package ---@param _self Segment3d - ---@param rotation Quat - ---@return Segment3d function Segment3d:rotated_around_center(_self,rotation) end ----@package ---@param _self Segment3d - ---@param other Segment3d - ---@return boolean function Segment3d:eq(_self,other) end ----@package ---@param _self Segment3d - ---@return Segment3d function Segment3d:clone(_self) end ----@package ---@param _self Segment3d - ---@return Vec3 function Segment3d:point2(_self) end ----@package ---@param _self Segment3d - ---@return Segment3d function Segment3d:reversed(_self) end ----@package ---@param ray Ray3d - ---@param length number - ---@return Segment3d function Segment3d.from_ray_and_length(ray,length) end ----@package ---@param _self Segment3d - ---@param length number - ---@return Segment3d function Segment3d:resized(_self,length) end ----@package ---@param _self Segment3d - ---@return Segment3d function Segment3d:centered(_self) end ----@package ---@param point1 Vec3 - ---@param point2 Vec3 - ---@return Segment3d function Segment3d.new(point1,point2) end ----@class Sphere +---@class Sphere : ReflectReference --- A sphere primitive, representing the set of all points some distance from the origin ---@field radius ? number Sphere = {} ----@package ---@param _self Sphere - ---@param other Sphere - ---@return boolean function Sphere:eq(_self,other) end ----@package ---@param _self Sphere - ---@return number function Sphere:diameter(_self) end ----@package ---@param _self Sphere - ---@param point Vec3 - ---@return Vec3 function Sphere:closest_point(_self,point) end ----@package ---@param _self Sphere - ---@return Sphere function Sphere:clone(_self) end ----@package ---@param radius number - ---@return Sphere function Sphere.new(radius) end ----@class Tetrahedron +---@class Tetrahedron : ReflectReference --- A tetrahedron primitive. ---@field vertices ? [glam::Vec3; 4] Tetrahedron = {} ----@package ---@param _self Tetrahedron - ---@return Vec3 function Tetrahedron:centroid(_self) end ----@package ---@param _self Tetrahedron - ---@return Tetrahedron function Tetrahedron:clone(_self) end ----@package ---@param _self Tetrahedron - ---@return number function Tetrahedron:signed_volume(_self) end ----@package ---@param _self Tetrahedron - ---@param other Tetrahedron - ---@return boolean function Tetrahedron:eq(_self,other) end ----@package ---@param a Vec3 - ---@param b Vec3 - ---@param c Vec3 - ---@param d Vec3 - ---@return Tetrahedron function Tetrahedron.new(a,b,c,d) end ----@class Torus ---- A torus primitive, often representing a ring or donut shape--- The set of points some distance from a circle centered at the origin +---@class Torus : ReflectReference +--- A torus primitive, often representing a ring or donut shape +--- The set of points some distance from a circle centered at the origin ---@field minor_radius ? number ---@field major_radius ? number Torus = {} ----@package ---@param _self Torus - ---@return number function Torus:inner_radius(_self) end ----@package ---@param _self Torus - ---@return Torus function Torus:clone(_self) end ----@package ---@param inner_radius number - ---@param outer_radius number - ---@return Torus function Torus.new(inner_radius,outer_radius) end ----@package ---@param _self Torus - ---@return number function Torus:outer_radius(_self) end ----@package ---@param _self Torus - ---@param other Torus - ---@return boolean function Torus:eq(_self,other) end ----@class Triangle3d +---@class Triangle3d : ReflectReference --- A 3D triangle primitive. ---@field vertices ? [glam::Vec3; 3] Triangle3d = {} ----@package ---@param _self Triangle3d - ---@param other Triangle3d - ---@return boolean function Triangle3d:eq(_self,other) end ----@package ---@param _self Triangle3d - ----@return [] +---@return nil function Triangle3d:reverse(_self) end ----@package ---@param a Vec3 - ---@param b Vec3 - ---@param c Vec3 - ---@return Triangle3d function Triangle3d.new(a,b,c) end ----@package ---@param _self Triangle3d - ---@return boolean function Triangle3d:is_obtuse(_self) end ----@package ---@param _self Triangle3d - ---@return Triangle3d function Triangle3d:clone(_self) end ----@package ---@param _self Triangle3d - ---@return boolean function Triangle3d:is_degenerate(_self) end ----@package ---@param _self Triangle3d - ---@return Vec3 function Triangle3d:circumcenter(_self) end ----@package ---@param _self Triangle3d - ---@return Vec3 function Triangle3d:centroid(_self) end ----@package ---@param _self Triangle3d - ---@return Triangle3d function Triangle3d:reversed(_self) end ----@package ---@param _self Triangle3d - ---@return boolean function Triangle3d:is_acute(_self) end ----@class Ray2d +---@class Ray2d : ReflectReference --- An infinite half-line starting at `origin` and going in `direction` in 2D space. ---@field origin ? Vec2 ---@field direction ? Dir2 Ray2d = {} ----@package ---@param _self Ray2d - ---@param distance number - ---@return Vec2 function Ray2d:get_point(_self,distance) end ----@package ---@param _self Ray2d - ---@param plane_origin Vec2 - ---@param plane Plane2d - ---@return number | nil function Ray2d:intersect_plane(_self,plane_origin,plane) end ----@package ---@param _self Ray2d - ---@return Ray2d function Ray2d:clone(_self) end ----@package ---@param _self Ray2d - ---@param other Ray2d - ---@return boolean function Ray2d:eq(_self,other) end ----@package ---@param origin Vec2 - ---@param direction Dir2 - ---@return Ray2d function Ray2d.new(origin,direction) end ----@class Ray3d +---@class Ray3d : ReflectReference --- An infinite half-line starting at `origin` and going in `direction` in 3D space. ---@field origin ? Vec3 ---@field direction ? Dir3 Ray3d = {} ----@package ---@param origin Vec3 - ---@param direction Dir3 - ---@return Ray3d function Ray3d.new(origin,direction) end ----@package ---@param _self Ray3d - ---@param other Ray3d - ---@return boolean function Ray3d:eq(_self,other) end ----@package ---@param _self Ray3d - ---@return Ray3d function Ray3d:clone(_self) end ----@package ---@param _self Ray3d - ---@param distance number - ---@return Vec3 function Ray3d:get_point(_self,distance) end ----@package ---@param _self Ray3d - ---@param plane_origin Vec3 - ---@param plane InfinitePlane3d - ---@return number | nil function Ray3d:intersect_plane(_self,plane_origin,plane) end ----@class IRect ---- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `IRect::min` and `IRect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@class IRect : ReflectReference +--- A rectangle defined by two opposite corners. +--- +--- The rectangle is axis aligned, and defined by its minimum and maximum coordinates, +--- stored in `IRect::min` and `IRect::max`, respectively. The minimum/maximum invariant +--- must be upheld by the user when directly assigning the fields, otherwise some methods +--- produce invalid results. It is generally recommended to use one of the constructor +--- methods instead, which will ensure this invariant is met, unless you already have +--- the minimum and maximum corners. ---@field min ? IVec2 ---@field max ? IVec2 IRect = {} ----@package ---@param _self IRect - ---@return IVec2 function IRect:size(_self) end ----@package ---@param _self IRect - ---@return IRect function IRect:clone(_self) end ----@package ---@param _self IRect - ----@return [] +---@return nil function IRect:assert_receiver_is_total_eq(_self) end ----@package ---@param _self IRect - ---@return Rect function IRect:as_rect(_self) end ----@package ---@param _self IRect - ---@return IVec2 function IRect:half_size(_self) end ----@package ---@param _self IRect - ---@return boolean function IRect:is_empty(_self) end ----@package ---@param _self IRect - ---@return integer function IRect:height(_self) end ----@package ---@param _self IRect - ---@param other IRect - ---@return boolean function IRect:eq(_self,other) end ----@package ---@param _self IRect - ---@param other IRect - ---@return IRect function IRect:union(_self,other) end ----@package ---@param _self IRect - ---@param point IVec2 - ---@return boolean function IRect:contains(_self,point) end ----@package ---@param x0 integer - ---@param y0 integer - ---@param x1 integer - ---@param y1 integer - ---@return IRect function IRect.new(x0,y0,x1,y1) end ----@package ---@param _self IRect - ---@param other IVec2 - ---@return IRect function IRect:union_point(_self,other) end ----@package ---@param _self IRect - ---@param expansion integer - ---@return IRect function IRect:inflate(_self,expansion) end ----@package ---@param _self IRect - ---@return URect function IRect:as_urect(_self) end ----@package ---@param _self IRect - ---@return IVec2 function IRect:center(_self) end ----@package ---@param _self IRect - ---@param other IRect - ---@return IRect function IRect:intersect(_self,other) end ----@package ---@param _self IRect - ---@return integer function IRect:width(_self) end ----@package ---@param p0 IVec2 - ---@param p1 IVec2 - ---@return IRect function IRect.from_corners(p0,p1) end ----@package ---@param origin IVec2 - ---@param size IVec2 - ---@return IRect function IRect.from_center_size(origin,size) end ----@package ---@param origin IVec2 - ---@param half_size IVec2 - ---@return IRect function IRect.from_center_half_size(origin,half_size) end ----@class Rect ---- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `Rect::min` and `Rect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@class Rect : ReflectReference +--- A rectangle defined by two opposite corners. +--- +--- The rectangle is axis aligned, and defined by its minimum and maximum coordinates, +--- stored in `Rect::min` and `Rect::max`, respectively. The minimum/maximum invariant +--- must be upheld by the user when directly assigning the fields, otherwise some methods +--- produce invalid results. It is generally recommended to use one of the constructor +--- methods instead, which will ensure this invariant is met, unless you already have +--- the minimum and maximum corners. ---@field min ? Vec2 ---@field max ? Vec2 Rect = {} ----@package ---@param _self Rect - ---@return IRect function Rect:as_irect(_self) end ----@package ---@param _self Rect - ---@return number function Rect:height(_self) end ----@package ---@param origin Vec2 - ---@param size Vec2 - ---@return Rect function Rect.from_center_size(origin,size) end ----@package ---@param _self Rect - ---@return Vec2 function Rect:half_size(_self) end ----@package ---@param _self Rect - ---@param other Rect - ---@return Rect function Rect:normalize(_self,other) end ----@package ---@param _self Rect - ---@return number function Rect:width(_self) end ----@package ---@param _self Rect - ---@param expansion number - ---@return Rect function Rect:inflate(_self,expansion) end ----@package ---@param _self Rect - ---@param other Rect - ---@return boolean function Rect:eq(_self,other) end ----@package ---@param _self Rect - ---@return Rect function Rect:clone(_self) end ----@package ---@param _self Rect - ---@param other Rect - ---@return Rect function Rect:union(_self,other) end ----@package ---@param _self Rect - ---@return Vec2 function Rect:center(_self) end ----@package ---@param _self Rect - ---@return URect function Rect:as_urect(_self) end ----@package ---@param p0 Vec2 - ---@param p1 Vec2 - ---@return Rect function Rect.from_corners(p0,p1) end ----@package ---@param x0 number - ---@param y0 number - ---@param x1 number - ---@param y1 number - ---@return Rect function Rect.new(x0,y0,x1,y1) end ----@package ---@param _self Rect - ---@return Vec2 function Rect:size(_self) end ----@package ---@param _self Rect - ---@param other Rect - ---@return Rect function Rect:intersect(_self,other) end ----@package ---@param origin Vec2 - ---@param half_size Vec2 - ---@return Rect function Rect.from_center_half_size(origin,half_size) end ----@package ---@param _self Rect - ---@param other Vec2 - ---@return Rect function Rect:union_point(_self,other) end ----@package ---@param _self Rect - ---@return boolean function Rect:is_empty(_self) end ----@package ---@param _self Rect - ---@param point Vec2 - ---@return boolean function Rect:contains(_self,point) end ----@class URect ---- A rectangle defined by two opposite corners.--- --- The rectangle is axis aligned, and defined by its minimum and maximum coordinates,--- stored in `URect::min` and `URect::max`, respectively. The minimum/maximum invariant--- must be upheld by the user when directly assigning the fields, otherwise some methods--- produce invalid results. It is generally recommended to use one of the constructor--- methods instead, which will ensure this invariant is met, unless you already have--- the minimum and maximum corners. +---@class URect : ReflectReference +--- A rectangle defined by two opposite corners. +--- +--- The rectangle is axis aligned, and defined by its minimum and maximum coordinates, +--- stored in `URect::min` and `URect::max`, respectively. The minimum/maximum invariant +--- must be upheld by the user when directly assigning the fields, otherwise some methods +--- produce invalid results. It is generally recommended to use one of the constructor +--- methods instead, which will ensure this invariant is met, unless you already have +--- the minimum and maximum corners. ---@field min ? UVec2 ---@field max ? UVec2 URect = {} ----@package ---@param origin UVec2 - ---@param half_size UVec2 - ---@return URect function URect.from_center_half_size(origin,half_size) end ----@package ---@param _self URect - ---@return boolean function URect:is_empty(_self) end ----@package ---@param _self URect - ----@return [] +---@return nil function URect:assert_receiver_is_total_eq(_self) end ----@package ---@param _self URect - ---@param expansion integer - ---@return URect function URect:inflate(_self,expansion) end ----@package ---@param _self URect - ---@return UVec2 function URect:center(_self) end ----@package ---@param _self URect - ---@return URect function URect:clone(_self) end ----@package ---@param _self URect - ---@param point UVec2 - ---@return boolean function URect:contains(_self,point) end ----@package ---@param _self URect - ---@param other URect - ---@return boolean function URect:eq(_self,other) end ----@package ---@param _self URect - ---@return integer function URect:height(_self) end ----@package ---@param _self URect - ---@return UVec2 function URect:size(_self) end ----@package ---@param x0 integer - ---@param y0 integer - ---@param x1 integer - ---@param y1 integer - ---@return URect function URect.new(x0,y0,x1,y1) end ----@package ---@param _self URect - ---@return UVec2 function URect:half_size(_self) end ----@package ---@param _self URect - ---@param other UVec2 - ---@return URect function URect:union_point(_self,other) end ----@package ---@param _self URect - ---@return IRect function URect:as_irect(_self) end ----@package ---@param _self URect - ---@return integer function URect:width(_self) end ----@package ---@param _self URect - ---@return Rect function URect:as_rect(_self) end ----@package ---@param _self URect - ---@param other URect - ---@return URect function URect:union(_self,other) end ----@package ---@param p0 UVec2 - ---@param p1 UVec2 - ---@return URect function URect.from_corners(p0,p1) end ----@package ---@param origin UVec2 - ---@param size UVec2 - ---@return URect function URect.from_center_size(origin,size) end ----@package ---@param _self URect - ---@param other URect - ---@return URect function URect:intersect(_self,other) end ----@class Rot2 ---- A counterclockwise 2D rotation.--- --- # Example--- --- ```--- # use approx::assert_relative_eq;--- # use bevy_math::{Rot2, Vec2};--- use std::f32::consts::PI;--- --- // Create rotations from radians or degrees--- let rotation1 = Rot2::radians(PI / 2.0);--- let rotation2 = Rot2::degrees(45.0);--- --- // Get the angle back as radians or degrees--- assert_eq!(rotation1.as_degrees(), 90.0);--- assert_eq!(rotation2.as_radians(), PI / 4.0);--- --- // "Add" rotations together using `*`--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * rotation2, Rot2::degrees(135.0));--- --- // Rotate vectors--- #[cfg(feature = "approx")]--- assert_relative_eq!(rotation1 * Vec2::X, Vec2::Y);--- ``` +---@class Rot2 : ReflectReference +--- A counterclockwise 2D rotation. +--- +--- # Example +--- +--- ``` +--- # use approx::assert_relative_eq; +--- # use bevy_math::{Rot2, Vec2}; +--- use std::f32::consts::PI; +--- +--- // Create rotations from radians or degrees +--- let rotation1 = Rot2::radians(PI / 2.0); +--- let rotation2 = Rot2::degrees(45.0); +--- +--- // Get the angle back as radians or degrees +--- assert_eq!(rotation1.as_degrees(), 90.0); +--- assert_eq!(rotation2.as_radians(), PI / 4.0); +--- +--- // "Add" rotations together using `*` +--- #[cfg(feature = "approx")] +--- assert_relative_eq!(rotation1 * rotation2, Rot2::degrees(135.0)); +--- +--- // Rotate vectors +--- #[cfg(feature = "approx")] +--- assert_relative_eq!(rotation1 * Vec2::X, Vec2::Y); +--- ``` ---@field cos ? number ---@field sin ? number Rot2 = {} ----@package ---@param _self Rot2 - ---@param other Rot2 - ---@return number function Rot2:angle_to(_self,other) end ----@package ---@param degrees number - ---@return Rot2 function Rot2.degrees(degrees) end ----@package ---@param _self Rot2 - ---@return number function Rot2:as_radians(_self) end ----@package ----@param _self Rot2 +---@param p1 Rot2 +---@param p2 Vec2 +---@return Vec2 +function Rot2:mul(p1,p2) end +---@param _self Rot2 ---@return boolean function Rot2:is_finite(_self) end ----@package ---@param _self Rot2 - ---@return number function Rot2:length_recip(_self) end ----@package ---@param _self Rot2 - ---@return number function Rot2:as_turn_fraction(_self) end ----@package ---@param _self Rot2 - ---@param _end Rot2 - ---@param s number - ---@return Rot2 function Rot2:slerp(_self,_end,s) end ----@package ---@param _self Rot2 - ---@return number function Rot2:length_squared(_self) end ----@package ---@param _self Rot2 - ---@param rhs Rot2 - ---@return Rot2 function Rot2:mul(_self,rhs) end ----@package ---@param _self Rot2 - ---@return Rot2 function Rot2:inverse(_self) end ----@package ---@param _self Rot2 - ---@return Rot2 function Rot2:normalize(_self) end ----@package ---@param _self Rot2 - ---@param other Rot2 - ---@return boolean function Rot2:eq(_self,other) end ----@package ---@param radians number - ---@return Rot2 function Rot2.radians(radians) end ----@package ---@param _self Rot2 - ---@return Rot2 function Rot2:fast_renormalize(_self) end ----@package ---@param _self Rot2 - ---@return Rot2 function Rot2:clone(_self) end ----@package ---@param _self Rot2 - ---@return boolean function Rot2:is_near_identity(_self) end ----@package ---@param _self Rot2 - ---@return boolean function Rot2:is_nan(_self) end ----@package ---@param _self Rot2 - ---@return [number, number] function Rot2:sin_cos(_self) end ----@package ----@param sin number +---@param p1 Rot2 +---@param p2 Dir2 +---@return Dir2 +function Rot2:mul(p1,p2) end +---@param sin number ---@param cos number - ---@return Rot2 function Rot2.from_sin_cos(sin,cos) end ----@package ---@param _self Rot2 - ---@param _end Rot2 - ---@param s number - ---@return Rot2 function Rot2:nlerp(_self,_end,s) end ----@package ---@param _self Rot2 - ---@return boolean function Rot2:is_normalized(_self) end ----@package ---@param _self Rot2 - ---@return number function Rot2:as_degrees(_self) end ----@package ---@param _self Rot2 - ---@return number function Rot2:length(_self) end ----@package ---@param fraction number - ---@return Rot2 function Rot2.turn_fraction(fraction) end ----@class Instant - +---@class Instant : ReflectReference Instant = {} ----@package ---@param _self Instant - ---@param other Duration - ---@return Instant function Instant:add(_self,other) end ----@package ---@param _self Instant - ---@param earlier Instant - ---@return Duration function Instant:saturating_duration_since(_self,earlier) end ----@package ----@param _self Instant +---@param p1 Instant +---@param p2 Instant +---@return Duration +function Instant:sub(p1,p2) end +---@param _self Instant ---@param earlier Instant - ---@return Duration function Instant:duration_since(_self,earlier) end ----@package ---@param _self Instant - ---@param other Duration - ---@return Instant function Instant:sub(_self,other) end ----@package ---@param _self Instant - ---@param other Instant - ---@return boolean function Instant:eq(_self,other) end ----@package ---@param _self Instant - ---@return Instant function Instant:clone(_self) end ----@package ---@param _self Instant - ----@return [] +---@return nil function Instant:assert_receiver_is_total_eq(_self) end ----@package ---@param _self Instant - ---@return Duration function Instant:elapsed(_self) end ----@package ---@return Instant function Instant.now() end ----@class Fixed ---- The fixed timestep game clock following virtual time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Virtual). The fixed clock is automatically set as the--- generic [`Time`] resource during [`FixedUpdate`](bevy_app::FixedUpdate)--- schedule processing.--- --- The fixed timestep clock advances in fixed-size increments, which is--- extremely useful for writing logic (like physics) that should have--- consistent behavior, regardless of framerate.--- --- The default [`timestep()`](Time::timestep) is 64 hertz, or 15625--- microseconds. This value was chosen because using 60 hertz has the potential--- for a pathological interaction with the monitor refresh rate where the game--- alternates between running two fixed timesteps and zero fixed timesteps per--- frame (for example when running two fixed timesteps takes longer than a--- frame). Additionally, the value is a power of two which losslessly converts--- into [`f32`] and [`f64`].--- --- To run a system on a fixed timestep, add it to one of the [`FixedMain`]--- schedules, most commonly [`FixedUpdate`](bevy_app::FixedUpdate).--- --- This schedule is run a number of times between--- [`PreUpdate`](bevy_app::PreUpdate) and [`Update`](bevy_app::Update)--- according to the accumulated [`overstep()`](Time::overstep) time divided by--- the [`timestep()`](Time::timestep). This means the schedule may run 0, 1 or--- more times during a single update (which typically corresponds to a rendered--- frame).--- --- `Time` and the generic [`Time`] resource will report a--- [`delta()`](Time::delta) equal to [`timestep()`](Time::timestep) and always--- grow [`elapsed()`](Time::elapsed) by one [`timestep()`](Time::timestep) per--- iteration.--- --- The fixed timestep clock follows the [`Time`](Virtual) clock, which--- means it is affected by [`pause()`](Time::pause),--- [`set_relative_speed()`](Time::set_relative_speed) and--- [`set_max_delta()`](Time::set_max_delta) from virtual time. If the virtual--- clock is paused, the [`FixedUpdate`](bevy_app::FixedUpdate) schedule will--- not run. It is guaranteed that the [`elapsed()`](Time::elapsed) time in--- `Time` is always between the previous `elapsed()` and the current--- `elapsed()` value in `Time`, so the values are compatible.--- --- Changing the timestep size while the game is running should not normally be--- done, as having a regular interval is the point of this schedule, but it may--- be necessary for effects like "bullet-time" if the normal granularity of the--- fixed timestep is too big for the slowed down time. In this case,--- [`set_timestep()`](Time::set_timestep) and be called to set a new value. The--- new value will be used immediately for the next run of the--- [`FixedUpdate`](bevy_app::FixedUpdate) schedule, meaning that it will affect--- the [`delta()`](Time::delta) value for the very next--- [`FixedUpdate`](bevy_app::FixedUpdate), even if it is still during the same--- frame. Any [`overstep()`](Time::overstep) present in the accumulator will be--- processed according to the new [`timestep()`](Time::timestep) value. +---@class Fixed : ReflectReference +--- The fixed timestep game clock following virtual time. +--- +--- A specialization of the [`Time`] structure. **For method documentation, see +--- [`Time#impl-Time`].** +--- +--- It is automatically inserted as a resource by +--- [`TimePlugin`](crate::TimePlugin) and updated based on +--- [`Time`](Virtual). The fixed clock is automatically set as the +--- generic [`Time`] resource during [`FixedUpdate`](bevy_app::FixedUpdate) +--- schedule processing. +--- +--- The fixed timestep clock advances in fixed-size increments, which is +--- extremely useful for writing logic (like physics) that should have +--- consistent behavior, regardless of framerate. +--- +--- The default [`timestep()`](Time::timestep) is 64 hertz, or 15625 +--- microseconds. This value was chosen because using 60 hertz has the potential +--- for a pathological interaction with the monitor refresh rate where the game +--- alternates between running two fixed timesteps and zero fixed timesteps per +--- frame (for example when running two fixed timesteps takes longer than a +--- frame). Additionally, the value is a power of two which losslessly converts +--- into [`f32`] and [`f64`]. +--- +--- To run a system on a fixed timestep, add it to one of the [`FixedMain`] +--- schedules, most commonly [`FixedUpdate`](bevy_app::FixedUpdate). +--- +--- This schedule is run a number of times between +--- [`PreUpdate`](bevy_app::PreUpdate) and [`Update`](bevy_app::Update) +--- according to the accumulated [`overstep()`](Time::overstep) time divided by +--- the [`timestep()`](Time::timestep). This means the schedule may run 0, 1 or +--- more times during a single update (which typically corresponds to a rendered +--- frame). +--- +--- `Time` and the generic [`Time`] resource will report a +--- [`delta()`](Time::delta) equal to [`timestep()`](Time::timestep) and always +--- grow [`elapsed()`](Time::elapsed) by one [`timestep()`](Time::timestep) per +--- iteration. +--- +--- The fixed timestep clock follows the [`Time`](Virtual) clock, which +--- means it is affected by [`pause()`](Time::pause), +--- [`set_relative_speed()`](Time::set_relative_speed) and +--- [`set_max_delta()`](Time::set_max_delta) from virtual time. If the virtual +--- clock is paused, the [`FixedUpdate`](bevy_app::FixedUpdate) schedule will +--- not run. It is guaranteed that the [`elapsed()`](Time::elapsed) time in +--- `Time` is always between the previous `elapsed()` and the current +--- `elapsed()` value in `Time`, so the values are compatible. +--- +--- Changing the timestep size while the game is running should not normally be +--- done, as having a regular interval is the point of this schedule, but it may +--- be necessary for effects like "bullet-time" if the normal granularity of the +--- fixed timestep is too big for the slowed down time. In this case, +--- [`set_timestep()`](Time::set_timestep) and be called to set a new value. The +--- new value will be used immediately for the next run of the +--- [`FixedUpdate`](bevy_app::FixedUpdate) schedule, meaning that it will affect +--- the [`delta()`](Time::delta) value for the very next +--- [`FixedUpdate`](bevy_app::FixedUpdate), even if it is still during the same +--- frame. Any [`overstep()`](Time::overstep) present in the accumulator will be +--- processed according to the new [`timestep()`](Time::timestep) value. ---@field timestep ? Duration ---@field overstep ? Duration Fixed = {} ----@package ---@param _self Fixed - ---@return Fixed function Fixed:clone(_self) end ----@class Real ---- Real time clock representing elapsed wall clock time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- It is automatically inserted as a resource by--- [`TimePlugin`](crate::TimePlugin) and updated with time instants according--- to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).[^disclaimer]--- --- Note:--- Using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration)--- allows for mocking the wall clock for testing purposes.--- Besides this use case, it is not recommended to do this, as it will no longer--- represent "wall clock" time as intended.--- --- The [`delta()`](Time::delta) and [`elapsed()`](Time::elapsed) values of this--- clock should be used for anything which deals specifically with real time--- (wall clock time). It will not be affected by relative game speed--- adjustments, pausing or other adjustments.[^disclaimer]--- --- The clock does not count time from [`startup()`](Time::startup) to--- [`first_update()`](Time::first_update()) into elapsed, but instead will--- start counting time from the first update call. [`delta()`](Time::delta) and--- [`elapsed()`](Time::elapsed) will report zero on the first update as there--- is no previous update instant. This means that a [`delta()`](Time::delta) of--- zero must be handled without errors in application logic, as it may--- theoretically also happen at other times.--- --- [`Instant`]s for [`startup()`](Time::startup),--- [`first_update()`](Time::first_update) and--- [`last_update()`](Time::last_update) are recorded and accessible.--- --- [^disclaimer]: When using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration),--- [`Time#impl-Time`] is only a *mock* of wall clock time.--- +---@class Real : ReflectReference +--- Real time clock representing elapsed wall clock time. +--- +--- A specialization of the [`Time`] structure. **For method documentation, see +--- [`Time#impl-Time`].** +--- +--- It is automatically inserted as a resource by +--- [`TimePlugin`](crate::TimePlugin) and updated with time instants according +--- to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).[^disclaimer] +--- +--- Note: +--- Using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration) +--- allows for mocking the wall clock for testing purposes. +--- Besides this use case, it is not recommended to do this, as it will no longer +--- represent "wall clock" time as intended. +--- +--- The [`delta()`](Time::delta) and [`elapsed()`](Time::elapsed) values of this +--- clock should be used for anything which deals specifically with real time +--- (wall clock time). It will not be affected by relative game speed +--- adjustments, pausing or other adjustments.[^disclaimer] +--- +--- The clock does not count time from [`startup()`](Time::startup) to +--- [`first_update()`](Time::first_update()) into elapsed, but instead will +--- start counting time from the first update call. [`delta()`](Time::delta) and +--- [`elapsed()`](Time::elapsed) will report zero on the first update as there +--- is no previous update instant. This means that a [`delta()`](Time::delta) of +--- zero must be handled without errors in application logic, as it may +--- theoretically also happen at other times. +--- +--- [`Instant`]s for [`startup()`](Time::startup), +--- [`first_update()`](Time::first_update) and +--- [`last_update()`](Time::last_update) are recorded and accessible. +--- +--- [^disclaimer]: When using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration), +--- [`Time#impl-Time`] is only a *mock* of wall clock time. +--- ---@field startup ? Instant ---@field first_update ? Option ---@field last_update ? Option Real = {} ----@package ---@param _self Real - ---@return Real function Real:clone(_self) end ----@class Stopwatch ---- A Stopwatch is a struct that tracks elapsed time when started.--- --- Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called.--- # Examples--- --- ```--- # use bevy_time::*;--- use std::time::Duration;--- let mut stopwatch = Stopwatch::new();--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- --- stopwatch.tick(Duration::from_secs_f32(1.0)); // tick one second--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.pause();--- stopwatch.tick(Duration::from_secs_f32(1.0)); // paused stopwatches don't tick--- assert_eq!(stopwatch.elapsed_secs(), 1.0);--- --- stopwatch.reset(); // reset the stopwatch--- assert!(stopwatch.is_paused());--- assert_eq!(stopwatch.elapsed_secs(), 0.0);--- ``` +---@class Stopwatch : ReflectReference +--- A Stopwatch is a struct that tracks elapsed time when started. +--- +--- Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called. +--- # Examples +--- +--- ``` +--- # use bevy_time::*; +--- use std::time::Duration; +--- let mut stopwatch = Stopwatch::new(); +--- assert_eq!(stopwatch.elapsed_secs(), 0.0); +--- +--- stopwatch.tick(Duration::from_secs_f32(1.0)); // tick one second +--- assert_eq!(stopwatch.elapsed_secs(), 1.0); +--- +--- stopwatch.pause(); +--- stopwatch.tick(Duration::from_secs_f32(1.0)); // paused stopwatches don't tick +--- assert_eq!(stopwatch.elapsed_secs(), 1.0); +--- +--- stopwatch.reset(); // reset the stopwatch +--- assert!(stopwatch.is_paused()); +--- assert_eq!(stopwatch.elapsed_secs(), 0.0); +--- ``` ---@field elapsed ? Duration ---@field is_paused ? boolean Stopwatch = {} ----@package ---@param _self Stopwatch - ----@return [] +---@return nil function Stopwatch:pause(_self) end ----@package ---@return Stopwatch function Stopwatch.new() end ----@package ---@param _self Stopwatch - ---@return Stopwatch function Stopwatch:clone(_self) end ----@package ---@param _self Stopwatch - ---@return number function Stopwatch:elapsed_secs(_self) end ----@package ---@param _self Stopwatch - ---@param time Duration - ----@return [] +---@return nil function Stopwatch:set_elapsed(_self,time) end ----@package ---@param _self Stopwatch - ---@param other Stopwatch - ---@return boolean function Stopwatch:eq(_self,other) end ----@package ---@param _self Stopwatch - ----@return [] +---@return nil function Stopwatch:reset(_self) end ----@package ---@param _self Stopwatch - ---@return Duration function Stopwatch:elapsed(_self) end ----@package ---@param _self Stopwatch - ----@return [] +---@return nil function Stopwatch:unpause(_self) end ----@package ---@param _self Stopwatch - ---@return boolean function Stopwatch:is_paused(_self) end ----@package ---@param _self Stopwatch - ---@return number function Stopwatch:elapsed_secs_f64(_self) end ----@package ---@param _self Stopwatch - ----@return [] +---@return nil function Stopwatch:assert_receiver_is_total_eq(_self) end ----@class Timer ---- Tracks elapsed time. Enters the finished state once `duration` is reached.--- --- Non repeating timers will stop tracking and stay in the finished state until reset.--- Repeating timers will only be in the finished state on each tick `duration` is reached or--- exceeded, and can still be reset at any given point.--- --- Paused timers will not have elapsed time increased.--- --- Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called. +---@class Timer : ReflectReference +--- Tracks elapsed time. Enters the finished state once `duration` is reached. +--- +--- Non repeating timers will stop tracking and stay in the finished state until reset. +--- Repeating timers will only be in the finished state on each tick `duration` is reached or +--- exceeded, and can still be reset at any given point. +--- +--- Paused timers will not have elapsed time increased. +--- +--- Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called. ---@field stopwatch ? Stopwatch ---@field duration ? Duration ---@field mode ? TimerMode @@ -7242,20735 +6508,15398 @@ function Stopwatch:assert_receiver_is_total_eq(_self) end ---@field times_finished_this_tick ? integer Timer = {} ----@package ---@param duration Duration - ---@param mode TimerMode - ---@return Timer function Timer.new(duration,mode) end ----@package ---@param _self Timer - ---@param other Timer - ---@return boolean function Timer:eq(_self,other) end ----@package ---@param _self Timer - ----@return [] +---@return nil function Timer:unpause(_self) end ----@package ---@param _self Timer - ---@return boolean function Timer:just_finished(_self) end ----@package ---@param _self Timer - ---@param duration Duration - ----@return [] +---@return nil function Timer:set_duration(_self,duration) end ----@package ---@param _self Timer - ---@return boolean function Timer:paused(_self) end ----@package ---@param _self Timer - ---@return TimerMode function Timer:mode(_self) end ----@package ---@param _self Timer - ---@return Duration function Timer:duration(_self) end ----@package ---@param _self Timer - ---@param time Duration - ----@return [] +---@return nil function Timer:set_elapsed(_self,time) end ----@package ---@param duration number - ---@param mode TimerMode - ---@return Timer function Timer.from_seconds(duration,mode) end ----@package ---@param _self Timer - ----@return [] +---@return nil function Timer:reset(_self) end ----@package ---@param _self Timer - ---@return boolean function Timer:finished(_self) end ----@package ---@param _self Timer - ---@return Duration function Timer:remaining(_self) end ----@package ---@param _self Timer - ---@return number function Timer:elapsed_secs(_self) end ----@package ---@param _self Timer - ---@return number function Timer:remaining_secs(_self) end ----@package ---@param _self Timer - ----@return [] +---@return nil function Timer:assert_receiver_is_total_eq(_self) end ----@package ---@param _self Timer - ---@return number function Timer:fraction_remaining(_self) end ----@package ---@param _self Timer - ---@return number function Timer:fraction(_self) end ----@package ---@param _self Timer - ---@return number function Timer:elapsed_secs_f64(_self) end ----@package ---@param _self Timer - ---@return integer function Timer:times_finished_this_tick(_self) end ----@package ---@param _self Timer - ---@return Duration function Timer:elapsed(_self) end ----@package ---@param _self Timer - ---@param mode TimerMode - ----@return [] +---@return nil function Timer:set_mode(_self,mode) end ----@package ---@param _self Timer - ---@return Timer function Timer:clone(_self) end ----@package ---@param _self Timer - ----@return [] +---@return nil function Timer:pause(_self) end ----@class TimerMode +---@class TimerMode : ReflectReference --- Specifies [`Timer`] behavior. TimerMode = {} ----@package ---@param _self TimerMode - ---@return TimerMode function TimerMode:clone(_self) end ----@package ---@param _self TimerMode - ---@param other TimerMode - ---@return boolean function TimerMode:eq(_self,other) end ----@package ---@param _self TimerMode - ----@return [] +---@return nil function TimerMode:assert_receiver_is_total_eq(_self) end ----@class Virtual ---- The virtual game clock representing game time.--- --- A specialization of the [`Time`] structure. **For method documentation, see--- [`Time#impl-Time`].**--- --- Normally used as `Time`. It is automatically inserted as a resource--- by [`TimePlugin`](crate::TimePlugin) and updated based on--- [`Time`](Real). The virtual clock is automatically set as the default--- generic [`Time`] resource for the update.--- --- The virtual clock differs from real time clock in that it can be paused, sped up--- and slowed down. It also limits how much it can advance in a single update--- in order to prevent unexpected behavior in cases where updates do not happen--- at regular intervals (e.g. coming back after the program was suspended a long time).--- --- The virtual clock can be paused by calling [`pause()`](Time::pause) and--- unpaused by calling [`unpause()`](Time::unpause). When the game clock is--- paused [`delta()`](Time::delta) will be zero on each update, and--- [`elapsed()`](Time::elapsed) will not grow.--- [`effective_speed()`](Time::effective_speed) will return `0.0`. Calling--- [`pause()`](Time::pause) will not affect value the [`delta()`](Time::delta)--- value for the update currently being processed.--- --- The speed of the virtual clock can be changed by calling--- [`set_relative_speed()`](Time::set_relative_speed). A value of `2.0` means--- that virtual clock should advance twice as fast as real time, meaning that--- [`delta()`](Time::delta) values will be double of what--- [`Time::delta()`](Time::delta) reports and--- [`elapsed()`](Time::elapsed) will go twice as fast as--- [`Time::elapsed()`](Time::elapsed). Calling--- [`set_relative_speed()`](Time::set_relative_speed) will not affect the--- [`delta()`](Time::delta) value for the update currently being processed.--- --- The maximum amount of delta time that can be added by a single update can be--- set by [`set_max_delta()`](Time::set_max_delta). This value serves a dual--- purpose in the virtual clock.--- --- If the game temporarily freezes due to any reason, such as disk access, a--- blocking system call, or operating system level suspend, reporting the full--- elapsed delta time is likely to cause bugs in game logic. Usually if a--- laptop is suspended for an hour, it doesn't make sense to try to simulate--- the game logic for the elapsed hour when resuming. Instead it is better to--- lose the extra time and pretend a shorter duration of time passed. Setting--- [`max_delta()`](Time::max_delta) to a relatively short time means that the--- impact on game logic will be minimal.--- --- If the game lags for some reason, meaning that it will take a longer time to--- compute a frame than the real time that passes during the computation, then--- we would fall behind in processing virtual time. If this situation persists,--- and computing a frame takes longer depending on how much virtual time has--- passed, the game would enter a "death spiral" where computing each frame--- takes longer and longer and the game will appear to freeze. By limiting the--- maximum time that can be added at once, we also limit the amount of virtual--- time the game needs to compute for each frame. This means that the game will--- run slow, and it will run slower than real time, but it will not freeze and--- it will recover as soon as computation becomes fast again.--- --- You should set [`max_delta()`](Time::max_delta) to a value that is--- approximately the minimum FPS your game should have even if heavily lagged--- for a moment. The actual FPS when lagged will be somewhat lower than this,--- depending on how much more time it takes to compute a frame compared to real--- time. You should also consider how stable your FPS is, as the limit will--- also dictate how big of an FPS drop you can accept without losing time and--- falling behind real time. +---@class Virtual : ReflectReference +--- The virtual game clock representing game time. +--- +--- A specialization of the [`Time`] structure. **For method documentation, see +--- [`Time#impl-Time`].** +--- +--- Normally used as `Time`. It is automatically inserted as a resource +--- by [`TimePlugin`](crate::TimePlugin) and updated based on +--- [`Time`](Real). The virtual clock is automatically set as the default +--- generic [`Time`] resource for the update. +--- +--- The virtual clock differs from real time clock in that it can be paused, sped up +--- and slowed down. It also limits how much it can advance in a single update +--- in order to prevent unexpected behavior in cases where updates do not happen +--- at regular intervals (e.g. coming back after the program was suspended a long time). +--- +--- The virtual clock can be paused by calling [`pause()`](Time::pause) and +--- unpaused by calling [`unpause()`](Time::unpause). When the game clock is +--- paused [`delta()`](Time::delta) will be zero on each update, and +--- [`elapsed()`](Time::elapsed) will not grow. +--- [`effective_speed()`](Time::effective_speed) will return `0.0`. Calling +--- [`pause()`](Time::pause) will not affect value the [`delta()`](Time::delta) +--- value for the update currently being processed. +--- +--- The speed of the virtual clock can be changed by calling +--- [`set_relative_speed()`](Time::set_relative_speed). A value of `2.0` means +--- that virtual clock should advance twice as fast as real time, meaning that +--- [`delta()`](Time::delta) values will be double of what +--- [`Time::delta()`](Time::delta) reports and +--- [`elapsed()`](Time::elapsed) will go twice as fast as +--- [`Time::elapsed()`](Time::elapsed). Calling +--- [`set_relative_speed()`](Time::set_relative_speed) will not affect the +--- [`delta()`](Time::delta) value for the update currently being processed. +--- +--- The maximum amount of delta time that can be added by a single update can be +--- set by [`set_max_delta()`](Time::set_max_delta). This value serves a dual +--- purpose in the virtual clock. +--- +--- If the game temporarily freezes due to any reason, such as disk access, a +--- blocking system call, or operating system level suspend, reporting the full +--- elapsed delta time is likely to cause bugs in game logic. Usually if a +--- laptop is suspended for an hour, it doesn't make sense to try to simulate +--- the game logic for the elapsed hour when resuming. Instead it is better to +--- lose the extra time and pretend a shorter duration of time passed. Setting +--- [`max_delta()`](Time::max_delta) to a relatively short time means that the +--- impact on game logic will be minimal. +--- +--- If the game lags for some reason, meaning that it will take a longer time to +--- compute a frame than the real time that passes during the computation, then +--- we would fall behind in processing virtual time. If this situation persists, +--- and computing a frame takes longer depending on how much virtual time has +--- passed, the game would enter a "death spiral" where computing each frame +--- takes longer and longer and the game will appear to freeze. By limiting the +--- maximum time that can be added at once, we also limit the amount of virtual +--- time the game needs to compute for each frame. This means that the game will +--- run slow, and it will run slower than real time, but it will not freeze and +--- it will recover as soon as computation becomes fast again. +--- +--- You should set [`max_delta()`](Time::max_delta) to a value that is +--- approximately the minimum FPS your game should have even if heavily lagged +--- for a moment. The actual FPS when lagged will be somewhat lower than this, +--- depending on how much more time it takes to compute a frame compared to real +--- time. You should also consider how stable your FPS is, as the limit will +--- also dictate how big of an FPS drop you can accept without losing time and +--- falling behind real time. ---@field max_delta ? Duration ---@field paused ? boolean ---@field relative_speed ? number ---@field effective_speed ? number Virtual = {} ----@package ---@param _self Virtual - ---@return Virtual function Virtual:clone(_self) end ----@class GlobalTransform ---- [`GlobalTransform`] is an affine transformation from entity-local coordinates to worldspace coordinates.--- --- You cannot directly mutate [`GlobalTransform`]; instead, you change an entity's transform by manipulating--- its [`Transform`], which indirectly causes Bevy to update its [`GlobalTransform`].--- --- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * For transform hierarchies to work correctly, you must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] transforms an entity relative to its parent's reference frame, or relative to world space coordinates,--- if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is managed by Bevy; it is computed by successively applying the [`Transform`] of each ancestor--- entity which has a Transform. This is done automatically by Bevy-internal systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity in this schedule or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs +---@class GlobalTransform : ReflectReference +--- [`GlobalTransform`] is an affine transformation from entity-local coordinates to worldspace coordinates. +--- +--- You cannot directly mutate [`GlobalTransform`]; instead, you change an entity's transform by manipulating +--- its [`Transform`], which indirectly causes Bevy to update its [`GlobalTransform`]. +--- +--- * To get the global transform of an entity, you should get its [`GlobalTransform`]. +--- * For transform hierarchies to work correctly, you must have both a [`Transform`] and a [`GlobalTransform`]. +--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted. +--- +--- ## [`Transform`] and [`GlobalTransform`] +--- +--- [`Transform`] transforms an entity relative to its parent's reference frame, or relative to world space coordinates, +--- if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component. +--- +--- [`GlobalTransform`] is managed by Bevy; it is computed by successively applying the [`Transform`] of each ancestor +--- entity which has a Transform. This is done automatically by Bevy-internal systems in the system set +--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate). +--- +--- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you +--- update the [`Transform`] of an entity in this schedule or after, you will notice a 1 frame lag +--- before the [`GlobalTransform`] is updated. +--- +--- # Examples +--- +--- - [`transform`][transform_example] +--- +--- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs ---@field [1] ? Affine3A GlobalTransform = {} ----@package ---@param scale Vec3 - ---@return GlobalTransform function GlobalTransform.from_scale(scale) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@return GlobalTransform function GlobalTransform.from_xyz(x,y,z) end ----@package ---@param _self GlobalTransform - ---@return Dir3 function GlobalTransform:left(_self) end ----@package ---@param _self GlobalTransform - ---@param value Vec3 - ---@return Vec3 function GlobalTransform:mul(_self,value) end ----@package ---@param _self GlobalTransform - ---@return Dir3 function GlobalTransform:up(_self) end ----@package ---@param _self GlobalTransform - ---@return Vec3A function GlobalTransform:translation_vec3a(_self) end ----@package ---@param _self GlobalTransform - ---@param point Vec3 - ---@return Vec3 function GlobalTransform:transform_point(_self,point) end ----@package ---@param rotation Quat - ---@return GlobalTransform function GlobalTransform.from_rotation(rotation) end ----@package ---@param _self GlobalTransform - ---@return Quat function GlobalTransform:rotation(_self) end ----@package ---@param _self GlobalTransform - ---@return Dir3 function GlobalTransform:forward(_self) end ----@package ---@param _self GlobalTransform - ---@return Vec3 function GlobalTransform:scale(_self) end ----@package ---@param _self GlobalTransform - ---@return Dir3 function GlobalTransform:down(_self) end ----@package ----@param iso Isometry3d +---@param p1 GlobalTransform +---@param p2 GlobalTransform +---@return GlobalTransform +function GlobalTransform:mul(p1,p2) end +---@param iso Isometry3d ---@return GlobalTransform function GlobalTransform.from_isometry(iso) end ----@package ---@param _self GlobalTransform - ---@return GlobalTransform function GlobalTransform:clone(_self) end ----@package ---@param _self GlobalTransform - ---@return Transform function GlobalTransform:compute_transform(_self) end ----@package ---@param _self GlobalTransform - ---@return Affine3A function GlobalTransform:affine(_self) end ----@package ---@param _self GlobalTransform - ---@param parent GlobalTransform - ---@return Transform function GlobalTransform:reparented_to(_self,parent) end ----@package ----@param _self GlobalTransform +---@param p1 GlobalTransform +---@param p2 Transform +---@return GlobalTransform +function GlobalTransform:mul(p1,p2) end +---@param _self GlobalTransform ---@return Vec3 function GlobalTransform:translation(_self) end ----@package ---@param _self GlobalTransform - ---@return Mat4 function GlobalTransform:compute_matrix(_self) end ----@package ---@param _self GlobalTransform - ---@param extents Vec3A - ---@return number function GlobalTransform:radius_vec3a(_self,extents) end ----@package ---@param _self GlobalTransform - ---@param transform Transform - ---@return GlobalTransform function GlobalTransform:mul_transform(_self,transform) end ----@package ---@param _self GlobalTransform - ---@return Dir3 function GlobalTransform:back(_self) end ----@package ---@param _self GlobalTransform - ---@return Dir3 function GlobalTransform:right(_self) end ----@package ---@param translation Vec3 - ---@return GlobalTransform function GlobalTransform.from_translation(translation) end ----@package ---@param _self GlobalTransform - ---@return Isometry3d function GlobalTransform:to_isometry(_self) end ----@package ---@param _self GlobalTransform - ---@param other GlobalTransform - ---@return boolean function GlobalTransform:eq(_self,other) end ----@class Transform ---- Describe the position of an entity. If the entity has a parent, the position is relative--- to its parent position.--- --- * To place or move an entity, you should set its [`Transform`].--- * To get the global transform of an entity, you should get its [`GlobalTransform`].--- * To be displayed, an entity must have both a [`Transform`] and a [`GlobalTransform`].--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted.--- --- ## [`Transform`] and [`GlobalTransform`]--- --- [`Transform`] is the position of an entity relative to its parent position, or the reference--- frame if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component.--- --- [`GlobalTransform`] is the position of an entity relative to the reference frame.--- --- [`GlobalTransform`] is updated from [`Transform`] by systems in the system set--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate).--- --- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you--- update the [`Transform`] of an entity during this set or after, you will notice a 1 frame lag--- before the [`GlobalTransform`] is updated.--- --- # Examples--- --- - [`transform`][transform_example]--- --- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs +---@class Transform : ReflectReference +--- Describe the position of an entity. If the entity has a parent, the position is relative +--- to its parent position. +--- +--- * To place or move an entity, you should set its [`Transform`]. +--- * To get the global transform of an entity, you should get its [`GlobalTransform`]. +--- * To be displayed, an entity must have both a [`Transform`] and a [`GlobalTransform`]. +--- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted. +--- +--- ## [`Transform`] and [`GlobalTransform`] +--- +--- [`Transform`] is the position of an entity relative to its parent position, or the reference +--- frame if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component. +--- +--- [`GlobalTransform`] is the position of an entity relative to the reference frame. +--- +--- [`GlobalTransform`] is updated from [`Transform`] by systems in the system set +--- [`TransformPropagate`](crate::TransformSystem::TransformPropagate). +--- +--- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you +--- update the [`Transform`] of an entity during this set or after, you will notice a 1 frame lag +--- before the [`GlobalTransform`] is updated. +--- +--- # Examples +--- +--- - [`transform`][transform_example] +--- +--- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs ---@field translation ? Vec3 ---@field rotation ? Quat ---@field scale ? Vec3 Transform = {} ----@package ---@param _self Transform - ---@return boolean function Transform:is_finite(_self) end ----@package ---@param _self Transform - ---@param point Vec3 - ---@param rotation Quat - ----@return [] +---@return nil function Transform:rotate_around(_self,point,rotation) end ----@package ---@param translation Vec3 - ---@return Transform function Transform.from_translation(translation) end ----@package ---@param _self Transform - ---@return Dir3 function Transform:right(_self) end ----@package ----@param _self Transform +---@param p1 Transform +---@param p2 GlobalTransform +---@return GlobalTransform +function Transform:mul(p1,p2) end +---@param _self Transform ---@param value Vec3 - ---@return Vec3 function Transform:mul(_self,value) end ----@package ---@param _self Transform - ---@return Dir3 function Transform:left(_self) end ----@package ---@param _self Transform - ---@param angle number - ----@return [] +---@return nil function Transform:rotate_local_z(_self,angle) end ----@package ---@param _self Transform - ---@return Dir3 function Transform:local_y(_self) end ----@package ---@param _self Transform - ---@param point Vec3 - ---@param rotation Quat - ----@return [] +---@return nil function Transform:translate_around(_self,point,rotation) end ----@package ---@param _self Transform - ---@return Affine3A function Transform:compute_affine(_self) end ----@package ---@param _self Transform - ---@param translation Vec3 - ---@return Transform function Transform:with_translation(_self,translation) end ----@package ---@param _self Transform - ---@param angle number - ----@return [] +---@return nil function Transform:rotate_z(_self,angle) end ----@package ---@param _self Transform - ---@param rotation Quat - ----@return [] +---@return nil function Transform:rotate(_self,rotation) end ----@package ---@param _self Transform - ---@return Dir3 function Transform:forward(_self) end ----@package ---@param _self Transform - ---@param angle number - ----@return [] +---@return nil function Transform:rotate_x(_self,angle) end ----@package ---@param _self Transform - ---@param rotation Quat - ---@return Transform function Transform:with_rotation(_self,rotation) end ----@package ---@param _self Transform - ---@return Dir3 function Transform:up(_self) end ----@package ---@param _self Transform - ---@return Dir3 function Transform:local_x(_self) end ----@package ---@param _self Transform - ---@param point Vec3 - ---@return Vec3 function Transform:transform_point(_self,point) end ----@package ---@param _self Transform - ---@param angle number - ----@return [] +---@return nil function Transform:rotate_y(_self,angle) end ----@package ---@param _self Transform - ---@param transform Transform - ---@return Transform function Transform:mul_transform(_self,transform) end ----@package ---@param _self Transform - ---@return Dir3 function Transform:down(_self) end ----@package ---@param _self Transform - ---@param other Transform - ---@return boolean function Transform:eq(_self,other) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@return Transform function Transform.from_xyz(x,y,z) end ----@package ---@param rotation Quat - ---@return Transform function Transform.from_rotation(rotation) end ----@package ---@param _self Transform - ---@param axis Dir3 - ---@param angle number - ----@return [] +---@return nil function Transform:rotate_axis(_self,axis,angle) end ----@package ---@param _self Transform - ---@param scale Vec3 - ---@return Transform function Transform:with_scale(_self,scale) end ----@package ---@param _self Transform - ---@return Transform function Transform:clone(_self) end ----@package ---@param iso Isometry3d - ---@return Transform function Transform.from_isometry(iso) end ----@package ---@param _self Transform - ---@return Dir3 function Transform:back(_self) end ----@package ---@param _self Transform - ---@return Mat4 function Transform:compute_matrix(_self) end ----@package ----@param _self Transform +---@param p1 Transform +---@param p2 Transform +---@return Transform +function Transform:mul(p1,p2) end +---@param _self Transform ---@param angle number - ----@return [] +---@return nil function Transform:rotate_local_y(_self,angle) end ----@package ---@param _self Transform - ---@return Dir3 function Transform:local_z(_self) end ----@package ---@param world_from_local Mat4 - ---@return Transform function Transform.from_matrix(world_from_local) end ----@package ---@param scale Vec3 - ---@return Transform function Transform.from_scale(scale) end ----@package ---@param _self Transform - ---@param angle number - ----@return [] +---@return nil function Transform:rotate_local_x(_self,angle) end ----@package ---@param _self Transform - ---@param axis Dir3 - ---@param angle number - ----@return [] +---@return nil function Transform:rotate_local_axis(_self,axis,angle) end ----@package ---@param _self Transform - ---@param rotation Quat - ----@return [] +---@return nil function Transform:rotate_local(_self,rotation) end ----@package ---@param _self Transform - ---@return Isometry3d function Transform:to_isometry(_self) end ----@class TransformTreeChanged ---- An optimization for transform propagation. This ZST marker component uses change detection to--- mark all entities of the hierarchy as "dirty" if any of their descendants have a changed--- `Transform`. If this component is *not* marked `is_changed()`, propagation will halt. +---@class TransformTreeChanged : ReflectReference +--- An optimization for transform propagation. This ZST marker component uses change detection to +--- mark all entities of the hierarchy as "dirty" if any of their descendants have a changed +--- `Transform`. If this component is *not* marked `is_changed()`, propagation will halt. TransformTreeChanged = {} ----@package ---@param _self TransformTreeChanged - ---@return TransformTreeChanged function TransformTreeChanged:clone(_self) end ----@package ---@param _self TransformTreeChanged - ---@param other TransformTreeChanged - ---@return boolean function TransformTreeChanged:eq(_self,other) end ----@class TypeId - +---@class TypeId : ReflectReference TypeId = {} ----@package ---@param _self TypeId - ---@param other TypeId - ---@return boolean function TypeId:eq(_self,other) end ----@package ---@param _self TypeId - ----@return [] +---@return nil function TypeId:assert_receiver_is_total_eq(_self) end ----@package ---@param _self TypeId - ---@return TypeId function TypeId:clone(_self) end ----@class SocketAddr - +---@class SocketAddr : ReflectReference SocketAddr = {} ----@package ---@param _self SocketAddr - ---@param new_port integer - ----@return [] +---@return nil function SocketAddr:set_port(_self,new_port) end ----@package ---@param _self SocketAddr - ---@return boolean function SocketAddr:is_ipv4(_self) end ----@package ---@param _self SocketAddr - ---@param other SocketAddr - ---@return boolean function SocketAddr:eq(_self,other) end ----@package ---@param _self SocketAddr - ----@return [] +---@return nil function SocketAddr:assert_receiver_is_total_eq(_self) end ----@package ---@param _self SocketAddr - ---@return SocketAddr function SocketAddr:clone(_self) end ----@package ---@param _self SocketAddr - ---@return integer function SocketAddr:port(_self) end ----@package ---@param _self SocketAddr - ---@return boolean function SocketAddr:is_ipv6(_self) end ----@class RangeFull - +---@class RangeFull : ReflectReference RangeFull = {} ----@package ---@param _self RangeFull - ---@param other RangeFull - ---@return boolean function RangeFull:eq(_self,other) end ----@package ---@param _self RangeFull - ---@return RangeFull function RangeFull:clone(_self) end ----@package ---@param _self RangeFull - ----@return [] +---@return nil function RangeFull:assert_receiver_is_total_eq(_self) end ----@class AtomicBool - +---@class AtomicBool : ReflectReference AtomicBool = {} ----@package ---@param _self AtomicBool - ---@return boolean function AtomicBool:into_inner(_self) end ----@package ---@param v boolean - ---@return AtomicBool function AtomicBool.new(v) end ----@class AtomicI16 - +---@class AtomicI16 : ReflectReference AtomicI16 = {} ----@package ---@param v integer - ---@return AtomicI16 function AtomicI16.new(v) end ----@package ---@param _self AtomicI16 - ---@return integer function AtomicI16:into_inner(_self) end ----@class AtomicI32 - +---@class AtomicI32 : ReflectReference AtomicI32 = {} ----@package ---@param _self AtomicI32 - ---@return integer function AtomicI32:into_inner(_self) end ----@package ---@param v integer - ---@return AtomicI32 function AtomicI32.new(v) end ----@class AtomicI64 - +---@class AtomicI64 : ReflectReference AtomicI64 = {} ----@package ---@param _self AtomicI64 - ---@return integer function AtomicI64:into_inner(_self) end ----@package ---@param v integer - ---@return AtomicI64 function AtomicI64.new(v) end ----@class AtomicI8 - +---@class AtomicI8 : ReflectReference AtomicI8 = {} ----@package ---@param v integer - ---@return AtomicI8 function AtomicI8.new(v) end ----@package ---@param _self AtomicI8 - ---@return integer function AtomicI8:into_inner(_self) end ----@class AtomicIsize - +---@class AtomicIsize : ReflectReference AtomicIsize = {} ----@package ---@param v integer - ---@return AtomicIsize function AtomicIsize.new(v) end ----@package ---@param _self AtomicIsize - ---@return integer function AtomicIsize:into_inner(_self) end ----@class AtomicU16 - +---@class AtomicU16 : ReflectReference AtomicU16 = {} ----@package ---@param _self AtomicU16 - ---@return integer function AtomicU16:into_inner(_self) end ----@package ---@param v integer - ---@return AtomicU16 function AtomicU16.new(v) end ----@class AtomicU32 - +---@class AtomicU32 : ReflectReference AtomicU32 = {} ----@package ---@param _self AtomicU32 - ---@return integer function AtomicU32:into_inner(_self) end ----@package ---@param v integer - ---@return AtomicU32 function AtomicU32.new(v) end ----@class AtomicU64 - +---@class AtomicU64 : ReflectReference AtomicU64 = {} ----@package ---@param _self AtomicU64 - ---@return integer function AtomicU64:into_inner(_self) end ----@package ---@param v integer - ---@return AtomicU64 function AtomicU64.new(v) end ----@class AtomicU8 - +---@class AtomicU8 : ReflectReference AtomicU8 = {} ----@package ---@param v integer - ---@return AtomicU8 function AtomicU8.new(v) end ----@package ---@param _self AtomicU8 - ---@return integer function AtomicU8:into_inner(_self) end ----@class AtomicUsize - +---@class AtomicUsize : ReflectReference AtomicUsize = {} ----@package ---@param v integer - ---@return AtomicUsize function AtomicUsize.new(v) end ----@package ---@param _self AtomicUsize - ---@return integer function AtomicUsize:into_inner(_self) end ----@class Duration - +---@class Duration : ReflectReference Duration = {} ----@package ---@param _self Duration - ---@return integer function Duration:as_secs(_self) end ----@package ---@param _self Duration - ---@param other Duration - ---@return Duration function Duration:abs_diff(_self,other) end ----@package ---@param _self Duration - ---@param rhs Duration - ---@return Duration function Duration:sub(_self,rhs) end ----@package ---@param _self Duration - ---@param rhs integer - ---@return Duration function Duration:saturating_mul(_self,rhs) end ----@package ---@param _self Duration - ---@param rhs number - ---@return Duration function Duration:div_f64(_self,rhs) end ----@package ---@param _self Duration - ---@param rhs Duration - ---@return Duration function Duration:saturating_sub(_self,rhs) end ----@package ---@param _self Duration - ---@return integer function Duration:as_nanos(_self) end ----@package ---@param _self Duration - ---@return integer function Duration:subsec_nanos(_self) end ----@package ---@param secs integer - ---@return Duration function Duration.from_secs(secs) end ----@package ---@param _self Duration - ---@return integer function Duration:as_micros(_self) end ----@package ---@param _self Duration - ---@return number function Duration:as_secs_f64(_self) end ----@package ---@param _self Duration - ---@param rhs integer - ---@return Duration function Duration:div(_self,rhs) end ----@package ---@param _self Duration - ---@return integer function Duration:subsec_micros(_self) end ----@package ---@param secs number - ---@return Duration function Duration.from_secs_f32(secs) end ----@package ---@param _self Duration - ---@param rhs number - ---@return Duration function Duration:mul_f32(_self,rhs) end ----@package ---@param _self Duration - ---@param rhs integer - ---@return Duration function Duration:mul(_self,rhs) end ----@package ---@param nanos integer - ---@return Duration function Duration.from_nanos(nanos) end ----@package ---@param _self Duration - ---@return integer function Duration:as_millis(_self) end ----@package ---@param _self Duration - ---@return number function Duration:as_secs_f32(_self) end ----@package ---@param _self Duration - ---@param rhs Duration - ---@return number function Duration:div_duration_f32(_self,rhs) end ----@package ---@param _self Duration - ----@return [] +---@return nil function Duration:assert_receiver_is_total_eq(_self) end ----@package ---@param secs number - ---@return Duration function Duration.from_secs_f64(secs) end ----@package ---@param _self Duration - ---@param other Duration - ---@return boolean function Duration:eq(_self,other) end ----@package ---@param _self Duration - ---@param rhs number - ---@return Duration function Duration:mul_f64(_self,rhs) end ----@package ---@param _self Duration - ---@param rhs number - ---@return Duration function Duration:div_f32(_self,rhs) end ----@package ---@param micros integer - ---@return Duration function Duration.from_micros(micros) end ----@package ---@param _self Duration - ---@param rhs Duration - ---@return number function Duration:div_duration_f64(_self,rhs) end ----@package ---@param _self Duration - ---@return integer function Duration:subsec_millis(_self) end ----@package ---@param _self Duration - ---@param rhs Duration - ---@return Duration function Duration:saturating_add(_self,rhs) end ----@package ---@param _self Duration - ---@return boolean function Duration:is_zero(_self) end ----@package ---@param _self Duration - ---@param rhs Duration - ---@return Duration function Duration:add(_self,rhs) end ----@package ---@param secs integer - ---@param nanos integer - ---@return Duration function Duration.new(secs,nanos) end ----@package ---@param millis integer - ---@return Duration function Duration.from_millis(millis) end ----@package ---@param _self Duration - ---@return Duration function Duration:clone(_self) end ----@class Affine2 - +---@class Affine2 : ReflectReference ---@field matrix2 ? Mat2 ---@field translation ? Vec2 Affine2 = {} ----@package ---@param matrix2 Mat2 - ---@param translation Vec2 - ---@return Affine2 function Affine2.from_mat2_translation(matrix2,translation) end ----@package ---@param scale Vec2 - ---@return Affine2 function Affine2.from_scale(scale) end ----@package ---@param matrix2 Mat2 - ---@return Affine2 function Affine2.from_mat2(matrix2) end ----@package ---@param _self Affine2 - ---@param rhs Affine2 - ---@return boolean function Affine2:eq(_self,rhs) end ----@package ---@param _self Affine2 - ---@return number[][] function Affine2:to_cols_array_2d(_self) end ----@package ---@param _self Affine2 - ---@return boolean function Affine2:is_finite(_self) end ----@package ---@param translation Vec2 - ---@return Affine2 function Affine2.from_translation(translation) end ----@package ---@param _self Affine2 - ---@param rhs Affine2 - ---@return Affine2 function Affine2:mul(_self,rhs) end ----@package ---@param _self Affine2 - ---@return Affine2 function Affine2:clone(_self) end ----@package ---@param m Mat3 - ---@return Affine2 function Affine2.from_mat3(m) end ----@package ----@param _self Affine2 +---@param p1 Affine2 +---@param p2 Mat3A +---@return Mat3A +function Affine2:mul(p1,p2) end +---@param _self Affine2 ---@param rhs Affine2 - ---@param max_abs_diff number - ---@return boolean function Affine2:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param angle number - ---@return Affine2 function Affine2.from_angle(angle) end ----@package ---@param _self Affine2 - ---@return Affine2 function Affine2:inverse(_self) end ----@package ----@param x_axis Vec2 +---@param p1 Affine2 +---@param p2 Mat3 +---@return Mat3 +function Affine2:mul(p1,p2) end +---@param x_axis Vec2 ---@param y_axis Vec2 - ---@param z_axis Vec2 - ---@return Affine2 function Affine2.from_cols(x_axis,y_axis,z_axis) end ----@package ---@param m Mat3A - ---@return Affine2 function Affine2.from_mat3a(m) end ----@package ---@param _self Affine2 - ---@param rhs Vec2 - ---@return Vec2 function Affine2:transform_point2(_self,rhs) end ----@package ---@param _self Affine2 - ---@return boolean function Affine2:is_nan(_self) end ----@package ---@param _self Affine2 - ---@return number[] function Affine2:to_cols_array(_self) end ----@package ---@param _self Affine2 - ---@param rhs Vec2 - ---@return Vec2 function Affine2:transform_vector2(_self,rhs) end ----@package ---@param scale Vec2 - ---@param angle number - ---@param translation Vec2 - ---@return Affine2 function Affine2.from_scale_angle_translation(scale,angle,translation) end ----@package ---@param angle number - ---@param translation Vec2 - ---@return Affine2 function Affine2.from_angle_translation(angle,translation) end ----@class Affine3A - +---@class Affine3A : ReflectReference ---@field matrix3 ? Mat3A ---@field translation ? Vec3A Affine3A = {} ----@package ---@param axis Vec3 - ---@param angle number - ---@return Affine3A function Affine3A.from_axis_angle(axis,angle) end ----@package ---@param angle number - ---@return Affine3A function Affine3A.from_rotation_x(angle) end ----@package ---@param eye Vec3 - ---@param dir Vec3 - ---@param up Vec3 - ---@return Affine3A function Affine3A.look_to_lh(eye,dir,up) end ----@package ---@param _self Affine3A - ---@param rhs Vec3 - ---@return Vec3 function Affine3A:transform_point3(_self,rhs) end ----@package ---@param _self Affine3A - ---@return number[][] function Affine3A:to_cols_array_2d(_self) end ----@package ---@param mat3 Mat3 - ---@return Affine3A function Affine3A.from_mat3(mat3) end ----@package ---@param scale Vec3 - ---@return Affine3A function Affine3A.from_scale(scale) end ----@package ----@param scale Vec3 +---@param p1 Affine3A +---@param p2 Mat4 +---@return Mat4 +function Affine3A:mul(p1,p2) end +---@param scale Vec3 ---@param rotation Quat - ---@param translation Vec3 - ---@return Affine3A function Affine3A.from_scale_rotation_translation(scale,rotation,translation) end ----@package ---@param _self Affine3A - ---@param rhs Affine3A - ---@return boolean function Affine3A:eq(_self,rhs) end ----@package ---@param eye Vec3 - ---@param center Vec3 - ---@param up Vec3 - ---@return Affine3A function Affine3A.look_at_rh(eye,center,up) end ----@package ---@param angle number - ---@return Affine3A function Affine3A.from_rotation_z(angle) end ----@package ---@param rotation Quat - ---@param translation Vec3 - ---@return Affine3A function Affine3A.from_rotation_translation(rotation,translation) end ----@package ---@param eye Vec3 - ---@param center Vec3 - ---@param up Vec3 - ---@return Affine3A function Affine3A.look_at_lh(eye,center,up) end ----@package ---@param _self Affine3A - ---@return Affine3A function Affine3A:inverse(_self) end ----@package ---@param _self Affine3A - ---@param rhs Affine3A - ---@param max_abs_diff number - ---@return boolean function Affine3A:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param mat3 Mat3 - ---@param translation Vec3 - ---@return Affine3A function Affine3A.from_mat3_translation(mat3,translation) end ----@package ---@param _self Affine3A - ---@param rhs Affine3A - ---@return Affine3A function Affine3A:mul(_self,rhs) end ----@package ---@param translation Vec3 - ---@return Affine3A function Affine3A.from_translation(translation) end ----@package ---@param _self Affine3A - ---@param rhs Vec3A - ---@return Vec3A function Affine3A:transform_point3a(_self,rhs) end ----@package ---@param rotation Quat - ---@return Affine3A function Affine3A.from_quat(rotation) end ----@package ---@param _self Affine3A - ---@param rhs Vec3 - ---@return Vec3 function Affine3A:transform_vector3(_self,rhs) end ----@package ---@param x_axis Vec3A - ---@param y_axis Vec3A - ---@param z_axis Vec3A - ---@param w_axis Vec3A - ---@return Affine3A function Affine3A.from_cols(x_axis,y_axis,z_axis,w_axis) end ----@package ---@param _self Affine3A - ---@return boolean function Affine3A:is_nan(_self) end ----@package ---@param _self Affine3A - ---@return number[] function Affine3A:to_cols_array(_self) end ----@package ---@param angle number - ---@return Affine3A function Affine3A.from_rotation_y(angle) end ----@package ---@param _self Affine3A - ---@return Affine3A function Affine3A:clone(_self) end ----@package ---@param _self Affine3A - ---@return boolean function Affine3A:is_finite(_self) end ----@package ---@param eye Vec3 - ---@param dir Vec3 - ---@param up Vec3 - ---@return Affine3A function Affine3A.look_to_rh(eye,dir,up) end ----@package ---@param m Mat4 - ---@return Affine3A function Affine3A.from_mat4(m) end ----@package ---@param _self Affine3A - ---@param rhs Vec3A - ---@return Vec3A function Affine3A:transform_vector3a(_self,rhs) end ----@class BVec2 - +---@class BVec2 : ReflectReference ---@field x ? boolean ---@field y ? boolean BVec2 = {} ----@package ---@param _self BVec2 - ---@param index integer - ---@param value boolean - ----@return [] +---@return nil function BVec2:set(_self,index,value) end ----@package ---@param _self BVec2 - ---@return BVec2 function BVec2:clone(_self) end ----@package ---@param v boolean - ---@return BVec2 function BVec2.splat(v) end ----@package ---@param x boolean - ---@param y boolean - ---@return BVec2 function BVec2.new(x,y) end ----@package ---@param _self BVec2 - ---@param index integer - ---@return boolean function BVec2:test(_self,index) end ----@package ---@param _self BVec2 - ---@param other BVec2 - ---@return boolean function BVec2:eq(_self,other) end ----@package ---@param _self BVec2 - ---@return integer function BVec2:bitmask(_self) end ----@package ---@param _self BVec2 - ----@return [] +---@return nil function BVec2:assert_receiver_is_total_eq(_self) end ----@package ---@param _self BVec2 - ---@return boolean function BVec2:all(_self) end ----@package ---@param _self BVec2 - ---@return boolean function BVec2:any(_self) end ----@package ---@param a boolean[] - ---@return BVec2 function BVec2.from_array(a) end ----@class BVec3 - +---@class BVec3 : ReflectReference ---@field x ? boolean ---@field y ? boolean ---@field z ? boolean BVec3 = {} ----@package ---@param v boolean - ---@return BVec3 function BVec3.splat(v) end ----@package ---@param _self BVec3 - ---@return boolean function BVec3:any(_self) end ----@package ---@param a boolean[] - ---@return BVec3 function BVec3.from_array(a) end ----@package ---@param _self BVec3 - ---@param index integer - ---@param value boolean - ----@return [] +---@return nil function BVec3:set(_self,index,value) end ----@package ---@param _self BVec3 - ---@param index integer - ---@return boolean function BVec3:test(_self,index) end ----@package ---@param _self BVec3 - ---@param other BVec3 - ---@return boolean function BVec3:eq(_self,other) end ----@package ---@param _self BVec3 - ---@return BVec3 function BVec3:clone(_self) end ----@package ---@param _self BVec3 - ----@return [] +---@return nil function BVec3:assert_receiver_is_total_eq(_self) end ----@package ---@param _self BVec3 - ---@return boolean function BVec3:all(_self) end ----@package ---@param _self BVec3 - ---@return integer function BVec3:bitmask(_self) end ----@package ---@param x boolean - ---@param y boolean - ---@param z boolean - ---@return BVec3 function BVec3.new(x,y,z) end ----@class BVec3A - +---@class BVec3A : ReflectReference BVec3A = {} ----@package ---@param x boolean - ---@param y boolean - ---@param z boolean - ---@return BVec3A function BVec3A.new(x,y,z) end ----@package ---@param _self BVec3A - ---@return integer function BVec3A:bitmask(_self) end ----@package ---@param _self BVec3A - ---@return BVec3A function BVec3A:clone(_self) end ----@package ---@param _self BVec3A - ---@return boolean function BVec3A:any(_self) end ----@package ---@param _self BVec3A - ---@param index integer - ---@param value boolean - ----@return [] +---@return nil function BVec3A:set(_self,index,value) end ----@package ---@param a boolean[] - ---@return BVec3A function BVec3A.from_array(a) end ----@package ---@param _self BVec3A - ---@param rhs BVec3A - ---@return boolean function BVec3A:eq(_self,rhs) end ----@package ---@param _self BVec3A - ---@param index integer - ---@return boolean function BVec3A:test(_self,index) end ----@package ---@param v boolean - ---@return BVec3A function BVec3A.splat(v) end ----@package ---@param _self BVec3A - ---@return boolean function BVec3A:all(_self) end ----@class BVec4 - +---@class BVec4 : ReflectReference ---@field x ? boolean ---@field y ? boolean ---@field z ? boolean ---@field w ? boolean BVec4 = {} ----@package ---@param x boolean - ---@param y boolean - ---@param z boolean - ---@param w boolean - ---@return BVec4 function BVec4.new(x,y,z,w) end ----@package ---@param _self BVec4 - ---@param index integer - ---@param value boolean - ----@return [] +---@return nil function BVec4:set(_self,index,value) end ----@package ---@param _self BVec4 - ---@return BVec4 function BVec4:clone(_self) end ----@package ---@param _self BVec4 - ----@return [] +---@return nil function BVec4:assert_receiver_is_total_eq(_self) end ----@package ---@param _self BVec4 - ---@param other BVec4 - ---@return boolean function BVec4:eq(_self,other) end ----@package ---@param _self BVec4 - ---@return integer function BVec4:bitmask(_self) end ----@package ---@param _self BVec4 - ---@return boolean function BVec4:all(_self) end ----@package ---@param a boolean[] - ---@return BVec4 function BVec4.from_array(a) end ----@package ---@param _self BVec4 - ---@return boolean function BVec4:any(_self) end ----@package ---@param v boolean - ---@return BVec4 function BVec4.splat(v) end ----@package ---@param _self BVec4 - ---@param index integer - ---@return boolean function BVec4:test(_self,index) end ----@class BVec4A - +---@class BVec4A : ReflectReference BVec4A = {} ----@package ---@param _self BVec4A - ---@param index integer - ---@return boolean function BVec4A:test(_self,index) end ----@package ---@param _self BVec4A - ---@return BVec4A function BVec4A:clone(_self) end ----@package ---@param _self BVec4A - ---@return boolean function BVec4A:any(_self) end ----@package ---@param _self BVec4A - ---@param index integer - ---@param value boolean - ----@return [] +---@return nil function BVec4A:set(_self,index,value) end ----@package ---@param a boolean[] - ---@return BVec4A function BVec4A.from_array(a) end ----@package ---@param _self BVec4A - ---@return boolean function BVec4A:all(_self) end ----@package ---@param _self BVec4A - ---@param rhs BVec4A - ---@return boolean function BVec4A:eq(_self,rhs) end ----@package ---@param _self BVec4A - ---@return integer function BVec4A:bitmask(_self) end ----@package ---@param x boolean - ---@param y boolean - ---@param z boolean - ---@param w boolean - ---@return BVec4A function BVec4A.new(x,y,z,w) end ----@package ---@param v boolean - ---@return BVec4A function BVec4A.splat(v) end ----@class DAffine2 - +---@class DAffine2 : ReflectReference ---@field matrix2 ? DMat2 ---@field translation ? DVec2 DAffine2 = {} ----@package ---@param angle number - ---@param translation DVec2 - ---@return DAffine2 function DAffine2.from_angle_translation(angle,translation) end ----@package ---@param _self DAffine2 - ---@param rhs DVec2 - ---@return DVec2 function DAffine2:transform_point2(_self,rhs) end ----@package ---@param scale DVec2 - ---@param angle number - ---@param translation DVec2 - ---@return DAffine2 function DAffine2.from_scale_angle_translation(scale,angle,translation) end ----@package ---@param x_axis DVec2 - ---@param y_axis DVec2 - ---@param z_axis DVec2 - ---@return DAffine2 function DAffine2.from_cols(x_axis,y_axis,z_axis) end ----@package ---@param translation DVec2 - ---@return DAffine2 function DAffine2.from_translation(translation) end ----@package ---@param m DMat3 - ---@return DAffine2 function DAffine2.from_mat3(m) end ----@package ---@param _self DAffine2 - ---@param rhs DAffine2 - ---@return boolean function DAffine2:eq(_self,rhs) end ----@package ---@param matrix2 DMat2 - ---@return DAffine2 function DAffine2.from_mat2(matrix2) end ----@package ---@param _self DAffine2 - ---@return boolean function DAffine2:is_finite(_self) end ----@package ----@param matrix2 DMat2 +---@param p1 DAffine2 +---@param p2 DMat3 +---@return DMat3 +function DAffine2:mul(p1,p2) end +---@param matrix2 DMat2 ---@param translation DVec2 - ---@return DAffine2 function DAffine2.from_mat2_translation(matrix2,translation) end ----@package ---@param _self DAffine2 - ---@return number[][] function DAffine2:to_cols_array_2d(_self) end ----@package ---@param _self DAffine2 - ---@return number[] function DAffine2:to_cols_array(_self) end ----@package ---@param _self DAffine2 - ---@param rhs DAffine2 - ---@return DAffine2 function DAffine2:mul(_self,rhs) end ----@package ---@param _self DAffine2 - ---@param rhs DAffine2 - ---@param max_abs_diff number - ---@return boolean function DAffine2:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param angle number - ---@return DAffine2 function DAffine2.from_angle(angle) end ----@package ---@param _self DAffine2 - ---@param rhs DVec2 - ---@return DVec2 function DAffine2:transform_vector2(_self,rhs) end ----@package ---@param scale DVec2 - ---@return DAffine2 function DAffine2.from_scale(scale) end ----@package ---@param _self DAffine2 - ---@return DAffine2 function DAffine2:inverse(_self) end ----@package ---@param _self DAffine2 - ---@return DAffine2 function DAffine2:clone(_self) end ----@package ---@param _self DAffine2 - ---@return boolean function DAffine2:is_nan(_self) end ----@class DAffine3 - +---@class DAffine3 : ReflectReference ---@field matrix3 ? DMat3 ---@field translation ? DVec3 DAffine3 = {} ----@package ---@param eye DVec3 - ---@param dir DVec3 - ---@param up DVec3 - ---@return DAffine3 function DAffine3.look_to_lh(eye,dir,up) end ----@package ---@param mat3 DMat3 - ---@return DAffine3 function DAffine3.from_mat3(mat3) end ----@package ---@param axis DVec3 - ---@param angle number - ---@return DAffine3 function DAffine3.from_axis_angle(axis,angle) end ----@package ---@param angle number - ---@return DAffine3 function DAffine3.from_rotation_y(angle) end ----@package ---@param angle number - ---@return DAffine3 function DAffine3.from_rotation_x(angle) end ----@package ---@param eye DVec3 - ---@param center DVec3 - ---@param up DVec3 - ---@return DAffine3 function DAffine3.look_at_lh(eye,center,up) end ----@package ---@param _self DAffine3 - ---@param rhs DVec3 - ---@return DVec3 function DAffine3:transform_point3(_self,rhs) end ----@package ---@param angle number - ---@return DAffine3 function DAffine3.from_rotation_z(angle) end ----@package ---@param rotation DQuat - ---@param translation DVec3 - ---@return DAffine3 function DAffine3.from_rotation_translation(rotation,translation) end ----@package ---@param rotation DQuat - ---@return DAffine3 function DAffine3.from_quat(rotation) end ----@package ---@param scale DVec3 - ---@param rotation DQuat - ---@param translation DVec3 - ---@return DAffine3 function DAffine3.from_scale_rotation_translation(scale,rotation,translation) end ----@package ---@param _self DAffine3 - ---@param rhs DAffine3 - ---@return DAffine3 function DAffine3:mul(_self,rhs) end ----@package ---@param _self DAffine3 - ---@return DAffine3 function DAffine3:clone(_self) end ----@package ---@param x_axis DVec3 - ---@param y_axis DVec3 - ---@param z_axis DVec3 - ---@param w_axis DVec3 - ---@return DAffine3 function DAffine3.from_cols(x_axis,y_axis,z_axis,w_axis) end ----@package ---@param _self DAffine3 - ---@return boolean function DAffine3:is_nan(_self) end ----@package ---@param _self DAffine3 - ---@param rhs DVec3 - ---@return DVec3 function DAffine3:transform_vector3(_self,rhs) end ----@package ---@param _self DAffine3 - ---@return DAffine3 function DAffine3:inverse(_self) end ----@package ---@param m DMat4 - ---@return DAffine3 function DAffine3.from_mat4(m) end ----@package ---@param eye DVec3 - ---@param center DVec3 - ---@param up DVec3 - ---@return DAffine3 function DAffine3.look_at_rh(eye,center,up) end ----@package ---@param translation DVec3 - ---@return DAffine3 function DAffine3.from_translation(translation) end ----@package ---@param mat3 DMat3 - ---@param translation DVec3 - ---@return DAffine3 function DAffine3.from_mat3_translation(mat3,translation) end ----@package ---@param scale DVec3 - ---@return DAffine3 function DAffine3.from_scale(scale) end ----@package ---@param _self DAffine3 - ---@param rhs DAffine3 - ---@param max_abs_diff number - ---@return boolean function DAffine3:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self DAffine3 - ---@return boolean function DAffine3:is_finite(_self) end ----@package ----@param _self DAffine3 +---@param p1 DAffine3 +---@param p2 DMat4 +---@return DMat4 +function DAffine3:mul(p1,p2) end +---@param _self DAffine3 ---@return number[][] function DAffine3:to_cols_array_2d(_self) end ----@package ---@param _self DAffine3 - ---@param rhs DAffine3 - ---@return boolean function DAffine3:eq(_self,rhs) end ----@package ---@param eye DVec3 - ---@param dir DVec3 - ---@param up DVec3 - ---@return DAffine3 function DAffine3.look_to_rh(eye,dir,up) end ----@package ---@param _self DAffine3 - ---@return number[] function DAffine3:to_cols_array(_self) end ----@class DMat2 - +---@class DMat2 : ReflectReference ---@field x_axis ? DVec2 ---@field y_axis ? DVec2 DMat2 = {} ----@package ---@param _self DMat2 - ---@return number[][] function DMat2:to_cols_array_2d(_self) end ----@package ---@param _self DMat2 - ---@param rhs DMat2 - ---@return DMat2 function DMat2:add(_self,rhs) end ----@package ---@param scale DVec2 - ---@param angle number - ---@return DMat2 function DMat2.from_scale_angle(scale,angle) end ----@package ---@param _self DMat2 - ---@param rhs number - ---@return DMat2 function DMat2:mul_scalar(_self,rhs) end ----@package ---@param _self DMat2 - ---@return DMat2 function DMat2:inverse(_self) end ----@package ---@param x_axis DVec2 - ---@param y_axis DVec2 - ---@return DMat2 function DMat2.from_cols(x_axis,y_axis) end ----@package ---@param _self DMat2 - ---@return DMat2 function DMat2:neg(_self) end ----@package ---@param _self DMat2 - ---@return DMat2 function DMat2:transpose(_self) end ----@package ---@param diagonal DVec2 - ---@return DMat2 function DMat2.from_diagonal(diagonal) end ----@package ---@param _self DMat2 - ---@param rhs number - ---@return DMat2 function DMat2:div_scalar(_self,rhs) end ----@package ---@param _self DMat2 - ---@return DMat2 function DMat2:abs(_self) end ----@package ---@param _self DMat2 - ---@return Mat2 function DMat2:as_mat2(_self) end ----@package ---@param _self DMat2 - ---@param rhs DMat2 - ---@param max_abs_diff number - ---@return boolean function DMat2:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self DMat2 - ---@param rhs DMat2 - ---@return boolean function DMat2:eq(_self,rhs) end ----@package ---@param _self DMat2 - ---@param rhs DMat2 - ---@return DMat2 function DMat2:sub(_self,rhs) end ----@package ---@param m DMat3 - ---@param i integer - ---@param j integer - ---@return DMat2 function DMat2.from_mat3_minor(m,i,j) end ----@package ---@param _self DMat2 - ---@param rhs DVec2 - ---@return DVec2 function DMat2:mul_vec2(_self,rhs) end ----@package ---@param angle number - ---@return DMat2 function DMat2.from_angle(angle) end ----@package ---@param _self DMat2 - ---@param rhs DMat2 - ---@return DMat2 function DMat2:mul(_self,rhs) end ----@package ---@param _self DMat2 - ---@return boolean function DMat2:is_finite(_self) end ----@package ---@param m DMat3 - ---@return DMat2 function DMat2.from_mat3(m) end ----@package ---@param _self DMat2 - ---@param rhs DMat2 - ---@return DMat2 function DMat2:sub_mat2(_self,rhs) end ----@package ---@param _self DMat2 - ---@param rhs DMat2 - ---@return DMat2 function DMat2:mul_mat2(_self,rhs) end ----@package ---@param _self DMat2 - ---@param rhs number - ---@return DMat2 function DMat2:div(_self,rhs) end ----@package ---@param _self DMat2 - ---@return number function DMat2:determinant(_self) end ----@package ---@param _self DMat2 - ---@return number[] function DMat2:to_cols_array(_self) end ----@package ----@param _self DMat2 +---@param p1 DMat2 +---@param p2 DVec2 +---@return DVec2 +function DMat2:mul(p1,p2) end +---@param _self DMat2 ---@param index integer - ---@return DVec2 function DMat2:row(_self,index) end ----@package ---@param _self DMat2 - ---@return DMat2 function DMat2:clone(_self) end ----@package ---@param _self DMat2 - ---@return boolean function DMat2:is_nan(_self) end ----@package ---@param _self DMat2 - ---@param index integer - ---@return DVec2 function DMat2:col(_self,index) end ----@package ----@param _self DMat2 +---@param p1 DMat2 +---@param p2 number +---@return DMat2 +function DMat2:mul(p1,p2) end +---@param _self DMat2 ---@param rhs DMat2 - ---@return DMat2 function DMat2:add_mat2(_self,rhs) end ----@class DMat3 - +---@class DMat3 : ReflectReference ---@field x_axis ? DVec3 ---@field y_axis ? DVec3 ---@field z_axis ? DVec3 DMat3 = {} ----@package ---@param _self DMat3 - ---@param rhs DMat3 - ---@param max_abs_diff number - ---@return boolean function DMat3:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param axis DVec3 - ---@param angle number - ---@return DMat3 function DMat3.from_axis_angle(axis,angle) end ----@package ---@param _self DMat3 - ---@param index integer - ---@return DVec3 function DMat3:col(_self,index) end ----@package ---@param _self DMat3 - ---@param rhs DMat3 - ---@return DMat3 function DMat3:add(_self,rhs) end ----@package ---@param _self DMat3 - ---@param rhs number - ---@return DMat3 function DMat3:div(_self,rhs) end ----@package ---@param angle number - ---@return DMat3 function DMat3.from_rotation_x(angle) end ----@package ---@param angle number - ---@return DMat3 function DMat3.from_angle(angle) end ----@package ---@param _self DMat3 - ---@param rhs number - ---@return DMat3 function DMat3:div_scalar(_self,rhs) end ----@package ---@param rotation DQuat - ---@return DMat3 function DMat3.from_quat(rotation) end ----@package ---@param _self DMat3 - ---@param rhs DVec3 - ---@return DVec3 function DMat3:mul_vec3(_self,rhs) end ----@package ---@param _self DMat3 - ---@return DMat3 function DMat3:neg(_self) end ----@package ---@param m DMat4 - ---@param i integer - ---@param j integer - ---@return DMat3 function DMat3.from_mat4_minor(m,i,j) end ----@package ---@param _self DMat3 - ---@param rhs DVec2 - ---@return DVec2 function DMat3:transform_point2(_self,rhs) end ----@package ---@param _self DMat3 - ---@return boolean function DMat3:is_nan(_self) end ----@package ---@param _self DMat3 - ---@param rhs DAffine2 - ---@return DMat3 function DMat3:mul(_self,rhs) end ----@package ---@param _self DMat3 - ---@param rhs DMat3 - ---@return boolean function DMat3:eq(_self,rhs) end ----@package ---@param _self DMat3 - ---@return boolean function DMat3:is_finite(_self) end ----@package ---@param _self DMat3 - ---@param rhs DMat3 - ---@return DMat3 function DMat3:sub_mat3(_self,rhs) end ----@package ---@param angle number - ---@return DMat3 function DMat3.from_rotation_y(angle) end ----@package ---@param diagonal DVec3 - ---@return DMat3 function DMat3.from_diagonal(diagonal) end ----@package ---@param angle number - ---@return DMat3 function DMat3.from_rotation_z(angle) end ----@package ---@param _self DMat3 - ---@param index integer - ---@return DVec3 function DMat3:row(_self,index) end ----@package ---@param m DMat2 - ---@return DMat3 function DMat3.from_mat2(m) end ----@package ---@param _self DMat3 - ---@param rhs number - ---@return DMat3 function DMat3:mul_scalar(_self,rhs) end ----@package ----@param _self DMat3 +---@param p1 DMat3 +---@param p2 number +---@return DMat3 +function DMat3:mul(p1,p2) end +---@param _self DMat3 ---@param rhs DVec2 - ---@return DVec2 function DMat3:transform_vector2(_self,rhs) end ----@package ---@param order EulerRot - ---@param a number - ---@param b number - ---@param c number - ---@return DMat3 function DMat3.from_euler(order,a,b,c) end ----@package ---@param _self DMat3 - ---@return DMat3 function DMat3:clone(_self) end ----@package ---@param _self DMat3 - ---@param rhs DMat3 - ---@return DMat3 function DMat3:add_mat3(_self,rhs) end ----@package ---@param scale DVec2 - ---@return DMat3 function DMat3.from_scale(scale) end ----@package ---@param _self DMat3 - ---@return DMat3 function DMat3:transpose(_self) end ----@package ---@param scale DVec2 - ---@param angle number - ---@param translation DVec2 - ---@return DMat3 function DMat3.from_scale_angle_translation(scale,angle,translation) end ----@package ---@param m DMat4 - ---@return DMat3 function DMat3.from_mat4(m) end ----@package ---@param _self DMat3 - ---@return number[] function DMat3:to_cols_array(_self) end ----@package ---@param _self DMat3 - ---@param rhs DMat3 - ---@return DMat3 function DMat3:sub(_self,rhs) end ----@package ---@param _self DMat3 - ---@return number[][] function DMat3:to_cols_array_2d(_self) end ----@package ----@param _self DMat3 +---@param p1 DMat3 +---@param p2 DVec3 +---@return DVec3 +function DMat3:mul(p1,p2) end + +---@param p1 DMat3 +---@param p2 DMat3 +---@return DMat3 +function DMat3:mul(p1,p2) end +---@param _self DMat3 ---@return DMat3 function DMat3:inverse(_self) end ----@package ---@param translation DVec2 - ---@return DMat3 function DMat3.from_translation(translation) end ----@package ---@param _self DMat3 - ---@return Mat3 function DMat3:as_mat3(_self) end ----@package ---@param _self DMat3 - ---@param order EulerRot - ---@return [number, number, number] function DMat3:to_euler(_self,order) end ----@package ---@param _self DMat3 - ---@return number function DMat3:determinant(_self) end ----@package ---@param _self DMat3 - ---@param rhs DMat3 - ---@return DMat3 function DMat3:mul_mat3(_self,rhs) end ----@package ---@param x_axis DVec3 - ---@param y_axis DVec3 - ---@param z_axis DVec3 - ---@return DMat3 function DMat3.from_cols(x_axis,y_axis,z_axis) end ----@package ---@param _self DMat3 - ---@return DMat3 function DMat3:abs(_self) end ----@class DMat4 - +---@class DMat4 : ReflectReference ---@field x_axis ? DVec4 ---@field y_axis ? DVec4 ---@field z_axis ? DVec4 ---@field w_axis ? DVec4 DMat4 = {} ----@package ---@param _self DMat4 - ---@param rhs DAffine3 - ---@return DMat4 function DMat4:mul(_self,rhs) end ----@package ---@param angle number - ---@return DMat4 function DMat4.from_rotation_z(angle) end ----@package ---@param left number - ---@param right number - ---@param bottom number - ---@param top number - ---@param near number - ---@param far number - ---@return DMat4 function DMat4.orthographic_rh_gl(left,right,bottom,top,near,far) end ----@package ---@param _self DMat4 - ---@param rhs DVec4 - ---@return DVec4 function DMat4:mul_vec4(_self,rhs) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@return DMat4 function DMat4.perspective_infinite_reverse_rh(fov_y_radians,aspect_ratio,z_near) end ----@package ---@param _self DMat4 - ---@param rhs number - ---@return DMat4 function DMat4:div_scalar(_self,rhs) end ----@package ---@param _self DMat4 - ---@return DMat4 function DMat4:neg(_self) end ----@package ---@param _self DMat4 - ---@param rhs DVec3 - ---@return DVec3 function DMat4:transform_point3(_self,rhs) end ----@package ---@param angle number - ---@return DMat4 function DMat4.from_rotation_x(angle) end ----@package ---@param _self DMat4 - ---@return DMat4 function DMat4:abs(_self) end ----@package ---@param scale DVec3 - ---@return DMat4 function DMat4.from_scale(scale) end ----@package ---@param _self DMat4 - ---@param rhs DMat4 - ---@param max_abs_diff number - ---@return boolean function DMat4:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param rotation DQuat - ---@param translation DVec3 - ---@return DMat4 function DMat4.from_rotation_translation(rotation,translation) end ----@package ---@param _self DMat4 - ---@param rhs DMat4 - ---@return DMat4 function DMat4:add(_self,rhs) end ----@package ---@param eye DVec3 - ---@param dir DVec3 - ---@param up DVec3 - ---@return DMat4 function DMat4.look_to_lh(eye,dir,up) end ----@package ---@param order EulerRot - ---@param a number - ---@param b number - ---@param c number - ---@return DMat4 function DMat4.from_euler(order,a,b,c) end ----@package ---@param eye DVec3 - ---@param center DVec3 - ---@param up DVec3 - ---@return DMat4 function DMat4.look_at_rh(eye,center,up) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@return DMat4 function DMat4.perspective_infinite_rh(fov_y_radians,aspect_ratio,z_near) end ----@package ---@param angle number - ---@return DMat4 function DMat4.from_rotation_y(angle) end ----@package ----@param scale DVec3 +---@param p1 DMat4 +---@param p2 DVec4 +---@return DVec4 +function DMat4:mul(p1,p2) end +---@param scale DVec3 ---@param rotation DQuat - ---@param translation DVec3 - ---@return DMat4 function DMat4.from_scale_rotation_translation(scale,rotation,translation) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@return DMat4 function DMat4.perspective_infinite_lh(fov_y_radians,aspect_ratio,z_near) end ----@package ---@param x_axis DVec4 - ---@param y_axis DVec4 - ---@param z_axis DVec4 - ---@param w_axis DVec4 - ---@return DMat4 function DMat4.from_cols(x_axis,y_axis,z_axis,w_axis) end ----@package ---@param eye DVec3 - ---@param center DVec3 - ---@param up DVec3 - ---@return DMat4 function DMat4.look_at_lh(eye,center,up) end ----@package ---@param _self DMat4 - ---@param order EulerRot - ---@return [number, number, number] function DMat4:to_euler(_self,order) end ----@package ---@param _self DMat4 - ---@param rhs DMat4 - ---@return DMat4 function DMat4:sub(_self,rhs) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@param z_far number - ---@return DMat4 function DMat4.perspective_rh(fov_y_radians,aspect_ratio,z_near,z_far) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@param z_far number - ---@return DMat4 function DMat4.perspective_rh_gl(fov_y_radians,aspect_ratio,z_near,z_far) end ----@package ---@param _self DMat4 - ---@return Mat4 function DMat4:as_mat4(_self) end ----@package ----@param _self DMat4 +---@param p1 DMat4 +---@param p2 DMat4 +---@return DMat4 +function DMat4:mul(p1,p2) end +---@param _self DMat4 ---@param rhs DMat4 - ---@return DMat4 function DMat4:mul_mat4(_self,rhs) end ----@package ---@param diagonal DVec4 - ---@return DMat4 function DMat4.from_diagonal(diagonal) end ----@package ---@param _self DMat4 - ---@param rhs DMat4 - ---@return DMat4 function DMat4:sub_mat4(_self,rhs) end ----@package ---@param left number - ---@param right number - ---@param bottom number - ---@param top number - ---@param near number - ---@param far number - ---@return DMat4 function DMat4.orthographic_rh(left,right,bottom,top,near,far) end ----@package ---@param _self DMat4 - ---@param rhs DVec3 - ---@return DVec3 function DMat4:project_point3(_self,rhs) end ----@package ---@param left number - ---@param right number - ---@param bottom number - ---@param top number - ---@param near number - ---@param far number - ---@return DMat4 function DMat4.orthographic_lh(left,right,bottom,top,near,far) end ----@package ---@param _self DMat4 - ---@return number function DMat4:determinant(_self) end ----@package ---@param axis DVec3 - ---@param angle number - ---@return DMat4 function DMat4.from_axis_angle(axis,angle) end ----@package ---@param _self DMat4 - ---@param rhs DVec3 - ---@return DVec3 function DMat4:transform_vector3(_self,rhs) end ----@package ---@param _self DMat4 - ---@param rhs DMat4 - ---@return DMat4 function DMat4:add_mat4(_self,rhs) end ----@package ---@param _self DMat4 - ---@return DMat4 function DMat4:inverse(_self) end ----@package ---@param _self DMat4 - ---@return boolean function DMat4:is_nan(_self) end ----@package ---@param rotation DQuat - ---@return DMat4 function DMat4.from_quat(rotation) end ----@package ---@param eye DVec3 - ---@param dir DVec3 - ---@param up DVec3 - ---@return DMat4 function DMat4.look_to_rh(eye,dir,up) end ----@package ---@param _self DMat4 - ---@return boolean function DMat4:is_finite(_self) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@return DMat4 function DMat4.perspective_infinite_reverse_lh(fov_y_radians,aspect_ratio,z_near) end ----@package ---@param _self DMat4 - ---@param index integer - ---@return DVec4 function DMat4:row(_self,index) end ----@package ---@param _self DMat4 - ---@return number[][] function DMat4:to_cols_array_2d(_self) end ----@package ---@param m DMat3 - ---@return DMat4 function DMat4.from_mat3(m) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@param z_far number - ---@return DMat4 function DMat4.perspective_lh(fov_y_radians,aspect_ratio,z_near,z_far) end ----@package ---@param _self DMat4 - ---@param rhs DMat4 - ---@return boolean function DMat4:eq(_self,rhs) end ----@package ---@param _self DMat4 - ---@param rhs number - ---@return DMat4 function DMat4:div(_self,rhs) end ----@package ---@param _self DMat4 - ---@return DMat4 function DMat4:transpose(_self) end ----@package ---@param _self DMat4 - ---@param rhs number - ---@return DMat4 function DMat4:mul_scalar(_self,rhs) end ----@package ---@param _self DMat4 - ---@param index integer - ---@return DVec4 function DMat4:col(_self,index) end ----@package ---@param _self DMat4 - ---@return number[] function DMat4:to_cols_array(_self) end ----@package ---@param _self DMat4 - ---@return DMat4 function DMat4:clone(_self) end ----@package ---@param translation DVec3 - ---@return DMat4 function DMat4.from_translation(translation) end +---@param p1 DMat4 +---@param p2 number +---@return DMat4 +function DMat4:mul(p1,p2) end ----@class DQuat +---@class DQuat : ReflectReference ---@field x ? number ---@field y ? number ---@field z ? number ---@field w ? number DQuat = {} ----@package ---@param v DVec4 - ---@return DQuat function DQuat.from_vec4(v) end ----@package ---@param from DVec2 - ---@param to DVec2 - ---@return DQuat function DQuat.from_rotation_arc_2d(from,to) end ----@package ---@param _self DQuat - ---@return DQuat function DQuat:normalize(_self) end ----@package ----@param _self DQuat +---@param p1 DQuat +---@param p2 number +---@return DQuat +function DQuat:mul(p1,p2) end +---@param _self DQuat ---@param rhs DQuat - ---@return boolean function DQuat:eq(_self,rhs) end ----@package ---@param _self DQuat - ---@return DQuat function DQuat:conjugate(_self) end ----@package ---@param _self DQuat - ---@param rhs DQuat - ---@return DQuat function DQuat:mul_quat(_self,rhs) end ----@package ---@param _self DQuat - ---@return DVec3 function DQuat:to_scaled_axis(_self) end ----@package ---@param mat DMat3 - ---@return DQuat function DQuat.from_mat3(mat) end ----@package ---@param _self DQuat - ---@param order EulerRot - ---@return [number, number, number] function DQuat:to_euler(_self,order) end ----@package ---@param _self DQuat - ---@param rhs DQuat - ---@param max_angle number - ---@return DQuat function DQuat:rotate_towards(_self,rhs,max_angle) end ----@package ---@param _self DQuat - ---@param _end DQuat - ---@param s number - ---@return DQuat function DQuat:lerp(_self,_end,s) end ----@package ---@param _self DQuat - ---@return DQuat function DQuat:inverse(_self) end ----@package ---@param _self DQuat - ---@return boolean function DQuat:is_nan(_self) end ----@package ---@param _self DQuat - ---@return number[] function DQuat:to_array(_self) end ----@package ---@param _self DQuat - ---@return DQuat function DQuat:clone(_self) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@param w number - ---@return DQuat function DQuat.from_xyzw(x,y,z,w) end ----@package ---@param angle number - ---@return DQuat function DQuat.from_rotation_z(angle) end ----@package ---@param _self DQuat - ---@param rhs DQuat - ---@return number function DQuat:angle_between(_self,rhs) end ----@package ---@param _self DQuat - ---@param rhs DQuat - ---@return DQuat function DQuat:sub(_self,rhs) end ----@package ---@param _self DQuat - ---@param rhs DQuat - ---@return number function DQuat:dot(_self,rhs) end ----@package ---@param angle number - ---@return DQuat function DQuat.from_rotation_y(angle) end ----@package ---@param _self DQuat - ---@param rhs DQuat - ---@return DQuat function DQuat:add(_self,rhs) end ----@package ---@param _self DQuat - ---@param _end DQuat - ---@param s number - ---@return DQuat function DQuat:slerp(_self,_end,s) end ----@package ---@param _self DQuat - ---@param rhs DQuat - ---@param max_abs_diff number - ---@return boolean function DQuat:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self DQuat - ---@return number function DQuat:length(_self) end ----@package ---@param from DVec3 - ---@param to DVec3 - ---@return DQuat function DQuat.from_rotation_arc(from,to) end ----@package ---@param mat DMat4 - ---@return DQuat function DQuat.from_mat4(mat) end ----@package ---@param _self DQuat - ---@return DVec3 function DQuat:xyz(_self) end ----@package ---@param _self DQuat - ---@param rhs number - ---@return DQuat function DQuat:div(_self,rhs) end ----@package ---@param v DVec3 - ---@return DQuat function DQuat.from_scaled_axis(v) end ----@package ---@param _self DQuat - ---@return boolean function DQuat:is_near_identity(_self) end ----@package ---@param _self DQuat - ---@return DQuat function DQuat:neg(_self) end ----@package ---@param _self DQuat - ---@return Quat function DQuat:as_quat(_self) end ----@package ---@param _self DQuat - ---@return boolean function DQuat:is_finite(_self) end ----@package ----@param _self DQuat +---@param p1 DQuat +---@param p2 DVec3 +---@return DVec3 +function DQuat:mul(p1,p2) end +---@param _self DQuat ---@param rhs DQuat - ---@return DQuat function DQuat:mul(_self,rhs) end ----@package ---@param a number[] - ---@return DQuat function DQuat.from_array(a) end ----@package ---@param _self DQuat - ---@return number function DQuat:length_recip(_self) end ----@package ---@param axis DVec3 - ---@param angle number - ---@return DQuat function DQuat.from_axis_angle(axis,angle) end ----@package ---@param from DVec3 - ---@param to DVec3 - ---@return DQuat function DQuat.from_rotation_arc_colinear(from,to) end ----@package ---@param angle number - ---@return DQuat function DQuat.from_rotation_x(angle) end ----@package ---@param euler EulerRot - ---@param a number - ---@param b number - ---@param c number - ---@return DQuat function DQuat.from_euler(euler,a,b,c) end ----@package ---@param a DAffine3 - ---@return DQuat function DQuat.from_affine3(a) end ----@package ---@param _self DQuat - ---@param rhs DVec3 - ---@return DVec3 function DQuat:mul_vec3(_self,rhs) end ----@package ---@param _self DQuat - ---@return boolean function DQuat:is_normalized(_self) end ----@package ---@param _self DQuat - ---@return number function DQuat:length_squared(_self) end ----@class DVec2 - +---@class DVec2 : ReflectReference ---@field x ? number ---@field y ? number DVec2 = {} ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@param max_angle number - ---@return DVec2 function DVec2:rotate_towards(_self,rhs,max_angle) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:normalize_or_zero(_self) end ----@package ----@param _self DVec2 +---@param p1 DVec2 +---@param p2 DVec2 +---@return DVec2 +function DVec2:div(p1,p2) end +---@param _self DVec2 ---@param rhs DVec2 - ---@return BVec2 function DVec2:cmplt(_self,rhs) end ----@package ----@param _self DVec2 +---@param p1 DVec2 +---@param p2 number +---@return DVec2 +function DVec2:mul(p1,p2) end +---@param _self DVec2 ---@param y number - ---@return DVec2 function DVec2:with_y(_self,y) end ----@package ---@param mask BVec2 - ---@param if_true DVec2 - ---@param if_false DVec2 - ---@return DVec2 function DVec2.select(mask,if_true,if_false) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return BVec2 function DVec2:cmpeq(_self,rhs) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:rotate(_self,rhs) end ----@package ---@param _self DVec2 - ---@return integer function DVec2:is_negative_bitmask(_self) end ----@package ---@param _self DVec2 - ---@return boolean function DVec2:is_normalized(_self) end ----@package ---@param _self DVec2 - ---@return BVec2 function DVec2:is_nan_mask(_self) end ----@package ---@param _self DVec2 - ---@return number function DVec2:element_sum(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return BVec2 function DVec2:cmpgt(_self,rhs) end ----@package ---@param _self DVec2 - ---@return number function DVec2:to_angle(_self) end ----@package ---@param _self DVec2 - ---@param max number - ---@return DVec2 function DVec2:clamp_length_max(_self,max) end ----@package ---@param _self DVec2 - ---@param min DVec2 - ---@param max DVec2 - ---@return DVec2 function DVec2:clamp(_self,min,max) end ----@package ---@param _self DVec2 - ---@return number function DVec2:length_recip(_self) end ----@package ----@param _self DVec2 +---@param p1 DVec2 +---@param p2 DVec2 +---@return DVec2 +function DVec2:add(p1,p2) end +---@param _self DVec2 ---@return U16Vec2 function DVec2:as_u16vec2(_self) end ----@package ---@param _self DVec2 - ---@param normal DVec2 - ---@return DVec2 function DVec2:reflect(_self,normal) end ----@package ---@param _self DVec2 - ---@return UVec2 function DVec2:as_uvec2(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:midpoint(_self,rhs) end ----@package ----@param _self DVec2 +---@param p1 DVec2 +---@param p2 DVec2 +---@return DVec2 +function DVec2:mul(p1,p2) end +---@param _self DVec2 ---@param min number - ---@param max number - ---@return DVec2 function DVec2:clamp_length(_self,min,max) end ----@package ---@param x number - ---@param y number - ---@return DVec2 function DVec2.new(x,y) end ----@package ---@param _self DVec2 - ---@return I16Vec2 function DVec2:as_i16vec2(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return number function DVec2:perp_dot(_self,rhs) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return number function DVec2:distance_squared(_self,rhs) end ----@package ---@param _self DVec2 - ---@return number[] function DVec2:to_array(_self) end ----@package ---@param _self DVec2 - ---@return number function DVec2:max_element(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:copysign(_self,rhs) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:sub(_self,rhs) end ----@package ---@param _self DVec2 - ---@return Vec2 function DVec2:as_vec2(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:add(_self,rhs) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:exp(_self) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:floor(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return number function DVec2:angle_to(_self,rhs) end ----@package ---@param _self DVec2 - ---@param x number - ---@return DVec2 function DVec2:with_x(_self,x) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:reject_from_normalized(_self,rhs) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:fract_gl(_self) end ----@package ---@param _self DVec2 - ---@return number function DVec2:length_squared(_self) end ----@package ---@param _self DVec2 - ---@param a DVec2 - ---@param b DVec2 - ---@return DVec2 function DVec2:mul_add(_self,a,b) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return number function DVec2:dot(_self,rhs) end ----@package ---@param angle number - ---@return DVec2 function DVec2.from_angle(angle) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:recip(_self) end ----@package ---@param _self DVec2 - ---@return U64Vec2 function DVec2:as_u64vec2(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@param d number - ---@return DVec2 function DVec2:move_towards(_self,rhs,d) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:abs(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:rem_euclid(_self,rhs) end ----@package ----@param _self DVec2 +---@param p1 DVec2 +---@param p2 number +---@return DVec2 +function DVec2:sub(p1,p2) end +---@param _self DVec2 ---@return IVec2 function DVec2:as_ivec2(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@param max_abs_diff number - ---@return boolean function DVec2:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:reject_from(_self,rhs) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:signum(_self) end ----@package ----@param _self DVec2 +---@param p1 DVec2 +---@param p2 number +---@return DVec2 +function DVec2:rem(p1,p2) end +---@param _self DVec2 ---@return number function DVec2:length(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:max(_self,rhs) end ----@package ---@param _self DVec2 - ---@param normal DVec2 - ---@param eta number - ---@return DVec2 function DVec2:refract(_self,normal,eta) end ----@package ----@param _self DVec2 +---@param p1 DVec2 +---@param p2 DVec2 +---@return DVec2 +function DVec2:rem(p1,p2) end +---@param _self DVec2 ---@return DVec2 function DVec2:round(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:project_onto(_self,rhs) end ----@package ---@param _self DVec2 - ---@return boolean function DVec2:is_nan(_self) end ----@package ---@param _self DVec2 - ---@param other DVec2 - ---@return boolean function DVec2:eq(_self,other) end ----@package ---@param _self DVec2 - ---@return boolean function DVec2:is_finite(_self) end ----@package ---@param _self DVec2 - ---@param fallback DVec2 - ---@return DVec2 function DVec2:normalize_or(_self,fallback) end ----@package ---@param _self DVec2 - ---@return I8Vec2 function DVec2:as_i8vec2(_self) end ----@package ----@param _self DVec2 +---@param p1 DVec2 +---@param p2 number +---@return DVec2 +function DVec2:div(p1,p2) end +---@param _self DVec2 ---@param rhs DVec2 - ---@return number function DVec2:distance(_self,rhs) end ----@package ---@param _self DVec2 - ---@return number function DVec2:min_element(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:mul(_self,rhs) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:neg(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return BVec2 function DVec2:cmpne(_self,rhs) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:fract(_self) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:trunc(_self) end ----@package ---@param _self DVec2 - ---@param n number - ---@return DVec2 function DVec2:powf(_self,n) end ----@package ---@param a number[] - ---@return DVec2 function DVec2.from_array(a) end ----@package ---@param _self DVec2 - ---@return number function DVec2:element_product(_self) end ----@package ---@param _self DVec2 - ---@param min number - ---@return DVec2 function DVec2:clamp_length_min(_self,min) end ----@package ---@param _self DVec2 - ---@return U8Vec2 function DVec2:as_u8vec2(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return number function DVec2:angle_between(_self,rhs) end ----@package ---@param _self DVec2 - ---@return I64Vec2 function DVec2:as_i64vec2(_self) end ----@package ----@param _self DVec2 +---@param p1 DVec2 +---@param p2 number +---@return DVec2 +function DVec2:add(p1,p2) end +---@param _self DVec2 ---@param rhs DVec2 - ---@return DVec2 function DVec2:div_euclid(_self,rhs) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:ceil(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return BVec2 function DVec2:cmple(_self,rhs) end ----@package ---@param v number - ---@return DVec2 function DVec2.splat(v) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@param s number - ---@return DVec2 function DVec2:lerp(_self,rhs,s) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:rem(_self,rhs) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:perp(_self) end ----@package ---@param _self DVec2 - ---@param z number - ---@return DVec3 function DVec2:extend(_self,z) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:normalize(_self) end ----@package ----@param _self DVec2 +---@param p1 DVec2 +---@param p2 DVec2 +---@return DVec2 +function DVec2:sub(p1,p2) end +---@param _self DVec2 ---@param rhs DVec2 - ---@return DVec2 function DVec2:min(_self,rhs) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:div(_self,rhs) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:project_onto_normalized(_self,rhs) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return BVec2 function DVec2:cmpge(_self,rhs) end ----@package ---@param _self DVec2 - ---@return DVec2 function DVec2:clone(_self) end ----@package ---@param _self DVec2 - ---@param rhs DVec2 - ---@return DVec2 function DVec2:dot_into_vec(_self,rhs) end ----@package ---@param _self DVec2 - ---@return BVec2 function DVec2:is_finite_mask(_self) end ----@class DVec3 - +---@class DVec3 : ReflectReference ---@field x ? number ---@field y ? number ---@field z ? number DVec3 = {} ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return number function DVec3:distance(_self,rhs) end ----@package ---@param _self DVec3 - ---@return number function DVec3:length(_self) end ----@package ----@param _self DVec3 +---@param p1 DVec3 +---@param p2 DVec3 +---@return DVec3 +function DVec3:div(p1,p2) end +---@param _self DVec3 ---@return UVec3 function DVec3:as_uvec3(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@param max_abs_diff number - ---@return boolean function DVec3:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:add(_self,rhs) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return BVec3 function DVec3:cmpne(_self,rhs) end ----@package ---@param _self DVec3 - ---@return number function DVec3:element_sum(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:copysign(_self,rhs) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:sub(_self,rhs) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:clone(_self) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:normalize(_self) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@return DVec3 function DVec3.new(x,y,z) end ----@package ----@param _self DVec3 +---@param p1 DVec3 +---@param p2 DVec3 +---@return DVec3 +function DVec3:mul(p1,p2) end +---@param _self DVec3 ---@param rhs DVec3 - ---@return DVec3 function DVec3:rem_euclid(_self,rhs) end ----@package ----@param _self DVec3 +---@param p1 DVec3 +---@param p2 DVec3 +---@return DVec3 +function DVec3:rem(p1,p2) end +---@param _self DVec3 ---@param fallback DVec3 - ---@return DVec3 function DVec3:normalize_or(_self,fallback) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:midpoint(_self,rhs) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:normalize_or_zero(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return BVec3 function DVec3:cmpeq(_self,rhs) end ----@package ---@param _self DVec3 - ---@return number function DVec3:length_recip(_self) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:signum(_self) end ----@package ---@param _self DVec3 - ---@param x number - ---@return DVec3 function DVec3:with_x(_self,x) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@param d number - ---@return DVec3 function DVec3:move_towards(_self,rhs,d) end ----@package ---@param _self DVec3 - ---@return I16Vec3 function DVec3:as_i16vec3(_self) end ----@package ---@param _self DVec3 - ---@return number function DVec3:length_squared(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:div_euclid(_self,rhs) end ----@package ---@param _self DVec3 - ---@param w number - ---@return DVec4 function DVec3:extend(_self,w) end ----@package ----@param _self DVec3 +---@param p1 DVec3 +---@param p2 number +---@return DVec3 +function DVec3:rem(p1,p2) end +---@param _self DVec3 ---@return Vec3A function DVec3:as_vec3a(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return BVec3 function DVec3:cmpgt(_self,rhs) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:floor(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:div(_self,rhs) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@param s number - ---@return DVec3 function DVec3:lerp(_self,rhs,s) end ----@package ---@param _self DVec3 - ---@return I8Vec3 function DVec3:as_i8vec3(_self) end ----@package ---@param _self DVec3 - ---@return boolean function DVec3:is_finite(_self) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:ceil(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:dot_into_vec(_self,rhs) end ----@package ---@param _self DVec3 - ---@return boolean function DVec3:is_nan(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return BVec3 function DVec3:cmple(_self,rhs) end ----@package ---@param _self DVec3 - ---@return number function DVec3:min_element(_self) end ----@package ---@param mask BVec3 - ---@param if_true DVec3 - ---@param if_false DVec3 - ---@return DVec3 function DVec3.select(mask,if_true,if_false) end ----@package ---@param _self DVec3 - ---@param min number - ---@param max number - ---@return DVec3 function DVec3:clamp_length(_self,min,max) end ----@package ----@param _self DVec3 +---@param p1 DVec3 +---@param p2 number +---@return DVec3 +function DVec3:div(p1,p2) end +---@param _self DVec3 ---@param n number - ---@return DVec3 function DVec3:powf(_self,n) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return number function DVec3:distance_squared(_self,rhs) end ----@package ---@param _self DVec3 - ---@return number[] function DVec3:to_array(_self) end ----@package ----@param _self DVec3 +---@param p1 DVec3 +---@param p2 number +---@return DVec3 +function DVec3:sub(p1,p2) end +---@param _self DVec3 ---@return U64Vec3 function DVec3:as_u64vec3(_self) end ----@package ---@param _self DVec3 - ---@param z number - ---@return DVec3 function DVec3:with_z(_self,z) end ----@package ----@param _self DVec3 +---@param p1 DVec3 +---@param p2 number +---@return DVec3 +function DVec3:add(p1,p2) end +---@param _self DVec3 ---@return boolean function DVec3:is_normalized(_self) end ----@package ---@param _self DVec3 - ---@param y number - ---@return DVec3 function DVec3:with_y(_self,y) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:exp(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:project_onto_normalized(_self,rhs) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:fract_gl(_self) end ----@package ---@param _self DVec3 - ---@return BVec3 function DVec3:is_finite_mask(_self) end ----@package ----@param _self DVec3 +---@param p1 DVec3 +---@param p2 DVec3 +---@return DVec3 +function DVec3:sub(p1,p2) end +---@param _self DVec3 ---@return DVec3 function DVec3:fract(_self) end ----@package ---@param _self DVec3 - ---@param a DVec3 - ---@param b DVec3 - ---@return DVec3 function DVec3:mul_add(_self,a,b) end ----@package ---@param _self DVec3 - ---@param normal DVec3 - ---@return DVec3 function DVec3:reflect(_self,normal) end ----@package ---@param _self DVec3 - ---@param min number - ---@return DVec3 function DVec3:clamp_length_min(_self,min) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:cross(_self,rhs) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:max(_self,rhs) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:reject_from_normalized(_self,rhs) end ----@package ---@param _self DVec3 - ---@param other DVec3 - ---@return boolean function DVec3:eq(_self,other) end ----@package ---@param _self DVec3 - ---@return number function DVec3:element_product(_self) end ----@package ----@param _self DVec3 +---@param p1 DVec3 +---@param p2 DVec3 +---@return DVec3 +function DVec3:add(p1,p2) end +---@param _self DVec3 ---@param rhs DVec3 - ---@return DVec3 function DVec3:min(_self,rhs) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:any_orthogonal_vector(_self) end ----@package ---@param _self DVec3 - ---@param normal DVec3 - ---@param eta number - ---@return DVec3 function DVec3:refract(_self,normal,eta) end ----@package ---@param _self DVec3 - ---@return I64Vec3 function DVec3:as_i64vec3(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:mul(_self,rhs) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:recip(_self) end ----@package ---@param a number[] - ---@return DVec3 function DVec3.from_array(a) end ----@package ---@param v number - ---@return DVec3 function DVec3.splat(v) end ----@package ---@param _self DVec3 - ---@return IVec3 function DVec3:as_ivec3(_self) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:round(_self) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:trunc(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:rem(_self,rhs) end ----@package ---@param _self DVec3 - ---@return BVec3 function DVec3:is_nan_mask(_self) end ----@package ---@param _self DVec3 - ---@return U16Vec3 function DVec3:as_u16vec3(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return number function DVec3:angle_between(_self,rhs) end ----@package ---@param _self DVec3 - ---@return Vec3 function DVec3:as_vec3(_self) end ----@package ----@param _self DVec3 +---@param p1 DVec3 +---@param p2 number +---@return DVec3 +function DVec3:mul(p1,p2) end +---@param _self DVec3 ---@param min DVec3 - ---@param max DVec3 - ---@return DVec3 function DVec3:clamp(_self,min,max) end ----@package ---@param _self DVec3 - ---@return number function DVec3:max_element(_self) end ----@package ---@param _self DVec3 - ---@return DVec2 function DVec3:truncate(_self) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:neg(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return BVec3 function DVec3:cmpge(_self,rhs) end ----@package ---@param _self DVec3 - ---@return integer function DVec3:is_negative_bitmask(_self) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:any_orthonormal_vector(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:reject_from(_self,rhs) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return BVec3 function DVec3:cmplt(_self,rhs) end ----@package ---@param _self DVec3 - ---@param max number - ---@return DVec3 function DVec3:clamp_length_max(_self,max) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return DVec3 function DVec3:project_onto(_self,rhs) end ----@package ---@param _self DVec3 - ---@return U8Vec3 function DVec3:as_u8vec3(_self) end ----@package ---@param _self DVec3 - ---@param rhs DVec3 - ---@return number function DVec3:dot(_self,rhs) end ----@package ---@param _self DVec3 - ---@return DVec3 function DVec3:abs(_self) end ----@class DVec4 - +---@class DVec4 : ReflectReference ---@field x ? number ---@field y ? number ---@field z ? number ---@field w ? number DVec4 = {} ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:div_euclid(_self,rhs) end ----@package ---@param _self DVec4 - ---@param normal DVec4 - ---@param eta number - ---@return DVec4 function DVec4:refract(_self,normal,eta) end ----@package ---@param _self DVec4 - ---@param n number - ---@return DVec4 function DVec4:powf(_self,n) end ----@package ----@param _self DVec4 +---@param p1 DVec4 +---@param p2 number +---@return DVec4 +function DVec4:sub(p1,p2) end +---@param _self DVec4 ---@return I16Vec4 function DVec4:as_i16vec4(_self) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:ceil(_self) end ----@package ---@param _self DVec4 - ---@return number function DVec4:min_element(_self) end ----@package ----@param _self DVec4 +---@param p1 DVec4 +---@param p2 number +---@return DVec4 +function DVec4:rem(p1,p2) end +---@param _self DVec4 ---@param min DVec4 - ---@param max DVec4 - ---@return DVec4 function DVec4:clamp(_self,min,max) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@param d number - ---@return DVec4 function DVec4:move_towards(_self,rhs,d) end ----@package ---@param _self DVec4 - ---@return boolean function DVec4:is_nan(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:max(_self,rhs) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:normalize_or_zero(_self) end ----@package ----@param _self DVec4 +---@param p1 DVec4 +---@param p2 number +---@return DVec4 +function DVec4:mul(p1,p2) end + +---@param p1 DVec4 +---@param p2 DVec4 +---@return DVec4 +function DVec4:div(p1,p2) end +---@param _self DVec4 ---@return boolean function DVec4:is_normalized(_self) end ----@package ---@param _self DVec4 - ---@param a DVec4 - ---@param b DVec4 - ---@return DVec4 function DVec4:mul_add(_self,a,b) end ----@package ---@param _self DVec4 - ---@return UVec4 function DVec4:as_uvec4(_self) end ----@package ---@param _self DVec4 - ---@param min number - ---@return DVec4 function DVec4:clamp_length_min(_self,min) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:floor(_self) end ----@package ---@param v number - ---@return DVec4 function DVec4.splat(v) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:fract(_self) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:exp(_self) end ----@package ---@param _self DVec4 - ---@param normal DVec4 - ---@return DVec4 function DVec4:reflect(_self,normal) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:recip(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return number function DVec4:distance(_self,rhs) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@param s number - ---@return DVec4 function DVec4:lerp(_self,rhs,s) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:neg(_self) end ----@package ---@param _self DVec4 - ---@param w number - ---@return DVec4 function DVec4:with_w(_self,w) end ----@package ----@param _self DVec4 +---@param p1 DVec4 +---@param p2 DVec4 +---@return DVec4 +function DVec4:rem(p1,p2) end +---@param _self DVec4 ---@return number function DVec4:element_product(_self) end ----@package ---@param _self DVec4 - ---@param z number - ---@return DVec4 function DVec4:with_z(_self,z) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return BVec4 function DVec4:cmple(_self,rhs) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:dot_into_vec(_self,rhs) end ----@package ---@param _self DVec4 - ---@return integer function DVec4:is_negative_bitmask(_self) end ----@package ---@param _self DVec4 - ---@return number function DVec4:element_sum(_self) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:clone(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:reject_from_normalized(_self,rhs) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:midpoint(_self,rhs) end ----@package ---@param _self DVec4 - ---@param min number - ---@param max number - ---@return DVec4 function DVec4:clamp_length(_self,min,max) end ----@package ---@param a number[] - ---@return DVec4 function DVec4.from_array(a) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return BVec4 function DVec4:cmpne(_self,rhs) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return BVec4 function DVec4:cmpge(_self,rhs) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:round(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:reject_from(_self,rhs) end ----@package ----@param _self DVec4 +---@param p1 DVec4 +---@param p2 number +---@return DVec4 +function DVec4:div(p1,p2) end +---@param _self DVec4 ---@param rhs DVec4 - ---@return DVec4 function DVec4:project_onto_normalized(_self,rhs) end ----@package ---@param _self DVec4 - ---@return BVec4 function DVec4:is_nan_mask(_self) end ----@package ---@param _self DVec4 - ---@return U64Vec4 function DVec4:as_u64vec4(_self) end ----@package ---@param _self DVec4 - ---@return I64Vec4 function DVec4:as_i64vec4(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:rem_euclid(_self,rhs) end ----@package ---@param _self DVec4 - ---@param x number - ---@return DVec4 function DVec4:with_x(_self,x) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:trunc(_self) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:fract_gl(_self) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:signum(_self) end ----@package ---@param _self DVec4 - ---@param fallback DVec4 - ---@return DVec4 function DVec4:normalize_or(_self,fallback) end ----@package ---@param _self DVec4 - ---@return IVec4 function DVec4:as_ivec4(_self) end ----@package ----@param _self DVec4 +---@param p1 DVec4 +---@param p2 DVec4 +---@return DVec4 +function DVec4:mul(p1,p2) end +---@param _self DVec4 ---@param max number - ---@return DVec4 function DVec4:clamp_length_max(_self,max) end ----@package ---@param _self DVec4 - ---@return boolean function DVec4:is_finite(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:sub(_self,rhs) end ----@package ---@param _self DVec4 - ---@return number function DVec4:length_squared(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:add(_self,rhs) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:mul(_self,rhs) end ----@package ----@param _self DVec4 +---@param p1 DVec4 +---@param p2 DVec4 +---@return DVec4 +function DVec4:add(p1,p2) end +---@param _self DVec4 ---@return U8Vec4 function DVec4:as_u8vec4(_self) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@param w number - ---@return DVec4 function DVec4.new(x,y,z,w) end ----@package ---@param _self DVec4 - ---@param other DVec4 - ---@return boolean function DVec4:eq(_self,other) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:project_onto(_self,rhs) end ----@package ----@param _self DVec4 +---@param p1 DVec4 +---@param p2 number +---@return DVec4 +function DVec4:add(p1,p2) end +---@param _self DVec4 ---@return number[] function DVec4:to_array(_self) end ----@package ----@param mask BVec4 +---@param p1 DVec4 +---@param p2 DVec4 +---@return DVec4 +function DVec4:sub(p1,p2) end +---@param mask BVec4 ---@param if_true DVec4 - ---@param if_false DVec4 - ---@return DVec4 function DVec4.select(mask,if_true,if_false) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:copysign(_self,rhs) end ----@package ---@param _self DVec4 - ---@return I8Vec4 function DVec4:as_i8vec4(_self) end ----@package ---@param _self DVec4 - ---@param y number - ---@return DVec4 function DVec4:with_y(_self,y) end ----@package ---@param _self DVec4 - ---@return U16Vec4 function DVec4:as_u16vec4(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return BVec4 function DVec4:cmpeq(_self,rhs) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return number function DVec4:distance_squared(_self,rhs) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:rem(_self,rhs) end ----@package ---@param _self DVec4 - ---@return number function DVec4:length_recip(_self) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:normalize(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:div(_self,rhs) end ----@package ---@param _self DVec4 - ---@return DVec4 function DVec4:abs(_self) end ----@package ---@param _self DVec4 - ---@return DVec3 function DVec4:truncate(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@param max_abs_diff number - ---@return boolean function DVec4:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return BVec4 function DVec4:cmpgt(_self,rhs) end ----@package ---@param _self DVec4 - ---@return BVec4 function DVec4:is_finite_mask(_self) end ----@package ---@param _self DVec4 - ---@return number function DVec4:length(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return BVec4 function DVec4:cmplt(_self,rhs) end ----@package ---@param _self DVec4 - ---@return Vec4 function DVec4:as_vec4(_self) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return number function DVec4:dot(_self,rhs) end ----@package ---@param _self DVec4 - ---@param rhs DVec4 - ---@return DVec4 function DVec4:min(_self,rhs) end ----@package ---@param _self DVec4 - ---@return number function DVec4:max_element(_self) end ----@class EulerRot - +---@class EulerRot : ReflectReference EulerRot = {} ----@package ---@param _self EulerRot - ---@param other EulerRot - ---@return boolean function EulerRot:eq(_self,other) end ----@package ---@param _self EulerRot - ---@return EulerRot function EulerRot:clone(_self) end ----@package ---@param _self EulerRot - ----@return [] +---@return nil function EulerRot:assert_receiver_is_total_eq(_self) end ----@class I16Vec2 - +---@class I16Vec2 : ReflectReference ---@field x ? integer ---@field y ? integer I16Vec2 = {} ----@package ---@param _self I16Vec2 - ---@param rhs U16Vec2 - ---@return I16Vec2 function I16Vec2:saturating_sub_unsigned(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@return I16Vec2 function I16Vec2.new(x,y) end ----@package ----@param _self I16Vec2 +---@param p1 I16Vec2 +---@param p2 I16Vec2 +---@return I16Vec2 +function I16Vec2:mul(p1,p2) end +---@param _self I16Vec2 ---@return UVec2 function I16Vec2:as_uvec2(_self) end ----@package ---@param _self I16Vec2 - ---@return integer function I16Vec2:length_squared(_self) end ----@package ----@param _self I16Vec2 +---@param p1 I16Vec2 +---@param p2 I16Vec2 +---@return I16Vec2 +function I16Vec2:sub(p1,p2) end +---@param _self I16Vec2 ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:sub(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@return I8Vec2 function I16Vec2:as_i8vec2(_self) end ----@package ----@param _self I16Vec2 +---@param p1 I16Vec2 +---@param p2 I16Vec2 +---@return I16Vec2 +function I16Vec2:add(p1,p2) end +---@param _self I16Vec2 ---@param rhs U16Vec2 - ---@return I16Vec2 function I16Vec2:saturating_add_unsigned(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@return I64Vec2 function I16Vec2:as_i64vec2(_self) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return BVec2 function I16Vec2:cmplt(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return integer function I16Vec2:distance_squared(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@return I16Vec2 function I16Vec2:neg(_self) end ----@package ---@param _self I16Vec2 - ---@return integer function I16Vec2:min_element(_self) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:saturating_add(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:add(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:wrapping_div(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return BVec2 function I16Vec2:cmpge(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:mul(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return BVec2 function I16Vec2:cmple(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:saturating_div(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs U16Vec2 - ---@return I16Vec2 function I16Vec2:wrapping_add_unsigned(_self,rhs) end ----@package ----@param _self I16Vec2 +---@param p1 I16Vec2 +---@param p2 integer +---@return I16Vec2 +function I16Vec2:add(p1,p2) end +---@param _self I16Vec2 ---@param other I16Vec2 - ---@return boolean function I16Vec2:eq(_self,other) end ----@package ---@param _self I16Vec2 - ---@return DVec2 function I16Vec2:as_dvec2(_self) end ----@package ---@param _self I16Vec2 - ---@return integer function I16Vec2:max_element(_self) end ----@package ---@param _self I16Vec2 - ---@return I16Vec2 function I16Vec2:clone(_self) end ----@package ---@param _self I16Vec2 - ---@param min I16Vec2 - ---@param max I16Vec2 - ---@return I16Vec2 function I16Vec2:clamp(_self,min,max) end ----@package ---@param _self I16Vec2 - ---@return integer[] function I16Vec2:to_array(_self) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:saturating_mul(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:min(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param z integer - ---@return I16Vec3 function I16Vec2:extend(_self,z) end ----@package ---@param _self I16Vec2 - ---@return I16Vec2 function I16Vec2:signum(_self) end ----@package ---@param _self I16Vec2 - ---@return Vec2 function I16Vec2:as_vec2(_self) end ----@package ---@param _self I16Vec2 - ---@return U64Vec2 function I16Vec2:as_u64vec2(_self) end ----@package ---@param v integer - ---@return I16Vec2 function I16Vec2.splat(v) end ----@package ---@param _self I16Vec2 - ---@return integer function I16Vec2:is_negative_bitmask(_self) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:rem_euclid(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@return IVec2 function I16Vec2:as_ivec2(_self) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:div(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:rotate(_self,rhs) end ----@package ----@param _self I16Vec2 +---@param p1 I16Vec2 +---@param p2 integer +---@return I16Vec2 +function I16Vec2:sub(p1,p2) end +---@param _self I16Vec2 ---@param rhs I16Vec2 - ---@return integer function I16Vec2:perp_dot(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@return integer function I16Vec2:element_sum(_self) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:max(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:rem(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@return I16Vec2 function I16Vec2:abs(_self) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:saturating_sub(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return BVec2 function I16Vec2:cmpgt(_self,rhs) end ----@package ----@param _self I16Vec2 +---@param p1 I16Vec2 +---@param p2 I16Vec2 +---@return I16Vec2 +function I16Vec2:div(p1,p2) end + +---@param p1 I16Vec2 +---@param p2 integer +---@return I16Vec2 +function I16Vec2:rem(p1,p2) end +---@param p1 I16Vec2 +---@param p2 integer +---@return I16Vec2 +function I16Vec2:mul(p1,p2) end + +---@param _self I16Vec2 ---@return U16Vec2 function I16Vec2:as_u16vec2(_self) end ----@package ---@param _self I16Vec2 - ---@param y integer - ---@return I16Vec2 function I16Vec2:with_y(_self,y) end ----@package ---@param mask BVec2 - ---@param if_true I16Vec2 - ---@param if_false I16Vec2 - ---@return I16Vec2 function I16Vec2.select(mask,if_true,if_false) end ----@package ---@param _self I16Vec2 - ---@return integer function I16Vec2:element_product(_self) end ----@package ---@param _self I16Vec2 - ----@return [] +---@return nil function I16Vec2:assert_receiver_is_total_eq(_self) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:wrapping_mul(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return BVec2 function I16Vec2:cmpeq(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:div_euclid(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs U16Vec2 - ---@return I16Vec2 function I16Vec2:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return integer function I16Vec2:dot(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:wrapping_add(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:wrapping_sub(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@return U8Vec2 function I16Vec2:as_u8vec2(_self) end ----@package ---@param _self I16Vec2 - ---@param rhs I16Vec2 - ---@return I16Vec2 function I16Vec2:dot_into_vec(_self,rhs) end ----@package ----@param _self I16Vec2 +---@param p1 I16Vec2 +---@param p2 I16Vec2 +---@return I16Vec2 +function I16Vec2:rem(p1,p2) end +---@param _self I16Vec2 ---@param rhs I16Vec2 - ---@return BVec2 function I16Vec2:cmpne(_self,rhs) end ----@package ---@param _self I16Vec2 - ---@param x integer - ---@return I16Vec2 function I16Vec2:with_x(_self,x) end ----@package ----@param _self I16Vec2 +---@param p1 I16Vec2 +---@param p2 integer +---@return I16Vec2 +function I16Vec2:div(p1,p2) end +---@param _self I16Vec2 ---@return I16Vec2 function I16Vec2:perp(_self) end ----@package ---@param a integer[] - ---@return I16Vec2 function I16Vec2.from_array(a) end ----@class I16Vec3 - +---@class I16Vec3 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer I16Vec3 = {} ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return BVec3 function I16Vec3:cmplt(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return integer[] function I16Vec3:to_array(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return BVec3 function I16Vec3:cmple(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:mul(_self,rhs) end ----@package ----@param _self I16Vec3 +---@param p1 I16Vec3 +---@param p2 I16Vec3 +---@return I16Vec3 +function I16Vec3:add(p1,p2) end +---@param _self I16Vec3 ---@param rhs U16Vec3 - ---@return I16Vec3 function I16Vec3:saturating_sub_unsigned(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return integer function I16Vec3:element_sum(_self) end ----@package ----@param _self I16Vec3 +---@param p1 I16Vec3 +---@param p2 integer +---@return I16Vec3 +function I16Vec3:add(p1,p2) end +---@param p1 I16Vec3 +---@param p2 integer +---@return I16Vec3 +function I16Vec3:rem(p1,p2) end + +---@param _self I16Vec3 ---@return integer function I16Vec3:element_product(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs U16Vec3 - ---@return I16Vec3 function I16Vec3:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return I16Vec2 function I16Vec3:truncate(_self) end ----@package ---@param _self I16Vec3 - ---@return I16Vec3 function I16Vec3:neg(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return BVec3 function I16Vec3:cmpne(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return integer function I16Vec3:length_squared(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return BVec3 function I16Vec3:cmpge(_self,rhs) end ----@package ----@param _self I16Vec3 +---@param p1 I16Vec3 +---@param p2 integer +---@return I16Vec3 +function I16Vec3:div(p1,p2) end +---@param _self I16Vec3 ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:add(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return Vec3 function I16Vec3:as_vec3(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:saturating_mul(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:saturating_add(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:cross(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param min I16Vec3 - ---@param max I16Vec3 - ---@return I16Vec3 function I16Vec3:clamp(_self,min,max) end ----@package ----@param _self I16Vec3 +---@param p1 I16Vec3 +---@param p2 integer +---@return I16Vec3 +function I16Vec3:mul(p1,p2) end +---@param _self I16Vec3 ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:wrapping_div(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return BVec3 function I16Vec3:cmpeq(_self,rhs) end ----@package ----@param _self I16Vec3 +---@param p1 I16Vec3 +---@param p2 I16Vec3 +---@return I16Vec3 +function I16Vec3:rem(p1,p2) end +---@param _self I16Vec3 ---@return Vec3A function I16Vec3:as_vec3a(_self) end ----@package ---@param _self I16Vec3 - ---@return I16Vec3 function I16Vec3:clone(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:saturating_sub(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:min(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param w integer - ---@return I16Vec4 function I16Vec3:extend(_self,w) end ----@package ---@param _self I16Vec3 - ---@return I64Vec3 function I16Vec3:as_i64vec3(_self) end ----@package ---@param _self I16Vec3 - ---@param y integer - ---@return I16Vec3 function I16Vec3:with_y(_self,y) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:max(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return BVec3 function I16Vec3:cmpgt(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return U16Vec3 function I16Vec3:as_u16vec3(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:wrapping_mul(_self,rhs) end ----@package ----@param _self I16Vec3 +---@param p1 I16Vec3 +---@param p2 I16Vec3 +---@return I16Vec3 +function I16Vec3:mul(p1,p2) end +---@param _self I16Vec3 ---@return I16Vec3 function I16Vec3:signum(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:sub(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return integer function I16Vec3:dot(_self,rhs) end ----@package ---@param mask BVec3 - ---@param if_true I16Vec3 - ---@param if_false I16Vec3 - ---@return I16Vec3 function I16Vec3.select(mask,if_true,if_false) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:wrapping_sub(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return I8Vec3 function I16Vec3:as_i8vec3(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:div(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param z integer - ---@return I16Vec3 function I16Vec3:with_z(_self,z) end ----@package ---@param _self I16Vec3 - ---@return integer function I16Vec3:max_element(_self) end ----@package ---@param _self I16Vec3 - ---@return integer function I16Vec3:min_element(_self) end ----@package ---@param a integer[] - ---@return I16Vec3 function I16Vec3.from_array(a) end ----@package ---@param _self I16Vec3 - ----@return [] +---@return nil function I16Vec3:assert_receiver_is_total_eq(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return integer function I16Vec3:distance_squared(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return DVec3 function I16Vec3:as_dvec3(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs U16Vec3 - ---@return I16Vec3 function I16Vec3:wrapping_add_unsigned(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:div_euclid(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return integer function I16Vec3:is_negative_bitmask(_self) end ----@package ---@param _self I16Vec3 - ---@return UVec3 function I16Vec3:as_uvec3(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:rem_euclid(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return U64Vec3 function I16Vec3:as_u64vec3(_self) end ----@package ---@param _self I16Vec3 - ---@param other I16Vec3 - ---@return boolean function I16Vec3:eq(_self,other) end ----@package ---@param _self I16Vec3 - ---@return U8Vec3 function I16Vec3:as_u8vec3(_self) end ----@package ---@param _self I16Vec3 - ---@return IVec3 function I16Vec3:as_ivec3(_self) end ----@package ----@param _self I16Vec3 +---@param p1 I16Vec3 +---@param p2 I16Vec3 +---@return I16Vec3 +function I16Vec3:sub(p1,p2) end +---@param _self I16Vec3 ---@param x integer - ---@return I16Vec3 function I16Vec3:with_x(_self,x) end ----@package ----@param v integer +---@param p1 I16Vec3 +---@param p2 integer +---@return I16Vec3 +function I16Vec3:sub(p1,p2) end +---@param v integer ---@return I16Vec3 function I16Vec3.splat(v) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:dot_into_vec(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:wrapping_add(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@return I16Vec3 function I16Vec3:abs(_self) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:rem(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs I16Vec3 - ---@return I16Vec3 function I16Vec3:saturating_div(_self,rhs) end ----@package ---@param _self I16Vec3 - ---@param rhs U16Vec3 - ---@return I16Vec3 function I16Vec3:saturating_add_unsigned(_self,rhs) end ----@package ----@param x integer +---@param p1 I16Vec3 +---@param p2 I16Vec3 +---@return I16Vec3 +function I16Vec3:div(p1,p2) end +---@param x integer ---@param y integer - ---@param z integer - ---@return I16Vec3 function I16Vec3.new(x,y,z) end ----@class I16Vec4 - +---@class I16Vec4 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer ---@field w ? integer I16Vec4 = {} ----@package ---@param _self I16Vec4 - ---@param rhs U16Vec4 - ---@return I16Vec4 function I16Vec4:saturating_add_unsigned(_self,rhs) end ----@package ---@param _self I16Vec4 - ----@return [] +---@return nil function I16Vec4:assert_receiver_is_total_eq(_self) end ----@package ---@param v integer - ---@return I16Vec4 function I16Vec4.splat(v) end ----@package ---@param _self I16Vec4 - ---@param w integer - ---@return I16Vec4 function I16Vec4:with_w(_self,w) end ----@package ---@param a integer[] - ---@return I16Vec4 function I16Vec4.from_array(a) end ----@package ----@param _self I16Vec4 +---@param p1 I16Vec4 +---@param p2 I16Vec4 +---@return I16Vec4 +function I16Vec4:add(p1,p2) end +---@param _self I16Vec4 ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:saturating_sub(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@param w integer - ---@return I16Vec4 function I16Vec4.new(x,y,z,w) end ----@package ---@param _self I16Vec4 - ---@return I8Vec4 function I16Vec4:as_i8vec4(_self) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:rem(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@return I16Vec4 function I16Vec4:neg(_self) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return BVec4 function I16Vec4:cmpgt(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@return Vec4 function I16Vec4:as_vec4(_self) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:wrapping_mul(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs U16Vec4 - ---@return I16Vec4 function I16Vec4:wrapping_add_unsigned(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param min I16Vec4 - ---@param max I16Vec4 - ---@return I16Vec4 function I16Vec4:clamp(_self,min,max) end ----@package ----@param _self I16Vec4 +---@param p1 I16Vec4 +---@param p2 I16Vec4 +---@return I16Vec4 +function I16Vec4:mul(p1,p2) end +---@param _self I16Vec4 ---@return integer[] function I16Vec4:to_array(_self) end ----@package ---@param _self I16Vec4 - ---@param other I16Vec4 - ---@return boolean function I16Vec4:eq(_self,other) end ----@package ---@param _self I16Vec4 - ---@return integer function I16Vec4:length_squared(_self) end ----@package ---@param _self I16Vec4 - ---@return I16Vec3 function I16Vec4:truncate(_self) end ----@package ---@param _self I16Vec4 - ---@param y integer - ---@return I16Vec4 function I16Vec4:with_y(_self,y) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return BVec4 function I16Vec4:cmple(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return BVec4 function I16Vec4:cmpne(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:saturating_add(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:div_euclid(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return BVec4 function I16Vec4:cmpge(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:saturating_mul(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:wrapping_add(_self,rhs) end ----@package ---@param mask BVec4 - ---@param if_true I16Vec4 - ---@param if_false I16Vec4 - ---@return I16Vec4 function I16Vec4.select(mask,if_true,if_false) end ----@package ---@param _self I16Vec4 - ---@return DVec4 function I16Vec4:as_dvec4(_self) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:wrapping_sub(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@return U64Vec4 function I16Vec4:as_u64vec4(_self) end ----@package ---@param _self I16Vec4 - ---@param rhs U16Vec4 - ---@return I16Vec4 function I16Vec4:saturating_sub_unsigned(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:max(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@return IVec4 function I16Vec4:as_ivec4(_self) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return BVec4 function I16Vec4:cmpeq(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:div(_self,rhs) end ----@package ----@param _self I16Vec4 +---@param p1 I16Vec4 +---@param p2 integer +---@return I16Vec4 +function I16Vec4:rem(p1,p2) end +---@param _self I16Vec4 ---@param x integer - ---@return I16Vec4 function I16Vec4:with_x(_self,x) end ----@package ---@param _self I16Vec4 - ---@return I64Vec4 function I16Vec4:as_i64vec4(_self) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return BVec4 function I16Vec4:cmplt(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@return integer function I16Vec4:is_negative_bitmask(_self) end ----@package ---@param _self I16Vec4 - ---@return I16Vec4 function I16Vec4:abs(_self) end ----@package ---@param _self I16Vec4 - ---@return I16Vec4 function I16Vec4:signum(_self) end ----@package ----@param _self I16Vec4 +---@param p1 I16Vec4 +---@param p2 integer +---@return I16Vec4 +function I16Vec4:mul(p1,p2) end +---@param _self I16Vec4 ---@return U16Vec4 function I16Vec4:as_u16vec4(_self) end ----@package ---@param _self I16Vec4 - ---@return U8Vec4 function I16Vec4:as_u8vec4(_self) end ----@package ---@param _self I16Vec4 - ---@return integer function I16Vec4:min_element(_self) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:sub(_self,rhs) end ----@package ----@param _self I16Vec4 +---@param p1 I16Vec4 +---@param p2 integer +---@return I16Vec4 +function I16Vec4:sub(p1,p2) end +---@param _self I16Vec4 ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:wrapping_div(_self,rhs) end ----@package ----@param _self I16Vec4 +---@param p1 I16Vec4 +---@param p2 integer +---@return I16Vec4 +function I16Vec4:div(p1,p2) end +---@param _self I16Vec4 ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:min(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:mul(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:add(_self,rhs) end ----@package ----@param _self I16Vec4 +---@param p1 I16Vec4 +---@param p2 integer +---@return I16Vec4 +function I16Vec4:add(p1,p2) end +---@param _self I16Vec4 ---@param rhs U16Vec4 - ---@return I16Vec4 function I16Vec4:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param z integer - ---@return I16Vec4 function I16Vec4:with_z(_self,z) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:rem_euclid(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return integer function I16Vec4:dot(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@return integer function I16Vec4:element_product(_self) end ----@package ---@param _self I16Vec4 - ---@return integer function I16Vec4:max_element(_self) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return integer function I16Vec4:distance_squared(_self,rhs) end ----@package ----@param _self I16Vec4 +---@param p1 I16Vec4 +---@param p2 I16Vec4 +---@return I16Vec4 +function I16Vec4:sub(p1,p2) end + +---@param p1 I16Vec4 +---@param p2 I16Vec4 +---@return I16Vec4 +function I16Vec4:div(p1,p2) end +---@param _self I16Vec4 ---@return UVec4 function I16Vec4:as_uvec4(_self) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:saturating_div(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@param rhs I16Vec4 - ---@return I16Vec4 function I16Vec4:dot_into_vec(_self,rhs) end ----@package ---@param _self I16Vec4 - ---@return I16Vec4 function I16Vec4:clone(_self) end ----@package ----@param _self I16Vec4 +---@param p1 I16Vec4 +---@param p2 I16Vec4 +---@return I16Vec4 +function I16Vec4:rem(p1,p2) end +---@param _self I16Vec4 ---@return integer function I16Vec4:element_sum(_self) end ----@class I64Vec2 - +---@class I64Vec2 : ReflectReference ---@field x ? integer ---@field y ? integer I64Vec2 = {} ----@package ---@param _self I64Vec2 - ---@return U8Vec2 function I64Vec2:as_u8vec2(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs U64Vec2 - ---@return I64Vec2 function I64Vec2:wrapping_add_unsigned(_self,rhs) end ----@package ----@param _self I64Vec2 +---@param p1 I64Vec2 +---@param p2 I64Vec2 +---@return I64Vec2 +function I64Vec2:mul(p1,p2) end +---@param _self I64Vec2 ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:div(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return I64Vec2 function I64Vec2:abs(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return BVec2 function I64Vec2:cmpeq(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return I64Vec2 function I64Vec2:signum(_self) end ----@package ---@param _self I64Vec2 - ---@return I64Vec2 function I64Vec2:neg(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return BVec2 function I64Vec2:cmpgt(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return integer function I64Vec2:element_product(_self) end ----@package ---@param _self I64Vec2 - ---@param z integer - ---@return I64Vec3 function I64Vec2:extend(_self,z) end ----@package ----@param _self I64Vec2 +---@param p1 I64Vec2 +---@param p2 I64Vec2 +---@return I64Vec2 +function I64Vec2:rem(p1,p2) end ----@return [] +---@param _self I64Vec2 +---@return nil function I64Vec2:assert_receiver_is_total_eq(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:wrapping_add(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:wrapping_sub(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return integer function I64Vec2:distance_squared(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param other I64Vec2 - ---@return boolean function I64Vec2:eq(_self,other) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return BVec2 function I64Vec2:cmpne(_self,rhs) end ----@package ----@param _self I64Vec2 +---@param p1 I64Vec2 +---@param p2 I64Vec2 +---@return I64Vec2 +function I64Vec2:add(p1,p2) end ----@param rhs U64Vec2 +---@param p1 I64Vec2 +---@param p2 integer +---@return I64Vec2 +function I64Vec2:mul(p1,p2) end +---@param _self I64Vec2 +---@param rhs U64Vec2 ---@return I64Vec2 function I64Vec2:saturating_add_unsigned(_self,rhs) end ----@package ----@param _self I64Vec2 +---@param p1 I64Vec2 +---@param p2 integer +---@return I64Vec2 +function I64Vec2:rem(p1,p2) end ----@param rhs I64Vec2 +---@param p1 I64Vec2 +---@param p2 I64Vec2 +---@return I64Vec2 +function I64Vec2:div(p1,p2) end +---@param _self I64Vec2 +---@param rhs I64Vec2 ---@return I64Vec2 function I64Vec2:saturating_mul(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:saturating_sub(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return integer function I64Vec2:element_sum(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:min(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return Vec2 function I64Vec2:as_vec2(_self) end ----@package ----@param _self I64Vec2 +---@param p1 I64Vec2 +---@param p2 integer +---@return I64Vec2 +function I64Vec2:add(p1,p2) end +---@param _self I64Vec2 ---@return IVec2 function I64Vec2:as_ivec2(_self) end ----@package ---@param _self I64Vec2 - ---@return integer[] function I64Vec2:to_array(_self) end ----@package ---@param x integer - ---@param y integer - ---@return I64Vec2 function I64Vec2.new(x,y) end ----@package ---@param _self I64Vec2 - ---@param y integer - ---@return I64Vec2 function I64Vec2:with_y(_self,y) end ----@package ---@param _self I64Vec2 - ---@return DVec2 function I64Vec2:as_dvec2(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:dot_into_vec(_self,rhs) end ----@package ----@param _self I64Vec2 +---@param p1 I64Vec2 +---@param p2 integer +---@return I64Vec2 +function I64Vec2:div(p1,p2) end +---@param _self I64Vec2 ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:saturating_add(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:rem_euclid(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs U64Vec2 - ---@return I64Vec2 function I64Vec2:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param min I64Vec2 - ---@param max I64Vec2 - ---@return I64Vec2 function I64Vec2:clamp(_self,min,max) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:rotate(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return UVec2 function I64Vec2:as_uvec2(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return BVec2 function I64Vec2:cmpge(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return BVec2 function I64Vec2:cmplt(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return integer function I64Vec2:dot(_self,rhs) end ----@package ----@param _self I64Vec2 +---@param p1 I64Vec2 +---@param p2 integer +---@return I64Vec2 +function I64Vec2:sub(p1,p2) end +---@param _self I64Vec2 ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:add(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return BVec2 function I64Vec2:cmple(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return U16Vec2 function I64Vec2:as_u16vec2(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:max(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:wrapping_div(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:saturating_div(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return integer function I64Vec2:min_element(_self) end ----@package ---@param _self I64Vec2 - ---@param x integer - ---@return I64Vec2 function I64Vec2:with_x(_self,x) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:rem(_self,rhs) end ----@package ---@param mask BVec2 - ---@param if_true I64Vec2 - ---@param if_false I64Vec2 - ---@return I64Vec2 function I64Vec2.select(mask,if_true,if_false) end ----@package ---@param _self I64Vec2 - ---@return I16Vec2 function I64Vec2:as_i16vec2(_self) end ----@package ---@param v integer - ---@return I64Vec2 function I64Vec2.splat(v) end ----@package ---@param _self I64Vec2 - ---@return integer function I64Vec2:length_squared(_self) end ----@package ---@param _self I64Vec2 - ---@return I8Vec2 function I64Vec2:as_i8vec2(_self) end ----@package ---@param _self I64Vec2 - ---@return integer function I64Vec2:max_element(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:mul(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return U64Vec2 function I64Vec2:as_u64vec2(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:wrapping_mul(_self,rhs) end ----@package ----@param _self I64Vec2 +---@param p1 I64Vec2 +---@param p2 I64Vec2 +---@return I64Vec2 +function I64Vec2:sub(p1,p2) end +---@param _self I64Vec2 ---@return integer function I64Vec2:is_negative_bitmask(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:div_euclid(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return I64Vec2 function I64Vec2:sub(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return I64Vec2 function I64Vec2:perp(_self) end ----@package ---@param _self I64Vec2 - ---@param rhs U64Vec2 - ---@return I64Vec2 function I64Vec2:saturating_sub_unsigned(_self,rhs) end ----@package ---@param a integer[] - ---@return I64Vec2 function I64Vec2.from_array(a) end ----@package ---@param _self I64Vec2 - ---@param rhs I64Vec2 - ---@return integer function I64Vec2:perp_dot(_self,rhs) end ----@package ---@param _self I64Vec2 - ---@return I64Vec2 function I64Vec2:clone(_self) end ----@class I64Vec3 - +---@class I64Vec3 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer I64Vec3 = {} ----@package ---@param _self I64Vec3 - ---@return integer function I64Vec3:element_sum(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:div_euclid(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param min I64Vec3 - ---@param max I64Vec3 - ---@return I64Vec3 function I64Vec3:clamp(_self,min,max) end ----@package ----@param _self I64Vec3 +---@param p1 I64Vec3 +---@param p2 integer +---@return I64Vec3 +function I64Vec3:rem(p1,p2) end ----@param rhs I64Vec3 +---@param p1 I64Vec3 +---@param p2 I64Vec3 +---@return I64Vec3 +function I64Vec3:sub(p1,p2) end +---@param _self I64Vec3 +---@param rhs I64Vec3 ---@return BVec3 function I64Vec3:cmpne(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:cross(_self,rhs) end ----@package ----@param _self I64Vec3 +---@param p1 I64Vec3 +---@param p2 integer +---@return I64Vec3 +function I64Vec3:sub(p1,p2) end +---@param _self I64Vec3 ---@return I64Vec2 function I64Vec3:truncate(_self) end ----@package ----@param _self I64Vec3 +---@param p1 I64Vec3 +---@param p2 I64Vec3 +---@return I64Vec3 +function I64Vec3:rem(p1,p2) end +---@param _self I64Vec3 ---@param rhs U64Vec3 - ---@return I64Vec3 function I64Vec3:wrapping_add_unsigned(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return I64Vec3 function I64Vec3:neg(_self) end ----@package ---@param _self I64Vec3 - ---@return U16Vec3 function I64Vec3:as_u16vec3(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:saturating_div(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param other I64Vec3 - ---@return boolean function I64Vec3:eq(_self,other) end ----@package ----@param _self I64Vec3 +---@param p1 I64Vec3 +---@param p2 I64Vec3 +---@return I64Vec3 +function I64Vec3:div(p1,p2) end +---@param _self I64Vec3 ---@return integer function I64Vec3:is_negative_bitmask(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:saturating_mul(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param rhs U64Vec3 - ---@return I64Vec3 function I64Vec3:saturating_add_unsigned(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:max(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:saturating_add(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return integer function I64Vec3:dot(_self,rhs) end ----@package ---@param v integer - ---@return I64Vec3 function I64Vec3.splat(v) end ----@package ---@param a integer[] - ---@return I64Vec3 function I64Vec3.from_array(a) end ----@package ---@param _self I64Vec3 - ---@param w integer - ---@return I64Vec4 function I64Vec3:extend(_self,w) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return BVec3 function I64Vec3:cmpgt(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return I64Vec3 function I64Vec3:clone(_self) end ----@package ----@param _self I64Vec3 +---@param p1 I64Vec3 +---@param p2 I64Vec3 +---@return I64Vec3 +function I64Vec3:mul(p1,p2) end +---@param _self I64Vec3 ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:rem(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:div(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@return I64Vec3 function I64Vec3.new(x,y,z) end ----@package ---@param _self I64Vec3 - ----@return [] +---@return nil function I64Vec3:assert_receiver_is_total_eq(_self) end ----@package ---@param _self I64Vec3 - ---@return U64Vec3 function I64Vec3:as_u64vec3(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:rem_euclid(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:wrapping_mul(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return I8Vec3 function I64Vec3:as_i8vec3(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:mul(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return I64Vec3 function I64Vec3:abs(_self) end ----@package ---@param mask BVec3 - ---@param if_true I64Vec3 - ---@param if_false I64Vec3 - ---@return I64Vec3 function I64Vec3.select(mask,if_true,if_false) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:add(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param z integer - ---@return I64Vec3 function I64Vec3:with_z(_self,z) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return integer function I64Vec3:distance_squared(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return integer function I64Vec3:min_element(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:min(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return I64Vec3 function I64Vec3:signum(_self) end ----@package ---@param _self I64Vec3 - ---@return integer[] function I64Vec3:to_array(_self) end ----@package ----@param _self I64Vec3 +---@param p1 I64Vec3 +---@param p2 integer +---@return I64Vec3 +function I64Vec3:div(p1,p2) end +---@param _self I64Vec3 ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:dot_into_vec(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return integer function I64Vec3:element_product(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:wrapping_div(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return BVec3 function I64Vec3:cmpeq(_self,rhs) end ----@package ----@param _self I64Vec3 +---@param p1 I64Vec3 +---@param p2 integer +---@return I64Vec3 +function I64Vec3:mul(p1,p2) end +---@param _self I64Vec3 ---@return DVec3 function I64Vec3:as_dvec3(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:wrapping_sub(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return integer function I64Vec3:length_squared(_self) end ----@package ---@param _self I64Vec3 - ---@return Vec3A function I64Vec3:as_vec3a(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:sub(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return BVec3 function I64Vec3:cmple(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return U8Vec3 function I64Vec3:as_u8vec3(_self) end ----@package ----@param _self I64Vec3 +---@param p1 I64Vec3 +---@param p2 integer +---@return I64Vec3 +function I64Vec3:add(p1,p2) end +---@param _self I64Vec3 ---@return I16Vec3 function I64Vec3:as_i16vec3(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs U64Vec3 - ---@return I64Vec3 function I64Vec3:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return IVec3 function I64Vec3:as_ivec3(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:wrapping_add(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return Vec3 function I64Vec3:as_vec3(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return BVec3 function I64Vec3:cmpge(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return integer function I64Vec3:max_element(_self) end ----@package ---@param _self I64Vec3 - ---@param rhs U64Vec3 - ---@return I64Vec3 function I64Vec3:saturating_sub_unsigned(_self,rhs) end ----@package ----@param _self I64Vec3 +---@param p1 I64Vec3 +---@param p2 I64Vec3 +---@return I64Vec3 +function I64Vec3:add(p1,p2) end +---@param _self I64Vec3 ---@param rhs I64Vec3 - ---@return BVec3 function I64Vec3:cmplt(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@return UVec3 function I64Vec3:as_uvec3(_self) end ----@package ---@param _self I64Vec3 - ---@param x integer - ---@return I64Vec3 function I64Vec3:with_x(_self,x) end ----@package ---@param _self I64Vec3 - ---@param rhs I64Vec3 - ---@return I64Vec3 function I64Vec3:saturating_sub(_self,rhs) end ----@package ---@param _self I64Vec3 - ---@param y integer - ---@return I64Vec3 function I64Vec3:with_y(_self,y) end ----@class I64Vec4 - +---@class I64Vec4 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer ---@field w ? integer I64Vec4 = {} ----@package ----@param _self I64Vec4 +---@param p1 I64Vec4 +---@param p2 I64Vec4 +---@return I64Vec4 +function I64Vec4:add(p1,p2) end +---@param _self I64Vec4 ---@param rhs I64Vec4 - ---@return BVec4 function I64Vec4:cmple(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@return I64Vec4 function I64Vec4:signum(_self) end ----@package ---@param _self I64Vec4 - ---@return integer function I64Vec4:min_element(_self) end ----@package ---@param _self I64Vec4 - ---@return I64Vec4 function I64Vec4:neg(_self) end ----@package ---@param _self I64Vec4 - ---@param w integer - ---@return I64Vec4 function I64Vec4:with_w(_self,w) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:wrapping_add(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return integer function I64Vec4:dot(_self,rhs) end ----@package ----@param _self I64Vec4 +---@param p1 I64Vec4 +---@param p2 integer +---@return I64Vec4 +function I64Vec4:sub(p1,p2) end +---@param _self I64Vec4 ---@return I16Vec4 function I64Vec4:as_i16vec4(_self) end ----@package ---@param _self I64Vec4 - ---@return I64Vec3 function I64Vec4:truncate(_self) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return BVec4 function I64Vec4:cmplt(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs U64Vec4 - ---@return I64Vec4 function I64Vec4:wrapping_add_unsigned(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@return integer function I64Vec4:length_squared(_self) end ----@package ---@param _self I64Vec4 - ---@return integer function I64Vec4:max_element(_self) end ----@package ---@param _self I64Vec4 - ---@param z integer - ---@return I64Vec4 function I64Vec4:with_z(_self,z) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:add(_self,rhs) end ----@package ----@param _self I64Vec4 +---@param p1 I64Vec4 +---@param p2 integer +---@return I64Vec4 +function I64Vec4:add(p1,p2) end +---@param _self I64Vec4 ---@return UVec4 function I64Vec4:as_uvec4(_self) end ----@package ---@param _self I64Vec4 - ---@param min I64Vec4 - ---@param max I64Vec4 - ---@return I64Vec4 function I64Vec4:clamp(_self,min,max) end ----@package ---@param _self I64Vec4 - ---@param y integer - ---@return I64Vec4 function I64Vec4:with_y(_self,y) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:sub(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:mul(_self,rhs) end ----@package ---@param mask BVec4 - ---@param if_true I64Vec4 - ---@param if_false I64Vec4 - ---@return I64Vec4 function I64Vec4.select(mask,if_true,if_false) end ----@package ----@param _self I64Vec4 +---@param p1 I64Vec4 +---@param p2 integer +---@return I64Vec4 +function I64Vec4:rem(p1,p2) end ----@param rhs U64Vec4 +---@param p1 I64Vec4 +---@param p2 integer +---@return I64Vec4 +function I64Vec4:mul(p1,p2) end +---@param _self I64Vec4 +---@param rhs U64Vec4 ---@return I64Vec4 function I64Vec4:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return BVec4 function I64Vec4:cmpgt(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:rem_euclid(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@param w integer - ---@return I64Vec4 function I64Vec4.new(x,y,z,w) end ----@package ---@param _self I64Vec4 - ---@param x integer - ---@return I64Vec4 function I64Vec4:with_x(_self,x) end ----@package ---@param _self I64Vec4 - ---@return integer[] function I64Vec4:to_array(_self) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return BVec4 function I64Vec4:cmpge(_self,rhs) end ----@package ----@param _self I64Vec4 +---@param p1 I64Vec4 +---@param p2 I64Vec4 +---@return I64Vec4 +function I64Vec4:div(p1,p2) end +---@param _self I64Vec4 ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:div(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@return Vec4 function I64Vec4:as_vec4(_self) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:saturating_sub(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:wrapping_mul(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:div_euclid(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs U64Vec4 - ---@return I64Vec4 function I64Vec4:saturating_add_unsigned(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:saturating_add(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs U64Vec4 - ---@return I64Vec4 function I64Vec4:saturating_sub_unsigned(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@return IVec4 function I64Vec4:as_ivec4(_self) end ----@package ---@param _self I64Vec4 - ---@param other I64Vec4 - ---@return boolean function I64Vec4:eq(_self,other) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:saturating_div(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:wrapping_div(_self,rhs) end ----@package ----@param _self I64Vec4 +---@param p1 I64Vec4 +---@param p2 I64Vec4 +---@return I64Vec4 +function I64Vec4:rem(p1,p2) end ----@return [] +---@param _self I64Vec4 +---@return nil function I64Vec4:assert_receiver_is_total_eq(_self) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:rem(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@return integer function I64Vec4:element_product(_self) end ----@package ----@param _self I64Vec4 +---@param p1 I64Vec4 +---@param p2 integer +---@return I64Vec4 +function I64Vec4:div(p1,p2) end +---@param _self I64Vec4 ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:min(_self,rhs) end ----@package ----@param _self I64Vec4 +---@param p1 I64Vec4 +---@param p2 I64Vec4 +---@return I64Vec4 +function I64Vec4:mul(p1,p2) end +---@param _self I64Vec4 ---@return integer function I64Vec4:element_sum(_self) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return BVec4 function I64Vec4:cmpne(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:wrapping_sub(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:dot_into_vec(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return BVec4 function I64Vec4:cmpeq(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:saturating_mul(_self,rhs) end ----@package ---@param _self I64Vec4 - ---@return I64Vec4 function I64Vec4:clone(_self) end ----@package ---@param _self I64Vec4 - ---@return I64Vec4 function I64Vec4:abs(_self) end ----@package ---@param _self I64Vec4 - ---@return U8Vec4 function I64Vec4:as_u8vec4(_self) end ----@package ---@param _self I64Vec4 - ---@return U16Vec4 function I64Vec4:as_u16vec4(_self) end ----@package ---@param _self I64Vec4 - ---@return U64Vec4 function I64Vec4:as_u64vec4(_self) end ----@package ---@param _self I64Vec4 - ---@return DVec4 function I64Vec4:as_dvec4(_self) end ----@package ---@param a integer[] - ---@return I64Vec4 function I64Vec4.from_array(a) end ----@package ---@param _self I64Vec4 - ---@return I8Vec4 function I64Vec4:as_i8vec4(_self) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return I64Vec4 function I64Vec4:max(_self,rhs) end ----@package ----@param _self I64Vec4 +---@param p1 I64Vec4 +---@param p2 I64Vec4 +---@return I64Vec4 +function I64Vec4:sub(p1,p2) end +---@param _self I64Vec4 ---@return integer function I64Vec4:is_negative_bitmask(_self) end ----@package ---@param v integer - ---@return I64Vec4 function I64Vec4.splat(v) end ----@package ---@param _self I64Vec4 - ---@param rhs I64Vec4 - ---@return integer function I64Vec4:distance_squared(_self,rhs) end ----@class I8Vec2 - +---@class I8Vec2 : ReflectReference ---@field x ? integer ---@field y ? integer I8Vec2 = {} ----@package ---@param v integer - ---@return I8Vec2 function I8Vec2.splat(v) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:mul(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:sub(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@return DVec2 function I8Vec2:as_dvec2(_self) end ----@package ----@param _self I8Vec2 +---@param p1 I8Vec2 +---@param p2 I8Vec2 +---@return I8Vec2 +function I8Vec2:div(p1,p2) end ----@param rhs U8Vec2 +---@param p1 I8Vec2 +---@param p2 integer +---@return I8Vec2 +function I8Vec2:mul(p1,p2) end +---@param _self I8Vec2 +---@param rhs U8Vec2 ---@return I8Vec2 function I8Vec2:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param other I8Vec2 - ---@return boolean function I8Vec2:eq(_self,other) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:add(_self,rhs) end ----@package ---@param mask BVec2 - ---@param if_true I8Vec2 - ---@param if_false I8Vec2 - ---@return I8Vec2 function I8Vec2.select(mask,if_true,if_false) end ----@package ----@param _self I8Vec2 +---@param p1 I8Vec2 +---@param p2 I8Vec2 +---@return I8Vec2 +function I8Vec2:mul(p1,p2) end +---@param _self I8Vec2 ---@return integer[] function I8Vec2:to_array(_self) end ----@package ---@param _self I8Vec2 - ---@return U8Vec2 function I8Vec2:as_u8vec2(_self) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:wrapping_add(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return BVec2 function I8Vec2:cmpgt(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@return U16Vec2 function I8Vec2:as_u16vec2(_self) end ----@package ---@param _self I8Vec2 - ---@return Vec2 function I8Vec2:as_vec2(_self) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:saturating_div(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return BVec2 function I8Vec2:cmplt(_self,rhs) end ----@package ----@param x integer +---@param p1 I8Vec2 +---@param p2 integer +---@return I8Vec2 +function I8Vec2:add(p1,p2) end +---@param x integer ---@param y integer - ---@return I8Vec2 function I8Vec2.new(x,y) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:div(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param y integer - ---@return I8Vec2 function I8Vec2:with_y(_self,y) end ----@package ----@param _self I8Vec2 +---@param p1 I8Vec2 +---@param p2 I8Vec2 +---@return I8Vec2 +function I8Vec2:rem(p1,p2) end +---@param _self I8Vec2 ---@return integer function I8Vec2:is_negative_bitmask(_self) end ----@package ---@param a integer[] - ---@return I8Vec2 function I8Vec2.from_array(a) end ----@package ---@param _self I8Vec2 - ---@param x integer - ---@return I8Vec2 function I8Vec2:with_x(_self,x) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:wrapping_sub(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:saturating_mul(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@return I8Vec2 function I8Vec2:perp(_self) end ----@package ----@param _self I8Vec2 +---@param p1 I8Vec2 +---@param p2 I8Vec2 +---@return I8Vec2 +function I8Vec2:add(p1,p2) end + +---@param p1 I8Vec2 +---@param p2 integer +---@return I8Vec2 +function I8Vec2:div(p1,p2) end +---@param _self I8Vec2 ---@return I64Vec2 function I8Vec2:as_i64vec2(_self) end ----@package ----@param _self I8Vec2 +---@param p1 I8Vec2 +---@param p2 I8Vec2 +---@return I8Vec2 +function I8Vec2:sub(p1,p2) end +---@param _self I8Vec2 ---@return integer function I8Vec2:element_product(_self) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:max(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@return U64Vec2 function I8Vec2:as_u64vec2(_self) end ----@package ----@param _self I8Vec2 +---@param p1 I8Vec2 +---@param p2 integer +---@return I8Vec2 +function I8Vec2:rem(p1,p2) end +---@param _self I8Vec2 ---@return I16Vec2 function I8Vec2:as_i16vec2(_self) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:min(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:rem(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@return integer function I8Vec2:max_element(_self) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return BVec2 function I8Vec2:cmpeq(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@return IVec2 function I8Vec2:as_ivec2(_self) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return BVec2 function I8Vec2:cmpge(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:rotate(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return BVec2 function I8Vec2:cmpne(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs U8Vec2 - ---@return I8Vec2 function I8Vec2:saturating_sub_unsigned(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:rem_euclid(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return integer function I8Vec2:distance_squared(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param z integer - ---@return I8Vec3 function I8Vec2:extend(_self,z) end ----@package ---@param _self I8Vec2 - ---@return I8Vec2 function I8Vec2:neg(_self) end ----@package ---@param _self I8Vec2 - ---@return integer function I8Vec2:min_element(_self) end ----@package ---@param _self I8Vec2 - ---@return I8Vec2 function I8Vec2:signum(_self) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return integer function I8Vec2:perp_dot(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return BVec2 function I8Vec2:cmple(_self,rhs) end ----@package ----@param _self I8Vec2 +---@param p1 I8Vec2 +---@param p2 integer +---@return I8Vec2 +function I8Vec2:sub(p1,p2) end +---@param _self I8Vec2 ---@param min I8Vec2 - ---@param max I8Vec2 - ---@return I8Vec2 function I8Vec2:clamp(_self,min,max) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:wrapping_div(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return integer function I8Vec2:dot(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:dot_into_vec(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@return I8Vec2 function I8Vec2:clone(_self) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:wrapping_mul(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:saturating_add(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@return I8Vec2 function I8Vec2:abs(_self) end ----@package ---@param _self I8Vec2 - ---@param rhs U8Vec2 - ---@return I8Vec2 function I8Vec2:wrapping_add_unsigned(_self,rhs) end ----@package ---@param _self I8Vec2 - ----@return [] +---@return nil function I8Vec2:assert_receiver_is_total_eq(_self) end ----@package ---@param _self I8Vec2 - ---@param rhs U8Vec2 - ---@return I8Vec2 function I8Vec2:saturating_add_unsigned(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:div_euclid(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@param rhs I8Vec2 - ---@return I8Vec2 function I8Vec2:saturating_sub(_self,rhs) end ----@package ---@param _self I8Vec2 - ---@return integer function I8Vec2:length_squared(_self) end ----@package ---@param _self I8Vec2 - ---@return UVec2 function I8Vec2:as_uvec2(_self) end ----@package ---@param _self I8Vec2 - ---@return integer function I8Vec2:element_sum(_self) end ----@class I8Vec3 - +---@class I8Vec3 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer I8Vec3 = {} ----@package ---@param _self I8Vec3 - ---@return Vec3 function I8Vec3:as_vec3(_self) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:rem_euclid(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param w integer - ---@return I8Vec4 function I8Vec3:extend(_self,w) end ----@package ---@param _self I8Vec3 - ---@return U16Vec3 function I8Vec3:as_u16vec3(_self) end ----@package ----@param _self I8Vec3 +---@param p1 I8Vec3 +---@param p2 integer +---@return I8Vec3 +function I8Vec3:add(p1,p2) end +---@param _self I8Vec3 ---@return I8Vec3 function I8Vec3:signum(_self) end ----@package ---@param _self I8Vec3 - ---@return DVec3 function I8Vec3:as_dvec3(_self) end ----@package ---@param _self I8Vec3 - ---@return integer function I8Vec3:element_product(_self) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return BVec3 function I8Vec3:cmpgt(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs U8Vec3 - ---@return I8Vec3 function I8Vec3:saturating_sub_unsigned(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs U8Vec3 - ---@return I8Vec3 function I8Vec3:wrapping_add_unsigned(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs U8Vec3 - ---@return I8Vec3 function I8Vec3:saturating_add_unsigned(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@return UVec3 function I8Vec3:as_uvec3(_self) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:add(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:max(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:cross(_self,rhs) end ----@package ----@param _self I8Vec3 +---@param p1 I8Vec3 +---@param p2 I8Vec3 +---@return I8Vec3 +function I8Vec3:div(p1,p2) end +---@param _self I8Vec3 ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:div_euclid(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param min I8Vec3 - ---@param max I8Vec3 - ---@return I8Vec3 function I8Vec3:clamp(_self,min,max) end ----@package ---@param _self I8Vec3 - ---@return integer function I8Vec3:max_element(_self) end ----@package ----@param _self I8Vec3 +---@param p1 I8Vec3 +---@param p2 integer +---@return I8Vec3 +function I8Vec3:sub(p1,p2) end +---@param _self I8Vec3 ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:wrapping_sub(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@return Vec3A function I8Vec3:as_vec3a(_self) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return BVec3 function I8Vec3:cmpeq(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@return I8Vec3 function I8Vec3:neg(_self) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return BVec3 function I8Vec3:cmpne(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:wrapping_div(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@return U64Vec3 function I8Vec3:as_u64vec3(_self) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@return I8Vec3 function I8Vec3.new(x,y,z) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:saturating_add(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@return I8Vec2 function I8Vec3:truncate(_self) end ----@package ----@param _self I8Vec3 +---@param p1 I8Vec3 +---@param p2 I8Vec3 +---@return I8Vec3 +function I8Vec3:sub(p1,p2) end + +---@param p1 I8Vec3 +---@param p2 I8Vec3 +---@return I8Vec3 +function I8Vec3:add(p1,p2) end ----@return [] +---@param _self I8Vec3 +---@return nil function I8Vec3:assert_receiver_is_total_eq(_self) end ----@package ---@param v integer - ---@return I8Vec3 function I8Vec3.splat(v) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return BVec3 function I8Vec3:cmplt(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@return I64Vec3 function I8Vec3:as_i64vec3(_self) end ----@package ---@param mask BVec3 - ---@param if_true I8Vec3 - ---@param if_false I8Vec3 - ---@return I8Vec3 function I8Vec3.select(mask,if_true,if_false) end ----@package ----@param a integer[] +---@param p1 I8Vec3 +---@param p2 integer +---@return I8Vec3 +function I8Vec3:rem(p1,p2) end +---@param a integer[] ---@return I8Vec3 function I8Vec3.from_array(a) end ----@package ---@param _self I8Vec3 - ---@return integer function I8Vec3:is_negative_bitmask(_self) end ----@package ---@param _self I8Vec3 - ---@param other I8Vec3 - ---@return boolean function I8Vec3:eq(_self,other) end ----@package ---@param _self I8Vec3 - ---@param y integer - ---@return I8Vec3 function I8Vec3:with_y(_self,y) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:mul(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@return integer[] function I8Vec3:to_array(_self) end ----@package ---@param _self I8Vec3 - ---@return I8Vec3 function I8Vec3:abs(_self) end ----@package ---@param _self I8Vec3 - ---@param z integer - ---@return I8Vec3 function I8Vec3:with_z(_self,z) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:sub(_self,rhs) end ----@package ----@param _self I8Vec3 +---@param p1 I8Vec3 +---@param p2 I8Vec3 +---@return I8Vec3 +function I8Vec3:mul(p1,p2) end +---@param _self I8Vec3 ---@param x integer - ---@return I8Vec3 function I8Vec3:with_x(_self,x) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return integer function I8Vec3:distance_squared(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:div(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:dot_into_vec(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return integer function I8Vec3:dot(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:wrapping_add(_self,rhs) end ----@package ----@param _self I8Vec3 +---@param p1 I8Vec3 +---@param p2 I8Vec3 +---@return I8Vec3 +function I8Vec3:rem(p1,p2) end +---@param _self I8Vec3 ---@return integer function I8Vec3:min_element(_self) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:saturating_sub(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs U8Vec3 - ---@return I8Vec3 function I8Vec3:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@return U8Vec3 function I8Vec3:as_u8vec3(_self) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return BVec3 function I8Vec3:cmple(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@return I8Vec3 function I8Vec3:clone(_self) end ----@package ---@param _self I8Vec3 - ---@return I16Vec3 function I8Vec3:as_i16vec3(_self) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:saturating_mul(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:saturating_div(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return BVec3 function I8Vec3:cmpge(_self,rhs) end ----@package ----@param _self I8Vec3 +---@param p1 I8Vec3 +---@param p2 integer +---@return I8Vec3 +function I8Vec3:div(p1,p2) end +---@param _self I8Vec3 ---@return integer function I8Vec3:length_squared(_self) end ----@package ---@param _self I8Vec3 - ---@return IVec3 function I8Vec3:as_ivec3(_self) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:min(_self,rhs) end ----@package ----@param _self I8Vec3 +---@param p1 I8Vec3 +---@param p2 integer +---@return I8Vec3 +function I8Vec3:mul(p1,p2) end +---@param _self I8Vec3 ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:wrapping_mul(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@param rhs I8Vec3 - ---@return I8Vec3 function I8Vec3:rem(_self,rhs) end ----@package ---@param _self I8Vec3 - ---@return integer function I8Vec3:element_sum(_self) end ----@class I8Vec4 - +---@class I8Vec4 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer ---@field w ? integer I8Vec4 = {} ----@package ---@param _self I8Vec4 - ---@return IVec4 function I8Vec4:as_ivec4(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return BVec4 function I8Vec4:cmple(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:max(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return integer function I8Vec4:dot(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param w integer - ---@return I8Vec4 function I8Vec4:with_w(_self,w) end ----@package ---@param _self I8Vec4 - ---@return integer function I8Vec4:length_squared(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs U8Vec4 - ---@return I8Vec4 function I8Vec4:wrapping_add_unsigned(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return integer function I8Vec4:max_element(_self) end ----@package ----@param _self I8Vec4 +---@param p1 I8Vec4 +---@param p2 I8Vec4 +---@return I8Vec4 +function I8Vec4:add(p1,p2) end +---@param _self I8Vec4 ---@return I8Vec3 function I8Vec4:truncate(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:sub(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:rem_euclid(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return integer[] function I8Vec4:to_array(_self) end ----@package ---@param _self I8Vec4 - ---@param other I8Vec4 - ---@return boolean function I8Vec4:eq(_self,other) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:add(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return U8Vec4 function I8Vec4:as_u8vec4(_self) end ----@package ---@param _self I8Vec4 - ----@return [] +---@return nil function I8Vec4:assert_receiver_is_total_eq(_self) end ----@package ---@param _self I8Vec4 - ---@return U64Vec4 function I8Vec4:as_u64vec4(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:mul(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return BVec4 function I8Vec4:cmpge(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return I16Vec4 function I8Vec4:as_i16vec4(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:saturating_mul(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:min(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return integer function I8Vec4:min_element(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:saturating_add(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return I64Vec4 function I8Vec4:as_i64vec4(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return BVec4 function I8Vec4:cmplt(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return integer function I8Vec4:is_negative_bitmask(_self) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@param w integer - ---@return I8Vec4 function I8Vec4.new(x,y,z,w) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:saturating_div(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return DVec4 function I8Vec4:as_dvec4(_self) end ----@package ---@param v integer - ---@return I8Vec4 function I8Vec4.splat(v) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:div_euclid(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return I8Vec4 function I8Vec4:signum(_self) end ----@package ---@param _self I8Vec4 - ---@return integer function I8Vec4:element_product(_self) end ----@package ---@param _self I8Vec4 - ---@param x integer - ---@return I8Vec4 function I8Vec4:with_x(_self,x) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:rem(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return UVec4 function I8Vec4:as_uvec4(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:wrapping_div(_self,rhs) end ----@package ----@param _self I8Vec4 +---@param p1 I8Vec4 +---@param p2 integer +---@return I8Vec4 +function I8Vec4:sub(p1,p2) end +---@param _self I8Vec4 ---@param min I8Vec4 - ---@param max I8Vec4 - ---@return I8Vec4 function I8Vec4:clamp(_self,min,max) end ----@package ----@param _self I8Vec4 +---@param p1 I8Vec4 +---@param p2 I8Vec4 +---@return I8Vec4 +function I8Vec4:sub(p1,p2) end +---@param _self I8Vec4 ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:wrapping_mul(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return I8Vec4 function I8Vec4:clone(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs U8Vec4 - ---@return I8Vec4 function I8Vec4:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return BVec4 function I8Vec4:cmpeq(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param z integer - ---@return I8Vec4 function I8Vec4:with_z(_self,z) end ----@package ----@param _self I8Vec4 +---@param p1 I8Vec4 +---@param p2 integer +---@return I8Vec4 +function I8Vec4:add(p1,p2) end +---@param _self I8Vec4 ---@param rhs I8Vec4 - ---@return BVec4 function I8Vec4:cmpne(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return I8Vec4 function I8Vec4:neg(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:wrapping_sub(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param rhs U8Vec4 - ---@return I8Vec4 function I8Vec4:saturating_add_unsigned(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:dot_into_vec(_self,rhs) end ----@package ----@param _self I8Vec4 +---@param p1 I8Vec4 +---@param p2 I8Vec4 +---@return I8Vec4 +function I8Vec4:rem(p1,p2) end +---@param _self I8Vec4 ---@param rhs I8Vec4 - ---@return BVec4 function I8Vec4:cmpgt(_self,rhs) end ----@package ----@param _self I8Vec4 +---@param p1 I8Vec4 +---@param p2 I8Vec4 +---@return I8Vec4 +function I8Vec4:div(p1,p2) end + +---@param p1 I8Vec4 +---@param p2 I8Vec4 +---@return I8Vec4 +function I8Vec4:mul(p1,p2) end +---@param _self I8Vec4 ---@return U16Vec4 function I8Vec4:as_u16vec4(_self) end ----@package ---@param _self I8Vec4 - ---@param rhs U8Vec4 - ---@return I8Vec4 function I8Vec4:saturating_sub_unsigned(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:div(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return I8Vec4 function I8Vec4:abs(_self) end ----@package ---@param _self I8Vec4 - ---@param y integer - ---@return I8Vec4 function I8Vec4:with_y(_self,y) end ----@package ---@param _self I8Vec4 - ---@return integer function I8Vec4:element_sum(_self) end ----@package ---@param a integer[] - ---@return I8Vec4 function I8Vec4.from_array(a) end ----@package ----@param _self I8Vec4 +---@param p1 I8Vec4 +---@param p2 integer +---@return I8Vec4 +function I8Vec4:rem(p1,p2) end +---@param _self I8Vec4 ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:saturating_sub(_self,rhs) end ----@package ---@param mask BVec4 - ---@param if_true I8Vec4 - ---@param if_false I8Vec4 - ---@return I8Vec4 function I8Vec4.select(mask,if_true,if_false) end ----@package ---@param _self I8Vec4 - ---@param rhs I8Vec4 - ---@return I8Vec4 function I8Vec4:wrapping_add(_self,rhs) end ----@package ---@param _self I8Vec4 - ---@return Vec4 function I8Vec4:as_vec4(_self) end ----@package ----@param _self I8Vec4 +---@param p1 I8Vec4 +---@param p2 integer +---@return I8Vec4 +function I8Vec4:mul(p1,p2) end ----@param rhs I8Vec4 +---@param p1 I8Vec4 +---@param p2 integer +---@return I8Vec4 +function I8Vec4:div(p1,p2) end +---@param _self I8Vec4 +---@param rhs I8Vec4 ---@return integer function I8Vec4:distance_squared(_self,rhs) end ----@class IVec2 - +---@class IVec2 : ReflectReference ---@field x ? integer ---@field y ? integer IVec2 = {} ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:rotate(_self,rhs) end ----@package ---@param _self IVec2 - ---@return DVec2 function IVec2:as_dvec2(_self) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:add(_self,rhs) end ----@package ---@param _self IVec2 - ---@return I8Vec2 function IVec2:as_i8vec2(_self) end ----@package ---@param _self IVec2 - ---@param min IVec2 - ---@param max IVec2 - ---@return IVec2 function IVec2:clamp(_self,min,max) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return integer function IVec2:distance_squared(_self,rhs) end ----@package ----@param _self IVec2 +---@param p1 IVec2 +---@param p2 IVec2 +---@return IVec2 +function IVec2:sub(p1,p2) end +---@param _self IVec2 ---@param rhs IVec2 - ---@return IVec2 function IVec2:saturating_mul(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:div(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs UVec2 - ---@return IVec2 function IVec2:wrapping_add_unsigned(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return BVec2 function IVec2:cmpne(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:mul(_self,rhs) end ----@package ----@param _self IVec2 +---@param p1 IVec2 +---@param p2 IVec2 +---@return IVec2 +function IVec2:div(p1,p2) end + +---@param p1 IVec2 +---@param p2 integer +---@return IVec2 +function IVec2:rem(p1,p2) end +---@param _self IVec2 ---@return UVec2 function IVec2:as_uvec2(_self) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:wrapping_add(_self,rhs) end ----@package ----@param _self IVec2 +---@param p1 IVec2 +---@param p2 IVec2 +---@return IVec2 +function IVec2:add(p1,p2) end +---@param p1 IVec2 +---@param p2 integer +---@return IVec2 +function IVec2:div(p1,p2) end + +---@param _self IVec2 ---@return integer function IVec2:element_sum(_self) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return BVec2 function IVec2:cmpeq(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:rem(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:div_euclid(_self,rhs) end ----@package ---@param _self IVec2 - ---@return integer[] function IVec2:to_array(_self) end ----@package ---@param _self IVec2 - ----@return [] +---@return nil function IVec2:assert_receiver_is_total_eq(_self) end ----@package ---@param _self IVec2 - ---@return integer function IVec2:max_element(_self) end ----@package ---@param _self IVec2 - ---@param other IVec2 - ---@return boolean function IVec2:eq(_self,other) end ----@package ---@param _self IVec2 - ---@param rhs UVec2 - ---@return IVec2 function IVec2:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return BVec2 function IVec2:cmple(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:saturating_div(_self,rhs) end ----@package ----@param _self IVec2 +---@param p1 IVec2 +---@param p2 integer +---@return IVec2 +function IVec2:mul(p1,p2) end +---@param _self IVec2 ---@param rhs UVec2 - ---@return IVec2 function IVec2:saturating_sub_unsigned(_self,rhs) end ----@package ---@param a integer[] - ---@return IVec2 function IVec2.from_array(a) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return BVec2 function IVec2:cmpgt(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return BVec2 function IVec2:cmplt(_self,rhs) end ----@package ---@param _self IVec2 - ---@param x integer - ---@return IVec2 function IVec2:with_x(_self,x) end ----@package ---@param v integer - ---@return IVec2 function IVec2.splat(v) end ----@package ---@param _self IVec2 - ---@return integer function IVec2:is_negative_bitmask(_self) end ----@package ----@param _self IVec2 +---@param p1 IVec2 +---@param p2 IVec2 +---@return IVec2 +function IVec2:rem(p1,p2) end +---@param _self IVec2 ---@param rhs IVec2 - ---@return IVec2 function IVec2:wrapping_mul(_self,rhs) end ----@package ---@param _self IVec2 - ---@return IVec2 function IVec2:perp(_self) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return integer function IVec2:perp_dot(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:dot_into_vec(_self,rhs) end ----@package ----@param mask BVec2 +---@param p1 IVec2 +---@param p2 IVec2 +---@return IVec2 +function IVec2:mul(p1,p2) end +---@param mask BVec2 ---@param if_true IVec2 - ---@param if_false IVec2 - ---@return IVec2 function IVec2.select(mask,if_true,if_false) end ----@package ---@param _self IVec2 - ---@return U64Vec2 function IVec2:as_u64vec2(_self) end ----@package ----@param _self IVec2 +---@param p1 IVec2 +---@param p2 integer +---@return IVec2 +function IVec2:add(p1,p2) end +---@param _self IVec2 ---@param rhs IVec2 - ---@return IVec2 function IVec2:rem_euclid(_self,rhs) end ----@package ---@param _self IVec2 - ---@return integer function IVec2:length_squared(_self) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return integer function IVec2:dot(_self,rhs) end ----@package ---@param _self IVec2 - ---@return U8Vec2 function IVec2:as_u8vec2(_self) end ----@package ---@param _self IVec2 - ---@return Vec2 function IVec2:as_vec2(_self) end ----@package ---@param _self IVec2 - ---@return U16Vec2 function IVec2:as_u16vec2(_self) end ----@package ----@param _self IVec2 +---@param p1 IVec2 +---@param p2 integer +---@return IVec2 +function IVec2:sub(p1,p2) end +---@param _self IVec2 ---@param rhs IVec2 - ---@return BVec2 function IVec2:cmpge(_self,rhs) end ----@package ---@param _self IVec2 - ---@return IVec2 function IVec2:neg(_self) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:wrapping_sub(_self,rhs) end ----@package ---@param _self IVec2 - ---@param z integer - ---@return IVec3 function IVec2:extend(_self,z) end ----@package ---@param _self IVec2 - ---@param y integer - ---@return IVec2 function IVec2:with_y(_self,y) end ----@package ---@param _self IVec2 - ---@return IVec2 function IVec2:clone(_self) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:wrapping_div(_self,rhs) end ----@package ---@param _self IVec2 - ---@return I64Vec2 function IVec2:as_i64vec2(_self) end ----@package ---@param x integer - ---@param y integer - ---@return IVec2 function IVec2.new(x,y) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:saturating_sub(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:saturating_add(_self,rhs) end ----@package ---@param _self IVec2 - ---@return integer function IVec2:element_product(_self) end ----@package ---@param _self IVec2 - ---@return IVec2 function IVec2:signum(_self) end ----@package ---@param _self IVec2 - ---@return I16Vec2 function IVec2:as_i16vec2(_self) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:min(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:max(_self,rhs) end ----@package ---@param _self IVec2 - ---@param rhs IVec2 - ---@return IVec2 function IVec2:sub(_self,rhs) end ----@package ---@param _self IVec2 - ---@return integer function IVec2:min_element(_self) end ----@package ---@param _self IVec2 - ---@return IVec2 function IVec2:abs(_self) end ----@package ---@param _self IVec2 - ---@param rhs UVec2 - ---@return IVec2 function IVec2:saturating_add_unsigned(_self,rhs) end ----@class IVec3 - +---@class IVec3 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer IVec3 = {} ----@package ---@param _self IVec3 - ---@param other IVec3 - ---@return boolean function IVec3:eq(_self,other) end ----@package ---@param a integer[] - ---@return IVec3 function IVec3.from_array(a) end ----@package ----@param _self IVec3 +---@param p1 IVec3 +---@param p2 integer +---@return IVec3 +function IVec3:rem(p1,p2) end +---@param _self IVec3 ---@param rhs IVec3 - ---@return IVec3 function IVec3:saturating_sub(_self,rhs) end ----@package ----@param _self IVec3 +---@param p1 IVec3 +---@param p2 IVec3 +---@return IVec3 +function IVec3:mul(p1,p2) end +---@param _self IVec3 ---@return U64Vec3 function IVec3:as_u64vec3(_self) end ----@package ---@param _self IVec3 - ---@return integer function IVec3:min_element(_self) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return BVec3 function IVec3:cmpne(_self,rhs) end ----@package ---@param _self IVec3 - ---@param y integer - ---@return IVec3 function IVec3:with_y(_self,y) end ----@package ----@param _self IVec3 +---@param p1 IVec3 +---@param p2 integer +---@return IVec3 +function IVec3:div(p1,p2) end +---@param _self IVec3 ---@return IVec2 function IVec3:truncate(_self) end ----@package ---@param _self IVec3 - ---@return Vec3 function IVec3:as_vec3(_self) end ----@package ---@param mask BVec3 - ---@param if_true IVec3 - ---@param if_false IVec3 - ---@return IVec3 function IVec3.select(mask,if_true,if_false) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:mul(_self,rhs) end ----@package ---@param _self IVec3 - ---@param min IVec3 - ---@param max IVec3 - ---@return IVec3 function IVec3:clamp(_self,min,max) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:wrapping_div(_self,rhs) end ----@package ---@param _self IVec3 - ---@param x integer - ---@return IVec3 function IVec3:with_x(_self,x) end ----@package ----@param _self IVec3 +---@param p1 IVec3 +---@param p2 integer +---@return IVec3 +function IVec3:add(p1,p2) end +---@param _self IVec3 ---@param rhs UVec3 - ---@return IVec3 function IVec3:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:wrapping_add(_self,rhs) end ----@package ---@param _self IVec3 - ---@return I16Vec3 function IVec3:as_i16vec3(_self) end ----@package ---@param _self IVec3 - ---@return I64Vec3 function IVec3:as_i64vec3(_self) end ----@package ---@param _self IVec3 - ---@return integer function IVec3:max_element(_self) end ----@package ---@param _self IVec3 - ---@param rhs UVec3 - ---@return IVec3 function IVec3:saturating_sub_unsigned(_self,rhs) end ----@package ---@param _self IVec3 - ---@return integer function IVec3:element_sum(_self) end ----@package ----@param _self IVec3 +---@param p1 IVec3 +---@param p2 integer +---@return IVec3 +function IVec3:sub(p1,p2) end +---@param _self IVec3 ---@param rhs UVec3 - ---@return IVec3 function IVec3:wrapping_add_unsigned(_self,rhs) end ----@package ---@param _self IVec3 - ---@return U8Vec3 function IVec3:as_u8vec3(_self) end ----@package ---@param _self IVec3 - ---@return IVec3 function IVec3:clone(_self) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:saturating_div(_self,rhs) end ----@package ---@param _self IVec3 - ---@param w integer - ---@return IVec4 function IVec3:extend(_self,w) end ----@package ----@param _self IVec3 +---@param p1 IVec3 +---@param p2 integer +---@return IVec3 +function IVec3:mul(p1,p2) end +---@param _self IVec3 ---@param rhs IVec3 - ---@return IVec3 function IVec3:div_euclid(_self,rhs) end ----@package ----@param _self IVec3 +---@param p1 IVec3 +---@param p2 IVec3 +---@return IVec3 +function IVec3:add(p1,p2) end +---@param _self IVec3 ---@param rhs IVec3 - ---@return IVec3 function IVec3:sub(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:max(_self,rhs) end ----@package ---@param _self IVec3 - ---@return integer function IVec3:length_squared(_self) end ----@package ---@param _self IVec3 - ---@return IVec3 function IVec3:signum(_self) end ----@package ---@param _self IVec3 - ---@return U16Vec3 function IVec3:as_u16vec3(_self) end ----@package ---@param _self IVec3 - ---@return UVec3 function IVec3:as_uvec3(_self) end ----@package ---@param v integer - ---@return IVec3 function IVec3.splat(v) end ----@package ---@param _self IVec3 - ---@return IVec3 function IVec3:abs(_self) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:cross(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return BVec3 function IVec3:cmpgt(_self,rhs) end ----@package ----@param _self IVec3 +---@param p1 IVec3 +---@param p2 IVec3 +---@return IVec3 +function IVec3:div(p1,p2) end +---@param _self IVec3 ---@return Vec3A function IVec3:as_vec3a(_self) end ----@package ---@param _self IVec3 - ----@return [] +---@return nil function IVec3:assert_receiver_is_total_eq(_self) end ----@package ---@param _self IVec3 - ---@param z integer - ---@return IVec3 function IVec3:with_z(_self,z) end ----@package ---@param _self IVec3 - ---@return integer function IVec3:is_negative_bitmask(_self) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return integer function IVec3:distance_squared(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:wrapping_sub(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@return IVec3 function IVec3.new(x,y,z) end ----@package ---@param _self IVec3 - ---@param rhs UVec3 - ---@return IVec3 function IVec3:saturating_add_unsigned(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:saturating_add(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:rem_euclid(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:min(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return integer function IVec3:dot(_self,rhs) end ----@package ---@param _self IVec3 - ---@return IVec3 function IVec3:neg(_self) end ----@package ----@param _self IVec3 +---@param p1 IVec3 +---@param p2 IVec3 +---@return IVec3 +function IVec3:rem(p1,p2) end +---@param _self IVec3 ---@return integer[] function IVec3:to_array(_self) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:dot_into_vec(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:div(_self,rhs) end ----@package ---@param _self IVec3 - ---@return I8Vec3 function IVec3:as_i8vec3(_self) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:rem(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:saturating_mul(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return BVec3 function IVec3:cmpge(_self,rhs) end ----@package ----@param _self IVec3 +---@param p1 IVec3 +---@param p2 IVec3 +---@return IVec3 +function IVec3:sub(p1,p2) end +---@param _self IVec3 ---@param rhs IVec3 - ---@return BVec3 function IVec3:cmple(_self,rhs) end ----@package ---@param _self IVec3 - ---@return DVec3 function IVec3:as_dvec3(_self) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return BVec3 function IVec3:cmpeq(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:add(_self,rhs) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return BVec3 function IVec3:cmplt(_self,rhs) end ----@package ---@param _self IVec3 - ---@return integer function IVec3:element_product(_self) end ----@package ---@param _self IVec3 - ---@param rhs IVec3 - ---@return IVec3 function IVec3:wrapping_mul(_self,rhs) end ----@class IVec4 - +---@class IVec4 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer ---@field w ? integer IVec4 = {} ----@package ---@param _self IVec4 - ----@return [] +---@return nil function IVec4:assert_receiver_is_total_eq(_self) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:saturating_add(_self,rhs) end ----@package ---@param _self IVec4 - ---@param min IVec4 - ---@param max IVec4 - ---@return IVec4 function IVec4:clamp(_self,min,max) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return BVec4 function IVec4:cmpeq(_self,rhs) end ----@package ---@param v integer - ---@return IVec4 function IVec4.splat(v) end ----@package ---@param _self IVec4 - ---@param rhs UVec4 - ---@return IVec4 function IVec4:saturating_sub_unsigned(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return integer function IVec4:distance_squared(_self,rhs) end ----@package ---@param _self IVec4 - ---@return integer function IVec4:length_squared(_self) end ----@package ----@param _self IVec4 +---@param p1 IVec4 +---@param p2 IVec4 +---@return IVec4 +function IVec4:rem(p1,p2) end +---@param _self IVec4 ---@param z integer - ---@return IVec4 function IVec4:with_z(_self,z) end ----@package ----@param _self IVec4 +---@param p1 IVec4 +---@param p2 IVec4 +---@return IVec4 +function IVec4:sub(p1,p2) end +---@param _self IVec4 ---@return IVec4 function IVec4:neg(_self) end ----@package ---@param _self IVec4 - ---@return integer function IVec4:min_element(_self) end ----@package ---@param _self IVec4 - ---@return I16Vec4 function IVec4:as_i16vec4(_self) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:wrapping_div(_self,rhs) end ----@package ----@param _self IVec4 +---@param p1 IVec4 +---@param p2 integer +---@return IVec4 +function IVec4:rem(p1,p2) end +---@param _self IVec4 ---@return integer function IVec4:max_element(_self) end ----@package ---@param _self IVec4 - ---@return UVec4 function IVec4:as_uvec4(_self) end ----@package ---@param mask BVec4 - ---@param if_true IVec4 - ---@param if_false IVec4 - ---@return IVec4 function IVec4.select(mask,if_true,if_false) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:dot_into_vec(_self,rhs) end ----@package ---@param _self IVec4 - ---@return U8Vec4 function IVec4:as_u8vec4(_self) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:saturating_div(_self,rhs) end ----@package ---@param _self IVec4 - ---@return integer function IVec4:element_product(_self) end ----@package ---@param _self IVec4 - ---@return integer[] function IVec4:to_array(_self) end ----@package ---@param _self IVec4 - ---@param rhs UVec4 - ---@return IVec4 function IVec4:wrapping_add_unsigned(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:rem_euclid(_self,rhs) end ----@package ---@param _self IVec4 - ---@return DVec4 function IVec4:as_dvec4(_self) end ----@package ---@param _self IVec4 - ---@return IVec4 function IVec4:abs(_self) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:add(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:max(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:div(_self,rhs) end ----@package ---@param _self IVec4 - ---@return integer function IVec4:is_negative_bitmask(_self) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:mul(_self,rhs) end ----@package ---@param _self IVec4 - ---@return U16Vec4 function IVec4:as_u16vec4(_self) end ----@package ---@param _self IVec4 - ---@return U64Vec4 function IVec4:as_u64vec4(_self) end ----@package ---@param _self IVec4 - ---@param rhs UVec4 - ---@return IVec4 function IVec4:wrapping_sub_unsigned(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:saturating_sub(_self,rhs) end ----@package ----@param _self IVec4 +---@param p1 IVec4 +---@param p2 integer +---@return IVec4 +function IVec4:div(p1,p2) end +---@param _self IVec4 ---@param rhs IVec4 - ---@return IVec4 function IVec4:min(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return BVec4 function IVec4:cmpge(_self,rhs) end ----@package ---@param _self IVec4 - ---@return IVec4 function IVec4:clone(_self) end ----@package ---@param _self IVec4 - ---@return Vec4 function IVec4:as_vec4(_self) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return BVec4 function IVec4:cmpgt(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:sub(_self,rhs) end ----@package ----@param _self IVec4 +---@param p1 IVec4 +---@param p2 integer +---@return IVec4 +function IVec4:sub(p1,p2) end +---@param _self IVec4 ---@param rhs IVec4 - ---@return IVec4 function IVec4:rem(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return BVec4 function IVec4:cmpne(_self,rhs) end ----@package ---@param _self IVec4 - ---@return I8Vec4 function IVec4:as_i8vec4(_self) end ----@package ---@param _self IVec4 - ---@param y integer - ---@return IVec4 function IVec4:with_y(_self,y) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:div_euclid(_self,rhs) end ----@package ---@param a integer[] - ---@return IVec4 function IVec4.from_array(a) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:saturating_mul(_self,rhs) end ----@package ----@param _self IVec4 +---@param p1 IVec4 +---@param p2 IVec4 +---@return IVec4 +function IVec4:add(p1,p2) end +---@param _self IVec4 ---@return integer function IVec4:element_sum(_self) end ----@package ----@param _self IVec4 +---@param p1 IVec4 +---@param p2 IVec4 +---@return IVec4 +function IVec4:div(p1,p2) end +---@param _self IVec4 ---@param other IVec4 - ---@return boolean function IVec4:eq(_self,other) end ----@package ---@param _self IVec4 - ---@param w integer - ---@return IVec4 function IVec4:with_w(_self,w) end ----@package ---@param _self IVec4 - ---@return IVec4 function IVec4:signum(_self) end ----@package ----@param _self IVec4 +---@param p1 IVec4 +---@param p2 integer +---@return IVec4 +function IVec4:mul(p1,p2) end ----@param x integer +---@param p1 IVec4 +---@param p2 integer +---@return IVec4 +function IVec4:add(p1,p2) end +---@param _self IVec4 +---@param x integer ---@return IVec4 function IVec4:with_x(_self,x) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:wrapping_mul(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return BVec4 function IVec4:cmplt(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:wrapping_add(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@param w integer - ---@return IVec4 function IVec4.new(x,y,z,w) end ----@package ---@param _self IVec4 - ---@return I64Vec4 function IVec4:as_i64vec4(_self) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return IVec4 function IVec4:wrapping_sub(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return BVec4 function IVec4:cmple(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs UVec4 - ---@return IVec4 function IVec4:saturating_add_unsigned(_self,rhs) end ----@package ---@param _self IVec4 - ---@param rhs IVec4 - ---@return integer function IVec4:dot(_self,rhs) end ----@package ---@param _self IVec4 - ---@return IVec3 function IVec4:truncate(_self) end +---@param p1 IVec4 +---@param p2 IVec4 +---@return IVec4 +function IVec4:mul(p1,p2) end ----@class Mat2 +---@class Mat2 : ReflectReference ---@field x_axis ? Vec2 ---@field y_axis ? Vec2 Mat2 = {} ----@package ---@param _self Mat2 - ---@return Mat2 function Mat2:clone(_self) end ----@package ---@param _self Mat2 - ---@param rhs Mat2 - ---@return Mat2 function Mat2:mul(_self,rhs) end ----@package ---@param _self Mat2 - ---@param index integer - ---@return Vec2 function Mat2:row(_self,index) end ----@package ---@param m Mat3A - ---@return Mat2 function Mat2.from_mat3a(m) end ----@package ---@param _self Mat2 - ---@param rhs number - ---@return Mat2 function Mat2:div(_self,rhs) end ----@package ---@param _self Mat2 - ---@return boolean function Mat2:is_nan(_self) end ----@package ---@param _self Mat2 - ---@param rhs Mat2 - ---@param max_abs_diff number - ---@return boolean function Mat2:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self Mat2 - ---@param rhs number - ---@return Mat2 function Mat2:mul_scalar(_self,rhs) end ----@package ----@param _self Mat2 +---@param p1 Mat2 +---@param p2 number +---@return Mat2 +function Mat2:mul(p1,p2) end +---@param _self Mat2 ---@param rhs Mat2 - ---@return Mat2 function Mat2:add_mat2(_self,rhs) end ----@package ---@param _self Mat2 - ---@return number[][] function Mat2:to_cols_array_2d(_self) end ----@package ---@param x_axis Vec2 - ---@param y_axis Vec2 - ---@return Mat2 function Mat2.from_cols(x_axis,y_axis) end ----@package ---@param _self Mat2 - ---@param rhs number - ---@return Mat2 function Mat2:div_scalar(_self,rhs) end ----@package ---@param _self Mat2 - ---@return number[] function Mat2:to_cols_array(_self) end ----@package ---@param _self Mat2 - ---@return Mat2 function Mat2:transpose(_self) end ----@package ---@param _self Mat2 - ---@return boolean function Mat2:is_finite(_self) end ----@package ---@param _self Mat2 - ---@return Mat2 function Mat2:inverse(_self) end ----@package ---@param _self Mat2 - ---@param rhs Mat2 - ---@return boolean function Mat2:eq(_self,rhs) end ----@package ---@param _self Mat2 - ---@return DMat2 function Mat2:as_dmat2(_self) end ----@package ---@param _self Mat2 - ---@return Mat2 function Mat2:abs(_self) end ----@package ---@param m Mat3 - ---@return Mat2 function Mat2.from_mat3(m) end ----@package ---@param m Mat3A - ---@param i integer - ---@param j integer - ---@return Mat2 function Mat2.from_mat3a_minor(m,i,j) end ----@package ---@param _self Mat2 - ---@param rhs Mat2 - ---@return Mat2 function Mat2:mul_mat2(_self,rhs) end ----@package ---@param angle number - ---@return Mat2 function Mat2.from_angle(angle) end ----@package ---@param diagonal Vec2 - ---@return Mat2 function Mat2.from_diagonal(diagonal) end ----@package ---@param _self Mat2 - ---@param index integer - ---@return Vec2 function Mat2:col(_self,index) end ----@package ---@param _self Mat2 - ---@param rhs Vec2 - ---@return Vec2 function Mat2:mul_vec2(_self,rhs) end ----@package ---@param _self Mat2 - ---@return number function Mat2:determinant(_self) end ----@package ---@param _self Mat2 - ---@param rhs Mat2 - ---@return Mat2 function Mat2:add(_self,rhs) end ----@package ---@param _self Mat2 - ---@param rhs Mat2 - ---@return Mat2 function Mat2:sub_mat2(_self,rhs) end ----@package ---@param _self Mat2 - ---@param rhs Mat2 - ---@return Mat2 function Mat2:sub(_self,rhs) end ----@package ---@param _self Mat2 - ---@return Mat2 function Mat2:neg(_self) end ----@package ---@param m Mat3 - ---@param i integer - ---@param j integer - ---@return Mat2 function Mat2.from_mat3_minor(m,i,j) end ----@package ---@param scale Vec2 - ---@param angle number - ---@return Mat2 function Mat2.from_scale_angle(scale,angle) end +---@param p1 Mat2 +---@param p2 Vec2 +---@return Vec2 +function Mat2:mul(p1,p2) end ----@class Mat3 +---@class Mat3 : ReflectReference ---@field x_axis ? Vec3 ---@field y_axis ? Vec3 ---@field z_axis ? Vec3 Mat3 = {} ----@package ---@param translation Vec2 - ---@return Mat3 function Mat3.from_translation(translation) end ----@package ---@param x_axis Vec3 - ---@param y_axis Vec3 - ---@param z_axis Vec3 - ---@return Mat3 function Mat3.from_cols(x_axis,y_axis,z_axis) end ----@package ---@param m Mat2 - ---@return Mat3 function Mat3.from_mat2(m) end ----@package ---@param _self Mat3 - ---@return boolean function Mat3:is_finite(_self) end ----@package ----@param m Mat4 +---@param p1 Mat3 +---@param p2 Mat3 +---@return Mat3 +function Mat3:mul(p1,p2) end +---@param m Mat4 ---@return Mat3 function Mat3.from_mat4(m) end ----@package ---@param _self Mat3 - ---@param rhs Mat3 - ---@return Mat3 function Mat3:add(_self,rhs) end ----@package ---@param diagonal Vec3 - ---@return Mat3 function Mat3.from_diagonal(diagonal) end ----@package ---@param _self Mat3 - ---@return Mat3 function Mat3:clone(_self) end ----@package ---@param _self Mat3 - ---@param index integer - ---@return Vec3 function Mat3:col(_self,index) end ----@package ---@param order EulerRot - ---@param a number - ---@param b number - ---@param c number - ---@return Mat3 function Mat3.from_euler(order,a,b,c) end ----@package ----@param _self Mat3 +---@param p1 Mat3 +---@param p2 Vec3 +---@return Vec3 +function Mat3:mul(p1,p2) end +---@param _self Mat3 ---@param rhs Mat3 - ---@param max_abs_diff number - ---@return boolean function Mat3:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param scale Vec2 - ---@param angle number - ---@param translation Vec2 - ---@return Mat3 function Mat3.from_scale_angle_translation(scale,angle,translation) end ----@package ---@param _self Mat3 - ---@param rhs Mat3 - ---@return Mat3 function Mat3:sub(_self,rhs) end ----@package ---@param scale Vec2 - ---@return Mat3 function Mat3.from_scale(scale) end ----@package ----@param angle number +---@param p1 Mat3 +---@param p2 Vec3A +---@return Vec3A +function Mat3:mul(p1,p2) end +---@param angle number ---@return Mat3 function Mat3.from_rotation_y(angle) end ----@package ---@param angle number - ---@return Mat3 function Mat3.from_angle(angle) end ----@package ---@param rotation Quat - ---@return Mat3 function Mat3.from_quat(rotation) end ----@package ---@param _self Mat3 - ---@return number[] function Mat3:to_cols_array(_self) end ----@package ---@param _self Mat3 - ---@return Mat3 function Mat3:abs(_self) end ----@package ---@param _self Mat3 - ---@param rhs Mat3 - ---@return Mat3 function Mat3:add_mat3(_self,rhs) end ----@package ---@param _self Mat3 - ---@param order EulerRot - ---@return [number, number, number] function Mat3:to_euler(_self,order) end ----@package ---@param _self Mat3 - ---@return Mat3 function Mat3:transpose(_self) end ----@package ---@param _self Mat3 - ---@param rhs Vec3A - ---@return Vec3A function Mat3:mul_vec3a(_self,rhs) end ----@package ---@param axis Vec3 - ---@param angle number - ---@return Mat3 function Mat3.from_axis_angle(axis,angle) end ----@package ---@param angle number - ---@return Mat3 function Mat3.from_rotation_x(angle) end ----@package ---@param _self Mat3 - ---@return boolean function Mat3:is_nan(_self) end ----@package ---@param _self Mat3 - ---@return number function Mat3:determinant(_self) end ----@package ---@param _self Mat3 - ---@return Mat3 function Mat3:inverse(_self) end ----@package ---@param _self Mat3 - ---@param index integer - ---@return Vec3 function Mat3:row(_self,index) end ----@package ---@param _self Mat3 - ---@param rhs Vec2 - ---@return Vec2 function Mat3:transform_vector2(_self,rhs) end ----@package ---@param _self Mat3 - ---@return DMat3 function Mat3:as_dmat3(_self) end ----@package ---@param _self Mat3 - ---@return number[][] function Mat3:to_cols_array_2d(_self) end ----@package ---@param _self Mat3 - ---@param rhs Vec2 - ---@return Vec2 function Mat3:transform_point2(_self,rhs) end ----@package ---@param _self Mat3 - ---@return Mat3 function Mat3:neg(_self) end ----@package ---@param angle number - ---@return Mat3 function Mat3.from_rotation_z(angle) end ----@package ---@param m Mat4 - ---@param i integer - ---@param j integer - ---@return Mat3 function Mat3.from_mat4_minor(m,i,j) end ----@package ---@param _self Mat3 - ---@param rhs number - ---@return Mat3 function Mat3:div_scalar(_self,rhs) end ----@package ---@param _self Mat3 - ---@param rhs number - ---@return Mat3 function Mat3:div(_self,rhs) end ----@package ---@param _self Mat3 - ---@param rhs number - ---@return Mat3 function Mat3:mul_scalar(_self,rhs) end ----@package ----@param _self Mat3 +---@param p1 Mat3 +---@param p2 number +---@return Mat3 +function Mat3:mul(p1,p2) end +---@param _self Mat3 ---@param rhs Mat3 - ---@return Mat3 function Mat3:mul_mat3(_self,rhs) end ----@package ---@param _self Mat3 - ---@param rhs Vec3 - ---@return Vec3 function Mat3:mul_vec3(_self,rhs) end ----@package ---@param _self Mat3 - ---@param rhs Affine2 - ---@return Mat3 function Mat3:mul(_self,rhs) end ----@package ---@param _self Mat3 - ---@param rhs Mat3 - ---@return boolean function Mat3:eq(_self,rhs) end ----@package ---@param _self Mat3 - ---@param rhs Mat3 - ---@return Mat3 function Mat3:sub_mat3(_self,rhs) end ----@class Mat3A - +---@class Mat3A : ReflectReference ---@field x_axis ? Vec3A ---@field y_axis ? Vec3A ---@field z_axis ? Vec3A Mat3A = {} ----@package ---@param _self Mat3A - ---@return number[] function Mat3A:to_cols_array(_self) end ----@package ----@param _self Mat3A +---@param p1 Mat3A +---@param p2 Vec3 +---@return Vec3 +function Mat3A:mul(p1,p2) end +---@param _self Mat3A ---@param rhs Mat3A - ---@return Mat3A function Mat3A:sub(_self,rhs) end ----@package ---@param _self Mat3A - ---@param order EulerRot - ---@return [number, number, number] function Mat3A:to_euler(_self,order) end ----@package ---@param _self Mat3A - ---@return Mat3A function Mat3A:inverse(_self) end ----@package ---@param angle number - ---@return Mat3A function Mat3A.from_angle(angle) end ----@package ---@param _self Mat3A - ---@param rhs Mat3A - ---@return Mat3A function Mat3A:add(_self,rhs) end ----@package ---@param rotation Quat - ---@return Mat3A function Mat3A.from_quat(rotation) end ----@package ---@param _self Mat3A - ---@return DMat3 function Mat3A:as_dmat3(_self) end ----@package ---@param _self Mat3A - ---@return boolean function Mat3A:is_finite(_self) end ----@package ---@param _self Mat3A - ---@param rhs Affine2 - ---@return Mat3A function Mat3A:mul(_self,rhs) end ----@package ---@param _self Mat3A - ---@param rhs Mat3A - ---@return boolean function Mat3A:eq(_self,rhs) end ----@package ---@param axis Vec3 - ---@param angle number - ---@return Mat3A function Mat3A.from_axis_angle(axis,angle) end ----@package ---@param _self Mat3A - ---@param rhs Mat3A - ---@return Mat3A function Mat3A:add_mat3(_self,rhs) end ----@package ---@param _self Mat3A - ---@param rhs number - ---@return Mat3A function Mat3A:div(_self,rhs) end ----@package ----@param _self Mat3A +---@param p1 Mat3A +---@param p2 number +---@return Mat3A +function Mat3A:mul(p1,p2) end +---@param _self Mat3A ---@param rhs Mat3A - ---@param max_abs_diff number - ---@return boolean function Mat3A:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self Mat3A - ---@param rhs Mat3A - ---@return Mat3A function Mat3A:mul_mat3(_self,rhs) end ----@package ---@param _self Mat3A - ---@return Mat3A function Mat3A:neg(_self) end ----@package ---@param scale Vec2 - ---@return Mat3A function Mat3A.from_scale(scale) end ----@package ---@param _self Mat3A - ---@return boolean function Mat3A:is_nan(_self) end ----@package ---@param _self Mat3A - ---@return number[][] function Mat3A:to_cols_array_2d(_self) end ----@package ---@param angle number - ---@return Mat3A function Mat3A.from_rotation_x(angle) end ----@package ---@param _self Mat3A - ---@return number function Mat3A:determinant(_self) end ----@package ---@param angle number - ---@return Mat3A function Mat3A.from_rotation_z(angle) end ----@package ----@param m Mat4 +---@param p1 Mat3A +---@param p2 Mat3A +---@return Mat3A +function Mat3A:mul(p1,p2) end +---@param p1 Mat3A +---@param p2 Vec3A +---@return Vec3A +function Mat3A:mul(p1,p2) end + +---@param m Mat4 ---@return Mat3A function Mat3A.from_mat4(m) end ----@package ---@param _self Mat3A - ---@param index integer - ---@return Vec3A function Mat3A:row(_self,index) end ----@package ---@param _self Mat3A - ---@param rhs Vec2 - ---@return Vec2 function Mat3A:transform_point2(_self,rhs) end ----@package ---@param scale Vec2 - ---@param angle number - ---@param translation Vec2 - ---@return Mat3A function Mat3A.from_scale_angle_translation(scale,angle,translation) end ----@package ---@param _self Mat3A - ---@param rhs number - ---@return Mat3A function Mat3A:mul_scalar(_self,rhs) end ----@package ---@param _self Mat3A - ---@param rhs Vec3A - ---@return Vec3A function Mat3A:mul_vec3a(_self,rhs) end ----@package ---@param diagonal Vec3 - ---@return Mat3A function Mat3A.from_diagonal(diagonal) end ----@package ---@param _self Mat3A - ---@param rhs Vec2 - ---@return Vec2 function Mat3A:transform_vector2(_self,rhs) end ----@package ---@param _self Mat3A - ---@return Mat3A function Mat3A:transpose(_self) end ----@package ---@param _self Mat3A - ---@param rhs Vec3 - ---@return Vec3 function Mat3A:mul_vec3(_self,rhs) end ----@package ---@param x_axis Vec3A - ---@param y_axis Vec3A - ---@param z_axis Vec3A - ---@return Mat3A function Mat3A.from_cols(x_axis,y_axis,z_axis) end ----@package ---@param order EulerRot - ---@param a number - ---@param b number - ---@param c number - ---@return Mat3A function Mat3A.from_euler(order,a,b,c) end ----@package ---@param _self Mat3A - ---@param rhs Mat3A - ---@return Mat3A function Mat3A:sub_mat3(_self,rhs) end ----@package ---@param angle number - ---@return Mat3A function Mat3A.from_rotation_y(angle) end ----@package ---@param _self Mat3A - ---@return Mat3A function Mat3A:clone(_self) end ----@package ---@param _self Mat3A - ---@param index integer - ---@return Vec3A function Mat3A:col(_self,index) end ----@package ---@param m Mat2 - ---@return Mat3A function Mat3A.from_mat2(m) end ----@package ---@param _self Mat3A - ---@param rhs number - ---@return Mat3A function Mat3A:div_scalar(_self,rhs) end ----@package ---@param _self Mat3A - ---@return Mat3A function Mat3A:abs(_self) end ----@package ---@param translation Vec2 - ---@return Mat3A function Mat3A.from_translation(translation) end ----@package ---@param m Mat4 - ---@param i integer - ---@param j integer - ---@return Mat3A function Mat3A.from_mat4_minor(m,i,j) end ----@class Mat4 - +---@class Mat4 : ReflectReference ---@field x_axis ? Vec4 ---@field y_axis ? Vec4 ---@field z_axis ? Vec4 ---@field w_axis ? Vec4 Mat4 = {} ----@package ---@param eye Vec3 - ---@param dir Vec3 - ---@param up Vec3 - ---@return Mat4 function Mat4.look_to_rh(eye,dir,up) end ----@package ---@param left number - ---@param right number - ---@param bottom number - ---@param top number - ---@param near number - ---@param far number - ---@return Mat4 function Mat4.orthographic_rh(left,right,bottom,top,near,far) end ----@package ---@param diagonal Vec4 - ---@return Mat4 function Mat4.from_diagonal(diagonal) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@param z_far number - ---@return Mat4 function Mat4.perspective_rh(fov_y_radians,aspect_ratio,z_near,z_far) end ----@package ---@param angle number - ---@return Mat4 function Mat4.from_rotation_x(angle) end ----@package ---@param eye Vec3 - ---@param dir Vec3 - ---@param up Vec3 - ---@return Mat4 function Mat4.look_to_lh(eye,dir,up) end ----@package ---@param _self Mat4 - ---@param order EulerRot - ---@return [number, number, number] function Mat4:to_euler(_self,order) end ----@package ---@param _self Mat4 - ---@param rhs Mat4 - ---@return Mat4 function Mat4:add(_self,rhs) end ----@package ---@param _self Mat4 - ---@param index integer - ---@return Vec4 function Mat4:col(_self,index) end ----@package ----@param _self Mat4 +---@param p1 Mat4 +---@param p2 number +---@return Mat4 +function Mat4:mul(p1,p2) end +---@param _self Mat4 ---@param rhs Vec3A - ---@return Vec3A function Mat4:transform_vector3a(_self,rhs) end ----@package ---@param _self Mat4 - ---@param rhs Mat4 - ---@return Mat4 function Mat4:sub_mat4(_self,rhs) end ----@package ---@param rotation Quat - ---@param translation Vec3 - ---@return Mat4 function Mat4.from_rotation_translation(rotation,translation) end ----@package ---@param _self Mat4 - ---@param rhs Vec3 - ---@return Vec3 function Mat4:project_point3(_self,rhs) end ----@package ---@param _self Mat4 - ---@param rhs number - ---@return Mat4 function Mat4:div_scalar(_self,rhs) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@return Mat4 function Mat4.perspective_infinite_lh(fov_y_radians,aspect_ratio,z_near) end ----@package ---@param left number - ---@param right number - ---@param bottom number - ---@param top number - ---@param near number - ---@param far number - ---@return Mat4 function Mat4.orthographic_lh(left,right,bottom,top,near,far) end ----@package ---@param left number - ---@param right number - ---@param bottom number - ---@param top number - ---@param near number - ---@param far number - ---@return Mat4 function Mat4.orthographic_rh_gl(left,right,bottom,top,near,far) end ----@package ---@param _self Mat4 - ---@return Mat4 function Mat4:neg(_self) end ----@package ---@param scale Vec3 - ---@return Mat4 function Mat4.from_scale(scale) end ----@package ---@param _self Mat4 - ---@return Mat4 function Mat4:transpose(_self) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@param z_far number - ---@return Mat4 function Mat4.perspective_rh_gl(fov_y_radians,aspect_ratio,z_near,z_far) end ----@package ---@param _self Mat4 - ---@param rhs Vec3A - ---@return Vec3A function Mat4:project_point3a(_self,rhs) end ----@package ---@param translation Vec3 - ---@return Mat4 function Mat4.from_translation(translation) end ----@package ---@param _self Mat4 - ---@param rhs Mat4 - ---@return boolean function Mat4:eq(_self,rhs) end ----@package ---@param m Mat3 - ---@return Mat4 function Mat4.from_mat3(m) end ----@package ---@param _self Mat4 - ---@param rhs Vec3A - ---@return Vec3A function Mat4:transform_point3a(_self,rhs) end ----@package ---@param m Mat3A - ---@return Mat4 function Mat4.from_mat3a(m) end ----@package ---@param order EulerRot - ---@param a number - ---@param b number - ---@param c number - ---@return Mat4 function Mat4.from_euler(order,a,b,c) end ----@package ---@param _self Mat4 - ---@param rhs number - ---@return Mat4 function Mat4:mul_scalar(_self,rhs) end ----@package ---@param _self Mat4 - ---@param rhs Mat4 - ---@return Mat4 function Mat4:add_mat4(_self,rhs) end ----@package ----@param _self Mat4 +---@param p1 Mat4 +---@param p2 Vec4 +---@return Vec4 +function Mat4:mul(p1,p2) end +---@param _self Mat4 ---@return boolean function Mat4:is_nan(_self) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@return Mat4 function Mat4.perspective_infinite_reverse_rh(fov_y_radians,aspect_ratio,z_near) end ----@package ---@param _self Mat4 - ---@param rhs Affine3A - ---@return Mat4 function Mat4:mul(_self,rhs) end ----@package ---@param _self Mat4 - ---@param rhs Mat4 - ---@return Mat4 function Mat4:sub(_self,rhs) end ----@package ---@param _self Mat4 - ---@return Mat4 function Mat4:clone(_self) end ----@package ---@param _self Mat4 - ---@param index integer - ---@return Vec4 function Mat4:row(_self,index) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@param z_far number - ---@return Mat4 function Mat4.perspective_lh(fov_y_radians,aspect_ratio,z_near,z_far) end ----@package ---@param _self Mat4 - ---@param rhs Vec4 - ---@return Vec4 function Mat4:mul_vec4(_self,rhs) end ----@package ---@param rotation Quat - ---@return Mat4 function Mat4.from_quat(rotation) end ----@package ---@param _self Mat4 - ---@return boolean function Mat4:is_finite(_self) end ----@package ---@param _self Mat4 - ---@return Mat4 function Mat4:inverse(_self) end ----@package ---@param angle number - ---@return Mat4 function Mat4.from_rotation_z(angle) end ----@package ---@param _self Mat4 - ---@return number function Mat4:determinant(_self) end ----@package ---@param eye Vec3 - ---@param center Vec3 - ---@param up Vec3 - ---@return Mat4 function Mat4.look_at_rh(eye,center,up) end ----@package ---@param _self Mat4 - ---@return number[] function Mat4:to_cols_array(_self) end ----@package ----@param _self Mat4 +---@param p1 Mat4 +---@param p2 Mat4 +---@return Mat4 +function Mat4:mul(p1,p2) end +---@param _self Mat4 ---@param rhs Mat4 - ---@param max_abs_diff number - ---@return boolean function Mat4:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self Mat4 - ---@param rhs Vec3 - ---@return Vec3 function Mat4:transform_vector3(_self,rhs) end ----@package ---@param x_axis Vec4 - ---@param y_axis Vec4 - ---@param z_axis Vec4 - ---@param w_axis Vec4 - ---@return Mat4 function Mat4.from_cols(x_axis,y_axis,z_axis,w_axis) end ----@package ---@param scale Vec3 - ---@param rotation Quat - ---@param translation Vec3 - ---@return Mat4 function Mat4.from_scale_rotation_translation(scale,rotation,translation) end ----@package ---@param _self Mat4 - ---@return number[][] function Mat4:to_cols_array_2d(_self) end ----@package ---@param _self Mat4 - ---@return DMat4 function Mat4:as_dmat4(_self) end ----@package ---@param _self Mat4 - ---@param rhs Vec3 - ---@return Vec3 function Mat4:transform_point3(_self,rhs) end ----@package ---@param axis Vec3 - ---@param angle number - ---@return Mat4 function Mat4.from_axis_angle(axis,angle) end ----@package ---@param eye Vec3 - ---@param center Vec3 - ---@param up Vec3 - ---@return Mat4 function Mat4.look_at_lh(eye,center,up) end ----@package ---@param _self Mat4 - ---@param rhs Mat4 - ---@return Mat4 function Mat4:mul_mat4(_self,rhs) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@return Mat4 function Mat4.perspective_infinite_rh(fov_y_radians,aspect_ratio,z_near) end ----@package ---@param fov_y_radians number - ---@param aspect_ratio number - ---@param z_near number - ---@return Mat4 function Mat4.perspective_infinite_reverse_lh(fov_y_radians,aspect_ratio,z_near) end ----@package ---@param _self Mat4 - ---@param rhs number - ---@return Mat4 function Mat4:div(_self,rhs) end ----@package ---@param _self Mat4 - ---@return Mat4 function Mat4:abs(_self) end ----@package ---@param angle number - ---@return Mat4 function Mat4.from_rotation_y(angle) end ----@class Quat - +---@class Quat : ReflectReference ---@field x ? number ---@field y ? number ---@field z ? number ---@field w ? number Quat = {} ----@package ---@param _self Quat - ---@param rhs Quat - ---@return Quat function Quat:sub(_self,rhs) end ----@package ----@param _self Quat +---@param p1 Quat +---@param p2 number +---@return Quat +function Quat:mul(p1,p2) end +---@param _self Quat ---@return boolean function Quat:is_normalized(_self) end ----@package ---@param _self Quat - ---@return Quat function Quat:conjugate(_self) end ----@package ---@param euler EulerRot - ---@param a number - ---@param b number - ---@param c number - ---@return Quat function Quat.from_euler(euler,a,b,c) end ----@package ---@param _self Quat - ---@return Quat function Quat:inverse(_self) end ----@package ---@param _self Quat - ---@return DQuat function Quat:as_dquat(_self) end ----@package ---@param angle number - ---@return Quat function Quat.from_rotation_y(angle) end ----@package ---@param _self Quat - ---@return number[] function Quat:to_array(_self) end ----@package ---@param _self Quat - ---@return boolean function Quat:is_nan(_self) end ----@package ---@param _self Quat - ---@param rhs Quat - ---@return Quat function Quat:add(_self,rhs) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@param w number - ---@return Quat function Quat.from_xyzw(x,y,z,w) end ----@package ---@param angle number - ---@return Quat function Quat.from_rotation_z(angle) end ----@package ---@param _self Quat - ---@param rhs Quat - ---@return number function Quat:angle_between(_self,rhs) end ----@package ---@param _self Quat - ---@param _end Quat - ---@param s number - ---@return Quat function Quat:slerp(_self,_end,s) end ----@package ---@param from Vec3 - ---@param to Vec3 - ---@return Quat function Quat.from_rotation_arc_colinear(from,to) end ----@package ---@param _self Quat - ---@return Quat function Quat:neg(_self) end ----@package ---@param _self Quat - ---@param rhs Quat - ---@param max_angle number - ---@return Quat function Quat:rotate_towards(_self,rhs,max_angle) end ----@package ---@param angle number - ---@return Quat function Quat.from_rotation_x(angle) end ----@package ----@param _self Quat +---@param p1 Quat +---@param p2 Vec3 +---@return Vec3 +function Quat:mul(p1,p2) end +---@param _self Quat ---@param rhs Vec3 - ---@return Vec3 function Quat:mul_vec3(_self,rhs) end ----@package ---@param mat Mat3A - ---@return Quat function Quat.from_mat3a(mat) end ----@package ---@param _self Quat - ---@return Vec3 function Quat:to_scaled_axis(_self) end ----@package ----@param from Vec2 +---@param p1 Quat +---@param p2 Vec3A +---@return Vec3A +function Quat:mul(p1,p2) end +---@param from Vec2 ---@param to Vec2 - ---@return Quat function Quat.from_rotation_arc_2d(from,to) end ----@package ---@param _self Quat - ---@param rhs Quat - ---@return Quat function Quat:mul(_self,rhs) end ----@package ---@param _self Quat - ---@param rhs number - ---@return Quat function Quat:div(_self,rhs) end ----@package ---@param _self Quat - ---@param rhs Quat - ---@return number function Quat:dot(_self,rhs) end ----@package ---@param from Vec3 - ---@param to Vec3 - ---@return Quat function Quat.from_rotation_arc(from,to) end ----@package ---@param _self Quat - ---@param rhs Quat - ---@return boolean function Quat:eq(_self,rhs) end ----@package ---@param _self Quat - ---@param order EulerRot - ---@return [number, number, number] function Quat:to_euler(_self,order) end ----@package ---@param _self Quat - ---@param _end Quat - ---@param s number - ---@return Quat function Quat:lerp(_self,_end,s) end ----@package ---@param _self Quat - ---@param rhs Quat - ---@param max_abs_diff number - ---@return boolean function Quat:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self Quat - ---@return number function Quat:length_squared(_self) end ----@package ---@param _self Quat - ---@param rhs Vec3A - ---@return Vec3A function Quat:mul_vec3a(_self,rhs) end ----@package ---@param a number[] - ---@return Quat function Quat.from_array(a) end ----@package ---@param v Vec4 - ---@return Quat function Quat.from_vec4(v) end ----@package ---@param a Affine3A - ---@return Quat function Quat.from_affine3(a) end ----@package ---@param _self Quat - ---@return Quat function Quat:clone(_self) end ----@package ---@param _self Quat - ---@return Vec3 function Quat:xyz(_self) end ----@package ---@param mat Mat4 - ---@return Quat function Quat.from_mat4(mat) end ----@package ---@param axis Vec3 - ---@param angle number - ---@return Quat function Quat.from_axis_angle(axis,angle) end ----@package ---@param _self Quat - ---@return Quat function Quat:normalize(_self) end ----@package ---@param _self Quat - ---@return boolean function Quat:is_finite(_self) end ----@package ---@param _self Quat - ---@return boolean function Quat:is_near_identity(_self) end ----@package ---@param mat Mat3 - ---@return Quat function Quat.from_mat3(mat) end ----@package ---@param _self Quat - ---@return number function Quat:length(_self) end ----@package ---@param v Vec3 - ---@return Quat function Quat.from_scaled_axis(v) end ----@package ---@param _self Quat - ---@param rhs Quat - ---@return Quat function Quat:mul_quat(_self,rhs) end ----@package ---@param _self Quat - ---@return number function Quat:length_recip(_self) end ----@class U16Vec2 - +---@class U16Vec2 : ReflectReference ---@field x ? integer ---@field y ? integer U16Vec2 = {} ----@package ---@param _self U16Vec2 - ---@return integer[] function U16Vec2:to_array(_self) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:min(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return BVec2 function U16Vec2:cmplt(_self,rhs) end ----@package ----@param _self U16Vec2 +---@param p1 U16Vec2 +---@param p2 U16Vec2 +---@return U16Vec2 +function U16Vec2:div(p1,p2) end +---@param _self U16Vec2 ---@return integer function U16Vec2:min_element(_self) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:wrapping_mul(_self,rhs) end ----@package ---@param mask BVec2 - ---@param if_true U16Vec2 - ---@param if_false U16Vec2 - ---@return U16Vec2 function U16Vec2.select(mask,if_true,if_false) end ----@package ----@param _self U16Vec2 +---@param p1 U16Vec2 +---@param p2 integer +---@return U16Vec2 +function U16Vec2:rem(p1,p2) end ----@param rhs U16Vec2 +---@param p1 U16Vec2 +---@param p2 U16Vec2 +---@return U16Vec2 +function U16Vec2:rem(p1,p2) end +---@param p1 U16Vec2 +---@param p2 integer ---@return U16Vec2 -function U16Vec2:max(_self,rhs) end +function U16Vec2:div(p1,p2) end ----@package ---@param _self U16Vec2 +---@param rhs U16Vec2 +---@return U16Vec2 +function U16Vec2:max(_self,rhs) end ----@return [] +---@param _self U16Vec2 +---@return nil function U16Vec2:assert_receiver_is_total_eq(_self) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:saturating_add(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:dot_into_vec(_self,rhs) end ----@package ----@param _self U16Vec2 +---@param p1 U16Vec2 +---@param p2 integer +---@return U16Vec2 +function U16Vec2:mul(p1,p2) end +---@param _self U16Vec2 ---@return U64Vec2 function U16Vec2:as_u64vec2(_self) end ----@package ---@param _self U16Vec2 - ---@return DVec2 function U16Vec2:as_dvec2(_self) end ----@package ---@param _self U16Vec2 - ---@return I64Vec2 function U16Vec2:as_i64vec2(_self) end ----@package ----@param _self U16Vec2 +---@param p1 U16Vec2 +---@param p2 U16Vec2 +---@return U16Vec2 +function U16Vec2:sub(p1,p2) end +---@param _self U16Vec2 ---@return U8Vec2 function U16Vec2:as_u8vec2(_self) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return BVec2 function U16Vec2:cmple(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@return U16Vec2 function U16Vec2:clone(_self) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:div(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@return UVec2 function U16Vec2:as_uvec2(_self) end ----@package ---@param _self U16Vec2 - ---@param rhs I16Vec2 - ---@return U16Vec2 function U16Vec2:wrapping_add_signed(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return BVec2 function U16Vec2:cmpeq(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@param x integer - ---@return U16Vec2 function U16Vec2:with_x(_self,x) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return BVec2 function U16Vec2:cmpne(_self,rhs) end ----@package ---@param v integer - ---@return U16Vec2 function U16Vec2.splat(v) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return BVec2 function U16Vec2:cmpgt(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return integer function U16Vec2:dot(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:wrapping_sub(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:wrapping_div(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:saturating_sub(_self,rhs) end ----@package ----@param _self U16Vec2 +---@param p1 U16Vec2 +---@param p2 U16Vec2 +---@return U16Vec2 +function U16Vec2:mul(p1,p2) end +---@param _self U16Vec2 ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:mul(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@param other U16Vec2 - ---@return boolean function U16Vec2:eq(_self,other) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return BVec2 function U16Vec2:cmpge(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@return integer function U16Vec2:element_product(_self) end ----@package ----@param _self U16Vec2 +---@param p1 U16Vec2 +---@param p2 U16Vec2 +---@return U16Vec2 +function U16Vec2:add(p1,p2) end +---@param _self U16Vec2 ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:saturating_mul(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@return IVec2 function U16Vec2:as_ivec2(_self) end ----@package ---@param _self U16Vec2 - ---@param rhs I16Vec2 - ---@return U16Vec2 function U16Vec2:saturating_add_signed(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@return integer function U16Vec2:length_squared(_self) end ----@package ---@param _self U16Vec2 - ---@param z integer - ---@return U16Vec3 function U16Vec2:extend(_self,z) end ----@package ---@param _self U16Vec2 - ---@return integer function U16Vec2:element_sum(_self) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:saturating_div(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@return integer function U16Vec2:max_element(_self) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:rem(_self,rhs) end ----@package ----@param _self U16Vec2 +---@param p1 U16Vec2 +---@param p2 integer +---@return U16Vec2 +function U16Vec2:add(p1,p2) end +---@param _self U16Vec2 ---@param y integer - ---@return U16Vec2 function U16Vec2:with_y(_self,y) end ----@package ---@param x integer - ---@param y integer - ---@return U16Vec2 function U16Vec2.new(x,y) end ----@package ----@param _self U16Vec2 +---@param p1 U16Vec2 +---@param p2 integer +---@return U16Vec2 +function U16Vec2:sub(p1,p2) end +---@param _self U16Vec2 ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:sub(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@return I8Vec2 function U16Vec2:as_i8vec2(_self) end ----@package ---@param _self U16Vec2 - ---@param min U16Vec2 - ---@param max U16Vec2 - ---@return U16Vec2 function U16Vec2:clamp(_self,min,max) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:wrapping_add(_self,rhs) end ----@package ---@param _self U16Vec2 - ---@return Vec2 function U16Vec2:as_vec2(_self) end ----@package ---@param _self U16Vec2 - ---@return I16Vec2 function U16Vec2:as_i16vec2(_self) end ----@package ---@param a integer[] - ---@return U16Vec2 function U16Vec2.from_array(a) end ----@package ---@param _self U16Vec2 - ---@param rhs U16Vec2 - ---@return U16Vec2 function U16Vec2:add(_self,rhs) end ----@class U16Vec3 - +---@class U16Vec3 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer U16Vec3 = {} ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:add(_self,rhs) end ----@package ----@param _self U16Vec3 +---@param p1 U16Vec3 +---@param p2 U16Vec3 +---@return U16Vec3 +function U16Vec3:mul(p1,p2) end ----@return [] +---@param _self U16Vec3 +---@return nil function U16Vec3:assert_receiver_is_total_eq(_self) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:saturating_mul(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@return integer function U16Vec3:element_product(_self) end ----@package ---@param _self U16Vec3 - ---@return Vec3A function U16Vec3:as_vec3a(_self) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:wrapping_add(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@return integer function U16Vec3:element_sum(_self) end ----@package ---@param _self U16Vec3 - ---@return U8Vec3 function U16Vec3:as_u8vec3(_self) end ----@package ----@param _self U16Vec3 +---@param p1 U16Vec3 +---@param p2 integer +---@return U16Vec3 +function U16Vec3:sub(p1,p2) end +---@param _self U16Vec3 ---@param rhs U16Vec3 - ---@return BVec3 function U16Vec3:cmpge(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@return integer function U16Vec3:min_element(_self) end ----@package ---@param _self U16Vec3 - ---@param w integer - ---@return U16Vec4 function U16Vec3:extend(_self,w) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:div(_self,rhs) end ----@package ----@param _self U16Vec3 +---@param p1 U16Vec3 +---@param p2 U16Vec3 +---@return U16Vec3 +function U16Vec3:rem(p1,p2) end +---@param _self U16Vec3 ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:max(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@return I16Vec3 function U16Vec3:as_i16vec3(_self) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:dot_into_vec(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return integer function U16Vec3:dot(_self,rhs) end ----@package ----@param _self U16Vec3 +---@param p1 U16Vec3 +---@param p2 integer +---@return U16Vec3 +function U16Vec3:mul(p1,p2) end +---@param _self U16Vec3 ---@return integer function U16Vec3:length_squared(_self) end ----@package ---@param _self U16Vec3 - ---@return U64Vec3 function U16Vec3:as_u64vec3(_self) end ----@package ---@param _self U16Vec3 - ---@return U16Vec3 function U16Vec3:clone(_self) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:saturating_add(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@return U16Vec2 function U16Vec3:truncate(_self) end ----@package ----@param _self U16Vec3 +---@param p1 U16Vec3 +---@param p2 U16Vec3 +---@return U16Vec3 +function U16Vec3:sub(p1,p2) end +---@param _self U16Vec3 ---@param rhs U16Vec3 - ---@return BVec3 function U16Vec3:cmpeq(_self,rhs) end ----@package ---@param a integer[] - ---@return U16Vec3 function U16Vec3.from_array(a) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:wrapping_div(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:saturating_div(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return BVec3 function U16Vec3:cmple(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@param rhs I16Vec3 - ---@return U16Vec3 function U16Vec3:saturating_add_signed(_self,rhs) end ----@package ----@param _self U16Vec3 +---@param p1 U16Vec3 +---@param p2 integer +---@return U16Vec3 +function U16Vec3:rem(p1,p2) end +---@param _self U16Vec3 ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:mul(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@return IVec3 function U16Vec3:as_ivec3(_self) end ----@package ---@param _self U16Vec3 - ---@return I8Vec3 function U16Vec3:as_i8vec3(_self) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:sub(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return BVec3 function U16Vec3:cmplt(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@param other U16Vec3 - ---@return boolean function U16Vec3:eq(_self,other) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:rem(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:min(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@return DVec3 function U16Vec3:as_dvec3(_self) end ----@package ----@param _self U16Vec3 +---@param p1 U16Vec3 +---@param p2 integer +---@return U16Vec3 +function U16Vec3:div(p1,p2) end +---@param _self U16Vec3 ---@return integer function U16Vec3:max_element(_self) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@return U16Vec3 function U16Vec3.new(x,y,z) end ----@package ---@param _self U16Vec3 - ---@param y integer - ---@return U16Vec3 function U16Vec3:with_y(_self,y) end ----@package ----@param v integer +---@param p1 U16Vec3 +---@param p2 U16Vec3 +---@return U16Vec3 +function U16Vec3:add(p1,p2) end +---@param v integer ---@return U16Vec3 function U16Vec3.splat(v) end ----@package ----@param mask BVec3 +---@param p1 U16Vec3 +---@param p2 U16Vec3 +---@return U16Vec3 +function U16Vec3:div(p1,p2) end +---@param mask BVec3 ---@param if_true U16Vec3 - ---@param if_false U16Vec3 - ---@return U16Vec3 function U16Vec3.select(mask,if_true,if_false) end ----@package ---@param _self U16Vec3 - ---@param x integer - ---@return U16Vec3 function U16Vec3:with_x(_self,x) end ----@package ---@param _self U16Vec3 - ---@param min U16Vec3 - ---@param max U16Vec3 - ---@return U16Vec3 function U16Vec3:clamp(_self,min,max) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:wrapping_sub(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@return integer[] function U16Vec3:to_array(_self) end ----@package ---@param _self U16Vec3 - ---@return Vec3 function U16Vec3:as_vec3(_self) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return BVec3 function U16Vec3:cmpgt(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:cross(_self,rhs) end ----@package ----@param _self U16Vec3 +---@param p1 U16Vec3 +---@param p2 integer +---@return U16Vec3 +function U16Vec3:add(p1,p2) end +---@param _self U16Vec3 ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:saturating_sub(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return BVec3 function U16Vec3:cmpne(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@return UVec3 function U16Vec3:as_uvec3(_self) end ----@package ---@param _self U16Vec3 - ---@param rhs I16Vec3 - ---@return U16Vec3 function U16Vec3:wrapping_add_signed(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@return I64Vec3 function U16Vec3:as_i64vec3(_self) end ----@package ---@param _self U16Vec3 - ---@param rhs U16Vec3 - ---@return U16Vec3 function U16Vec3:wrapping_mul(_self,rhs) end ----@package ---@param _self U16Vec3 - ---@param z integer - ---@return U16Vec3 function U16Vec3:with_z(_self,z) end ----@class U16Vec4 - +---@class U16Vec4 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer ---@field w ? integer U16Vec4 = {} ----@package ----@param _self U16Vec4 +---@param p1 U16Vec4 +---@param p2 U16Vec4 +---@return U16Vec4 +function U16Vec4:sub(p1,p2) end +---@param _self U16Vec4 ---@param y integer - ---@return U16Vec4 function U16Vec4:with_y(_self,y) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:add(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return integer function U16Vec4:element_product(_self) end ----@package ---@param _self U16Vec4 - ---@param w integer - ---@return U16Vec4 function U16Vec4:with_w(_self,w) end ----@package ---@param _self U16Vec4 - ---@return I8Vec4 function U16Vec4:as_i8vec4(_self) end ----@package ---@param _self U16Vec4 - ---@param rhs I16Vec4 - ---@return U16Vec4 function U16Vec4:saturating_add_signed(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return BVec4 function U16Vec4:cmpeq(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return integer function U16Vec4:min_element(_self) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return BVec4 function U16Vec4:cmplt(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return integer[] function U16Vec4:to_array(_self) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:saturating_mul(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return U64Vec4 function U16Vec4:as_u64vec4(_self) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:wrapping_mul(_self,rhs) end ----@package ---@param mask BVec4 - ---@param if_true U16Vec4 - ---@param if_false U16Vec4 - ---@return U16Vec4 function U16Vec4.select(mask,if_true,if_false) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return BVec4 function U16Vec4:cmpge(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:wrapping_sub(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:saturating_sub(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:wrapping_div(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return integer function U16Vec4:length_squared(_self) end ----@package ---@param _self U16Vec4 - ---@return U8Vec4 function U16Vec4:as_u8vec4(_self) end ----@package ----@param _self U16Vec4 +---@param p1 U16Vec4 +---@param p2 integer +---@return U16Vec4 +function U16Vec4:div(p1,p2) end +---@param _self U16Vec4 ---@return I16Vec4 function U16Vec4:as_i16vec4(_self) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return integer function U16Vec4:dot(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return U16Vec3 function U16Vec4:truncate(_self) end ----@package ----@param _self U16Vec4 +---@param p1 U16Vec4 +---@param p2 U16Vec4 +---@return U16Vec4 +function U16Vec4:mul(p1,p2) end ----@param rhs U16Vec4 +---@param p1 U16Vec4 +---@param p2 integer +---@return U16Vec4 +function U16Vec4:mul(p1,p2) end +---@param _self U16Vec4 +---@param rhs U16Vec4 ---@return BVec4 function U16Vec4:cmpne(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@param min U16Vec4 - ---@param max U16Vec4 - ---@return U16Vec4 function U16Vec4:clamp(_self,min,max) end ----@package ---@param v integer - ---@return U16Vec4 function U16Vec4.splat(v) end ----@package ---@param _self U16Vec4 - ---@param rhs I16Vec4 - ---@return U16Vec4 function U16Vec4:wrapping_add_signed(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return IVec4 function U16Vec4:as_ivec4(_self) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:dot_into_vec(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return integer function U16Vec4:element_sum(_self) end ----@package ---@param _self U16Vec4 - ---@param x integer - ---@return U16Vec4 function U16Vec4:with_x(_self,x) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:div(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return UVec4 function U16Vec4:as_uvec4(_self) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return BVec4 function U16Vec4:cmple(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return Vec4 function U16Vec4:as_vec4(_self) end ----@package ---@param _self U16Vec4 - ---@return U16Vec4 function U16Vec4:clone(_self) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:mul(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@param z integer - ---@return U16Vec4 function U16Vec4:with_z(_self,z) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:saturating_div(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return I64Vec4 function U16Vec4:as_i64vec4(_self) end ----@package ----@param _self U16Vec4 +---@param p1 U16Vec4 +---@param p2 U16Vec4 +---@return U16Vec4 +function U16Vec4:div(p1,p2) end +---@param _self U16Vec4 ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:rem(_self,rhs) end ----@package ----@param _self U16Vec4 +---@param p1 U16Vec4 +---@param p2 U16Vec4 +---@return U16Vec4 +function U16Vec4:add(p1,p2) end +---@param _self U16Vec4 ---@param rhs U16Vec4 - ---@return BVec4 function U16Vec4:cmpgt(_self,rhs) end ----@package ----@param x integer +---@param p1 U16Vec4 +---@param p2 integer +---@return U16Vec4 +function U16Vec4:add(p1,p2) end +---@param x integer ---@param y integer - ---@param z integer - ---@param w integer - ---@return U16Vec4 function U16Vec4.new(x,y,z,w) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:saturating_add(_self,rhs) end ----@package ----@param _self U16Vec4 +---@param p1 U16Vec4 +---@param p2 integer +---@return U16Vec4 +function U16Vec4:sub(p1,p2) end +---@param _self U16Vec4 ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:max(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:min(_self,rhs) end ----@package ---@param a integer[] - ---@return U16Vec4 function U16Vec4.from_array(a) end ----@package ----@param _self U16Vec4 +---@param p1 U16Vec4 +---@param p2 U16Vec4 +---@return U16Vec4 +function U16Vec4:rem(p1,p2) end ----@return [] +---@param _self U16Vec4 +---@return nil function U16Vec4:assert_receiver_is_total_eq(_self) end ----@package ---@param _self U16Vec4 - ---@return integer function U16Vec4:max_element(_self) end ----@package ---@param _self U16Vec4 - ---@param other U16Vec4 - ---@return boolean function U16Vec4:eq(_self,other) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:sub(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@param rhs U16Vec4 - ---@return U16Vec4 function U16Vec4:wrapping_add(_self,rhs) end ----@package ---@param _self U16Vec4 - ---@return DVec4 function U16Vec4:as_dvec4(_self) end +---@param p1 U16Vec4 +---@param p2 integer +---@return U16Vec4 +function U16Vec4:rem(p1,p2) end ----@class U64Vec2 +---@class U64Vec2 : ReflectReference ---@field x ? integer ---@field y ? integer U64Vec2 = {} ----@package ---@param _self U64Vec2 - ---@return U64Vec2 function U64Vec2:clone(_self) end ----@package ---@param _self U64Vec2 - ---@param z integer - ---@return U64Vec3 function U64Vec2:extend(_self,z) end ----@package ----@param _self U64Vec2 +---@param p1 U64Vec2 +---@param p2 U64Vec2 +---@return U64Vec2 +function U64Vec2:add(p1,p2) end +---@param _self U64Vec2 ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:wrapping_sub(_self,rhs) end ----@package ----@param _self U64Vec2 +---@param p1 U64Vec2 +---@param p2 integer +---@return U64Vec2 +function U64Vec2:add(p1,p2) end +---@param _self U64Vec2 ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:sub(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:min(_self,rhs) end ----@package ----@param a integer[] +---@param p1 U64Vec2 +---@param p2 integer +---@return U64Vec2 +function U64Vec2:sub(p1,p2) end + +---@param p1 U64Vec2 +---@param p2 U64Vec2 +---@return U64Vec2 +function U64Vec2:div(p1,p2) end + +---@param p1 U64Vec2 +---@param p2 integer +---@return U64Vec2 +function U64Vec2:div(p1,p2) end +---@param a integer[] ---@return U64Vec2 function U64Vec2.from_array(a) end ----@package ---@param _self U64Vec2 - ---@return I8Vec2 function U64Vec2:as_i8vec2(_self) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return BVec2 function U64Vec2:cmple(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@return DVec2 function U64Vec2:as_dvec2(_self) end ----@package ----@param _self U64Vec2 +---@param p1 U64Vec2 +---@param p2 U64Vec2 +---@return U64Vec2 +function U64Vec2:sub(p1,p2) end +---@param _self U64Vec2 ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:rem(_self,rhs) end ----@package ----@param _self U64Vec2 +---@param p1 U64Vec2 +---@param p2 U64Vec2 +---@return U64Vec2 +function U64Vec2:mul(p1,p2) end +---@param _self U64Vec2 ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:wrapping_mul(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@param rhs I64Vec2 - ---@return U64Vec2 function U64Vec2:wrapping_add_signed(_self,rhs) end ----@package ---@param _self U64Vec2 - ----@return [] +---@return nil function U64Vec2:assert_receiver_is_total_eq(_self) end ----@package ---@param _self U64Vec2 - ---@param x integer - ---@return U64Vec2 function U64Vec2:with_x(_self,x) end ----@package ---@param _self U64Vec2 - ---@return integer[] function U64Vec2:to_array(_self) end ----@package ---@param _self U64Vec2 - ---@return integer function U64Vec2:length_squared(_self) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:max(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:div(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@param other U64Vec2 - ---@return boolean function U64Vec2:eq(_self,other) end ----@package ---@param _self U64Vec2 - ---@param min U64Vec2 - ---@param max U64Vec2 - ---@return U64Vec2 function U64Vec2:clamp(_self,min,max) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return BVec2 function U64Vec2:cmplt(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@return U8Vec2 function U64Vec2:as_u8vec2(_self) end ----@package ----@param _self U64Vec2 +---@param p1 U64Vec2 +---@param p2 integer +---@return U64Vec2 +function U64Vec2:rem(p1,p2) end +---@param _self U64Vec2 ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:wrapping_div(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@return Vec2 function U64Vec2:as_vec2(_self) end ----@package ---@param _self U64Vec2 - ---@return integer function U64Vec2:element_sum(_self) end ----@package ---@param _self U64Vec2 - ---@return I64Vec2 function U64Vec2:as_i64vec2(_self) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return BVec2 function U64Vec2:cmpeq(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return BVec2 function U64Vec2:cmpge(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:dot_into_vec(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@return integer function U64Vec2:element_product(_self) end ----@package ----@param _self U64Vec2 +---@param p1 U64Vec2 +---@param p2 U64Vec2 +---@return U64Vec2 +function U64Vec2:rem(p1,p2) end +---@param _self U64Vec2 ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:add(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@return UVec2 function U64Vec2:as_uvec2(_self) end ----@package ---@param _self U64Vec2 - ---@return integer function U64Vec2:min_element(_self) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:saturating_div(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@return I16Vec2 function U64Vec2:as_i16vec2(_self) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:mul(_self,rhs) end ----@package ----@param _self U64Vec2 +---@param p1 U64Vec2 +---@param p2 integer +---@return U64Vec2 +function U64Vec2:mul(p1,p2) end +---@param _self U64Vec2 ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:saturating_add(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@param rhs I64Vec2 - ---@return U64Vec2 function U64Vec2:saturating_add_signed(_self,rhs) end ----@package ---@param mask BVec2 - ---@param if_true U64Vec2 - ---@param if_false U64Vec2 - ---@return U64Vec2 function U64Vec2.select(mask,if_true,if_false) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return BVec2 function U64Vec2:cmpne(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:wrapping_add(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@return U16Vec2 function U64Vec2:as_u16vec2(_self) end ----@package ---@param v integer - ---@return U64Vec2 function U64Vec2.splat(v) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return integer function U64Vec2:dot(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return BVec2 function U64Vec2:cmpgt(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@return U64Vec2 function U64Vec2.new(x,y) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:saturating_sub(_self,rhs) end ----@package ---@param _self U64Vec2 - ---@param y integer - ---@return U64Vec2 function U64Vec2:with_y(_self,y) end ----@package ---@param _self U64Vec2 - ---@return IVec2 function U64Vec2:as_ivec2(_self) end ----@package ---@param _self U64Vec2 - ---@return integer function U64Vec2:max_element(_self) end ----@package ---@param _self U64Vec2 - ---@param rhs U64Vec2 - ---@return U64Vec2 function U64Vec2:saturating_mul(_self,rhs) end ----@class U64Vec3 - +---@class U64Vec3 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer U64Vec3 = {} ----@package ---@param _self U64Vec3 - ---@return IVec3 function U64Vec3:as_ivec3(_self) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:wrapping_div(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return BVec3 function U64Vec3:cmpge(_self,rhs) end ----@package ----@param a integer[] +---@param p1 U64Vec3 +---@param p2 U64Vec3 +---@return U64Vec3 +function U64Vec3:mul(p1,p2) end +---@param a integer[] ---@return U64Vec3 function U64Vec3.from_array(a) end ----@package ---@param _self U64Vec3 - ---@return I8Vec3 function U64Vec3:as_i8vec3(_self) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:saturating_div(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:min(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param w integer - ---@return U64Vec4 function U64Vec3:extend(_self,w) end ----@package ---@param _self U64Vec3 - ---@return U64Vec2 function U64Vec3:truncate(_self) end ----@package ---@param _self U64Vec3 - ---@return Vec3 function U64Vec3:as_vec3(_self) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:wrapping_mul(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:add(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param z integer - ---@return U64Vec3 function U64Vec3:with_z(_self,z) end ----@package ----@param _self U64Vec3 +---@param p1 U64Vec3 +---@param p2 integer +---@return U64Vec3 +function U64Vec3:add(p1,p2) end +---@param _self U64Vec3 ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:rem(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param rhs I64Vec3 - ---@return U64Vec3 function U64Vec3:saturating_add_signed(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:saturating_add(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:saturating_sub(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@return integer function U64Vec3:max_element(_self) end ----@package ----@param _self U64Vec3 +---@param p1 U64Vec3 +---@param p2 integer +---@return U64Vec3 +function U64Vec3:rem(p1,p2) end +---@param _self U64Vec3 ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:saturating_mul(_self,rhs) end ----@package ----@param _self U64Vec3 +---@param p1 U64Vec3 +---@param p2 integer +---@return U64Vec3 +function U64Vec3:div(p1,p2) end +---@param _self U64Vec3 ---@return I16Vec3 function U64Vec3:as_i16vec3(_self) end ----@package ---@param v integer - ---@return U64Vec3 function U64Vec3.splat(v) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:wrapping_sub(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:cross(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@return U64Vec3 function U64Vec3:clone(_self) end ----@package ---@param _self U64Vec3 - ---@return DVec3 function U64Vec3:as_dvec3(_self) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:mul(_self,rhs) end ----@package ----@param _self U64Vec3 +---@param p1 U64Vec3 +---@param p2 integer +---@return U64Vec3 +function U64Vec3:sub(p1,p2) end +---@param _self U64Vec3 ---@param rhs U64Vec3 - ---@return integer function U64Vec3:dot(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@return U8Vec3 function U64Vec3:as_u8vec3(_self) end ----@package ---@param _self U64Vec3 - ---@return I64Vec3 function U64Vec3:as_i64vec3(_self) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return BVec3 function U64Vec3:cmpgt(_self,rhs) end ----@package ---@param _self U64Vec3 - ----@return [] +---@return nil function U64Vec3:assert_receiver_is_total_eq(_self) end ----@package ----@param _self U64Vec3 +---@param p1 U64Vec3 +---@param p2 U64Vec3 +---@return U64Vec3 +function U64Vec3:rem(p1,p2) end +---@param _self U64Vec3 ---@return U16Vec3 function U64Vec3:as_u16vec3(_self) end ----@package ---@param _self U64Vec3 - ---@param min U64Vec3 - ---@param max U64Vec3 - ---@return U64Vec3 function U64Vec3:clamp(_self,min,max) end ----@package ---@param _self U64Vec3 - ---@param y integer - ---@return U64Vec3 function U64Vec3:with_y(_self,y) end ----@package ---@param _self U64Vec3 - ---@param x integer - ---@return U64Vec3 function U64Vec3:with_x(_self,x) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return BVec3 function U64Vec3:cmpeq(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param other U64Vec3 - ---@return boolean function U64Vec3:eq(_self,other) end ----@package ---@param _self U64Vec3 - ---@return integer function U64Vec3:length_squared(_self) end ----@package ---@param _self U64Vec3 - ---@return Vec3A function U64Vec3:as_vec3a(_self) end ----@package ----@param _self U64Vec3 +---@param p1 U64Vec3 +---@param p2 U64Vec3 +---@return U64Vec3 +function U64Vec3:div(p1,p2) end +---@param _self U64Vec3 ---@param rhs U64Vec3 - ---@return BVec3 function U64Vec3:cmplt(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:div(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@return integer function U64Vec3:element_product(_self) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:dot_into_vec(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:sub(_self,rhs) end ----@package ----@param _self U64Vec3 +---@param p1 U64Vec3 +---@param p2 U64Vec3 +---@return U64Vec3 +function U64Vec3:sub(p1,p2) end +---@param _self U64Vec3 ---@param rhs U64Vec3 - ---@return BVec3 function U64Vec3:cmpne(_self,rhs) end ----@package ----@param x integer +---@param p1 U64Vec3 +---@param p2 integer +---@return U64Vec3 +function U64Vec3:mul(p1,p2) end +---@param x integer ---@param y integer - ---@param z integer - ---@return U64Vec3 function U64Vec3.new(x,y,z) end ----@package ---@param _self U64Vec3 - ---@return integer function U64Vec3:min_element(_self) end ----@package ---@param _self U64Vec3 - ---@return UVec3 function U64Vec3:as_uvec3(_self) end ----@package ---@param _self U64Vec3 - ---@param rhs I64Vec3 - ---@return U64Vec3 function U64Vec3:wrapping_add_signed(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:max(_self,rhs) end ----@package ---@param mask BVec3 - ---@param if_true U64Vec3 - ---@param if_false U64Vec3 - ---@return U64Vec3 function U64Vec3.select(mask,if_true,if_false) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return BVec3 function U64Vec3:cmple(_self,rhs) end ----@package ----@param _self U64Vec3 +---@param p1 U64Vec3 +---@param p2 U64Vec3 +---@return U64Vec3 +function U64Vec3:add(p1,p2) end +---@param _self U64Vec3 ---@return integer function U64Vec3:element_sum(_self) end ----@package ---@param _self U64Vec3 - ---@param rhs U64Vec3 - ---@return U64Vec3 function U64Vec3:wrapping_add(_self,rhs) end ----@package ---@param _self U64Vec3 - ---@return integer[] function U64Vec3:to_array(_self) end ----@class U64Vec4 - +---@class U64Vec4 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer ---@field w ? integer U64Vec4 = {} ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:rem(_self,rhs) end ----@package ---@param _self U64Vec4 - ----@return [] +---@return nil function U64Vec4:assert_receiver_is_total_eq(_self) end ----@package ---@param _self U64Vec4 - ---@return UVec4 function U64Vec4:as_uvec4(_self) end ----@package ---@param _self U64Vec4 - ---@return integer function U64Vec4:max_element(_self) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:saturating_mul(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:saturating_div(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:wrapping_sub(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return BVec4 function U64Vec4:cmpeq(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:sub(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return BVec4 function U64Vec4:cmpge(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@return integer function U64Vec4:length_squared(_self) end ----@package ---@param _self U64Vec4 - ---@param z integer - ---@return U64Vec4 function U64Vec4:with_z(_self,z) end ----@package ---@param _self U64Vec4 - ---@return integer function U64Vec4:element_product(_self) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return BVec4 function U64Vec4:cmpgt(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@param w integer - ---@return U64Vec4 function U64Vec4.new(x,y,z,w) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:dot_into_vec(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@return DVec4 function U64Vec4:as_dvec4(_self) end ----@package ----@param _self U64Vec4 +---@param p1 U64Vec4 +---@param p2 integer +---@return U64Vec4 +function U64Vec4:sub(p1,p2) end +---@param _self U64Vec4 ---@return I8Vec4 function U64Vec4:as_i8vec4(_self) end ----@package ---@param _self U64Vec4 - ---@param rhs I64Vec4 - ---@return U64Vec4 function U64Vec4:wrapping_add_signed(_self,rhs) end ----@package ----@param _self U64Vec4 +---@param p1 U64Vec4 +---@param p2 U64Vec4 +---@return U64Vec4 +function U64Vec4:sub(p1,p2) end +---@param _self U64Vec4 ---@return U64Vec3 function U64Vec4:truncate(_self) end ----@package ---@param _self U64Vec4 - ---@return I64Vec4 function U64Vec4:as_i64vec4(_self) end ----@package ---@param mask BVec4 - ---@param if_true U64Vec4 - ---@param if_false U64Vec4 - ---@return U64Vec4 function U64Vec4.select(mask,if_true,if_false) end ----@package ---@param _self U64Vec4 - ---@return integer function U64Vec4:min_element(_self) end ----@package ----@param _self U64Vec4 +---@param p1 U64Vec4 +---@param p2 U64Vec4 +---@return U64Vec4 +function U64Vec4:rem(p1,p2) end +---@param p1 U64Vec4 +---@param p2 U64Vec4 +---@return U64Vec4 +function U64Vec4:mul(p1,p2) end + +---@param _self U64Vec4 ---@return integer function U64Vec4:element_sum(_self) end ----@package ---@param _self U64Vec4 - ---@param x integer - ---@return U64Vec4 function U64Vec4:with_x(_self,x) end ----@package ----@param _self U64Vec4 +---@param p1 U64Vec4 +---@param p2 integer +---@return U64Vec4 +function U64Vec4:div(p1,p2) end +---@param _self U64Vec4 ---@param rhs U64Vec4 - ---@return BVec4 function U64Vec4:cmple(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:saturating_add(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:div(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@return Vec4 function U64Vec4:as_vec4(_self) end ----@package ---@param _self U64Vec4 - ---@return IVec4 function U64Vec4:as_ivec4(_self) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:wrapping_div(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:saturating_sub(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@return integer[] function U64Vec4:to_array(_self) end ----@package ---@param _self U64Vec4 - ---@param rhs I64Vec4 - ---@return U64Vec4 function U64Vec4:saturating_add_signed(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param w integer - ---@return U64Vec4 function U64Vec4:with_w(_self,w) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:min(_self,rhs) end ----@package ----@param _self U64Vec4 +---@param p1 U64Vec4 +---@param p2 U64Vec4 +---@return U64Vec4 +function U64Vec4:add(p1,p2) end +---@param _self U64Vec4 ---@param y integer - ---@return U64Vec4 function U64Vec4:with_y(_self,y) end ----@package ---@param a integer[] - ---@return U64Vec4 function U64Vec4.from_array(a) end ----@package ---@param _self U64Vec4 - ---@return U64Vec4 function U64Vec4:clone(_self) end ----@package ---@param v integer - ---@return U64Vec4 function U64Vec4.splat(v) end ----@package ---@param _self U64Vec4 - ---@return U8Vec4 function U64Vec4:as_u8vec4(_self) end ----@package ----@param _self U64Vec4 +---@param p1 U64Vec4 +---@param p2 integer +---@return U64Vec4 +function U64Vec4:add(p1,p2) end +---@param _self U64Vec4 ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:add(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return BVec4 function U64Vec4:cmplt(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param other U64Vec4 - ---@return boolean function U64Vec4:eq(_self,other) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:wrapping_mul(_self,rhs) end ----@package ----@param _self U64Vec4 +---@param p1 U64Vec4 +---@param p2 U64Vec4 +---@return U64Vec4 +function U64Vec4:div(p1,p2) end +---@param _self U64Vec4 ---@return I16Vec4 function U64Vec4:as_i16vec4(_self) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:wrapping_add(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return integer function U64Vec4:dot(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return U64Vec4 function U64Vec4:max(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@param rhs U64Vec4 - ---@return BVec4 function U64Vec4:cmpne(_self,rhs) end ----@package ---@param _self U64Vec4 - ---@return U16Vec4 function U64Vec4:as_u16vec4(_self) end ----@package ---@param _self U64Vec4 - ---@param min U64Vec4 - ---@param max U64Vec4 - ---@return U64Vec4 function U64Vec4:clamp(_self,min,max) end ----@package ----@param _self U64Vec4 +---@param p1 U64Vec4 +---@param p2 integer +---@return U64Vec4 +function U64Vec4:rem(p1,p2) end ----@param rhs U64Vec4 +---@param p1 U64Vec4 +---@param p2 integer +---@return U64Vec4 +function U64Vec4:mul(p1,p2) end +---@param _self U64Vec4 +---@param rhs U64Vec4 ---@return U64Vec4 function U64Vec4:mul(_self,rhs) end ----@class U8Vec2 - +---@class U8Vec2 : ReflectReference ---@field x ? integer ---@field y ? integer U8Vec2 = {} ----@package ----@param _self U8Vec2 +---@param p1 U8Vec2 +---@param p2 integer +---@return U8Vec2 +function U8Vec2:sub(p1,p2) end +---@param _self U8Vec2 ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:rem(_self,rhs) end ----@package ----@param _self U8Vec2 +---@param p1 U8Vec2 +---@param p2 integer +---@return U8Vec2 +function U8Vec2:rem(p1,p2) end +---@param _self U8Vec2 ---@param y integer - ---@return U8Vec2 function U8Vec2:with_y(_self,y) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:min(_self,rhs) end ----@package ---@param v integer - ---@return U8Vec2 function U8Vec2.splat(v) end ----@package ---@param _self U8Vec2 - ---@param x integer - ---@return U8Vec2 function U8Vec2:with_x(_self,x) end ----@package ---@param _self U8Vec2 - ---@param rhs I8Vec2 - ---@return U8Vec2 function U8Vec2:saturating_add_signed(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:saturating_sub(_self,rhs) end ----@package ----@param _self U8Vec2 +---@param p1 U8Vec2 +---@param p2 U8Vec2 +---@return U8Vec2 +function U8Vec2:add(p1,p2) end +---@param _self U8Vec2 ---@param rhs U8Vec2 - ---@return BVec2 function U8Vec2:cmpne(_self,rhs) end ----@package ----@param _self U8Vec2 +---@param p1 U8Vec2 +---@param p2 U8Vec2 +---@return U8Vec2 +function U8Vec2:mul(p1,p2) end +---@param _self U8Vec2 ---@param min U8Vec2 - ---@param max U8Vec2 - ---@return U8Vec2 function U8Vec2:clamp(_self,min,max) end ----@package ---@param _self U8Vec2 - ---@param other U8Vec2 - ---@return boolean function U8Vec2:eq(_self,other) end ----@package ---@param _self U8Vec2 - ---@return U8Vec2 function U8Vec2:clone(_self) end ----@package ---@param _self U8Vec2 - ---@return UVec2 function U8Vec2:as_uvec2(_self) end ----@package ---@param _self U8Vec2 - ---@return integer function U8Vec2:min_element(_self) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:saturating_mul(_self,rhs) end ----@package ---@param a integer[] - ---@return U8Vec2 function U8Vec2.from_array(a) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:wrapping_sub(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return BVec2 function U8Vec2:cmpgt(_self,rhs) end ----@package ----@param _self U8Vec2 +---@param p1 U8Vec2 +---@param p2 integer +---@return U8Vec2 +function U8Vec2:add(p1,p2) end +---@param _self U8Vec2 ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:saturating_add(_self,rhs) end ----@package ----@param _self U8Vec2 +---@param p1 U8Vec2 +---@param p2 integer +---@return U8Vec2 +function U8Vec2:mul(p1,p2) end ----@return [] +---@param _self U8Vec2 +---@return nil function U8Vec2:assert_receiver_is_total_eq(_self) end ----@package ---@param _self U8Vec2 - ---@param z integer - ---@return U8Vec3 function U8Vec2:extend(_self,z) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return BVec2 function U8Vec2:cmpge(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:saturating_div(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:wrapping_mul(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@return integer function U8Vec2:element_product(_self) end ----@package ---@param _self U8Vec2 - ---@return I16Vec2 function U8Vec2:as_i16vec2(_self) end ----@package ----@param _self U8Vec2 +---@param p1 U8Vec2 +---@param p2 integer +---@return U8Vec2 +function U8Vec2:div(p1,p2) end +---@param _self U8Vec2 ---@return IVec2 function U8Vec2:as_ivec2(_self) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return integer function U8Vec2:dot(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@return U8Vec2 function U8Vec2.new(x,y) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:sub(_self,rhs) end ----@package ---@param mask BVec2 - ---@param if_true U8Vec2 - ---@param if_false U8Vec2 - ---@return U8Vec2 function U8Vec2.select(mask,if_true,if_false) end ----@package ---@param _self U8Vec2 - ---@return integer[] function U8Vec2:to_array(_self) end ----@package ---@param _self U8Vec2 - ---@return integer function U8Vec2:max_element(_self) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:wrapping_add(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:mul(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@return Vec2 function U8Vec2:as_vec2(_self) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:wrapping_div(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@return I64Vec2 function U8Vec2:as_i64vec2(_self) end ----@package ---@param _self U8Vec2 - ---@return DVec2 function U8Vec2:as_dvec2(_self) end ----@package ---@param _self U8Vec2 - ---@return integer function U8Vec2:length_squared(_self) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:max(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return BVec2 function U8Vec2:cmpeq(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@return U16Vec2 function U8Vec2:as_u16vec2(_self) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:div(_self,rhs) end ----@package ----@param _self U8Vec2 +---@param p1 U8Vec2 +---@param p2 U8Vec2 +---@return U8Vec2 +function U8Vec2:rem(p1,p2) end ----@param rhs U8Vec2 +---@param p1 U8Vec2 +---@param p2 U8Vec2 +---@return U8Vec2 +function U8Vec2:div(p1,p2) end +---@param _self U8Vec2 +---@param rhs U8Vec2 ---@return U8Vec2 function U8Vec2:add(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return BVec2 function U8Vec2:cmple(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return BVec2 function U8Vec2:cmplt(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@return integer function U8Vec2:element_sum(_self) end ----@package ---@param _self U8Vec2 - ---@return I8Vec2 function U8Vec2:as_i8vec2(_self) end ----@package ---@param _self U8Vec2 - ---@param rhs U8Vec2 - ---@return U8Vec2 function U8Vec2:dot_into_vec(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@param rhs I8Vec2 - ---@return U8Vec2 function U8Vec2:wrapping_add_signed(_self,rhs) end ----@package ---@param _self U8Vec2 - ---@return U64Vec2 function U8Vec2:as_u64vec2(_self) end +---@param p1 U8Vec2 +---@param p2 U8Vec2 +---@return U8Vec2 +function U8Vec2:sub(p1,p2) end ----@class U8Vec3 +---@class U8Vec3 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer U8Vec3 = {} ----@package ----@param _self U8Vec3 +---@param p1 U8Vec3 +---@param p2 integer +---@return U8Vec3 +function U8Vec3:mul(p1,p2) end +---@param _self U8Vec3 ---@param rhs U8Vec3 - ---@return BVec3 function U8Vec3:cmpne(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@return IVec3 function U8Vec3:as_ivec3(_self) end ----@package ---@param _self U8Vec3 - ---@return integer function U8Vec3:element_product(_self) end ----@package ---@param _self U8Vec3 - ---@return integer[] function U8Vec3:to_array(_self) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return BVec3 function U8Vec3:cmpgt(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:saturating_sub(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:saturating_mul(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:mul(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return integer function U8Vec3:dot(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@return UVec3 function U8Vec3:as_uvec3(_self) end ----@package ----@param _self U8Vec3 +---@param p1 U8Vec3 +---@param p2 integer +---@return U8Vec3 +function U8Vec3:add(p1,p2) end +---@param _self U8Vec3 ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:add(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:rem(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@return integer function U8Vec3:element_sum(_self) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:saturating_add(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param y integer - ---@return U8Vec3 function U8Vec3:with_y(_self,y) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:cross(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@return Vec3A function U8Vec3:as_vec3a(_self) end ----@package ---@param _self U8Vec3 - ---@param x integer - ---@return U8Vec3 function U8Vec3:with_x(_self,x) end ----@package ----@param _self U8Vec3 +---@param p1 U8Vec3 +---@param p2 U8Vec3 +---@return U8Vec3 +function U8Vec3:mul(p1,p2) end +---@param _self U8Vec3 ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:div(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@return U8Vec3 function U8Vec3:clone(_self) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:wrapping_add(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@return integer function U8Vec3:min_element(_self) end ----@package ---@param _self U8Vec3 - ---@return DVec3 function U8Vec3:as_dvec3(_self) end ----@package ---@param _self U8Vec3 - ---@param z integer - ---@return U8Vec3 function U8Vec3:with_z(_self,z) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@return U8Vec3 function U8Vec3.new(x,y,z) end ----@package ----@param _self U8Vec3 +---@param p1 U8Vec3 +---@param p2 integer +---@return U8Vec3 +function U8Vec3:rem(p1,p2) end +---@param _self U8Vec3 ---@return I8Vec3 function U8Vec3:as_i8vec3(_self) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:wrapping_mul(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@return Vec3 function U8Vec3:as_vec3(_self) end ----@package ---@param _self U8Vec3 - ---@return U16Vec3 function U8Vec3:as_u16vec3(_self) end ----@package ---@param _self U8Vec3 - ---@return integer function U8Vec3:max_element(_self) end ----@package ---@param _self U8Vec3 - ---@param rhs I8Vec3 - ---@return U8Vec3 function U8Vec3:wrapping_add_signed(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@return U8Vec2 function U8Vec3:truncate(_self) end ----@package ---@param mask BVec3 - ---@param if_true U8Vec3 - ---@param if_false U8Vec3 - ---@return U8Vec3 function U8Vec3.select(mask,if_true,if_false) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:wrapping_div(_self,rhs) end ----@package ----@param _self U8Vec3 +---@param p1 U8Vec3 +---@param p2 integer +---@return U8Vec3 +function U8Vec3:sub(p1,p2) end +---@param _self U8Vec3 ---@return U64Vec3 function U8Vec3:as_u64vec3(_self) end ----@package ----@param _self U8Vec3 +---@param p1 U8Vec3 +---@param p2 U8Vec3 +---@return U8Vec3 +function U8Vec3:add(p1,p2) end +---@param _self U8Vec3 ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:saturating_div(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param w integer - ---@return U8Vec4 function U8Vec3:extend(_self,w) end ----@package ---@param _self U8Vec3 - ---@return integer function U8Vec3:length_squared(_self) end ----@package ---@param _self U8Vec3 - ---@return I64Vec3 function U8Vec3:as_i64vec3(_self) end ----@package ---@param _self U8Vec3 - ----@return [] +---@return nil function U8Vec3:assert_receiver_is_total_eq(_self) end ----@package ---@param _self U8Vec3 - ---@param rhs I8Vec3 - ---@return U8Vec3 function U8Vec3:saturating_add_signed(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:dot_into_vec(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return BVec3 function U8Vec3:cmplt(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@return I16Vec3 function U8Vec3:as_i16vec3(_self) end ----@package ----@param _self U8Vec3 +---@param p1 U8Vec3 +---@param p2 U8Vec3 +---@return U8Vec3 +function U8Vec3:rem(p1,p2) end +---@param _self U8Vec3 ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:wrapping_sub(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param other U8Vec3 - ---@return boolean function U8Vec3:eq(_self,other) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return BVec3 function U8Vec3:cmpge(_self,rhs) end ----@package ----@param _self U8Vec3 +---@param p1 U8Vec3 +---@param p2 integer +---@return U8Vec3 +function U8Vec3:div(p1,p2) end +---@param _self U8Vec3 ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:max(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return BVec3 function U8Vec3:cmple(_self,rhs) end ----@package ---@param v integer - ---@return U8Vec3 function U8Vec3.splat(v) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return BVec3 function U8Vec3:cmpeq(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:min(_self,rhs) end ----@package ---@param a integer[] - ---@return U8Vec3 function U8Vec3.from_array(a) end ----@package ---@param _self U8Vec3 - ---@param rhs U8Vec3 - ---@return U8Vec3 function U8Vec3:sub(_self,rhs) end ----@package ---@param _self U8Vec3 - ---@param min U8Vec3 - ---@param max U8Vec3 - ---@return U8Vec3 function U8Vec3:clamp(_self,min,max) end +---@param p1 U8Vec3 +---@param p2 U8Vec3 +---@return U8Vec3 +function U8Vec3:div(p1,p2) end + +---@param p1 U8Vec3 +---@param p2 U8Vec3 +---@return U8Vec3 +function U8Vec3:sub(p1,p2) end ----@class U8Vec4 +---@class U8Vec4 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer ---@field w ? integer U8Vec4 = {} ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:max(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:saturating_mul(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return U16Vec4 function U8Vec4:as_u16vec4(_self) end ----@package ---@param _self U8Vec4 - ---@param other U8Vec4 - ---@return boolean function U8Vec4:eq(_self,other) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:add(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param rhs I8Vec4 - ---@return U8Vec4 function U8Vec4:wrapping_add_signed(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:dot_into_vec(_self,rhs) end ----@package ----@param _self U8Vec4 +---@param p1 U8Vec4 +---@param p2 U8Vec4 +---@return U8Vec4 +function U8Vec4:sub(p1,p2) end +---@param _self U8Vec4 ---@return I8Vec4 function U8Vec4:as_i8vec4(_self) end ----@package ---@param _self U8Vec4 - ---@return U8Vec3 function U8Vec4:truncate(_self) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:div(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@param w integer - ---@return U8Vec4 function U8Vec4.new(x,y,z,w) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return BVec4 function U8Vec4:cmpeq(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return integer[] function U8Vec4:to_array(_self) end ----@package ----@param _self U8Vec4 +---@param p1 U8Vec4 +---@param p2 U8Vec4 +---@return U8Vec4 +function U8Vec4:add(p1,p2) end +---@param _self U8Vec4 ---@param x integer - ---@return U8Vec4 function U8Vec4:with_x(_self,x) end ----@package ---@param _self U8Vec4 - ---@param rhs I8Vec4 - ---@return U8Vec4 function U8Vec4:saturating_add_signed(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return BVec4 function U8Vec4:cmpgt(_self,rhs) end ----@package ---@param a integer[] - ---@return U8Vec4 function U8Vec4.from_array(a) end ----@package ----@param _self U8Vec4 +---@param p1 U8Vec4 +---@param p2 integer +---@return U8Vec4 +function U8Vec4:sub(p1,p2) end +---@param _self U8Vec4 ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:saturating_sub(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return IVec4 function U8Vec4:as_ivec4(_self) end ----@package ----@param _self U8Vec4 +---@param p1 U8Vec4 +---@param p2 integer +---@return U8Vec4 +function U8Vec4:add(p1,p2) end +---@param _self U8Vec4 ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:wrapping_add(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param min U8Vec4 - ---@param max U8Vec4 - ---@return U8Vec4 function U8Vec4:clamp(_self,min,max) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:wrapping_mul(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param z integer - ---@return U8Vec4 function U8Vec4:with_z(_self,z) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:wrapping_sub(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return integer function U8Vec4:element_product(_self) end ----@package ----@param _self U8Vec4 +---@param p1 U8Vec4 +---@param p2 integer +---@return U8Vec4 +function U8Vec4:div(p1,p2) end +---@param _self U8Vec4 ---@param rhs U8Vec4 - ---@return integer function U8Vec4:dot(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:wrapping_div(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return UVec4 function U8Vec4:as_uvec4(_self) end ----@package ---@param _self U8Vec4 - ---@return integer function U8Vec4:element_sum(_self) end ----@package ---@param v integer - ---@return U8Vec4 function U8Vec4.splat(v) end ----@package ---@param mask BVec4 - ---@param if_true U8Vec4 - ---@param if_false U8Vec4 - ---@return U8Vec4 function U8Vec4.select(mask,if_true,if_false) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:sub(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return integer function U8Vec4:max_element(_self) end ----@package ---@param _self U8Vec4 - ---@param w integer - ---@return U8Vec4 function U8Vec4:with_w(_self,w) end ----@package ---@param _self U8Vec4 - ---@return integer function U8Vec4:min_element(_self) end ----@package ---@param _self U8Vec4 - ----@return [] +---@return nil function U8Vec4:assert_receiver_is_total_eq(_self) end ----@package ----@param _self U8Vec4 +---@param p1 U8Vec4 +---@param p2 integer +---@return U8Vec4 +function U8Vec4:rem(p1,p2) end +---@param _self U8Vec4 ---@param rhs U8Vec4 - ---@return BVec4 function U8Vec4:cmpge(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:mul(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return BVec4 function U8Vec4:cmpne(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return BVec4 function U8Vec4:cmplt(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return integer function U8Vec4:length_squared(_self) end ----@package ---@param _self U8Vec4 - ---@return I64Vec4 function U8Vec4:as_i64vec4(_self) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:saturating_add(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:rem(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return U8Vec4 function U8Vec4:clone(_self) end ----@package ----@param _self U8Vec4 +---@param p1 U8Vec4 +---@param p2 integer +---@return U8Vec4 +function U8Vec4:mul(p1,p2) end ----@param y integer +---@param p1 U8Vec4 +---@param p2 U8Vec4 +---@return U8Vec4 +function U8Vec4:rem(p1,p2) end +---@param _self U8Vec4 +---@param y integer ---@return U8Vec4 function U8Vec4:with_y(_self,y) end ----@package ----@param _self U8Vec4 +---@param p1 U8Vec4 +---@param p2 U8Vec4 +---@return U8Vec4 +function U8Vec4:div(p1,p2) end +---@param _self U8Vec4 ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:min(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return DVec4 function U8Vec4:as_dvec4(_self) end ----@package ----@param _self U8Vec4 +---@param p1 U8Vec4 +---@param p2 U8Vec4 +---@return U8Vec4 +function U8Vec4:mul(p1,p2) end +---@param _self U8Vec4 ---@return Vec4 function U8Vec4:as_vec4(_self) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return U8Vec4 function U8Vec4:saturating_div(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return I16Vec4 function U8Vec4:as_i16vec4(_self) end ----@package ---@param _self U8Vec4 - ---@param rhs U8Vec4 - ---@return BVec4 function U8Vec4:cmple(_self,rhs) end ----@package ---@param _self U8Vec4 - ---@return U64Vec4 function U8Vec4:as_u64vec4(_self) end ----@class UVec2 - +---@class UVec2 : ReflectReference ---@field x ? integer ---@field y ? integer UVec2 = {} ----@package ----@param _self UVec2 +---@param p1 UVec2 +---@param p2 UVec2 +---@return UVec2 +function UVec2:add(p1,p2) end +---@param _self UVec2 ---@param rhs UVec2 - ---@return BVec2 function UVec2:cmpeq(_self,rhs) end ----@package ---@param _self UVec2 - ---@param rhs IVec2 - ---@return UVec2 function UVec2:saturating_add_signed(_self,rhs) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:mul(_self,rhs) end ----@package ---@param _self UVec2 - ---@return U64Vec2 function UVec2:as_u64vec2(_self) end ----@package ---@param _self UVec2 - ---@return I16Vec2 function UVec2:as_i16vec2(_self) end ----@package ---@param _self UVec2 - ---@return integer function UVec2:element_sum(_self) end ----@package ---@param _self UVec2 - ---@return integer function UVec2:length_squared(_self) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:wrapping_add(_self,rhs) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return BVec2 function UVec2:cmplt(_self,rhs) end ----@package ---@param _self UVec2 - ---@return U16Vec2 function UVec2:as_u16vec2(_self) end ----@package ----@param _self UVec2 +---@param p1 UVec2 +---@param p2 integer +---@return UVec2 +function UVec2:add(p1,p2) end ----@param rhs UVec2 +---@param p1 UVec2 +---@param p2 integer +---@return UVec2 +function UVec2:div(p1,p2) end +---@param _self UVec2 +---@param rhs UVec2 ---@return UVec2 function UVec2:saturating_div(_self,rhs) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return BVec2 function UVec2:cmple(_self,rhs) end ----@package ---@param v integer - ---@return UVec2 function UVec2.splat(v) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:sub(_self,rhs) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return BVec2 function UVec2:cmpgt(_self,rhs) end ----@package ---@param _self UVec2 - ---@return integer[] function UVec2:to_array(_self) end ----@package ----@param _self UVec2 +---@param p1 UVec2 +---@param p2 integer +---@return UVec2 +function UVec2:mul(p1,p2) end +---@param _self UVec2 ---@param rhs UVec2 - ---@return UVec2 function UVec2:max(_self,rhs) end ----@package ---@param _self UVec2 - ---@return integer function UVec2:max_element(_self) end ----@package ---@param _self UVec2 - ---@param rhs IVec2 - ---@return UVec2 function UVec2:wrapping_add_signed(_self,rhs) end ----@package ---@param _self UVec2 - ---@param y integer - ---@return UVec2 function UVec2:with_y(_self,y) end ----@package ---@param _self UVec2 - ---@return IVec2 function UVec2:as_ivec2(_self) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return BVec2 function UVec2:cmpge(_self,rhs) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:wrapping_sub(_self,rhs) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:min(_self,rhs) end ----@package ----@param _self UVec2 +---@param p1 UVec2 +---@param p2 UVec2 +---@return UVec2 +function UVec2:sub(p1,p2) end +---@param _self UVec2 ---@param rhs UVec2 - ---@return UVec2 function UVec2:div(_self,rhs) end ----@package ----@param _self UVec2 +---@param p1 UVec2 +---@param p2 UVec2 +---@return UVec2 +function UVec2:rem(p1,p2) end ----@param rhs UVec2 +---@param p1 UVec2 +---@param p2 integer +---@return UVec2 +function UVec2:sub(p1,p2) end +---@param _self UVec2 +---@param rhs UVec2 ---@return UVec2 function UVec2:add(_self,rhs) end ----@package ----@param _self UVec2 +---@param p1 UVec2 +---@param p2 UVec2 +---@return UVec2 +function UVec2:div(p1,p2) end +---@param _self UVec2 ---@return U8Vec2 function UVec2:as_u8vec2(_self) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:saturating_add(_self,rhs) end ----@package ---@param _self UVec2 - ---@return Vec2 function UVec2:as_vec2(_self) end ----@package ---@param _self UVec2 - ---@return DVec2 function UVec2:as_dvec2(_self) end ----@package ---@param _self UVec2 - ---@return integer function UVec2:element_product(_self) end ----@package ----@param _self UVec2 +---@param p1 UVec2 +---@param p2 integer +---@return UVec2 +function UVec2:rem(p1,p2) end +---@param _self UVec2 ---@param rhs UVec2 - ---@return UVec2 function UVec2:wrapping_div(_self,rhs) end ----@package ---@param a integer[] - ---@return UVec2 function UVec2.from_array(a) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return BVec2 function UVec2:cmpne(_self,rhs) end ----@package ----@param _self UVec2 +---@param p1 UVec2 +---@param p2 UVec2 +---@return UVec2 +function UVec2:mul(p1,p2) end +---@param _self UVec2 ---@return I8Vec2 function UVec2:as_i8vec2(_self) end ----@package ---@param _self UVec2 - ---@return integer function UVec2:min_element(_self) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:dot_into_vec(_self,rhs) end ----@package ---@param _self UVec2 - ---@param other UVec2 - ---@return boolean function UVec2:eq(_self,other) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:saturating_mul(_self,rhs) end ----@package ---@param _self UVec2 - ---@param z integer - ---@return UVec3 function UVec2:extend(_self,z) end ----@package ---@param _self UVec2 - ---@return I64Vec2 function UVec2:as_i64vec2(_self) end ----@package ---@param mask BVec2 - ---@param if_true UVec2 - ---@param if_false UVec2 - ---@return UVec2 function UVec2.select(mask,if_true,if_false) end ----@package ---@param _self UVec2 - ---@param x integer - ---@return UVec2 function UVec2:with_x(_self,x) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return integer function UVec2:dot(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@return UVec2 function UVec2.new(x,y) end ----@package ---@param _self UVec2 - ----@return [] +---@return nil function UVec2:assert_receiver_is_total_eq(_self) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:rem(_self,rhs) end ----@package ---@param _self UVec2 - ---@param min UVec2 - ---@param max UVec2 - ---@return UVec2 function UVec2:clamp(_self,min,max) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:wrapping_mul(_self,rhs) end ----@package ---@param _self UVec2 - ---@return UVec2 function UVec2:clone(_self) end ----@package ---@param _self UVec2 - ---@param rhs UVec2 - ---@return UVec2 function UVec2:saturating_sub(_self,rhs) end ----@class UVec3 - +---@class UVec3 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer UVec3 = {} ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:rem(_self,rhs) end ----@package ---@param _self UVec3 - ---@param z integer - ---@return UVec3 function UVec3:with_z(_self,z) end ----@package ---@param _self UVec3 - ---@return Vec3 function UVec3:as_vec3(_self) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:saturating_div(_self,rhs) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:saturating_sub(_self,rhs) end ----@package ---@param _self UVec3 - ---@return I64Vec3 function UVec3:as_i64vec3(_self) end ----@package ---@param _self UVec3 - ---@return integer function UVec3:min_element(_self) end ----@package ---@param _self UVec3 - ---@return Vec3A function UVec3:as_vec3a(_self) end ----@package ---@param _self UVec3 - ---@param min UVec3 - ---@param max UVec3 - ---@return UVec3 function UVec3:clamp(_self,min,max) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:saturating_mul(_self,rhs) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return BVec3 function UVec3:cmple(_self,rhs) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:dot_into_vec(_self,rhs) end ----@package ---@param _self UVec3 - ---@return DVec3 function UVec3:as_dvec3(_self) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return BVec3 function UVec3:cmplt(_self,rhs) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:min(_self,rhs) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:sub(_self,rhs) end ----@package ---@param _self UVec3 - ---@return IVec3 function UVec3:as_ivec3(_self) end ----@package ----@param _self UVec3 +---@param p1 UVec3 +---@param p2 integer +---@return UVec3 +function UVec3:div(p1,p2) end +---@param _self UVec3 ---@return UVec2 function UVec3:truncate(_self) end ----@package ---@param _self UVec3 - ---@return I8Vec3 function UVec3:as_i8vec3(_self) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return BVec3 function UVec3:cmpgt(_self,rhs) end ----@package ----@param _self UVec3 +---@param p1 UVec3 +---@param p2 UVec3 +---@return UVec3 +function UVec3:rem(p1,p2) end +---@param _self UVec3 ---@return integer[] function UVec3:to_array(_self) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return BVec3 function UVec3:cmpne(_self,rhs) end ----@package ---@param x integer - ---@param y integer - ---@param z integer - ---@return UVec3 function UVec3.new(x,y,z) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:max(_self,rhs) end ----@package ---@param _self UVec3 - ---@return integer function UVec3:length_squared(_self) end ----@package ---@param _self UVec3 - ---@param rhs IVec3 - ---@return UVec3 function UVec3:saturating_add_signed(_self,rhs) end ----@package ----@param a integer[] +---@param p1 UVec3 +---@param p2 UVec3 +---@return UVec3 +function UVec3:sub(p1,p2) end +---@param a integer[] ---@return UVec3 function UVec3.from_array(a) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:cross(_self,rhs) end ----@package ---@param _self UVec3 - ---@param other UVec3 - ---@return boolean function UVec3:eq(_self,other) end ----@package ----@param _self UVec3 +---@param p1 UVec3 +---@param p2 UVec3 +---@return UVec3 +function UVec3:div(p1,p2) end +---@param _self UVec3 ---@param w integer - ---@return UVec4 function UVec3:extend(_self,w) end ----@package ----@param _self UVec3 +---@param p1 UVec3 +---@param p2 integer +---@return UVec3 +function UVec3:rem(p1,p2) end +---@param _self UVec3 ---@param x integer - ---@return UVec3 function UVec3:with_x(_self,x) end ----@package ----@param _self UVec3 +---@param p1 UVec3 +---@param p2 integer +---@return UVec3 +function UVec3:sub(p1,p2) end +---@param _self UVec3 ---@return integer function UVec3:max_element(_self) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:wrapping_div(_self,rhs) end ----@package ---@param _self UVec3 - ---@return U64Vec3 function UVec3:as_u64vec3(_self) end ----@package ----@param _self UVec3 +---@param p1 UVec3 +---@param p2 integer +---@return UVec3 +function UVec3:mul(p1,p2) end +---@param _self UVec3 ---@param rhs UVec3 - ---@return UVec3 function UVec3:wrapping_add(_self,rhs) end ----@package ---@param v integer - ---@return UVec3 function UVec3.splat(v) end ----@package ---@param _self UVec3 - ---@return U16Vec3 function UVec3:as_u16vec3(_self) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:wrapping_sub(_self,rhs) end ----@package ---@param _self UVec3 - ---@param y integer - ---@return UVec3 function UVec3:with_y(_self,y) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return BVec3 function UVec3:cmpeq(_self,rhs) end ----@package ---@param _self UVec3 - ----@return [] +---@return nil function UVec3:assert_receiver_is_total_eq(_self) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return integer function UVec3:dot(_self,rhs) end ----@package ---@param mask BVec3 - ---@param if_true UVec3 - ---@param if_false UVec3 - ---@return UVec3 function UVec3.select(mask,if_true,if_false) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:mul(_self,rhs) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:saturating_add(_self,rhs) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return BVec3 function UVec3:cmpge(_self,rhs) end ----@package ---@param _self UVec3 - ---@return integer function UVec3:element_sum(_self) end ----@package ----@param _self UVec3 +---@param p1 UVec3 +---@param p2 UVec3 +---@return UVec3 +function UVec3:mul(p1,p2) end +---@param _self UVec3 ---@param rhs IVec3 - ---@return UVec3 function UVec3:wrapping_add_signed(_self,rhs) end ----@package ----@param _self UVec3 +---@param p1 UVec3 +---@param p2 UVec3 +---@return UVec3 +function UVec3:add(p1,p2) end +---@param _self UVec3 ---@return I16Vec3 function UVec3:as_i16vec3(_self) end ----@package ---@param _self UVec3 - ---@return U8Vec3 function UVec3:as_u8vec3(_self) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:add(_self,rhs) end ----@package ----@param _self UVec3 +---@param p1 UVec3 +---@param p2 integer +---@return UVec3 +function UVec3:add(p1,p2) end +---@param _self UVec3 ---@return UVec3 function UVec3:clone(_self) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:div(_self,rhs) end ----@package ---@param _self UVec3 - ---@param rhs UVec3 - ---@return UVec3 function UVec3:wrapping_mul(_self,rhs) end ----@package ---@param _self UVec3 - ---@return integer function UVec3:element_product(_self) end ----@class UVec4 - +---@class UVec4 : ReflectReference ---@field x ? integer ---@field y ? integer ---@field z ? integer ---@field w ? integer UVec4 = {} ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return BVec4 function UVec4:cmpne(_self,rhs) end ----@package ---@param _self UVec4 - ---@return integer function UVec4:element_product(_self) end ----@package ----@param x integer +---@param p1 UVec4 +---@param p2 integer +---@return UVec4 +function UVec4:rem(p1,p2) end +---@param x integer ---@param y integer - ---@param z integer - ---@param w integer - ---@return UVec4 function UVec4.new(x,y,z,w) end ----@package ---@param _self UVec4 - ---@return UVec4 function UVec4:clone(_self) end ----@package ---@param _self UVec4 - ---@param rhs IVec4 - ---@return UVec4 function UVec4:wrapping_add_signed(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return BVec4 function UVec4:cmple(_self,rhs) end ----@package ----@param _self UVec4 +---@param p1 UVec4 +---@param p2 UVec4 +---@return UVec4 +function UVec4:add(p1,p2) end +---@param _self UVec4 ---@param x integer - ---@return UVec4 function UVec4:with_x(_self,x) end ----@package ----@param _self UVec4 +---@param p1 UVec4 +---@param p2 integer +---@return UVec4 +function UVec4:sub(p1,p2) end +---@param _self UVec4 ---@param rhs UVec4 - ---@return BVec4 function UVec4:cmpge(_self,rhs) end ----@package ---@param _self UVec4 - ---@param other UVec4 - ---@return boolean function UVec4:eq(_self,other) end ----@package ---@param _self UVec4 - ---@return IVec4 function UVec4:as_ivec4(_self) end ----@package ---@param _self UVec4 - ---@return integer function UVec4:length_squared(_self) end ----@package ---@param _self UVec4 - ---@return U16Vec4 function UVec4:as_u16vec4(_self) end ----@package ---@param _self UVec4 - ---@param min UVec4 - ---@param max UVec4 - ---@return UVec4 function UVec4:clamp(_self,min,max) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:min(_self,rhs) end ----@package ---@param _self UVec4 - ---@return DVec4 function UVec4:as_dvec4(_self) end ----@package ---@param _self UVec4 - ----@return [] +---@return nil function UVec4:assert_receiver_is_total_eq(_self) end ----@package ---@param _self UVec4 - ---@return U64Vec4 function UVec4:as_u64vec4(_self) end ----@package ---@param _self UVec4 - ---@return I8Vec4 function UVec4:as_i8vec4(_self) end ----@package ---@param v integer - ---@return UVec4 function UVec4.splat(v) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:saturating_mul(_self,rhs) end ----@package ---@param _self UVec4 - ---@param w integer - ---@return UVec4 function UVec4:with_w(_self,w) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:sub(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:wrapping_div(_self,rhs) end ----@package ---@param a integer[] - ---@return UVec4 function UVec4.from_array(a) end ----@package ---@param _self UVec4 - ---@return integer function UVec4:element_sum(_self) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return BVec4 function UVec4:cmpgt(_self,rhs) end ----@package ---@param _self UVec4 - ---@param z integer - ---@return UVec4 function UVec4:with_z(_self,z) end ----@package ---@param _self UVec4 - ---@return integer function UVec4:max_element(_self) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:max(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:rem(_self,rhs) end ----@package ----@param _self UVec4 +---@param p1 UVec4 +---@param p2 UVec4 +---@return UVec4 +function UVec4:rem(p1,p2) end +---@param _self UVec4 ---@param rhs UVec4 - ---@return UVec4 function UVec4:mul(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return BVec4 function UVec4:cmpeq(_self,rhs) end ----@package ---@param _self UVec4 - ---@return I64Vec4 function UVec4:as_i64vec4(_self) end ----@package ----@param _self UVec4 +---@param p1 UVec4 +---@param p2 UVec4 +---@return UVec4 +function UVec4:div(p1,p2) end +---@param _self UVec4 ---@return integer[] function UVec4:to_array(_self) end ----@package ---@param _self UVec4 - ---@return I16Vec4 function UVec4:as_i16vec4(_self) end ----@package ---@param _self UVec4 - ---@return integer function UVec4:min_element(_self) end ----@package ---@param _self UVec4 - ---@return Vec4 function UVec4:as_vec4(_self) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return integer function UVec4:dot(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:wrapping_mul(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:saturating_sub(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs IVec4 - ---@return UVec4 function UVec4:saturating_add_signed(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:dot_into_vec(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:div(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:saturating_div(_self,rhs) end ----@package ---@param _self UVec4 - ---@param y integer - ---@return UVec4 function UVec4:with_y(_self,y) end ----@package ---@param mask BVec4 - ---@param if_true UVec4 - ---@param if_false UVec4 - ---@return UVec4 function UVec4.select(mask,if_true,if_false) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return BVec4 function UVec4:cmplt(_self,rhs) end ----@package ----@param _self UVec4 +---@param p1 UVec4 +---@param p2 integer +---@return UVec4 +function UVec4:div(p1,p2) end +---@param _self UVec4 ---@param rhs UVec4 - ---@return UVec4 function UVec4:saturating_add(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:wrapping_sub(_self,rhs) end ----@package ---@param _self UVec4 - ---@param rhs UVec4 - ---@return UVec4 function UVec4:add(_self,rhs) end ----@package ----@param _self UVec4 +---@param p1 UVec4 +---@param p2 integer +---@return UVec4 +function UVec4:add(p1,p2) end +---@param _self UVec4 ---@return UVec3 function UVec4:truncate(_self) end ----@package ----@param _self UVec4 +---@param p1 UVec4 +---@param p2 UVec4 +---@return UVec4 +function UVec4:mul(p1,p2) end +---@param _self UVec4 ---@return U8Vec4 function UVec4:as_u8vec4(_self) end ----@package ----@param _self UVec4 +---@param p1 UVec4 +---@param p2 UVec4 +---@return UVec4 +function UVec4:sub(p1,p2) end +---@param _self UVec4 ---@param rhs UVec4 - ---@return UVec4 function UVec4:wrapping_add(_self,rhs) end +---@param p1 UVec4 +---@param p2 integer +---@return UVec4 +function UVec4:mul(p1,p2) end ----@class Vec2 +---@class Vec2 : ReflectReference ---@field x ? number ---@field y ? number Vec2 = {} ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return BVec2 function Vec2:cmpeq(_self,rhs) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:fract(_self) end ----@package ---@param _self Vec2 - ---@param max number - ---@return Vec2 function Vec2:clamp_length_max(_self,max) end ----@package ---@param a number[] - ---@return Vec2 function Vec2.from_array(a) end ----@package ---@param _self Vec2 - ---@return integer function Vec2:is_negative_bitmask(_self) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:clone(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:project_onto_normalized(_self,rhs) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:div(_self,rhs) end ----@package ---@param _self Vec2 - ---@param min Vec2 - ---@param max Vec2 - ---@return Vec2 function Vec2:clamp(_self,min,max) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@param s number - ---@return Vec2 function Vec2:lerp(_self,rhs,s) end ----@package ---@param _self Vec2 - ---@return number function Vec2:element_sum(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:div_euclid(_self,rhs) end ----@package ---@param angle number - ---@return Vec2 function Vec2.from_angle(angle) end ----@package ---@param _self Vec2 - ---@param normal Vec2 - ---@param eta number - ---@return Vec2 function Vec2:refract(_self,normal,eta) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@param max_angle number - ---@return Vec2 function Vec2:rotate_towards(_self,rhs,max_angle) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:mul(_self,rhs) end ----@package ---@param _self Vec2 - ---@return U64Vec2 function Vec2:as_u64vec2(_self) end ----@package ---@param _self Vec2 - ---@return number function Vec2:max_element(_self) end ----@package ---@param _self Vec2 - ---@param other Vec2 - ---@return boolean function Vec2:eq(_self,other) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return BVec2 function Vec2:cmpgt(_self,rhs) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:trunc(_self) end ----@package ---@param _self Vec2 - ---@return BVec2 function Vec2:is_nan_mask(_self) end ----@package ---@param _self Vec2 - ---@param y number - ---@return Vec2 function Vec2:with_y(_self,y) end ----@package ---@param _self Vec2 - ---@param x number - ---@return Vec2 function Vec2:with_x(_self,x) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:recip(_self) end ----@package ---@param _self Vec2 - ---@return boolean function Vec2:is_nan(_self) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:signum(_self) end ----@package ----@param _self Vec2 +---@param p1 Vec2 +---@param p2 number +---@return Vec2 +function Vec2:rem(p1,p2) end +---@param _self Vec2 ---@param rhs Vec2 - ---@return Vec2 function Vec2:project_onto(_self,rhs) end ----@package ---@param _self Vec2 - ---@param z number - ---@return Vec3 function Vec2:extend(_self,z) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:midpoint(_self,rhs) end ----@package ---@param _self Vec2 - ---@return U8Vec2 function Vec2:as_u8vec2(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return number function Vec2:dot(_self,rhs) end ----@package ---@param _self Vec2 - ---@return UVec2 function Vec2:as_uvec2(_self) end ----@package ---@param _self Vec2 - ---@return BVec2 function Vec2:is_finite_mask(_self) end ----@package ---@param _self Vec2 - ---@param n number - ---@return Vec2 function Vec2:powf(_self,n) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:normalize_or_zero(_self) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:round(_self) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:perp(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return BVec2 function Vec2:cmplt(_self,rhs) end ----@package ---@param _self Vec2 - ---@param min number - ---@param max number - ---@return Vec2 function Vec2:clamp_length(_self,min,max) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return BVec2 function Vec2:cmpge(_self,rhs) end ----@package ---@param _self Vec2 - ---@return number function Vec2:to_angle(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:rotate(_self,rhs) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:dot_into_vec(_self,rhs) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:exp(_self) end ----@package ----@param _self Vec2 +---@param p1 Vec2 +---@param p2 Vec2 +---@return Vec2 +function Vec2:rem(p1,p2) end +---@param _self Vec2 ---@param normal Vec2 - ---@return Vec2 function Vec2:reflect(_self,normal) end ----@package ----@param _self Vec2 +---@param p1 Vec2 +---@param p2 number +---@return Vec2 +function Vec2:div(p1,p2) end +---@param _self Vec2 ---@param rhs Vec2 - ---@return Vec2 function Vec2:add(_self,rhs) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:neg(_self) end ----@package ----@param mask BVec2 +---@param p1 Vec2 +---@param p2 Vec2 +---@return Vec2 +function Vec2:sub(p1,p2) end +---@param mask BVec2 ---@param if_true Vec2 - ---@param if_false Vec2 - ---@return Vec2 function Vec2.select(mask,if_true,if_false) end ----@package ---@param _self Vec2 - ---@return U16Vec2 function Vec2:as_u16vec2(_self) end ----@package ----@param _self Vec2 +---@param p1 Vec2 +---@param p2 number +---@return Vec2 +function Vec2:sub(p1,p2) end ----@param rhs Vec2 +---@param p1 Vec2 +---@param p2 number +---@return Vec2 +function Vec2:mul(p1,p2) end +---@param _self Vec2 +---@param rhs Vec2 ---@return Vec2 function Vec2:rem_euclid(_self,rhs) end ----@package ----@param _self Vec2 +---@param p1 Vec2 +---@param p2 Vec2 +---@return Vec2 +function Vec2:mul(p1,p2) end +---@param _self Vec2 ---@param rhs Vec2 - ---@return number function Vec2:distance_squared(_self,rhs) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:ceil(_self) end ----@package ---@param _self Vec2 - ---@return number function Vec2:length_squared(_self) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:floor(_self) end ----@package ---@param _self Vec2 - ---@return DVec2 function Vec2:as_dvec2(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:max(_self,rhs) end ----@package ---@param _self Vec2 - ---@return boolean function Vec2:is_finite(_self) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:abs(_self) end ----@package ---@param _self Vec2 - ---@param a Vec2 - ---@param b Vec2 - ---@return Vec2 function Vec2:mul_add(_self,a,b) end ----@package ---@param _self Vec2 - ---@param fallback Vec2 - ---@return Vec2 function Vec2:normalize_or(_self,fallback) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:reject_from(_self,rhs) end ----@package ----@param _self Vec2 +---@param p1 Vec2 +---@param p2 number +---@return Vec2 +function Vec2:add(p1,p2) end +---@param _self Vec2 ---@param rhs Vec2 - ---@return number function Vec2:angle_to(_self,rhs) end ----@package ----@param _self Vec2 +---@param p1 Vec2 +---@param p2 Vec2 +---@return Vec2 +function Vec2:div(p1,p2) end +---@param _self Vec2 ---@return I16Vec2 function Vec2:as_i16vec2(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return number function Vec2:distance(_self,rhs) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:fract_gl(_self) end ----@package ---@param _self Vec2 - ---@return number function Vec2:length_recip(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:sub(_self,rhs) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return number function Vec2:angle_between(_self,rhs) end ----@package ---@param _self Vec2 - ---@return number function Vec2:min_element(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:copysign(_self,rhs) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:rem(_self,rhs) end ----@package ---@param _self Vec2 - ---@return IVec2 function Vec2:as_ivec2(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return BVec2 function Vec2:cmpne(_self,rhs) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:reject_from_normalized(_self,rhs) end ----@package ---@param _self Vec2 - ---@return boolean function Vec2:is_normalized(_self) end ----@package ---@param _self Vec2 - ---@return number function Vec2:element_product(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@param d number - ---@return Vec2 function Vec2:move_towards(_self,rhs,d) end ----@package ---@param v number - ---@return Vec2 function Vec2.splat(v) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return Vec2 function Vec2:min(_self,rhs) end ----@package ----@param _self Vec2 +---@param p1 Vec2 +---@param p2 Vec2 +---@return Vec2 +function Vec2:add(p1,p2) end +---@param _self Vec2 ---@return I8Vec2 function Vec2:as_i8vec2(_self) end ----@package ---@param _self Vec2 - ---@return I64Vec2 function Vec2:as_i64vec2(_self) end ----@package ---@param _self Vec2 - ---@return number function Vec2:length(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return number function Vec2:perp_dot(_self,rhs) end ----@package ---@param _self Vec2 - ---@param min number - ---@return Vec2 function Vec2:clamp_length_min(_self,min) end ----@package ---@param x number - ---@param y number - ---@return Vec2 function Vec2.new(x,y) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@param max_abs_diff number - ---@return boolean function Vec2:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self Vec2 - ---@return Vec2 function Vec2:normalize(_self) end ----@package ---@param _self Vec2 - ---@param rhs Vec2 - ---@return BVec2 function Vec2:cmple(_self,rhs) end ----@package ---@param _self Vec2 - ---@return number[] function Vec2:to_array(_self) end ----@class Vec3 - +---@class Vec3 : ReflectReference ---@field x ? number ---@field y ? number ---@field z ? number Vec3 = {} ----@package ---@param _self Vec3 - ---@return integer function Vec3:is_negative_bitmask(_self) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:clone(_self) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:ceil(_self) end ----@package ---@param _self Vec3 - ---@return number function Vec3:max_element(_self) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:min(_self,rhs) end ----@package ---@param _self Vec3 - ---@param a Vec3 - ---@param b Vec3 - ---@return Vec3 function Vec3:mul_add(_self,a,b) end ----@package ---@param v number - ---@return Vec3 function Vec3.splat(v) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:any_orthogonal_vector(_self) end ----@package ---@param _self Vec3 - ---@return I64Vec3 function Vec3:as_i64vec3(_self) end ----@package ---@param _self Vec3 - ---@return boolean function Vec3:is_finite(_self) end ----@package ---@param _self Vec3 - ---@return number[] function Vec3:to_array(_self) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:copysign(_self,rhs) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@param s number - ---@return Vec3 function Vec3:lerp(_self,rhs,s) end ----@package ----@param _self Vec3 +---@param p1 Vec3 +---@param p2 Vec3 +---@return Vec3 +function Vec3:rem(p1,p2) end +---@param _self Vec3 ---@param fallback Vec3 - ---@return Vec3 function Vec3:normalize_or(_self,fallback) end ----@package ---@param _self Vec3 - ---@return number function Vec3:length(_self) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:floor(_self) end ----@package ---@param _self Vec3 - ---@return number function Vec3:element_product(_self) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:normalize_or_zero(_self) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@param d number - ---@return Vec3 function Vec3:move_towards(_self,rhs,d) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return number function Vec3:angle_between(_self,rhs) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return BVec3 function Vec3:cmplt(_self,rhs) end ----@package ----@param _self Vec3 +---@param p1 Vec3 +---@param p2 number +---@return Vec3 +function Vec3:sub(p1,p2) end +---@param _self Vec3 ---@param rhs Vec3 - ---@return Vec3 function Vec3:mul(_self,rhs) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@param max_abs_diff number - ---@return boolean function Vec3:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return BVec3 function Vec3:cmpge(_self,rhs) end ----@package ---@param _self Vec3 - ---@param min number - ---@param max number - ---@return Vec3 function Vec3:clamp_length(_self,min,max) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:div(_self,rhs) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:midpoint(_self,rhs) end ----@package ---@param _self Vec3 - ---@return boolean function Vec3:is_nan(_self) end ----@package ----@param _self Vec3 +---@param p1 Vec3 +---@param p2 number +---@return Vec3 +function Vec3:mul(p1,p2) end +---@param _self Vec3 ---@return BVec3 function Vec3:is_nan_mask(_self) end ----@package ---@param _self Vec3 - ---@return U64Vec3 function Vec3:as_u64vec3(_self) end ----@package ---@param _self Vec3 - ---@return BVec3 function Vec3:is_finite_mask(_self) end ----@package ---@param _self Vec3 - ---@param w number - ---@return Vec4 function Vec3:extend(_self,w) end ----@package ---@param _self Vec3 - ---@param normal Vec3 - ---@param eta number - ---@return Vec3 function Vec3:refract(_self,normal,eta) end ----@package ---@param _self Vec3 - ---@param min number - ---@return Vec3 function Vec3:clamp_length_min(_self,min) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:rem_euclid(_self,rhs) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:neg(_self) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:fract(_self) end ----@package ----@param _self Vec3 +---@param p1 Vec3 +---@param p2 Vec3 +---@return Vec3 +function Vec3:mul(p1,p2) end +---@param _self Vec3 ---@param rhs Vec3 - ---@return number function Vec3:distance(_self,rhs) end ----@package ---@param _self Vec3 - ---@return UVec3 function Vec3:as_uvec3(_self) end ----@package ---@param _self Vec3 - ---@return boolean function Vec3:is_normalized(_self) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:cross(_self,rhs) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:signum(_self) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:fract_gl(_self) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:recip(_self) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:sub(_self,rhs) end ----@package ----@param a number[] +---@param p1 Vec3 +---@param p2 Vec3 +---@return Vec3 +function Vec3:sub(p1,p2) end + +---@param p1 Vec3 +---@param p2 number +---@return Vec3 +function Vec3:rem(p1,p2) end +---@param a number[] ---@return Vec3 function Vec3.from_array(a) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:round(_self) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@return Vec3 function Vec3.new(x,y,z) end ----@package ---@param _self Vec3 - ---@return U16Vec3 function Vec3:as_u16vec3(_self) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:add(_self,rhs) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return BVec3 function Vec3:cmpne(_self,rhs) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return BVec3 function Vec3:cmpgt(_self,rhs) end ----@package ----@param _self Vec3 +---@param p1 Vec3 +---@param p2 number +---@return Vec3 +function Vec3:add(p1,p2) end +---@param _self Vec3 ---@return number function Vec3:length_squared(_self) end ----@package ---@param _self Vec3 - ---@return number function Vec3:element_sum(_self) end ----@package ---@param _self Vec3 - ---@return IVec3 function Vec3:as_ivec3(_self) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:any_orthonormal_vector(_self) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return BVec3 function Vec3:cmple(_self,rhs) end ----@package ----@param mask BVec3 +---@param p1 Vec3 +---@param p2 Vec3 +---@return Vec3 +function Vec3:add(p1,p2) end +---@param mask BVec3 ---@param if_true Vec3 - ---@param if_false Vec3 - ---@return Vec3 function Vec3.select(mask,if_true,if_false) end ----@package ---@param _self Vec3 - ---@param max number - ---@return Vec3 function Vec3:clamp_length_max(_self,max) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:trunc(_self) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:max(_self,rhs) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:abs(_self) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:exp(_self) end ----@package ---@param _self Vec3 - ---@return number function Vec3:length_recip(_self) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:rem(_self,rhs) end ----@package ---@param _self Vec3 - ---@param normal Vec3 - ---@return Vec3 function Vec3:reflect(_self,normal) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:project_onto_normalized(_self,rhs) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return BVec3 function Vec3:cmpeq(_self,rhs) end ----@package ---@param _self Vec3 - ---@return I16Vec3 function Vec3:as_i16vec3(_self) end ----@package ----@param _self Vec3 +---@param p1 Vec3 +---@param p2 number +---@return Vec3 +function Vec3:div(p1,p2) end +---@param _self Vec3 ---@param other Vec3 - ---@return boolean function Vec3:eq(_self,other) end ----@package ---@param _self Vec3 - ---@return I8Vec3 function Vec3:as_i8vec3(_self) end ----@package ----@param _self Vec3 +---@param p1 Vec3 +---@param p2 Vec3 +---@return Vec3 +function Vec3:div(p1,p2) end +---@param _self Vec3 ---@param rhs Vec3 - ---@return number function Vec3:dot(_self,rhs) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:reject_from_normalized(_self,rhs) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:div_euclid(_self,rhs) end ----@package ---@param _self Vec3 - ---@param y number - ---@return Vec3 function Vec3:with_y(_self,y) end ----@package ---@param _self Vec3 - ---@return U8Vec3 function Vec3:as_u8vec3(_self) end ----@package ---@param _self Vec3 - ---@return number function Vec3:min_element(_self) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:project_onto(_self,rhs) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:reject_from(_self,rhs) end ----@package ---@param _self Vec3 - ---@param z number - ---@return Vec3 function Vec3:with_z(_self,z) end ----@package ---@param _self Vec3 - ---@return DVec3 function Vec3:as_dvec3(_self) end ----@package ---@param _self Vec3 - ---@return Vec3 function Vec3:normalize(_self) end ----@package ---@param _self Vec3 - ---@param n number - ---@return Vec3 function Vec3:powf(_self,n) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return number function Vec3:distance_squared(_self,rhs) end ----@package ---@param _self Vec3 - ---@param x number - ---@return Vec3 function Vec3:with_x(_self,x) end ----@package ---@param _self Vec3 - ---@param rhs Vec3 - ---@return Vec3 function Vec3:dot_into_vec(_self,rhs) end ----@package ---@param _self Vec3 - ---@param min Vec3 - ---@param max Vec3 - ---@return Vec3 function Vec3:clamp(_self,min,max) end ----@package ---@param _self Vec3 - ---@return Vec2 function Vec3:truncate(_self) end ----@class Vec3A - +---@class Vec3A : ReflectReference ---@field x ? number ---@field y ? number ---@field z ? number Vec3A = {} ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:copysign(_self,rhs) end ----@package ---@param _self Vec3A - ---@return boolean function Vec3A:is_finite(_self) end ----@package ----@param _self Vec3A +---@param p1 Vec3A +---@param p2 number +---@return Vec3A +function Vec3A:rem(p1,p2) end +---@param _self Vec3A ---@param rhs Vec3A - ---@return number function Vec3A:distance(_self,rhs) end ----@package ---@param _self Vec3A - ---@param min number - ---@return Vec3A function Vec3A:clamp_length_min(_self,min) end ----@package ---@param _self Vec3A - ---@return boolean function Vec3A:is_normalized(_self) end ----@package ---@param _self Vec3A - ---@return I64Vec3 function Vec3A:as_i64vec3(_self) end ----@package ---@param _self Vec3A - ---@return number[] function Vec3A:to_array(_self) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:reject_from_normalized(_self,rhs) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:round(_self) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:max(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:midpoint(_self,rhs) end ----@package ---@param _self Vec3A - ---@return BVec3A function Vec3A:is_finite_mask(_self) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:project_onto_normalized(_self,rhs) end ----@package ---@param _self Vec3A - ---@param y number - ---@return Vec3A function Vec3A:with_y(_self,y) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:div_euclid(_self,rhs) end ----@package ---@param _self Vec3A - ---@param fallback Vec3A - ---@return Vec3A function Vec3A:normalize_or(_self,fallback) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:fract(_self) end ----@package ---@param _self Vec3A - ---@return U16Vec3 function Vec3A:as_u16vec3(_self) end ----@package ----@param a number[] +---@param p1 Vec3A +---@param p2 Vec3A +---@return Vec3A +function Vec3A:mul(p1,p2) end +---@param a number[] ---@return Vec3A function Vec3A.from_array(a) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@param d number - ---@return Vec3A function Vec3A:move_towards(_self,rhs,d) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:cross(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return BVec3A function Vec3A:cmpne(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return BVec3A function Vec3A:cmpeq(_self,rhs) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:neg(_self) end ----@package ---@param _self Vec3A - ---@param normal Vec3A - ---@param eta number - ---@return Vec3A function Vec3A:refract(_self,normal,eta) end ----@package ---@param _self Vec3A - ---@return DVec3 function Vec3A:as_dvec3(_self) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:signum(_self) end ----@package ---@param _self Vec3A - ---@param n number - ---@return Vec3A function Vec3A:powf(_self,n) end ----@package ---@param _self Vec3A - ---@return number function Vec3A:min_element(_self) end ----@package ----@param _self Vec3A +---@param p1 Vec3A +---@param p2 Vec3A +---@return Vec3A +function Vec3A:div(p1,p2) end +---@param _self Vec3A ---@return boolean function Vec3A:is_nan(_self) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:rem_euclid(_self,rhs) end ----@package ---@param _self Vec3A - ---@return number function Vec3A:element_product(_self) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@return Vec3A function Vec3A.new(x,y,z) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:ceil(_self) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:abs(_self) end ----@package ---@param v Vec4 - ---@return Vec3A function Vec3A.from_vec4(v) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:trunc(_self) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:project_onto(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:reject_from(_self,rhs) end ----@package ----@param _self Vec3A +---@param p1 Vec3A +---@param p2 Vec3A +---@return Vec3A +function Vec3A:sub(p1,p2) end +---@param _self Vec3A ---@param rhs Vec3A - ---@return BVec3A function Vec3A:cmpgt(_self,rhs) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:normalize(_self) end ----@package ---@param _self Vec3A - ---@return number function Vec3A:length(_self) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return boolean function Vec3A:eq(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@param max_abs_diff number - ---@return boolean function Vec3A:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self Vec3A - ---@return number function Vec3A:max_element(_self) end ----@package ---@param _self Vec3A - ---@return I8Vec3 function Vec3A:as_i8vec3(_self) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:sub(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return number function Vec3A:angle_between(_self,rhs) end ----@package ---@param _self Vec3A - ---@return I16Vec3 function Vec3A:as_i16vec3(_self) end ----@package ---@param _self Vec3A - ---@param a Vec3A - ---@param b Vec3A - ---@return Vec3A function Vec3A:mul_add(_self,a,b) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:min(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:rem(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:dot_into_vec(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return number function Vec3A:dot(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return BVec3A function Vec3A:cmple(_self,rhs) end ----@package ---@param _self Vec3A - ---@return IVec3 function Vec3A:as_ivec3(_self) end ----@package ----@param _self Vec3A +---@param p1 Vec3A +---@param p2 number +---@return Vec3A +function Vec3A:add(p1,p2) end +---@param _self Vec3A ---@return number function Vec3A:length_squared(_self) end ----@package ----@param _self Vec3A +---@param p1 Vec3A +---@param p2 Vec3A +---@return Vec3A +function Vec3A:add(p1,p2) end +---@param _self Vec3A ---@return number function Vec3A:element_sum(_self) end ----@package ---@param _self Vec3A - ---@param max number - ---@return Vec3A function Vec3A:clamp_length_max(_self,max) end ----@package ---@param _self Vec3A - ---@return BVec3A function Vec3A:is_nan_mask(_self) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:div(_self,rhs) end ----@package ---@param _self Vec3A - ---@return integer function Vec3A:is_negative_bitmask(_self) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:mul(_self,rhs) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:recip(_self) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:any_orthogonal_vector(_self) end ----@package ---@param _self Vec3A - ---@param min Vec3A - ---@param max Vec3A - ---@return Vec3A function Vec3A:clamp(_self,min,max) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return number function Vec3A:distance_squared(_self,rhs) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return BVec3A function Vec3A:cmpge(_self,rhs) end ----@package ---@param _self Vec3A - ---@param w number - ---@return Vec4 function Vec3A:extend(_self,w) end ----@package ---@param _self Vec3A - ---@param x number - ---@return Vec3A function Vec3A:with_x(_self,x) end ----@package ---@param v number - ---@return Vec3A function Vec3A.splat(v) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:any_orthonormal_vector(_self) end ----@package ---@param _self Vec3A - ---@return UVec3 function Vec3A:as_uvec3(_self) end ----@package ----@param _self Vec3A +---@param p1 Vec3A +---@param p2 number +---@return Vec3A +function Vec3A:mul(p1,p2) end +---@param _self Vec3A ---@param rhs Vec3A - ---@param s number - ---@return Vec3A function Vec3A:lerp(_self,rhs,s) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:clone(_self) end ----@package ---@param _self Vec3A - ---@return number function Vec3A:length_recip(_self) end ----@package ----@param _self Vec3A +---@param p1 Vec3A +---@param p2 number +---@return Vec3A +function Vec3A:sub(p1,p2) end +---@param _self Vec3A ---@return U64Vec3 function Vec3A:as_u64vec3(_self) end ----@package ---@param _self Vec3A - ---@return Vec2 function Vec3A:truncate(_self) end ----@package ----@param _self Vec3A +---@param p1 Vec3A +---@param p2 number +---@return Vec3A +function Vec3A:div(p1,p2) end +---@param _self Vec3A ---@param normal Vec3A - ---@return Vec3A function Vec3A:reflect(_self,normal) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return BVec3A function Vec3A:cmplt(_self,rhs) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:floor(_self) end ----@package ---@param _self Vec3A - ---@param z number - ---@return Vec3A function Vec3A:with_z(_self,z) end ----@package ---@param _self Vec3A - ---@param min number - ---@param max number - ---@return Vec3A function Vec3A:clamp_length(_self,min,max) end ----@package ---@param _self Vec3A - ---@return U8Vec3 function Vec3A:as_u8vec3(_self) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:fract_gl(_self) end ----@package ---@param _self Vec3A - ---@param rhs Vec3A - ---@return Vec3A function Vec3A:add(_self,rhs) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:normalize_or_zero(_self) end ----@package ---@param _self Vec3A - ---@return Vec3A function Vec3A:exp(_self) end ----@package ---@param mask BVec3A - ---@param if_true Vec3A - ---@param if_false Vec3A - ---@return Vec3A function Vec3A.select(mask,if_true,if_false) end +---@param p1 Vec3A +---@param p2 Vec3A +---@return Vec3A +function Vec3A:rem(p1,p2) end ----@class Vec4 +---@class Vec4 : ReflectReference ---@field x ? number ---@field y ? number ---@field z ? number ---@field w ? number Vec4 = {} ----@package ---@param a number[] - ---@return Vec4 function Vec4.from_array(a) end ----@package ---@param _self Vec4 - ---@param a Vec4 - ---@param b Vec4 - ---@return Vec4 function Vec4:mul_add(_self,a,b) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:abs(_self) end ----@package ---@param _self Vec4 - ---@return boolean function Vec4:is_normalized(_self) end ----@package ---@param x number - ---@param y number - ---@param z number - ---@param w number - ---@return Vec4 function Vec4.new(x,y,z,w) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:reject_from_normalized(_self,rhs) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:midpoint(_self,rhs) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:fract(_self) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:signum(_self) end ----@package ---@param mask BVec4A - ---@param if_true Vec4 - ---@param if_false Vec4 - ---@return Vec4 function Vec4.select(mask,if_true,if_false) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return BVec4A function Vec4:cmpgt(_self,rhs) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:ceil(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:div(_self,rhs) end ----@package ---@param _self Vec4 - ---@return number function Vec4:element_sum(_self) end ----@package ----@param _self Vec4 +---@param p1 Vec4 +---@param p2 number +---@return Vec4 +function Vec4:sub(p1,p2) end + +---@param p1 Vec4 +---@param p2 number +---@return Vec4 +function Vec4:div(p1,p2) end +---@param _self Vec4 ---@return U16Vec4 function Vec4:as_u16vec4(_self) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:normalize_or_zero(_self) end ----@package ---@param _self Vec4 - ---@return U8Vec4 function Vec4:as_u8vec4(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:rem(_self,rhs) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return number function Vec4:dot(_self,rhs) end ----@package ---@param _self Vec4 - ---@param min number - ---@return Vec4 function Vec4:clamp_length_min(_self,min) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return BVec4A function Vec4:cmpne(_self,rhs) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@param d number - ---@return Vec4 function Vec4:move_towards(_self,rhs,d) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:exp(_self) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:floor(_self) end ----@package ---@param _self Vec4 - ---@param fallback Vec4 - ---@return Vec4 function Vec4:normalize_or(_self,fallback) end ----@package ----@param _self Vec4 +---@param p1 Vec4 +---@param p2 Vec4 +---@return Vec4 +function Vec4:rem(p1,p2) end ----@param rhs Vec4 +---@param p1 Vec4 +---@param p2 number +---@return Vec4 +function Vec4:mul(p1,p2) end +---@param _self Vec4 +---@param rhs Vec4 ---@return Vec4 function Vec4:reject_from(_self,rhs) end ----@package ---@param _self Vec4 - ---@return I16Vec4 function Vec4:as_i16vec4(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:copysign(_self,rhs) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return number function Vec4:distance_squared(_self,rhs) end ----@package ---@param _self Vec4 - ---@return boolean function Vec4:is_nan(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:add(_self,rhs) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:mul(_self,rhs) end ----@package ---@param _self Vec4 - ---@return number function Vec4:length_recip(_self) end ----@package ---@param _self Vec4 - ---@return number function Vec4:length_squared(_self) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:trunc(_self) end ----@package ---@param _self Vec4 - ---@return number[] function Vec4:to_array(_self) end ----@package ----@param _self Vec4 +---@param p1 Vec4 +---@param p2 number +---@return Vec4 +function Vec4:rem(p1,p2) end +---@param _self Vec4 ---@param rhs Vec4 - ---@return Vec4 function Vec4:project_onto(_self,rhs) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:sub(_self,rhs) end ----@package ---@param _self Vec4 - ---@return DVec4 function Vec4:as_dvec4(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return BVec4A function Vec4:cmple(_self,rhs) end ----@package ---@param _self Vec4 - ---@param max number - ---@return Vec4 function Vec4:clamp_length_max(_self,max) end ----@package ---@param _self Vec4 - ---@return I64Vec4 function Vec4:as_i64vec4(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:max(_self,rhs) end ----@package ---@param _self Vec4 - ---@param normal Vec4 - ---@return Vec4 function Vec4:reflect(_self,normal) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:dot_into_vec(_self,rhs) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:rem_euclid(_self,rhs) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return boolean function Vec4:eq(_self,rhs) end ----@package ---@param _self Vec4 - ---@param n number - ---@return Vec4 function Vec4:powf(_self,n) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:clone(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return BVec4A function Vec4:cmpge(_self,rhs) end ----@package ---@param _self Vec4 - ---@return integer function Vec4:is_negative_bitmask(_self) end ----@package ---@param _self Vec4 - ---@return number function Vec4:max_element(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@param s number - ---@return Vec4 function Vec4:lerp(_self,rhs,s) end ----@package ---@param _self Vec4 - ---@param min number - ---@param max number - ---@return Vec4 function Vec4:clamp_length(_self,min,max) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@param max_abs_diff number - ---@return boolean function Vec4:abs_diff_eq(_self,rhs,max_abs_diff) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:project_onto_normalized(_self,rhs) end ----@package ----@param _self Vec4 +---@param p1 Vec4 +---@param p2 Vec4 +---@return Vec4 +function Vec4:div(p1,p2) end +---@param _self Vec4 ---@return BVec4A function Vec4:is_nan_mask(_self) end ----@package ---@param _self Vec4 - ---@return number function Vec4:length(_self) end ----@package ---@param _self Vec4 - ---@param y number - ---@return Vec4 function Vec4:with_y(_self,y) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:min(_self,rhs) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:recip(_self) end ----@package ----@param _self Vec4 +---@param p1 Vec4 +---@param p2 Vec4 +---@return Vec4 +function Vec4:sub(p1,p2) end +---@param p1 Vec4 +---@param p2 Vec4 ---@return Vec4 -function Vec4:fract_gl(_self) end +function Vec4:mul(p1,p2) end ----@package ---@param _self Vec4 +---@return Vec4 +function Vec4:fract_gl(_self) end +---@param _self Vec4 ---@param w number - ---@return Vec4 function Vec4:with_w(_self,w) end ----@package ---@param _self Vec4 - ---@return Vec3 function Vec4:truncate(_self) end ----@package ---@param _self Vec4 - ---@return number function Vec4:min_element(_self) end ----@package ---@param _self Vec4 - ---@return I8Vec4 function Vec4:as_i8vec4(_self) end ----@package ---@param _self Vec4 - ---@return boolean function Vec4:is_finite(_self) end ----@package ---@param _self Vec4 - ---@param z number - ---@return Vec4 function Vec4:with_z(_self,z) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:neg(_self) end ----@package ---@param _self Vec4 - ---@return BVec4A function Vec4:is_finite_mask(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return number function Vec4:distance(_self,rhs) end ----@package ---@param _self Vec4 - ---@return UVec4 function Vec4:as_uvec4(_self) end ----@package ---@param _self Vec4 - ---@param x number - ---@return Vec4 function Vec4:with_x(_self,x) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return BVec4A function Vec4:cmplt(_self,rhs) end ----@package ---@param _self Vec4 - ---@param min Vec4 - ---@param max Vec4 - ---@return Vec4 function Vec4:clamp(_self,min,max) end ----@package ---@param _self Vec4 - ---@return IVec4 function Vec4:as_ivec4(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return BVec4A function Vec4:cmpeq(_self,rhs) end ----@package ---@param _self Vec4 - ---@return number function Vec4:element_product(_self) end ----@package ---@param _self Vec4 - ---@return Vec4 function Vec4:round(_self) end ----@package ---@param _self Vec4 - ---@param normal Vec4 - ---@param eta number - ---@return Vec4 function Vec4:refract(_self,normal,eta) end ----@package ---@param v number - ---@return Vec4 function Vec4.splat(v) end ----@package ----@param _self Vec4 +---@param p1 Vec4 +---@param p2 number +---@return Vec4 +function Vec4:add(p1,p2) end +---@param _self Vec4 ---@return Vec4 function Vec4:normalize(_self) end ----@package ----@param _self Vec4 +---@param p1 Vec4 +---@param p2 Vec4 +---@return Vec4 +function Vec4:add(p1,p2) end +---@param _self Vec4 ---@return U64Vec4 function Vec4:as_u64vec4(_self) end ----@package ---@param _self Vec4 - ---@param rhs Vec4 - ---@return Vec4 function Vec4:div_euclid(_self,rhs) end ----@class SmolStr - +---@class SmolStr : ReflectReference SmolStr = {} ----@package ---@param _self SmolStr - ---@return string function SmolStr:to_string(_self) end ----@package ---@param _self SmolStr - ---@return integer function SmolStr:len(_self) end ----@package ---@param _self SmolStr - ---@return boolean function SmolStr:is_empty(_self) end ----@package ---@param _self SmolStr - ---@return boolean function SmolStr:is_heap_allocated(_self) end ----@package ---@param _self SmolStr - ---@param other SmolStr - ---@return boolean function SmolStr:eq(_self,other) end ----@package ---@param _self SmolStr - ---@return SmolStr function SmolStr:clone(_self) end ----@class Uuid - +---@class Uuid : ReflectReference Uuid = {} ----@package ---@param _self Uuid - ---@param other Uuid - ---@return boolean function Uuid:eq(_self,other) end ----@package ---@return integer[] function Uuid.encode_buffer() end ----@package ----@param _self Uuid +---@param _self Uuid ---@return boolean function Uuid:is_max(_self) end ----@package ---@param _self Uuid - ---@return Uuid function Uuid:clone(_self) end ----@package ---@return Uuid function Uuid.new_v4() end ----@package ---@param _self Uuid - ---@return [integer, integer] function Uuid:as_u64_pair(_self) end ----@package ---@param _self Uuid - ---@return integer[] function Uuid:into_bytes(_self) end ----@package ---@param _self Uuid - ---@return integer[] | nil function Uuid:get_node_id(_self) end ----@package ---@param bytes integer[] - ---@return Uuid function Uuid.from_bytes(bytes) end ----@package ---@param _self Uuid - ---@return integer function Uuid:as_u128(_self) end ----@package ---@param _self Uuid - ---@return integer function Uuid:get_version_num(_self) end ----@package ---@param _self Uuid - ---@return integer[] function Uuid:to_bytes_le(_self) end ----@package ---@param v integer - ---@return Uuid function Uuid.from_u128_le(v) end ----@package ---@param v integer - ---@return Uuid function Uuid.from_u128(v) end ----@package ---@param _self Uuid - ----@return [] +---@return nil function Uuid:assert_receiver_is_total_eq(_self) end ----@package ---@param _self Uuid - ---@return integer function Uuid:to_u128_le(_self) end ----@package ---@return Uuid function Uuid.max() end ----@package ---@param b integer[] - ---@return Uuid function Uuid.from_bytes_le(b) end ----@package ---@param _self Uuid - ---@return boolean function Uuid:is_nil(_self) end ----@package ---@param high_bits integer - ---@param low_bits integer - ---@return Uuid function Uuid.from_u64_pair(high_bits,low_bits) end ----@class AssetIndex ---- A generational runtime-only identifier for a specific [`Asset`] stored in [`Assets`]. This is optimized for efficient runtime--- usage and is not suitable for identifying assets across app runs. +---@class DynamicFunction : ReflectReference +--- A dynamic script function. +DynamicFunction = {} + + +---@class DynamicFunctionMut : ReflectReference +--- A dynamic mutable script function. +DynamicFunctionMut = {} + + +---@class FunctionCallContext : ReflectReference +--- The caller context when calling a script function. +--- Functions can choose to react to caller preferences such as converting 1-indexed numbers to 0-indexed numbers +FunctionCallContext = {} + + +---@class PathBuf : ReflectReference +--- A heap allocated file path +PathBuf = {} + + +---@class String : ReflectReference +--- A heap allocated string +String = {} + + +---@class AssetIndex : ReflectReference +--- A generational runtime-only identifier for a specific [`Asset`] stored in [`Assets`]. This is optimized for efficient runtime +--- usage and is not suitable for identifying assets across app runs. ---@field generation ? integer ---@field index ? integer AssetIndex = {} ----@class AssetPath ---- Represents a path to an asset in a "virtual filesystem".--- --- Asset paths consist of three main parts:--- * [`AssetPath::source`]: The name of the [`AssetSource`](crate::io::AssetSource) to load the asset from.--- This is optional. If one is not set the default source will be used (which is the `assets` folder by default).--- * [`AssetPath::path`]: The "virtual filesystem path" pointing to an asset source file.--- * [`AssetPath::label`]: An optional "named sub asset". When assets are loaded, they are--- allowed to load "sub assets" of any type, which are identified by a named "label".--- --- Asset paths are generally constructed (and visualized) as strings:--- --- ```no_run--- # use bevy_asset::{Asset, AssetServer, Handle};--- # use bevy_reflect::TypePath;--- #--- # #[derive(Asset, TypePath, Default)]--- # struct Mesh;--- #--- # #[derive(Asset, TypePath, Default)]--- # struct Scene;--- #--- # let asset_server: AssetServer = panic!();--- // This loads the `my_scene.scn` base asset from the default asset source.--- let scene: Handle = asset_server.load("my_scene.scn");--- --- // This loads the `PlayerMesh` labeled asset from the `my_scene.scn` base asset in the default asset source.--- let mesh: Handle = asset_server.load("my_scene.scn#PlayerMesh");--- --- // This loads the `my_scene.scn` base asset from a custom 'remote' asset source.--- let scene: Handle = asset_server.load("remote://my_scene.scn");--- ```--- --- [`AssetPath`] implements [`From`] for `&'static str`, `&'static Path`, and `&'a String`,--- which allows us to optimize the static cases.--- This means that the common case of `asset_server.load("my_scene.scn")` when it creates and--- clones internal owned [`AssetPaths`](AssetPath).--- This also means that you should use [`AssetPath::parse`] in cases where `&str` is the explicit type. +---@class AssetPath : ReflectReference +--- Represents a path to an asset in a "virtual filesystem". +--- +--- Asset paths consist of three main parts: +--- * [`AssetPath::source`]: The name of the [`AssetSource`](crate::io::AssetSource) to load the asset from. +--- This is optional. If one is not set the default source will be used (which is the `assets` folder by default). +--- * [`AssetPath::path`]: The "virtual filesystem path" pointing to an asset source file. +--- * [`AssetPath::label`]: An optional "named sub asset". When assets are loaded, they are +--- allowed to load "sub assets" of any type, which are identified by a named "label". +--- +--- Asset paths are generally constructed (and visualized) as strings: +--- +--- ```no_run +--- # use bevy_asset::{Asset, AssetServer, Handle}; +--- # use bevy_reflect::TypePath; +--- # +--- # #[derive(Asset, TypePath, Default)] +--- # struct Mesh; +--- # +--- # #[derive(Asset, TypePath, Default)] +--- # struct Scene; +--- # +--- # let asset_server: AssetServer = panic!(); +--- // This loads the `my_scene.scn` base asset from the default asset source. +--- let scene: Handle = asset_server.load("my_scene.scn"); +--- +--- // This loads the `PlayerMesh` labeled asset from the `my_scene.scn` base asset in the default asset source. +--- let mesh: Handle = asset_server.load("my_scene.scn#PlayerMesh"); +--- +--- // This loads the `my_scene.scn` base asset from a custom 'remote' asset source. +--- let scene: Handle = asset_server.load("remote://my_scene.scn"); +--- ``` +--- +--- [`AssetPath`] implements [`From`] for `&'static str`, `&'static Path`, and `&'a String`, +--- which allows us to optimize the static cases. +--- This means that the common case of `asset_server.load("my_scene.scn")` when it creates and +--- clones internal owned [`AssetPaths`](AssetPath). +--- This also means that you should use [`AssetPath::parse`] in cases where `&str` is the explicit type. AssetPath = {} ----@class RenderAssetUsages ---- Defines where the asset will be used.--- --- If an asset is set to the `RENDER_WORLD` but not the `MAIN_WORLD`, the asset will be--- unloaded from the asset server once it's been extracted and prepared in the render world.--- --- Unloading the asset saves on memory, as for most cases it is no longer necessary to keep--- it in RAM once it's been uploaded to the GPU's VRAM. However, this means you can no longer--- access the asset from the CPU (via the `Assets` resource) once unloaded (without re-loading it).--- --- If you never need access to the asset from the CPU past the first frame it's loaded on,--- or only need very infrequent access, then set this to `RENDER_WORLD`. Otherwise, set this to--- `RENDER_WORLD | MAIN_WORLD`.--- --- If you have an asset that doesn't actually need to end up in the render world, like an Image--- that will be decoded into another Image asset, use `MAIN_WORLD` only.--- --- ## Platform-specific--- --- On Wasm, it is not possible for now to free reserved memory. To control memory usage, load assets--- in sequence and unload one before loading the next. See this--- [discussion about memory management](https://github.com/WebAssembly/design/issues/1397) for more--- details. +---@class RenderAssetUsages : ReflectReference +--- Defines where the asset will be used. +--- +--- If an asset is set to the `RENDER_WORLD` but not the `MAIN_WORLD`, the asset will be +--- unloaded from the asset server once it's been extracted and prepared in the render world. +--- +--- Unloading the asset saves on memory, as for most cases it is no longer necessary to keep +--- it in RAM once it's been uploaded to the GPU's VRAM. However, this means you can no longer +--- access the asset from the CPU (via the `Assets` resource) once unloaded (without re-loading it). +--- +--- If you never need access to the asset from the CPU past the first frame it's loaded on, +--- or only need very infrequent access, then set this to `RENDER_WORLD`. Otherwise, set this to +--- `RENDER_WORLD | MAIN_WORLD`. +--- +--- If you have an asset that doesn't actually need to end up in the render world, like an Image +--- that will be decoded into another Image asset, use `MAIN_WORLD` only. +--- +--- ## Platform-specific +--- +--- On Wasm, it is not possible for now to free reserved memory. To control memory usage, load assets +--- in sequence and unload one before loading the next. See this +--- [discussion about memory management](https://github.com/WebAssembly/design/issues/1397) for more +--- details. RenderAssetUsages = {} ----@class DeferredPrepass ---- If added to a [`crate::prelude::Camera3d`] then deferred materials will be rendered to the deferred gbuffer texture and will be available to subsequent passes.--- Note the default deferred lighting plugin also requires `DepthPrepass` to work correctly. +---@class DeferredPrepass : ReflectReference +--- If added to a [`crate::prelude::Camera3d`] then deferred materials will be rendered to the deferred gbuffer texture and will be available to subsequent passes. +--- Note the default deferred lighting plugin also requires `DepthPrepass` to work correctly. DeferredPrepass = {} ----@class SystemIdMarker +---@class SystemIdMarker : ReflectReference --- Marker [`Component`](bevy_ecs::component::Component) for identifying [`SystemId`] [`Entity`]s. SystemIdMarker = {} ----@class OnAdd ---- Trigger emitted when a component is inserted onto an entity that does not already have that--- component. Runs before `OnInsert`.--- See [`crate::component::ComponentHooks::on_add`] for more information. +---@class OnAdd : ReflectReference +--- Trigger emitted when a component is inserted onto an entity that does not already have that +--- component. Runs before `OnInsert`. +--- See [`crate::component::ComponentHooks::on_add`] for more information. OnAdd = {} ----@class OnDespawn ---- Trigger emitted for each component on an entity when it is despawned.--- See [`crate::component::ComponentHooks::on_despawn`] for more information. +---@class OnDespawn : ReflectReference +--- Trigger emitted for each component on an entity when it is despawned. +--- See [`crate::component::ComponentHooks::on_despawn`] for more information. OnDespawn = {} ----@class OnInsert ---- Trigger emitted when a component is inserted, regardless of whether or not the entity already--- had that component. Runs after `OnAdd`, if it ran.--- See [`crate::component::ComponentHooks::on_insert`] for more information. +---@class OnInsert : ReflectReference +--- Trigger emitted when a component is inserted, regardless of whether or not the entity already +--- had that component. Runs after `OnAdd`, if it ran. +--- See [`crate::component::ComponentHooks::on_insert`] for more information. OnInsert = {} ----@class OnRemove ---- Trigger emitted when a component is removed from an entity, and runs before the component is--- removed, so you can still access the component data.--- See [`crate::component::ComponentHooks::on_remove`] for more information. +---@class OnRemove : ReflectReference +--- Trigger emitted when a component is removed from an entity, and runs before the component is +--- removed, so you can still access the component data. +--- See [`crate::component::ComponentHooks::on_remove`] for more information. OnRemove = {} ----@class OnReplace ---- Trigger emitted when a component is inserted onto an entity that already has that component.--- Runs before the value is replaced, so you can still access the original component data.--- See [`crate::component::ComponentHooks::on_replace`] for more information. +---@class OnReplace : ReflectReference +--- Trigger emitted when a component is inserted onto an entity that already has that component. +--- Runs before the value is replaced, so you can still access the original component data. +--- See [`crate::component::ComponentHooks::on_replace`] for more information. OnReplace = {} ----@class Image - +---@class Image : ReflectReference Image = {} ----@class TextureAtlas ---- An index into a [`TextureAtlasLayout`], which corresponds to a specific section of a texture.--- --- It stores a handle to [`TextureAtlasLayout`] and the index of the current section of the atlas.--- The texture atlas contains various *sections* of a given texture, allowing users to have a single--- image file for either sprite animation or global mapping.--- You can change the texture [`index`](Self::index) of the atlas to animate the sprite or display only a *section* of the texture--- for efficient rendering of related game objects.--- --- Check the following examples for usage:--- - [`animated sprite sheet example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs)--- - [`sprite animation event example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs)--- - [`texture atlas example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) +---@class TextureAtlas : ReflectReference +--- An index into a [`TextureAtlasLayout`], which corresponds to a specific section of a texture. +--- +--- It stores a handle to [`TextureAtlasLayout`] and the index of the current section of the atlas. +--- The texture atlas contains various *sections* of a given texture, allowing users to have a single +--- image file for either sprite animation or global mapping. +--- You can change the texture [`index`](Self::index) of the atlas to animate the sprite or display only a *section* of the texture +--- for efficient rendering of related game objects. +--- +--- Check the following examples for usage: +--- - [`animated sprite sheet example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs) +--- - [`sprite animation event example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs) +--- - [`texture atlas example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) ---@field layout ? Handle ---@field index ? integer TextureAtlas = {} ----@class TextureAtlasLayout ---- Stores a map used to lookup the position of a texture in a [`TextureAtlas`].--- This can be used to either use and look up a specific section of a texture, or animate frame-by-frame as a sprite sheet.--- --- Optionally it can store a mapping from sub texture handles to the related area index (see--- [`TextureAtlasBuilder`]).--- --- [Example usage animating sprite.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs)--- [Example usage animating sprite in response to an event.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs)--- [Example usage loading sprite sheet.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs)--- --- [`TextureAtlasBuilder`]: crate::TextureAtlasBuilder +---@class TextureAtlasLayout : ReflectReference +--- Stores a map used to lookup the position of a texture in a [`TextureAtlas`]. +--- This can be used to either use and look up a specific section of a texture, or animate frame-by-frame as a sprite sheet. +--- +--- Optionally it can store a mapping from sub texture handles to the related area index (see +--- [`TextureAtlasBuilder`]). +--- +--- [Example usage animating sprite.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs) +--- [Example usage animating sprite in response to an event.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs) +--- [Example usage loading sprite sheet.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) +--- +--- [`TextureAtlasBuilder`]: crate::TextureAtlasBuilder ---@field size ? UVec2 ---@field textures ? Vec TextureAtlasLayout = {} ----@class Affine3 ---- Reduced-size version of `glam::Affine3A` for use when storage has--- significant performance impact. Convert to `glam::Affine3A` to do--- non-trivial calculations. +---@class Affine3 : ReflectReference +--- Reduced-size version of `glam::Affine3A` for use when storage has +--- significant performance impact. Convert to `glam::Affine3A` to do +--- non-trivial calculations. ---@field matrix3 ? Mat3 ---@field translation ? Vec3 Affine3 = {} ----@class Indices ---- An array of indices into the [`VertexAttributeValues`](super::VertexAttributeValues) for a mesh.--- --- It describes the order in which the vertex attributes should be joined into faces. +---@class Indices : ReflectReference +--- An array of indices into the [`VertexAttributeValues`](super::VertexAttributeValues) for a mesh. +--- +--- It describes the order in which the vertex attributes should be joined into faces. Indices = {} ----@class Mesh ---- A 3D object made out of vertices representing triangles, lines, or points,--- with "attribute" values for each vertex.--- --- Meshes can be automatically generated by a bevy `AssetLoader` (generally by loading a `Gltf` file),--- or by converting a [primitive](bevy_math::primitives) using [`into`](Into).--- It is also possible to create one manually. They can be edited after creation.--- --- Meshes can be rendered with a `Mesh2d` and `MeshMaterial2d`--- or `Mesh3d` and `MeshMaterial3d` for 2D and 3D respectively.--- --- A [`Mesh`] in Bevy is equivalent to a "primitive" in the glTF format, for a--- glTF Mesh representation, see `GltfMesh`.--- --- ## Manual creation--- --- The following function will construct a flat mesh, to be rendered with a--- `StandardMaterial` or `ColorMaterial`:--- --- ```--- # use bevy_mesh::{Mesh, Indices, PrimitiveTopology};--- # use bevy_asset::RenderAssetUsages;--- fn create_simple_parallelogram() -> Mesh {--- // Create a new mesh using a triangle list topology, where each set of 3 vertices composes a triangle.--- Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsages::default())--- // Add 4 vertices, each with its own position attribute (coordinate in--- // 3D space), for each of the corners of the parallelogram.--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_POSITION,--- vec![[0.0, 0.0, 0.0], [1.0, 2.0, 0.0], [2.0, 2.0, 0.0], [1.0, 0.0, 0.0]]--- )--- // Assign a UV coordinate to each vertex.--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_UV_0,--- vec![[0.0, 1.0], [0.5, 0.0], [1.0, 0.0], [0.5, 1.0]]--- )--- // Assign normals (everything points outwards)--- .with_inserted_attribute(--- Mesh::ATTRIBUTE_NORMAL,--- vec![[0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0]]--- )--- // After defining all the vertices and their attributes, build each triangle using the--- // indices of the vertices that make it up in a counter-clockwise order.--- .with_inserted_indices(Indices::U32(vec![--- // First triangle--- 0, 3, 1,--- // Second triangle--- 1, 3, 2--- ]))--- }--- ```--- --- You can see how it looks like [here](https://github.com/bevyengine/bevy/blob/main/assets/docs/Mesh.png),--- used in a `Mesh3d` with a square bevy logo texture, with added axis, points,--- lines and text for clarity.--- --- ## Other examples--- --- For further visualization, explanation, and examples, see the built-in Bevy examples,--- and the [implementation of the built-in shapes](https://github.com/bevyengine/bevy/tree/main/crates/bevy_mesh/src/primitives).--- In particular, [generate_custom_mesh](https://github.com/bevyengine/bevy/blob/main/examples/3d/generate_custom_mesh.rs)--- teaches you to access and modify the attributes of a [`Mesh`] after creating it.--- --- ## Common points of confusion--- --- - UV maps in Bevy start at the top-left, see [`ATTRIBUTE_UV_0`](Mesh::ATTRIBUTE_UV_0),--- other APIs can have other conventions, `OpenGL` starts at bottom-left.--- - It is possible and sometimes useful for multiple vertices to have the same--- [position attribute](Mesh::ATTRIBUTE_POSITION) value,--- it's a common technique in 3D modeling for complex UV mapping or other calculations.--- - Bevy performs frustum culling based on the `Aabb` of meshes, which is calculated--- and added automatically for new meshes only. If a mesh is modified, the entity's `Aabb`--- needs to be updated manually or deleted so that it is re-calculated.--- --- ## Use with `StandardMaterial`--- --- To render correctly with `StandardMaterial`, a mesh needs to have properly defined:--- - [`UVs`](Mesh::ATTRIBUTE_UV_0): Bevy needs to know how to map a texture onto the mesh--- (also true for `ColorMaterial`).--- - [`Normals`](Mesh::ATTRIBUTE_NORMAL): Bevy needs to know how light interacts with your mesh.--- [0.0, 0.0, 1.0] is very common for simple flat meshes on the XY plane,--- because simple meshes are smooth and they don't require complex light calculations.--- - Vertex winding order: by default, `StandardMaterial.cull_mode` is `Some(Face::Back)`,--- which means that Bevy would *only* render the "front" of each triangle, which--- is the side of the triangle from where the vertices appear in a *counter-clockwise* order. +---@class Mesh : ReflectReference +--- A 3D object made out of vertices representing triangles, lines, or points, +--- with "attribute" values for each vertex. +--- +--- Meshes can be automatically generated by a bevy `AssetLoader` (generally by loading a `Gltf` file), +--- or by converting a [primitive](bevy_math::primitives) using [`into`](Into). +--- It is also possible to create one manually. They can be edited after creation. +--- +--- Meshes can be rendered with a `Mesh2d` and `MeshMaterial2d` +--- or `Mesh3d` and `MeshMaterial3d` for 2D and 3D respectively. +--- +--- A [`Mesh`] in Bevy is equivalent to a "primitive" in the glTF format, for a +--- glTF Mesh representation, see `GltfMesh`. +--- +--- ## Manual creation +--- +--- The following function will construct a flat mesh, to be rendered with a +--- `StandardMaterial` or `ColorMaterial`: +--- +--- ``` +--- # use bevy_mesh::{Mesh, Indices, PrimitiveTopology}; +--- # use bevy_asset::RenderAssetUsages; +--- fn create_simple_parallelogram() -> Mesh { +--- // Create a new mesh using a triangle list topology, where each set of 3 vertices composes a triangle. +--- Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsages::default()) +--- // Add 4 vertices, each with its own position attribute (coordinate in +--- // 3D space), for each of the corners of the parallelogram. +--- .with_inserted_attribute( +--- Mesh::ATTRIBUTE_POSITION, +--- vec![[0.0, 0.0, 0.0], [1.0, 2.0, 0.0], [2.0, 2.0, 0.0], [1.0, 0.0, 0.0]] +--- ) +--- // Assign a UV coordinate to each vertex. +--- .with_inserted_attribute( +--- Mesh::ATTRIBUTE_UV_0, +--- vec![[0.0, 1.0], [0.5, 0.0], [1.0, 0.0], [0.5, 1.0]] +--- ) +--- // Assign normals (everything points outwards) +--- .with_inserted_attribute( +--- Mesh::ATTRIBUTE_NORMAL, +--- vec![[0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0]] +--- ) +--- // After defining all the vertices and their attributes, build each triangle using the +--- // indices of the vertices that make it up in a counter-clockwise order. +--- .with_inserted_indices(Indices::U32(vec![ +--- // First triangle +--- 0, 3, 1, +--- // Second triangle +--- 1, 3, 2 +--- ])) +--- } +--- ``` +--- +--- You can see how it looks like [here](https://github.com/bevyengine/bevy/blob/main/assets/docs/Mesh.png), +--- used in a `Mesh3d` with a square bevy logo texture, with added axis, points, +--- lines and text for clarity. +--- +--- ## Other examples +--- +--- For further visualization, explanation, and examples, see the built-in Bevy examples, +--- and the [implementation of the built-in shapes](https://github.com/bevyengine/bevy/tree/main/crates/bevy_mesh/src/primitives). +--- In particular, [generate_custom_mesh](https://github.com/bevyengine/bevy/blob/main/examples/3d/generate_custom_mesh.rs) +--- teaches you to access and modify the attributes of a [`Mesh`] after creating it. +--- +--- ## Common points of confusion +--- +--- - UV maps in Bevy start at the top-left, see [`ATTRIBUTE_UV_0`](Mesh::ATTRIBUTE_UV_0), +--- other APIs can have other conventions, `OpenGL` starts at bottom-left. +--- - It is possible and sometimes useful for multiple vertices to have the same +--- [position attribute](Mesh::ATTRIBUTE_POSITION) value, +--- it's a common technique in 3D modeling for complex UV mapping or other calculations. +--- - Bevy performs frustum culling based on the `Aabb` of meshes, which is calculated +--- and added automatically for new meshes only. If a mesh is modified, the entity's `Aabb` +--- needs to be updated manually or deleted so that it is re-calculated. +--- +--- ## Use with `StandardMaterial` +--- +--- To render correctly with `StandardMaterial`, a mesh needs to have properly defined: +--- - [`UVs`](Mesh::ATTRIBUTE_UV_0): Bevy needs to know how to map a texture onto the mesh +--- (also true for `ColorMaterial`). +--- - [`Normals`](Mesh::ATTRIBUTE_NORMAL): Bevy needs to know how light interacts with your mesh. +--- [0.0, 0.0, 1.0] is very common for simple flat meshes on the XY plane, +--- because simple meshes are smooth and they don't require complex light calculations. +--- - Vertex winding order: by default, `StandardMaterial.cull_mode` is `Some(Face::Back)`, +--- which means that Bevy would *only* render the "front" of each triangle, which +--- is the side of the triangle from where the vertices appear in a *counter-clockwise* order. ---@field indices ? Option ---@field morph_targets ? Option ---@field morph_target_names ? Option @@ -27978,94 +21907,130 @@ Indices = {} Mesh = {} ----@class MeshMorphWeights ---- Control a specific [`Mesh`] instance's [morph targets]. These control the weights of--- specific "mesh primitives" in scene formats like GLTF. They can be set manually, but--- in most cases they should "automatically" synced by setting the [`MorphWeights`] component--- on a parent entity.--- --- See [`MorphWeights`] for more details on Bevy's morph target implementation.--- --- Add this to an [`Entity`] with a `Mesh3d` with a [`MorphAttributes`] set--- to control individual weights of each morph target.--- --- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation +---@class MeshMorphWeights : ReflectReference +--- Control a specific [`Mesh`] instance's [morph targets]. These control the weights of +--- specific "mesh primitives" in scene formats like GLTF. They can be set manually, but +--- in most cases they should "automatically" synced by setting the [`MorphWeights`] component +--- on a parent entity. +--- +--- See [`MorphWeights`] for more details on Bevy's morph target implementation. +--- +--- Add this to an [`Entity`] with a `Mesh3d` with a [`MorphAttributes`] set +--- to control individual weights of each morph target. +--- +--- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation ---@field weights ? Vec MeshMorphWeights = {} ----@class MorphWeights ---- Controls the [morph targets] for all child `Mesh3d` entities. In most cases, [`MorphWeights`] should be considered--- the "source of truth" when writing morph targets for meshes. However you can choose to write child [`MeshMorphWeights`]--- if your situation requires more granularity. Just note that if you set [`MorphWeights`], it will overwrite child--- [`MeshMorphWeights`] values.--- --- This exists because Bevy's [`Mesh`] corresponds to a _single_ surface / material, whereas morph targets--- as defined in the GLTF spec exist on "multi-primitive meshes" (where each primitive is its own surface with its own material).--- Therefore in Bevy [`MorphWeights`] an a parent entity are the "canonical weights" from a GLTF perspective, which then--- synchronized to child `Mesh3d` / [`MeshMorphWeights`] (which correspond to "primitives" / "surfaces" from a GLTF perspective).--- --- Add this to the parent of one or more [`Entities`](`Entity`) with a `Mesh3d` with a [`MeshMorphWeights`].--- --- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation +---@class MorphWeights : ReflectReference +--- Controls the [morph targets] for all child `Mesh3d` entities. In most cases, [`MorphWeights`] should be considered +--- the "source of truth" when writing morph targets for meshes. However you can choose to write child [`MeshMorphWeights`] +--- if your situation requires more granularity. Just note that if you set [`MorphWeights`], it will overwrite child +--- [`MeshMorphWeights`] values. +--- +--- This exists because Bevy's [`Mesh`] corresponds to a _single_ surface / material, whereas morph targets +--- as defined in the GLTF spec exist on "multi-primitive meshes" (where each primitive is its own surface with its own material). +--- Therefore in Bevy [`MorphWeights`] an a parent entity are the "canonical weights" from a GLTF perspective, which then +--- synchronized to child `Mesh3d` / [`MeshMorphWeights`] (which correspond to "primitives" / "surfaces" from a GLTF perspective). +--- +--- Add this to the parent of one or more [`Entities`](`Entity`) with a `Mesh3d` with a [`MeshMorphWeights`]. +--- +--- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation ---@field weights ? Vec ---@field first_mesh ? Option MorphWeights = {} ----@class AnnulusMeshBuilder +---@class AnnulusMeshBuilder : ReflectReference --- A builder for creating a [`Mesh`] with an [`Annulus`] shape. ---@field annulus ? Annulus ---@field resolution ? integer AnnulusMeshBuilder = {} ----@class Capsule2dMeshBuilder +---@class Capsule2dMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Capsule2d`] shape. ---@field capsule ? Capsule2d ---@field resolution ? integer Capsule2dMeshBuilder = {} ----@class CircleMeshBuilder +---@class CircleMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Circle`] shape. ---@field circle ? Circle ---@field resolution ? integer CircleMeshBuilder = {} ----@class CircularMeshUvMode ---- Specifies how to generate UV-mappings for the [`CircularSector`] and [`CircularSegment`] shapes.--- --- Currently the only variant is `Mask`, which is good for showing a portion of a texture that includes--- the entire circle, particularly the same texture will be displayed with different fractions of a--- complete circle.--- --- It's expected that more will be added in the future, such as a variant that causes the texture to be--- scaled to fit the bounding box of the shape, which would be good for packed textures only including the--- portion of the circle that is needed to display. +---@class CircularMeshUvMode : ReflectReference +--- Specifies how to generate UV-mappings for the [`CircularSector`] and [`CircularSegment`] shapes. +--- +--- Currently the only variant is `Mask`, which is good for showing a portion of a texture that includes +--- the entire circle, particularly the same texture will be displayed with different fractions of a +--- complete circle. +--- +--- It's expected that more will be added in the future, such as a variant that causes the texture to be +--- scaled to fit the bounding box of the shape, which would be good for packed textures only including the +--- portion of the circle that is needed to display. CircularMeshUvMode = {} ----@class CircularSectorMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`CircularSector`] shape.--- --- The resulting mesh will have a UV-map such that the center of the circle is--- at the center of the texture. +---@class CircularSectorMeshBuilder : ReflectReference +--- A builder used for creating a [`Mesh`] with a [`CircularSector`] shape. +--- +--- The resulting mesh will have a UV-map such that the center of the circle is +--- at the center of the texture. ---@field sector ? CircularSector ---@field resolution ? integer ---@field uv_mode ? CircularMeshUvMode CircularSectorMeshBuilder = {} ----@class CircularSegmentMeshBuilder ---- A builder used for creating a [`Mesh`] with a [`CircularSegment`] shape.--- --- The resulting mesh will have a UV-map such that the center of the circle is--- at the center of the texture. +---@class CircularSegmentMeshBuilder : ReflectReference +--- A builder used for creating a [`Mesh`] with a [`CircularSegment`] shape. +--- +--- The resulting mesh will have a UV-map such that the center of the circle is +--- at the center of the texture. ---@field segment ? CircularSegment ---@field resolution ? integer ---@field uv_mode ? CircularMeshUvMode CircularSegmentMeshBuilder = {} ----@class EllipseMeshBuilder +---@class EllipseMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with an [`Ellipse`] shape. ---@field ellipse ? Ellipse ---@field resolution ? integer EllipseMeshBuilder = {} ----@class RectangleMeshBuilder +---@class RectangleMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Rectangle`] shape. ---@field half_size ? Vec2 RectangleMeshBuilder = {} ----@class RegularPolygonMeshBuilder +---@class RegularPolygonMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`RegularPolygon`] shape. ---@field circumradius ? number ---@field sides ? integer RegularPolygonMeshBuilder = {} ----@class RhombusMeshBuilder +---@class RhombusMeshBuilder : ReflectReference --- A builder for creating a [`Mesh`] with an [`Rhombus`] shape. ---@field half_diagonals ? Vec2 RhombusMeshBuilder = {} ----@class Triangle2dMeshBuilder +---@class Triangle2dMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Triangle2d`] shape. ---@field triangle ? Triangle2d Triangle2dMeshBuilder = {} ----@class Capsule3dMeshBuilder +---@class Capsule3dMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Capsule3d`] shape. ---@field capsule ? Capsule3d ---@field rings ? integer @@ -28075,17 +22040,17 @@ Triangle2dMeshBuilder = {} Capsule3dMeshBuilder = {} ----@class CapsuleUvProfile +---@class CapsuleUvProfile : ReflectReference --- Manner in which UV coordinates are distributed vertically. CapsuleUvProfile = {} ----@class ConeAnchor +---@class ConeAnchor : ReflectReference --- Anchoring options for [`ConeMeshBuilder`] ConeAnchor = {} ----@class ConeMeshBuilder +---@class ConeMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Cone`] shape. ---@field cone ? Cone ---@field resolution ? integer @@ -28093,7 +22058,7 @@ ConeAnchor = {} ConeMeshBuilder = {} ----@class ConicalFrustumMeshBuilder +---@class ConicalFrustumMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`ConicalFrustum`] shape. ---@field frustum ? ConicalFrustum ---@field resolution ? integer @@ -28101,18 +22066,18 @@ ConeMeshBuilder = {} ConicalFrustumMeshBuilder = {} ----@class CuboidMeshBuilder +---@class CuboidMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Cuboid`] shape. ---@field half_size ? Vec3 CuboidMeshBuilder = {} ----@class CylinderAnchor +---@class CylinderAnchor : ReflectReference --- Anchoring options for [`CylinderMeshBuilder`] CylinderAnchor = {} ----@class CylinderMeshBuilder +---@class CylinderMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Cylinder`] shape. ---@field cylinder ? Cylinder ---@field resolution ? integer @@ -28122,32 +22087,32 @@ CylinderAnchor = {} CylinderMeshBuilder = {} ----@class PlaneMeshBuilder +---@class PlaneMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Plane3d`] shape. ---@field plane ? Plane3d ---@field subdivisions ? integer PlaneMeshBuilder = {} ----@class SphereKind +---@class SphereKind : ReflectReference --- A type of sphere mesh. SphereKind = {} ----@class SphereMeshBuilder +---@class SphereMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with an [`Sphere`] shape. ---@field sphere ? Sphere ---@field kind ? SphereKind SphereMeshBuilder = {} ----@class TetrahedronMeshBuilder +---@class TetrahedronMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Tetrahedron`] shape. ---@field tetrahedron ? Tetrahedron TetrahedronMeshBuilder = {} ----@class TorusMeshBuilder +---@class TorusMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Torus`] shape. ---@field torus ? Torus ---@field minor_resolution ? integer @@ -28156,25 +22121,24 @@ TetrahedronMeshBuilder = {} TorusMeshBuilder = {} ----@class Triangle3dMeshBuilder +---@class Triangle3dMeshBuilder : ReflectReference --- A builder used for creating a [`Mesh`] with a [`Triangle3d`] shape. ---@field triangle ? Triangle3d Triangle3dMeshBuilder = {} ----@class SkinnedMesh - +---@class SkinnedMesh : ReflectReference ---@field inverse_bindposes ? bevy_asset::handle::Handle ---@field joints ? Vec SkinnedMesh = {} ----@class ScriptAsset +---@class ScriptAsset : ReflectReference --- Represents a script loaded into memory as an asset ScriptAsset = {} ----@class FunctionArgInfo +---@class FunctionArgInfo : ReflectReference --- Information about a function argument. ---@field name ? Option ---@field arg_index ? integer @@ -28182,7 +22146,7 @@ ScriptAsset = {} FunctionArgInfo = {} ----@class FunctionInfo +---@class FunctionInfo : ReflectReference --- Information about a function. ---@field name ? Cow ---@field namespace ? Namespace @@ -28192,40 +22156,55 @@ FunctionArgInfo = {} FunctionInfo = {} ----@class FunctionReturnInfo +---@class FunctionReturnInfo : ReflectReference --- Information about a function return value. ---@field type_id ? TypeId FunctionReturnInfo = {} ----@class InteropError +---@class InteropError : ReflectReference --- An error occurring when converting between rust and a script context. InteropError = {} ----@class Namespace +---@class Namespace : ReflectReference --- A namespace for functions Namespace = {} ----@class DynamicComponent +---@class DynamicComponent : ReflectReference --- A dynamic script component ---@field data ? ScriptValue DynamicComponent = {} ----@class ScriptValue ---- An abstraction of values that can be passed to and from scripts.--- This allows us to re-use logic between scripting languages. +---@class ScriptValue : ReflectReference +--- An abstraction of values that can be passed to and from scripts. +--- This allows us to re-use logic between scripting languages. ScriptValue = {} ----@class AlphaMode +---@class AlphaMode : ReflectReference --- Sets how a material's base color alpha channel is used for transparency. AlphaMode = {} ----@class Camera ---- The defining [`Component`] for camera entities,--- storing information about how and what to render through this camera.--- --- The [`Camera`] component is added to an entity to define the properties of the viewpoint from--- which rendering occurs. It defines the position of the view to render, the projection method--- to transform the 3D objects into a 2D image, as well as the render target into which that image--- is produced.--- --- Note that a [`Camera`] needs a [`CameraRenderGraph`] to render anything.--- This is typically provided by adding a [`Camera2d`] or [`Camera3d`] component,--- but custom render graphs can also be defined. Inserting a [`Camera`] with no render--- graph will emit an error at runtime.--- --- [`Camera2d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_2d/struct.Camera2d.html--- [`Camera3d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_3d/struct.Camera3d.html +---@class Camera : ReflectReference +--- The defining [`Component`] for camera entities, +--- storing information about how and what to render through this camera. +--- +--- The [`Camera`] component is added to an entity to define the properties of the viewpoint from +--- which rendering occurs. It defines the position of the view to render, the projection method +--- to transform the 3D objects into a 2D image, as well as the render target into which that image +--- is produced. +--- +--- Note that a [`Camera`] needs a [`CameraRenderGraph`] to render anything. +--- This is typically provided by adding a [`Camera2d`] or [`Camera3d`] component, +--- but custom render graphs can also be defined. Inserting a [`Camera`] with no render +--- graph will emit an error at runtime. +--- +--- [`Camera2d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_2d/struct.Camera2d.html +--- [`Camera3d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_3d/struct.Camera3d.html ---@field viewport ? Option ---@field order ? integer ---@field is_active ? boolean @@ -28237,85 +22216,153 @@ AlphaMode = {} Camera = {} ----@class CameraMainTextureUsages +---@class CameraMainTextureUsages : ReflectReference --- This component lets you control the [`TextureUsages`] field of the main texture generated for the camera CameraMainTextureUsages = {} ----@class CameraRenderGraph +---@class CameraRenderGraph : ReflectReference --- Configures the [`RenderGraph`](crate::render_graph::RenderGraph) name assigned to be run for a given [`Camera`] entity. CameraRenderGraph = {} ----@class Exposure ---- How much energy a `Camera3d` absorbs from incoming light.--- --- +---@class Exposure : ReflectReference +--- How much energy a `Camera3d` absorbs from incoming light. +--- +--- Exposure = {} ----@class ImageRenderTarget +---@class ImageRenderTarget : ReflectReference --- A render target that renders to an [`Image`]. ---@field handle ? Handle ---@field scale_factor ? FloatOrd ImageRenderTarget = {} ----@class MipBias ---- Camera component specifying a mip bias to apply when sampling from material textures.--- --- Often used in conjunction with antialiasing post-process effects to reduce textures blurriness. +---@class MipBias : ReflectReference +--- Camera component specifying a mip bias to apply when sampling from material textures. +--- +--- Often used in conjunction with antialiasing post-process effects to reduce textures blurriness. ---@field [1] ? number MipBias = {} ----@class RenderTarget ---- The "target" that a [`Camera`] will render to. For example, this could be a [`Window`]--- swapchain or an [`Image`]. +---@class RenderTarget : ReflectReference +--- The "target" that a [`Camera`] will render to. For example, this could be a [`Window`] +--- swapchain or an [`Image`]. RenderTarget = {} ----@class SubCameraView ---- Settings to define a camera sub view.--- --- When [`Camera::sub_camera_view`] is `Some`, only the sub-section of the--- image defined by `size` and `offset` (relative to the `full_size` of the--- whole image) is projected to the cameras viewport.--- --- Take the example of the following multi-monitor setup:--- ```css--- ┌───┬───┐--- │ A │ B │--- ├───┼───┤--- │ C │ D │--- └───┴───┘--- ```--- If each monitor is 1920x1080, the whole image will have a resolution of--- 3840x2160. For each monitor we can use a single camera with a viewport of--- the same size as the monitor it corresponds to. To ensure that the image is--- cohesive, we can use a different sub view on each camera:--- - Camera A: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,0--- - Camera B: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 1920,0--- - Camera C: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,1080--- - Camera D: `full_size` = 3840x2160, `size` = 1920x1080, `offset` =--- 1920,1080--- --- However since only the ratio between the values is important, they could all--- be divided by 120 and still produce the same image. Camera D would for--- example have the following values:--- `full_size` = 32x18, `size` = 16x9, `offset` = 16,9 +---@class SubCameraView : ReflectReference +--- Settings to define a camera sub view. +--- +--- When [`Camera::sub_camera_view`] is `Some`, only the sub-section of the +--- image defined by `size` and `offset` (relative to the `full_size` of the +--- whole image) is projected to the cameras viewport. +--- +--- Take the example of the following multi-monitor setup: +--- ```css +--- ┌───┬───┐ +--- │ A │ B │ +--- ├───┼───┤ +--- │ C │ D │ +--- └───┴───┘ +--- ``` +--- If each monitor is 1920x1080, the whole image will have a resolution of +--- 3840x2160. For each monitor we can use a single camera with a viewport of +--- the same size as the monitor it corresponds to. To ensure that the image is +--- cohesive, we can use a different sub view on each camera: +--- - Camera A: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,0 +--- - Camera B: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 1920,0 +--- - Camera C: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,1080 +--- - Camera D: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = +--- 1920,1080 +--- +--- However since only the ratio between the values is important, they could all +--- be divided by 120 and still produce the same image. Camera D would for +--- example have the following values: +--- `full_size` = 32x18, `size` = 16x9, `offset` = 16,9 ---@field full_size ? UVec2 ---@field offset ? Vec2 ---@field size ? UVec2 SubCameraView = {} ----@class TemporalJitter ---- A subpixel offset to jitter a perspective camera's frustum by.--- --- Useful for temporal rendering techniques.--- --- Do not use with [`OrthographicProjection`].--- --- [`OrthographicProjection`]: crate::camera::OrthographicProjection +---@class TemporalJitter : ReflectReference +--- A subpixel offset to jitter a perspective camera's frustum by. +--- +--- Useful for temporal rendering techniques. +--- +--- Do not use with [`OrthographicProjection`]. +--- +--- [`OrthographicProjection`]: crate::camera::OrthographicProjection ---@field offset ? Vec2 TemporalJitter = {} ----@class Viewport ---- Render viewport configuration for the [`Camera`] component.--- --- The viewport defines the area on the render target to which the camera renders its image.--- You can overlay multiple cameras in a single window using viewports to create effects like--- split screen, minimaps, and character viewers. +---@class Viewport : ReflectReference +--- Render viewport configuration for the [`Camera`] component. +--- +--- The viewport defines the area on the render target to which the camera renders its image. +--- You can overlay multiple cameras in a single window using viewports to create effects like +--- split screen, minimaps, and character viewers. ---@field physical_position ? UVec2 ---@field physical_size ? UVec2 ---@field depth ? Range Viewport = {} ----@class ClearColor ---- A [`Resource`] that stores the color that is used to clear the screen between frames.--- --- This color appears as the "background" color for simple apps,--- when there are portions of the screen with nothing rendered. +---@class ClearColor : ReflectReference +--- A [`Resource`] that stores the color that is used to clear the screen between frames. +--- +--- This color appears as the "background" color for simple apps, +--- when there are portions of the screen with nothing rendered. ---@field [1] ? Color ClearColor = {} ----@class ClearColorConfig +---@class ClearColorConfig : ReflectReference --- For a camera, specifies the color used to clear the viewport before rendering. ClearColorConfig = {} ----@class ManualTextureViewHandle +---@class ManualTextureViewHandle : ReflectReference --- A unique id that corresponds to a specific [`ManualTextureView`] in the [`ManualTextureViews`] collection. ---@field [1] ? integer ManualTextureViewHandle = {} ----@class CustomProjection ---- Holds a dynamic [`CameraProjection`] trait object. Use [`Projection::custom()`] to construct a--- custom projection.--- --- The contained dynamic object can be downcast into a static type using [`CustomProjection::get`]. +---@class CustomProjection : ReflectReference +--- Holds a dynamic [`CameraProjection`] trait object. Use [`Projection::custom()`] to construct a +--- custom projection. +--- +--- The contained dynamic object can be downcast into a static type using [`CustomProjection::get`]. CustomProjection = {} ----@class OrthographicProjection ---- Project a 3D space onto a 2D surface using parallel lines, i.e., unlike [`PerspectiveProjection`],--- the size of objects remains the same regardless of their distance to the camera.--- --- The volume contained in the projection is called the *view frustum*. Since the viewport is rectangular--- and projection lines are parallel, the view frustum takes the shape of a cuboid.--- --- Note that the scale of the projection and the apparent size of objects are inversely proportional.--- As the size of the projection increases, the size of objects decreases.--- --- # Examples--- --- Configure the orthographic projection to one world unit per 100 window pixels:--- --- ```--- # use bevy_render::camera::{OrthographicProjection, Projection, ScalingMode};--- let projection = Projection::Orthographic(OrthographicProjection {--- scaling_mode: ScalingMode::WindowSize,--- scale: 0.01,--- ..OrthographicProjection::default_2d()--- });--- ``` +---@class OrthographicProjection : ReflectReference +--- Project a 3D space onto a 2D surface using parallel lines, i.e., unlike [`PerspectiveProjection`], +--- the size of objects remains the same regardless of their distance to the camera. +--- +--- The volume contained in the projection is called the *view frustum*. Since the viewport is rectangular +--- and projection lines are parallel, the view frustum takes the shape of a cuboid. +--- +--- Note that the scale of the projection and the apparent size of objects are inversely proportional. +--- As the size of the projection increases, the size of objects decreases. +--- +--- # Examples +--- +--- Configure the orthographic projection to one world unit per 100 window pixels: +--- +--- ``` +--- # use bevy_render::camera::{OrthographicProjection, Projection, ScalingMode}; +--- let projection = Projection::Orthographic(OrthographicProjection { +--- scaling_mode: ScalingMode::WindowSize, +--- scale: 0.01, +--- ..OrthographicProjection::default_2d() +--- }); +--- ``` ---@field near ? number ---@field far ? number ---@field viewport_origin ? Vec2 @@ -28325,7 +22372,7 @@ CustomProjection = {} OrthographicProjection = {} ----@class PerspectiveProjection +---@class PerspectiveProjection : ReflectReference --- A 3D camera projection in which distant objects appear smaller than close objects. ---@field fov ? number ---@field aspect_ratio ? number @@ -28334,70 +22381,252 @@ OrthographicProjection = {} PerspectiveProjection = {} ----@class Projection ---- Component that defines how to compute a [`Camera`]'s projection matrix.--- --- Common projections, like perspective and orthographic, are provided out of the box to handle the--- majority of use cases. Custom projections can be added using the [`CameraProjection`] trait and--- the [`Projection::custom`] constructor.--- --- ## What's a projection?--- --- A camera projection essentially describes how 3d points from the point of view of a camera are--- projected onto a 2d screen. This is where properties like a camera's field of view are defined.--- More specifically, a projection is a 4x4 matrix that transforms points from view space (the--- point of view of the camera) into clip space. Clip space is almost, but not quite, equivalent to--- the rectangle that is rendered to your screen, with a depth axis. Any points that land outside--- the bounds of this cuboid are "clipped" and not rendered.--- --- You can also think of the projection as the thing that describes the shape of a camera's--- frustum: the volume in 3d space that is visible to a camera.--- --- [`Camera`]: crate::camera::Camera +---@class Projection : ReflectReference +--- Component that defines how to compute a [`Camera`]'s projection matrix. +--- +--- Common projections, like perspective and orthographic, are provided out of the box to handle the +--- majority of use cases. Custom projections can be added using the [`CameraProjection`] trait and +--- the [`Projection::custom`] constructor. +--- +--- ## What's a projection? +--- +--- A camera projection essentially describes how 3d points from the point of view of a camera are +--- projected onto a 2d screen. This is where properties like a camera's field of view are defined. +--- More specifically, a projection is a 4x4 matrix that transforms points from view space (the +--- point of view of the camera) into clip space. Clip space is almost, but not quite, equivalent to +--- the rectangle that is rendered to your screen, with a depth axis. Any points that land outside +--- the bounds of this cuboid are "clipped" and not rendered. +--- +--- You can also think of the projection as the thing that describes the shape of a camera's +--- frustum: the volume in 3d space that is visible to a camera. +--- +--- [`Camera`]: crate::camera::Camera Projection = {} ----@class OcclusionCulling ---- Add this component to a view in order to enable experimental GPU occlusion--- culling.--- --- *Bevy's occlusion culling is currently marked as experimental.* There are--- known issues whereby, in rare circumstances, occlusion culling can result in--- meshes being culled that shouldn't be (i.e. meshes that turn invisible).--- Please try it out and report issues.--- --- *Occlusion culling* allows Bevy to avoid rendering objects that are fully--- behind other opaque or alpha tested objects. This is different from, and--- complements, depth fragment rejection as the `DepthPrepass` enables. While--- depth rejection allows Bevy to avoid rendering *pixels* that are behind--- other objects, the GPU still has to examine those pixels to reject them,--- which requires transforming the vertices of the objects and performing--- skinning if the objects were skinned. Occlusion culling allows the GPU to go--- a step further, avoiding even transforming the vertices of objects that it--- can quickly prove to be behind other objects.--- --- Occlusion culling inherently has some overhead, because Bevy must examine--- the objects' bounding boxes, and create an acceleration structure--- (hierarchical Z-buffer) to perform the occlusion tests. Therefore, occlusion--- culling is disabled by default. Only enable it if you measure it to be a--- speedup on your scene. Note that, because Bevy's occlusion culling runs on--- the GPU and is quite efficient, it's rare for occlusion culling to result in--- a significant slowdown.--- --- Occlusion culling currently requires a `DepthPrepass`. If no depth prepass--- is present on the view, the [`OcclusionCulling`] component will be ignored.--- Additionally, occlusion culling is currently incompatible with deferred--- shading; including both `DeferredPrepass` and [`OcclusionCulling`] results--- in unspecified behavior.--- --- The algorithm that Bevy uses is known as [*two-phase occlusion culling*].--- When you enable occlusion culling, Bevy splits the depth prepass into two:--- an *early* depth prepass and a *late* depth prepass. The early depth prepass--- renders all the meshes that were visible last frame to produce a--- conservative approximation of the depth buffer. Then, after producing an--- acceleration structure known as a hierarchical Z-buffer or depth pyramid,--- Bevy tests the bounding boxes of all meshes against that depth buffer. Those--- that can be quickly proven to be behind the geometry rendered during the--- early depth prepass are skipped entirely. The other potentially-visible--- meshes are rendered during the late prepass, and finally all the visible--- meshes are rendered as usual during the opaque, transparent, etc. passes.--- --- Unlike other occlusion culling systems you may be familiar with, Bevy's--- occlusion culling is fully dynamic and requires no baking step. The CPU--- overhead is minimal. Large skinned meshes and other dynamic objects can--- occlude other objects.--- --- [*two-phase occlusion culling*]:--- https://medium.com/@mil_kru/two-pass-occlusion-culling-4100edcad501 +---@class OcclusionCulling : ReflectReference +--- Add this component to a view in order to enable experimental GPU occlusion +--- culling. +--- +--- *Bevy's occlusion culling is currently marked as experimental.* There are +--- known issues whereby, in rare circumstances, occlusion culling can result in +--- meshes being culled that shouldn't be (i.e. meshes that turn invisible). +--- Please try it out and report issues. +--- +--- *Occlusion culling* allows Bevy to avoid rendering objects that are fully +--- behind other opaque or alpha tested objects. This is different from, and +--- complements, depth fragment rejection as the `DepthPrepass` enables. While +--- depth rejection allows Bevy to avoid rendering *pixels* that are behind +--- other objects, the GPU still has to examine those pixels to reject them, +--- which requires transforming the vertices of the objects and performing +--- skinning if the objects were skinned. Occlusion culling allows the GPU to go +--- a step further, avoiding even transforming the vertices of objects that it +--- can quickly prove to be behind other objects. +--- +--- Occlusion culling inherently has some overhead, because Bevy must examine +--- the objects' bounding boxes, and create an acceleration structure +--- (hierarchical Z-buffer) to perform the occlusion tests. Therefore, occlusion +--- culling is disabled by default. Only enable it if you measure it to be a +--- speedup on your scene. Note that, because Bevy's occlusion culling runs on +--- the GPU and is quite efficient, it's rare for occlusion culling to result in +--- a significant slowdown. +--- +--- Occlusion culling currently requires a `DepthPrepass`. If no depth prepass +--- is present on the view, the [`OcclusionCulling`] component will be ignored. +--- Additionally, occlusion culling is currently incompatible with deferred +--- shading; including both `DeferredPrepass` and [`OcclusionCulling`] results +--- in unspecified behavior. +--- +--- The algorithm that Bevy uses is known as [*two-phase occlusion culling*]. +--- When you enable occlusion culling, Bevy splits the depth prepass into two: +--- an *early* depth prepass and a *late* depth prepass. The early depth prepass +--- renders all the meshes that were visible last frame to produce a +--- conservative approximation of the depth buffer. Then, after producing an +--- acceleration structure known as a hierarchical Z-buffer or depth pyramid, +--- Bevy tests the bounding boxes of all meshes against that depth buffer. Those +--- that can be quickly proven to be behind the geometry rendered during the +--- early depth prepass are skipped entirely. The other potentially-visible +--- meshes are rendered during the late prepass, and finally all the visible +--- meshes are rendered as usual during the opaque, transparent, etc. passes. +--- +--- Unlike other occlusion culling systems you may be familiar with, Bevy's +--- occlusion culling is fully dynamic and requires no baking step. The CPU +--- overhead is minimal. Large skinned meshes and other dynamic objects can +--- occlude other objects. +--- +--- [*two-phase occlusion culling*]: +--- https://medium.com/@mil_kru/two-pass-occlusion-culling-4100edcad501 OcclusionCulling = {} ----@class GlobalsUniform ---- Contains global values useful when writing shaders.--- Currently only contains values related to time. +---@class GlobalsUniform : ReflectReference +--- Contains global values useful when writing shaders. +--- Currently only contains values related to time. ---@field time ? number ---@field delta_time ? number ---@field frame_count ? integer GlobalsUniform = {} ----@class Mesh2d ---- A component for 2D meshes. Requires a [`MeshMaterial2d`] to be rendered, commonly using a [`ColorMaterial`].--- --- [`MeshMaterial2d`]: --- [`ColorMaterial`]: --- --- # Example--- --- ```ignore--- # use bevy_sprite::{ColorMaterial, Mesh2d, MeshMaterial2d};--- # use bevy_ecs::prelude::*;--- # use bevy_render::mesh::Mesh;--- # use bevy_color::palettes::basic::RED;--- # use bevy_asset::Assets;--- # use bevy_math::primitives::Circle;--- #--- // Spawn an entity with a mesh using `ColorMaterial`.--- fn setup(--- mut commands: Commands,--- mut meshes: ResMut>,--- mut materials: ResMut>,--- ) {--- commands.spawn((--- Mesh2d(meshes.add(Circle::new(50.0))),--- MeshMaterial2d(materials.add(ColorMaterial::from_color(RED))),--- ));--- }--- ``` +---@class Mesh2d : ReflectReference +--- A component for 2D meshes. Requires a [`MeshMaterial2d`] to be rendered, commonly using a [`ColorMaterial`]. +--- +--- [`MeshMaterial2d`]: +--- [`ColorMaterial`]: +--- +--- # Example +--- +--- ```ignore +--- # use bevy_sprite::{ColorMaterial, Mesh2d, MeshMaterial2d}; +--- # use bevy_ecs::prelude::*; +--- # use bevy_render::mesh::Mesh; +--- # use bevy_color::palettes::basic::RED; +--- # use bevy_asset::Assets; +--- # use bevy_math::primitives::Circle; +--- # +--- // Spawn an entity with a mesh using `ColorMaterial`. +--- fn setup( +--- mut commands: Commands, +--- mut meshes: ResMut>, +--- mut materials: ResMut>, +--- ) { +--- commands.spawn(( +--- Mesh2d(meshes.add(Circle::new(50.0))), +--- MeshMaterial2d(materials.add(ColorMaterial::from_color(RED))), +--- )); +--- } +--- ``` ---@field [1] ? Handle Mesh2d = {} ----@class Mesh3d ---- A component for 3D meshes. Requires a [`MeshMaterial3d`] to be rendered, commonly using a [`StandardMaterial`].--- --- [`MeshMaterial3d`]: --- [`StandardMaterial`]: --- --- # Example--- --- ```ignore--- # use bevy_pbr::{Material, MeshMaterial3d, StandardMaterial};--- # use bevy_ecs::prelude::*;--- # use bevy_render::mesh::{Mesh, Mesh3d};--- # use bevy_color::palettes::basic::RED;--- # use bevy_asset::Assets;--- # use bevy_math::primitives::Capsule3d;--- #--- // Spawn an entity with a mesh using `StandardMaterial`.--- fn setup(--- mut commands: Commands,--- mut meshes: ResMut>,--- mut materials: ResMut>,--- ) {--- commands.spawn((--- Mesh3d(meshes.add(Capsule3d::default())),--- MeshMaterial3d(materials.add(StandardMaterial {--- base_color: RED.into(),--- ..Default::default()--- })),--- ));--- }--- ``` +---@class Mesh3d : ReflectReference +--- A component for 3D meshes. Requires a [`MeshMaterial3d`] to be rendered, commonly using a [`StandardMaterial`]. +--- +--- [`MeshMaterial3d`]: +--- [`StandardMaterial`]: +--- +--- # Example +--- +--- ```ignore +--- # use bevy_pbr::{Material, MeshMaterial3d, StandardMaterial}; +--- # use bevy_ecs::prelude::*; +--- # use bevy_render::mesh::{Mesh, Mesh3d}; +--- # use bevy_color::palettes::basic::RED; +--- # use bevy_asset::Assets; +--- # use bevy_math::primitives::Capsule3d; +--- # +--- // Spawn an entity with a mesh using `StandardMaterial`. +--- fn setup( +--- mut commands: Commands, +--- mut meshes: ResMut>, +--- mut materials: ResMut>, +--- ) { +--- commands.spawn(( +--- Mesh3d(meshes.add(Capsule3d::default())), +--- MeshMaterial3d(materials.add(StandardMaterial { +--- base_color: RED.into(), +--- ..Default::default() +--- })), +--- )); +--- } +--- ``` ---@field [1] ? Handle Mesh3d = {} ----@class Aabb ---- An axis-aligned bounding box, defined by:--- - a center,--- - the distances from the center to each faces along the axis,--- the faces are orthogonal to the axis.--- --- It is typically used as a component on an entity to represent the local space--- occupied by this entity, with faces orthogonal to its local axis.--- --- This component is notably used during "frustum culling", a process to determine--- if an entity should be rendered by a [`Camera`] if its bounding box intersects--- with the camera's [`Frustum`].--- --- It will be added automatically by the systems in [`CalculateBounds`] to entities that:--- - could be subject to frustum culling, for example with a [`Mesh3d`]--- or `Sprite` component,--- - don't have the [`NoFrustumCulling`] component.--- --- It won't be updated automatically if the space occupied by the entity changes,--- for example if the vertex positions of a [`Mesh3d`] are updated.--- --- [`Camera`]: crate::camera::Camera--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling--- [`CalculateBounds`]: crate::view::visibility::VisibilitySystems::CalculateBounds--- [`Mesh3d`]: crate::mesh::Mesh +---@class Aabb : ReflectReference +--- An axis-aligned bounding box, defined by: +--- - a center, +--- - the distances from the center to each faces along the axis, +--- the faces are orthogonal to the axis. +--- +--- It is typically used as a component on an entity to represent the local space +--- occupied by this entity, with faces orthogonal to its local axis. +--- +--- This component is notably used during "frustum culling", a process to determine +--- if an entity should be rendered by a [`Camera`] if its bounding box intersects +--- with the camera's [`Frustum`]. +--- +--- It will be added automatically by the systems in [`CalculateBounds`] to entities that: +--- - could be subject to frustum culling, for example with a [`Mesh3d`] +--- or `Sprite` component, +--- - don't have the [`NoFrustumCulling`] component. +--- +--- It won't be updated automatically if the space occupied by the entity changes, +--- for example if the vertex positions of a [`Mesh3d`] are updated. +--- +--- [`Camera`]: crate::camera::Camera +--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling +--- [`CalculateBounds`]: crate::view::visibility::VisibilitySystems::CalculateBounds +--- [`Mesh3d`]: crate::mesh::Mesh ---@field center ? Vec3A ---@field half_extents ? Vec3A Aabb = {} ----@class CascadesFrusta - +---@class CascadesFrusta : ReflectReference CascadesFrusta = {} ----@class CubemapFrusta - +---@class CubemapFrusta : ReflectReference CubemapFrusta = {} ----@class Frustum ---- A region of 3D space defined by the intersection of 6 [`HalfSpace`]s.--- --- Frustums are typically an apex-truncated square pyramid (a pyramid without the top) or a cuboid.--- --- Half spaces are ordered left, right, top, bottom, near, far. The normal vectors--- of the half-spaces point towards the interior of the frustum.--- --- A frustum component is used on an entity with a [`Camera`] component to--- determine which entities will be considered for rendering by this camera.--- All entities with an [`Aabb`] component that are not contained by (or crossing--- the boundary of) the frustum will not be rendered, and not be used in rendering computations.--- --- This process is called frustum culling, and entities can opt out of it using--- the [`NoFrustumCulling`] component.--- --- The frustum component is typically added automatically for cameras, either `Camera2d` or `Camera3d`.--- It is usually updated automatically by [`update_frusta`] from the--- [`CameraProjection`] component and [`GlobalTransform`] of the camera entity.--- --- [`Camera`]: crate::camera::Camera--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling--- [`update_frusta`]: crate::view::visibility::update_frusta--- [`CameraProjection`]: crate::camera::CameraProjection--- [`GlobalTransform`]: bevy_transform::components::GlobalTransform +---@class Frustum : ReflectReference +--- A region of 3D space defined by the intersection of 6 [`HalfSpace`]s. +--- +--- Frustums are typically an apex-truncated square pyramid (a pyramid without the top) or a cuboid. +--- +--- Half spaces are ordered left, right, top, bottom, near, far. The normal vectors +--- of the half-spaces point towards the interior of the frustum. +--- +--- A frustum component is used on an entity with a [`Camera`] component to +--- determine which entities will be considered for rendering by this camera. +--- All entities with an [`Aabb`] component that are not contained by (or crossing +--- the boundary of) the frustum will not be rendered, and not be used in rendering computations. +--- +--- This process is called frustum culling, and entities can opt out of it using +--- the [`NoFrustumCulling`] component. +--- +--- The frustum component is typically added automatically for cameras, either `Camera2d` or `Camera3d`. +--- It is usually updated automatically by [`update_frusta`] from the +--- [`CameraProjection`] component and [`GlobalTransform`] of the camera entity. +--- +--- [`Camera`]: crate::camera::Camera +--- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling +--- [`update_frusta`]: crate::view::visibility::update_frusta +--- [`CameraProjection`]: crate::camera::CameraProjection +--- [`GlobalTransform`]: bevy_transform::components::GlobalTransform Frustum = {} ----@class ShaderStorageBuffer +---@class ShaderStorageBuffer : ReflectReference --- A storage buffer that is prepared as a [`RenderAsset`] and uploaded to the GPU. ShaderStorageBuffer = {} ----@class SyncToRenderWorld ---- Marker component that indicates that its entity needs to be synchronized to the render world.--- --- This component is automatically added as a required component by [`ExtractComponentPlugin`] and [`SyncComponentPlugin`].--- For more information see [`SyncWorldPlugin`].--- --- NOTE: This component should persist throughout the entity's entire lifecycle.--- If this component is removed from its entity, the entity will be despawned.--- --- [`ExtractComponentPlugin`]: crate::extract_component::ExtractComponentPlugin--- [`SyncComponentPlugin`]: crate::sync_component::SyncComponentPlugin +---@class SyncToRenderWorld : ReflectReference +--- Marker component that indicates that its entity needs to be synchronized to the render world. +--- +--- This component is automatically added as a required component by [`ExtractComponentPlugin`] and [`SyncComponentPlugin`]. +--- For more information see [`SyncWorldPlugin`]. +--- +--- NOTE: This component should persist throughout the entity's entire lifecycle. +--- If this component is removed from its entity, the entity will be despawned. +--- +--- [`ExtractComponentPlugin`]: crate::extract_component::ExtractComponentPlugin +--- [`SyncComponentPlugin`]: crate::sync_component::SyncComponentPlugin SyncToRenderWorld = {} ----@class ColorGrading ---- Configures filmic color grading parameters to adjust the image appearance.--- --- Color grading is applied just before tonemapping for a given--- [`Camera`](crate::camera::Camera) entity, with the sole exception of the--- `post_saturation` value in [`ColorGradingGlobal`], which is applied after--- tonemapping. +---@class ColorGrading : ReflectReference +--- Configures filmic color grading parameters to adjust the image appearance. +--- +--- Color grading is applied just before tonemapping for a given +--- [`Camera`](crate::camera::Camera) entity, with the sole exception of the +--- `post_saturation` value in [`ColorGradingGlobal`], which is applied after +--- tonemapping. ---@field global ? ColorGradingGlobal ---@field shadows ? ColorGradingSection ---@field midtones ? ColorGradingSection @@ -28405,8 +22634,9 @@ SyncToRenderWorld = {} ColorGrading = {} ----@class ColorGradingGlobal ---- Filmic color grading values applied to the image as a whole (as opposed to--- individual sections, like shadows and highlights). +---@class ColorGradingGlobal : ReflectReference +--- Filmic color grading values applied to the image as a whole (as opposed to +--- individual sections, like shadows and highlights). ---@field exposure ? number ---@field temperature ? number ---@field tint ? number @@ -28416,8 +22646,9 @@ ColorGrading = {} ColorGradingGlobal = {} ----@class ColorGradingSection ---- A section of color grading values that can be selectively applied to--- shadows, midtones, and highlights. +---@class ColorGradingSection : ReflectReference +--- A section of color grading values that can be selectively applied to +--- shadows, midtones, and highlights. ---@field saturation ? number ---@field contrast ? number ---@field gamma ? number @@ -28426,71 +22657,199 @@ ColorGradingGlobal = {} ColorGradingSection = {} ----@class Msaa ---- Component for configuring the number of samples for [Multi-Sample Anti-Aliasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing)--- for a [`Camera`](crate::camera::Camera).--- --- Defaults to 4 samples. A higher number of samples results in smoother edges.--- --- Some advanced rendering features may require that MSAA is disabled.--- --- Note that the web currently only supports 1 or 4 samples. +---@class Msaa : ReflectReference +--- Component for configuring the number of samples for [Multi-Sample Anti-Aliasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing) +--- for a [`Camera`](crate::camera::Camera). +--- +--- Defaults to 4 samples. A higher number of samples results in smoother edges. +--- +--- Some advanced rendering features may require that MSAA is disabled. +--- +--- Note that the web currently only supports 1 or 4 samples. Msaa = {} ----@class InheritedVisibility ---- Whether or not an entity is visible in the hierarchy.--- This will not be accurate until [`VisibilityPropagate`] runs in the [`PostUpdate`] schedule.--- --- If this is false, then [`ViewVisibility`] should also be false.--- --- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate +---@class InheritedVisibility : ReflectReference +--- Whether or not an entity is visible in the hierarchy. +--- This will not be accurate until [`VisibilityPropagate`] runs in the [`PostUpdate`] schedule. +--- +--- If this is false, then [`ViewVisibility`] should also be false. +--- +--- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate ---@field [1] ? boolean InheritedVisibility = {} ----@class NoFrustumCulling ---- Use this component to opt-out of built-in frustum culling for entities, see--- [`Frustum`].--- --- It can be used for example:--- - when a [`Mesh`] is updated but its [`Aabb`] is not, which might happen with animations,--- - when using some light effects, like wanting a [`Mesh`] out of the [`Frustum`]--- to appear in the reflection of a [`Mesh`] within. +---@class NoFrustumCulling : ReflectReference +--- Use this component to opt-out of built-in frustum culling for entities, see +--- [`Frustum`]. +--- +--- It can be used for example: +--- - when a [`Mesh`] is updated but its [`Aabb`] is not, which might happen with animations, +--- - when using some light effects, like wanting a [`Mesh`] out of the [`Frustum`] +--- to appear in the reflection of a [`Mesh`] within. NoFrustumCulling = {} ----@class ViewVisibility ---- Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering.--- --- Each frame, this will be reset to `false` during [`VisibilityPropagate`] systems in [`PostUpdate`].--- Later in the frame, systems in [`CheckVisibility`] will mark any visible entities using [`ViewVisibility::set`].--- Because of this, values of this type will be marked as changed every frame, even when they do not change.--- --- If you wish to add custom visibility system that sets this value, make sure you add it to the [`CheckVisibility`] set.--- --- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate--- [`CheckVisibility`]: VisibilitySystems::CheckVisibility +---@class ViewVisibility : ReflectReference +--- Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering. +--- +--- Each frame, this will be reset to `false` during [`VisibilityPropagate`] systems in [`PostUpdate`]. +--- Later in the frame, systems in [`CheckVisibility`] will mark any visible entities using [`ViewVisibility::set`]. +--- Because of this, values of this type will be marked as changed every frame, even when they do not change. +--- +--- If you wish to add custom visibility system that sets this value, make sure you add it to the [`CheckVisibility`] set. +--- +--- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate +--- [`CheckVisibility`]: VisibilitySystems::CheckVisibility ---@field [1] ? boolean ViewVisibility = {} ----@class Visibility ---- User indication of whether an entity is visible. Propagates down the entity hierarchy.--- --- If an entity is hidden in this way, all [`Children`] (and all of their children and so on) who--- are set to [`Inherited`](Self::Inherited) will also be hidden.--- --- This is done by the `visibility_propagate_system` which uses the entity hierarchy and--- `Visibility` to set the values of each entity's [`InheritedVisibility`] component. +---@class Visibility : ReflectReference +--- User indication of whether an entity is visible. Propagates down the entity hierarchy. +--- +--- If an entity is hidden in this way, all [`Children`] (and all of their children and so on) who +--- are set to [`Inherited`](Self::Inherited) will also be hidden. +--- +--- This is done by the `visibility_propagate_system` which uses the entity hierarchy and +--- `Visibility` to set the values of each entity's [`InheritedVisibility`] component. Visibility = {} ----@class VisibilityClass ---- A bucket into which we group entities for the purposes of visibility.--- --- Bevy's various rendering subsystems (3D, 2D, UI, etc.) want to be able to--- quickly winnow the set of entities to only those that the subsystem is--- tasked with rendering, to avoid spending time examining irrelevant entities.--- At the same time, Bevy wants the [`check_visibility`] system to determine--- all entities' visibilities at the same time, regardless of what rendering--- subsystem is responsible for drawing them. Additionally, your application--- may want to add more types of renderable objects that Bevy determines--- visibility for just as it does for Bevy's built-in objects.--- --- The solution to this problem is *visibility classes*. A visibility class is--- a type, typically the type of a component, that represents the subsystem--- that renders it: for example, `Mesh3d`, `Mesh2d`, and `Sprite`. The--- [`VisibilityClass`] component stores the visibility class or classes that--- the entity belongs to. (Generally, an object will belong to only one--- visibility class, but in rare cases it may belong to multiple.)--- --- When adding a new renderable component, you'll typically want to write an--- add-component hook that adds the type ID of that component to the--- [`VisibilityClass`] array. See `custom_phase_item` for an example. +---@class VisibilityClass : ReflectReference +--- A bucket into which we group entities for the purposes of visibility. +--- +--- Bevy's various rendering subsystems (3D, 2D, UI, etc.) want to be able to +--- quickly winnow the set of entities to only those that the subsystem is +--- tasked with rendering, to avoid spending time examining irrelevant entities. +--- At the same time, Bevy wants the [`check_visibility`] system to determine +--- all entities' visibilities at the same time, regardless of what rendering +--- subsystem is responsible for drawing them. Additionally, your application +--- may want to add more types of renderable objects that Bevy determines +--- visibility for just as it does for Bevy's built-in objects. +--- +--- The solution to this problem is *visibility classes*. A visibility class is +--- a type, typically the type of a component, that represents the subsystem +--- that renders it: for example, `Mesh3d`, `Mesh2d`, and `Sprite`. The +--- [`VisibilityClass`] component stores the visibility class or classes that +--- the entity belongs to. (Generally, an object will belong to only one +--- visibility class, but in rare cases it may belong to multiple.) +--- +--- When adding a new renderable component, you'll typically want to write an +--- add-component hook that adds the type ID of that component to the +--- [`VisibilityClass`] array. See `custom_phase_item` for an example. ---@field [1] ? SmallVec VisibilityClass = {} ----@class VisibleEntities ---- Collection of entities visible from the current view.--- --- This component contains all entities which are visible from the currently--- rendered view. The collection is updated automatically by the [`VisibilitySystems::CheckVisibility`]--- system set. Renderers can use the equivalent [`RenderVisibleEntities`] to optimize rendering of--- a particular view, to prevent drawing items not visible from that view.--- --- This component is intended to be attached to the same entity as the [`Camera`] and--- the [`Frustum`] defining the view. +---@class VisibleEntities : ReflectReference +--- Collection of entities visible from the current view. +--- +--- This component contains all entities which are visible from the currently +--- rendered view. The collection is updated automatically by the [`VisibilitySystems::CheckVisibility`] +--- system set. Renderers can use the equivalent [`RenderVisibleEntities`] to optimize rendering of +--- a particular view, to prevent drawing items not visible from that view. +--- +--- This component is intended to be attached to the same entity as the [`Camera`] and +--- the [`Frustum`] defining the view. VisibleEntities = {} ----@class VisibilityRange ---- Specifies the range of distances that this entity must be from the camera in--- order to be rendered.--- --- This is also known as *hierarchical level of detail* or *HLOD*.--- --- Use this component when you want to render a high-polygon mesh when the--- camera is close and a lower-polygon mesh when the camera is far away. This--- is a common technique for improving performance, because fine details are--- hard to see in a mesh at a distance. To avoid an artifact known as *popping*--- between levels, each level has a *margin*, within which the object--- transitions gradually from invisible to visible using a dithering effect.--- --- You can also use this feature to replace multiple meshes with a single mesh--- when the camera is distant. This is the reason for the term "*hierarchical*--- level of detail". Reducing the number of meshes can be useful for reducing--- drawcall count. Note that you must place the [`VisibilityRange`] component--- on each entity you want to be part of a LOD group, as [`VisibilityRange`]--- isn't automatically propagated down to children.--- --- A typical use of this feature might look like this:--- --- | Entity | `start_margin` | `end_margin` |--- |-------------------------|----------------|--------------|--- | Root | N/A | N/A |--- | ├─ High-poly mesh | [0, 0) | [20, 25) |--- | ├─ Low-poly mesh | [20, 25) | [70, 75) |--- | └─ Billboard *imposter* | [70, 75) | [150, 160) |--- --- With this setup, the user will see a high-poly mesh when the camera is--- closer than 20 units. As the camera zooms out, between 20 units to 25 units,--- the high-poly mesh will gradually fade to a low-poly mesh. When the camera--- is 70 to 75 units away, the low-poly mesh will fade to a single textured--- quad. And between 150 and 160 units, the object fades away entirely. Note--- that the `end_margin` of a higher LOD is always identical to the--- `start_margin` of the next lower LOD; this is important for the crossfade--- effect to function properly. +---@class VisibilityRange : ReflectReference +--- Specifies the range of distances that this entity must be from the camera in +--- order to be rendered. +--- +--- This is also known as *hierarchical level of detail* or *HLOD*. +--- +--- Use this component when you want to render a high-polygon mesh when the +--- camera is close and a lower-polygon mesh when the camera is far away. This +--- is a common technique for improving performance, because fine details are +--- hard to see in a mesh at a distance. To avoid an artifact known as *popping* +--- between levels, each level has a *margin*, within which the object +--- transitions gradually from invisible to visible using a dithering effect. +--- +--- You can also use this feature to replace multiple meshes with a single mesh +--- when the camera is distant. This is the reason for the term "*hierarchical* +--- level of detail". Reducing the number of meshes can be useful for reducing +--- drawcall count. Note that you must place the [`VisibilityRange`] component +--- on each entity you want to be part of a LOD group, as [`VisibilityRange`] +--- isn't automatically propagated down to children. +--- +--- A typical use of this feature might look like this: +--- +--- | Entity | `start_margin` | `end_margin` | +--- |-------------------------|----------------|--------------| +--- | Root | N/A | N/A | +--- | ├─ High-poly mesh | [0, 0) | [20, 25) | +--- | ├─ Low-poly mesh | [20, 25) | [70, 75) | +--- | └─ Billboard *imposter* | [70, 75) | [150, 160) | +--- +--- With this setup, the user will see a high-poly mesh when the camera is +--- closer than 20 units. As the camera zooms out, between 20 units to 25 units, +--- the high-poly mesh will gradually fade to a low-poly mesh. When the camera +--- is 70 to 75 units away, the low-poly mesh will fade to a single textured +--- quad. And between 150 and 160 units, the object fades away entirely. Note +--- that the `end_margin` of a higher LOD is always identical to the +--- `start_margin` of the next lower LOD; this is important for the crossfade +--- effect to function properly. ---@field start_margin ? Range ---@field end_margin ? Range ---@field use_aabb ? boolean VisibilityRange = {} ----@class RenderLayers ---- Describes which rendering layers an entity belongs to.--- --- Cameras with this component will only render entities with intersecting--- layers.--- --- Entities may belong to one or more layers, or no layer at all.--- --- The [`Default`] instance of `RenderLayers` contains layer `0`, the first layer.--- --- An entity with this component without any layers is invisible.--- --- Entities without this component belong to layer `0`. +---@class RenderLayers : ReflectReference +--- Describes which rendering layers an entity belongs to. +--- +--- Cameras with this component will only render entities with intersecting +--- layers. +--- +--- Entities may belong to one or more layers, or no layer at all. +--- +--- The [`Default`] instance of `RenderLayers` contains layer `0`, the first layer. +--- +--- An entity with this component without any layers is invisible. +--- +--- Entities without this component belong to layer `0`. ---@field [1] ? SmallVec RenderLayers = {} ----@class Screenshot ---- A component that signals to the renderer to capture a screenshot this frame.--- --- This component should be spawned on a new entity with an observer that will trigger--- with [`ScreenshotCaptured`] when the screenshot is ready.--- --- Screenshots are captured asynchronously and may not be available immediately after the frame--- that the component is spawned on. The observer should be used to handle the screenshot when it--- is ready.--- --- Note that the screenshot entity will be despawned after the screenshot is captured and the--- observer is triggered.--- --- # Usage--- --- ```--- # use bevy_ecs::prelude::*;--- # use bevy_render::view::screenshot::{save_to_disk, Screenshot};--- --- fn take_screenshot(mut commands: Commands) {--- commands.spawn(Screenshot::primary_window())--- .observe(save_to_disk("screenshot.png"));--- }--- ``` +---@class Screenshot : ReflectReference +--- A component that signals to the renderer to capture a screenshot this frame. +--- +--- This component should be spawned on a new entity with an observer that will trigger +--- with [`ScreenshotCaptured`] when the screenshot is ready. +--- +--- Screenshots are captured asynchronously and may not be available immediately after the frame +--- that the component is spawned on. The observer should be used to handle the screenshot when it +--- is ready. +--- +--- Note that the screenshot entity will be despawned after the screenshot is captured and the +--- observer is triggered. +--- +--- # Usage +--- +--- ``` +--- # use bevy_ecs::prelude::*; +--- # use bevy_render::view::screenshot::{save_to_disk, Screenshot}; +--- +--- fn take_screenshot(mut commands: Commands) { +--- commands.spawn(Screenshot::primary_window()) +--- .observe(save_to_disk("screenshot.png")); +--- } +--- ``` ---@field [1] ? RenderTarget Screenshot = {} ----@class ScreenshotCaptured - +---@class ScreenshotCaptured : ReflectReference ---@field [1] ? Image ScreenshotCaptured = {} ----@class ColorMaterial +---@class ColorMaterial : ReflectReference --- A [2d material](Material2d) that renders [2d meshes](crate::Mesh2d) with a texture tinted by a uniform color ---@field color ? Color ---@field alpha_mode ? AlphaMode2d @@ -28499,17 +22858,22 @@ ScreenshotCaptured = {} ColorMaterial = {} ----@class AlphaMode2d ---- Sets how a 2d material's base color alpha channel is used for transparency.--- Currently, this only works with [`Mesh2d`]. Sprites are always transparent.--- --- This is very similar to [`AlphaMode`](bevy_render::alpha::AlphaMode) but this only applies to 2d meshes.--- We use a separate type because 2d doesn't support all the transparency modes that 3d does. +---@class AlphaMode2d : ReflectReference +--- Sets how a 2d material's base color alpha channel is used for transparency. +--- Currently, this only works with [`Mesh2d`]. Sprites are always transparent. +--- +--- This is very similar to [`AlphaMode`](bevy_render::alpha::AlphaMode) but this only applies to 2d meshes. +--- We use a separate type because 2d doesn't support all the transparency modes that 3d does. AlphaMode2d = {} ----@class Anchor ---- How a sprite is positioned relative to its [`Transform`].--- It defaults to `Anchor::Center`. +---@class Anchor : ReflectReference +--- How a sprite is positioned relative to its [`Transform`]. +--- It defaults to `Anchor::Center`. Anchor = {} ----@class Sprite +---@class Sprite : ReflectReference --- Describes a sprite to be rendered to a 2D camera ---@field image ? Handle ---@field texture_atlas ? Option @@ -28523,13 +22887,16 @@ Anchor = {} Sprite = {} ----@class SpriteImageMode +---@class SpriteImageMode : ReflectReference --- Controls how the image is altered when scaled. SpriteImageMode = {} ----@class BorderRect ---- Defines the extents of the border of a rectangle.--- --- This struct is used to represent thickness or offsets from the edges--- of a rectangle (left, right, top, and bottom), with values increasing inwards. +---@class BorderRect : ReflectReference +--- Defines the extents of the border of a rectangle. +--- +--- This struct is used to represent thickness or offsets from the edges +--- of a rectangle (left, right, top, and bottom), with values increasing inwards. ---@field left ? number ---@field right ? number ---@field top ? number @@ -28537,13 +22904,20 @@ SpriteImageMode = {} BorderRect = {} ----@class SliceScaleMode +---@class SliceScaleMode : ReflectReference --- Defines how a texture slice scales when resized SliceScaleMode = {} ----@class TextureSlicer ---- Slices a texture using the **9-slicing** technique. This allows to reuse an image at various sizes--- without needing to prepare multiple assets. The associated texture will be split into nine portions,--- so that on resize the different portions scale or tile in different ways to keep the texture in proportion.--- --- For example, when resizing a 9-sliced texture the corners will remain unscaled while the other--- sections will be scaled or tiled.--- --- See [9-sliced](https://en.wikipedia.org/wiki/9-slice_scaling) textures. +---@class TextureSlicer : ReflectReference +--- Slices a texture using the **9-slicing** technique. This allows to reuse an image at various sizes +--- without needing to prepare multiple assets. The associated texture will be split into nine portions, +--- so that on resize the different portions scale or tile in different ways to keep the texture in proportion. +--- +--- For example, when resizing a 9-sliced texture the corners will remain unscaled while the other +--- sections will be scaled or tiled. +--- +--- See [9-sliced](https://en.wikipedia.org/wiki/9-slice_scaling) textures. ---@field border ? BorderRect ---@field center_scale_mode ? SliceScaleMode ---@field sides_scale_mode ? SliceScaleMode @@ -28551,115 +22925,1137 @@ SliceScaleMode = {} TextureSlicer = {} ----@class ReflectableScheduleLabel - +---@class ReflectableScheduleLabel : ReflectReference ReflectableScheduleLabel = {} ----@class AppLifecycle ---- Application lifetime events -AppLifecycle = {} +---@class TextBounds : ReflectReference +--- The maximum width and height of text. The text will wrap according to the specified size. +--- +--- Characters out of the bounds after wrapping will be truncated. Text is aligned according to the +--- specified [`JustifyText`](crate::text::JustifyText). +--- +--- Note: only characters that are completely out of the bounds will be truncated, so this is not a +--- reliable limit if it is necessary to contain the text strictly in the bounds. Currently this +--- component is mainly useful for text wrapping only. +---@field width ? Option +---@field height ? Option +TextBounds = {} + + +---@class GlyphAtlasInfo : ReflectReference +--- Information about a glyph in an atlas. +--- +--- Rasterized glyphs are stored as rectangles +--- in one or more [`FontAtlas`](crate::FontAtlas)es. +--- +--- Used in [`PositionedGlyph`] and [`FontAtlasSet`](crate::FontAtlasSet). +---@field texture ? Handle +---@field texture_atlas ? Handle +---@field location ? GlyphAtlasLocation +GlyphAtlasInfo = {} + + +---@class GlyphAtlasLocation : ReflectReference +--- The location of a glyph in an atlas, +--- and how it should be positioned when placed. +--- +--- Used in [`GlyphAtlasInfo`] and [`FontAtlas`](crate::FontAtlas). +---@field glyph_index ? integer +---@field offset ? IVec2 +GlyphAtlasLocation = {} + + +---@class PositionedGlyph : ReflectReference +--- A glyph of a font, typically representing a single character, positioned in screen space. +--- +--- Contains information about how and where to render a glyph. +--- +--- Used in [`TextPipeline::queue_text`](crate::TextPipeline::queue_text) and [`crate::TextLayoutInfo`] for rendering glyphs. +---@field position ? Vec2 +---@field size ? Vec2 +---@field atlas_info ? GlyphAtlasInfo +---@field span_index ? integer +---@field line_index ? integer +---@field byte_index ? integer +---@field byte_length ? integer +PositionedGlyph = {} + + +---@class TextLayoutInfo : ReflectReference +--- Render information for a corresponding text block. +--- +--- Contains scaled glyphs and their size. Generated via [`TextPipeline::queue_text`] when an entity has +--- [`TextLayout`] and [`ComputedTextBlock`] components. +---@field glyphs ? Vec +---@field size ? Vec2 +TextLayoutInfo = {} + + +---@class Text2d : ReflectReference +--- The top-level 2D text component. +--- +--- Adding `Text2d` to an entity will pull in required components for setting up 2d text. +--- [Example usage.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/text2d.rs) +--- +--- The string in this component is the first 'text span' in a hierarchy of text spans that are collected into +--- a [`ComputedTextBlock`]. See [`TextSpan`](crate::TextSpan) for the component used by children of entities with [`Text2d`]. +--- +--- With `Text2d` the `justify` field of [`TextLayout`] only affects the internal alignment of a block of text and not its +--- relative position, which is controlled by the [`Anchor`] component. +--- This means that for a block of text consisting of only one line that doesn't wrap, the `justify` field will have no effect. +--- +--- +--- ``` +--- # use bevy_asset::Handle; +--- # use bevy_color::Color; +--- # use bevy_color::palettes::basic::BLUE; +--- # use bevy_ecs::world::World; +--- # use bevy_text::{Font, JustifyText, Text2d, TextLayout, TextFont, TextColor, TextSpan}; +--- # +--- # let font_handle: Handle = Default::default(); +--- # let mut world = World::default(); +--- # +--- // Basic usage. +--- world.spawn(Text2d::new("hello world!")); +--- +--- // With non-default style. +--- world.spawn(( +--- Text2d::new("hello world!"), +--- TextFont { +--- font: font_handle.clone().into(), +--- font_size: 60.0, +--- ..Default::default() +--- }, +--- TextColor(BLUE.into()), +--- )); +--- +--- // With text justification. +--- world.spawn(( +--- Text2d::new("hello world\nand bevy!"), +--- TextLayout::new_with_justify(JustifyText::Center) +--- )); +--- +--- // With spans +--- world.spawn(Text2d::new("hello ")).with_children(|parent| { +--- parent.spawn(TextSpan::new("world")); +--- parent.spawn((TextSpan::new("!"), TextColor(BLUE.into()))); +--- }); +--- ``` +---@field [1] ? string +Text2d = {} + + +---@class ComputedTextBlock : ReflectReference +--- Computed information for a text block. +--- +--- See [`TextLayout`]. +--- +--- Automatically updated by 2d and UI text systems. +---@field entities ? SmallVec +---@field needs_rerender ? boolean +ComputedTextBlock = {} + + +---@class FontSmoothing : ReflectReference +--- Determines which antialiasing method to use when rendering text. By default, text is +--- rendered with grayscale antialiasing, but this can be changed to achieve a pixelated look. +--- +--- **Note:** Subpixel antialiasing is not currently supported. +FontSmoothing = {} + + +---@class JustifyText : ReflectReference +--- Describes the horizontal alignment of multiple lines of text relative to each other. +--- +--- This only affects the internal positioning of the lines of text within a text entity and +--- does not affect the text entity's position. +--- +--- _Has no affect on a single line text entity_, unless used together with a +--- [`TextBounds`](super::bounds::TextBounds) component with an explicit `width` value. +JustifyText = {} + + +---@class LineBreak : ReflectReference +--- Determines how lines will be broken when preventing text from running out of bounds. +LineBreak = {} + + +---@class LineHeight : ReflectReference +--- Specifies the height of each line of text for `Text` and `Text2d` +--- +--- Default is 1.2x the font size +LineHeight = {} + + +---@class TextColor : ReflectReference +--- The color of the text for this section. +---@field [1] ? Color +TextColor = {} ----@class CursorEntered ---- An event that is sent whenever the user's cursor enters a window. ----@field window ? Entity -CursorEntered = {} +---@class TextEntity : ReflectReference +--- A sub-entity of a [`ComputedTextBlock`]. +--- +--- Returned by [`ComputedTextBlock::entities`]. +---@field entity ? Entity +---@field depth ? integer +TextEntity = {} + + +---@class TextFont : ReflectReference +--- `TextFont` determines the style of a text span within a [`ComputedTextBlock`], specifically +--- the font face, the font size, and the color. +---@field font ? bevy_asset::handle::Handle +---@field font_size ? number +---@field line_height ? LineHeight +---@field font_smoothing ? FontSmoothing +TextFont = {} + + +---@class TextLayout : ReflectReference +--- Component with text format settings for a block of text. +--- +--- A block of text is composed of text spans, which each have a separate string value and [`TextFont`]. Text +--- spans associated with a text block are collected into [`ComputedTextBlock`] for layout, and then inserted +--- to [`TextLayoutInfo`] for rendering. +--- +--- See [`Text2d`](crate::Text2d) for the core component of 2d text, and `Text` in `bevy_ui` for UI text. +---@field justify ? JustifyText +---@field linebreak ? LineBreak +TextLayout = {} + + +---@class TextSpan : ReflectReference +--- A span of text in a tree of spans. +--- +--- `TextSpan` is only valid as a child of an entity with [`TextLayout`], which is provided by `Text` +--- for text in `bevy_ui` or `Text2d` for text in 2d world-space. +--- +--- Spans are collected in hierarchy traversal order into a [`ComputedTextBlock`] for layout. +--- +--- ``` +--- # use bevy_asset::Handle; +--- # use bevy_color::Color; +--- # use bevy_color::palettes::basic::{RED, BLUE}; +--- # use bevy_ecs::world::World; +--- # use bevy_text::{Font, TextLayout, TextFont, TextSpan, TextColor}; +--- +--- # let font_handle: Handle = Default::default(); +--- # let mut world = World::default(); +--- # +--- world.spawn(( +--- // `Text` or `Text2d` are needed, and will provide default instances +--- // of the following components. +--- TextLayout::default(), +--- TextFont { +--- font: font_handle.clone().into(), +--- font_size: 60.0, +--- ..Default::default() +--- }, +--- TextColor(BLUE.into()), +--- )) +--- .with_child(( +--- // Children must be `TextSpan`, not `Text` or `Text2d`. +--- TextSpan::new("Hello!"), +--- TextFont { +--- font: font_handle.into(), +--- font_size: 60.0, +--- ..Default::default() +--- }, +--- TextColor(RED.into()), +--- )); +--- ``` +---@field [1] ? string +TextSpan = {} + + +---@class UiScale : ReflectReference +--- The current scale of the UI. +--- +--- A multiplier to fixed-sized ui values. +--- **Note:** This will only affect fixed ui values like [`Val::Px`] +---@field [1] ? number +UiScale = {} + + +---@class FocusPolicy : ReflectReference +--- Describes whether the node should block interactions with lower nodes +FocusPolicy = {} + + +---@class Interaction : ReflectReference +--- Describes what type of input interaction has occurred for a UI node. +--- +--- This is commonly queried with a `Changed` filter. +--- +--- Updated in [`ui_focus_system`]. +--- +--- If a UI node has both [`Interaction`] and [`InheritedVisibility`] components, +--- [`Interaction`] will always be [`Interaction::None`] +--- when [`InheritedVisibility::get()`] is false. +--- This ensures that hidden UI nodes are not interactable, +--- and do not end up stuck in an active state if hidden at the wrong time. +--- +--- Note that you can also control the visibility of a node using the [`Display`](crate::ui_node::Display) property, +--- which fully collapses it during layout calculations. +--- +--- # See also +--- +--- - [`Button`](crate::widget::Button) which requires this component +--- - [`RelativeCursorPosition`] to obtain the position of the cursor relative to current node +Interaction = {} + + +---@class RelativeCursorPosition : ReflectReference +--- A component storing the position of the mouse relative to the node, (0., 0.) being the top-left corner and (1., 1.) being the bottom-right +--- If the mouse is not over the node, the value will go beyond the range of (0., 0.) to (1., 1.) +--- +--- It can be used alongside [`Interaction`] to get the position of the press. +--- +--- The component is updated when it is in the same entity with [`Node`](crate::Node). +---@field normalized_visible_node_rect ? Rect +---@field normalized ? Option +RelativeCursorPosition = {} + + +---@class UiRect : ReflectReference +--- A type which is commonly used to define margins, paddings and borders. +--- +--- # Examples +--- +--- ## Margin +--- +--- A margin is used to create space around UI elements, outside of any defined borders. +--- +--- ``` +--- # use bevy_ui::{UiRect, Val}; +--- # +--- let margin = UiRect::all(Val::Auto); // Centers the UI element +--- ``` +--- +--- ## Padding +--- +--- A padding is used to create space around UI elements, inside of any defined borders. +--- +--- ``` +--- # use bevy_ui::{UiRect, Val}; +--- # +--- let padding = UiRect { +--- left: Val::Px(10.0), +--- right: Val::Px(20.0), +--- top: Val::Px(30.0), +--- bottom: Val::Px(40.0), +--- }; +--- ``` +--- +--- ## Borders +--- +--- A border is used to define the width of the border of a UI element. +--- +--- ``` +--- # use bevy_ui::{UiRect, Val}; +--- # +--- let border = UiRect { +--- left: Val::Px(10.0), +--- right: Val::Px(20.0), +--- top: Val::Px(30.0), +--- bottom: Val::Px(40.0), +--- }; +--- ``` +---@field left ? Val +---@field right ? Val +---@field top ? Val +---@field bottom ? Val +UiRect = {} + + +---@class Val : ReflectReference +--- Represents the possible value types for layout properties. +--- +--- This enum allows specifying values for various [`Node`](crate::Node) properties in different units, +--- such as logical pixels, percentages, or automatically determined values. +--- +--- `Val` also implements [`core::str::FromStr`] to allow parsing values from strings in the format `#.#px`. Whitespaces between the value and unit is allowed. The following units are supported: +--- * `px`: logical pixels +--- * `%`: percentage +--- * `vw`: percentage of the viewport width +--- * `vh`: percentage of the viewport height +--- * `vmin`: percentage of the viewport's smaller dimension +--- * `vmax`: percentage of the viewport's larger dimension +--- +--- Additionally, `auto` will be parsed as [`Val::Auto`]. +Val = {} + + +---@class ContentSize : ReflectReference +--- A node with a `ContentSize` component is a node where its size +--- is based on its content. +ContentSize = {} + + +---@class AlignContent : ReflectReference +--- Used to control how items are distributed. +--- - For Flexbox containers, controls alignment of lines if `flex_wrap` is set to [`FlexWrap::Wrap`] and there are multiple lines of items. +--- - For CSS Grid containers, controls alignment of grid rows. +--- +--- +AlignContent = {} + + +---@class AlignItems : ReflectReference +--- Used to control how each individual item is aligned by default within the space they're given. +--- - For Flexbox containers, sets default cross axis alignment of the child items. +--- - For CSS Grid containers, controls block (vertical) axis alignment of children of this grid container within their grid areas. +--- +--- +AlignItems = {} + + +---@class AlignSelf : ReflectReference +--- Used to control how the specified item is aligned within the space it's given. +--- - For Flexbox items, controls cross axis alignment of the item. +--- - For CSS Grid items, controls block (vertical) axis alignment of a grid item within its grid area. +--- +--- +AlignSelf = {} + + +---@class BackgroundColor : ReflectReference +--- The background color of the node +--- +--- This serves as the "fill" color. +---@field [1] ? Color +BackgroundColor = {} ----@class CursorLeft ---- An event that is sent whenever the user's cursor leaves a window. ----@field window ? Entity -CursorLeft = {} +---@class BorderColor : ReflectReference +--- The border color of the UI node. +---@field [1] ? Color +BorderColor = {} + + +---@class BorderRadius : ReflectReference +--- Used to add rounded corners to a UI node. You can set a UI node to have uniformly +--- rounded corners or specify different radii for each corner. If a given radius exceeds half +--- the length of the smallest dimension between the node's height or width, the radius will +--- calculated as half the smallest dimension. +--- +--- Elliptical nodes are not supported yet. Percentage values are based on the node's smallest +--- dimension, either width or height. +--- +--- # Example +--- ```rust +--- # use bevy_ecs::prelude::*; +--- # use bevy_ui::prelude::*; +--- # use bevy_color::palettes::basic::{BLUE}; +--- fn setup_ui(mut commands: Commands) { +--- commands.spawn(( +--- Node { +--- width: Val::Px(100.), +--- height: Val::Px(100.), +--- border: UiRect::all(Val::Px(2.)), +--- ..Default::default() +--- }, +--- BackgroundColor(BLUE.into()), +--- BorderRadius::new( +--- // top left +--- Val::Px(10.), +--- // top right +--- Val::Px(20.), +--- // bottom right +--- Val::Px(30.), +--- // bottom left +--- Val::Px(40.), +--- ), +--- )); +--- } +--- ``` +--- +--- +---@field top_left ? Val +---@field top_right ? Val +---@field bottom_left ? Val +---@field bottom_right ? Val +BorderRadius = {} + + +---@class BoxShadow : ReflectReference +--- List of shadows to draw for a [`Node`]. +--- +--- Draw order is determined implicitly from the vector of [`ShadowStyle`]s, back-to-front. +---@field [1] ? Vec +BoxShadow = {} + + +---@class BoxShadowSamples : ReflectReference +--- Number of shadow samples. +--- A larger value will result in higher quality shadows. +--- Default is 4, values higher than ~10 offer diminishing returns. +--- +--- ``` +--- use bevy_core_pipeline::prelude::*; +--- use bevy_ecs::prelude::*; +--- use bevy_ui::prelude::*; +--- +--- fn spawn_camera(mut commands: Commands) { +--- commands.spawn(( +--- Camera2d, +--- BoxShadowSamples(6), +--- )); +--- } +--- ``` +---@field [1] ? integer +BoxShadowSamples = {} + + +---@class BoxSizing : ReflectReference +--- Which part of a Node's box length styles like width and height control +--- +--- See: +BoxSizing = {} + + +---@class CalculatedClip : ReflectReference +--- The calculated clip of the node +---@field clip ? Rect +CalculatedClip = {} + + +---@class ComputedNode : ReflectReference +--- Provides the computed size and layout properties of the node. +--- +--- Fields in this struct are public but should not be modified under most circumstances. +--- For example, in a scrollbar you may want to derive the handle's size from the proportion of +--- scrollable content in-view. You can directly modify `ComputedNode` after layout to set the +--- handle size without any delays. +---@field stack_index ? integer +---@field size ? Vec2 +---@field content_size ? Vec2 +---@field outline_width ? number +---@field outline_offset ? number +---@field unrounded_size ? Vec2 +---@field border ? BorderRect +---@field border_radius ? ResolvedBorderRadius +---@field padding ? BorderRect +---@field inverse_scale_factor ? number +ComputedNode = {} ----@class CursorMoved ---- An event reporting that the mouse cursor has moved inside a window.--- --- The event is sent only if the cursor is over one of the application's windows.--- It is the translated version of [`WindowEvent::CursorMoved`] from the `winit` crate with the addition of `delta`.--- --- Not to be confused with the `MouseMotion` event from `bevy_input`.--- --- Because the range of data is limited by the window area and it may have been transformed by the OS to implement certain effects like acceleration,--- you should not use it for non-cursor-like behavior such as 3D camera control. Please see `MouseMotion` instead.--- --- [`WindowEvent::CursorMoved`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.CursorMoved ----@field window ? Entity ----@field position ? Vec2 ----@field delta ? Option -CursorMoved = {} +---@class ComputedNodeTarget : ReflectReference +--- Derived information about the camera target for this UI node. +---@field camera ? Entity +---@field scale_factor ? number +---@field physical_size ? UVec2 +ComputedNodeTarget = {} ----@class FileDragAndDrop ---- Events related to files being dragged and dropped on a window. -FileDragAndDrop = {} +---@class Display : ReflectReference +--- Defines the layout model used by this node. +--- +--- Part of the [`Node`] component. +Display = {} + + +---@class FlexDirection : ReflectReference +--- Defines how flexbox items are ordered within a flexbox +FlexDirection = {} + + +---@class FlexWrap : ReflectReference +--- Defines if flexbox items appear on a single line or on multiple lines +FlexWrap = {} + + +---@class GridAutoFlow : ReflectReference +--- Controls whether grid items are placed row-wise or column-wise as well as whether the sparse or dense packing algorithm is used. +--- +--- The "dense" packing algorithm attempts to fill in holes earlier in the grid, if smaller items come up later. +--- This may cause items to appear out-of-order when doing so would fill in holes left by larger items. +--- +--- Defaults to [`GridAutoFlow::Row`]. +--- +--- +GridAutoFlow = {} + + +---@class GridPlacement : ReflectReference +--- Represents the position of a grid item in a single axis. +--- +--- There are 3 fields which may be set: +--- - `start`: which grid line the item should start at +--- - `end`: which grid line the item should end at +--- - `span`: how many tracks the item should span +--- +--- The default `span` is 1. If neither `start` or `end` is set then the item will be placed automatically. +--- +--- Generally, at most two fields should be set. If all three fields are specified then `span` will be ignored. If `end` specifies an earlier +--- grid line than `start` then `end` will be ignored and the item will have a span of 1. +--- +--- +---@field start ? Option +---@field span ? Option +---@field end ? Option +GridPlacement = {} + + +---@class GridTrack : ReflectReference +--- A [`GridTrack`] is a Row or Column of a CSS Grid. This struct specifies what size the track should be. +--- See below for the different "track sizing functions" you can specify. +---@field min_sizing_function ? MinTrackSizingFunction +---@field max_sizing_function ? MaxTrackSizingFunction +GridTrack = {} + + +---@class GridTrackRepetition : ReflectReference +--- How many times to repeat a repeated grid track +--- +--- +GridTrackRepetition = {} + + +---@class JustifyContent : ReflectReference +--- Used to control how items are distributed. +--- - For Flexbox containers, controls alignment of items in the main axis. +--- - For CSS Grid containers, controls alignment of grid columns. +--- +--- +JustifyContent = {} + + +---@class JustifyItems : ReflectReference +--- Used to control how each individual item is aligned by default within the space they're given. +--- - For Flexbox containers, this property has no effect. See `justify_content` for main axis alignment of flex items. +--- - For CSS Grid containers, sets default inline (horizontal) axis alignment of child items within their grid areas. +--- +--- +JustifyItems = {} + + +---@class JustifySelf : ReflectReference +--- Used to control how the specified item is aligned within the space it's given. +--- - For Flexbox items, this property has no effect. See `justify_content` for main axis alignment of flex items. +--- - For CSS Grid items, controls inline (horizontal) axis alignment of a grid item within its grid area. +--- +--- +JustifySelf = {} + + +---@class MaxTrackSizingFunction : ReflectReference +MaxTrackSizingFunction = {} + + +---@class MinTrackSizingFunction : ReflectReference +MinTrackSizingFunction = {} + + +---@class Node : ReflectReference +--- The base component for UI entities. It describes UI layout and style properties. +--- +--- When defining new types of UI entities, require [`Node`] to make them behave like UI nodes. +--- +--- Nodes can be laid out using either Flexbox or CSS Grid Layout. +--- +--- See below for general learning resources and for documentation on the individual style properties. +--- +--- ### Flexbox +--- +--- - [MDN: Basic Concepts of Flexbox](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox) +--- - [A Complete Guide To Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) by CSS Tricks. This is detailed guide with illustrations and comprehensive written explanation of the different Flexbox properties and how they work. +--- - [Flexbox Froggy](https://flexboxfroggy.com/). An interactive tutorial/game that teaches the essential parts of Flexbox in a fun engaging way. +--- +--- ### CSS Grid +--- +--- - [MDN: Basic Concepts of Grid Layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout) +--- - [A Complete Guide To CSS Grid](https://css-tricks.com/snippets/css/complete-guide-grid/) by CSS Tricks. This is detailed guide with illustrations and comprehensive written explanation of the different CSS Grid properties and how they work. +--- - [CSS Grid Garden](https://cssgridgarden.com/). An interactive tutorial/game that teaches the essential parts of CSS Grid in a fun engaging way. +--- +--- # See also +--- +--- - [`RelativeCursorPosition`](crate::RelativeCursorPosition) to obtain the cursor position relative to this node +--- - [`Interaction`](crate::Interaction) to obtain the interaction state of this node +---@field display ? Display +---@field box_sizing ? BoxSizing +---@field position_type ? PositionType +---@field overflow ? Overflow +---@field overflow_clip_margin ? OverflowClipMargin +---@field left ? Val +---@field right ? Val +---@field top ? Val +---@field bottom ? Val +---@field width ? Val +---@field height ? Val +---@field min_width ? Val +---@field min_height ? Val +---@field max_width ? Val +---@field max_height ? Val +---@field aspect_ratio ? Option +---@field align_items ? AlignItems +---@field justify_items ? JustifyItems +---@field align_self ? AlignSelf +---@field justify_self ? JustifySelf +---@field align_content ? AlignContent +---@field justify_content ? JustifyContent +---@field margin ? UiRect +---@field padding ? UiRect +---@field border ? UiRect +---@field flex_direction ? FlexDirection +---@field flex_wrap ? FlexWrap +---@field flex_grow ? number +---@field flex_shrink ? number +---@field flex_basis ? Val +---@field row_gap ? Val +---@field column_gap ? Val +---@field grid_auto_flow ? GridAutoFlow +---@field grid_template_rows ? Vec +---@field grid_template_columns ? Vec +---@field grid_auto_rows ? Vec +---@field grid_auto_columns ? Vec +---@field grid_row ? GridPlacement +---@field grid_column ? GridPlacement +Node = {} + + +---@class Outline : ReflectReference +--- The [`Outline`] component adds an outline outside the edge of a UI node. +--- Outlines do not take up space in the layout. +--- +--- To add an [`Outline`] to a ui node you can spawn a `(Node, Outline)` tuple bundle: +--- ``` +--- # use bevy_ecs::prelude::*; +--- # use bevy_ui::prelude::*; +--- # use bevy_color::palettes::basic::{RED, BLUE}; +--- fn setup_ui(mut commands: Commands) { +--- commands.spawn(( +--- Node { +--- width: Val::Px(100.), +--- height: Val::Px(100.), +--- ..Default::default() +--- }, +--- BackgroundColor(BLUE.into()), +--- Outline::new(Val::Px(10.), Val::ZERO, RED.into()) +--- )); +--- } +--- ``` +--- +--- [`Outline`] components can also be added later to existing UI nodes: +--- ``` +--- # use bevy_ecs::prelude::*; +--- # use bevy_ui::prelude::*; +--- # use bevy_color::Color; +--- fn outline_hovered_button_system( +--- mut commands: Commands, +--- mut node_query: Query<(Entity, &Interaction, Option<&mut Outline>), Changed>, +--- ) { +--- for (entity, interaction, mut maybe_outline) in node_query.iter_mut() { +--- let outline_color = +--- if matches!(*interaction, Interaction::Hovered) { +--- Color::WHITE +--- } else { +--- Color::NONE +--- }; +--- if let Some(mut outline) = maybe_outline { +--- outline.color = outline_color; +--- } else { +--- commands.entity(entity).insert(Outline::new(Val::Px(10.), Val::ZERO, outline_color)); +--- } +--- } +--- } +--- ``` +--- Inserting and removing an [`Outline`] component repeatedly will result in table moves, so it is generally preferable to +--- set `Outline::color` to [`Color::NONE`] to hide an outline. +---@field width ? Val +---@field offset ? Val +---@field color ? Color +Outline = {} ----@class Ime ---- An Input Method Editor event.--- --- This event is the translated version of the `WindowEvent::Ime` from the `winit` crate.--- --- It is only sent if IME was enabled on the window with [`Window::ime_enabled`](crate::window::Window::ime_enabled). -Ime = {} +---@class Overflow : ReflectReference +--- Whether to show or hide overflowing items +---@field x ? OverflowAxis +---@field y ? OverflowAxis +Overflow = {} ----@class RequestRedraw ---- An event that indicates all of the application's windows should be redrawn,--- even if their control flow is set to `Wait` and there have been no window events. -RequestRedraw = {} +---@class OverflowAxis : ReflectReference +--- Whether to show or hide overflowing items +OverflowAxis = {} ----@class WindowBackendScaleFactorChanged ---- An event that indicates a window's OS-reported scale factor has changed. ----@field window ? Entity ----@field scale_factor ? number +---@class OverflowClipBox : ReflectReference +--- Used to determine the bounds of the visible area when a UI node is clipped. +OverflowClipBox = {} + + +---@class OverflowClipMargin : ReflectReference +--- The bounds of the visible area when a UI node is clipped. +---@field visual_box ? OverflowClipBox +---@field margin ? number +OverflowClipMargin = {} + + +---@class PositionType : ReflectReference +--- The strategy used to position this node +PositionType = {} + + +---@class RepeatedGridTrack : ReflectReference +--- Represents a *possibly* repeated [`GridTrack`]. +--- +--- The repetition parameter can either be: +--- - The integer `1`, in which case the track is non-repeated. +--- - a `u16` count to repeat the track N times. +--- - A `GridTrackRepetition::AutoFit` or `GridTrackRepetition::AutoFill`. +--- +--- Note: that in the common case you want a non-repeating track (repetition count 1), you may use the constructor methods on [`GridTrack`] +--- to create a `RepeatedGridTrack`. i.e. `GridTrack::px(10.0)` is equivalent to `RepeatedGridTrack::px(1, 10.0)`. +--- +--- You may only use one auto-repetition per track list. And if your track list contains an auto repetition +--- then all tracks (in and outside of the repetition) must be fixed size (px or percent). Integer repetitions are just shorthand for writing out +--- N tracks longhand and are not subject to the same limitations. +---@field repetition ? GridTrackRepetition +---@field tracks ? SmallVec +RepeatedGridTrack = {} + + +---@class ResolvedBorderRadius : ReflectReference +--- Represents the resolved border radius values for a UI node. +--- +--- The values are in physical pixels. +---@field top_left ? number +---@field top_right ? number +---@field bottom_left ? number +---@field bottom_right ? number +ResolvedBorderRadius = {} + + +---@class ScrollPosition : ReflectReference +--- The scroll position of the node. +--- +--- Updating the values of `ScrollPosition` will reposition the children of the node by the offset amount. +--- `ScrollPosition` may be updated by the layout system when a layout change makes a previously valid `ScrollPosition` invalid. +--- Changing this does nothing on a `Node` without setting at least one `OverflowAxis` to `OverflowAxis::Scroll`. +---@field offset_x ? number +---@field offset_y ? number +ScrollPosition = {} + + +---@class ShadowStyle : ReflectReference +---@field color ? Color +---@field x_offset ? Val +---@field y_offset ? Val +---@field spread_radius ? Val +---@field blur_radius ? Val +ShadowStyle = {} + + +---@class TextShadow : ReflectReference +--- Adds a shadow behind text +---@field offset ? Vec2 +---@field color ? Color +TextShadow = {} + + +---@class UiAntiAlias : ReflectReference +--- Marker for controlling whether Ui is rendered with or without anti-aliasing +--- in a camera. By default, Ui is always anti-aliased. +--- +--- **Note:** This does not affect text anti-aliasing. For that, use the `font_smoothing` property of the [`TextFont`](bevy_text::TextFont) component. +--- +--- ``` +--- use bevy_core_pipeline::prelude::*; +--- use bevy_ecs::prelude::*; +--- use bevy_ui::prelude::*; +--- +--- fn spawn_camera(mut commands: Commands) { +--- commands.spawn(( +--- Camera2d, +--- // This will cause all Ui in this camera to be rendered without +--- // anti-aliasing +--- UiAntiAlias::Off, +--- )); +--- } +--- ``` +UiAntiAlias = {} + + +---@class UiTargetCamera : ReflectReference +--- Indicates that this root [`Node`] entity should be rendered to a specific camera. +--- +--- UI then will be laid out respecting the camera's viewport and scale factor, and +--- rendered to this camera's [`bevy_render::camera::RenderTarget`]. +--- +--- Setting this component on a non-root node will have no effect. It will be overridden +--- by the root node's component. +--- +--- Root node's without an explicit [`UiTargetCamera`] will be rendered to the default UI camera, +--- which is either a single camera with the [`IsDefaultUiCamera`] marker component or the highest +--- order camera targeting the primary window. +---@field [1] ? Entity +UiTargetCamera = {} + + +---@class ZIndex : ReflectReference +--- Indicates that this [`Node`] entity's front-to-back ordering is not controlled solely +--- by its location in the UI hierarchy. A node with a higher z-index will appear on top +--- of sibling nodes with a lower z-index. +--- +--- UI nodes that have the same z-index will appear according to the order in which they +--- appear in the UI hierarchy. In such a case, the last node to be added to its parent +--- will appear in front of its siblings. +--- +--- Nodes without this component will be treated as if they had a value of [`ZIndex(0)`]. +--- +--- Use [`GlobalZIndex`] if you need to order separate UI hierarchies or nodes that are +--- not siblings in a given UI hierarchy. +---@field [1] ? integer +ZIndex = {} + + +---@class Button : ReflectReference +--- Marker struct for buttons +Button = {} + + +---@class ImageNode : ReflectReference +--- A UI Node that renders an image. +---@field color ? Color +---@field image ? Handle +---@field texture_atlas ? Option +---@field flip_x ? boolean +---@field flip_y ? boolean +---@field rect ? Option +---@field image_mode ? NodeImageMode +ImageNode = {} + + +---@class ImageNodeSize : ReflectReference +--- The size of the image's texture +--- +--- This component is updated automatically by [`update_image_content_size_system`] +---@field size ? UVec2 +ImageNodeSize = {} + + +---@class NodeImageMode : ReflectReference +--- Controls how the image is altered to fit within the layout and how the layout algorithm determines the space in the layout for the image +NodeImageMode = {} + + +---@class Label : ReflectReference +--- Marker struct for labels +Label = {} + + +---@class Text : ReflectReference +--- The top-level UI text component. +--- +--- Adding [`Text`] to an entity will pull in required components for setting up a UI text node. +--- +--- The string in this component is the first 'text span' in a hierarchy of text spans that are collected into +--- a [`ComputedTextBlock`]. See [`TextSpan`](bevy_text::TextSpan) for the component used by children of entities with [`Text`]. +--- +--- Note that [`Transform`](bevy_transform::components::Transform) on this entity is managed automatically by the UI layout system. +--- +--- +--- ``` +--- # use bevy_asset::Handle; +--- # use bevy_color::Color; +--- # use bevy_color::palettes::basic::BLUE; +--- # use bevy_ecs::world::World; +--- # use bevy_text::{Font, JustifyText, TextLayout, TextFont, TextColor, TextSpan}; +--- # use bevy_ui::prelude::Text; +--- # +--- # let font_handle: Handle = Default::default(); +--- # let mut world = World::default(); +--- # +--- // Basic usage. +--- world.spawn(Text::new("hello world!")); +--- +--- // With non-default style. +--- world.spawn(( +--- Text::new("hello world!"), +--- TextFont { +--- font: font_handle.clone().into(), +--- font_size: 60.0, +--- ..Default::default() +--- }, +--- TextColor(BLUE.into()), +--- )); +--- +--- // With text justification. +--- world.spawn(( +--- Text::new("hello world\nand bevy!"), +--- TextLayout::new_with_justify(JustifyText::Center) +--- )); +--- +--- // With spans +--- world.spawn(Text::new("hello ")).with_children(|parent| { +--- parent.spawn(TextSpan::new("world")); +--- parent.spawn((TextSpan::new("!"), TextColor(BLUE.into()))); +--- }); +--- ``` +---@field [1] ? string +Text = {} + + +---@class TextNodeFlags : ReflectReference +--- UI text system flags. +--- +--- Used internally by [`measure_text_system`] and [`text_system`] to schedule text for processing. +---@field needs_measure_fn ? boolean +---@field needs_recompute ? boolean +TextNodeFlags = {} + + +---@class AppLifecycle : ReflectReference +--- Application lifetime events +AppLifecycle = {} + + +---@class CursorEntered : ReflectReference +--- An event that is sent whenever the user's cursor enters a window. +---@field window ? Entity +CursorEntered = {} + + +---@class CursorLeft : ReflectReference +--- An event that is sent whenever the user's cursor leaves a window. +---@field window ? Entity +CursorLeft = {} + + +---@class CursorMoved : ReflectReference +--- An event reporting that the mouse cursor has moved inside a window. +--- +--- The event is sent only if the cursor is over one of the application's windows. +--- It is the translated version of [`WindowEvent::CursorMoved`] from the `winit` crate with the addition of `delta`. +--- +--- Not to be confused with the `MouseMotion` event from `bevy_input`. +--- +--- Because the range of data is limited by the window area and it may have been transformed by the OS to implement certain effects like acceleration, +--- you should not use it for non-cursor-like behavior such as 3D camera control. Please see `MouseMotion` instead. +--- +--- [`WindowEvent::CursorMoved`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.CursorMoved +---@field window ? Entity +---@field position ? Vec2 +---@field delta ? Option +CursorMoved = {} + + +---@class FileDragAndDrop : ReflectReference +--- Events related to files being dragged and dropped on a window. +FileDragAndDrop = {} + + +---@class Ime : ReflectReference +--- An Input Method Editor event. +--- +--- This event is the translated version of the `WindowEvent::Ime` from the `winit` crate. +--- +--- It is only sent if IME was enabled on the window with [`Window::ime_enabled`](crate::window::Window::ime_enabled). +Ime = {} + + +---@class RequestRedraw : ReflectReference +--- An event that indicates all of the application's windows should be redrawn, +--- even if their control flow is set to `Wait` and there have been no window events. +RequestRedraw = {} + + +---@class WindowBackendScaleFactorChanged : ReflectReference +--- An event that indicates a window's OS-reported scale factor has changed. +---@field window ? Entity +---@field scale_factor ? number WindowBackendScaleFactorChanged = {} ----@class WindowCloseRequested ---- An event that is sent whenever the operating systems requests that a window--- be closed. This will be sent when the close button of the window is pressed.--- --- If the default [`WindowPlugin`] is used, these events are handled--- by closing the corresponding [`Window`].--- To disable this behavior, set `close_when_requested` on the [`WindowPlugin`]--- to `false`.--- --- [`WindowPlugin`]: crate::WindowPlugin--- [`Window`]: crate::Window +---@class WindowCloseRequested : ReflectReference +--- An event that is sent whenever the operating systems requests that a window +--- be closed. This will be sent when the close button of the window is pressed. +--- +--- If the default [`WindowPlugin`] is used, these events are handled +--- by closing the corresponding [`Window`]. +--- To disable this behavior, set `close_when_requested` on the [`WindowPlugin`] +--- to `false`. +--- +--- [`WindowPlugin`]: crate::WindowPlugin +--- [`Window`]: crate::Window ---@field window ? Entity WindowCloseRequested = {} ----@class WindowClosed ---- An event that is sent whenever a window is closed. This will be sent when--- the window entity loses its [`Window`](crate::window::Window) component or is despawned. +---@class WindowClosed : ReflectReference +--- An event that is sent whenever a window is closed. This will be sent when +--- the window entity loses its [`Window`](crate::window::Window) component or is despawned. ---@field window ? Entity WindowClosed = {} ----@class WindowClosing ---- An event that is sent whenever a window is closing. This will be sent when--- after a [`WindowCloseRequested`] event is received and the window is in the process of closing. +---@class WindowClosing : ReflectReference +--- An event that is sent whenever a window is closing. This will be sent when +--- after a [`WindowCloseRequested`] event is received and the window is in the process of closing. ---@field window ? Entity WindowClosing = {} ----@class WindowCreated ---- An event that is sent whenever a new window is created.--- --- To create a new window, spawn an entity with a [`crate::Window`] on it. +---@class WindowCreated : ReflectReference +--- An event that is sent whenever a new window is created. +--- +--- To create a new window, spawn an entity with a [`crate::Window`] on it. ---@field window ? Entity WindowCreated = {} ----@class WindowDestroyed ---- An event that is sent whenever a window is destroyed by the underlying window system.--- --- Note that if your application only has a single window, this event may be your last chance to--- persist state before the application terminates. +---@class WindowDestroyed : ReflectReference +--- An event that is sent whenever a window is destroyed by the underlying window system. +--- +--- Note that if your application only has a single window, this event may be your last chance to +--- persist state before the application terminates. ---@field window ? Entity WindowDestroyed = {} ----@class WindowEvent ---- Wraps all `bevy_window` and `bevy_input` events in a common enum.--- --- Read these events with `EventReader` if you need to--- access window events in the order they were received from the--- operating system. Otherwise, the event types are individually--- readable with `EventReader` (e.g. `EventReader`). +---@class WindowEvent : ReflectReference +--- Wraps all `bevy_window` and `bevy_input` events in a common enum. +--- +--- Read these events with `EventReader` if you need to +--- access window events in the order they were received from the +--- operating system. Otherwise, the event types are individually +--- readable with `EventReader` (e.g. `EventReader`). WindowEvent = {} ----@class WindowFocused +---@class WindowFocused : ReflectReference --- An event that indicates a window has received or lost focus. ---@field window ? Entity ---@field focused ? boolean WindowFocused = {} ----@class WindowMoved +---@class WindowMoved : ReflectReference --- An event that is sent when a window is repositioned in physical pixels. ---@field window ? Entity ---@field position ? IVec2 WindowMoved = {} ----@class WindowOccluded ---- The window has been occluded (completely hidden from view).--- --- This is different to window visibility as it depends on--- whether the window is closed, minimized, set invisible,--- or fully occluded by another window.--- --- It is the translated version of [`WindowEvent::Occluded`] from the `winit` crate.--- --- [`WindowEvent::Occluded`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.Occluded +---@class WindowOccluded : ReflectReference +--- The window has been occluded (completely hidden from view). +--- +--- This is different to window visibility as it depends on +--- whether the window is closed, minimized, set invisible, +--- or fully occluded by another window. +--- +--- It is the translated version of [`WindowEvent::Occluded`] from the `winit` crate. +--- +--- [`WindowEvent::Occluded`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.Occluded ---@field window ? Entity ---@field occluded ? boolean WindowOccluded = {} ----@class WindowResized +---@class WindowResized : ReflectReference --- A window event that is sent whenever a window's logical size has changed. ---@field window ? Entity ---@field width ? number @@ -28667,22 +24063,34 @@ WindowOccluded = {} WindowResized = {} ----@class WindowScaleFactorChanged +---@class WindowScaleFactorChanged : ReflectReference --- An event that indicates a window's scale factor has changed. ---@field window ? Entity ---@field scale_factor ? number WindowScaleFactorChanged = {} ----@class WindowThemeChanged ---- An event sent when the system theme changes for a window.--- --- This event is only sent when the window is relying on the system theme to control its appearance.--- i.e. It is only sent when [`Window::window_theme`](crate::window::Window::window_theme) is `None` and the system theme changes. +---@class WindowThemeChanged : ReflectReference +--- An event sent when the system theme changes for a window. +--- +--- This event is only sent when the window is relying on the system theme to control its appearance. +--- i.e. It is only sent when [`Window::window_theme`](crate::window::Window::window_theme) is `None` and the system theme changes. ---@field window ? Entity ---@field theme ? WindowTheme WindowThemeChanged = {} ----@class Monitor ---- Represents an available monitor as reported by the user's operating system, which can be used--- to query information about the display, such as its size, position, and video modes.--- --- Each monitor corresponds to an entity and can be used to position a monitor using--- [`crate::window::MonitorSelection::Entity`].--- --- # Warning--- --- This component is synchronized with `winit` through `bevy_winit`, but is effectively--- read-only as `winit` does not support changing monitor properties. +---@class Monitor : ReflectReference +--- Represents an available monitor as reported by the user's operating system, which can be used +--- to query information about the display, such as its size, position, and video modes. +--- +--- Each monitor corresponds to an entity and can be used to position a monitor using +--- [`crate::window::MonitorSelection::Entity`]. +--- +--- # Warning +--- +--- This component is synchronized with `winit` through `bevy_winit`, but is effectively +--- read-only as `winit` does not support changing monitor properties. ---@field name ? Option ---@field physical_height ? integer ---@field physical_width ? integer @@ -28693,7 +24101,7 @@ WindowThemeChanged = {} Monitor = {} ----@class VideoMode +---@class VideoMode : ReflectReference --- Represents a video mode that a monitor supports ---@field physical_size ? UVec2 ---@field bit_depth ? integer @@ -28701,22 +24109,38 @@ Monitor = {} VideoMode = {} ----@class SystemCursorIcon ---- The icon to display for a window.--- --- Examples of all of these cursors can be found [here](https://www.w3schools.com/cssref/playit.php?filename=playcss_cursor&preval=crosshair).--- This `enum` is simply a copy of a similar `enum` found in [`winit`](https://docs.rs/winit/latest/winit/window/enum.CursorIcon.html).--- `winit`, in turn, is based upon the [CSS3 UI spec](https://www.w3.org/TR/css-ui-3/#cursor).--- --- See the [`window_settings`] example for usage.--- --- [`window_settings`]: https://github.com/bevyengine/bevy/blob/latest/examples/window/window_settings.rs +---@class SystemCursorIcon : ReflectReference +--- The icon to display for a window. +--- +--- Examples of all of these cursors can be found [here](https://www.w3schools.com/cssref/playit.php?filename=playcss_cursor&preval=crosshair). +--- This `enum` is simply a copy of a similar `enum` found in [`winit`](https://docs.rs/winit/latest/winit/window/enum.CursorIcon.html). +--- `winit`, in turn, is based upon the [CSS3 UI spec](https://www.w3.org/TR/css-ui-3/#cursor). +--- +--- See the [`window_settings`] example for usage. +--- +--- [`window_settings`]: https://github.com/bevyengine/bevy/blob/latest/examples/window/window_settings.rs SystemCursorIcon = {} ----@class CompositeAlphaMode +---@class CompositeAlphaMode : ReflectReference --- Specifies how the alpha channel of the textures should be handled during compositing, for a [`Window`]. CompositeAlphaMode = {} ----@class CursorGrabMode ---- Defines if and how the cursor is grabbed by a [`Window`].--- --- ## Platform-specific--- --- - **`Windows`** doesn't support [`CursorGrabMode::Locked`]--- - **`macOS`** doesn't support [`CursorGrabMode::Confined`]--- - **`iOS/Android`** don't have cursors.--- --- Since `Windows` and `macOS` have different [`CursorGrabMode`] support, we first try to set the grab mode that was asked for. If it doesn't work then use the alternate grab mode. +---@class CursorGrabMode : ReflectReference +--- Defines if and how the cursor is grabbed by a [`Window`]. +--- +--- ## Platform-specific +--- +--- - **`Windows`** doesn't support [`CursorGrabMode::Locked`] +--- - **`macOS`** doesn't support [`CursorGrabMode::Confined`] +--- - **`iOS/Android`** don't have cursors. +--- +--- Since `Windows` and `macOS` have different [`CursorGrabMode`] support, we first try to set the grab mode that was asked for. If it doesn't work then use the alternate grab mode. CursorGrabMode = {} ----@class CursorOptions +---@class CursorOptions : ReflectReference --- Cursor data for a [`Window`]. ---@field visible ? boolean ---@field grab_mode ? CursorGrabMode @@ -28724,15 +24148,21 @@ CursorGrabMode = {} CursorOptions = {} ----@class EnabledButtons ---- Specifies which [`Window`] control buttons should be enabled.--- --- ## Platform-specific--- --- **`iOS`**, **`Android`**, and the **`Web`** do not have window control buttons.--- --- On some **`Linux`** environments these values have no effect. +---@class EnabledButtons : ReflectReference +--- Specifies which [`Window`] control buttons should be enabled. +--- +--- ## Platform-specific +--- +--- **`iOS`**, **`Android`**, and the **`Web`** do not have window control buttons. +--- +--- On some **`Linux`** environments these values have no effect. ---@field minimize ? boolean ---@field maximize ? boolean ---@field close ? boolean EnabledButtons = {} ----@class InternalWindowState +---@class InternalWindowState : ReflectReference --- Stores internal [`Window`] state that isn't directly accessible. ---@field minimize_request ? Option ---@field maximize_request ? Option @@ -28742,28 +24172,86 @@ EnabledButtons = {} InternalWindowState = {} ----@class MonitorSelection ---- References a screen monitor.--- --- Used when centering a [`Window`] on a monitor. +---@class MonitorSelection : ReflectReference +--- References a screen monitor. +--- +--- Used when centering a [`Window`] on a monitor. MonitorSelection = {} ----@class PresentMode ---- Presentation mode for a [`Window`].--- --- The presentation mode specifies when a frame is presented to the window. The [`Fifo`]--- option corresponds to a traditional `VSync`, where the framerate is capped by the--- display refresh rate. Both [`Immediate`] and [`Mailbox`] are low-latency and are not--- capped by the refresh rate, but may not be available on all platforms. Tearing--- may be observed with [`Immediate`] mode, but will not be observed with [`Mailbox`] or--- [`Fifo`].--- --- [`AutoVsync`] or [`AutoNoVsync`] will gracefully fallback to [`Fifo`] when unavailable.--- --- [`Immediate`] or [`Mailbox`] will panic if not supported by the platform.--- --- [`Fifo`]: PresentMode::Fifo--- [`FifoRelaxed`]: PresentMode::FifoRelaxed--- [`Immediate`]: PresentMode::Immediate--- [`Mailbox`]: PresentMode::Mailbox--- [`AutoVsync`]: PresentMode::AutoVsync--- [`AutoNoVsync`]: PresentMode::AutoNoVsync +---@class PresentMode : ReflectReference +--- Presentation mode for a [`Window`]. +--- +--- The presentation mode specifies when a frame is presented to the window. The [`Fifo`] +--- option corresponds to a traditional `VSync`, where the framerate is capped by the +--- display refresh rate. Both [`Immediate`] and [`Mailbox`] are low-latency and are not +--- capped by the refresh rate, but may not be available on all platforms. Tearing +--- may be observed with [`Immediate`] mode, but will not be observed with [`Mailbox`] or +--- [`Fifo`]. +--- +--- [`AutoVsync`] or [`AutoNoVsync`] will gracefully fallback to [`Fifo`] when unavailable. +--- +--- [`Immediate`] or [`Mailbox`] will panic if not supported by the platform. +--- +--- [`Fifo`]: PresentMode::Fifo +--- [`FifoRelaxed`]: PresentMode::FifoRelaxed +--- [`Immediate`]: PresentMode::Immediate +--- [`Mailbox`]: PresentMode::Mailbox +--- [`AutoVsync`]: PresentMode::AutoVsync +--- [`AutoNoVsync`]: PresentMode::AutoNoVsync PresentMode = {} ----@class PrimaryWindow ---- Marker [`Component`] for the window considered the primary window.--- --- Currently this is assumed to only exist on 1 entity at a time.--- --- [`WindowPlugin`](crate::WindowPlugin) will spawn a [`Window`] entity--- with this component if [`primary_window`](crate::WindowPlugin::primary_window)--- is `Some`. +---@class PrimaryWindow : ReflectReference +--- Marker [`Component`] for the window considered the primary window. +--- +--- Currently this is assumed to only exist on 1 entity at a time. +--- +--- [`WindowPlugin`](crate::WindowPlugin) will spawn a [`Window`] entity +--- with this component if [`primary_window`](crate::WindowPlugin::primary_window) +--- is `Some`. PrimaryWindow = {} ----@class VideoModeSelection ---- References an exclusive fullscreen video mode.--- --- Used when setting [`WindowMode::Fullscreen`] on a window. +---@class VideoModeSelection : ReflectReference +--- References an exclusive fullscreen video mode. +--- +--- Used when setting [`WindowMode::Fullscreen`] on a window. VideoModeSelection = {} ----@class Window ---- The defining [`Component`] for window entities,--- storing information about how it should appear and behave.--- --- Each window corresponds to an entity, and is uniquely identified by the value of their [`Entity`].--- When the [`Window`] component is added to an entity, a new window will be opened.--- When it is removed or the entity is despawned, the window will close.--- --- The primary window entity (and the corresponding window) is spawned by default--- by [`WindowPlugin`](crate::WindowPlugin) and is marked with the [`PrimaryWindow`] component.--- --- This component is synchronized with `winit` through `bevy_winit`:--- it will reflect the current state of the window and can be modified to change this state.--- --- # Example--- --- Because this component is synchronized with `winit`, it can be used to perform--- OS-integrated windowing operations. For example, here's a simple system--- to change the window mode:--- --- ```--- # use bevy_ecs::query::With;--- # use bevy_ecs::system::Query;--- # use bevy_window::{WindowMode, PrimaryWindow, Window, MonitorSelection, VideoModeSelection};--- fn change_window_mode(mut windows: Query<&mut Window, With>) {--- // Query returns one window typically.--- for mut window in windows.iter_mut() {--- window.mode =--- WindowMode::Fullscreen(MonitorSelection::Current, VideoModeSelection::Current);--- }--- }--- ``` +---@class Window : ReflectReference +--- The defining [`Component`] for window entities, +--- storing information about how it should appear and behave. +--- +--- Each window corresponds to an entity, and is uniquely identified by the value of their [`Entity`]. +--- When the [`Window`] component is added to an entity, a new window will be opened. +--- When it is removed or the entity is despawned, the window will close. +--- +--- The primary window entity (and the corresponding window) is spawned by default +--- by [`WindowPlugin`](crate::WindowPlugin) and is marked with the [`PrimaryWindow`] component. +--- +--- This component is synchronized with `winit` through `bevy_winit`: +--- it will reflect the current state of the window and can be modified to change this state. +--- +--- # Example +--- +--- Because this component is synchronized with `winit`, it can be used to perform +--- OS-integrated windowing operations. For example, here's a simple system +--- to change the window mode: +--- +--- ``` +--- # use bevy_ecs::query::With; +--- # use bevy_ecs::system::Query; +--- # use bevy_window::{WindowMode, PrimaryWindow, Window, MonitorSelection, VideoModeSelection}; +--- fn change_window_mode(mut windows: Query<&mut Window, With>) { +--- // Query returns one window typically. +--- for mut window in windows.iter_mut() { +--- window.mode = +--- WindowMode::Fullscreen(MonitorSelection::Current, VideoModeSelection::Current); +--- } +--- } +--- ``` ---@field cursor_options ? CursorOptions ---@field present_mode ? PresentMode ---@field mode ? WindowMode @@ -28806,28 +24294,45 @@ VideoModeSelection = {} Window = {} ----@class WindowLevel ---- Specifies where a [`Window`] should appear relative to other overlapping windows (on top or under) .--- --- Levels are groups of windows with respect to their z-position.--- --- The relative ordering between windows in different window levels is fixed.--- The z-order of windows within the same window level may change dynamically on user interaction.--- --- ## Platform-specific--- --- - **iOS / Android / Web / Wayland:** Unsupported. +---@class WindowLevel : ReflectReference +--- Specifies where a [`Window`] should appear relative to other overlapping windows (on top or under) . +--- +--- Levels are groups of windows with respect to their z-position. +--- +--- The relative ordering between windows in different window levels is fixed. +--- The z-order of windows within the same window level may change dynamically on user interaction. +--- +--- ## Platform-specific +--- +--- - **iOS / Android / Web / Wayland:** Unsupported. WindowLevel = {} ----@class WindowMode +---@class WindowMode : ReflectReference --- Defines the way a [`Window`] is displayed. WindowMode = {} ----@class WindowPosition +---@class WindowPosition : ReflectReference --- Defines where a [`Window`] should be placed on the screen. WindowPosition = {} ----@class WindowRef ---- Reference to a [`Window`], whether it be a direct link to a specific entity or--- a more vague defaulting choice. +---@class WindowRef : ReflectReference +--- Reference to a [`Window`], whether it be a direct link to a specific entity or +--- a more vague defaulting choice. WindowRef = {} ----@class WindowResizeConstraints ---- The size limits on a [`Window`].--- --- These values are measured in logical pixels (see [`WindowResolution`]), so the user's--- scale factor does affect the size limits on the window.--- --- Please note that if the window is resizable, then when the window is--- maximized it may have a size outside of these limits. The functionality--- required to disable maximizing is not yet exposed by winit. +---@class WindowResizeConstraints : ReflectReference +--- The size limits on a [`Window`]. +--- +--- These values are measured in logical pixels (see [`WindowResolution`]), so the user's +--- scale factor does affect the size limits on the window. +--- +--- Please note that if the window is resizable, then when the window is +--- maximized it may have a size outside of these limits. The functionality +--- required to disable maximizing is not yet exposed by winit. ---@field min_width ? number ---@field min_height ? number ---@field max_width ? number @@ -28835,8 +24340,52 @@ WindowRef = {} WindowResizeConstraints = {} ----@class WindowResolution ---- Controls the size of a [`Window`]--- --- ## Physical, logical and requested sizes--- --- There are three sizes associated with a window:--- - the physical size,--- which represents the actual height and width in physical pixels--- the window occupies on the monitor,--- - the logical size,--- which represents the size that should be used to scale elements--- inside the window, measured in logical pixels,--- - the requested size,--- measured in logical pixels, which is the value submitted--- to the API when creating the window, or requesting that it be resized.--- --- ## Scale factor--- --- The reason logical size and physical size are separated and can be different--- is to account for the cases where:--- - several monitors have different pixel densities,--- - the user has set up a pixel density preference in its operating system,--- - the Bevy `App` has specified a specific scale factor between both.--- --- The factor between physical size and logical size can be retrieved with--- [`WindowResolution::scale_factor`].--- --- For the first two cases, a scale factor is set automatically by the operating--- system through the window backend. You can get it with--- [`WindowResolution::base_scale_factor`].--- --- For the third case, you can override this automatic scale factor with--- [`WindowResolution::set_scale_factor_override`].--- --- ## Requested and obtained sizes--- --- The logical size should be equal to the requested size after creating/resizing,--- when possible.--- The reason the requested size and logical size might be different--- is because the corresponding physical size might exceed limits (either the--- size limits of the monitor, or limits defined in [`WindowResizeConstraints`]).--- --- Note: The requested size is not kept in memory, for example requesting a size--- too big for the screen, making the logical size different from the requested size,--- and then setting a scale factor that makes the previous requested size within--- the limits of the screen will not get back that previous requested size. +---@class WindowResolution : ReflectReference +--- Controls the size of a [`Window`] +--- +--- ## Physical, logical and requested sizes +--- +--- There are three sizes associated with a window: +--- - the physical size, +--- which represents the actual height and width in physical pixels +--- the window occupies on the monitor, +--- - the logical size, +--- which represents the size that should be used to scale elements +--- inside the window, measured in logical pixels, +--- - the requested size, +--- measured in logical pixels, which is the value submitted +--- to the API when creating the window, or requesting that it be resized. +--- +--- ## Scale factor +--- +--- The reason logical size and physical size are separated and can be different +--- is to account for the cases where: +--- - several monitors have different pixel densities, +--- - the user has set up a pixel density preference in its operating system, +--- - the Bevy `App` has specified a specific scale factor between both. +--- +--- The factor between physical size and logical size can be retrieved with +--- [`WindowResolution::scale_factor`]. +--- +--- For the first two cases, a scale factor is set automatically by the operating +--- system through the window backend. You can get it with +--- [`WindowResolution::base_scale_factor`]. +--- +--- For the third case, you can override this automatic scale factor with +--- [`WindowResolution::set_scale_factor_override`]. +--- +--- ## Requested and obtained sizes +--- +--- The logical size should be equal to the requested size after creating/resizing, +--- when possible. +--- The reason the requested size and logical size might be different +--- is because the corresponding physical size might exceed limits (either the +--- size limits of the monitor, or limits defined in [`WindowResizeConstraints`]). +--- +--- Note: The requested size is not kept in memory, for example requesting a size +--- too big for the screen, making the logical size different from the requested size, +--- and then setting a scale factor that makes the previous requested size within +--- the limits of the screen will not get back that previous requested size. ---@field physical_width ? integer ---@field physical_height ? integer ---@field scale_factor_override ? Option @@ -28844,38 +24393,121 @@ WindowResizeConstraints = {} WindowResolution = {} ----@class WindowTheme +---@class WindowTheme : ReflectReference --- The [`Window`] theme variant to use. WindowTheme = {} ----@class CursorIcon +---@class CursorIcon : ReflectReference --- Insert into a window entity to set the cursor for that window. CursorIcon = {} ----@class NonZeroU32 +---@class bool : ReflectReference +--- A boolean value +bool = {} + + +---@class char : ReflectReference +--- An 8-bit character +char = {} + + +---@class NonZeroI16 : ReflectReference +NonZeroI16 = {} + +---@class NonZeroU16 : ReflectReference +NonZeroU16 = {} + + +---@class NonZeroU32 : ReflectReference NonZeroU32 = {} ----@class Cow +---@class f32 : ReflectReference +--- A 32-bit floating point number +f32 = {} -Cow = {} +---@class f64 : ReflectReference +--- A 64-bit floating point number +f64 = {} ----@class Arc -Arc = {} +---@class i128 : ReflectReference +--- A signed 128-bit integer +i128 = {} + +---@class i16 : ReflectReference +--- A signed 16-bit integer +i16 = {} ----@class Range -Range = {} +---@class i32 : ReflectReference +--- A signed 32-bit integer +i32 = {} + + +---@class i64 : ReflectReference +--- A signed 64-bit integer +i64 = {} + + +---@class i8 : ReflectReference +--- A signed 8-bit integer +i8 = {} + + +---@class isize : ReflectReference +--- A signed pointer-sized integer +isize = {} + + +---@class u128 : ReflectReference +--- An unsigned 128-bit integer +u128 = {} + +---@class u16 : ReflectReference +--- An unsigned 16-bit integer +u16 = {} + + +---@class u32 : ReflectReference +--- An unsigned 32-bit integer +u32 = {} + + +---@class u64 : ReflectReference +--- An unsigned 64-bit integer +u64 = {} + + +---@class u8 : ReflectReference +--- An unsigned 8-bit integer +u8 = {} + + +---@class usize : ReflectReference +--- An unsigned pointer-sized integer +usize = {} + + +---@class Cow : ReflectReference +Cow = {} ----@class RangeInclusive +---@class Arc : ReflectReference +Arc = {} + + +---@class Range : ReflectReference +Range = {} + + +---@class RangeInclusive : ReflectReference RangeInclusive = {} @@ -28885,93 +24517,53 @@ RangeInclusive = {} --- A static class allowing calls through the "." operator only. Annulus = {} ----@type CompositeAlphaMode +---@type AlignItems --- A static class allowing calls through the "." operator only. -CompositeAlphaMode = {} +AlignItems = {} ---@type FunctionInfo --- A static class allowing calls through the "." operator only. FunctionInfo = {} ----@type GamepadSettings ---- A static class allowing calls through the "." operator only. -GamepadSettings = {} - ---@type WindowBackendScaleFactorChanged --- A static class allowing calls through the "." operator only. WindowBackendScaleFactorChanged = {} ----@type Aabb2d ---- A static class allowing calls through the "." operator only. -Aabb2d = {} - ----@type Camera3d ---- A static class allowing calls through the "." operator only. -Camera3d = {} - ----@type Arc +---@type TextColor --- A static class allowing calls through the "." operator only. -Arc = {} +TextColor = {} ----@type ClearColorConfig +---@type BackgroundColor --- A static class allowing calls through the "." operator only. -ClearColorConfig = {} +BackgroundColor = {} ----@type DVec3 +---@type AtomicU16 --- A static class allowing calls through the "." operator only. -DVec3 = {} +AtomicU16 = {} ---@type GamepadRumbleRequest --- A static class allowing calls through the "." operator only. GamepadRumbleRequest = {} ----@type AtomicU16 ---- A static class allowing calls through the "." operator only. -AtomicU16 = {} - ---@type ConeMeshBuilder --- A static class allowing calls through the "." operator only. ConeMeshBuilder = {} ----@type Segment2d ---- A static class allowing calls through the "." operator only. -Segment2d = {} - ---@type KeyboardFocusLost --- A static class allowing calls through the "." operator only. KeyboardFocusLost = {} ----@type Hwba ---- A static class allowing calls through the "." operator only. -Hwba = {} - ----@type DMat3 ---- A static class allowing calls through the "." operator only. -DMat3 = {} - ----@type Identifier ---- A static class allowing calls through the "." operator only. -Identifier = {} - ----@type DynamicFunctionMut ---- A static class allowing calls through the "." operator only. -DynamicScriptFunctionMut = {} - ----@type MotionVectorPrepass ---- A static class allowing calls through the "." operator only. -MotionVectorPrepass = {} - ----@type RegularPolygonMeshBuilder +---@type ComputedNode --- A static class allowing calls through the "." operator only. -RegularPolygonMeshBuilder = {} +ComputedNode = {} ---@type SmolStr --- A static class allowing calls through the "." operator only. SmolStr = {} ----@type ButtonAxisSettings +---@type RegularPolygonMeshBuilder --- A static class allowing calls through the "." operator only. -ButtonAxisSettings = {} +RegularPolygonMeshBuilder = {} ---@type ChromaticAberration --- A static class allowing calls through the "." operator only. @@ -28993,10 +24585,6 @@ DQuat = {} --- A static class allowing calls through the "." operator only. DynamicComponent = {} ----@type OrthographicProjection ---- A static class allowing calls through the "." operator only. -OrthographicProjection = {} - ---@type U16Vec4 --- A static class allowing calls through the "." operator only. U16Vec4 = {} @@ -29009,38 +24597,26 @@ CursorLeft = {} --- A static class allowing calls through the "." operator only. Arc2d = {} ----@type SystemCursorIcon +---@type BloomCompositeMode --- A static class allowing calls through the "." operator only. -SystemCursorIcon = {} +BloomCompositeMode = {} ---@type CameraRenderGraph --- A static class allowing calls through the "." operator only. CameraRenderGraph = {} ----@type BloomCompositeMode +---@type NonZeroI16 --- A static class allowing calls through the "." operator only. -BloomCompositeMode = {} +NonZeroI16 = {} ---@type FileDragAndDrop --- A static class allowing calls through the "." operator only. FileDragAndDrop = {} ----@type U64Vec3 ---- A static class allowing calls through the "." operator only. -U64Vec3 = {} - ----@type BVec4 ---- A static class allowing calls through the "." operator only. -BVec4 = {} - ---@type Mat3 --- A static class allowing calls through the "." operator only. Mat3 = {} ----@type Uuid ---- A static class allowing calls through the "." operator only. -Uuid = {} - ---@type Frustum --- A static class allowing calls through the "." operator only. Frustum = {} @@ -29053,181 +24629,97 @@ ColorGradingSection = {} --- A static class allowing calls through the "." operator only. bool = {} ----@type ShaderStorageBuffer ---- A static class allowing calls through the "." operator only. -ShaderStorageBuffer = {} - ----@type Mesh2d ---- A static class allowing calls through the "." operator only. -Mesh2d = {} - ----@type GamepadButtonStateChangedEvent ---- A static class allowing calls through the "." operator only. -GamepadButtonStateChangedEvent = {} - ----@type AabbCast2d ---- A static class allowing calls through the "." operator only. -AabbCast2d = {} - ----@type ReflectableScheduleLabel +---@type ComputedNodeTarget --- A static class allowing calls through the "." operator only. -ReflectableScheduleLabel = {} +ComputedNodeTarget = {} ----@type AutoExposureCompensationCurve +---@type BorderColor --- A static class allowing calls through the "." operator only. -AutoExposureCompensationCurve = {} +BorderColor = {} ---@type SystemIdMarker --- A static class allowing calls through the "." operator only. SystemIdMarker = {} ----@type WindowPosition +---@type ImageNode --- A static class allowing calls through the "." operator only. -WindowPosition = {} +ImageNode = {} ---@type AccumulatedMouseMotion --- A static class allowing calls through the "." operator only. AccumulatedMouseMotion = {} ----@type ClearColor ---- A static class allowing calls through the "." operator only. -ClearColor = {} - ----@type CircularSectorMeshBuilder ---- A static class allowing calls through the "." operator only. -CircularSectorMeshBuilder = {} - ----@type Plane3d ---- A static class allowing calls through the "." operator only. -Plane3d = {} - ----@type WindowDestroyed +---@type WindowPosition --- A static class allowing calls through the "." operator only. -WindowDestroyed = {} +WindowPosition = {} ----@type Capsule3d +---@type Label --- A static class allowing calls through the "." operator only. -Capsule3d = {} +Label = {} ---@type WindowCreated --- A static class allowing calls through the "." operator only. WindowCreated = {} ----@type MouseWheel ---- A static class allowing calls through the "." operator only. -MouseWheel = {} - ----@type BoundingSphereCast +---@type FontSmoothing --- A static class allowing calls through the "." operator only. -BoundingSphereCast = {} +FontSmoothing = {} ---@type SmaaPreset --- A static class allowing calls through the "." operator only. SmaaPreset = {} ----@type NativeKeyCode ---- A static class allowing calls through the "." operator only. -NativeKeyCode = {} - ----@type DMat2 ---- A static class allowing calls through the "." operator only. -DMat2 = {} - ---@type i16 --- A static class allowing calls through the "." operator only. i16 = {} +---@type MinTrackSizingFunction +--- A static class allowing calls through the "." operator only. +MinTrackSizingFunction = {} + ---@type PathBuf --- A static class allowing calls through the "." operator only. PathBuf = {} ----@type IVec2 +---@type ZIndex --- A static class allowing calls through the "." operator only. -IVec2 = {} +ZIndex = {} ---@type WindowClosing --- A static class allowing calls through the "." operator only. WindowClosing = {} ----@type ReflectSchedule ---- A static class allowing calls through the "." operator only. -ReflectSchedule = {} - ----@type Entity +---@type Entity --- A static class allowing calls through the "." operator only. Entity = {} ----@type Namespace ---- A static class allowing calls through the "." operator only. -Namespace = {} - ----@type DefaultQueryFilters ---- A static class allowing calls through the "." operator only. -DefaultQueryFilters = {} - ----@type Isometry2d ---- A static class allowing calls through the "." operator only. -Isometry2d = {} - ----@type f64 ---- A static class allowing calls through the "." operator only. -f64 = {} - ---@type Sensitivity --- A static class allowing calls through the "." operator only. Sensitivity = {} ----@type Capsule2d +---@type Isometry2d --- A static class allowing calls through the "." operator only. -Capsule2d = {} +Isometry2d = {} ---@type RemovedComponentEntity --- A static class allowing calls through the "." operator only. RemovedComponentEntity = {} ----@type FloatOrd ---- A static class allowing calls through the "." operator only. -FloatOrd = {} - ----@type Anchor ---- A static class allowing calls through the "." operator only. -Anchor = {} - ----@type Hsla ---- A static class allowing calls through the "." operator only. -Hsla = {} - ----@type AtomicU64 +---@type f64 --- A static class allowing calls through the "." operator only. -AtomicU64 = {} +f64 = {} ----@type NormalPrepass +---@type Namespace --- A static class allowing calls through the "." operator only. -NormalPrepass = {} +Namespace = {} ---@type BloomPrefilter --- A static class allowing calls through the "." operator only. BloomPrefilter = {} ----@type Torus ---- A static class allowing calls through the "." operator only. -Torus = {} - ----@type ScriptSystemBuilder ---- A static class allowing calls through the "." operator only. -ScriptSystemBuilder = {} - ----@type ComponentTicks ---- A static class allowing calls through the "." operator only. -ComponentTicks = {} - ----@type Interval ---- A static class allowing calls through the "." operator only. -Interval = {} - ----@type AtomicU8 +---@type Text2d --- A static class allowing calls through the "." operator only. -AtomicU8 = {} +Text2d = {} ---@type TouchPhase --- A static class allowing calls through the "." operator only. @@ -29237,30 +24729,14 @@ TouchPhase = {} --- A static class allowing calls through the "." operator only. TorusMeshBuilder = {} ----@type CompassQuadrant +---@type OrderIndependentTransparencySettings --- A static class allowing calls through the "." operator only. -CompassQuadrant = {} +OrderIndependentTransparencySettings = {} ---@type EulerRot --- A static class allowing calls through the "." operator only. EulerRot = {} ----@type DepthPrepass ---- A static class allowing calls through the "." operator only. -DepthPrepass = {} - ----@type AlphaMode2d ---- A static class allowing calls through the "." operator only. -AlphaMode2d = {} - ----@type NativeKey ---- A static class allowing calls through the "." operator only. -NativeKey = {} - ----@type SocketAddr ---- A static class allowing calls through the "." operator only. -SocketAddr = {} - ---@type Camera3dDepthTextureUsage --- A static class allowing calls through the "." operator only. Camera3dDepthTextureUsage = {} @@ -29269,65 +24745,29 @@ Camera3dDepthTextureUsage = {} --- A static class allowing calls through the "." operator only. U64Vec2 = {} ----@type IVec3 ---- A static class allowing calls through the "." operator only. -IVec3 = {} - ---@type I8Vec2 --- A static class allowing calls through the "." operator only. I8Vec2 = {} ----@type DVec2 ---- A static class allowing calls through the "." operator only. -DVec2 = {} - ----@type Viewport ---- A static class allowing calls through the "." operator only. -Viewport = {} - ----@type I64Vec3 ---- A static class allowing calls through the "." operator only. -I64Vec3 = {} - ----@type OrderIndependentTransparencySettings ---- A static class allowing calls through the "." operator only. -OrderIndependentTransparencySettings = {} - ----@type WindowFocused ---- A static class allowing calls through the "." operator only. -WindowFocused = {} - ----@type Oklaba ---- A static class allowing calls through the "." operator only. -Oklaba = {} - ----@type MouseMotion +---@type ContentSize --- A static class allowing calls through the "." operator only. -MouseMotion = {} +ContentSize = {} ----@type Cuboid +---@type u8 --- A static class allowing calls through the "." operator only. -Cuboid = {} +u8 = {} ---@type Tetrahedron --- A static class allowing calls through the "." operator only. Tetrahedron = {} ----@type ScriptAttachment ---- A static class allowing calls through the "." operator only. -ScriptAttachment = {} - ----@type BVec3 ---- A static class allowing calls through the "." operator only. -BVec3 = {} - ----@type WindowOccluded +---@type Dir3A --- A static class allowing calls through the "." operator only. -WindowOccluded = {} +Dir3A = {} ----@type ScreenshotCaptured +---@type ImageRenderTarget --- A static class allowing calls through the "." operator only. -ScreenshotCaptured = {} +ImageRenderTarget = {} ---@type Quat --- A static class allowing calls through the "." operator only. @@ -29341,49 +24781,29 @@ Plane2d = {} --- A static class allowing calls through the "." operator only. I16Vec4 = {} ----@type ImageRenderTarget ---- A static class allowing calls through the "." operator only. -ImageRenderTarget = {} - ----@type DenoiseCas ---- A static class allowing calls through the "." operator only. -DenoiseCas = {} - ---@type GamepadButtonChangedEvent --- A static class allowing calls through the "." operator only. GamepadButtonChangedEvent = {} ----@type Key ---- A static class allowing calls through the "." operator only. -Key = {} - ----@type PinchGesture ---- A static class allowing calls through the "." operator only. -PinchGesture = {} - ----@type Monitor ---- A static class allowing calls through the "." operator only. -Monitor = {} - ----@type Cone +---@type CompassOctant --- A static class allowing calls through the "." operator only. -Cone = {} +CompassOctant = {} ---@type Ime --- A static class allowing calls through the "." operator only. Ime = {} ----@type OnRemove +---@type TextEntity --- A static class allowing calls through the "." operator only. -OnRemove = {} +TextEntity = {} ---@type Line2d --- A static class allowing calls through the "." operator only. Line2d = {} ----@type AtomicI8 +---@type Sprite --- A static class allowing calls through the "." operator only. -AtomicI8 = {} +Sprite = {} ---@type DeferredPrepass --- A static class allowing calls through the "." operator only. @@ -29393,54 +24813,34 @@ DeferredPrepass = {} --- A static class allowing calls through the "." operator only. KeyCode = {} ----@type TetrahedronMeshBuilder +---@type TemporalJitter --- A static class allowing calls through the "." operator only. -TetrahedronMeshBuilder = {} +TemporalJitter = {} ----@type WindowResized +---@type ViewVisibility --- A static class allowing calls through the "." operator only. -WindowResized = {} +ViewVisibility = {} ----@type BVec2 +---@type Ellipse --- A static class allowing calls through the "." operator only. -BVec2 = {} +Ellipse = {} ---@type AspectRatio --- A static class allowing calls through the "." operator only. AspectRatio = {} ----@type TemporalJitter ---- A static class allowing calls through the "." operator only. -TemporalJitter = {} - ----@type AtomicI32 +---@type I64Vec4 --- A static class allowing calls through the "." operator only. -AtomicI32 = {} +I64Vec4 = {} ---@type Color --- A static class allowing calls through the "." operator only. Color = {} ----@type WindowMode ---- A static class allowing calls through the "." operator only. -WindowMode = {} - ----@type I64Vec4 ---- A static class allowing calls through the "." operator only. -I64Vec4 = {} - ---@type WindowRef --- A static class allowing calls through the "." operator only. WindowRef = {} ----@type ViewVisibility ---- A static class allowing calls through the "." operator only. -ViewVisibility = {} - ----@type RawGamepadAxisChangedEvent ---- A static class allowing calls through the "." operator only. -RawGamepadAxisChangedEvent = {} - ---@type GlobalTransform --- A static class allowing calls through the "." operator only. GlobalTransform = {} @@ -29449,13 +24849,9 @@ GlobalTransform = {} --- A static class allowing calls through the "." operator only. Rectangle = {} ----@type Dir3 ---- A static class allowing calls through the "." operator only. -Dir3 = {} - ----@type Sprite +---@type WindowLevel --- A static class allowing calls through the "." operator only. -Sprite = {} +WindowLevel = {} ---@type ButtonSettings --- A static class allowing calls through the "." operator only. @@ -29465,193 +24861,1061 @@ ButtonSettings = {} --- A static class allowing calls through the "." operator only. IVec4 = {} ----@type PerspectiveProjection ---- A static class allowing calls through the "." operator only. -PerspectiveProjection = {} - ---@type RequestRedraw --- A static class allowing calls through the "." operator only. RequestRedraw = {} ----@type WindowThemeChanged +---@type CalculatedClip --- A static class allowing calls through the "." operator only. -WindowThemeChanged = {} +CalculatedClip = {} ---@type Line3d --- A static class allowing calls through the "." operator only. Line3d = {} ----@type Mat2 +---@type PrimaryWindow --- A static class allowing calls through the "." operator only. -Mat2 = {} +PrimaryWindow = {} ----@type IRect +---@type Triangle2dMeshBuilder --- A static class allowing calls through the "." operator only. -IRect = {} +Triangle2dMeshBuilder = {} ----@type Mesh3d +---@type U8Vec2 --- A static class allowing calls through the "." operator only. -Mesh3d = {} +U8Vec2 = {} ----@type TextureAtlas +---@type BoxShadow --- A static class allowing calls through the "." operator only. -TextureAtlas = {} +BoxShadow = {} ----@type ContrastAdaptiveSharpening +---@type U64Vec4 --- A static class allowing calls through the "." operator only. -ContrastAdaptiveSharpening = {} +U64Vec4 = {} ----@type Msaa +---@type SubCameraView --- A static class allowing calls through the "." operator only. -Msaa = {} +SubCameraView = {} ----@type CubemapFrusta +---@type UVec3 --- A static class allowing calls through the "." operator only. -CubemapFrusta = {} +UVec3 = {} ----@type PrimaryWindow +---@type DebandDither --- A static class allowing calls through the "." operator only. -PrimaryWindow = {} +DebandDither = {} ----@type AlphaMode +---@type Screenshot --- A static class allowing calls through the "." operator only. -AlphaMode = {} +Screenshot = {} ----@type U8Vec2 +---@type OverflowClipMargin --- A static class allowing calls through the "." operator only. -U8Vec2 = {} +OverflowClipMargin = {} ----@type ScalingMode +---@type GlyphAtlasLocation --- A static class allowing calls through the "." operator only. -ScalingMode = {} +GlyphAtlasLocation = {} ----@type CameraMainTextureUsages +---@type Image --- A static class allowing calls through the "." operator only. -CameraMainTextureUsages = {} +Image = {} ----@type U64Vec4 +---@type FunctionReturnInfo --- A static class allowing calls through the "." operator only. -U64Vec4 = {} +FunctionReturnInfo = {} + +---@type I8Vec3 +--- A static class allowing calls through the "." operator only. +I8Vec3 = {} + +---@type Fixed +--- A static class allowing calls through the "." operator only. +Fixed = {} + +---@type Triangle3d +--- A static class allowing calls through the "." operator only. +Triangle3d = {} + +---@type UiScale +--- A static class allowing calls through the "." operator only. +UiScale = {} + +---@type TextBounds +--- A static class allowing calls through the "." operator only. +TextBounds = {} + +---@type Vec2 +--- A static class allowing calls through the "." operator only. +Vec2 = {} + +---@type Camera +--- A static class allowing calls through the "." operator only. +Camera = {} + +---@type BoundingCircle +--- A static class allowing calls through the "." operator only. +BoundingCircle = {} + +---@type Laba +--- A static class allowing calls through the "." operator only. +Laba = {} + +---@type Capsule3dMeshBuilder +--- A static class allowing calls through the "." operator only. +Capsule3dMeshBuilder = {} + +---@type DepthOfField +--- A static class allowing calls through the "." operator only. +DepthOfField = {} + +---@type f32 +--- A static class allowing calls through the "." operator only. +f32 = {} + +---@type BorderRect +--- A static class allowing calls through the "." operator only. +BorderRect = {} + +---@type DAffine3 +--- A static class allowing calls through the "." operator only. +DAffine3 = {} + +---@type i8 +--- A static class allowing calls through the "." operator only. +i8 = {} + +---@type OverflowAxis +--- A static class allowing calls through the "." operator only. +OverflowAxis = {} + +---@type Range +--- A static class allowing calls through the "." operator only. +Range = {} + +---@type NonZeroU32 +--- A static class allowing calls through the "." operator only. +NonZeroU32 = {} + +---@type BoundingCircleCast +--- A static class allowing calls through the "." operator only. +BoundingCircleCast = {} + +---@type Ray3d +--- A static class allowing calls through the "." operator only. +Ray3d = {} + +---@type Indices +--- A static class allowing calls through the "." operator only. +Indices = {} + +---@type AlignSelf +--- A static class allowing calls through the "." operator only. +AlignSelf = {} + +---@type SliceScaleMode +--- A static class allowing calls through the "." operator only. +SliceScaleMode = {} + +---@type u64 +--- A static class allowing calls through the "." operator only. +u64 = {} + +---@type VideoMode +--- A static class allowing calls through the "." operator only. +VideoMode = {} + +---@type AtomicUsize +--- A static class allowing calls through the "." operator only. +AtomicUsize = {} + +---@type BVec3A +--- A static class allowing calls through the "." operator only. +BVec3A = {} + +---@type RenderAssetUsages +--- A static class allowing calls through the "." operator only. +RenderAssetUsages = {} + +---@type MouseButton +--- A static class allowing calls through the "." operator only. +MouseButton = {} + +---@type Vec3A +--- A static class allowing calls through the "." operator only. +Vec3A = {} + +---@type RotationGesture +--- A static class allowing calls through the "." operator only. +RotationGesture = {} + +---@type VisibilityClass +--- A static class allowing calls through the "." operator only. +VisibilityClass = {} + +---@type GamepadConnection +--- A static class allowing calls through the "." operator only. +GamepadConnection = {} + +---@type AutoExposure +--- A static class allowing calls through the "." operator only. +AutoExposure = {} + +---@type ScriptAsset +--- A static class allowing calls through the "." operator only. +ScriptAsset = {} + +---@type Xyza +--- A static class allowing calls through the "." operator only. +Xyza = {} + +---@type EntityHashSet +--- A static class allowing calls through the "." operator only. +EntityHashSet = {} + +---@type FlexDirection +--- A static class allowing calls through the "." operator only. +FlexDirection = {} + +---@type CircularMeshUvMode +--- A static class allowing calls through the "." operator only. +CircularMeshUvMode = {} + +---@type OnAdd +--- A static class allowing calls through the "." operator only. +OnAdd = {} + +---@type Text +--- A static class allowing calls through the "." operator only. +Text = {} + +---@type CapsuleUvProfile +--- A static class allowing calls through the "." operator only. +CapsuleUvProfile = {} + +---@type ReflectReference +--- A static class allowing calls through the "." operator only. +ReflectReference = {} + +---@type CustomProjection +--- A static class allowing calls through the "." operator only. +CustomProjection = {} + +---@type ReflectSystem +--- A static class allowing calls through the "." operator only. +ReflectSystem = {} + +---@type Tonemapping +--- A static class allowing calls through the "." operator only. +Tonemapping = {} + +---@type Mat4 +--- A static class allowing calls through the "." operator only. +Mat4 = {} + +---@type OnDespawn +--- A static class allowing calls through the "." operator only. +OnDespawn = {} + +---@type RawGamepadEvent +--- A static class allowing calls through the "." operator only. +RawGamepadEvent = {} + +---@type Virtual +--- A static class allowing calls through the "." operator only. +Virtual = {} + +---@type CursorIcon +--- A static class allowing calls through the "." operator only. +CursorIcon = {} + +---@type InfinitePlane3d +--- A static class allowing calls through the "." operator only. +InfinitePlane3d = {} + +---@type Affine2 +--- A static class allowing calls through the "." operator only. +Affine2 = {} + +---@type AtomicU32 +--- A static class allowing calls through the "." operator only. +AtomicU32 = {} + +---@type JumpAt +--- A static class allowing calls through the "." operator only. +JumpAt = {} + +---@type ComponentId +--- A static class allowing calls through the "." operator only. +ComponentId = {} + +---@type AtomicBool +--- A static class allowing calls through the "." operator only. +AtomicBool = {} + +---@type Bloom +--- A static class allowing calls through the "." operator only. +Bloom = {} + +---@type ManualTextureViewHandle +--- A static class allowing calls through the "." operator only. +ManualTextureViewHandle = {} + +---@type Segment3d +--- A static class allowing calls through the "." operator only. +Segment3d = {} + +---@type WindowClosed +--- A static class allowing calls through the "." operator only. +WindowClosed = {} + +---@type Cow +--- A static class allowing calls through the "." operator only. +Cow = {} + +---@type EnabledButtons +--- A static class allowing calls through the "." operator only. +EnabledButtons = {} + +---@type GamepadConnectionEvent +--- A static class allowing calls through the "." operator only. +GamepadConnectionEvent = {} + +---@type RangeInclusive +--- A static class allowing calls through the "." operator only. +RangeInclusive = {} + +---@type InternalWindowState +--- A static class allowing calls through the "." operator only. +InternalWindowState = {} + +---@type Outline +--- A static class allowing calls through the "." operator only. +Outline = {} + +---@type VideoModeSelection +--- A static class allowing calls through the "." operator only. +VideoModeSelection = {} + +---@type u128 +--- A static class allowing calls through the "." operator only. +u128 = {} + +---@type ChildOf +--- A static class allowing calls through the "." operator only. +ChildOf = {} + +---@type CylinderAnchor +--- A static class allowing calls through the "." operator only. +CylinderAnchor = {} + +---@type U16Vec2 +--- A static class allowing calls through the "." operator only. +U16Vec2 = {} + +---@type GamepadRumbleIntensity +--- A static class allowing calls through the "." operator only. +GamepadRumbleIntensity = {} + +---@type table +--- An global instance of this type +types = {} + +---@type Skybox +--- A static class allowing calls through the "." operator only. +Skybox = {} + +---@type CylinderMeshBuilder +--- A static class allowing calls through the "." operator only. +CylinderMeshBuilder = {} + +---@type Camera3dDepthLoadOp +--- A static class allowing calls through the "." operator only. +Camera3dDepthLoadOp = {} + +---@type JustifySelf +--- A static class allowing calls through the "." operator only. +JustifySelf = {} + +---@type ScreenSpaceTransmissionQuality +--- A static class allowing calls through the "." operator only. +ScreenSpaceTransmissionQuality = {} + +---@type Dir2 +--- A static class allowing calls through the "." operator only. +Dir2 = {} + +---@type CircularSegment +--- A static class allowing calls through the "." operator only. +CircularSegment = {} + +---@type BoxShadowSamples +--- A static class allowing calls through the "." operator only. +BoxShadowSamples = {} + +---@type LinearRgba +--- A static class allowing calls through the "." operator only. +LinearRgba = {} + +---@type TextLayoutInfo +--- A static class allowing calls through the "." operator only. +TextLayoutInfo = {} + +---@type ImageNodeSize +--- A static class allowing calls through the "." operator only. +ImageNodeSize = {} + +---@type TypeId +--- A static class allowing calls through the "." operator only. +TypeId = {} + +---@type I16Vec2 +--- A static class allowing calls through the "." operator only. +I16Vec2 = {} + +---@type RectangleMeshBuilder +--- A static class allowing calls through the "." operator only. +RectangleMeshBuilder = {} + +---@type URect +--- A static class allowing calls through the "." operator only. +URect = {} + +---@type Capsule2dMeshBuilder +--- A static class allowing calls through the "." operator only. +Capsule2dMeshBuilder = {} + +---@type SphereMeshBuilder +--- A static class allowing calls through the "." operator only. +SphereMeshBuilder = {} + +---@type I64Vec2 +--- A static class allowing calls through the "." operator only. +I64Vec2 = {} + +---@type Children +--- A static class allowing calls through the "." operator only. +Children = {} + +---@type i32 +--- A static class allowing calls through the "." operator only. +i32 = {} + +---@type CursorOptions +--- A static class allowing calls through the "." operator only. +CursorOptions = {} + +---@type AtomicI16 +--- A static class allowing calls through the "." operator only. +AtomicI16 = {} + +---@type MeshMorphWeights +--- A static class allowing calls through the "." operator only. +MeshMorphWeights = {} + +---@type Projection +--- A static class allowing calls through the "." operator only. +Projection = {} + +---@type DMat4 +--- A static class allowing calls through the "." operator only. +DMat4 = {} + +---@type Gamepad +--- A static class allowing calls through the "." operator only. +Gamepad = {} + +---@type Affine3 +--- A static class allowing calls through the "." operator only. +Affine3 = {} + +---@type TimerMode +--- A static class allowing calls through the "." operator only. +TimerMode = {} + +---@type Display +--- A static class allowing calls through the "." operator only. +Display = {} + +---@type VisibilityRange +--- A static class allowing calls through the "." operator only. +VisibilityRange = {} + +---@type RenderLayers +--- A static class allowing calls through the "." operator only. +RenderLayers = {} + +---@type U8Vec4 +--- A static class allowing calls through the "." operator only. +U8Vec4 = {} + +---@type SyncToRenderWorld +--- A static class allowing calls through the "." operator only. +SyncToRenderWorld = {} + +---@type TextShadow +--- A static class allowing calls through the "." operator only. +TextShadow = {} + +---@type AabbCast3d +--- A static class allowing calls through the "." operator only. +AabbCast3d = {} + +---@type I8Vec4 +--- A static class allowing calls through the "." operator only. +I8Vec4 = {} + +---@type ConicalFrustumMeshBuilder +--- A static class allowing calls through the "." operator only. +ConicalFrustumMeshBuilder = {} + +---@type LineBreak +--- A static class allowing calls through the "." operator only. +LineBreak = {} + +---@type Real +--- A static class allowing calls through the "." operator only. +Real = {} + +---@type WindowCloseRequested +--- A static class allowing calls through the "." operator only. +WindowCloseRequested = {} + +---@type ScrollPosition +--- A static class allowing calls through the "." operator only. +ScrollPosition = {} + +---@type RayCast3d +--- A static class allowing calls through the "." operator only. +RayCast3d = {} + +---@type OverflowClipBox +--- A static class allowing calls through the "." operator only. +OverflowClipBox = {} + +---@type Aabb3d +--- A static class allowing calls through the "." operator only. +Aabb3d = {} + +---@type Window +--- A static class allowing calls through the "." operator only. +Window = {} + +---@type InheritedVisibility +--- A static class allowing calls through the "." operator only. +InheritedVisibility = {} + +---@type TextureAtlasLayout +--- A static class allowing calls through the "." operator only. +TextureAtlasLayout = {} + +---@type Triangle3dMeshBuilder +--- A static class allowing calls through the "." operator only. +Triangle3dMeshBuilder = {} + +---@type I16Vec3 +--- A static class allowing calls through the "." operator only. +I16Vec3 = {} + +---@type Smaa +--- A static class allowing calls through the "." operator only. +Smaa = {} + +---@type Oklcha +--- A static class allowing calls through the "." operator only. +Oklcha = {} + +---@type ShadowStyle +--- A static class allowing calls through the "." operator only. +ShadowStyle = {} + +---@type GridTrackRepetition +--- A static class allowing calls through the "." operator only. +GridTrackRepetition = {} + +---@type CompositeAlphaMode +--- A static class allowing calls through the "." operator only. +CompositeAlphaMode = {} + +---@type Aabb2d +--- A static class allowing calls through the "." operator only. +Aabb2d = {} + +---@type GamepadSettings +--- A static class allowing calls through the "." operator only. +GamepadSettings = {} + +---@type Camera3d +--- A static class allowing calls through the "." operator only. +Camera3d = {} + +---@type Arc +--- A static class allowing calls through the "." operator only. +Arc = {} + +---@type ClearColorConfig +--- A static class allowing calls through the "." operator only. +ClearColorConfig = {} + +---@type DVec3 +--- A static class allowing calls through the "." operator only. +DVec3 = {} + +---@type FocusPolicy +--- A static class allowing calls through the "." operator only. +FocusPolicy = {} + +---@type Segment2d +--- A static class allowing calls through the "." operator only. +Segment2d = {} + +---@type Hwba +--- A static class allowing calls through the "." operator only. +Hwba = {} + +---@type DMat3 +--- A static class allowing calls through the "." operator only. +DMat3 = {} + +---@type Identifier +--- A static class allowing calls through the "." operator only. +Identifier = {} + +---@type RepeatedGridTrack +--- A static class allowing calls through the "." operator only. +RepeatedGridTrack = {} + +---@type MotionVectorPrepass +--- A static class allowing calls through the "." operator only. +MotionVectorPrepass = {} + +---@type DynamicFunctionMut +--- A static class allowing calls through the "." operator only. +DynamicScriptFunctionMut = {} + +---@type ButtonAxisSettings +--- A static class allowing calls through the "." operator only. +ButtonAxisSettings = {} + +---@type OrthographicProjection +--- A static class allowing calls through the "." operator only. +OrthographicProjection = {} + +---@type SystemCursorIcon +--- A static class allowing calls through the "." operator only. +SystemCursorIcon = {} + +---@type U64Vec3 +--- A static class allowing calls through the "." operator only. +U64Vec3 = {} + +---@type BVec4 +--- A static class allowing calls through the "." operator only. +BVec4 = {} + +---@type Uuid +--- A static class allowing calls through the "." operator only. +Uuid = {} + +---@type Mesh2d +--- A static class allowing calls through the "." operator only. +Mesh2d = {} + +---@type ShaderStorageBuffer +--- A static class allowing calls through the "." operator only. +ShaderStorageBuffer = {} + +---@type GamepadButtonStateChangedEvent +--- A static class allowing calls through the "." operator only. +GamepadButtonStateChangedEvent = {} + +---@type AabbCast2d +--- A static class allowing calls through the "." operator only. +AabbCast2d = {} + +---@type ReflectableScheduleLabel +--- A static class allowing calls through the "." operator only. +ReflectableScheduleLabel = {} + +---@type AutoExposureCompensationCurve +--- A static class allowing calls through the "." operator only. +AutoExposureCompensationCurve = {} + +---@type GridTrack +--- A static class allowing calls through the "." operator only. +GridTrack = {} + +---@type ClearColor +--- A static class allowing calls through the "." operator only. +ClearColor = {} + +---@type Plane3d +--- A static class allowing calls through the "." operator only. +Plane3d = {} + +---@type Button +--- A static class allowing calls through the "." operator only. +Button = {} + +---@type WindowDestroyed +--- A static class allowing calls through the "." operator only. +WindowDestroyed = {} + +---@type Capsule3d +--- A static class allowing calls through the "." operator only. +Capsule3d = {} + +---@type CircularSectorMeshBuilder +--- A static class allowing calls through the "." operator only. +CircularSectorMeshBuilder = {} + +---@type MouseWheel +--- A static class allowing calls through the "." operator only. +MouseWheel = {} + +---@type JustifyText +--- A static class allowing calls through the "." operator only. +JustifyText = {} + +---@type BoundingSphereCast +--- A static class allowing calls through the "." operator only. +BoundingSphereCast = {} + +---@type NativeKeyCode +--- A static class allowing calls through the "." operator only. +NativeKeyCode = {} + +---@type DMat2 +--- A static class allowing calls through the "." operator only. +DMat2 = {} + +---@type PositionType +--- A static class allowing calls through the "." operator only. +PositionType = {} + +---@type IVec2 +--- A static class allowing calls through the "." operator only. +IVec2 = {} + +---@type ReflectSchedule +--- A static class allowing calls through the "." operator only. +ReflectSchedule = {} + +---@type UiAntiAlias +--- A static class allowing calls through the "." operator only. +UiAntiAlias = {} + +---@type DefaultQueryFilters +--- A static class allowing calls through the "." operator only. +DefaultQueryFilters = {} + +---@type FloatOrd +--- A static class allowing calls through the "." operator only. +FloatOrd = {} + +---@type Capsule2d +--- A static class allowing calls through the "." operator only. +Capsule2d = {} + +---@type Anchor +--- A static class allowing calls through the "." operator only. +Anchor = {} + +---@type Hsla +--- A static class allowing calls through the "." operator only. +Hsla = {} + +---@type AtomicU64 +--- A static class allowing calls through the "." operator only. +AtomicU64 = {} + +---@type ComponentTicks +--- A static class allowing calls through the "." operator only. +ComponentTicks = {} + +---@type Torus +--- A static class allowing calls through the "." operator only. +Torus = {} ----@type Exposure +---@type ScriptSystemBuilder --- A static class allowing calls through the "." operator only. -Exposure = {} +ScriptSystemBuilder = {} ----@type SphereKind +---@type Interval --- A static class allowing calls through the "." operator only. -SphereKind = {} +Interval = {} ----@type SubCameraView +---@type NormalPrepass --- A static class allowing calls through the "." operator only. -SubCameraView = {} +NormalPrepass = {} ----@type Triangle2dMeshBuilder +---@type UiRect --- A static class allowing calls through the "." operator only. -Triangle2dMeshBuilder = {} +UiRect = {} ----@type UVec3 +---@type AtomicU8 --- A static class allowing calls through the "." operator only. -UVec3 = {} +AtomicU8 = {} ----@type MotionBlur +---@type CompassQuadrant --- A static class allowing calls through the "." operator only. -MotionBlur = {} +CompassQuadrant = {} + +---@type DynamicFunction +--- A static class allowing calls through the "." operator only. +DynamicScriptFunction = {} + +---@type NativeKey +--- A static class allowing calls through the "." operator only. +NativeKey = {} + +---@type AlphaMode2d +--- A static class allowing calls through the "." operator only. +AlphaMode2d = {} + +---@type SocketAddr +--- A static class allowing calls through the "." operator only. +SocketAddr = {} + +---@type IVec3 +--- A static class allowing calls through the "." operator only. +IVec3 = {} + +---@type TextLayout +--- A static class allowing calls through the "." operator only. +TextLayout = {} + +---@type DepthPrepass +--- A static class allowing calls through the "." operator only. +DepthPrepass = {} + +---@type DVec2 +--- A static class allowing calls through the "." operator only. +DVec2 = {} + +---@type I64Vec3 +--- A static class allowing calls through the "." operator only. +I64Vec3 = {} + +---@type Viewport +--- A static class allowing calls through the "." operator only. +Viewport = {} + +---@type Oklaba +--- A static class allowing calls through the "." operator only. +Oklaba = {} + +---@type WindowFocused +--- A static class allowing calls through the "." operator only. +WindowFocused = {} + +---@type MouseMotion +--- A static class allowing calls through the "." operator only. +MouseMotion = {} + +---@type Cuboid +--- A static class allowing calls through the "." operator only. +Cuboid = {} + +---@type Vec4 +--- A static class allowing calls through the "." operator only. +Vec4 = {} + +---@type ScriptAttachment +--- A static class allowing calls through the "." operator only. +ScriptAttachment = {} + +---@type BVec3 +--- A static class allowing calls through the "." operator only. +BVec3 = {} + +---@type TextFont +--- A static class allowing calls through the "." operator only. +TextFont = {} + +---@type WindowOccluded +--- A static class allowing calls through the "." operator only. +WindowOccluded = {} + +---@type DenoiseCas +--- A static class allowing calls through the "." operator only. +DenoiseCas = {} + +---@type ScreenshotCaptured +--- A static class allowing calls through the "." operator only. +ScreenshotCaptured = {} + +---@type RawGamepadAxisChangedEvent +--- A static class allowing calls through the "." operator only. +RawGamepadAxisChangedEvent = {} + +---@type TextNodeFlags +--- A static class allowing calls through the "." operator only. +TextNodeFlags = {} + +---@type Key +--- A static class allowing calls through the "." operator only. +Key = {} + +---@type PinchGesture +--- A static class allowing calls through the "." operator only. +PinchGesture = {} + +---@type Monitor +--- A static class allowing calls through the "." operator only. +Monitor = {} + +---@type CircularSegmentMeshBuilder +--- A static class allowing calls through the "." operator only. +CircularSegmentMeshBuilder = {} + +---@type Cone +--- A static class allowing calls through the "." operator only. +Cone = {} + +---@type OnRemove +--- A static class allowing calls through the "." operator only. +OnRemove = {} ---@type GamepadButton --- A static class allowing calls through the "." operator only. GamepadButton = {} ----@type WindowLevel +---@type AtomicI8 --- A static class allowing calls through the "." operator only. -WindowLevel = {} +AtomicI8 = {} ----@type TemporalAntiAliasing +---@type Msaa --- A static class allowing calls through the "." operator only. -TemporalAntiAliasing = {} +Msaa = {} ----@type Screenshot +---@type TetrahedronMeshBuilder --- A static class allowing calls through the "." operator only. -Screenshot = {} +TetrahedronMeshBuilder = {} ----@type i64 +---@type WindowResized --- A static class allowing calls through the "." operator only. -i64 = {} +WindowResized = {} ----@type UVec4 +---@type BVec2 --- A static class allowing calls through the "." operator only. -UVec4 = {} +BVec2 = {} ----@type ButtonState +---@type TextureAtlas --- A static class allowing calls through the "." operator only. -ButtonState = {} +TextureAtlas = {} ----@type RegularPolygon +---@type AtomicI32 --- A static class allowing calls through the "." operator only. -RegularPolygon = {} +AtomicI32 = {} ----@type Hsva +---@type WindowMode --- A static class allowing calls through the "." operator only. -Hsva = {} +WindowMode = {} ----@type ScriptQueryBuilder +---@type Dir3 --- A static class allowing calls through the "." operator only. -ScriptQueryBuilder = {} +Dir3 = {} ----@type I8Vec3 +---@type Mesh3d --- A static class allowing calls through the "." operator only. -I8Vec3 = {} +Mesh3d = {} ----@type Fixed +---@type BoxSizing --- A static class allowing calls through the "." operator only. -Fixed = {} +BoxSizing = {} ----@type Duration +---@type FlexWrap --- A static class allowing calls through the "." operator only. -Duration = {} +FlexWrap = {} ----@type CursorGrabMode +---@type ResolvedBorderRadius --- A static class allowing calls through the "." operator only. -CursorGrabMode = {} +ResolvedBorderRadius = {} ----@type Lcha +---@type Mat2 --- A static class allowing calls through the "." operator only. -Lcha = {} +Mat2 = {} ----@type WindowMoved +---@type WindowThemeChanged --- A static class allowing calls through the "." operator only. -WindowMoved = {} +WindowThemeChanged = {} ----@type Vec2 +---@type PerspectiveProjection --- A static class allowing calls through the "." operator only. -Vec2 = {} +PerspectiveProjection = {} ----@type Triangle3d +---@type IRect --- A static class allowing calls through the "." operator only. -Triangle3d = {} +IRect = {} ----@type Image +---@type ContrastAdaptiveSharpening --- A static class allowing calls through the "." operator only. -Image = {} +ContrastAdaptiveSharpening = {} ----@type Laba +---@type CameraMainTextureUsages --- A static class allowing calls through the "." operator only. -Laba = {} +CameraMainTextureUsages = {} ----@type AssetPath +---@type SphereKind --- A static class allowing calls through the "." operator only. -AssetPath = {} +SphereKind = {} ----@type Capsule3dMeshBuilder +---@type AlphaMode --- A static class allowing calls through the "." operator only. -Capsule3dMeshBuilder = {} +AlphaMode = {} ----@type EllipseMeshBuilder +---@type CubemapFrusta +--- A static class allowing calls through the "." operator only. +CubemapFrusta = {} + +---@type ScalingMode +--- A static class allowing calls through the "." operator only. +ScalingMode = {} + +---@type Exposure +--- A static class allowing calls through the "." operator only. +Exposure = {} + +---@type MotionBlur +--- A static class allowing calls through the "." operator only. +MotionBlur = {} + +---@type Transform +--- A static class allowing calls through the "." operator only. +Transform = {} + +---@type TemporalAntiAliasing +--- A static class allowing calls through the "." operator only. +TemporalAntiAliasing = {} + +---@type i64 +--- A static class allowing calls through the "." operator only. +i64 = {} + +---@type ScriptQueryBuilder +--- A static class allowing calls through the "." operator only. +ScriptQueryBuilder = {} + +---@type UVec4 +--- A static class allowing calls through the "." operator only. +UVec4 = {} + +---@type ButtonState +--- A static class allowing calls through the "." operator only. +ButtonState = {} + +---@type RegularPolygon +--- A static class allowing calls through the "." operator only. +RegularPolygon = {} + +---@type Hsva --- A static class allowing calls through the "." operator only. -EllipseMeshBuilder = {} +Hsva = {} ----@type BoundingCircle +---@type WindowMoved --- A static class allowing calls through the "." operator only. -BoundingCircle = {} +WindowMoved = {} ---@type ScriptValue --- A static class allowing calls through the "." operator only. @@ -29661,45 +25925,45 @@ ScriptValue = {} --- A static class allowing calls through the "." operator only. CircleMeshBuilder = {} ----@type GamepadAxisChangedEvent +---@type Duration --- A static class allowing calls through the "." operator only. -GamepadAxisChangedEvent = {} +Duration = {} ----@type VisibleEntities +---@type CursorGrabMode --- A static class allowing calls through the "." operator only. -VisibleEntities = {} +CursorGrabMode = {} ----@type Camera +---@type Lcha --- A static class allowing calls through the "." operator only. -Camera = {} +Lcha = {} ----@type BorderRect +---@type JustifyItems --- A static class allowing calls through the "." operator only. -BorderRect = {} +JustifyItems = {} ----@type f32 +---@type AssetPath --- A static class allowing calls through the "." operator only. -f32 = {} +AssetPath = {} ----@type MipBias +---@type EllipseMeshBuilder --- A static class allowing calls through the "." operator only. -MipBias = {} +EllipseMeshBuilder = {} ----@type DepthOfField +---@type GamepadAxisChangedEvent --- A static class allowing calls through the "." operator only. -DepthOfField = {} +GamepadAxisChangedEvent = {} ----@type i8 +---@type VisibleEntities --- A static class allowing calls through the "." operator only. -i8 = {} +VisibleEntities = {} ----@type CascadesFrusta +---@type MipBias --- A static class allowing calls through the "." operator only. -CascadesFrusta = {} +MipBias = {} ----@type DAffine3 +---@type CascadesFrusta --- A static class allowing calls through the "." operator only. -DAffine3 = {} +CascadesFrusta = {} ---@type RawGamepadButtonChangedEvent --- A static class allowing calls through the "." operator only. @@ -29709,113 +25973,49 @@ RawGamepadButtonChangedEvent = {} --- A static class allowing calls through the "." operator only. MorphWeights = {} ----@type Range ---- A static class allowing calls through the "." operator only. -Range = {} - ---@type Rect --- A static class allowing calls through the "." operator only. Rect = {} ----@type NonZeroU32 ---- A static class allowing calls through the "." operator only. -NonZeroU32 = {} - ----@type BoundingCircleCast ---- A static class allowing calls through the "." operator only. -BoundingCircleCast = {} - ---@type ScriptResourceRegistration --- A static class allowing calls through the "." operator only. ScriptResourceRegistration = {} ----@type Indices +---@type Node --- A static class allowing calls through the "." operator only. -Indices = {} +Node = {} ---@type AxisSettings --- A static class allowing calls through the "." operator only. AxisSettings = {} ----@type SliceScaleMode ---- A static class allowing calls through the "." operator only. -SliceScaleMode = {} - ---@type Vec3 --- A static class allowing calls through the "." operator only. Vec3 = {} ----@type u64 ---- A static class allowing calls through the "." operator only. -u64 = {} - ----@type Transform ---- A static class allowing calls through the "." operator only. -Transform = {} - ----@type Vec4 ---- A static class allowing calls through the "." operator only. -Vec4 = {} - ----@type Ellipse ---- A static class allowing calls through the "." operator only. -Ellipse = {} - ----@type DebandDither ---- A static class allowing calls through the "." operator only. -DebandDither = {} - ----@type Ray3d +---@type Overflow --- A static class allowing calls through the "." operator only. -Ray3d = {} +Overflow = {} ---@type AssetIndex --- A static class allowing calls through the "." operator only. AssetIndex = {} ----@type CompassOctant ---- A static class allowing calls through the "." operator only. -CompassOctant = {} - ----@type CircularSegmentMeshBuilder ---- A static class allowing calls through the "." operator only. -CircularSegmentMeshBuilder = {} - ----@type FunctionReturnInfo ---- A static class allowing calls through the "." operator only. -FunctionReturnInfo = {} - ----@type VideoMode ---- A static class allowing calls through the "." operator only. -VideoMode = {} - ----@type AtomicUsize ---- A static class allowing calls through the "." operator only. -AtomicUsize = {} - ----@type BVec3A ---- A static class allowing calls through the "." operator only. -BVec3A = {} - ----@type RenderAssetUsages ---- A static class allowing calls through the "." operator only. -RenderAssetUsages = {} - ---@type Fxaa --- A static class allowing calls through the "." operator only. Fxaa = {} ----@type Vec3A ---- A static class allowing calls through the "." operator only. -Vec3A = {} - ---@type Ray2d --- A static class allowing calls through the "." operator only. Ray2d = {} ----@type RotationGesture +---@type GlyphAtlasInfo --- A static class allowing calls through the "." operator only. -RotationGesture = {} +GlyphAtlasInfo = {} + +---@type ComputedTextBlock +--- A static class allowing calls through the "." operator only. +ComputedTextBlock = {} ---@type AtomicIsize --- A static class allowing calls through the "." operator only. @@ -29833,18 +26033,14 @@ ScriptComponentRegistration = {} --- A static class allowing calls through the "." operator only. AtomicI64 = {} ----@type MouseButton +---@type UiTargetCamera --- A static class allowing calls through the "." operator only. -MouseButton = {} +UiTargetCamera = {} ---@type CircularSector --- A static class allowing calls through the "." operator only. CircularSector = {} ----@type VisibilityClass ---- A static class allowing calls through the "." operator only. -VisibilityClass = {} - ---@type Rot2 --- A static class allowing calls through the "." operator only. Rot2 = {} @@ -29857,237 +26053,125 @@ RayCast2d = {} --- A static class allowing calls through the "." operator only. TextureSlicer = {} ----@type GamepadConnection ---- A static class allowing calls through the "." operator only. -GamepadConnection = {} - ----@type AutoExposure +---@type Srgba --- A static class allowing calls through the "." operator only. -AutoExposure = {} +Srgba = {} ---@type DVec4 --- A static class allowing calls through the "." operator only. DVec4 = {} ----@type Srgba +---@type Visibility --- A static class allowing calls through the "." operator only. -Srgba = {} +Visibility = {} ---@type Camera2d --- A static class allowing calls through the "." operator only. Camera2d = {} ----@type Visibility ---- A static class allowing calls through the "." operator only. -Visibility = {} - ---@type Instant --- A static class allowing calls through the "." operator only. Instant = {} ----@type Xyza ---- A static class allowing calls through the "." operator only. -Xyza = {} - ---@type CuboidMeshBuilder --- A static class allowing calls through the "." operator only. CuboidMeshBuilder = {} ----@type ScriptAsset ---- A static class allowing calls through the "." operator only. -ScriptAsset = {} - ----@type EntityHashSet ---- A static class allowing calls through the "." operator only. -EntityHashSet = {} - ----@type DynamicFunction ---- A static class allowing calls through the "." operator only. -DynamicScriptFunction = {} - ----@type CircularMeshUvMode +---@type NonZeroU16 --- A static class allowing calls through the "." operator only. -CircularMeshUvMode = {} +NonZeroU16 = {} ---@type BoundingSphere --- A static class allowing calls through the "." operator only. BoundingSphere = {} ----@type OnAdd ---- A static class allowing calls through the "." operator only. -OnAdd = {} - ----@type u8 ---- A static class allowing calls through the "." operator only. -u8 = {} - ----@type CapsuleUvProfile ---- A static class allowing calls through the "." operator only. -CapsuleUvProfile = {} - ----@type ReflectReference ---- A static class allowing calls through the "." operator only. -ReflectReference = {} - ----@type CustomProjection ---- A static class allowing calls through the "." operator only. -CustomProjection = {} - ----@type Mesh ---- A static class allowing calls through the "." operator only. -Mesh = {} - ----@type ReflectSystem ---- A static class allowing calls through the "." operator only. -ReflectSystem = {} - ---@type GamepadAxis --- A static class allowing calls through the "." operator only. GamepadAxis = {} ----@type Mat4 ---- A static class allowing calls through the "." operator only. -Mat4 = {} - ----@type OnDespawn ---- A static class allowing calls through the "." operator only. -OnDespawn = {} - ----@type RawGamepadEvent ---- A static class allowing calls through the "." operator only. -RawGamepadEvent = {} - ----@type Virtual +---@type Mesh --- A static class allowing calls through the "." operator only. -Virtual = {} +Mesh = {} ---@type ColorGradingGlobal --- A static class allowing calls through the "." operator only. ColorGradingGlobal = {} ----@type CursorIcon ---- A static class allowing calls through the "." operator only. -CursorIcon = {} - ----@type Affine2 ---- A static class allowing calls through the "." operator only. -Affine2 = {} - ----@type isize ---- A static class allowing calls through the "." operator only. -isize = {} - ----@type AtomicU32 ---- A static class allowing calls through the "." operator only. -AtomicU32 = {} - ----@type FunctionCallContext ---- A static class allowing calls through the "." operator only. -FunctionCallContext = {} - ---@type i128 --- A static class allowing calls through the "." operator only. i128 = {} ----@type Circle ---- A static class allowing calls through the "." operator only. -Circle = {} - ----@type ComponentId ---- A static class allowing calls through the "." operator only. -ComponentId = {} - ----@type FunctionArgInfo ---- A static class allowing calls through the "." operator only. -FunctionArgInfo = {} - ----@type SpriteImageMode +---@type isize --- A static class allowing calls through the "." operator only. -SpriteImageMode = {} +isize = {} ---@type MonitorSelection --- A static class allowing calls through the "." operator only. MonitorSelection = {} ----@type AtomicBool ---- A static class allowing calls through the "." operator only. -AtomicBool = {} - ---@type Isometry3d --- A static class allowing calls through the "." operator only. -Isometry3d = {} - ----@type JumpAt ---- A static class allowing calls through the "." operator only. -JumpAt = {} - ----@type Bloom ---- A static class allowing calls through the "." operator only. -Bloom = {} - ----@type OcclusionCulling ---- A static class allowing calls through the "." operator only. -OcclusionCulling = {} +Isometry3d = {} ----@type InfinitePlane3d +---@type FunctionCallContext --- A static class allowing calls through the "." operator only. -InfinitePlane3d = {} +FunctionCallContext = {} ----@type Tonemapping +---@type GridPlacement --- A static class allowing calls through the "." operator only. -Tonemapping = {} +GridPlacement = {} ----@type ManualTextureViewHandle +---@type Circle --- A static class allowing calls through the "." operator only. -ManualTextureViewHandle = {} +Circle = {} ----@type ScriptTypeRegistration +---@type FunctionArgInfo --- A static class allowing calls through the "." operator only. -ScriptTypeRegistration = {} +FunctionArgInfo = {} ----@type Disabled +---@type SpriteImageMode --- A static class allowing calls through the "." operator only. -Disabled = {} +SpriteImageMode = {} ---@type RangeFull --- A static class allowing calls through the "." operator only. RangeFull = {} ----@type Segment3d +---@type OcclusionCulling --- A static class allowing calls through the "." operator only. -Segment3d = {} +OcclusionCulling = {} ----@type U16Vec3 +---@type GridAutoFlow --- A static class allowing calls through the "." operator only. -U16Vec3 = {} +GridAutoFlow = {} ----@type u32 +---@type ScriptTypeRegistration --- A static class allowing calls through the "." operator only. -u32 = {} +ScriptTypeRegistration = {} ----@type WindowClosed +---@type RelativeCursorPosition --- A static class allowing calls through the "." operator only. -WindowClosed = {} +RelativeCursorPosition = {} ----@type Cow +---@type Disabled --- A static class allowing calls through the "." operator only. -Cow = {} +Disabled = {} ----@type ColorGrading +---@type U16Vec3 --- A static class allowing calls through the "." operator only. -ColorGrading = {} +U16Vec3 = {} ---@type ScriptQueryResult --- A static class allowing calls through the "." operator only. ScriptQueryResult = {} ----@type EnabledButtons +---@type u32 --- A static class allowing calls through the "." operator only. -EnabledButtons = {} +u32 = {} ----@type RangeInclusive +---@type ColorGrading --- A static class allowing calls through the "." operator only. -RangeInclusive = {} +ColorGrading = {} ---@type Timer --- A static class allowing calls through the "." operator only. @@ -30097,21 +26181,13 @@ Timer = {} --- A static class allowing calls through the "." operator only. usize = {} ----@type InternalWindowState ---- A static class allowing calls through the "." operator only. -InternalWindowState = {} - ----@type WindowScaleFactorChanged ---- A static class allowing calls through the "." operator only. -WindowScaleFactorChanged = {} - ---@type RenderTarget --- A static class allowing calls through the "." operator only. RenderTarget = {} ----@type GamepadConnectionEvent +---@type WindowScaleFactorChanged --- A static class allowing calls through the "." operator only. -GamepadConnectionEvent = {} +WindowScaleFactorChanged = {} ---@type DAffine2 --- A static class allowing calls through the "." operator only. @@ -30121,9 +26197,9 @@ DAffine2 = {} --- A static class allowing calls through the "." operator only. AnnulusMeshBuilder = {} ----@type VideoModeSelection +---@type Interaction --- A static class allowing calls through the "." operator only. -VideoModeSelection = {} +Interaction = {} ---@type ForceTouch --- A static class allowing calls through the "." operator only. @@ -30137,41 +26213,9 @@ InteropError = {} --- A static class allowing calls through the "." operator only. WindowResolution = {} ----@type ChildOf ---- A static class allowing calls through the "." operator only. -ChildOf = {} - ----@type CylinderAnchor ---- A static class allowing calls through the "." operator only. -CylinderAnchor = {} - ----@type U16Vec2 ---- A static class allowing calls through the "." operator only. -U16Vec2 = {} - ----@type u128 ---- A static class allowing calls through the "." operator only. -u128 = {} - ----@type GamepadRumbleIntensity ---- A static class allowing calls through the "." operator only. -GamepadRumbleIntensity = {} - ----@type table ---- An global instance of this type -types = {} - ----@type Skybox ---- A static class allowing calls through the "." operator only. -Skybox = {} - ----@type CylinderMeshBuilder ---- A static class allowing calls through the "." operator only. -CylinderMeshBuilder = {} - ----@type Camera3dDepthLoadOp +---@type Val --- A static class allowing calls through the "." operator only. -Camera3dDepthLoadOp = {} +Val = {} ---@type AccumulatedMouseScroll --- A static class allowing calls through the "." operator only. @@ -30181,13 +26225,9 @@ AccumulatedMouseScroll = {} --- A static class allowing calls through the "." operator only. WindowEvent = {} ----@type ScreenSpaceTransmissionQuality ---- A static class allowing calls through the "." operator only. -ScreenSpaceTransmissionQuality = {} - ----@type Dir2 +---@type LineHeight --- A static class allowing calls through the "." operator only. -Dir2 = {} +LineHeight = {} ---@type Sphere --- A static class allowing calls through the "." operator only. @@ -30197,38 +26237,14 @@ Sphere = {} --- A static class allowing calls through the "." operator only. ConicalFrustum = {} ----@type CircularSegment ---- A static class allowing calls through the "." operator only. -CircularSegment = {} - ----@type LinearRgba ---- A static class allowing calls through the "." operator only. -LinearRgba = {} - ---@type NoFrustumCulling --- A static class allowing calls through the "." operator only. NoFrustumCulling = {} ----@type Dir3A ---- A static class allowing calls through the "." operator only. -Dir3A = {} - ---@type DepthOfFieldMode --- A static class allowing calls through the "." operator only. DepthOfFieldMode = {} ----@type TypeId ---- A static class allowing calls through the "." operator only. -TypeId = {} - ----@type I16Vec2 ---- A static class allowing calls through the "." operator only. -I16Vec2 = {} - ----@type RectangleMeshBuilder ---- A static class allowing calls through the "." operator only. -RectangleMeshBuilder = {} - ---@type KeyboardInput --- A static class allowing calls through the "." operator only. KeyboardInput = {} @@ -30241,14 +26257,14 @@ Name = {} --- A static class allowing calls through the "." operator only. AppLifecycle = {} ----@type URect ---- A static class allowing calls through the "." operator only. -URect = {} - ---@type MouseScrollUnit --- A static class allowing calls through the "." operator only. MouseScrollUnit = {} +---@type PositionedGlyph +--- A static class allowing calls through the "." operator only. +PositionedGlyph = {} + ---@type char --- A static class allowing calls through the "." operator only. char = {} @@ -30257,10 +26273,6 @@ char = {} --- A static class allowing calls through the "." operator only. TouchInput = {} ----@type Capsule2dMeshBuilder ---- A static class allowing calls through the "." operator only. -Capsule2dMeshBuilder = {} - ---@type EaseFunction --- A static class allowing calls through the "." operator only. EaseFunction = {} @@ -30285,45 +26297,17 @@ String = {} --- A static class allowing calls through the "." operator only. ConeAnchor = {} ----@type i32 ---- A static class allowing calls through the "." operator only. -i32 = {} - ----@type CursorOptions ---- A static class allowing calls through the "." operator only. -CursorOptions = {} - ----@type AtomicI16 ---- A static class allowing calls through the "." operator only. -AtomicI16 = {} - ----@type Children ---- A static class allowing calls through the "." operator only. -Children = {} - ----@type I64Vec2 ---- A static class allowing calls through the "." operator only. -I64Vec2 = {} - ----@type SphereMeshBuilder ---- A static class allowing calls through the "." operator only. -SphereMeshBuilder = {} - ---@type MouseButtonInput --- A static class allowing calls through the "." operator only. MouseButtonInput = {} ----@type MeshMorphWeights ---- A static class allowing calls through the "." operator only. -MeshMorphWeights = {} - ----@type Projection +---@type TextSpan --- A static class allowing calls through the "." operator only. -Projection = {} +TextSpan = {} ----@type DMat4 +---@type MaxTrackSizingFunction --- A static class allowing calls through the "." operator only. -DMat4 = {} +MaxTrackSizingFunction = {} ---@type GamepadInput --- A static class allowing calls through the "." operator only. @@ -30333,9 +26317,9 @@ GamepadInput = {} --- A static class allowing calls through the "." operator only. CursorMoved = {} ----@type Gamepad +---@type BorderRadius --- A static class allowing calls through the "." operator only. -Gamepad = {} +BorderRadius = {} ---@type ColorMaterial --- A static class allowing calls through the "." operator only. @@ -30345,50 +26329,26 @@ ColorMaterial = {} --- A static class allowing calls through the "." operator only. GlobalsUniform = {} ----@type TimerMode ---- A static class allowing calls through the "." operator only. -TimerMode = {} - ----@type Affine3 ---- A static class allowing calls through the "." operator only. -Affine3 = {} - ---@type Tick --- A static class allowing calls through the "." operator only. Tick = {} ----@type RhombusMeshBuilder ---- A static class allowing calls through the "." operator only. -RhombusMeshBuilder = {} - ----@type VisibilityRange +---@type BVec4A --- A static class allowing calls through the "." operator only. -VisibilityRange = {} +BVec4A = {} ---@type OnReplace --- A static class allowing calls through the "." operator only. OnReplace = {} ----@type U8Vec4 ---- A static class allowing calls through the "." operator only. -U8Vec4 = {} - ----@type BVec4A +---@type RhombusMeshBuilder --- A static class allowing calls through the "." operator only. -BVec4A = {} +RhombusMeshBuilder = {} ---@type Affine3A --- A static class allowing calls through the "." operator only. Affine3A = {} ----@type RenderLayers ---- A static class allowing calls through the "." operator only. -RenderLayers = {} - ----@type SyncToRenderWorld ---- A static class allowing calls through the "." operator only. -SyncToRenderWorld = {} - ---@type DoubleTapGesture --- A static class allowing calls through the "." operator only. DoubleTapGesture = {} @@ -30397,38 +26357,18 @@ DoubleTapGesture = {} --- A static class allowing calls through the "." operator only. Stopwatch = {} ----@type AabbCast3d ---- A static class allowing calls through the "." operator only. -AabbCast3d = {} - ----@type I8Vec4 ---- A static class allowing calls through the "." operator only. -I8Vec4 = {} - ----@type ConicalFrustumMeshBuilder +---@type AlignContent --- A static class allowing calls through the "." operator only. -ConicalFrustumMeshBuilder = {} +AlignContent = {} ---@type WindowTheme --- A static class allowing calls through the "." operator only. WindowTheme = {} ----@type Real ---- A static class allowing calls through the "." operator only. -Real = {} - ---@type PlaneMeshBuilder --- A static class allowing calls through the "." operator only. PlaneMeshBuilder = {} ----@type WindowCloseRequested ---- A static class allowing calls through the "." operator only. -WindowCloseRequested = {} - ----@type RayCast3d ---- A static class allowing calls through the "." operator only. -RayCast3d = {} - ---@type Mat3A --- A static class allowing calls through the "." operator only. Mat3A = {} @@ -30441,10 +26381,6 @@ SkinnedMesh = {} --- A static class allowing calls through the "." operator only. PresentMode = {} ----@type Aabb3d ---- A static class allowing calls through the "." operator only. -Aabb3d = {} - ---@type EntityHash --- A static class allowing calls through the "." operator only. EntityHash = {} @@ -30453,53 +26389,33 @@ EntityHash = {} --- A static class allowing calls through the "." operator only. UVec2 = {} ----@type Window ---- A static class allowing calls through the "." operator only. -Window = {} - ----@type InheritedVisibility +---@type JustifyContent --- A static class allowing calls through the "." operator only. -InheritedVisibility = {} +JustifyContent = {} ---@type CursorEntered --- A static class allowing calls through the "." operator only. CursorEntered = {} ----@type TextureAtlasLayout ---- A static class allowing calls through the "." operator only. -TextureAtlasLayout = {} - ----@type Triangle3dMeshBuilder ---- A static class allowing calls through the "." operator only. -Triangle3dMeshBuilder = {} - ---@type Aabb --- A static class allowing calls through the "." operator only. Aabb = {} ----@type I16Vec3 ---- A static class allowing calls through the "." operator only. -I16Vec3 = {} - ---@type PanGesture --- A static class allowing calls through the "." operator only. PanGesture = {} ----@type Smaa ---- A static class allowing calls through the "." operator only. -Smaa = {} - ---@type Rhombus --- A static class allowing calls through the "." operator only. Rhombus = {} ----@type WindowResizeConstraints +---@type NodeImageMode --- A static class allowing calls through the "." operator only. -WindowResizeConstraints = {} +NodeImageMode = {} ----@type Oklcha +---@type WindowResizeConstraints --- A static class allowing calls through the "." operator only. -Oklcha = {} +WindowResizeConstraints = {} ---@type Cylinder --- A static class allowing calls through the "." operator only. diff --git a/crates/bevy_mod_scripting_core/src/lib.rs b/crates/bevy_mod_scripting_core/src/lib.rs index 032b7718ca..7b001e07f6 100644 --- a/crates/bevy_mod_scripting_core/src/lib.rs +++ b/crates/bevy_mod_scripting_core/src/lib.rs @@ -348,6 +348,7 @@ impl Plugin for BMSScriptingInfrastructurePlugin { app.register_type::(); app.register_type::>(); + app.register_type::(); app.register_type_data::, MarkAsCore>(); app.add_systems( diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs index 57d2efec19..a67224870a 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -1,5 +1,3 @@ -use std::ops::Index; - use indexmap::IndexMap; use ladfile::{LadFile, LadFunction, LadTypeId, LadTypeKind}; @@ -29,7 +27,14 @@ pub fn convert_ladfile_to_lua_declaration_file( for (key, types) in rust_types.iter() { // right now one class == one lad type id, when we can properly denormorphize types, we will // be able to have multiple lad type ids per class - let lua_classes_for_type = convert_polymorphic_type_to_lua_classes(key, types, &ladfile); + let lua_classes_for_type = + match convert_polymorphic_type_to_lua_classes(key, types.iter().copied(), &ladfile) { + Ok(r) => r, + Err(e) => { + log::error!("{e}"); + continue; + } + }; lua_classes.extend( lua_classes_for_type @@ -62,8 +67,8 @@ pub fn convert_ladfile_to_lua_declaration_file( let class = match lad_instance_to_lua_type(&ladfile, &instance.type_kind) { Ok(c) => c, Err(e) => { - log::error!("Could not generate global: {e}"); - continue; + log::error!("Error generating global {name}: {e}. Using `any` type"); + LuaType::Any } }; @@ -88,16 +93,31 @@ pub fn convert_ladfile_to_lua_declaration_file( const GENERIC_PLACEHOLDERS: [&str; 10] = ["T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C"]; +// /// Splits the given class into two, +// /// - The first one containing all of its non-static + static functions +// /// - The second one only containing its static functions +// pub fn split_static_class_out(class: LuaClass) -> (LuaClass, LuaClass) { +// let static_class = class.clone(); +// static_class. + +// (class, static_class) +// } + // TODO: once https://github.com/bevyengine/bevy/issues/17117 is solved, we will be able to figure out // where the generic types are actually used, for now we only know what they are per type. -pub fn convert_polymorphic_type_to_lua_classes( +pub fn convert_polymorphic_type_to_lua_classes<'a>( polymorphic_type_key: &ladfile::PolymorphicTypeKey, - monomorphized_types: &[&ladfile::LadTypeId], + monomorphized_types: impl Iterator, ladfile: &ladfile::LadFile, -) -> Vec<(LadTypeId, LuaClass, Vec)> { +) -> Result)>, anyhow::Error> { + let monomorphized_types: Vec<_> = monomorphized_types.collect(); if monomorphized_types.len() > 1 || polymorphic_type_key.arity != 0 { // TODO: support generics, currently bevy doesn't let you track back generic instantiations to their definition - return vec![]; + return Err(anyhow::anyhow!( + "Type {} with arity {} is not supported yet, ignoring.", + polymorphic_type_key.identifier, + polymorphic_type_key.arity + )); } let mut types = Vec::default(); @@ -125,7 +145,12 @@ pub fn convert_polymorphic_type_to_lua_classes( name: format!("[{}]", idx + 1), ty: match lad_type_to_lua_type(ladfile, field.type_.clone()) { Ok(ty) => ty, - Err(e) => panic!("{e}"), + Err(e) => { + log::error!( + "error converting field {idx}: {e}. for tuple struct {name}" + ); + LuaType::Any + } }, scope: crate::lua_declaration_file::FieldScope::Public, optional: true, @@ -139,7 +164,13 @@ pub fn convert_polymorphic_type_to_lua_classes( name: field.name.clone(), ty: match lad_type_to_lua_type(ladfile, field.type_.clone()) { Ok(ty) => ty, - Err(e) => panic!("{e}"), + Err(e) => { + log::error!( + "error converting field {}: {e}. for struct {name}", + field.name + ); + LuaType::Any + } }, scope: crate::lua_declaration_file::FieldScope::Public, optional: true, @@ -147,9 +178,11 @@ pub fn convert_polymorphic_type_to_lua_classes( }) } } - ladfile::LadVariant::Unit { name } => {} + ladfile::LadVariant::Unit { .. } => {} }, - ladfile::LadTypeLayout::Enum(lad_variants) => {} + ladfile::LadTypeLayout::Enum(_) => { + // TODO: enums + } } for function in &lad_type.associated_functions { @@ -157,17 +190,38 @@ pub fn convert_polymorphic_type_to_lua_classes( lua_functions.push(match lad_function_to_lua_function(ladfile, function) { Ok(func) => func, Err(err) => { - log::error!("Error converting function: {err}"); - continue; + log::error!( + "Error converting function: {} on namespace {:?}: {err}. Using empty definition", + function.identifier, + function.namespace + ); + FunctionSignature { + name: function.identifier.to_string().replace("-", "_"), + ..Default::default() + } } }) } } } + let name = polymorphic_type_key.identifier.to_string(); + let mut parents = vec![]; + + if let Some(metadata) = ladfile.get_type_metadata(lad_type_id) { + if metadata.is_reflect && name != "ReflectReference" { + parents.push(String::from("ReflectReference")) + } + // if metadata.is_component { + // parents.push(String::from("ScriptComponentRegistration")) + // } + // if metadata.is_resource { + // parents.push(String::from("ScriptResourceRegistration")) + // } + } let class = LuaClass { - name: polymorphic_type_key.identifier.to_string(), - parents: vec![], // not needed + name, + parents: vec![String::from("ReflectReference")], fields: lua_fields, // TODO: Find fields generics, documentation, @@ -177,22 +231,22 @@ pub fn convert_polymorphic_type_to_lua_classes( types.push(((*lad_type_id).clone(), class, lua_functions)); } - types + Ok(types) } pub fn lad_function_to_lua_function( ladfile: &LadFile, function: &LadFunction, ) -> Result { - if let Some((name, idx)) = function.as_overload() { - return Err(anyhow::anyhow!( - "overloads are not yet supported: {name}-{idx}", - )); - } + let name = if let Some((name, _)) = function.as_overload() { + name + } else { + function.identifier.to_string() + }; ForbiddenKeywords::is_forbidden_err(&function.identifier)?; - let mut params = function + let params = function .arguments .iter() .filter(|a| { @@ -235,7 +289,7 @@ pub fn lad_function_to_lua_function( let returns = lad_instance_to_lua_type(ladfile, &function.return_type.kind)?; Ok(FunctionSignature { - name: function.identifier.to_string(), + name, params, returns: vec![returns], async_fn: false, @@ -299,7 +353,11 @@ pub fn lad_instance_to_lua_type( lad_instance_to_lua_type(ladfile, lad_type_kind)? // TODO: currently ignores the possibility of an error type, we should have a custom class abstraction here } ladfile::LadTypeKind::Tuple(lad_type_kinds) => { - LuaType::Tuple(to_lua_many(ladfile, lad_type_kinds)?) + if lad_type_kinds.is_empty() { + LuaType::Primitive(LuaPrimitiveType::Nil) + } else { + LuaType::Tuple(to_lua_many(ladfile, lad_type_kinds)?) + } } ladfile::LadTypeKind::Array(lad_type_kind, _) => { LuaType::Array(Box::new(lad_instance_to_lua_type(ladfile, lad_type_kind)?)) diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs index 2aa70c1b4a..7426eec948 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs @@ -1,5 +1,6 @@ -use serde::{Serialize, Serializer}; -use std::collections::HashMap; +#![allow(dead_code)] + +use serde::Serialize; /// Basic primitive types supported by Lua Language Server annotations. /// @@ -83,7 +84,6 @@ pub enum LuaType { key: Box, value: Box, }, - TableLiteral(HashMap), Function(FunctionSignatureShort), Generic { name: String, @@ -133,7 +133,7 @@ pub struct FunctionParam { /// ---@overload fun(name: string): string -- Function overloads /// function getName(name, age) end /// ``` -#[derive(Debug, Clone, Serialize)] +#[derive(Debug, Clone, Serialize, Default)] pub struct FunctionSignature { pub name: String, pub params: Vec, diff --git a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera index a393d4e3ec..0a3cd80958 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera +++ b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera @@ -4,10 +4,9 @@ {# newline #} {%- for module in modules -%} {# module #} {%- for class in module.classes -%} ----@class {{ class.name }} -{# newline #} -{{- self::multiline_description(description=class.documentation) }} -{% for field in class.fields -%} +---@class {{ class.name }} {%- if class.parents %} : {% endif -%}{%- for parent in class.parents -%}{{parent}}{%- if not loop.last-%},{%- endif -%}{%- endfor %} +{{ self::multiline_description(description=class.documentation) -}} +{%- for field in class.fields -%} {{- self::class_field(field=field) -}} {%- endfor -%} {{ class.name }} = {} @@ -36,7 +35,7 @@ {# newline #} {%- endfor -%} {%- for param in function.params -%} -{{ self::function_param(arg=param) }} +{{- self::function_param(arg=param) -}} {%- endfor -%} {%- for return in function.returns -%} ---@return {{ self::lua_type(ty=return) }} @@ -53,8 +52,8 @@ function {% if function.has_self -%}{{class.name}}:{%- else -%}{{class.name}}.{% {# newline #} {%- for global in module.globals -%} ---@type {{self::lua_type(ty=global.definition)}} -{{self::multiline_description(description=global.description)}} -{{global.name}} = {} +{{ self::multiline_description(description=global.description) -}} +{{ global.name}} = {} {# newline #} {# newline #} {%- endfor -%} @@ -62,10 +61,9 @@ function {% if function.has_self -%}{{class.name}}:{%- else -%}{{class.name}}.{% {%- endfor -%} {# modules #} {%- macro class_field(field) -%} ----@field {{ field.scope }} {{ field.name }} {% if field.optional %}?{% endif %} {{ self::lua_type(ty=field.ty) }} -{# newline #} -{{- self::multiline_description(description=field.description) -}} -{# newline #} +---@field {{ field.scope }} {{ field.name }} {% if field.optional %}?{% endif %} {{ self::lua_type(ty=field.ty) -}} +{{- self::multiline_description(description=field.description) }} +{# newline -#} {%- endmacro class_field -%} {%- macro lua_type(ty) -%} @@ -93,13 +91,6 @@ function {% if function.has_self -%}{{class.name}}:{%- else -%}{{class.name}}.{% ] {%- elif ty.kind == "Dictionary" -%} table<{{ self::lua_type(ty=ty.value.key) }}, {{ self::lua_type(ty=ty.value.value) }}> - {%- elif ty.kind == "TableLiteral" -%} - { - {%- for key in ty.value | keys -%} - {{ key }}: {{ self::lua_type(ty=ty.value[key]) }} - {%- if not loop.last %}, {% endif -%} - {%- endfor -%} - } {%- elif ty.kind == "Function" -%} fun( {%- for param in ty.value.parameters -%} @@ -119,20 +110,17 @@ function {% if function.has_self -%}{{class.name}}:{%- else -%}{{class.name}}.{% {%- endmacro lua_type -%} {%- macro function_param(arg) -%} ----@param {{ arg.name }} {{ self::lua_type(ty=arg.ty) }} {% if arg.optional %}?{% endif %} +---@param {{ arg.name }} {{ self::lua_type(ty=arg.ty) }} {% if arg.optional %}?{%- endif -%} {# newline #} +{# newline -#} {{- self::multiline_description(description=arg.description) -}} -{# newline #} -{# newline #} {%- endmacro function_param -%} {%- macro multiline_description(description) -%} -{% if description %} +{%- if description -%} {%- for line in description | split(pat="\n") -%} --- {{ line }} -{%- if not last -%} -{# newline #} -{%- endif -%} -{%- endfor -%} +{% endfor -%} +{%- else -%} {%- endif -%} {%- endmacro multiline_description -%} \ No newline at end of file diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs index 03a8bcf973..6398490e31 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs @@ -1,4 +1,4 @@ -#![allow(missing_docs)] +#![allow(missing_docs, clippy::expect_used, clippy::unwrap_used, clippy::panic)] use std::{fs::DirEntry, path::PathBuf}; @@ -92,8 +92,7 @@ fn main() { } } } - assert!( - !BLESS_MODE, - "BLESS_MODE is enabled, please disable it to run the tests" - ); + if BLESS_MODE { + panic!("BLESS_MODE is enabled, please disable it to run the tests"); + } } diff --git a/crates/ladfile/src/lib.rs b/crates/ladfile/src/lib.rs index 48810aabc2..769e7156b9 100644 --- a/crates/ladfile/src/lib.rs +++ b/crates/ladfile/src/lib.rs @@ -4,7 +4,10 @@ //! - Centralization, we want to centralize as much of the "documentation" logic in the building of this format. For example, instead of letting each backend parse argument docstrings from the function docstring, we can do this here, and let the backends concentrate on pure generation. //! - Rust centric, the format describes bindings from the Rust side, so we generate rust centric declarations. These can then freely be converted into whatever representaion necessary. -use std::borrow::Cow; +use std::{ + borrow::Cow, + collections::{HashMap, HashSet}, +}; use indexmap::IndexMap; @@ -99,20 +102,26 @@ impl LadFile { }) } + /// Retrieves the metadata section for the given lad type id. + /// Primitives don't contain metadata + pub fn get_type_metadata(&self, type_id: &LadTypeId) -> Option<&LadTypeMetadata> { + self.types.get(type_id).map(|t| &t.metadata) + } + /// Retrieves all unique types, then groups them by their generics arity, /// this grouping represents types as expected to be seen in rust source code. /// /// For example `Vec` and `Vec` will be grouped together as `Vec` with arity 1. - pub fn polymorphizied_types(&self) -> IndexMap> { - let mut types_by_identifier_and_arity: IndexMap> = - IndexMap::>::new(); + pub fn polymorphizied_types(&self) -> IndexMap> { + let mut types_by_identifier_and_arity: IndexMap> = + IndexMap::>::new(); for type_id in self.types.keys() { let arity = self.get_type_arity(type_id); let identifier = self.get_type_identifier(type_id, None); types_by_identifier_and_arity .entry(PolymorphicTypeKey { identifier, arity }) .or_default() - .push(type_id); + .insert(type_id); } for (primitive_id, primitive) in &self.primitives { @@ -121,7 +130,7 @@ impl LadFile { types_by_identifier_and_arity .entry(PolymorphicTypeKey { identifier, arity }) .or_default() - .push(primitive_id); + .insert(primitive_id); } types_by_identifier_and_arity @@ -528,6 +537,26 @@ pub struct LadType { /// Backends can use this value to determine the order in which types are displayed. #[serde(default = "default_importance")] pub insignificance: usize, + + /// Additional metadata about the type. + pub metadata: LadTypeMetadata, +} + +/// Metadata either calculated from the type registry or added by plugins +#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +pub struct LadTypeMetadata { + /// True if the type is a component according to the type registry + pub is_component: bool, + /// Returns true if the type is a component according to the type registry + pub is_resource: bool, + + /// True if the type actually implements reflect, some types can be + /// added as namespaces without actually implementing the Reflect trait + pub is_reflect: bool, + + /// Extra metadata sections that plugins can use to serialize other information + #[serde(skip_serializing_if = "HashMap::is_empty", default)] + pub misc: HashMap, } /// The default importance value for a type. diff --git a/crates/ladfile_builder/src/lib.rs b/crates/ladfile_builder/src/lib.rs index 3f75b81e79..813381e1d4 100644 --- a/crates/ladfile_builder/src/lib.rs +++ b/crates/ladfile_builder/src/lib.rs @@ -9,7 +9,10 @@ use std::{ path::PathBuf, }; -use bevy_ecs::world::World; +use bevy_ecs::{ + reflect::{ReflectComponent, ReflectResource}, + world::World, +}; use bevy_log::warn; use bevy_mod_scripting_bindings::{ MarkAsCore, MarkAsGenerated, MarkAsSignificant, ReflectReference, @@ -255,6 +258,12 @@ impl<'t> LadFileBuilder<'t> { layout: LadTypeLayout::Opaque, generated: false, insignificance: default_importance(), + metadata: LadTypeMetadata { + is_component: false, + is_resource: false, + is_reflect: false, + misc: Default::default(), + }, }, ); self @@ -275,6 +284,9 @@ impl<'t> LadFileBuilder<'t> { let mut insignificance = default_importance(); let mut generated = false; + let mut is_component = false; + let mut is_resource = false; + let is_reflect = true; if let Some(registration) = registration { if registration.contains::() { generated = true; @@ -285,6 +297,12 @@ impl<'t> LadFileBuilder<'t> { if registration.contains::() { insignificance = default_importance() / 4; } + if registration.contains::() { + is_resource = true + } + if registration.contains::() { + is_component = true + } } let type_id = self.lad_id_from_type_id(type_info.type_id()); @@ -312,6 +330,12 @@ impl<'t> LadFileBuilder<'t> { layout: self.lad_layout_from_type_info(type_info), generated, insignificance, + metadata: LadTypeMetadata { + is_component, + is_resource, + is_reflect, + misc: Default::default(), + }, }; self.file.types.insert(type_id, lad_type); self From 35be7101e7eabe81fab51b84f438f20c15d95f49 Mon Sep 17 00:00:00 2001 From: makspll Date: Mon, 3 Nov 2025 23:22:22 +0000 Subject: [PATCH 10/20] make ladfiles ignore outer structure, and fix up, linkify inside of fields --- Cargo.toml | 4 +- assets/scripts/game_of_life.lua | 1 + crates/bevy_mod_scripting_bindings/Cargo.toml | 2 + .../src/docgen/typed_through.rs | 126 +++++-- .../Cargo.toml | 20 ++ .../src/lib.rs | 7 + .../src/operators.rs | 75 ++++ .../src/primitive.rs | 72 ++++ crates/bevy_system_reflection/src/lib.rs | 4 +- .../Cargo.toml | 1 + .../src/convert.rs | 258 ++++++++++---- .../src/lua_declaration_file.rs | 10 +- .../templates/declaration_file.tera | 5 +- .../tests/integration_tests.rs | 6 +- .../src/argument_visitor.rs | 138 ++++---- .../mdbook_lad_preprocessor/src/sections.rs | 123 ++++--- crates/ladfile/Cargo.toml | 2 +- crates/ladfile/src/lib.rs | 315 ++++++++--------- crates/ladfile/test_assets/test.lad.json | 178 ++++------ crates/ladfile_builder/Cargo.toml | 1 + crates/ladfile_builder/src/lib.rs | 323 ++++++++++++------ crates/ladfile_builder/src/plugin.rs | 10 +- .../bevy_mod_scripting_lua/Cargo.toml | 1 + .../src/bindings/reference.rs | 74 +++- src/lib.rs | 1 + 25 files changed, 1158 insertions(+), 599 deletions(-) create mode 100644 crates/bevy_mod_scripting_bindings_domain/Cargo.toml create mode 100644 crates/bevy_mod_scripting_bindings_domain/src/lib.rs create mode 100644 crates/bevy_mod_scripting_bindings_domain/src/operators.rs create mode 100644 crates/bevy_mod_scripting_bindings_domain/src/primitive.rs diff --git a/Cargo.toml b/Cargo.toml index 180b540820..0d77b7270e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -111,6 +111,7 @@ bevy_mod_scripting_functions = { workspace = true } bevy_mod_scripting_derive = { workspace = true } bevy_mod_scripting_asset = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } +bevy_mod_scripting_bindings_domain = { workspace = true } bevy_mod_scripting_display = { workspace = true } bevy_mod_scripting_script = { workspace = true } @@ -127,9 +128,9 @@ bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", ver bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.16.0", default-features = false } bevy_mod_scripting_asset = { path = "crates/bevy_mod_scripting_asset", version = "0.16.0", default-features = false } bevy_mod_scripting_bindings = { path = "crates/bevy_mod_scripting_bindings", version = "0.16.0", default-features = false } +bevy_mod_scripting_bindings_domain = { path = "crates/bevy_mod_scripting_bindings_domain", version = "0.16.0", default-features = false } bevy_mod_scripting_display = { path = "crates/bevy_mod_scripting_display", version = "0.16.0", default-features = false } bevy_mod_scripting_script = { path = "crates/bevy_mod_scripting_script", version = "0.16.0", default-features = false } - # bevy bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.16.0" } @@ -269,6 +270,7 @@ members = [ "crates/bevy_mod_scripting_bindings", "crates/bevy_mod_scripting_display", "crates/bevy_mod_scripting_script", + "crates/bevy_mod_scripting_bindings_domain", ] resolver = "2" exclude = ["codegen", "crates/macro_tests", "xtask"] diff --git a/assets/scripts/game_of_life.lua b/assets/scripts/game_of_life.lua index b7ee9ebb5b..c217f6b821 100644 --- a/assets/scripts/game_of_life.lua +++ b/assets/scripts/game_of_life.lua @@ -33,6 +33,7 @@ function on_click(x, y) local cells = life_state.cells local settings = world.get_resource(Settings) + local dimensions = settings.physical_grid_dimensions local screen = settings.display_grid_dimensions diff --git a/crates/bevy_mod_scripting_bindings/Cargo.toml b/crates/bevy_mod_scripting_bindings/Cargo.toml index a94123c391..59d7901bf9 100644 --- a/crates/bevy_mod_scripting_bindings/Cargo.toml +++ b/crates/bevy_mod_scripting_bindings/Cargo.toml @@ -17,6 +17,7 @@ bevy_mod_scripting_asset = { workspace = true } bevy_mod_scripting_derive = { workspace = true } bevy_mod_scripting_display = { workspace = true } bevy_mod_scripting_script = { workspace = true } +bevy_mod_scripting_bindings_domain = { workspace = true } bevy_system_reflection = { workspace = true } bevy_diagnostic = { workspace = true } bevy_ecs = { workspace = true } @@ -30,6 +31,7 @@ itertools = { workspace = true } profiling = { workspace = true } bevy_asset = { workspace = true } variadics_please = { workspace = true } +serde = { workspace = true } [dev-dependencies] pretty_assertions = { workspace = true } diff --git a/crates/bevy_mod_scripting_bindings/src/docgen/typed_through.rs b/crates/bevy_mod_scripting_bindings/src/docgen/typed_through.rs index c5537ae803..688ee4b58d 100644 --- a/crates/bevy_mod_scripting_bindings/src/docgen/typed_through.rs +++ b/crates/bevy_mod_scripting_bindings/src/docgen/typed_through.rs @@ -1,11 +1,7 @@ //! Defines a set of traits which destruture [`bevy_reflect::TypeInfo`] and implement a light weight wrapper around it, to allow types //! which normally can't implement [`bevy_reflect::Typed`] to be used in a reflection context. -use std::{ffi::OsString, path::PathBuf}; - -use bevy_mod_scripting_derive::DebugWithTypeInfo; -use bevy_platform::collections::HashMap; -use bevy_reflect::{TypeInfo, Typed}; +use std::{any::TypeId, ffi::OsString, path::PathBuf}; use crate::{ ReflectReference, @@ -16,6 +12,10 @@ use crate::{ script_value::ScriptValue, }; use crate::{error::InteropError, reflection_extensions::TypeInfoExtensions}; +use bevy_mod_scripting_bindings_domain::ReflectionPrimitiveKind; +use bevy_mod_scripting_derive::DebugWithTypeInfo; +use bevy_platform::collections::HashMap; +use bevy_reflect::{TypeInfo, Typed}; /// All Through types follow one rule: /// - A through type can not contain a nested through type. It must always contain a fully typed inner type. @@ -40,6 +40,8 @@ pub enum ThroughTypeInfo { TypedWrapper(TypedWrapperKind), /// an actual type info TypeInfo(&'static TypeInfo), + /// A primitive type, which mostly speaks for itself + Primitive(ReflectionPrimitiveKind), } #[derive(Clone, PartialEq, Eq, DebugWithTypeInfo)] @@ -64,6 +66,8 @@ pub enum TypedWrapperKind { Vec(Box), /// Wraps a `HashMap` of a through typed type. HashMap(Box, Box), + /// Wraps a `HashSet` of a through typed type. + HashSet(Box), /// Wraps a `Result` of a through typed type. Array(Box, usize), /// Wraps an `Option` of a through typed type. @@ -128,6 +132,8 @@ pub fn into_through_type_info(type_info: &'static TypeInfo) -> ThroughTypeInfo { return Some(ThroughTypeInfo::TypedWrapper(TypedWrapperKind::Tuple( tuple_types, ))); + } else if let Some(primitive) = as_reflect_primitive(type_info) { + return Some(ThroughTypeInfo::Primitive(primitive)); } None })(); @@ -138,6 +144,62 @@ pub fn into_through_type_info(type_info: &'static TypeInfo) -> ThroughTypeInfo { }) } +/// Returns the primitive kind if the given type info corresponds to one +pub fn as_reflect_primitive(type_info: &'static TypeInfo) -> Option { + let type_id = type_info.type_id(); + Some(if type_id == TypeId::of::() { + ReflectionPrimitiveKind::Bool + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::Isize + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::I8 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::I16 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::I32 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::I64 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::I128 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::Usize + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::U8 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::U16 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::U32 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::U64 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::U128 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::F32 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::F64 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::Char + } else if type_id == TypeId::of::<&'static str>() || type_id == TypeId::of::() { + ReflectionPrimitiveKind::Str + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::String + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::OsString + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::PathBuf + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::FunctionCallContext + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::DynamicFunction + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::DynamicFunctionMut + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::ReflectReference + } else { + return None; + }) +} + /// A trait for types that can be converted to a [`ThroughTypeInfo`]. pub trait TypedThrough { /// Get the [`ThroughTypeInfo`] for the type. @@ -225,11 +287,11 @@ impl TypedThrough for Option { } macro_rules! impl_through_typed { - ($($ty:ty),*) => { + ($($ty:ty => $ident:ident),*) => { $( impl $crate::docgen::typed_through::TypedThrough for $ty { fn through_type_info() -> $crate::docgen::typed_through::ThroughTypeInfo { - $crate::docgen::typed_through::ThroughTypeInfo::TypeInfo(<$ty as bevy_reflect::Typed>::type_info()) + $crate::docgen::typed_through::ThroughTypeInfo::Primitive(ReflectionPrimitiveKind::$ident) } } )* @@ -237,31 +299,31 @@ macro_rules! impl_through_typed { } impl_through_typed!( - FunctionCallContext, - ReflectReference, - DynamicScriptFunctionMut, - DynamicScriptFunction, - ScriptValue, - bool, - i8, - i16, - i32, - i64, - i128, - u8, - u16, - u32, - u64, - u128, - f32, - f64, - usize, - isize, - String, - PathBuf, - OsString, - char, - &'static str + FunctionCallContext => FunctionCallContext, + ReflectReference => ReflectReference, + DynamicScriptFunctionMut => DynamicFunctionMut, + DynamicScriptFunction => DynamicFunction, + ScriptValue => ScriptValue, + bool => Bool, + i8 => I8, + i16 => I16, + i32 => I32, + i64 => I64, + i128 => I128, + u8 => U8, + u16 => U16, + u32 => U32, + u64 => U64, + u128 => U128, + f32 => F32, + f64 => F64, + usize => Usize, + isize => Isize, + String => String, + PathBuf => PathBuf, + OsString => OsString, + char => Char, + &'static str => Str ); macro_rules! impl_through_typed_tuple { diff --git a/crates/bevy_mod_scripting_bindings_domain/Cargo.toml b/crates/bevy_mod_scripting_bindings_domain/Cargo.toml new file mode 100644 index 0000000000..a2a2f668eb --- /dev/null +++ b/crates/bevy_mod_scripting_bindings_domain/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "bevy_mod_scripting_bindings_domain" +description = "Definitions of shared interfaces from the bevy_mod_scripting_bindings crate." +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +keywords.workspace = true +categories.workspace = true +readme.workspace = true + +[dependencies] +serde = { workspace = true } +bevy_mod_scripting_display = { workspace = true } +bevy_mod_scripting_derive = { workspace = true } + +[lints] +workspace = true diff --git a/crates/bevy_mod_scripting_bindings_domain/src/lib.rs b/crates/bevy_mod_scripting_bindings_domain/src/lib.rs new file mode 100644 index 0000000000..560467b832 --- /dev/null +++ b/crates/bevy_mod_scripting_bindings_domain/src/lib.rs @@ -0,0 +1,7 @@ +//! Operators are special functions which de-sugar to nicer syntactic constructs, for example `a + b` in rust de-sugars to `a.add(b)` +//! This module contains abstractions for describing such operators across many languages. + +mod operators; +mod primitive; +pub use operators::*; +pub use primitive::*; diff --git a/crates/bevy_mod_scripting_bindings_domain/src/operators.rs b/crates/bevy_mod_scripting_bindings_domain/src/operators.rs new file mode 100644 index 0000000000..df29bd7d94 --- /dev/null +++ b/crates/bevy_mod_scripting_bindings_domain/src/operators.rs @@ -0,0 +1,75 @@ +//! Describes the operators supported by BMS. +//! +//! These operators are implemented by each language plugin, +//! by searching for appropriate functions in the registry. + +/// Main operator enum +pub enum ScriptOperatorNames { + /// a + b + Addition, + /// a - b + Subtraction, + /// a * b + Multiplication, + /// a / b + Division, + /// a % b + Remainder, + /// -a + Negation, + /// a ^ 2 or a ** b + Exponentiation, + /// a == b + Equality, + /// a < b + LessThanComparison, + /// len(a) + Length, + /// for a in b.iter() + Iteration, + /// print(a) + DisplayPrint, + /// debug(a) + DebugPrint, +} + +impl ScriptOperatorNames { + /// Returns the function names to dispatch these operators to + pub const fn script_function_name(self) -> &'static str { + match self { + ScriptOperatorNames::Addition => "add", + ScriptOperatorNames::Subtraction => "sub", + ScriptOperatorNames::Multiplication => "mul", + ScriptOperatorNames::Division => "div", + ScriptOperatorNames::Remainder => "rem", + ScriptOperatorNames::Negation => "neg", + ScriptOperatorNames::Exponentiation => "pow", + ScriptOperatorNames::Equality => "eq", + ScriptOperatorNames::LessThanComparison => "lt", + ScriptOperatorNames::Length => "len", + ScriptOperatorNames::Iteration => "iter", + ScriptOperatorNames::DisplayPrint => "display", + ScriptOperatorNames::DebugPrint => "debug", + } + } + + /// Parse an operator function into this enum + pub fn parse(name: impl AsRef) -> Option { + match name.as_ref() { + "add" => Some(ScriptOperatorNames::Addition), + "sub" => Some(ScriptOperatorNames::Subtraction), + "mul" => Some(ScriptOperatorNames::Multiplication), + "div" => Some(ScriptOperatorNames::Division), + "rem" => Some(ScriptOperatorNames::Remainder), + "neg" => Some(ScriptOperatorNames::Negation), + "pow" => Some(ScriptOperatorNames::Exponentiation), + "eq" => Some(ScriptOperatorNames::Equality), + "lt" => Some(ScriptOperatorNames::LessThanComparison), + "len" => Some(ScriptOperatorNames::Length), + "iter" => Some(ScriptOperatorNames::Iteration), + "display" => Some(ScriptOperatorNames::DisplayPrint), + "debug" => Some(ScriptOperatorNames::DebugPrint), + _ => None, + } + } +} diff --git a/crates/bevy_mod_scripting_bindings_domain/src/primitive.rs b/crates/bevy_mod_scripting_bindings_domain/src/primitive.rs new file mode 100644 index 0000000000..de064ed0a7 --- /dev/null +++ b/crates/bevy_mod_scripting_bindings_domain/src/primitive.rs @@ -0,0 +1,72 @@ +use bevy_mod_scripting_derive::DebugWithTypeInfo; + +/// A primitive type kind in the LAD file format. +/// +/// The docstrings on variants corresponding to Reflect types, are used to generate documentation for these primitives. +#[derive(Clone, PartialEq, serde::Serialize, serde::Deserialize, DebugWithTypeInfo)] +#[debug_with_type_info(bms_display_path = "bevy_mod_scripting_display")] +#[serde(rename_all = "camelCase")] +#[allow(missing_docs)] +pub enum ReflectionPrimitiveKind { + Bool, + Isize, + I8, + I16, + I32, + I64, + I128, + Usize, + U8, + U16, + U32, + U64, + U128, + F32, + F64, + Char, + Str, + String, + OsString, + PathBuf, + FunctionCallContext, + DynamicFunction, + ScriptValue, + DynamicFunctionMut, + ReflectReference, + /// A primitive defined outside of BMS, useful for custom implementations of FromScript and IntoScript. + /// Downstream processors like mdbook plugins won't know how to treat these. + External(String), +} + +impl std::fmt::Display for ReflectionPrimitiveKind { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + ReflectionPrimitiveKind::Bool => f.write_str("Bool"), + ReflectionPrimitiveKind::Isize => f.write_str("Isize"), + ReflectionPrimitiveKind::I8 => f.write_str("I8"), + ReflectionPrimitiveKind::I16 => f.write_str("I16"), + ReflectionPrimitiveKind::I32 => f.write_str("I32"), + ReflectionPrimitiveKind::I64 => f.write_str("I64"), + ReflectionPrimitiveKind::I128 => f.write_str("I128"), + ReflectionPrimitiveKind::Usize => f.write_str("Usize"), + ReflectionPrimitiveKind::U8 => f.write_str("U8"), + ReflectionPrimitiveKind::U16 => f.write_str("U16"), + ReflectionPrimitiveKind::U32 => f.write_str("U32"), + ReflectionPrimitiveKind::U64 => f.write_str("U64"), + ReflectionPrimitiveKind::U128 => f.write_str("U128"), + ReflectionPrimitiveKind::F32 => f.write_str("F32"), + ReflectionPrimitiveKind::F64 => f.write_str("F64"), + ReflectionPrimitiveKind::Char => f.write_str("Char"), + ReflectionPrimitiveKind::Str => f.write_str("Str"), + ReflectionPrimitiveKind::String => f.write_str("String"), + ReflectionPrimitiveKind::OsString => f.write_str("OsString"), + ReflectionPrimitiveKind::PathBuf => f.write_str("PathBuf"), + ReflectionPrimitiveKind::FunctionCallContext => f.write_str("FunctionCallContext"), + ReflectionPrimitiveKind::DynamicFunction => f.write_str("DynamicFunction"), + ReflectionPrimitiveKind::ScriptValue => f.write_str("ScriptValue"), + ReflectionPrimitiveKind::DynamicFunctionMut => f.write_str("DynamicFunctionMut"), + ReflectionPrimitiveKind::ReflectReference => f.write_str("ReflectReference"), + ReflectionPrimitiveKind::External(e) => f.write_str(e.as_str()), + } + } +} diff --git a/crates/bevy_system_reflection/src/lib.rs b/crates/bevy_system_reflection/src/lib.rs index 932a22a672..85f897def1 100644 --- a/crates/bevy_system_reflection/src/lib.rs +++ b/crates/bevy_system_reflection/src/lib.rs @@ -487,8 +487,6 @@ mod test { fn system_e() {} - const BLESS_MODE: bool = false; - #[test] fn test_graph_is_as_expected() { // create empty schedule and graph it @@ -535,7 +533,7 @@ mod test { let expected = include_str!("../test_graph.dot"); let expected_path = manifest_dir_macros::file_path!("test_graph.dot"); - if BLESS_MODE { + if std::env::var("BLESS_MODE").is_ok() { std::fs::write(expected_path, normalize(&dot)).unwrap(); panic!("Bless mode is active"); } else { diff --git a/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml b/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml index 32e97bfa01..b0202d983f 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml +++ b/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml @@ -13,6 +13,7 @@ include = ["readme.md", "/src"] readme = "readme.md" [dependencies] +bevy_mod_scripting_bindings_domain = { workspace = true } clap = { version = "4", features = ["derive"] } # mdbook = "0.4" anyhow = "1" diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs index a67224870a..773866b3a5 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -1,11 +1,12 @@ +use bevy_mod_scripting_bindings_domain::ScriptOperatorNames; use indexmap::IndexMap; -use ladfile::{LadFile, LadFunction, LadTypeId, LadTypeKind}; +use ladfile::{LadFieldOrVariableKind, LadFile, LadFunction, LadTypeId, ReflectionPrimitiveKind}; use crate::{ keywords::ForbiddenKeywords, lua_declaration_file::{ ClassField, FunctionParam, FunctionSignature, LuaClass, LuaDefinitionFile, LuaModule, - LuaPrimitiveType, LuaType, + LuaOperator, LuaOperatorKind, LuaPrimitiveType, LuaType, }, }; @@ -133,6 +134,7 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( let mut lua_fields = vec![]; let mut lua_functions = vec![]; + let mut lua_operators = vec![]; if let Some(lad_type) = ladfile.types.get(*lad_type_id) { // add fields for the type @@ -143,7 +145,7 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( for (idx, field) in fields.iter().enumerate() { lua_fields.push(ClassField { name: format!("[{}]", idx + 1), - ty: match lad_type_to_lua_type(ladfile, field.type_.clone()) { + ty: match lad_instance_to_lua_type(ladfile, &field.type_) { Ok(ty) => ty, Err(e) => { log::error!( @@ -162,7 +164,7 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( for field in fields.iter() { lua_fields.push(ClassField { name: field.name.clone(), - ty: match lad_type_to_lua_type(ladfile, field.type_.clone()) { + ty: match lad_instance_to_lua_type(ladfile, &field.type_) { Ok(ty) => ty, Err(e) => { log::error!( @@ -187,7 +189,7 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( for function in &lad_type.associated_functions { if let Some(function) = ladfile.functions.get(function) { - lua_functions.push(match lad_function_to_lua_function(ladfile, function) { + let lua_function = match lad_function_to_lua_function(ladfile, function) { Ok(func) => func, Err(err) => { log::error!( @@ -200,7 +202,22 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( ..Default::default() } } - }) + }; + + if function.metadata.is_operator { + match lua_function_to_operator(&lua_function) { + Some(Ok(op)) => lua_operators.push(op), + Some(Err(func)) => lua_functions.push(func), + None => { + log::error!( + "Error converting operator function: {} on namespace {:?}. Skipping", + function.identifier, + function.namespace + ); + } + }; + } + lua_functions.push(lua_function); } } } @@ -222,11 +239,11 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( let class = LuaClass { name, parents: vec![String::from("ReflectReference")], - fields: lua_fields, // TODO: Find fields + fields: lua_fields, generics, documentation, exact: true, - operators: vec![], // TODO: Find operators + operators: lua_operators, }; types.push(((*lad_type_id).clone(), class, lua_functions)); @@ -234,16 +251,108 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( Ok(types) } +/// converts a lua function to an operator if it matches the expected strucutre +pub fn lua_function_to_operator( + func: &FunctionSignature, +) -> Option> { + let operator = ScriptOperatorNames::parse(&func.name)?; + + // first arg is implied to be `self` + let (metamethod, second_arg, ret) = match operator { + ScriptOperatorNames::Addition => ( + LuaOperatorKind::Add, + Some(func.params.get(1)?), + func.returns.first()?, + ), + ScriptOperatorNames::Subtraction => ( + LuaOperatorKind::Sub, + Some(func.params.get(1)?), + func.returns.first()?, + ), + ScriptOperatorNames::Multiplication => ( + LuaOperatorKind::Mul, + Some(func.params.get(1)?), + func.returns.first()?, + ), + ScriptOperatorNames::Division => ( + LuaOperatorKind::Div, + Some(func.params.get(1)?), + func.returns.first()?, + ), + ScriptOperatorNames::Remainder => ( + LuaOperatorKind::Mod, + Some(func.params.get(1)?), + func.returns.first()?, + ), + ScriptOperatorNames::Negation => (LuaOperatorKind::Unm, None, func.returns.first()?), + ScriptOperatorNames::Exponentiation => ( + LuaOperatorKind::Pow, + Some(func.params.get(1)?), + func.returns.first()?, + ), + ScriptOperatorNames::Equality => { + return Some(Err(FunctionSignature { + name: "__eq".into(), + ..func.clone() + })) + } + ScriptOperatorNames::LessThanComparison => { + return Some(Err(FunctionSignature { + name: "__lt".into(), + ..func.clone() + })) + } + ScriptOperatorNames::Length => (LuaOperatorKind::Len, None, func.returns.first()?), + ScriptOperatorNames::Iteration => { + return Some(Err(FunctionSignature { + name: "__pairs".into(), + ..func.clone() + })) + } + ScriptOperatorNames::DisplayPrint | ScriptOperatorNames::DebugPrint => { + return Some(Err(FunctionSignature { + name: "__tostring".into(), + ..func.clone() + })) + } + }; + + Some(Ok(LuaOperator { + operation: metamethod, + param_type: second_arg.map(|a| a.ty.clone()), + return_type: ret.clone(), + })) +} + +// /// some operators aren't fully supported by lua language server. +// /// we implement those by converting to metatable entries, to signal the existence +// pub fn lua_operator_to_special_function(op: &LuaOperator) -> Option { +// Some(match op.operation { +// LuaOperatorKind::Eq => FunctionSignature { +// name: "__eq", +// params: , +// returns: (), +// async_fn: (), +// deprecated: (), +// nodiscard: (), +// package: (), +// overloads: (), +// generics: (), +// documentation: (), +// has_self: (), +// }, +// LuaOperatorKind::ToString => todo!(), +// LuaOperatorKind::Pairs => todo!(), +// _ => return None, +// }) +// } + pub fn lad_function_to_lua_function( ladfile: &LadFile, function: &LadFunction, ) -> Result { - let name = if let Some((name, _)) = function.as_overload() { - name - } else { - function.identifier.to_string() - }; - + // overloads get a unique instantiation, but maybe that's wrong + let name = function.identifier.to_string(); ForbiddenKeywords::is_forbidden_err(&function.identifier)?; let params = function @@ -252,7 +361,7 @@ pub fn lad_function_to_lua_function( .filter(|a| { !matches!( a.kind, - LadTypeKind::Primitive(ladfile::LadBMSPrimitiveKind::FunctionCallContext) + LadFieldOrVariableKind::Primitive(ReflectionPrimitiveKind::FunctionCallContext) ) }) .enumerate() @@ -268,7 +377,7 @@ pub fn lad_function_to_lua_function( Err(_) => format!("_{ident}"), }, ty: lad_instance_to_lua_type(ladfile, &a.kind)?, - optional: matches!(a.kind, LadTypeKind::Option(..)), + optional: matches!(a.kind, LadFieldOrVariableKind::Option(..)), description: a.documentation.as_ref().map(|d| d.to_string()), }) }) @@ -279,7 +388,9 @@ pub fn lad_function_to_lua_function( .arguments .first() .is_some_and(|a| match &a.kind { - LadTypeKind::Ref(i) | LadTypeKind::Mut(i) | LadTypeKind::Val(i) => lad_type_id == i, + LadFieldOrVariableKind::Ref(i) + | LadFieldOrVariableKind::Mut(i) + | LadFieldOrVariableKind::Val(i) => lad_type_id == i, _ => false, }) .then_some(lad_type_id), @@ -305,7 +416,7 @@ pub fn lad_function_to_lua_function( pub fn to_lua_many( ladfile: &LadFile, - lad_types: &[ladfile::LadTypeKind], + lad_types: &[ladfile::LadFieldOrVariableKind], ) -> Result, anyhow::Error> { let lua_types = lad_types .iter() @@ -314,89 +425,100 @@ pub fn to_lua_many( Ok(lua_types) } -pub fn lad_type_to_lua_type( - ladfile: &LadFile, - lad_type_id: LadTypeId, -) -> Result { - if let Some(primitive) = ladfile.primitives.get(&lad_type_id) { - Ok(lad_primitive_to_lua_type(&primitive.kind)) - } else { - Ok(LuaType::Alias( - ladfile.get_type_identifier(&lad_type_id, None).to_string(), - )) - } -} +// pub fn lad_type_to_lua_type( +// ladfile: &LadFile, +// lad_type_id: LadTypeId, +// ) -> Result { +// if let Some(primitive) = ladfile.primitives.get(&lad_type_id) { +// Ok(lad_primitive_to_lua_type(&primitive.kind)) +// } else { +// if ladfile.get_type_generics(&lad_type_id).is_some() { +// return Err(anyhow::anyhow!( +// "Type contains generics: {}", +// ladfile.get_type_identifier(&lad_type_id, None) +// )); +// } +// Ok(LuaType::Alias( +// ladfile.get_type_identifier(&lad_type_id, None).to_string(), +// )) +// } +// } pub fn lad_instance_to_lua_type( ladfile: &LadFile, - lad_type: &ladfile::LadTypeKind, + lad_type: &ladfile::LadFieldOrVariableKind, ) -> Result { Ok(match &lad_type { - ladfile::LadTypeKind::Primitive(prim) => lad_primitive_to_lua_type(prim), - ladfile::LadTypeKind::Ref(lad_type_id) - | ladfile::LadTypeKind::Mut(lad_type_id) - | ladfile::LadTypeKind::Val(lad_type_id) => { + ladfile::LadFieldOrVariableKind::Primitive(prim) => lad_primitive_to_lua_type(prim), + ladfile::LadFieldOrVariableKind::Ref(lad_type_id) + | ladfile::LadFieldOrVariableKind::Mut(lad_type_id) + | ladfile::LadFieldOrVariableKind::Val(lad_type_id) => { LuaType::Alias(ladfile.get_type_identifier(lad_type_id, None).to_string()) } - ladfile::LadTypeKind::Option(lad_type_kind) => LuaType::Union(vec![ + ladfile::LadFieldOrVariableKind::Option(lad_type_kind) => LuaType::Union(vec![ lad_instance_to_lua_type(ladfile, lad_type_kind)?, LuaType::Primitive(LuaPrimitiveType::Nil), ]), - ladfile::LadTypeKind::Vec(lad_type_kind) => { + ladfile::LadFieldOrVariableKind::Vec(lad_type_kind) => { LuaType::Array(Box::new(lad_instance_to_lua_type(ladfile, lad_type_kind)?)) } - ladfile::LadTypeKind::HashMap(key, value) => LuaType::Dictionary { + ladfile::LadFieldOrVariableKind::HashMap(key, value) => LuaType::Dictionary { key: Box::new(lad_instance_to_lua_type(ladfile, key)?), value: Box::new(lad_instance_to_lua_type(ladfile, value)?), }, - ladfile::LadTypeKind::InteropResult(lad_type_kind) => { + ladfile::LadFieldOrVariableKind::HashSet(key) => LuaType::Dictionary { + key: Box::new(lad_instance_to_lua_type(ladfile, key)?), + value: Box::new(LuaType::Primitive(LuaPrimitiveType::Boolean)), + }, + ladfile::LadFieldOrVariableKind::InteropResult(lad_type_kind) => { lad_instance_to_lua_type(ladfile, lad_type_kind)? // TODO: currently ignores the possibility of an error type, we should have a custom class abstraction here } - ladfile::LadTypeKind::Tuple(lad_type_kinds) => { + ladfile::LadFieldOrVariableKind::Tuple(lad_type_kinds) => { if lad_type_kinds.is_empty() { LuaType::Primitive(LuaPrimitiveType::Nil) } else { LuaType::Tuple(to_lua_many(ladfile, lad_type_kinds)?) } } - ladfile::LadTypeKind::Array(lad_type_kind, _) => { + ladfile::LadFieldOrVariableKind::Array(lad_type_kind, _) => { LuaType::Array(Box::new(lad_instance_to_lua_type(ladfile, lad_type_kind)?)) } - ladfile::LadTypeKind::Union(lad_type_kinds) => { + ladfile::LadFieldOrVariableKind::Union(lad_type_kinds) => { LuaType::Union(to_lua_many(ladfile, lad_type_kinds)?) } - ladfile::LadTypeKind::Unknown(_) => LuaType::Any, + ladfile::LadFieldOrVariableKind::Unknown(_) => LuaType::Any, }) } -pub fn lad_primitive_to_lua_type(lad_primitive: &ladfile::LadBMSPrimitiveKind) -> LuaType { +pub fn lad_primitive_to_lua_type(lad_primitive: &ReflectionPrimitiveKind) -> LuaType { LuaType::Primitive(match lad_primitive { - ladfile::LadBMSPrimitiveKind::Bool => LuaPrimitiveType::Boolean, - ladfile::LadBMSPrimitiveKind::Isize - | ladfile::LadBMSPrimitiveKind::I8 - | ladfile::LadBMSPrimitiveKind::I16 - | ladfile::LadBMSPrimitiveKind::I32 - | ladfile::LadBMSPrimitiveKind::I64 - | ladfile::LadBMSPrimitiveKind::I128 - | ladfile::LadBMSPrimitiveKind::Usize - | ladfile::LadBMSPrimitiveKind::U8 - | ladfile::LadBMSPrimitiveKind::U16 - | ladfile::LadBMSPrimitiveKind::U32 - | ladfile::LadBMSPrimitiveKind::U64 - | ladfile::LadBMSPrimitiveKind::U128 => LuaPrimitiveType::Integer, - ladfile::LadBMSPrimitiveKind::F32 | ladfile::LadBMSPrimitiveKind::F64 => { - LuaPrimitiveType::Number + ReflectionPrimitiveKind::Bool => LuaPrimitiveType::Boolean, + ReflectionPrimitiveKind::Isize + | ReflectionPrimitiveKind::I8 + | ReflectionPrimitiveKind::I16 + | ReflectionPrimitiveKind::I32 + | ReflectionPrimitiveKind::I64 + | ReflectionPrimitiveKind::I128 + | ReflectionPrimitiveKind::Usize + | ReflectionPrimitiveKind::U8 + | ReflectionPrimitiveKind::U16 + | ReflectionPrimitiveKind::U32 + | ReflectionPrimitiveKind::U64 + | ReflectionPrimitiveKind::U128 => LuaPrimitiveType::Integer, + ReflectionPrimitiveKind::F32 | ReflectionPrimitiveKind::F64 => LuaPrimitiveType::Number, + ReflectionPrimitiveKind::Char + | ReflectionPrimitiveKind::Str + | ReflectionPrimitiveKind::String + | ReflectionPrimitiveKind::OsString + | ReflectionPrimitiveKind::PathBuf => LuaPrimitiveType::String, + ReflectionPrimitiveKind::FunctionCallContext => return LuaType::Any, + ReflectionPrimitiveKind::DynamicFunction | ReflectionPrimitiveKind::DynamicFunctionMut => { + LuaPrimitiveType::Function } - ladfile::LadBMSPrimitiveKind::Char - | ladfile::LadBMSPrimitiveKind::Str - | ladfile::LadBMSPrimitiveKind::String - | ladfile::LadBMSPrimitiveKind::OsString - | ladfile::LadBMSPrimitiveKind::PathBuf => LuaPrimitiveType::String, - ladfile::LadBMSPrimitiveKind::FunctionCallContext => return LuaType::Any, - ladfile::LadBMSPrimitiveKind::DynamicFunction - | ladfile::LadBMSPrimitiveKind::DynamicFunctionMut => LuaPrimitiveType::Function, - ladfile::LadBMSPrimitiveKind::ReflectReference => { + ReflectionPrimitiveKind::ReflectReference => { return LuaType::Alias("ReflectReference".to_string()) } + ReflectionPrimitiveKind::ScriptValue => return LuaType::Any, + ReflectionPrimitiveKind::External(_) => return LuaType::Any, }) } diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs index 7426eec948..c14ac85da7 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lua_declaration_file.rs @@ -203,7 +203,7 @@ pub struct ClassField { /// ``` #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "lowercase")] -pub enum LuaOperator { +pub enum LuaOperatorKind { Add, // + Sub, // - Mul, // * @@ -224,6 +224,8 @@ pub enum LuaOperator { NewIndex, // []= #[serde(rename = "tostring")] ToString, // tostring() + Pairs, // pairs() + IPairs, // ipars() } /// Represents an operator overload for a class. @@ -236,8 +238,8 @@ pub enum LuaOperator { /// ---@operator call(...): Vector -- Call operator with variadic parameters /// ``` #[derive(Debug, Clone, Serialize)] -pub struct Operator { - pub operation: LuaOperator, // e.g., "add", "unm", "call" +pub struct LuaOperator { + pub operation: LuaOperatorKind, // e.g., "add", "unm", "call" pub param_type: Option, pub return_type: LuaType, } @@ -264,7 +266,7 @@ pub struct LuaClass { pub parents: Vec, pub fields: Vec, pub generics: Vec, - pub operators: Vec, + pub operators: Vec, pub documentation: Option, } diff --git a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera index 0a3cd80958..7dc82e382e 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera +++ b/crates/lad_backends/lua_language_server_lad_backend/templates/declaration_file.tera @@ -8,7 +8,10 @@ {{ self::multiline_description(description=class.documentation) -}} {%- for field in class.fields -%} {{- self::class_field(field=field) -}} -{%- endfor -%} +{%- endfor -%} {#- fields -#} +{%- for operator in class.operators -%} +---@operator {{operator.operation}}{% if operator.param_type %}({{self::lua_type(ty=operator.param_type)}}){% endif %}: {{self::lua_type(ty=operator.return_type)}} +{% endfor -%} {{ class.name }} = {} {# newline #} {%- for function in module.functions -%} diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs index 6398490e31..b0d77c129c 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs @@ -32,8 +32,6 @@ fn copy_example_ladfile_to_relevant_test(tests_dir: &std::path::Path) { std::fs::write(book_ladfile_path, ladfile).expect("failed to copy LAD file"); } -const BLESS_MODE: bool = true; - #[test] fn main() { add_executable_dir_to_path(); @@ -79,7 +77,7 @@ fn main() { let generated_str = std::fs::read_to_string(folder_path.join("bindings.lua")) .expect("failed to read bindings.lua file"); - if BLESS_MODE { + if std::env::var("BLESS_MODE").is_ok() { std::fs::write(&expected_path, &generated_str) .expect("failed to write expected.lua file"); } else { @@ -92,7 +90,7 @@ fn main() { } } } - if BLESS_MODE { + if std::env::var("BLESS_MODE").is_ok() { panic!("BLESS_MODE is enabled, please disable it to run the tests"); } } diff --git a/crates/lad_backends/mdbook_lad_preprocessor/src/argument_visitor.rs b/crates/lad_backends/mdbook_lad_preprocessor/src/argument_visitor.rs index c170687517..4d7b3766af 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/src/argument_visitor.rs +++ b/crates/lad_backends/mdbook_lad_preprocessor/src/argument_visitor.rs @@ -2,14 +2,14 @@ use std::path::PathBuf; -use ladfile::{ArgumentVisitor, LadTypeId}; +use ladfile::{ArgumentVisitor, LadTypeId, LadVisitable}; use crate::markdown::MarkdownBuilder; pub(crate) struct MarkdownArgumentVisitor<'a> { ladfile: &'a ladfile::LadFile, buffer: MarkdownBuilder, - linkifier: Box Option + 'static>, + linkifier: Option PathBuf + 'static>>, pub raw_type_id_replacement: Option<&'static str>, } impl<'a> MarkdownArgumentVisitor<'a> { @@ -20,20 +20,18 @@ impl<'a> MarkdownArgumentVisitor<'a> { Self { ladfile, buffer: builder, - linkifier: Box::new(|_, _| None), + linkifier: None, raw_type_id_replacement: None, } } /// Create a new instance of the visitor with a custom linkifier function - pub fn new_with_linkifier< - F: Fn(LadTypeId, &'a ladfile::LadFile) -> Option + 'static, - >( + pub fn new_with_linkifier PathBuf + 'static>( ladfile: &'a ladfile::LadFile, linkifier: F, ) -> Self { let mut without = Self::new(ladfile); - without.linkifier = Box::new(linkifier); + without.linkifier = Some(Box::new(linkifier)); without } @@ -49,6 +47,25 @@ impl<'a> MarkdownArgumentVisitor<'a> { } impl ArgumentVisitor for MarkdownArgumentVisitor<'_> { + fn walk_lad_type_id(&mut self, type_id: &LadTypeId) { + if let Some(prim) = self.ladfile.primitive_kind(type_id) { + self.visit_lad_bms_primitive_kind(prim); + } else { + self.visit_lad_type_id(type_id); + } + } + + fn visit_lad_bms_primitive_kind(&mut self, primitive_kind: &ladfile::ReflectionPrimitiveKind) { + let prim_id = primitive_kind.to_string(); + if let Some(linkifier) = &self.linkifier { + let link_value = (linkifier)(prim_id.clone()); + let link_value = link_value.to_string_lossy().to_string().replace("\\", "/"); + self.buffer.link(prim_id, link_value); + } else { + self.buffer.text(prim_id); + } + } + fn visit_lad_type_id(&mut self, type_id: &ladfile::LadTypeId) { // Write identifier let generics = self.ladfile.get_type_generics(type_id); @@ -66,36 +83,39 @@ impl ArgumentVisitor for MarkdownArgumentVisitor<'_> { self.visit_lad_type_id(&generic.type_id); } self.buffer.text('>'); + } else if let Some(linkifier) = &self.linkifier { + // link the type, by building a string of the type linked to first + let mut sub_visitor = MarkdownArgumentVisitor::new(self.ladfile); + sub_visitor.raw_type_id_replacement = self.raw_type_id_replacement; + type_id.accept(&mut sub_visitor); + let linked_string = sub_visitor.build(); + let link_value = (linkifier)(linked_string); + let link_value = link_value.to_string_lossy().to_string().replace("\\", "/"); + self.buffer.link(type_identifier, link_value); } else { - // link the type - let link_value = (self.linkifier)(type_id.clone(), self.ladfile); - let link_display = type_identifier; - if let Some(link_value) = link_value { - // canonicalize to linux paths - let link_value = link_value.to_string_lossy().to_string().replace("\\", "/"); - - self.buffer.link(link_display, link_value); - } else { - self.buffer.text(link_display); - } + self.buffer.text(type_identifier); } } - fn walk_option(&mut self, inner: &ladfile::LadTypeKind) { + fn walk_option(&mut self, inner: &ladfile::LadFieldOrVariableKind) { // Write Optional self.buffer.text("Optional<"); self.visit(inner); self.buffer.text(">"); } - fn walk_vec(&mut self, inner: &ladfile::LadTypeKind) { + fn walk_vec(&mut self, inner: &ladfile::LadFieldOrVariableKind) { // Write Vec self.buffer.text("Vec<"); self.visit(inner); self.buffer.text(">"); } - fn walk_hash_map(&mut self, key: &ladfile::LadTypeKind, value: &ladfile::LadTypeKind) { + fn walk_hash_map( + &mut self, + key: &ladfile::LadFieldOrVariableKind, + value: &ladfile::LadFieldOrVariableKind, + ) { // Write HashMap self.buffer.text("HashMap<"); self.visit(key); @@ -104,7 +124,7 @@ impl ArgumentVisitor for MarkdownArgumentVisitor<'_> { self.buffer.text(">"); } - fn walk_tuple(&mut self, inner: &[ladfile::LadTypeKind]) { + fn walk_tuple(&mut self, inner: &[ladfile::LadFieldOrVariableKind]) { // Write (inner1, inner2, ...) self.buffer.text("("); for (idx, arg) in inner.iter().enumerate() { @@ -116,7 +136,7 @@ impl ArgumentVisitor for MarkdownArgumentVisitor<'_> { self.buffer.text(")"); } - fn walk_union(&mut self, inner: &[ladfile::LadTypeKind]) { + fn walk_union(&mut self, inner: &[ladfile::LadFieldOrVariableKind]) { // Write `T1 | T2` for (idx, arg) in inner.iter().enumerate() { self.visit(arg); @@ -126,7 +146,7 @@ impl ArgumentVisitor for MarkdownArgumentVisitor<'_> { } } - fn walk_array(&mut self, inner: &ladfile::LadTypeKind, size: usize) { + fn walk_array(&mut self, inner: &ladfile::LadFieldOrVariableKind, size: usize) { // Write [inner; size] self.buffer.text("["); self.visit(inner); @@ -138,7 +158,7 @@ impl ArgumentVisitor for MarkdownArgumentVisitor<'_> { #[cfg(test)] mod test { - use ladfile::LadTypeKind; + use ladfile::{LadFieldOrVariableKind, ReflectionPrimitiveKind}; use super::*; @@ -152,13 +172,9 @@ mod test { fn test_linkifier_visitor_creates_links() { let ladfile = setup_ladfile(); - let mut visitor = - MarkdownArgumentVisitor::new_with_linkifier(&ladfile, |type_id, ladfile| { - Some( - PathBuf::from("root\\asd") - .join(ladfile.get_type_identifier(&type_id, None).to_string()), - ) - }); + let mut visitor = MarkdownArgumentVisitor::new_with_linkifier(&ladfile, |str| { + PathBuf::from("root\\asd").join(str) + }); let first_type_id = ladfile.types.first().unwrap().0; visitor.visit_lad_type_id(first_type_id); @@ -192,7 +208,7 @@ mod test { let first_type_id = ladfile.types.first().unwrap().0; let mut visitor = MarkdownArgumentVisitor::new(&ladfile); - visitor.visit(&LadTypeKind::Ref(first_type_id.clone())); + visitor.visit(&LadFieldOrVariableKind::Ref(first_type_id.clone())); assert_eq!(visitor.buffer.build(), "StructType"); } @@ -203,7 +219,7 @@ mod test { let first_type_id = ladfile.types.first().unwrap().0; let mut visitor = MarkdownArgumentVisitor::new(&ladfile); - visitor.visit(&LadTypeKind::Mut(first_type_id.clone())); + visitor.visit(&LadFieldOrVariableKind::Mut(first_type_id.clone())); assert_eq!(visitor.buffer.build(), "StructType"); } @@ -214,7 +230,7 @@ mod test { let first_type_id = ladfile.types.first().unwrap().0; let mut visitor = MarkdownArgumentVisitor::new(&ladfile); - visitor.visit(&LadTypeKind::Val(first_type_id.clone())); + visitor.visit(&LadFieldOrVariableKind::Val(first_type_id.clone())); assert_eq!(visitor.buffer.build(), "StructType"); } @@ -224,9 +240,9 @@ mod test { let mut visitor = MarkdownArgumentVisitor::new(&ladfile); - visitor.visit(&LadTypeKind::Option(Box::new(LadTypeKind::Primitive( - ladfile::LadBMSPrimitiveKind::Bool, - )))); + visitor.visit(&LadFieldOrVariableKind::Option(Box::new( + LadFieldOrVariableKind::Primitive(ReflectionPrimitiveKind::Bool), + ))); assert_eq!(visitor.buffer.build(), "Optional"); } @@ -236,9 +252,9 @@ mod test { let mut visitor = MarkdownArgumentVisitor::new(&ladfile); - visitor.visit(&LadTypeKind::Vec(Box::new(LadTypeKind::Primitive( - ladfile::LadBMSPrimitiveKind::Bool, - )))); + visitor.visit(&LadFieldOrVariableKind::Vec(Box::new( + LadFieldOrVariableKind::Primitive(ReflectionPrimitiveKind::Bool), + ))); assert_eq!(visitor.buffer.build(), "Vec"); } @@ -248,9 +264,13 @@ mod test { let mut visitor = MarkdownArgumentVisitor::new(&ladfile); - visitor.visit(&LadTypeKind::HashMap( - Box::new(LadTypeKind::Primitive(ladfile::LadBMSPrimitiveKind::Bool)), - Box::new(LadTypeKind::Primitive(ladfile::LadBMSPrimitiveKind::String)), + visitor.visit(&LadFieldOrVariableKind::HashMap( + Box::new(LadFieldOrVariableKind::Primitive( + ReflectionPrimitiveKind::Bool, + )), + Box::new(LadFieldOrVariableKind::Primitive( + ReflectionPrimitiveKind::String, + )), )); assert_eq!(visitor.buffer.build(), "HashMap"); @@ -263,13 +283,15 @@ mod test { let mut visitor = MarkdownArgumentVisitor::new(&ladfile); let first_type_id = ladfile.types.first().unwrap().0; - visitor.visit(&LadTypeKind::HashMap( - Box::new(LadTypeKind::Primitive(ladfile::LadBMSPrimitiveKind::Bool)), - Box::new(LadTypeKind::Union(vec![ - LadTypeKind::Val(first_type_id.clone()), - LadTypeKind::Union(vec![ - LadTypeKind::Val(first_type_id.clone()), - LadTypeKind::Val(first_type_id.clone()), + visitor.visit(&LadFieldOrVariableKind::HashMap( + Box::new(LadFieldOrVariableKind::Primitive( + ReflectionPrimitiveKind::Bool, + )), + Box::new(LadFieldOrVariableKind::Union(vec![ + LadFieldOrVariableKind::Val(first_type_id.clone()), + LadFieldOrVariableKind::Union(vec![ + LadFieldOrVariableKind::Val(first_type_id.clone()), + LadFieldOrVariableKind::Val(first_type_id.clone()), ]), ])), )); @@ -285,9 +307,9 @@ mod test { let mut visitor = MarkdownArgumentVisitor::new(&ladfile); - visitor.visit(&LadTypeKind::Tuple(vec![ - LadTypeKind::Primitive(ladfile::LadBMSPrimitiveKind::Bool), - LadTypeKind::Primitive(ladfile::LadBMSPrimitiveKind::String), + visitor.visit(&LadFieldOrVariableKind::Tuple(vec![ + LadFieldOrVariableKind::Primitive(ReflectionPrimitiveKind::Bool), + LadFieldOrVariableKind::Primitive(ReflectionPrimitiveKind::String), ])); assert_eq!(visitor.buffer.build(), "(bool, String)"); } @@ -298,8 +320,10 @@ mod test { let mut visitor = MarkdownArgumentVisitor::new(&ladfile); - visitor.visit(&LadTypeKind::Array( - Box::new(LadTypeKind::Primitive(ladfile::LadBMSPrimitiveKind::Bool)), + visitor.visit(&LadFieldOrVariableKind::Array( + Box::new(LadFieldOrVariableKind::Primitive( + ReflectionPrimitiveKind::Bool, + )), 5, )); assert_eq!(visitor.buffer.build(), "[bool; 5]"); @@ -313,7 +337,7 @@ mod test { let first_type_id = ladfile.types.first().unwrap().0; - visitor.visit(&LadTypeKind::Unknown(first_type_id.clone())); + visitor.visit(&LadFieldOrVariableKind::Unknown(first_type_id.clone())); assert_eq!(visitor.buffer.build(), "StructType"); } } diff --git a/crates/lad_backends/mdbook_lad_preprocessor/src/sections.rs b/crates/lad_backends/mdbook_lad_preprocessor/src/sections.rs index c4d50e3f99..da6b74df65 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/src/sections.rs +++ b/crates/lad_backends/mdbook_lad_preprocessor/src/sections.rs @@ -1,8 +1,8 @@ use std::{borrow::Cow, collections::HashSet, path::PathBuf}; use ladfile::{ - ArgumentVisitor, LadArgument, LadBMSPrimitiveKind, LadFile, LadFunction, LadInstance, LadType, - LadTypeId, LadTypeKind, LadTypeLayout, + LadArgument, LadFieldOrVariableKind, LadFile, LadFunction, LadInstance, LadTypeDefinition, + LadTypeId, LadTypeLayout, LadVisitable, ReflectionPrimitiveKind, }; use mdbook::book::{Chapter, SectionNumber}; @@ -12,26 +12,37 @@ use crate::{ markdown_vec, }; -fn print_type(ladfile: &LadFile, type_: &LadTypeId) -> String { - let mut visitor = MarkdownArgumentVisitor::new(ladfile); - visitor.visit_lad_type_id(type_); - visitor.build() -} - -fn print_type_with_replacement( +fn print_type( ladfile: &LadFile, - type_: &LadTypeId, - raw_type_id_replacement: &'static str, + type_: &dyn LadVisitable, + raw_type_id_replacement: Option<&'static str>, + linkifier_base_path_and_escape_opt: Option<(PathBuf, bool)>, ) -> String { let mut visitor = - MarkdownArgumentVisitor::new(ladfile).with_raw_type_id_replacement(raw_type_id_replacement); - visitor.visit_lad_type_id(type_); - visitor.build() + if let Some((linkifier_base_path, _)) = linkifier_base_path_and_escape_opt.clone() { + MarkdownArgumentVisitor::new_with_linkifier(ladfile, move |str| { + let printed_type = linkify_filename(str); + linkifier_base_path.join(printed_type).with_extension("md") + }) + } else { + MarkdownArgumentVisitor::new(ladfile) + }; + if let Some(replacement) = raw_type_id_replacement { + visitor = visitor.with_raw_type_id_replacement(replacement); + } + + type_.accept(&mut visitor); + let mut printed = visitor.build(); + if let Some((_, escape_opt)) = linkifier_base_path_and_escape_opt + && escape_opt + { + printed = escape_markdown(printed) + } + printed } -fn build_escaped_visitor(arg_visitor: MarkdownArgumentVisitor<'_>) -> String { - arg_visitor - .build() +fn escape_markdown(markdown: String) -> String { + markdown .replace("<", "\\<") .replace(">", "\\>") .replace("|", "\\|") @@ -50,7 +61,7 @@ pub(crate) enum SectionData<'a> { InstancesSummary, TypeDetail { lad_type_id: &'a LadTypeId, - lad_type: &'a LadType, + lad_type: &'a LadTypeDefinition, }, FunctionDetail { types_directory: PathBuf, @@ -140,8 +151,12 @@ impl<'a> Section<'a> { SectionData::TypeSummary { .. } => "Types".to_owned(), SectionData::FunctionSummary { .. } => "Functions".to_owned(), SectionData::InstancesSummary { .. } => "Globals".to_owned(), - SectionData::TypeDetail { lad_type_id, .. } => print_type(self.ladfile, lad_type_id), - SectionData::FunctionDetail { function, .. } => function.identifier.to_string(), + SectionData::TypeDetail { lad_type_id, .. } => { + print_type(self.ladfile, *lad_type_id, None, None) + } + SectionData::FunctionDetail { function, .. } => { + function.identifier_with_overload().to_string() + } } } @@ -349,6 +364,8 @@ impl<'a> Section<'a> { vec![ SectionItem::Layout { layout: &lad_type.layout, + ladfile: self.ladfile, + types_directory: PathBuf::from("./"), }, SectionItem::Description { lad_type }, SectionItem::Markdown { @@ -399,9 +416,11 @@ pub enum SectionItem<'a> { }, Layout { layout: &'a LadTypeLayout, + ladfile: &'a LadFile, + types_directory: PathBuf, }, Description { - lad_type: &'a LadType, + lad_type: &'a LadTypeDefinition, }, FunctionsSummary { functions: Vec<&'a LadFunction>, @@ -442,7 +461,11 @@ impl IntoMarkdown for SectionItem<'_> { fn to_markdown(&self, builder: &mut MarkdownBuilder) { match self { SectionItem::Markdown { markdown } => (markdown)(builder), - SectionItem::Layout { layout } => { + SectionItem::Layout { + layout, + ladfile, + types_directory, + } => { // process the variants here let opaque = layout.for_each_variant( |v, _i| match v { @@ -451,7 +474,14 @@ impl IntoMarkdown for SectionItem<'_> { true, fields .iter() - .map(|f| Markdown::new_paragraph(f.type_.to_string())) + .map(|f| { + Markdown::Raw(print_type( + ladfile, + &f.type_, + None, + Some((types_directory.clone(), true)), + )) + }) .collect(), ); } @@ -464,7 +494,12 @@ impl IntoMarkdown for SectionItem<'_> { markdown_vec![ Markdown::new_paragraph(f.name.clone()).bold(), Markdown::new_paragraph(":"), - f.type_.to_string() + Markdown::Raw(print_type( + ladfile, + &f.type_, + None, + Some((types_directory.clone(), true)) + )) ] }) .collect(), @@ -502,7 +537,7 @@ impl IntoMarkdown for SectionItem<'_> { builder.table(|builder| { builder.headers(vec!["Function", "Summary"]); for function in functions.iter() { - let first_col = function.identifier.to_string(); + let first_col = function.identifier_with_overload().to_string(); // first line with content from documentation trimmed to 100 chars let second_col = function @@ -514,7 +549,11 @@ impl IntoMarkdown for SectionItem<'_> { builder.row(markdown_vec![ Markdown::Link { text: Box::new(first_col), - url: format!("./{}/{}.md", functions_path, function.identifier), + url: format!( + "./{}/{}.md", + functions_path, + function.identifier_with_overload() + ), anchor: false }, Markdown::new_paragraph(second_col.to_string().replace("\n", " ")), @@ -534,9 +573,9 @@ impl IntoMarkdown for SectionItem<'_> { builder.table(|builder| { builder.headers(vec!["Type", "Summary"]); for type_ in types.iter() { - let printed_type_for_url = print_type(ladfile, type_); + let printed_type_for_url = print_type(ladfile, *type_, None, None); let printed_type_pretty = - print_type_with_replacement(ladfile, type_, "Unknown"); + print_type(ladfile, *type_, Some("Unknown"), None); let documentation = ladfile.get_type_documentation(type_); @@ -577,16 +616,8 @@ impl IntoMarkdown for SectionItem<'_> { .map(|(k, v)| { let name = k.to_string(); let types_directory = types_directory.clone(); - let mut arg_visitor = MarkdownArgumentVisitor::new_with_linkifier( - ladfile, - move |lad_type_id, ladfile| { - let printed_type = - linkify_filename(print_type(ladfile, &lad_type_id)); - Some(types_directory.join(printed_type).with_extension("md")) - }, - ); - arg_visitor.visit(&v.type_kind); - let escaped = build_escaped_visitor(arg_visitor); + let escaped = + print_type(ladfile, &v.type_kind, None, Some((types_directory, true))); (v.is_static, name, escaped) }) .collect::>(); @@ -625,7 +656,9 @@ impl IntoMarkdown for SectionItem<'_> { if function.arguments.iter().any(|a| { matches!( a.kind, - LadTypeKind::Primitive(LadBMSPrimitiveKind::FunctionCallContext) + LadFieldOrVariableKind::Primitive( + ReflectionPrimitiveKind::FunctionCallContext + ) ) }) { builder.raw( @@ -689,19 +722,13 @@ fn build_lad_function_argument_row( // we exclude function call context as it's not something scripts pass down if matches!( arg.kind, - LadTypeKind::Primitive(LadBMSPrimitiveKind::FunctionCallContext) + LadFieldOrVariableKind::Primitive(ReflectionPrimitiveKind::FunctionCallContext) ) { return; } let types_directory = types_directory.to_owned(); - let mut arg_visitor = - MarkdownArgumentVisitor::new_with_linkifier(ladfile, move |lad_type_id, ladfile| { - let printed_type = linkify_filename(print_type(ladfile, &lad_type_id)); - Some(types_directory.join(printed_type).with_extension("md")) - }); - arg_visitor.visit(&arg.kind); - let markdown = build_escaped_visitor(arg_visitor); + let escaped = print_type(ladfile, &arg.kind, None, Some((types_directory, false))); let arg_name = arg .name @@ -711,7 +738,7 @@ fn build_lad_function_argument_row( builder.row(markdown_vec![ Markdown::new_paragraph(arg_name).bold(), - Markdown::Raw(markdown), + Markdown::Raw(escaped), Markdown::Raw( arg.documentation .as_deref() diff --git a/crates/ladfile/Cargo.toml b/crates/ladfile/Cargo.toml index 88c3b34075..ec73dd0764 100644 --- a/crates/ladfile/Cargo.toml +++ b/crates/ladfile/Cargo.toml @@ -15,7 +15,7 @@ categories.workspace = true serde = { workspace = true, features = ["derive", "std"] } serde_json = { workspace = true, features = ["std"] } indexmap = { workspace = true, features = ["serde"] } - +bevy_mod_scripting_bindings_domain = { workspace = true } [features] default = ["visitor", "testfile"] diff --git a/crates/ladfile/src/lib.rs b/crates/ladfile/src/lib.rs index 769e7156b9..0cacab730b 100644 --- a/crates/ladfile/src/lib.rs +++ b/crates/ladfile/src/lib.rs @@ -9,6 +9,7 @@ use std::{ collections::{HashMap, HashSet}, }; +pub use bevy_mod_scripting_bindings_domain::ReflectionPrimitiveKind; // re-export the thing we use use indexmap::IndexMap; /// The current version of the LAD_VERSION format supported by this library. @@ -29,14 +30,11 @@ pub struct LadFile { pub globals: IndexMap, LadInstance>, /// The types defined in the LAD file. - pub types: IndexMap, + pub types: IndexMap, /// The functions defined in the LAD file. pub functions: IndexMap, - /// A mapping from type ids to primitive types - pub primitives: IndexMap, - /// A description of the LAD file and its contents in markdown #[serde(skip_serializing_if = "Option::is_none", default)] pub description: Option, @@ -50,7 +48,6 @@ impl LadFile { globals: IndexMap::new(), types: IndexMap::new(), functions: IndexMap::new(), - primitives: IndexMap::new(), description: None, } } @@ -61,10 +58,6 @@ impl LadFile { type_id: &LadTypeId, raw_type_id_replacement: Option<&'static str>, ) -> Cow<'static, str> { - if let Some(primitive) = self.primitives.get(type_id) { - return primitive.kind.lad_type_id().to_string().into(); - } - self.types .get(type_id) .map(|t| t.identifier.clone().into()) @@ -78,8 +71,10 @@ impl LadFile { } /// Retrieves true if the type id corresponds to a primitive type. - pub fn is_primitive(&self, type_id: &LadTypeId) -> bool { - self.primitives.contains_key(type_id) + pub fn primitive_kind(&self, type_id: &LadTypeId) -> Option<&ReflectionPrimitiveKind> { + self.types + .get(type_id) + .and_then(|t| t.metadata.mapped_to_primitive_kind.as_ref()) } /// Retrieves the generics of a type id if it is a generic type. @@ -94,12 +89,6 @@ impl LadFile { self.types .get(type_id) .and_then(|t| t.documentation.as_deref()) - // try primitives - .or_else(|| { - self.primitives - .get(type_id) - .map(|p| p.documentation.as_ref()) - }) } /// Retrieves the metadata section for the given lad type id. @@ -124,15 +113,6 @@ impl LadFile { .insert(type_id); } - for (primitive_id, primitive) in &self.primitives { - let arity = 0; // primitives have no generics currently - let identifier = primitive.kind.lad_type_id().to_string().into(); - types_by_identifier_and_arity - .entry(PolymorphicTypeKey { identifier, arity }) - .or_default() - .insert(primitive_id); - } - types_by_identifier_and_arity } @@ -167,7 +147,7 @@ impl Default for LadFile { #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct LadInstance { /// The kind of the instance - pub type_kind: LadTypeKind, + pub type_kind: LadFieldOrVariableKind, /// whether the instance is static or not /// @@ -203,6 +183,8 @@ pub struct LadFunction { pub namespace: LadFunctionNamespace, /// The identifier or name of the function. pub identifier: Cow<'static, str>, + /// If `Some`, signifies the function is an overload of another function + pub overload_index: Option, /// The argument information for the function. #[serde(skip_serializing_if = "Vec::is_empty", default)] pub arguments: Vec, @@ -211,16 +193,34 @@ pub struct LadFunction { /// The documentation describing the function. #[serde(skip_serializing_if = "Option::is_none", default)] pub documentation: Option>, + /// Function metadata + pub metadata: LadFunctionMetadata, +} +#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +/// Additional data relevant to functions +pub struct LadFunctionMetadata { + /// True if the function represents a supported binary or unary operation + pub is_operator: bool, + /// Extra metadata to be populated by external plugins + #[serde(skip_serializing_if = "HashMap::is_empty", default)] + pub misc: HashMap, } impl LadFunction { /// Checks if the function is an overload, and if so parses the overload number and the true name. - pub fn as_overload(&self) -> Option<(String, usize)> { - let split = self.identifier.split('-').collect::>(); - if split.len() == 2 { - return Some((split[0].to_string(), split[1].parse().ok()?)); + pub fn as_overload(&self) -> Option<(Cow<'static, str>, usize)> { + self.overload_index + .map(|index| (self.identifier.clone(), index)) + } + + /// Qualifies the identifier of this function with its overload number. + /// Use this instead of the identifier if you require a unique name per function. + pub fn identifier_with_overload(&self) -> Cow<'static, str> { + if let Some(index) = self.overload_index { + format!("{}-{index}", self.identifier).into() + } else { + self.identifier.clone() } - None } } @@ -238,7 +238,7 @@ pub enum LadFunctionNamespace { /// An argument definition used in a LAD file. pub struct LadArgument { /// The kind and type of argument - pub kind: LadTypeKind, + pub kind: LadFieldOrVariableKind, /// The provided documentation for this argument. Normally derived from the function docstring. #[serde(skip_serializing_if = "Option::is_none", default)] @@ -250,8 +250,8 @@ pub struct LadArgument { } #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -/// The kind of type in a LAD file. -/// There is a distinction between the "core" identity of a type +/// The kind of field or variable/parameter in a LAD file. +/// There is a distinction between the "core" definition/identity of a type /// and how it's used in various contexts. /// /// for example: @@ -260,7 +260,7 @@ pub struct LadArgument { /// /// In generating documents, it's convenient to distinguish a few core "containers" to provide useful information. #[serde(rename_all = "camelCase")] -pub enum LadTypeKind { +pub enum LadFieldOrVariableKind { /// a `Ref` wrapped argument Ref(LadTypeId), /// a `Mut` wrapped argument @@ -268,27 +268,46 @@ pub enum LadTypeKind { /// a `Val` wrapped argument Val(LadTypeId), /// an `Option` wrapped argument - Option(Box), + Option(Box), /// a `Vec` - Vec(Box), + Vec(Box), /// a `HashMap` - HashMap(Box, Box), + HashMap(Box, Box), + /// a `HashSet` + HashSet(Box), /// A `InteropResult` - InteropResult(Box), + InteropResult(Box), /// A tuple of arguments - Tuple(Vec), + Tuple(Vec), /// An array - Array(Box, usize), + Array(Box, usize), /// A primitive type, implementing `IntoScript` and `FromScript` natively in BMS. - Primitive(LadBMSPrimitiveKind), + Primitive(ReflectionPrimitiveKind), /// A union of two or more types - Union(Vec), + Union(Vec), /// An arbitrary type which is either unsupported, doesn't contain type information, or is generally unknown. /// /// This will be the variant used for external primitives as well. Unknown(LadTypeId), } +/// Utility for dispatching visitors on dyn traits +pub trait LadVisitable { + /// Runs the visitor on the given node + fn accept(&self, visitor: &mut dyn ArgumentVisitor); +} + +impl LadVisitable for LadTypeId { + fn accept(&self, visitor: &mut dyn ArgumentVisitor) { + visitor.visit_lad_type_id(self); + } +} + +impl LadVisitable for LadFieldOrVariableKind { + fn accept(&self, visitor: &mut dyn ArgumentVisitor) { + visitor.visit(self); + } +} /// A visitor pattern for running arbitrary logic on the hierarchy of arguments. /// /// Use cases are mostly to do with printing the arguments in a human readable format. @@ -296,10 +315,20 @@ pub enum LadTypeKind { #[cfg(feature = "visitor")] pub trait ArgumentVisitor { /// perform an action on a `LadTypeId`, by default noop - fn visit_lad_type_id(&mut self, type_id: &LadTypeId) {} + fn visit_lad_type_id(&mut self, type_id: &LadTypeId); + /// perform an action on a `LadBMSPrimitiveKind`, by default visits the type id of the primitive kind - fn visit_lad_bms_primitive_kind(&mut self, primitive_kind: &LadBMSPrimitiveKind) { - self.visit_lad_type_id(&primitive_kind.lad_type_id()); + fn visit_lad_bms_primitive_kind(&mut self, primitive_kind: &ReflectionPrimitiveKind); + + /// perform an action on a `Unknown`, by default visits the type id of the unknown type + fn visit_unknown(&mut self, type_id: &LadTypeId) { + self.visit_lad_type_id(type_id); + } + + /// walks the lad type_id structure, by default simply visits type_id's + /// Can be used to dispatch to primitives instead of the type maps to these + fn walk_lad_type_id(&mut self, type_id: &LadTypeId) { + self.visit_lad_type_id(type_id); } /// traverse a `Ref` wrapped argument, by default calls `visit` on the inner argument @@ -318,45 +347,50 @@ pub trait ArgumentVisitor { } /// traverse an `Option` wrapped argument, by default calls `visit` on the inner argument - fn walk_option(&mut self, inner: &LadTypeKind) { + fn walk_option(&mut self, inner: &LadFieldOrVariableKind) { self.visit(inner); } /// traverse a `Vec` wrapped argument, by default calls `visit` on the inner argument - fn walk_vec(&mut self, inner: &LadTypeKind) { + fn walk_vec(&mut self, inner: &LadFieldOrVariableKind) { self.visit(inner); } /// traverse a `HashMap` wrapped argument, by default calls `visit` on the key and value - fn walk_hash_map(&mut self, key: &LadTypeKind, value: &LadTypeKind) { + fn walk_hash_map(&mut self, key: &LadFieldOrVariableKind, value: &LadFieldOrVariableKind) { self.visit(key); self.visit(value); } + /// traverse a `HashMap` wrapped argument, by default calls `visit` on the key and value + fn walk_hash_set(&mut self, key: &LadFieldOrVariableKind) { + self.visit(key); + } + /// traverse an `InteropResult` wrapped argument, by default calls `visit` on the inner argument - fn walk_interop_result(&mut self, inner: &LadTypeKind) { + fn walk_interop_result(&mut self, inner: &LadFieldOrVariableKind) { self.visit(inner); } /// traverse a tuple of arguments, by default calls `visit` on each argument - fn walk_tuple(&mut self, inner: &[LadTypeKind]) { + fn walk_tuple(&mut self, inner: &[LadFieldOrVariableKind]) { for arg in inner { self.visit(arg); } } /// traverse an array of arguments, by default calls `visit` on the inner argument - fn walk_array(&mut self, inner: &LadTypeKind, size: usize) { + fn walk_array(&mut self, inner: &LadFieldOrVariableKind, size: usize) { self.visit(inner); } /// traverse a primitive argument, by default calls `visit` on the primitive kind - fn walk_primitive(&mut self, primitive_kind: &LadBMSPrimitiveKind) { + fn walk_primitive(&mut self, primitive_kind: &ReflectionPrimitiveKind) { self.visit_lad_bms_primitive_kind(primitive_kind); } /// traverse a union of arguments, by default calls `visit` on each argument - fn walk_union(&mut self, inner: &[LadTypeKind]) { + fn walk_union(&mut self, inner: &[LadFieldOrVariableKind]) { for arg in inner { self.visit(arg); } @@ -364,7 +398,7 @@ pub trait ArgumentVisitor { /// traverse an unknown argument, by default calls `visit` on the type id fn walk_unknown(&mut self, type_id: &LadTypeId) { - self.visit_lad_type_id(type_id); + self.visit_unknown(type_id); } /// Visit an argument kind, by default calls the appropriate walk method on each enum variant. @@ -372,105 +406,79 @@ pub trait ArgumentVisitor { /// Each walk variant will walk over nested kinds, and visit the leaf types. /// /// If you want to do something with the parent types, you WILL have to override each individual walk method. - fn visit(&mut self, kind: &LadTypeKind) { + fn visit(&mut self, kind: &LadFieldOrVariableKind) { match kind { - LadTypeKind::Ref(type_id) => self.walk_ref(type_id), - LadTypeKind::Mut(type_id) => self.walk_mut(type_id), - LadTypeKind::Val(type_id) => self.walk_val(type_id), - LadTypeKind::Option(inner) => self.walk_option(inner), - LadTypeKind::Vec(inner) => self.walk_vec(inner), - LadTypeKind::HashMap(key, value) => self.walk_hash_map(key, value), - LadTypeKind::InteropResult(inner) => self.walk_interop_result(inner), - LadTypeKind::Tuple(inner) => self.walk_tuple(inner), - LadTypeKind::Array(inner, size) => self.walk_array(inner, *size), - LadTypeKind::Primitive(primitive_kind) => self.walk_primitive(primitive_kind), - LadTypeKind::Union(inner) => self.walk_union(inner), - LadTypeKind::Unknown(type_id) => self.walk_unknown(type_id), + LadFieldOrVariableKind::Ref(type_id) => self.walk_ref(type_id), + LadFieldOrVariableKind::Mut(type_id) => self.walk_mut(type_id), + LadFieldOrVariableKind::Val(type_id) => self.walk_val(type_id), + LadFieldOrVariableKind::Option(inner) => self.walk_option(inner), + LadFieldOrVariableKind::Vec(inner) => self.walk_vec(inner), + LadFieldOrVariableKind::HashMap(key, value) => self.walk_hash_map(key, value), + LadFieldOrVariableKind::HashSet(key) => self.walk_hash_set(key), + LadFieldOrVariableKind::InteropResult(inner) => self.walk_interop_result(inner), + LadFieldOrVariableKind::Tuple(inner) => self.walk_tuple(inner), + LadFieldOrVariableKind::Array(inner, size) => self.walk_array(inner, *size), + LadFieldOrVariableKind::Primitive(primitive_kind) => { + self.walk_primitive(primitive_kind) + } + LadFieldOrVariableKind::Union(inner) => self.walk_union(inner), + LadFieldOrVariableKind::Unknown(type_id) => self.walk_unknown(type_id), } } } -#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] -/// A BMS primitive definition -pub struct LadBMSPrimitiveType { - /// The kind of primitive - pub kind: LadBMSPrimitiveKind, - /// The documentation describing the primitive - pub documentation: Cow<'static, str>, -} - -/// A primitive type kind in the LAD file format. -/// -/// The docstrings on variants corresponding to Reflect types, are used to generate documentation for these primitives. -#[derive(Debug, Clone, Copy, PartialEq, serde::Serialize, serde::Deserialize)] -#[serde(rename_all = "camelCase")] -#[allow(missing_docs)] -pub enum LadBMSPrimitiveKind { - Bool, - Isize, - I8, - I16, - I32, - I64, - I128, - Usize, - U8, - U16, - U32, - U64, - U128, - F32, - F64, - Char, - Str, - String, - OsString, - PathBuf, - FunctionCallContext, - DynamicFunction, - DynamicFunctionMut, - ReflectReference, -} +// #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] +// /// A BMS primitive definition +// pub struct LadBMSPrimitiveType { +// /// The kind of primitive +// pub kind: ReflectionPrimitiveKind, +// /// The documentation describing the primitive +// pub documentation: Cow<'static, str>, +// } -impl LadBMSPrimitiveKind { - /// Get the corresponding type id for a primitive kind. - pub fn lad_type_id(self) -> LadTypeId { - match self { - LadBMSPrimitiveKind::Bool => LadTypeId::new_string_id("bool".into()), - LadBMSPrimitiveKind::Isize => LadTypeId::new_string_id("isize".into()), - LadBMSPrimitiveKind::I8 => LadTypeId::new_string_id("i8".into()), - LadBMSPrimitiveKind::I16 => LadTypeId::new_string_id("i16".into()), - LadBMSPrimitiveKind::I32 => LadTypeId::new_string_id("i32".into()), - LadBMSPrimitiveKind::I64 => LadTypeId::new_string_id("i64".into()), - LadBMSPrimitiveKind::I128 => LadTypeId::new_string_id("i128".into()), - LadBMSPrimitiveKind::Usize => LadTypeId::new_string_id("usize".into()), - LadBMSPrimitiveKind::U8 => LadTypeId::new_string_id("u8".into()), - LadBMSPrimitiveKind::U16 => LadTypeId::new_string_id("u16".into()), - LadBMSPrimitiveKind::U32 => LadTypeId::new_string_id("u32".into()), - LadBMSPrimitiveKind::U64 => LadTypeId::new_string_id("u64".into()), - LadBMSPrimitiveKind::U128 => LadTypeId::new_string_id("u128".into()), - LadBMSPrimitiveKind::F32 => LadTypeId::new_string_id("f32".into()), - LadBMSPrimitiveKind::F64 => LadTypeId::new_string_id("f64".into()), - LadBMSPrimitiveKind::Char => LadTypeId::new_string_id("char".into()), - LadBMSPrimitiveKind::Str => LadTypeId::new_string_id("str".into()), - LadBMSPrimitiveKind::String => LadTypeId::new_string_id("String".into()), - LadBMSPrimitiveKind::OsString => LadTypeId::new_string_id("OsString".into()), - LadBMSPrimitiveKind::PathBuf => LadTypeId::new_string_id("PathBuf".into()), - LadBMSPrimitiveKind::FunctionCallContext => { - LadTypeId::new_string_id("FunctionCallContext".into()) - } - LadBMSPrimitiveKind::DynamicFunction => { - LadTypeId::new_string_id("DynamicFunction".into()) - } - LadBMSPrimitiveKind::DynamicFunctionMut => { - LadTypeId::new_string_id("DynamicFunctionMut".into()) - } - LadBMSPrimitiveKind::ReflectReference => { - LadTypeId::new_string_id("ReflectReference".into()) - } - } - } -} +// impl LadBMSPrimitiveType { +// /// Get the corresponding type id for a primitive kind. +// pub fn lad_type_id(kind: ReflectionPrimitiveKind) -> LadTypeId { +// match kind { +// ReflectionPrimitiveKind::Bool => LadTypeId::new_string_id("bool".into()), +// ReflectionPrimitiveKind::Isize => LadTypeId::new_string_id("isize".into()), +// ReflectionPrimitiveKind::I8 => LadTypeId::new_string_id("i8".into()), +// ReflectionPrimitiveKind::I16 => LadTypeId::new_string_id("i16".into()), +// ReflectionPrimitiveKind::I32 => LadTypeId::new_string_id("i32".into()), +// ReflectionPrimitiveKind::I64 => LadTypeId::new_string_id("i64".into()), +// ReflectionPrimitiveKind::I128 => LadTypeId::new_string_id("i128".into()), +// ReflectionPrimitiveKind::Usize => LadTypeId::new_string_id("usize".into()), +// ReflectionPrimitiveKind::U8 => LadTypeId::new_string_id("u8".into()), +// ReflectionPrimitiveKind::U16 => LadTypeId::new_string_id("u16".into()), +// ReflectionPrimitiveKind::U32 => LadTypeId::new_string_id("u32".into()), +// ReflectionPrimitiveKind::U64 => LadTypeId::new_string_id("u64".into()), +// ReflectionPrimitiveKind::U128 => LadTypeId::new_string_id("u128".into()), +// ReflectionPrimitiveKind::F32 => LadTypeId::new_string_id("f32".into()), +// ReflectionPrimitiveKind::F64 => LadTypeId::new_string_id("f64".into()), +// ReflectionPrimitiveKind::Char => LadTypeId::new_string_id("char".into()), +// ReflectionPrimitiveKind::Str => LadTypeId::new_string_id("str".into()), +// ReflectionPrimitiveKind::String => LadTypeId::new_string_id("String".into()), +// ReflectionPrimitiveKind::OsString => LadTypeId::new_string_id("OsString".into()), +// ReflectionPrimitiveKind::PathBuf => LadTypeId::new_string_id("PathBuf".into()), +// ReflectionPrimitiveKind::FunctionCallContext => { +// LadTypeId::new_string_id("FunctionCallContext".into()) +// } +// ReflectionPrimitiveKind::DynamicFunction => { +// LadTypeId::new_string_id("DynamicFunction".into()) +// } +// ReflectionPrimitiveKind::DynamicFunctionMut => { +// LadTypeId::new_string_id("DynamicFunctionMut".into()) +// } +// ReflectionPrimitiveKind::ReflectReference => { +// LadTypeId::new_string_id("ReflectReference".into()) +// } +// ReflectionPrimitiveKind::ScriptValue => LadTypeId::new_string_id("ScriptValue".into()), +// ReflectionPrimitiveKind::External(external) => { +// LadTypeId::new_string_id(external.into()) +// } +// } +// } +// } #[derive( Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, serde::Serialize, serde::Deserialize, @@ -496,7 +504,7 @@ impl LadTypeId { #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] /// A type definition used in a LAD file. -pub struct LadType { +pub struct LadTypeDefinition { /// The identifier or name of the type. pub identifier: String, @@ -554,6 +562,9 @@ pub struct LadTypeMetadata { /// added as namespaces without actually implementing the Reflect trait pub is_reflect: bool, + /// Set to a primitive kind if this type is mapped to a primitive + pub mapped_to_primitive_kind: Option, + /// Extra metadata sections that plugins can use to serialize other information #[serde(skip_serializing_if = "HashMap::is_empty", default)] pub misc: HashMap, @@ -649,7 +660,7 @@ pub enum LadVariant { pub struct LadField { /// The type of the field. #[serde(rename = "type")] - pub type_: LadTypeId, + pub type_: LadFieldOrVariableKind, } #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] @@ -659,7 +670,7 @@ pub struct LadNamedField { pub name: String, #[serde(rename = "type")] /// The type of the field. - pub type_: LadTypeId, + pub type_: LadFieldOrVariableKind, } /// A generic type definition used in a LAD file. diff --git a/crates/ladfile/test_assets/test.lad.json b/crates/ladfile/test_assets/test.lad.json index 7696fd42d7..5707b07bd9 100644 --- a/crates/ladfile/test_assets/test.lad.json +++ b/crates/ladfile/test_assets/test.lad.json @@ -51,12 +51,19 @@ "fields": [ { "name": "int_field", - "type": "usize" + "type": { + "primitive": "usize" + } } ] }, "generated": false, - "insignificance": 1000 + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": true + } }, "ladfile_builder::test::GenericStructType": { "identifier": "GenericStructType", @@ -78,16 +85,25 @@ "fields": [ { "name": "field", - "type": "usize" + "type": { + "primitive": "usize" + } }, { "name": "field2", - "type": "usize" + "type": { + "primitive": "usize" + } } ] }, "generated": false, - "insignificance": 1000 + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": true + } }, "ladfile_builder::test::EnumType": { "identifier": "EnumType", @@ -104,7 +120,9 @@ "fields": [ { "name": "field", - "type": "usize" + "type": { + "primitive": "usize" + } } ] }, @@ -113,16 +131,25 @@ "name": "TupleStruct", "fields": [ { - "type": "usize" + "type": { + "primitive": "usize" + } }, { - "type": "String" + "type": { + "primitive": "string" + } } ] } ], "generated": false, - "insignificance": 1000 + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": true + } }, "ladfile_builder::test::TupleStructType": { "identifier": "TupleStructType", @@ -134,15 +161,24 @@ "name": "TupleStructType", "fields": [ { - "type": "usize" + "type": { + "primitive": "usize" + } }, { - "type": "String" + "type": { + "primitive": "string" + } } ] }, "generated": false, - "insignificance": 1000 + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": true + } }, "ladfile_builder::test::UnitType": { "identifier": "UnitType", @@ -154,13 +190,19 @@ "name": "UnitType" }, "generated": false, - "insignificance": 1000 + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": true + } } }, "functions": { "::hello_world": { "namespace": null, "identifier": "hello_world", + "overload_index": null, "arguments": [ { "kind": { @@ -173,11 +215,15 @@ "kind": { "primitive": "usize" } + }, + "metadata": { + "is_operator": false } }, "ladfile_builder::test::GenericStructType::hello_world": { "namespace": "ladfile_builder::test::GenericStructType", "identifier": "hello_world", + "overload_index": null, "arguments": [ { "kind": { @@ -218,11 +264,15 @@ }, "documentation": "I am some docs for the return type, I provide a name for the return value too", "name": "return" + }, + "metadata": { + "is_operator": false } }, "ladfile_builder::test::PlainStructType::plain_struct_function": { "namespace": "ladfile_builder::test::PlainStructType", "identifier": "plain_struct_function", + "overload_index": null, "arguments": [ { "kind": { @@ -239,106 +289,12 @@ "kind": { "unknown": "ladfile_builder::test::PlainStructType" } + }, + "metadata": { + "is_operator": false } } }, - "primitives": { - "DynamicFunction": { - "kind": "dynamicFunction", - "documentation": "A callable dynamic function" - }, - "DynamicFunctionMut": { - "kind": "dynamicFunctionMut", - "documentation": "A stateful and callable dynamic function" - }, - "FunctionCallContext": { - "kind": "functionCallContext", - "documentation": "Function call context, if accepted by a function, means the function can access the world in arbitrary ways." - }, - "OsString": { - "kind": "osString", - "documentation": "A heap allocated OS string" - }, - "PathBuf": { - "kind": "pathBuf", - "documentation": "A heap allocated file path" - }, - "ReflectReference": { - "kind": "reflectReference", - "documentation": "A reference to a reflectable type" - }, - "String": { - "kind": "string", - "documentation": "A heap allocated string" - }, - "bool": { - "kind": "bool", - "documentation": "A boolean value" - }, - "char": { - "kind": "char", - "documentation": "An 8-bit character" - }, - "f32": { - "kind": "f32", - "documentation": "A 32-bit floating point number" - }, - "f64": { - "kind": "f64", - "documentation": "A 64-bit floating point number" - }, - "i128": { - "kind": "i128", - "documentation": "A signed 128-bit integer" - }, - "i16": { - "kind": "i16", - "documentation": "A signed 16-bit integer" - }, - "i32": { - "kind": "i32", - "documentation": "A signed 32-bit integer" - }, - "i64": { - "kind": "i64", - "documentation": "A signed 64-bit integer" - }, - "i8": { - "kind": "i8", - "documentation": "A signed 8-bit integer" - }, - "isize": { - "kind": "isize", - "documentation": "A signed pointer-sized integer" - }, - "str": { - "kind": "str", - "documentation": "A string slice" - }, - "u128": { - "kind": "u128", - "documentation": "An unsigned 128-bit integer" - }, - "u16": { - "kind": "u16", - "documentation": "An unsigned 16-bit integer" - }, - "u32": { - "kind": "u32", - "documentation": "An unsigned 32-bit integer" - }, - "u64": { - "kind": "u64", - "documentation": "An unsigned 64-bit integer" - }, - "u8": { - "kind": "u8", - "documentation": "An unsigned 8-bit integer" - }, - "usize": { - "kind": "usize", - "documentation": "An unsigned pointer-sized integer" - } - }, + "primitives": {}, "description": "## Hello gentlemen\n I am markdown file.\n - hello\n - world" } \ No newline at end of file diff --git a/crates/ladfile_builder/Cargo.toml b/crates/ladfile_builder/Cargo.toml index 39ed50bd5f..6cae7fb72d 100644 --- a/crates/ladfile_builder/Cargo.toml +++ b/crates/ladfile_builder/Cargo.toml @@ -18,6 +18,7 @@ bevy_platform = { workspace = true, default-features = false, features = [] } bevy_log = { workspace = true, default-features = false, features = [] } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } +bevy_mod_scripting_bindings_domain = { workspace = true } bevy_reflect = { workspace = true, features = ["documentation"] } ladfile = { workspace = true } regex = { workspace = true } diff --git a/crates/ladfile_builder/src/lib.rs b/crates/ladfile_builder/src/lib.rs index 813381e1d4..e0ef72a231 100644 --- a/crates/ladfile_builder/src/lib.rs +++ b/crates/ladfile_builder/src/lib.rs @@ -1,21 +1,13 @@ //! Parsing definitions for the LAD (Language Agnostic Decleration) file format. pub mod plugin; -use std::{ - any::TypeId, - borrow::Cow, - cmp::{max, min}, - ffi::OsString, - path::PathBuf, -}; - use bevy_ecs::{ reflect::{ReflectComponent, ReflectResource}, world::World, }; use bevy_log::warn; use bevy_mod_scripting_bindings::{ - MarkAsCore, MarkAsGenerated, MarkAsSignificant, ReflectReference, + MarkAsCore, MarkAsGenerated, MarkAsSignificant, ReflectReference, ScriptValue, docgen::{ TypedThrough, info::FunctionInfo, @@ -25,44 +17,106 @@ use bevy_mod_scripting_bindings::{ namespace::Namespace, script_function::{DynamicScriptFunction, DynamicScriptFunctionMut, FunctionCallContext}, }, - match_by_type, + into_through_type_info, }; +pub use bevy_mod_scripting_bindings_domain::*; // re-export the thing we use use bevy_platform::collections::{HashMap, HashSet}; use bevy_reflect::{NamedField, TypeInfo, TypeRegistry, Typed, UnnamedField}; use ladfile::*; +use std::{ + any::TypeId, + borrow::Cow, + cmp::{max, min}, + ffi::OsString, + path::PathBuf, +}; /// We can assume that the types here will be either primitives /// or reflect types, as the rest will be covered by typed wrappers /// so just check -fn primitive_from_type_id(type_id: TypeId) -> Option { - match_by_type!(match type_id { - i: bool => return Some(LadBMSPrimitiveKind::Bool), - i: isize => return Some(LadBMSPrimitiveKind::Isize), - i: i8 => return Some(LadBMSPrimitiveKind::I8), - i: i16 => return Some(LadBMSPrimitiveKind::I16), - i: i32 => return Some(LadBMSPrimitiveKind::I32), - i: i64 => return Some(LadBMSPrimitiveKind::I64), - i: i128 => return Some(LadBMSPrimitiveKind::I128), - i: usize => return Some(LadBMSPrimitiveKind::Usize), - i: u8 => return Some(LadBMSPrimitiveKind::U8), - i: u16 => return Some(LadBMSPrimitiveKind::U16), - i: u32 => return Some(LadBMSPrimitiveKind::U32), - i: u64 => return Some(LadBMSPrimitiveKind::U64), - i: u128 => return Some(LadBMSPrimitiveKind::U128), - i: f32 => return Some(LadBMSPrimitiveKind::F32), - i: f64 => return Some(LadBMSPrimitiveKind::F64), - i: char => return Some(LadBMSPrimitiveKind::Char), - i: &'static str => return Some(LadBMSPrimitiveKind::Str), - i: str => return Some(LadBMSPrimitiveKind::Str), - i: String => return Some(LadBMSPrimitiveKind::String), - i: OsString => return Some(LadBMSPrimitiveKind::OsString), - i: PathBuf => return Some(LadBMSPrimitiveKind::PathBuf), - i: FunctionCallContext => return Some(LadBMSPrimitiveKind::FunctionCallContext), - i: DynamicScriptFunction => return Some(LadBMSPrimitiveKind::DynamicFunction), - i: DynamicScriptFunctionMut => return Some(LadBMSPrimitiveKind::DynamicFunctionMut), - i: ReflectReference => return Some(LadBMSPrimitiveKind::ReflectReference) - }); - None +fn primitive_from_type_id(type_id: TypeId) -> Option { + Some(if type_id == TypeId::of::() { + ReflectionPrimitiveKind::Bool + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::Isize + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::I8 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::I16 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::I32 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::I64 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::I128 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::Usize + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::U8 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::U16 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::U32 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::U64 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::U128 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::F32 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::F64 + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::Char + } else if type_id == TypeId::of::<&'static str>() { + ReflectionPrimitiveKind::Str + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::String + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::OsString + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::PathBuf + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::FunctionCallContext + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::DynamicFunction + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::DynamicFunctionMut + } else if type_id == TypeId::of::() { + ReflectionPrimitiveKind::ReflectReference + } else { + return None; + }) +} + +fn type_id_from_primitive(kind: &ReflectionPrimitiveKind) -> Option { + Some(match kind { + ReflectionPrimitiveKind::Bool => TypeId::of::(), + ReflectionPrimitiveKind::Isize => TypeId::of::(), + ReflectionPrimitiveKind::I8 => TypeId::of::(), + ReflectionPrimitiveKind::I16 => TypeId::of::(), + ReflectionPrimitiveKind::I32 => TypeId::of::(), + ReflectionPrimitiveKind::I64 => TypeId::of::(), + ReflectionPrimitiveKind::I128 => TypeId::of::(), + ReflectionPrimitiveKind::Usize => TypeId::of::(), + ReflectionPrimitiveKind::U8 => TypeId::of::(), + ReflectionPrimitiveKind::U16 => TypeId::of::(), + ReflectionPrimitiveKind::U32 => TypeId::of::(), + ReflectionPrimitiveKind::U64 => TypeId::of::(), + ReflectionPrimitiveKind::U128 => TypeId::of::(), + ReflectionPrimitiveKind::F32 => TypeId::of::(), + ReflectionPrimitiveKind::F64 => TypeId::of::(), + ReflectionPrimitiveKind::Char => TypeId::of::(), + ReflectionPrimitiveKind::Str => TypeId::of::<&'static str>(), + ReflectionPrimitiveKind::String => TypeId::of::(), + ReflectionPrimitiveKind::OsString => TypeId::of::(), + ReflectionPrimitiveKind::PathBuf => TypeId::of::(), + ReflectionPrimitiveKind::FunctionCallContext => TypeId::of::(), + ReflectionPrimitiveKind::DynamicFunction => TypeId::of::(), + ReflectionPrimitiveKind::DynamicFunctionMut => TypeId::of::(), + ReflectionPrimitiveKind::ReflectReference => TypeId::of::(), + ReflectionPrimitiveKind::ScriptValue => TypeId::of::(), + ReflectionPrimitiveKind::External(_) => return None, + }) } /// A builder for constructing LAD files. @@ -89,33 +143,35 @@ impl<'t> LadFileBuilder<'t> { /// Create a new LAD file builder loaded with primitives. pub fn new(type_registry: &'t TypeRegistry) -> Self { + use ReflectionPrimitiveKind::*; let mut builder = Self::new_empty(type_registry); builder - .add_bms_primitive::("A boolean value") - .add_bms_primitive::("A signed pointer-sized integer") - .add_bms_primitive::("A signed 8-bit integer") - .add_bms_primitive::("A signed 16-bit integer") - .add_bms_primitive::("A signed 32-bit integer") - .add_bms_primitive::("A signed 64-bit integer") - .add_bms_primitive::("A signed 128-bit integer") - .add_bms_primitive::("An unsigned pointer-sized integer") - .add_bms_primitive::("An unsigned 8-bit integer") - .add_bms_primitive::("An unsigned 16-bit integer") - .add_bms_primitive::("An unsigned 32-bit integer") - .add_bms_primitive::("An unsigned 64-bit integer") - .add_bms_primitive::("An unsigned 128-bit integer") - .add_bms_primitive::("A 32-bit floating point number") - .add_bms_primitive::("A 64-bit floating point number") - .add_bms_primitive::("An 8-bit character") - .add_bms_primitive::<&'static str>("A string slice") - .add_bms_primitive::("A heap allocated string") - .add_bms_primitive::("A heap allocated OS string") - .add_bms_primitive::("A heap allocated file path") - .add_bms_primitive::("Function call context, if accepted by a function, means the function can access the world in arbitrary ways.") - .add_bms_primitive::("A callable dynamic function") - .add_bms_primitive::("A stateful and callable dynamic function") - .add_bms_primitive::("A reference to a reflectable type"); + .add_bms_primitive(Bool,"A boolean value") + .add_bms_primitive(Isize, "A signed pointer-sized integer") + .add_bms_primitive(I8, "A signed 8-bit integer") + .add_bms_primitive(I16, "A signed 16-bit integer") + .add_bms_primitive(I32, "A signed 32-bit integer") + .add_bms_primitive(I64, "A signed 64-bit integer") + .add_bms_primitive(I128, "A signed 128-bit integer") + .add_bms_primitive(Usize, "An unsigned pointer-sized integer") + .add_bms_primitive(U8, "An unsigned 8-bit integer") + .add_bms_primitive(U16, "An unsigned 16-bit integer") + .add_bms_primitive(U32, "An unsigned 32-bit integer") + .add_bms_primitive(U64, "An unsigned 64-bit integer") + .add_bms_primitive(U128, "An unsigned 128-bit integer") + .add_bms_primitive(F32, "A 32-bit floating point number") + .add_bms_primitive(F64, "A 64-bit floating point number") + .add_bms_primitive(Char, "An 8-bit character") + .add_bms_primitive(Str, "A string slice") + .add_bms_primitive(String, "A heap allocated string") + .add_bms_primitive(OsString, "A heap allocated OS string") + .add_bms_primitive(PathBuf, "A heap allocated file path") + .add_bms_primitive(FunctionCallContext, "Function call context, if accepted by a function, means the function can access the world in arbitrary ways.") + .add_bms_primitive(DynamicFunction, "A callable dynamic function") + .add_bms_primitive(DynamicFunctionMut, "A stateful and callable dynamic function") + .add_bms_primitive(ScriptValue, "A value representing the union of all representable values") + .add_bms_primitive(ReflectReference, "A reference to a reflectable type"); builder } @@ -135,20 +191,35 @@ impl<'t> LadFileBuilder<'t> { /// Add a BMS primitive to the LAD file. /// Will do nothing if the type is not a BMS primitive. - pub fn add_bms_primitive( + pub fn add_bms_primitive( &mut self, + primitive: ReflectionPrimitiveKind, docs: impl Into>, ) -> &mut Self { - let type_id = self.lad_id_from_type_id(TypeId::of::()); - let kind = match primitive_from_type_id(TypeId::of::()) { - Some(primitive) => primitive, - None => return self, - }; - self.file.primitives.insert( - type_id, - LadBMSPrimitiveType { - kind, - documentation: docs.into(), + let type_ident = primitive.to_string(); + let lad_type_id = LadTypeId::new_string_id(type_ident.clone().into()); + if let Some(type_id) = type_id_from_primitive(&primitive) { + self.type_id_mapping.insert(type_id, lad_type_id.clone()); + } + self.file.types.insert( + lad_type_id, + LadTypeDefinition { + identifier: type_ident.clone(), + crate_: None, + path: type_ident, + generics: vec![], + documentation: Some(docs.into().to_string()), + associated_functions: vec![], + layout: LadTypeLayout::Opaque, + generated: false, + insignificance: default_importance(), + metadata: LadTypeMetadata { + is_component: false, + is_resource: false, + is_reflect: false, + mapped_to_primitive_kind: Some(primitive), + misc: Default::default(), + }, }, ); self @@ -220,7 +291,7 @@ impl<'t> LadFileBuilder<'t> { &mut self, key: impl Into>, is_static: bool, - type_kind: LadTypeKind, + type_kind: LadFieldOrVariableKind, ) -> &mut Self { self.file.globals.insert( key.into(), @@ -248,7 +319,7 @@ impl<'t> LadFileBuilder<'t> { let lad_type_id = self.lad_id_from_type_id(std::any::TypeId::of::()); self.file.types.insert( lad_type_id, - LadType { + LadTypeDefinition { identifier, crate_: crate_.map(|s| s.to_owned()), path, @@ -262,6 +333,7 @@ impl<'t> LadFileBuilder<'t> { is_component: false, is_resource: false, is_reflect: false, + mapped_to_primitive_kind: primitive_from_type_id(std::any::TypeId::of::()), misc: Default::default(), }, }, @@ -306,7 +378,7 @@ impl<'t> LadFileBuilder<'t> { } let type_id = self.lad_id_from_type_id(type_info.type_id()); - let lad_type = LadType { + let lad_type = LadTypeDefinition { identifier: type_info .type_path_table() .ident() @@ -334,6 +406,7 @@ impl<'t> LadFileBuilder<'t> { is_component, is_resource, is_reflect, + mapped_to_primitive_kind: primitive_from_type_id(type_info.type_id()), misc: Default::default(), }, }; @@ -360,6 +433,9 @@ impl<'t> LadFileBuilder<'t> { self.add_through_type_info(til); self.add_through_type_info(tir); } + TypedWrapperKind::HashSet(t) => { + self.add_through_type_info(t); + } TypedWrapperKind::Array(ti, _) => { self.add_through_type_info(ti); } @@ -378,6 +454,7 @@ impl<'t> LadFileBuilder<'t> { ThroughTypeInfo::TypeInfo(type_info) => { self.add_type_info(type_info); } + ThroughTypeInfo::Primitive(_) => {} } self @@ -404,9 +481,22 @@ impl<'t> LadFileBuilder<'t> { let (main_docstring, arg_docstrings, return_docstring) = Self::split_docstring(function_info.docs.as_ref().unwrap_or(&default_docstring)); + let mut identifier = function_info.name.as_ref(); + let mut overload_index = None; + if identifier.contains("-") { + let mut parts = identifier.split("-"); + if let Some(less_overload) = parts.next() { + identifier = less_overload; + } + if let Some(number) = parts.next() { + overload_index = number.parse::().ok() + } + } + let function_id = self.lad_function_id_from_info(function_info); let lad_function = LadFunction { - identifier: function_info.name.clone(), + identifier: identifier.to_owned().into(), + overload_index, arguments: function_info .arg_info .clone() @@ -414,7 +504,9 @@ impl<'t> LadFileBuilder<'t> { .map(|arg| { let kind = match &arg.type_info { Some(through_type) => self.lad_type_kind_from_through_type(through_type), - None => LadTypeKind::Unknown(self.lad_id_from_type_id(arg.type_id)), + None => { + LadFieldOrVariableKind::Unknown(self.lad_id_from_type_id(arg.type_id)) + } }; LadArgument { kind, @@ -435,7 +527,7 @@ impl<'t> LadFileBuilder<'t> { .clone() .map(|info| self.lad_type_kind_from_through_type(&info)) .unwrap_or_else(|| { - LadTypeKind::Unknown( + LadFieldOrVariableKind::Unknown( self.lad_id_from_type_id(function_info.return_info.type_id), ) }), @@ -447,6 +539,10 @@ impl<'t> LadFileBuilder<'t> { LadFunctionNamespace::Type(self.lad_id_from_type_id(type_id)) } }, + metadata: LadFunctionMetadata { + is_operator: ScriptOperatorNames::parse(identifier).is_some(), + misc: Default::default(), + }, }; self.file.functions.insert(function_id, lad_function); self @@ -554,7 +650,6 @@ impl<'t> LadFileBuilder<'t> { }); file.functions.sort_keys(); - file.primitives.sort_keys(); } file @@ -697,7 +792,7 @@ impl<'t> LadFileBuilder<'t> { fields: fields .map(|field| LadNamedField { name: field.name().to_string(), - type_: self.lad_id_from_type_id(field.type_id()), + type_: self.lad_type_kind_from_type_id(field.type_id()), }) .collect(), } @@ -712,7 +807,7 @@ impl<'t> LadFileBuilder<'t> { name, fields: fields .map(|field| LadField { - type_: self.lad_id_from_type_id(field.type_id()), + type_: self.lad_type_kind_from_type_id(field.type_id()), }) .collect(), } @@ -768,6 +863,18 @@ impl<'t> LadFileBuilder<'t> { } } + /// Should only be used on fields, as those are never going to contain + /// untyped structures, i.e. are going to be fully reflectable + fn lad_type_kind_from_type_id(&mut self, type_id: TypeId) -> LadFieldOrVariableKind { + if let Some(type_info) = self.type_registry.get_type_info(type_id) { + let through_type_info = into_through_type_info(type_info); + self.lad_type_kind_from_through_type(&through_type_info) + } else { + LadFieldOrVariableKind::Unknown(self.lad_id_from_type_id(type_id)) + } + } + + /// Figures out whether the type is a primitive or not and creates the right type id fn lad_id_from_type_id(&mut self, type_id: TypeId) -> LadTypeId { // a special exception if type_id == std::any::TypeId::of::() { @@ -779,7 +886,7 @@ impl<'t> LadFileBuilder<'t> { } let new_id = match primitive_from_type_id(type_id) { - Some(primitive) => primitive.lad_type_id(), + Some(primitive) => LadTypeId::new_string_id(primitive.to_string().into()), None => { if let Some(info) = self.type_registry.get_type_info(type_id) { LadTypeId::new_string_id(info.type_path_table().path().into()) @@ -804,7 +911,10 @@ impl<'t> LadFileBuilder<'t> { LadFunctionId::new_string_id(format!("{}::{}", namespace_string, function_info.name)) } - fn lad_type_kind_from_through_type(&mut self, through_type: &ThroughTypeInfo) -> LadTypeKind { + fn lad_type_kind_from_through_type( + &mut self, + through_type: &ThroughTypeInfo, + ) -> LadFieldOrVariableKind { match through_type { ThroughTypeInfo::UntypedWrapper { through_type, @@ -812,36 +922,41 @@ impl<'t> LadFileBuilder<'t> { .. } => match wrapper_kind { UntypedWrapperKind::Ref => { - LadTypeKind::Ref(self.lad_id_from_type_id(through_type.type_id())) + LadFieldOrVariableKind::Ref(self.lad_id_from_type_id(through_type.type_id())) } UntypedWrapperKind::Mut => { - LadTypeKind::Mut(self.lad_id_from_type_id(through_type.type_id())) + LadFieldOrVariableKind::Mut(self.lad_id_from_type_id(through_type.type_id())) } UntypedWrapperKind::Val => { - LadTypeKind::Val(self.lad_id_from_type_id(through_type.type_id())) + LadFieldOrVariableKind::Val(self.lad_id_from_type_id(through_type.type_id())) } }, ThroughTypeInfo::TypedWrapper(typed_wrapper_kind) => match typed_wrapper_kind { - TypedWrapperKind::Vec(through_type_info) => LadTypeKind::Vec(Box::new( + TypedWrapperKind::Vec(through_type_info) => LadFieldOrVariableKind::Vec(Box::new( self.lad_type_kind_from_through_type(through_type_info), )), TypedWrapperKind::HashMap(through_type_info, through_type_info1) => { - LadTypeKind::HashMap( + LadFieldOrVariableKind::HashMap( Box::new(self.lad_type_kind_from_through_type(through_type_info)), Box::new(self.lad_type_kind_from_through_type(through_type_info1)), ) } - TypedWrapperKind::Array(through_type_info, size) => LadTypeKind::Array( + TypedWrapperKind::HashSet(through_type_info) => LadFieldOrVariableKind::HashSet( + Box::new(self.lad_type_kind_from_through_type(through_type_info)), + ), + TypedWrapperKind::Array(through_type_info, size) => LadFieldOrVariableKind::Array( Box::new(self.lad_type_kind_from_through_type(through_type_info)), *size, ), - TypedWrapperKind::Option(through_type_info) => LadTypeKind::Option(Box::new( - self.lad_type_kind_from_through_type(through_type_info), - )), - TypedWrapperKind::InteropResult(through_type_info) => LadTypeKind::InteropResult( + TypedWrapperKind::Option(through_type_info) => LadFieldOrVariableKind::Option( Box::new(self.lad_type_kind_from_through_type(through_type_info)), ), - TypedWrapperKind::Tuple(through_type_infos) => LadTypeKind::Tuple( + TypedWrapperKind::InteropResult(through_type_info) => { + LadFieldOrVariableKind::InteropResult(Box::new( + self.lad_type_kind_from_through_type(through_type_info), + )) + } + TypedWrapperKind::Tuple(through_type_infos) => LadFieldOrVariableKind::Tuple( through_type_infos .iter() .map(|through_type_info| { @@ -849,7 +964,7 @@ impl<'t> LadFileBuilder<'t> { }) .collect(), ), - TypedWrapperKind::Union(through_type_infos) => LadTypeKind::Union( + TypedWrapperKind::Union(through_type_infos) => LadFieldOrVariableKind::Union( through_type_infos .iter() .map(|through_type_info| { @@ -860,10 +975,15 @@ impl<'t> LadFileBuilder<'t> { }, ThroughTypeInfo::TypeInfo(type_info) => { match primitive_from_type_id(type_info.type_id()) { - Some(primitive) => LadTypeKind::Primitive(primitive), - None => LadTypeKind::Unknown(self.lad_id_from_type_id(type_info.type_id())), + Some(primitive) => LadFieldOrVariableKind::Primitive(primitive), + None => LadFieldOrVariableKind::Unknown( + self.lad_id_from_type_id(type_info.type_id()), + ), } } + ThroughTypeInfo::Primitive(reflection_primitive_kind) => { + LadFieldOrVariableKind::Primitive(reflection_primitive_kind.clone()) + } } } } @@ -1079,9 +1199,6 @@ mod test { ); } - /// Set to true to put output into test_assets. - const BLESS_TEST_FILE: bool = false; - #[test] fn test_serializes_as_expected() { let mut type_registry = TypeRegistry::default(); @@ -1208,7 +1325,7 @@ mod test { normalize_file(&mut serialized); - if BLESS_TEST_FILE { + if std::env::var("BLESS_MODE").is_ok() { let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap(); let path_to_test_assets = std::path::Path::new(&manifest_dir) .join("..") diff --git a/crates/ladfile_builder/src/plugin.rs b/crates/ladfile_builder/src/plugin.rs index 80f5e6e897..b907186cf9 100644 --- a/crates/ladfile_builder/src/plugin.rs +++ b/crates/ladfile_builder/src/plugin.rs @@ -11,8 +11,9 @@ use bevy_mod_scripting_bindings::{ DummyScriptFunctionRegistry, IntoNamespace, function::{namespace::Namespace, script_function::AppScriptFunctionRegistry}, globals::AppScriptGlobalsRegistry, + into_through_type_info, }; -use ladfile::{LadTypeKind, default_importance}; +use ladfile::{LadFieldOrVariableKind, default_importance}; use crate::LadFileBuilder; @@ -115,7 +116,10 @@ pub fn generate_lad_file( continue; } - builder.add_type_info(type_info); + // we don't really care about the Option in Option as that is magically worked around in the entire API + // get the "pure" types + let through_type_info = into_through_type_info(type_info); + builder.add_through_type_info(&through_type_info); // find functions on the namespace for (_, function) in function_registry @@ -146,7 +150,7 @@ pub fn generate_lad_file( builder.add_through_type_info(type_info); builder.lad_type_kind_from_through_type(type_info) } else { - LadTypeKind::Val(builder.lad_id_from_type_id(global.type_id)) + LadFieldOrVariableKind::Val(builder.lad_id_from_type_id(global.type_id)) }; builder.add_instance_manually(key.to_string(), false, kind); diff --git a/crates/languages/bevy_mod_scripting_lua/Cargo.toml b/crates/languages/bevy_mod_scripting_lua/Cargo.toml index 7740b36ac4..97641ce03e 100644 --- a/crates/languages/bevy_mod_scripting_lua/Cargo.toml +++ b/crates/languages/bevy_mod_scripting_lua/Cargo.toml @@ -45,6 +45,7 @@ bevy_platform = { workspace = true, default-features = false, features = [] } bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_display = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } +bevy_mod_scripting_bindings_domain = { workspace = true } bevy_mod_scripting_asset = { workspace = true } bevy_mod_scripting_script = { workspace = true } mlua = { workspace = true, features = ["vendored", "send", "macros"] } diff --git a/crates/languages/bevy_mod_scripting_lua/src/bindings/reference.rs b/crates/languages/bevy_mod_scripting_lua/src/bindings/reference.rs index e501e47183..d2cc9737f6 100644 --- a/crates/languages/bevy_mod_scripting_lua/src/bindings/reference.rs +++ b/crates/languages/bevy_mod_scripting_lua/src/bindings/reference.rs @@ -3,6 +3,7 @@ use std::any::TypeId; use bevy_mod_scripting_bindings::{ ReflectReference, ThreadWorldContainer, error::InteropError, script_value::ScriptValue, }; +use bevy_mod_scripting_bindings_domain::ScriptOperatorNames; use bevy_mod_scripting_display::OrFakeId; use mlua::{ExternalError, MetaMethod, UserData, UserDataMethods}; @@ -115,7 +116,12 @@ impl UserData for LuaReflectReference { .or_fake_id(); let args = vec![ScriptValue::Reference(self_), other]; let out = world - .try_call_overloads(target_type_id, "sub", args, LUA_CALLER_CONTEXT) + .try_call_overloads( + target_type_id, + ScriptOperatorNames::Subtraction.script_function_name(), + args, + LUA_CALLER_CONTEXT, + ) .map_err(IntoMluaError::to_lua_error)?; Ok(LuaScriptValue(out)) }, @@ -137,7 +143,12 @@ impl UserData for LuaReflectReference { .or_fake_id(); let args = vec![ScriptValue::Reference(self_), other]; let out = world - .try_call_overloads(target_type_id, "add", args, LUA_CALLER_CONTEXT) + .try_call_overloads( + target_type_id, + ScriptOperatorNames::Addition.script_function_name(), + args, + LUA_CALLER_CONTEXT, + ) .map_err(IntoMluaError::to_lua_error)?; Ok(LuaScriptValue(out)) }, @@ -159,7 +170,12 @@ impl UserData for LuaReflectReference { .or_fake_id(); let args = vec![ScriptValue::Reference(self_), other]; let out = world - .try_call_overloads(target_type_id, "mul", args, LUA_CALLER_CONTEXT) + .try_call_overloads( + target_type_id, + ScriptOperatorNames::Multiplication.script_function_name(), + args, + LUA_CALLER_CONTEXT, + ) .map_err(IntoMluaError::to_lua_error)?; Ok(LuaScriptValue(out)) }, @@ -181,7 +197,12 @@ impl UserData for LuaReflectReference { .or_fake_id(); let args = vec![ScriptValue::Reference(self_), other]; let out = world - .try_call_overloads(target_type_id, "div", args, LUA_CALLER_CONTEXT) + .try_call_overloads( + target_type_id, + ScriptOperatorNames::Division.script_function_name(), + args, + LUA_CALLER_CONTEXT, + ) .map_err(IntoMluaError::to_lua_error)?; Ok(LuaScriptValue(out)) }, @@ -203,7 +224,12 @@ impl UserData for LuaReflectReference { .or_fake_id(); let args = vec![ScriptValue::Reference(self_), other]; let out = world - .try_call_overloads(target_type_id, "rem", args, LUA_CALLER_CONTEXT) + .try_call_overloads( + target_type_id, + ScriptOperatorNames::Remainder.script_function_name(), + args, + LUA_CALLER_CONTEXT, + ) .map_err(IntoMluaError::to_lua_error)?; Ok(LuaScriptValue(out)) }, @@ -222,7 +248,12 @@ impl UserData for LuaReflectReference { .or_fake_id(); let args = vec![ScriptValue::Reference(self_)]; let out = world - .try_call_overloads(target_type_id, "neg", args, LUA_CALLER_CONTEXT) + .try_call_overloads( + target_type_id, + ScriptOperatorNames::Negation.script_function_name(), + args, + LUA_CALLER_CONTEXT, + ) .map_err(IntoMluaError::to_lua_error)?; Ok(LuaScriptValue(out)) }); @@ -243,7 +274,12 @@ impl UserData for LuaReflectReference { .or_fake_id(); let args = vec![ScriptValue::Reference(self_), other]; let out = world - .try_call_overloads(target_type_id, "pow", args, LUA_CALLER_CONTEXT) + .try_call_overloads( + target_type_id, + ScriptOperatorNames::Exponentiation.script_function_name(), + args, + LUA_CALLER_CONTEXT, + ) .map_err(IntoMluaError::to_lua_error)?; Ok(LuaScriptValue(out)) }, @@ -265,7 +301,12 @@ impl UserData for LuaReflectReference { .or_fake_id(); let args = vec![ScriptValue::Reference(self_), other]; let out = world - .try_call_overloads(target_type_id, "eq", args, LUA_CALLER_CONTEXT) + .try_call_overloads( + target_type_id, + ScriptOperatorNames::Equality.script_function_name(), + args, + LUA_CALLER_CONTEXT, + ) .map_err(IntoMluaError::to_lua_error)?; Ok(LuaScriptValue(out)) }, @@ -287,7 +328,12 @@ impl UserData for LuaReflectReference { .or_fake_id(); let args = vec![ScriptValue::Reference(self_), other]; let out = world - .try_call_overloads(target_type_id, "lt", args, LUA_CALLER_CONTEXT) + .try_call_overloads( + target_type_id, + ScriptOperatorNames::LessThanComparison.script_function_name(), + args, + LUA_CALLER_CONTEXT, + ) .map_err(IntoMluaError::to_lua_error)?; Ok(LuaScriptValue(out)) }, @@ -323,7 +369,10 @@ impl UserData for LuaReflectReference { .world; let iter_func = world - .lookup_function([TypeId::of::()], "iter") + .lookup_function( + [TypeId::of::()], + ScriptOperatorNames::Iteration.script_function_name(), + ) .map_err(|f| { InteropError::missing_function( f, @@ -349,7 +398,10 @@ impl UserData for LuaReflectReference { let reflect_reference: ReflectReference = self_.into(); let func = world - .lookup_function([TypeId::of::()], "display") + .lookup_function( + [TypeId::of::()], + ScriptOperatorNames::DisplayPrint.script_function_name(), + ) .map_err(|f| { InteropError::missing_function( f, diff --git a/src/lib.rs b/src/lib.rs index 51abdb5713..f7a3adcdae 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,7 @@ pub mod display { pub mod bindings { pub use bevy_mod_scripting_bindings::*; + pub use bevy_mod_scripting_bindings_domain::*; } pub mod core { From ebcf63a5f7ed12d25100c085911724029e7e73ea Mon Sep 17 00:00:00 2001 From: makspll Date: Tue, 4 Nov 2025 08:01:10 +0000 Subject: [PATCH 11/20] filter correctly --- .gitignore | 1 + assets/definitions/bindings.lua | 26435 ---------------- .../src/convert.rs | 20 +- crates/ladfile/src/lib.rs | 8 +- 4 files changed, 25 insertions(+), 26439 deletions(-) delete mode 100644 assets/definitions/bindings.lua diff --git a/.gitignore b/.gitignore index b8efa21749..339ec1b6e4 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ assets/scripts/tlconfig.lua /assets/**/*.lad.json /docs/src/ladfiles/*.lad.json +/assets/**/bindings.lua \ No newline at end of file diff --git a/assets/definitions/bindings.lua b/assets/definitions/bindings.lua deleted file mode 100644 index dafefcb241..0000000000 --- a/assets/definitions/bindings.lua +++ /dev/null @@ -1,26435 +0,0 @@ ----@meta ----@module "World" - ----@class World : ReflectReference ---- The ECS world containing all Components, Resources and Systems. Main point of interaction with a Bevy App. -World = {} - ----@return ScriptQueryBuilder -function World.query() end - ----@param e Entity ----@return boolean -function World.has_entity(e) end - ----@param entity Entity ----@param registration ScriptComponentRegistration ---- The resource to add. ----@return nil -function World.add_default_component(entity,registration) end - ----@param handle_reference ReflectReference ----@return boolean -function World.has_asset(handle_reference) end - ----@param entity Entity ---- The entity to retrieve the parent of. ----@return Entity | nil -function World.get_parent(entity) end - ----@param registration ScriptResourceRegistration ---- The registration of the resource to check for. ----@return boolean -function World.has_resource(registration) end - ----@param entity Entity ---- The entity to retrieve the component from. ----@param registration ScriptComponentRegistration ---- The component to retrieve. ----@return ReflectReference | nil -function World.get_component(entity,registration) end - ----@param entity Entity ---- The entity to check. ----@param registration ScriptComponentRegistration ---- The component to check for. ----@return boolean -function World.has_component(entity,registration) end - ----@param entity Entity ---- The entity to despawn. ----@return nil -function World.despawn(entity) end - ----@param entity Entity ---- The parent entity to receive children ----@param index integer ---- The index to insert the children at ----@param children Entity[] ---- The children entities to insert ----@return nil -function World.insert_children(entity,index,children) end - ----@return nil -function World.exit() end - ----@param entity Entity ---- The entity to insert the component into. ----@param registration ScriptComponentRegistration ---- The component registration of the component to insert. ----@param value ReflectReference ---- The value of the component to insert. Can be constructed using `construct` ----@return nil -function World.insert_component(entity,registration,value) end - ----@param name string ---- The name of the component type ----@return ScriptComponentRegistration -function World.register_new_component(name) end - ----@param registration ScriptResourceRegistration ---- The resource to remove. ----@return nil -function World.remove_resource(registration) end - ----@param entity Entity ---- The entity to remove the component from. ----@param registration ScriptComponentRegistration ---- The component to remove. ----@return nil -function World.remove_component(entity,registration) end - ----@param entity Entity ---- The entity to despawn the descendants of. ----@return nil -function World.despawn_descendants(entity) end - ----@param handle_reference ReflectReference ---- The handle to the asset (as a reflect reference). ----@param registration ScriptTypeRegistration ---- The type registration of the asset type. ----@return ReflectReference | nil -function World.get_asset(handle_reference,registration) end - ----@param registration ScriptResourceRegistration ---- The registration of the resource to retrieve. ----@return ReflectReference | nil -function World.get_resource(registration) end - ----@param entity Entity ---- The entity to despawn recursively. ----@return nil -function World.despawn_recursive(entity) end - ----@param entity Entity ---- The parent entity to receive children ----@param children Entity[] ---- The children entities to push ----@return nil -function World.push_children(entity,children) end - ----@param name string ---- The name of the schedule to retrieve. ----@return ReflectSchedule | nil -function World.get_schedule_by_name(name) end - ----@param entity Entity ---- The entity to retrieve the children of. ----@return Entity[] -function World.get_children(entity) end - ----@param type_name string ---- The name of the type to retrieve. ----@return ScriptTypeRegistration | ScriptComponentRegistration | ScriptResourceRegistration | nil -function World.get_type_by_name(type_name) end - ----@param schedule ReflectSchedule ---- The schedule to add the system to. ----@param builder ScriptSystemBuilder ---- The system builder specifying the system and its dependencies. ----@return ReflectSystem -function World.add_system(schedule,builder) end - ----@return Entity -function World.spawn() end - - ----@class ReflectReference : ReflectReference ---- A reference to an arbitrary reflected instance. ---- ---- The reference can point to either the ECS, or to the allocator. ---- ---- References are composed of two parts: ---- - The base kind, which specifies where the reference points to ---- - The path, which specifies how to access the value from the base. ---- ---- Bindings defined on this type, apply to ALL references. -ReflectReference = {} - ----@param reference ReflectReference ---- The reference to remove the value from. ----@param key any ---- The key to remove the value at. ----@return any -function ReflectReference.remove(reference,key) end - ----@param reference ReflectReference ---- The reference to clear. ----@return nil -function ReflectReference.clear(reference) end - ----@param reference ReflectReference ---- The reference to pop the value from. ----@return any -function ReflectReference.pop(reference) end - ----@param reference ReflectReference ---- The reference to index into. ----@param key any ---- The key to index with. ----@return any | nil -function ReflectReference.map_get(reference,key) end - ----@param reference ReflectReference ---- The reference to get the variant name of. ----@return string | nil -function ReflectReference.variant_name(reference) end - ----@param reference ReflectReference ---- The reference to get the length of. ----@return integer | nil -function ReflectReference.len(reference) end - ----@param reference ReflectReference ---- The reference to insert the value into. ----@param key any ---- The index to insert the value at. ----@param value any ---- The value to insert. ----@return nil -function ReflectReference.insert(reference,key,value) end - ----@param reference ReflectReference ---- The reference to list the functions of. ----@return FunctionInfo[] -function ReflectReference.functions(reference) end - ----@param reference ReflectReference ---- The reference to iterate over. ----@return function -function ReflectReference.iter(reference) end - ----@param reference ReflectReference ---- The reference to display. ----@return string -function ReflectReference.debug(reference) end - ----@param reference ReflectReference ---- The reference to display. ----@return string -function ReflectReference.display(reference) end - ----@param reference ReflectReference ---- The reference to push the value into. ----@param value any ---- The value to push. ----@return nil -function ReflectReference.push(reference,value) end - - ----@class ScriptComponentRegistration : ReflectReference ---- A reference to a component type's reflection registration. ---- ---- In general think of this as a handle to a type. ---- ---- Not to be confused with script registered dynamic components, although this can point to a script registered component. ----@field registration ? ScriptTypeRegistration ----@field component_id ? ComponentId ----@field is_dynamic_script_component ? boolean -ScriptComponentRegistration = {} - ----@param registration ScriptComponentRegistration ---- The type registration. ----@return string -function ScriptComponentRegistration:type_name(registration) end - ----@param registration ScriptComponentRegistration ---- The type registration. ----@return string -function ScriptComponentRegistration:short_name(registration) end - - ----@class ScriptQueryBuilder : ReflectReference ---- The query builder is used to build ECS queries which retrieve spefific components filtered by specific conditions. ---- ---- For example: ---- ```rust,ignore ---- builder.component(componentA) ---- .component(componentB) ---- .with(componentC) ---- .without(componentD) ---- ``` ---- ---- Will retrieve entities which: ---- - Have componentA ---- - Have componentB ---- - Have componentC ---- - Do not have componentD ---- ---- As well as references to components: ---- - componentA ---- - componentB -ScriptQueryBuilder = {} - ----@param query ScriptQueryBuilder ---- The query to add the component to ----@param without ScriptComponentRegistration ----@return ScriptQueryBuilder -function ScriptQueryBuilder:without(query,without) end - ----@param query ScriptQueryBuilder ---- The query to add the component to ----@param components ScriptComponentRegistration ----@return ScriptQueryBuilder -function ScriptQueryBuilder:component(query,components) end - ----@param query ScriptQueryBuilder ---- The query to build. ----@return ScriptQueryResult[] -function ScriptQueryBuilder.build(query) end - ----@param query ScriptQueryBuilder ---- The query to add the component to ----@param with ScriptComponentRegistration ----@return ScriptQueryBuilder -function ScriptQueryBuilder:with(query,with) end - - ----@class ScriptQueryResult : ReflectReference ---- A result from a query. -ScriptQueryResult = {} - ----@param query ScriptQueryResult ---- The query result to retrieve the entity from. ----@return Entity -function ScriptQueryResult:entity(query) end - ----@param query ScriptQueryResult ---- The query result to retrieve the components from. ----@return ReflectReference[] -function ScriptQueryResult:components(query) end - - ----@class ScriptResourceRegistration : ReflectReference ---- A reference to a resource type's reflection registration. ---- ---- In general think of this as a handle to a type. ----@field registration ? ScriptTypeRegistration ----@field resource_id ? ComponentId -ScriptResourceRegistration = {} - ----@param registration ScriptResourceRegistration ---- The type registration. ----@return string -function ScriptResourceRegistration:short_name(registration) end - ----@param registration ScriptResourceRegistration ---- The type registration. ----@return string -function ScriptResourceRegistration:type_name(registration) end - - ----@class ScriptTypeRegistration : ReflectReference ---- A reference to a type which is not a `Resource` or `Component`. ---- ---- In general think of this as a handle to a type. -ScriptTypeRegistration = {} - ----@param registration ScriptTypeRegistration ---- The type registration. ----@return string -function ScriptTypeRegistration:short_name(registration) end - ----@param registration ScriptTypeRegistration ---- The type registration. ----@return string -function ScriptTypeRegistration:type_name(registration) end - - ----@class ScriptSystemBuilder : ReflectReference ---- A builder for systems living in scripts -ScriptSystemBuilder = {} - ----@param builder ScriptSystemBuilder ---- The system builder to add the resource to. ----@param resource ScriptResourceRegistration ---- The resource to add. ----@return ScriptSystemBuilder -function ScriptSystemBuilder:resource(builder,resource) end - ----@param builder ScriptSystemBuilder ---- The system builder to add the query to. ----@param query ScriptQueryBuilder ---- The query to add. ----@return ScriptSystemBuilder -function ScriptSystemBuilder:query(builder,query) end - ----@param builder ScriptSystemBuilder ---- The system builder to add the dependency to. ----@param system ReflectSystem ---- The system to run before. ----@return ScriptSystemBuilder -function ScriptSystemBuilder:before(builder,system) end - ----@param builder ScriptSystemBuilder ---- The system builder to add the dependency to. ----@param system ReflectSystem ---- The system to run after. ----@return ScriptSystemBuilder -function ScriptSystemBuilder:after(builder,system) end - ----@param builder ScriptSystemBuilder ---- The system builder to make exclusive. ----@return ScriptSystemBuilder -function ScriptSystemBuilder:exclusive(builder) end - - ----@class ScriptAttachment : ReflectReference ---- Specifies a unique attachment of a script. These attachments are mapped to [`bevy_mod_scripting_core::ContextKey`]'s depending on the context policy used. -ScriptAttachment = {} - ----@param script Handle ---- The script asset to create the attachment from. ----@return ScriptAttachment -function ScriptAttachment.new_static_script(script) end - ----@param entity Entity ---- The entity to attach the script to. ----@param script Handle ---- The script asset to attach to the entity. ----@return ScriptAttachment -function ScriptAttachment.new_entity_script(entity,script) end - - ----@class ReflectSchedule : ReflectReference ---- A reflectable schedule. ----@field type_path ? string ----@field label ? ReflectableScheduleLabel -ReflectSchedule = {} - ----@param schedule ReflectSchedule ---- The schedule to retrieve the systems from. ----@return ReflectSystem[] -function ReflectSchedule.systems(schedule) end - ----@param schedule ReflectSchedule ---- The schedule to retrieve the system from. ----@param name string ---- The identifier or full path of the system to retrieve. ----@return ReflectSystem | nil -function ReflectSchedule.get_system_by_name(schedule,name) end - ----@param schedule ReflectSchedule ---- The schedule to render. ----@return string -function ReflectSchedule.render_dot(schedule) end - - ----@class ReflectSystem : ReflectReference ---- A reflectable system. -ReflectSystem = {} - ----@param system ReflectSystem ---- The system to retrieve the identifier from. ----@return string -function ReflectSystem:identifier(system) end - ----@param system ReflectSystem ---- The system to retrieve the path from. ----@return string -function ReflectSystem:path(system) end - - ----@class Color : ReflectReference ---- An enumerated type that can represent any of the color types in this crate. ---- ---- This is useful when you need to store a color in a data structure that can't be generic over ---- the color type. ----
----
---- ---- # Operations ---- ---- [`Color`] supports all the standard color operations, such as [mixing](Mix), ---- [luminance](Luminance) and [hue](Hue) adjustment, ---- and [diffing](EuclideanDistance). These operations delegate to the concrete color space contained ---- by [`Color`], but will convert to [`Oklch`](Oklcha) for operations which aren't supported in the ---- current space. After performing the operation, if a conversion was required, the result will be ---- converted back into the original color space. ---- ---- ```rust ---- # use bevy_color::{Hue, Color}; ---- let red_hsv = Color::hsv(0., 1., 1.); ---- let red_srgb = Color::srgb(1., 0., 0.); ---- ---- // HSV has a definition of hue, so it will be returned. ---- red_hsv.hue(); ---- ---- // SRGB doesn't have a native definition for hue. ---- // Converts to Oklch and returns that result. ---- red_srgb.hue(); ---- ``` ---- ---- [`Oklch`](Oklcha) has been chosen as the intermediary space in cases where conversion is required ---- due to its perceptual uniformity and broad support for Bevy's color operations. ---- To avoid the cost of repeated conversion, and ensure consistent results where that is desired, ---- first convert this [`Color`] into your desired color space. -Color = {} - ----@param _self Color ----@return LinearRgba -function Color:to_linear(_self) end - ----@param lightness number ---- Lightness channel. [0.0, 1.5] ----@param chroma number ---- Chroma channel. [0.0, 1.5] ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Color -function Color.lcha(lightness,chroma,hue,alpha) end - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param saturation number ---- Saturation channel. [0.0, 1.0] ----@param value number ---- Value channel. [0.0, 1.0] ----@return Color -function Color.hsv(hue,saturation,value) end - ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@param chroma number ---- Chroma channel. [0.0, 1.0] ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Color -function Color.oklcha(lightness,chroma,hue,alpha) end - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param whiteness number ---- Whiteness channel. [0.0, 1.0] ----@param blackness number ---- Blackness channel. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Color -function Color.hwba(hue,whiteness,blackness,alpha) end - ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@param a number ---- Green-red channel. [-1.0, 1.0] ----@param b number ---- Blue-yellow channel. [-1.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Color -function Color.oklaba(lightness,a,b,alpha) end - ----@param lightness number ---- Lightness channel. [0.0, 1.5] ----@param a number ---- a axis. [-1.5, 1.5] ----@param b number ---- b axis. [-1.5, 1.5] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Color -function Color.laba(lightness,a,b,alpha) end - ----@param _self Color ----@return Srgba -function Color:to_srgba(_self) end - ----@param red number ---- Red channel. [0.0, 1.0] ----@param green number ---- Green channel. [0.0, 1.0] ----@param blue number ---- Blue channel. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Color -function Color.srgba(red,green,blue,alpha) end - ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@param a number ---- Green-red channel. [-1.0, 1.0] ----@param b number ---- Blue-yellow channel. [-1.0, 1.0] ----@return Color -function Color.oklab(lightness,a,b) end - ----@param x number ---- x-axis. [0.0, 1.0] ----@param y number ---- y-axis. [0.0, 1.0] ----@param z number ---- z-axis. [0.0, 1.0] ----@return Color -function Color.xyz(x,y,z) end - ----@param red number ---- Red channel. [0.0, 1.0] ----@param green number ---- Green channel. [0.0, 1.0] ----@param blue number ---- Blue channel. [0.0, 1.0] ----@return Color -function Color.srgb(red,green,blue) end - ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@param chroma number ---- Chroma channel. [0.0, 1.0] ----@param hue number ---- Hue channel. [0.0, 360.0] ----@return Color -function Color.oklch(lightness,chroma,hue) end - ----@param red number ---- Red channel. [0.0, 1.0] ----@param green number ---- Green channel. [0.0, 1.0] ----@param blue number ---- Blue channel. [0.0, 1.0] ----@return Color -function Color.linear_rgb(red,green,blue) end - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param whiteness number ---- Whiteness channel. [0.0, 1.0] ----@param blackness number ---- Blackness channel. [0.0, 1.0] ----@return Color -function Color.hwb(hue,whiteness,blackness) end - ----@param red integer ---- Red channel. [0, 255] ----@param green integer ---- Green channel. [0, 255] ----@param blue integer ---- Blue channel. [0, 255] ----@return Color -function Color.srgb_u8(red,green,blue) end - ----@param _self Color ----@return Color -function Color:clone(_self) end - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param saturation number ---- Saturation channel. [0.0, 1.0] ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Color -function Color.hsla(hue,saturation,lightness,alpha) end - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param saturation number ---- Saturation channel. [0.0, 1.0] ----@param value number ---- Value channel. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Color -function Color.hsva(hue,saturation,value,alpha) end - ----@param _self Color ----@param other Color ----@return boolean -function Color:eq(_self,other) end - ----@param lightness number ---- Lightness channel. [0.0, 1.5] ----@param a number ---- a axis. [-1.5, 1.5] ----@param b number ---- b axis. [-1.5, 1.5] ----@return Color -function Color.lab(lightness,a,b) end - ----@param lightness number ---- Lightness channel. [0.0, 1.5] ----@param chroma number ---- Chroma channel. [0.0, 1.5] ----@param hue number ---- Hue channel. [0.0, 360.0] ----@return Color -function Color.lch(lightness,chroma,hue) end - ----@param x number ---- x-axis. [0.0, 1.0] ----@param y number ---- y-axis. [0.0, 1.0] ----@param z number ---- z-axis. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Color -function Color.xyza(x,y,z,alpha) end - ----@param red number ---- Red channel. [0.0, 1.0] ----@param green number ---- Green channel. [0.0, 1.0] ----@param blue number ---- Blue channel. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Color -function Color.linear_rgba(red,green,blue,alpha) end - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param saturation number ---- Saturation channel. [0.0, 1.0] ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@return Color -function Color.hsl(hue,saturation,lightness) end - ----@param red integer ---- Red channel. [0, 255] ----@param green integer ---- Green channel. [0, 255] ----@param blue integer ---- Blue channel. [0, 255] ----@param alpha integer ---- Alpha channel. [0, 255] ----@return Color -function Color.srgba_u8(red,green,blue,alpha) end - ----@param array number[] ---- Red, Green and Blue channels. Each channel is in the range [0.0, 1.0] ----@return Color -function Color.srgb_from_array(array) end - - ----@class Hsla : ReflectReference ---- Color in Hue-Saturation-Lightness (HSL) color space with alpha. ---- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV). ----
----
----@field hue ? number ----@field saturation ? number ----@field lightness ? number ----@field alpha ? number -Hsla = {} - ----@param _self Hsla ----@param lightness number ----@return Hsla -function Hsla:with_lightness(_self,lightness) end - ----@param _self Hsla ----@return Hsla -function Hsla:clone(_self) end - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param saturation number ---- Saturation channel. [0.0, 1.0] ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Hsla -function Hsla.new(hue,saturation,lightness,alpha) end - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param saturation number ---- Saturation channel. [0.0, 1.0] ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@return Hsla -function Hsla.hsl(hue,saturation,lightness) end - ----@param _self Hsla ----@param saturation number ----@return Hsla -function Hsla:with_saturation(_self,saturation) end - ----@param index integer ----@return Hsla -function Hsla.sequential_dispersed(index) end - ----@param _self Hsla ----@param other Hsla ----@return boolean -function Hsla:eq(_self,other) end - - ----@class Hsva : ReflectReference ---- Color in Hue-Saturation-Value (HSV) color space with alpha. ---- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HSL_and_HSV). ----
----
----@field hue ? number ----@field saturation ? number ----@field value ? number ----@field alpha ? number -Hsva = {} - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param saturation number ---- Saturation channel. [0.0, 1.0] ----@param value number ---- Value channel. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Hsva -function Hsva.new(hue,saturation,value,alpha) end - ----@param _self Hsva ----@param value number ----@return Hsva -function Hsva:with_value(_self,value) end - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param saturation number ---- Saturation channel. [0.0, 1.0] ----@param value number ---- Value channel. [0.0, 1.0] ----@return Hsva -function Hsva.hsv(hue,saturation,value) end - ----@param _self Hsva ----@return Hsva -function Hsva:clone(_self) end - ----@param _self Hsva ----@param other Hsva ----@return boolean -function Hsva:eq(_self,other) end - ----@param _self Hsva ----@param saturation number ----@return Hsva -function Hsva:with_saturation(_self,saturation) end - - ----@class Hwba : ReflectReference ---- Color in Hue-Whiteness-Blackness (HWB) color space with alpha. ---- Further information on this color model can be found on [Wikipedia](https://en.wikipedia.org/wiki/HWB_color_model). ----
----
----@field hue ? number ----@field whiteness ? number ----@field blackness ? number ----@field alpha ? number -Hwba = {} - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param whiteness number ---- Whiteness channel. [0.0, 1.0] ----@param blackness number ---- Blackness channel. [0.0, 1.0] ----@return Hwba -function Hwba.hwb(hue,whiteness,blackness) end - ----@param _self Hwba ----@param blackness number ----@return Hwba -function Hwba:with_blackness(_self,blackness) end - ----@param _self Hwba ----@return Hwba -function Hwba:clone(_self) end - ----@param _self Hwba ----@param other Hwba ----@return boolean -function Hwba:eq(_self,other) end - ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param whiteness number ---- Whiteness channel. [0.0, 1.0] ----@param blackness number ---- Blackness channel. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Hwba -function Hwba.new(hue,whiteness,blackness,alpha) end - ----@param _self Hwba ----@param whiteness number ----@return Hwba -function Hwba:with_whiteness(_self,whiteness) end - - ----@class Laba : ReflectReference ---- Color in LAB color space, with alpha ----
----
----@field lightness ? number ----@field a ? number ----@field b ? number ----@field alpha ? number -Laba = {} - ----@param _self Laba ----@return Laba -function Laba:neg(_self) end - ----@param lightness number ---- Lightness channel. [0.0, 1.5] ----@param a number ---- a axis. [-1.5, 1.5] ----@param b number ---- b axis. [-1.5, 1.5] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Laba -function Laba.new(lightness,a,b,alpha) end - ----@param _self Laba ----@param rhs number ----@return Laba -function Laba:div(_self,rhs) end - ----@param _self Laba ----@param rhs Laba ----@return Laba -function Laba:add(_self,rhs) end - ----@param _self Laba ----@param lightness number ----@return Laba -function Laba:with_lightness(_self,lightness) end - ----@param _self Laba ----@param rhs number ----@return Laba -function Laba:mul(_self,rhs) end - ----@param lightness number ---- Lightness channel. [0.0, 1.5] ----@param a number ---- a axis. [-1.5, 1.5] ----@param b number ---- b axis. [-1.5, 1.5] ----@return Laba -function Laba.lab(lightness,a,b) end - ----@param _self Laba ----@param other Laba ----@return boolean -function Laba:eq(_self,other) end - ----@param _self Laba ----@param rhs Laba ----@return Laba -function Laba:sub(_self,rhs) end - ----@param _self Laba ----@return Laba -function Laba:clone(_self) end - - ----@class Lcha : ReflectReference ---- Color in LCH color space, with alpha ----
----
----@field lightness ? number ----@field chroma ? number ----@field hue ? number ----@field alpha ? number -Lcha = {} - ----@param _self Lcha ----@param chroma number ----@return Lcha -function Lcha:with_chroma(_self,chroma) end - ----@param lightness number ---- Lightness channel. [0.0, 1.5] ----@param chroma number ---- Chroma channel. [0.0, 1.5] ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Lcha -function Lcha.new(lightness,chroma,hue,alpha) end - ----@param lightness number ---- Lightness channel. [0.0, 1.5] ----@param chroma number ---- Chroma channel. [0.0, 1.5] ----@param hue number ---- Hue channel. [0.0, 360.0] ----@return Lcha -function Lcha.lch(lightness,chroma,hue) end - ----@param _self Lcha ----@param other Lcha ----@return boolean -function Lcha:eq(_self,other) end - ----@param index integer ----@return Lcha -function Lcha.sequential_dispersed(index) end - ----@param _self Lcha ----@param lightness number ----@return Lcha -function Lcha:with_lightness(_self,lightness) end - ----@param _self Lcha ----@return Lcha -function Lcha:clone(_self) end - - ----@class LinearRgba : ReflectReference ---- Linear RGB color with alpha. ----
----
----@field red ? number ----@field green ? number ----@field blue ? number ----@field alpha ? number -LinearRgba = {} - ----@param _self LinearRgba ----@return integer -function LinearRgba:as_u32(_self) end - ----@param _self LinearRgba ----@param other LinearRgba ----@return boolean -function LinearRgba:eq(_self,other) end - ----@param red number ---- Red channel. [0.0, 1.0] ----@param green number ---- Green channel. [0.0, 1.0] ----@param blue number ---- Blue channel. [0.0, 1.0] ----@return LinearRgba -function LinearRgba.rgb(red,green,blue) end - ----@param _self LinearRgba ----@param rhs number ----@return LinearRgba -function LinearRgba:div(_self,rhs) end - ----@param red number ----@param green number ----@param blue number ----@param alpha number ----@return LinearRgba -function LinearRgba.new(red,green,blue,alpha) end - ----@param _self LinearRgba ----@param rhs LinearRgba ----@return LinearRgba -function LinearRgba:sub(_self,rhs) end - ----@param _self LinearRgba ----@return LinearRgba -function LinearRgba:clone(_self) end - ----@param _self LinearRgba ----@param rhs LinearRgba ----@return LinearRgba -function LinearRgba:add(_self,rhs) end - ----@param _self LinearRgba ----@param rhs number ----@return LinearRgba -function LinearRgba:mul(_self,rhs) end - ----@param _self LinearRgba ----@param red number ----@return LinearRgba -function LinearRgba:with_red(_self,red) end - ----@param _self LinearRgba ----@param green number ----@return LinearRgba -function LinearRgba:with_green(_self,green) end - ----@param _self LinearRgba ----@return LinearRgba -function LinearRgba:neg(_self) end - ----@param _self LinearRgba ----@param blue number ----@return LinearRgba -function LinearRgba:with_blue(_self,blue) end - - ----@class Oklaba : ReflectReference ---- Color in Oklab color space, with alpha ----
----
----@field lightness ? number ----@field a ? number ----@field b ? number ----@field alpha ? number -Oklaba = {} - ----@param _self Oklaba ----@param rhs Oklaba ----@return Oklaba -function Oklaba:sub(_self,rhs) end - ----@param _self Oklaba ----@return Oklaba -function Oklaba:neg(_self) end - ----@param _self Oklaba ----@param b number ----@return Oklaba -function Oklaba:with_b(_self,b) end - ----@param _self Oklaba ----@param rhs number ----@return Oklaba -function Oklaba:div(_self,rhs) end - ----@param _self Oklaba ----@return Oklaba -function Oklaba:clone(_self) end - ----@param _self Oklaba ----@param other Oklaba ----@return boolean -function Oklaba:eq(_self,other) end - ----@param _self Oklaba ----@param rhs Oklaba ----@return Oklaba -function Oklaba:add(_self,rhs) end - ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@param a number ---- Green-red channel. [-1.0, 1.0] ----@param b number ---- Blue-yellow channel. [-1.0, 1.0] ----@return Oklaba -function Oklaba.lab(lightness,a,b) end - ----@param _self Oklaba ----@param rhs number ----@return Oklaba -function Oklaba:mul(_self,rhs) end - ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@param a number ---- Green-red channel. [-1.0, 1.0] ----@param b number ---- Blue-yellow channel. [-1.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Oklaba -function Oklaba.new(lightness,a,b,alpha) end - ----@param _self Oklaba ----@param a number ----@return Oklaba -function Oklaba:with_a(_self,a) end - ----@param _self Oklaba ----@param lightness number ----@return Oklaba -function Oklaba:with_lightness(_self,lightness) end - - ----@class Oklcha : ReflectReference ---- Color in Oklch color space, with alpha ----
----
----@field lightness ? number ----@field chroma ? number ----@field hue ? number ----@field alpha ? number -Oklcha = {} - ----@param _self Oklcha ----@param lightness number ----@return Oklcha -function Oklcha:with_lightness(_self,lightness) end - ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@param chroma number ---- Chroma channel. [0.0, 1.0] ----@param hue number ---- Hue channel. [0.0, 360.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Oklcha -function Oklcha.new(lightness,chroma,hue,alpha) end - ----@param lightness number ---- Lightness channel. [0.0, 1.0] ----@param chroma number ---- Chroma channel. [0.0, 1.0] ----@param hue number ---- Hue channel. [0.0, 360.0] ----@return Oklcha -function Oklcha.lch(lightness,chroma,hue) end - ----@param _self Oklcha ----@return Oklcha -function Oklcha:clone(_self) end - ----@param index integer ----@return Oklcha -function Oklcha.sequential_dispersed(index) end - ----@param _self Oklcha ----@param other Oklcha ----@return boolean -function Oklcha:eq(_self,other) end - ----@param _self Oklcha ----@param chroma number ----@return Oklcha -function Oklcha:with_chroma(_self,chroma) end - - ----@class Srgba : ReflectReference ---- Non-linear standard RGB with alpha. ----
----
----@field red ? number ----@field green ? number ----@field blue ? number ----@field alpha ? number -Srgba = {} - ----@param _self Srgba ----@return Srgba -function Srgba:neg(_self) end - ----@param red number ---- Red channel. [0.0, 1.0] ----@param green number ---- Green channel. [0.0, 1.0] ----@param blue number ---- Blue channel. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Srgba -function Srgba.new(red,green,blue,alpha) end - ----@param _self Srgba ----@param rhs number ----@return Srgba -function Srgba:mul(_self,rhs) end - ----@param _self Srgba ----@param rhs Srgba ----@return Srgba -function Srgba:add(_self,rhs) end - ----@param r integer ---- Red channel. [0, 255] ----@param g integer ---- Green channel. [0, 255] ----@param b integer ---- Blue channel. [0, 255] ----@return Srgba -function Srgba.rgb_u8(r,g,b) end - ----@param _self Srgba ----@param rhs Srgba ----@return Srgba -function Srgba:sub(_self,rhs) end - ----@param red number ---- Red channel. [0.0, 1.0] ----@param green number ---- Green channel. [0.0, 1.0] ----@param blue number ---- Blue channel. [0.0, 1.0] ----@return Srgba -function Srgba.rgb(red,green,blue) end - ----@param _self Srgba ----@return Srgba -function Srgba:clone(_self) end - ----@param _self Srgba ----@param rhs number ----@return Srgba -function Srgba:div(_self,rhs) end - ----@param _self Srgba ----@param other Srgba ----@return boolean -function Srgba:eq(_self,other) end - ----@param _self Srgba ----@param green number ----@return Srgba -function Srgba:with_green(_self,green) end - ----@param r integer ---- Red channel. [0, 255] ----@param g integer ---- Green channel. [0, 255] ----@param b integer ---- Blue channel. [0, 255] ----@param a integer ---- Alpha channel. [0, 255] ----@return Srgba -function Srgba.rgba_u8(r,g,b,a) end - ----@param _self Srgba ----@param blue number ----@return Srgba -function Srgba:with_blue(_self,blue) end - ----@param _self Srgba ----@return string -function Srgba:to_hex(_self) end - ----@param value number ----@return number -function Srgba.gamma_function(value) end - ----@param _self Srgba ----@param red number ----@return Srgba -function Srgba:with_red(_self,red) end - ----@param value number ----@return number -function Srgba.gamma_function_inverse(value) end - - ----@class Xyza : ReflectReference ---- [CIE 1931](https://en.wikipedia.org/wiki/CIE_1931_color_space) color space, also known as XYZ, with an alpha channel. ----
----
----@field x ? number ----@field y ? number ----@field z ? number ----@field alpha ? number -Xyza = {} - ----@param _self Xyza ----@param rhs number ----@return Xyza -function Xyza:div(_self,rhs) end - ----@param x number ---- x-axis. [0.0, 1.0] ----@param y number ---- y-axis. [0.0, 1.0] ----@param z number ---- z-axis. [0.0, 1.0] ----@param alpha number ---- Alpha channel. [0.0, 1.0] ----@return Xyza -function Xyza.new(x,y,z,alpha) end - ----@param _self Xyza ----@param rhs number ----@return Xyza -function Xyza:mul(_self,rhs) end - ----@param _self Xyza ----@param x number ----@return Xyza -function Xyza:with_x(_self,x) end - ----@param _self Xyza ----@param rhs Xyza ----@return Xyza -function Xyza:sub(_self,rhs) end - ----@param x number ---- x-axis. [0.0, 1.0] ----@param y number ---- y-axis. [0.0, 1.0] ----@param z number ---- z-axis. [0.0, 1.0] ----@return Xyza -function Xyza.xyz(x,y,z) end - ----@param _self Xyza ----@return Xyza -function Xyza:neg(_self) end - ----@param _self Xyza ----@param other Xyza ----@return boolean -function Xyza:eq(_self,other) end - ----@param _self Xyza ----@return Xyza -function Xyza:clone(_self) end - ----@param _self Xyza ----@param y number ----@return Xyza -function Xyza:with_y(_self,y) end - ----@param _self Xyza ----@param z number ----@return Xyza -function Xyza:with_z(_self,z) end - ----@param _self Xyza ----@param rhs Xyza ----@return Xyza -function Xyza:add(_self,rhs) end - - ----@class AutoExposureCompensationCurve : ReflectReference ---- An auto exposure compensation curve. ---- This curve is used to map the average log luminance of a scene to an ---- exposure compensation value, to allow for fine control over the final exposure. ----@field min_log_lum ? number ----@field max_log_lum ? number ----@field min_compensation ? number ----@field max_compensation ? number ----@field lut ? [u8; 256] -AutoExposureCompensationCurve = {} - ----@param _self AutoExposureCompensationCurve ----@return AutoExposureCompensationCurve -function AutoExposureCompensationCurve:clone(_self) end - - ----@class AutoExposure : ReflectReference ---- Component that enables auto exposure for an HDR-enabled 2d or 3d camera. ---- ---- Auto exposure adjusts the exposure of the camera automatically to ---- simulate the human eye's ability to adapt to different lighting conditions. ---- ---- Bevy's implementation builds a 64 bin histogram of the scene's luminance, ---- and then adjusts the exposure so that the average brightness of the final ---- render will be middle gray. Because it's using a histogram, some details can ---- be selectively ignored or emphasized. Outliers like shadows and specular ---- highlights can be ignored, and certain areas can be given more (or less) ---- weight based on a mask. ---- ---- # Usage Notes ---- ---- **Auto Exposure requires compute shaders and is not compatible with WebGL2.** ----@field range ? RangeInclusive ----@field filter ? RangeInclusive ----@field speed_brighten ? number ----@field speed_darken ? number ----@field exponential_transition_distance ? number ----@field metering_mask ? Handle ----@field compensation_curve ? Handle -AutoExposure = {} - ----@param _self AutoExposure ----@return AutoExposure -function AutoExposure:clone(_self) end - - ----@class Bloom : ReflectReference ---- Applies a bloom effect to an HDR-enabled 2d or 3d camera. ---- ---- Bloom emulates an effect found in real cameras and the human eye, ---- causing halos to appear around very bright parts of the scene. ---- ---- See also . ---- ---- # Usage Notes ---- ---- **Bloom is currently not compatible with WebGL2.** ---- ---- Often used in conjunction with `bevy_pbr::StandardMaterial::emissive` for 3d meshes. ---- ---- Bloom is best used alongside a tonemapping function that desaturates bright colors, ---- such as [`crate::tonemapping::Tonemapping::TonyMcMapface`]. ---- ---- Bevy's implementation uses a parametric curve to blend between a set of ---- blurred (lower frequency) images generated from the camera's view. ---- See for a visualization of the parametric curve ---- used in Bevy as well as a visualization of the curve's respective scattering profile. ----@field intensity ? number ----@field low_frequency_boost ? number ----@field low_frequency_boost_curvature ? number ----@field high_pass_frequency ? number ----@field prefilter ? BloomPrefilter ----@field composite_mode ? BloomCompositeMode ----@field max_mip_dimension ? integer ----@field scale ? Vec2 -Bloom = {} - ----@param _self Bloom ----@return Bloom -function Bloom:clone(_self) end - - ----@class BloomCompositeMode : ReflectReference -BloomCompositeMode = {} - ----@param _self BloomCompositeMode ----@return nil -function BloomCompositeMode:assert_receiver_is_total_eq(_self) end - ----@param _self BloomCompositeMode ----@param other BloomCompositeMode ----@return boolean -function BloomCompositeMode:eq(_self,other) end - ----@param _self BloomCompositeMode ----@return BloomCompositeMode -function BloomCompositeMode:clone(_self) end - - ----@class BloomPrefilter : ReflectReference ---- Applies a threshold filter to the input image to extract the brightest ---- regions before blurring them and compositing back onto the original image. ---- These settings are useful when emulating the 1990s-2000s game look. ---- ---- # Considerations ---- * Changing these settings creates a physically inaccurate image ---- * Changing these settings makes it easy to make the final result look worse ---- * Non-default prefilter settings should be used in conjunction with [`BloomCompositeMode::Additive`] ----@field threshold ? number ----@field threshold_softness ? number -BloomPrefilter = {} - ----@param _self BloomPrefilter ----@return BloomPrefilter -function BloomPrefilter:clone(_self) end - - ----@class ContrastAdaptiveSharpening : ReflectReference ---- Applies a contrast adaptive sharpening (CAS) filter to the camera. ---- ---- CAS is usually used in combination with shader based anti-aliasing methods ---- such as FXAA or TAA to regain some of the lost detail from the blurring that they introduce. ---- ---- CAS is designed to adjust the amount of sharpening applied to different areas of an image ---- based on the local contrast. This can help avoid over-sharpening areas with high contrast ---- and under-sharpening areas with low contrast. ---- ---- To use this, add the [`ContrastAdaptiveSharpening`] component to a 2D or 3D camera. ----@field enabled ? boolean ----@field sharpening_strength ? number ----@field denoise ? boolean -ContrastAdaptiveSharpening = {} - ----@param _self ContrastAdaptiveSharpening ----@return ContrastAdaptiveSharpening -function ContrastAdaptiveSharpening:clone(_self) end - - ----@class DenoiseCas : ReflectReference ----@field [1] ? boolean -DenoiseCas = {} - ----@param _self DenoiseCas ----@return DenoiseCas -function DenoiseCas:clone(_self) end - - ----@class Camera2d : ReflectReference ---- A 2D camera component. Enables the 2D render graph for a [`Camera`]. -Camera2d = {} - ----@param _self Camera2d ----@return Camera2d -function Camera2d:clone(_self) end - - ----@class Camera3d : ReflectReference ---- A 3D camera component. Enables the main 3D render graph for a [`Camera`]. ---- ---- The camera coordinate space is right-handed X-right, Y-up, Z-back. ---- This means "forward" is -Z. ----@field depth_load_op ? Camera3dDepthLoadOp ----@field depth_texture_usages ? Camera3dDepthTextureUsage ----@field screen_space_specular_transmission_steps ? integer ----@field screen_space_specular_transmission_quality ? ScreenSpaceTransmissionQuality -Camera3d = {} - ----@param _self Camera3d ----@return Camera3d -function Camera3d:clone(_self) end - - ----@class Camera3dDepthLoadOp : ReflectReference ---- The depth clear operation to perform for the main 3d pass. -Camera3dDepthLoadOp = {} - ----@param _self Camera3dDepthLoadOp ----@return Camera3dDepthLoadOp -function Camera3dDepthLoadOp:clone(_self) end - - ----@class Camera3dDepthTextureUsage : ReflectReference ----@field [1] ? integer -Camera3dDepthTextureUsage = {} - ----@param _self Camera3dDepthTextureUsage ----@return Camera3dDepthTextureUsage -function Camera3dDepthTextureUsage:clone(_self) end - - ----@class ScreenSpaceTransmissionQuality : ReflectReference ---- The quality of the screen space transmission blur effect, applied to whatever's “behind” transmissive ---- objects when their `roughness` is greater than `0.0`. ---- ---- Higher qualities are more GPU-intensive. ---- ---- **Note:** You can get better-looking results at any quality level by enabling TAA. See: [`TemporalAntiAliasPlugin`](crate::experimental::taa::TemporalAntiAliasPlugin). -ScreenSpaceTransmissionQuality = {} - ----@param _self ScreenSpaceTransmissionQuality ----@return ScreenSpaceTransmissionQuality -function ScreenSpaceTransmissionQuality:clone(_self) end - ----@param _self ScreenSpaceTransmissionQuality ----@param other ScreenSpaceTransmissionQuality ----@return boolean -function ScreenSpaceTransmissionQuality:eq(_self,other) end - - ----@class DepthOfField : ReflectReference ---- A component that enables a [depth of field] postprocessing effect when attached to a [`Camera3d`], ---- simulating the focus of a camera lens. ---- ---- [depth of field]: https://en.wikipedia.org/wiki/Depth_of_field ----@field mode ? DepthOfFieldMode ----@field focal_distance ? number ----@field sensor_height ? number ----@field aperture_f_stops ? number ----@field max_circle_of_confusion_diameter ? number ----@field max_depth ? number -DepthOfField = {} - ----@param _self DepthOfField ----@return DepthOfField -function DepthOfField:clone(_self) end - - ----@class DepthOfFieldMode : ReflectReference ---- Controls the appearance of the effect. -DepthOfFieldMode = {} - ----@param _self DepthOfFieldMode ----@return DepthOfFieldMode -function DepthOfFieldMode:clone(_self) end - ----@param _self DepthOfFieldMode ----@param other DepthOfFieldMode ----@return boolean -function DepthOfFieldMode:eq(_self,other) end - - ----@class Fxaa : ReflectReference ---- A component for enabling Fast Approximate Anti-Aliasing (FXAA) ---- for a [`bevy_render::camera::Camera`]. ----@field enabled ? boolean ----@field edge_threshold ? Sensitivity ----@field edge_threshold_min ? Sensitivity -Fxaa = {} - ----@param _self Fxaa ----@return Fxaa -function Fxaa:clone(_self) end - - ----@class Sensitivity : ReflectReference -Sensitivity = {} - ----@param _self Sensitivity ----@return Sensitivity -function Sensitivity:clone(_self) end - ----@param _self Sensitivity ----@return nil -function Sensitivity:assert_receiver_is_total_eq(_self) end - ----@param _self Sensitivity ----@param other Sensitivity ----@return boolean -function Sensitivity:eq(_self,other) end - - ----@class MotionBlur : ReflectReference ---- A component that enables and configures motion blur when added to a camera. ---- ---- Motion blur is an effect that simulates how moving objects blur as they change position during ---- the exposure of film, a sensor, or an eyeball. ---- ---- Because rendering simulates discrete steps in time, we use per-pixel motion vectors to estimate ---- the path of objects between frames. This kind of implementation has some artifacts: ---- - Fast moving objects in front of a stationary object or when in front of empty space, will not ---- have their edges blurred. ---- - Transparent objects do not write to depth or motion vectors, so they cannot be blurred. ---- ---- Other approaches, such as *A Reconstruction Filter for Plausible Motion Blur* produce more ---- correct results, but are more expensive and complex, and have other kinds of artifacts. This ---- implementation is relatively inexpensive and effective. ---- ---- # Usage ---- ---- Add the [`MotionBlur`] component to a camera to enable and configure motion blur for that ---- camera. ---- ---- ``` ---- # use bevy_core_pipeline::{core_3d::Camera3d, motion_blur::MotionBlur}; ---- # use bevy_ecs::prelude::*; ---- # fn test(mut commands: Commands) { ---- commands.spawn(( ---- Camera3d::default(), ---- MotionBlur::default(), ---- )); ---- # } ---- ```` ----@field shutter_angle ? number ----@field samples ? integer -MotionBlur = {} - ----@param _self MotionBlur ----@return MotionBlur -function MotionBlur:clone(_self) end - - ----@class OrderIndependentTransparencySettings : ReflectReference ---- Used to identify which camera will use OIT to render transparent meshes ---- and to configure OIT. ----@field layer_count ? integer ----@field alpha_threshold ? number -OrderIndependentTransparencySettings = {} - ----@param _self OrderIndependentTransparencySettings ----@return OrderIndependentTransparencySettings -function OrderIndependentTransparencySettings:clone(_self) end - - ----@class ChromaticAberration : ReflectReference ---- Adds colored fringes to the edges of objects in the scene. ---- ---- [Chromatic aberration] simulates the effect when lenses fail to focus all ---- colors of light toward a single point. It causes rainbow-colored streaks to ---- appear, which are especially apparent on the edges of objects. Chromatic ---- aberration is commonly used for collision effects, especially in horror ---- games. ---- ---- Bevy's implementation is based on that of *Inside* ([Gjøl & Svendsen 2016]). ---- It's based on a customizable lookup texture, which allows for changing the ---- color pattern. By default, the color pattern is simply a 3×1 pixel texture ---- consisting of red, green, and blue, in that order, but you can change it to ---- any image in order to achieve different effects. ---- ---- [Chromatic aberration]: https://en.wikipedia.org/wiki/Chromatic_aberration ---- ---- [Gjøl & Svendsen 2016]: https://github.com/playdeadgames/publications/blob/master/INSIDE/rendering_inside_gdc2016.pdf ----@field color_lut ? Handle ----@field intensity ? number ----@field max_samples ? integer -ChromaticAberration = {} - ----@param _self ChromaticAberration ----@return ChromaticAberration -function ChromaticAberration:clone(_self) end - - ----@class DepthPrepass : ReflectReference ---- If added to a [`crate::prelude::Camera3d`] then depth values will be copied to a separate texture available to the main pass. -DepthPrepass = {} - ----@param _self DepthPrepass ----@return DepthPrepass -function DepthPrepass:clone(_self) end - - ----@class MotionVectorPrepass : ReflectReference ---- If added to a [`crate::prelude::Camera3d`] then screen space motion vectors will be copied to a separate texture available to the main pass. -MotionVectorPrepass = {} - ----@param _self MotionVectorPrepass ----@return MotionVectorPrepass -function MotionVectorPrepass:clone(_self) end - - ----@class NormalPrepass : ReflectReference ---- If added to a [`crate::prelude::Camera3d`] then vertex world normals will be copied to a separate texture available to the main pass. ---- Normals will have normal map textures already applied. -NormalPrepass = {} - ----@param _self NormalPrepass ----@return NormalPrepass -function NormalPrepass:clone(_self) end - - ----@class Skybox : ReflectReference ---- Adds a skybox to a 3D camera, based on a cubemap texture. ---- ---- Note that this component does not (currently) affect the scene's lighting. ---- To do so, use `EnvironmentMapLight` alongside this component. ---- ---- See also . ----@field image ? Handle ----@field brightness ? number ----@field rotation ? Quat -Skybox = {} - ----@param _self Skybox ----@return Skybox -function Skybox:clone(_self) end - - ----@class Smaa : ReflectReference ---- A component for enabling Subpixel Morphological Anti-Aliasing (SMAA) ---- for a [`bevy_render::camera::Camera`]. ----@field preset ? SmaaPreset -Smaa = {} - ----@param _self Smaa ----@return Smaa -function Smaa:clone(_self) end - - ----@class SmaaPreset : ReflectReference ---- A preset quality level for SMAA. ---- ---- Higher values are slower but result in a higher-quality image. ---- ---- The default value is *high*. -SmaaPreset = {} - ----@param _self SmaaPreset ----@return SmaaPreset -function SmaaPreset:clone(_self) end - ----@param _self SmaaPreset ----@return nil -function SmaaPreset:assert_receiver_is_total_eq(_self) end - ----@param _self SmaaPreset ----@param other SmaaPreset ----@return boolean -function SmaaPreset:eq(_self,other) end - - ----@class TemporalAntiAliasing : ReflectReference ---- Component to apply temporal anti-aliasing to a 3D perspective camera. ---- ---- Temporal anti-aliasing (TAA) is a form of image smoothing/filtering, like ---- multisample anti-aliasing (MSAA), or fast approximate anti-aliasing (FXAA). ---- TAA works by blending (averaging) each frame with the past few frames. ---- ---- # Tradeoffs ---- ---- Pros: ---- * Filters more types of aliasing than MSAA, such as textures and singular bright pixels (specular aliasing) ---- * Cost scales with screen/view resolution, unlike MSAA which scales with number of triangles ---- * Greatly increases the quality of stochastic rendering techniques such as SSAO, certain shadow map sampling methods, etc ---- ---- Cons: ---- * Chance of "ghosting" - ghostly trails left behind moving objects ---- * Thin geometry, lighting detail, or texture lines may flicker noisily or disappear ---- ---- Because TAA blends past frames with the current frame, when the frames differ too much ---- (such as with fast moving objects or camera cuts), ghosting artifacts may occur. ---- ---- Artifacts tend to be reduced at higher framerates and rendering resolution. ---- ---- # Usage Notes ---- ---- The [`TemporalAntiAliasPlugin`] must be added to your app. ---- Any camera with this component must also disable [`Msaa`] by setting it to [`Msaa::Off`]. ---- ---- [Currently](https://github.com/bevyengine/bevy/issues/8423), TAA cannot be used with [`bevy_render::camera::OrthographicProjection`]. ---- ---- TAA also does not work well with alpha-blended meshes, as it requires depth writing to determine motion. ---- ---- It is very important that correct motion vectors are written for everything on screen. ---- Failure to do so will lead to ghosting artifacts. For instance, if particle effects ---- are added using a third party library, the library must either: ---- ---- 1. Write particle motion vectors to the motion vectors prepass texture ---- 2. Render particles after TAA ---- ---- If no [`MipBias`] component is attached to the camera, TAA will add a `MipBias(-1.0)` component. ----@field reset ? boolean -TemporalAntiAliasing = {} - ----@param _self TemporalAntiAliasing ----@return TemporalAntiAliasing -function TemporalAntiAliasing:clone(_self) end - - ----@class DebandDither : ReflectReference ---- Enables a debanding shader that applies dithering to mitigate color banding in the final image for a given [`Camera`] entity. -DebandDither = {} - ----@param _self DebandDither ----@return DebandDither -function DebandDither:clone(_self) end - ----@param _self DebandDither ----@param other DebandDither ----@return boolean -function DebandDither:eq(_self,other) end - ----@param _self DebandDither ----@return nil -function DebandDither:assert_receiver_is_total_eq(_self) end - - ----@class Tonemapping : ReflectReference ---- Optionally enables a tonemapping shader that attempts to map linear input stimulus into a perceptually uniform image for a given [`Camera`] entity. -Tonemapping = {} - ----@param _self Tonemapping ----@return nil -function Tonemapping:assert_receiver_is_total_eq(_self) end - ----@param _self Tonemapping ----@return boolean -function Tonemapping:is_enabled(_self) end - ----@param _self Tonemapping ----@return Tonemapping -function Tonemapping:clone(_self) end - ----@param _self Tonemapping ----@param other Tonemapping ----@return boolean -function Tonemapping:eq(_self,other) end - - ----@class ComponentId : ReflectReference ---- A value which uniquely identifies the type of a [`Component`] or [`Resource`] within a ---- [`World`]. ---- ---- Each time a new `Component` type is registered within a `World` using ---- e.g. [`World::register_component`] or [`World::register_component_with_descriptor`] ---- or a Resource with e.g. [`World::init_resource`], ---- a corresponding `ComponentId` is created to track it. ---- ---- While the distinction between `ComponentId` and [`TypeId`] may seem superficial, breaking them ---- into two separate but related concepts allows components to exist outside of Rust's type system. ---- Each Rust type registered as a `Component` will have a corresponding `ComponentId`, but additional ---- `ComponentId`s may exist in a `World` to track components which cannot be ---- represented as Rust types for scripting or other advanced use-cases. ---- ---- A `ComponentId` is tightly coupled to its parent `World`. Attempting to use a `ComponentId` from ---- one `World` to access the metadata of a `Component` in a different `World` is undefined behavior ---- and must not be attempted. ---- ---- Given a type `T` which implements [`Component`], the `ComponentId` for `T` can be retrieved ---- from a `World` using [`World::component_id()`] or via [`Components::component_id()`]. Access ---- to the `ComponentId` for a [`Resource`] is available via [`Components::resource_id()`]. ----@field [1] ? integer -ComponentId = {} - ----@param index integer ----@return ComponentId -function ComponentId.new(index) end - ----@param _self ComponentId ----@return ComponentId -function ComponentId:clone(_self) end - ----@param _self ComponentId ----@return nil -function ComponentId:assert_receiver_is_total_eq(_self) end - ----@param _self ComponentId ----@return integer -function ComponentId:index(_self) end - ----@param _self ComponentId ----@param other ComponentId ----@return boolean -function ComponentId:eq(_self,other) end - - ----@class ComponentTicks : ReflectReference ---- Records when a component or resource was added and when it was last mutably dereferenced (or added). ----@field added ? Tick ----@field changed ? Tick -ComponentTicks = {} - ----@param _self ComponentTicks ----@return ComponentTicks -function ComponentTicks:clone(_self) end - ----@param _self ComponentTicks ----@param last_run Tick ----@param this_run Tick ----@return boolean -function ComponentTicks:is_changed(_self,last_run,this_run) end - ----@param change_tick Tick ----@return ComponentTicks -function ComponentTicks.new(change_tick) end - ----@param _self ComponentTicks ----@param last_run Tick ----@param this_run Tick ----@return boolean -function ComponentTicks:is_added(_self,last_run,this_run) end - ----@param _self ComponentTicks ----@param change_tick Tick ----@return nil -function ComponentTicks:set_changed(_self,change_tick) end - - ----@class Tick : ReflectReference ---- A value that tracks when a system ran relative to other systems. ---- This is used to power change detection. ---- ---- *Note* that a system that hasn't been run yet has a `Tick` of 0. ----@field tick ? integer -Tick = {} - ----@param _self Tick ----@return Tick -function Tick:clone(_self) end - ----@param _self Tick ----@return integer -function Tick:get(_self) end - ----@param _self Tick ----@param last_run Tick ----@param this_run Tick ----@return boolean -function Tick:is_newer_than(_self,last_run,this_run) end - ----@param tick integer ----@return Tick -function Tick.new(tick) end - ----@param _self Tick ----@param other Tick ----@return boolean -function Tick:eq(_self,other) end - ----@param _self Tick ----@return nil -function Tick:assert_receiver_is_total_eq(_self) end - ----@param _self Tick ----@param tick integer ----@return nil -function Tick:set(_self,tick) end - - ----@class Entity : ReflectReference ---- Lightweight identifier of an [entity](crate::entity). ---- ---- The identifier is implemented using a [generational index]: a combination of an index and a generation. ---- This allows fast insertion after data removal in an array while minimizing loss of spatial locality. ---- ---- These identifiers are only valid on the [`World`] it's sourced from. Attempting to use an `Entity` to ---- fetch entity components or metadata from a different world will either fail or return unexpected results. ---- ---- [generational index]: https://lucassardois.medium.com/generational-indices-guide-8e3c5f7fd594 ---- ---- # Stability warning ---- For all intents and purposes, `Entity` should be treated as an opaque identifier. The internal bit ---- representation is liable to change from release to release as are the behaviors or performance ---- characteristics of any of its trait implementations (i.e. `Ord`, `Hash`, etc.). This means that changes in ---- `Entity`'s representation, though made readable through various functions on the type, are not considered ---- breaking changes under [SemVer]. ---- ---- In particular, directly serializing with `Serialize` and `Deserialize` make zero guarantee of long ---- term wire format compatibility. Changes in behavior will cause serialized `Entity` values persisted ---- to long term storage (i.e. disk, databases, etc.) will fail to deserialize upon being updated. ---- ---- # Usage ---- ---- This data type is returned by iterating a `Query` that has `Entity` as part of its query fetch type parameter ([learn more]). ---- It can also be obtained by calling [`EntityCommands::id`] or [`EntityWorldMut::id`]. ---- ---- ``` ---- # use bevy_ecs::prelude::*; ---- # #[derive(Component)] ---- # struct SomeComponent; ---- fn setup(mut commands: Commands) { ---- // Calling `spawn` returns `EntityCommands`. ---- let entity = commands.spawn(SomeComponent).id(); ---- } ---- ---- fn exclusive_system(world: &mut World) { ---- // Calling `spawn` returns `EntityWorldMut`. ---- let entity = world.spawn(SomeComponent).id(); ---- } ---- # ---- # bevy_ecs::system::assert_is_system(setup); ---- # bevy_ecs::system::assert_is_system(exclusive_system); ---- ``` ---- ---- 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. ---- ---- ``` ---- # use bevy_ecs::prelude::*; ---- # ---- # #[derive(Component)] ---- # struct Expired; ---- # ---- fn dispose_expired_food(mut commands: Commands, query: Query>) { ---- for food_entity in &query { ---- commands.entity(food_entity).despawn(); ---- } ---- } ---- # ---- # bevy_ecs::system::assert_is_system(dispose_expired_food); ---- ``` ---- ---- [learn more]: crate::system::Query#entity-id-access ---- [`EntityCommands::id`]: crate::system::EntityCommands::id ---- [`EntityWorldMut::id`]: crate::world::EntityWorldMut::id ---- [`EntityCommands`]: crate::system::EntityCommands ---- [`Query::get`]: crate::system::Query::get ---- [`World`]: crate::world::World ---- [SemVer]: https://semver.org/ -Entity = {} - ----@param _self Entity ----@return integer -function Entity:generation(_self) end - ----@param index integer ----@return Entity -function Entity.from_raw(index) end - ----@param bits integer ----@return Entity -function Entity.from_bits(bits) end - ----@param _self Entity ----@return integer -function Entity:to_bits(_self) end - ----@param _self Entity ----@param other Entity ----@return boolean -function Entity:eq(_self,other) end - ----@param _self Entity ----@return Entity -function Entity:clone(_self) end - ----@param _self Entity ----@return integer -function Entity:index(_self) end - - ----@class EntityHash : ReflectReference ---- A [`BuildHasher`] that results in a [`EntityHasher`]. -EntityHash = {} - ----@param _self EntityHash ----@return EntityHash -function EntityHash:clone(_self) end - - ----@class EntityHashSet : ReflectReference ---- A [`HashSet`] pre-configured to use [`EntityHash`] hashing. ----@field [1] ? HashSet -EntityHashSet = {} - ----@param _self EntityHashSet ----@param other EntityHashSet ----@return boolean -function EntityHashSet:eq(_self,other) end - ----@param n integer ----@return EntityHashSet -function EntityHashSet.with_capacity(n) end - ----@return EntityHashSet -function EntityHashSet.new() end - ----@param _self EntityHashSet ----@return boolean -function EntityHashSet:is_empty(_self) end - ----@param _self EntityHashSet ----@return integer -function EntityHashSet:len(_self) end - ----@param _self EntityHashSet ----@return nil -function EntityHashSet:assert_receiver_is_total_eq(_self) end - ----@param _self EntityHashSet ----@return EntityHashSet -function EntityHashSet:clone(_self) end - - ----@class DefaultQueryFilters : ReflectReference ---- Default query filters work by excluding entities with certain components from most queries. ---- ---- If a query does not explicitly mention a given disabling component, it will not include entities with that component. ---- To be more precise, this checks if the query's [`FilteredAccess`] contains the component, ---- and if it does not, adds a [`Without`](crate::prelude::Without) filter for that component to the query. ---- ---- This resource is initialized in the [`World`] whenever a new world is created, ---- with the [`Disabled`] component as a disabling component. ---- ---- Note that you can remove default query filters by overwriting the [`DefaultQueryFilters`] resource. ---- This can be useful as a last resort escape hatch, but is liable to break compatibility with other libraries. ---- ---- See the [module docs](crate::entity_disabling) for more info. ---- ---- ---- # Warning ---- ---- Default query filters are a global setting that affects all queries in the [`World`], ---- and incur a small performance cost for each query. ---- ---- They can cause significant interoperability issues within the ecosystem, ---- as users must be aware of each disabling component in use. ---- ---- Think carefully about whether you need to use a new disabling component, ---- and clearly communicate their presence in any libraries you publish. ----@field disabling ? SmallVec -DefaultQueryFilters = {} - ----@param _self DefaultQueryFilters ----@param component_id ComponentId ----@return nil -function DefaultQueryFilters:register_disabling_component(_self,component_id) end - ----@return DefaultQueryFilters -function DefaultQueryFilters.empty() end - - ----@class Disabled : ReflectReference ---- A marker component for disabled entities. ---- ---- Semantically, this component is used to mark entities that are temporarily disabled (typically for gameplay reasons), ---- but will likely be re-enabled at some point. ---- ---- Like all disabling components, this only disables the entity itself, ---- not its children or other entities that reference it. ---- To disable an entire tree of entities, use [`EntityCommands::insert_recursive`](crate::prelude::EntityCommands::insert_recursive). ---- ---- Every [`World`] has a default query filter that excludes entities with this component, ---- registered in the [`DefaultQueryFilters`] resource. ---- See [the module docs] for more info. ---- ---- [the module docs]: crate::entity_disabling -Disabled = {} - ----@param _self Disabled ----@return Disabled -function Disabled:clone(_self) end - - ----@class ChildOf : ReflectReference ---- Stores the parent entity of this child entity with this component. ---- ---- This is a [`Relationship`] component, and creates the canonical ---- "parent / child" hierarchy. This is the "source of truth" component, and it pairs with ---- the [`Children`] [`RelationshipTarget`](crate::relationship::RelationshipTarget). ---- ---- This relationship should be used for things like: ---- ---- 1. Organizing entities in a scene ---- 2. Propagating configuration or data inherited from a parent, such as "visibility" or "world-space global transforms". ---- 3. Ensuring a hierarchy is despawned when an entity is despawned. ---- ---- [`ChildOf`] contains a single "target" [`Entity`]. When [`ChildOf`] is inserted on a "source" entity, ---- the "target" entity will automatically (and immediately, via a component hook) have a [`Children`] ---- component inserted, and the "source" entity will be added to that [`Children`] instance. ---- ---- If the [`ChildOf`] component is replaced with a different "target" entity, the old target's [`Children`] ---- will be automatically (and immediately, via a component hook) be updated to reflect that change. ---- ---- Likewise, when the [`ChildOf`] component is removed, the "source" entity will be removed from the old ---- target's [`Children`]. If this results in [`Children`] being empty, [`Children`] will be automatically removed. ---- ---- When a parent is despawned, all children (and their descendants) will _also_ be despawned. ---- ---- You can create parent-child relationships in a variety of ways. The most direct way is to insert a [`ChildOf`] component: ---- ---- ``` ---- # use bevy_ecs::prelude::*; ---- # let mut world = World::new(); ---- let root = world.spawn_empty().id(); ---- let child1 = world.spawn(ChildOf(root)).id(); ---- let child2 = world.spawn(ChildOf(root)).id(); ---- let grandchild = world.spawn(ChildOf(child1)).id(); ---- ---- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]); ---- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]); ---- ---- world.entity_mut(child2).remove::(); ---- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1]); ---- ---- world.entity_mut(root).despawn(); ---- assert!(world.get_entity(root).is_err()); ---- assert!(world.get_entity(child1).is_err()); ---- assert!(world.get_entity(grandchild).is_err()); ---- ``` ---- ---- However if you are spawning many children, you might want to use the [`EntityWorldMut::with_children`] helper instead: ---- ---- ``` ---- # use bevy_ecs::prelude::*; ---- # let mut world = World::new(); ---- let mut child1 = Entity::PLACEHOLDER; ---- let mut child2 = Entity::PLACEHOLDER; ---- let mut grandchild = Entity::PLACEHOLDER; ---- let root = world.spawn_empty().with_children(|p| { ---- child1 = p.spawn_empty().with_children(|p| { ---- grandchild = p.spawn_empty().id(); ---- }).id(); ---- child2 = p.spawn_empty().id(); ---- }).id(); ---- ---- assert_eq!(&**world.entity(root).get::().unwrap(), &[child1, child2]); ---- assert_eq!(&**world.entity(child1).get::().unwrap(), &[grandchild]); ---- ``` ---- ---- [`Relationship`]: crate::relationship::Relationship ----@field [1] ? Entity -ChildOf = {} - ----@param _self ChildOf ----@return ChildOf -function ChildOf:clone(_self) end - ----@param _self ChildOf ----@return Entity -function ChildOf:get(_self) end - ----@param _self ChildOf ----@return nil -function ChildOf:assert_receiver_is_total_eq(_self) end - ----@param _self ChildOf ----@param other ChildOf ----@return boolean -function ChildOf:eq(_self,other) end - ----@param _self ChildOf ----@return Entity -function ChildOf:parent(_self) end - - ----@class Children : ReflectReference ---- Tracks which entities are children of this parent entity. ---- ---- A [`RelationshipTarget`] collection component that is populated ---- with entities that "target" this entity with the [`ChildOf`] [`Relationship`] component. ---- ---- Together, these components form the "canonical parent-child hierarchy". See the [`ChildOf`] component for the full ---- description of this relationship and instructions on how to use it. ---- ---- # Usage ---- ---- Like all [`RelationshipTarget`] components, this data should not be directly manipulated to avoid desynchronization. ---- Instead, modify the [`ChildOf`] components on the "source" entities. ---- ---- To access the children of an entity, you can iterate over the [`Children`] component, ---- using the [`IntoIterator`] trait. ---- For more complex access patterns, see the [`RelationshipTarget`] trait. ---- ---- [`Relationship`]: crate::relationship::Relationship ---- [`RelationshipTarget`]: crate::relationship::RelationshipTarget ----@field [1] ? Vec -Children = {} - ----@param _self Children ----@param other Children ----@return boolean -function Children:eq(_self,other) end - ----@param _self Children ----@return nil -function Children:assert_receiver_is_total_eq(_self) end - ----@param _self Children ----@param a_index integer ----@param b_index integer ----@return nil -function Children:swap(_self,a_index,b_index) end - - ----@class Identifier : ReflectReference ---- A unified identifier for all entity and similar IDs. ---- ---- Has the same size as a `u64` integer, but the layout is split between a 32-bit low ---- segment, a 31-bit high segment, and the significant bit reserved as type flags to denote ---- entity kinds. -Identifier = {} - ----@param _self Identifier ----@return integer -function Identifier:to_bits(_self) end - ----@param _self Identifier ----@return integer -function Identifier:masked_high(_self) end - ----@param value integer ----@return Identifier -function Identifier.from_bits(value) end - ----@param _self Identifier ----@return integer -function Identifier:low(_self) end - ----@param _self Identifier ----@param other Identifier ----@return boolean -function Identifier:eq(_self,other) end - ----@param _self Identifier ----@return Identifier -function Identifier:clone(_self) end - - ----@class Name : ReflectReference ---- Component used to identify an entity. Stores a hash for faster comparisons. ---- ---- The hash is eagerly re-computed upon each update to the name. ---- ---- [`Name`] should not be treated as a globally unique identifier for entities, ---- as multiple entities can have the same name. [`Entity`] should be ---- used instead as the default unique identifier. ----@field hash ? integer ----@field name ? Cow -Name = {} - ----@param _self Name ----@return Name -function Name:clone(_self) end - ----@param _self Name ----@param other Name ----@return boolean -function Name:eq(_self,other) end - - ----@class RemovedComponentEntity : ReflectReference ---- Wrapper around [`Entity`] for [`RemovedComponents`]. ---- Internally, `RemovedComponents` uses these as an `Events`. ----@field [1] ? Entity -RemovedComponentEntity = {} - ----@param _self RemovedComponentEntity ----@return RemovedComponentEntity -function RemovedComponentEntity:clone(_self) end - - ----@class ButtonState : ReflectReference ---- The current "press" state of an element -ButtonState = {} - ----@param _self ButtonState ----@return ButtonState -function ButtonState:clone(_self) end - ----@param _self ButtonState ----@return boolean -function ButtonState:is_pressed(_self) end - ----@param _self ButtonState ----@param other ButtonState ----@return boolean -function ButtonState:eq(_self,other) end - ----@param _self ButtonState ----@return nil -function ButtonState:assert_receiver_is_total_eq(_self) end - - ----@class AxisSettings : ReflectReference ---- Settings for a [`GamepadAxis`]. ---- ---- It is used inside the [`GamepadSettings`] to define the sensitivity range and ---- threshold for an axis. ---- Values that are higher than `livezone_upperbound` will be rounded up to 1.0. ---- Values that are lower than `livezone_lowerbound` will be rounded down to -1.0. ---- Values that are in-between `deadzone_lowerbound` and `deadzone_upperbound` will be rounded to 0.0. ---- Otherwise, values will be linearly rescaled to fit into the sensitivity range. ---- For example, a value that is one fourth of the way from `deadzone_upperbound` to `livezone_upperbound` will be scaled to 0.25. ---- ---- The valid range is `[-1.0, 1.0]`. ----@field livezone_upperbound ? number ----@field deadzone_upperbound ? number ----@field deadzone_lowerbound ? number ----@field livezone_lowerbound ? number ----@field threshold ? number -AxisSettings = {} - ----@param _self AxisSettings ----@return number -function AxisSettings:livezone_upperbound(_self) end - ----@param _self AxisSettings ----@param value number ----@return number -function AxisSettings:set_livezone_upperbound(_self,value) end - ----@param _self AxisSettings ----@param value number ----@return number -function AxisSettings:set_deadzone_lowerbound(_self,value) end - ----@param _self AxisSettings ----@return number -function AxisSettings:deadzone_upperbound(_self) end - ----@param _self AxisSettings ----@param other AxisSettings ----@return boolean -function AxisSettings:eq(_self,other) end - ----@param _self AxisSettings ----@return number -function AxisSettings:deadzone_lowerbound(_self) end - ----@param _self AxisSettings ----@param value number ----@return number -function AxisSettings:set_livezone_lowerbound(_self,value) end - ----@param _self AxisSettings ----@param raw_value number ----@return number -function AxisSettings:clamp(_self,raw_value) end - ----@param _self AxisSettings ----@return number -function AxisSettings:livezone_lowerbound(_self) end - ----@param _self AxisSettings ----@return AxisSettings -function AxisSettings:clone(_self) end - ----@param _self AxisSettings ----@return number -function AxisSettings:threshold(_self) end - ----@param _self AxisSettings ----@param value number ----@return number -function AxisSettings:set_deadzone_upperbound(_self,value) end - ----@param _self AxisSettings ----@param value number ----@return number -function AxisSettings:set_threshold(_self,value) end - - ----@class ButtonAxisSettings : ReflectReference ---- Settings for a [`GamepadButton`]. ---- ---- It is used inside the [`GamepadSettings`] to define the sensitivity range and ---- threshold for a button axis. ---- ---- ## Logic ---- ---- - Values that are higher than or equal to `high` will be rounded to 1.0. ---- - Values that are lower than or equal to `low` will be rounded to 0.0. ---- - Otherwise, values will not be rounded. ---- ---- The valid range is from 0.0 to 1.0, inclusive. ----@field high ? number ----@field low ? number ----@field threshold ? number -ButtonAxisSettings = {} - ----@param _self ButtonAxisSettings ----@return ButtonAxisSettings -function ButtonAxisSettings:clone(_self) end - - ----@class ButtonSettings : ReflectReference ---- Manages settings for gamepad buttons. ---- ---- It is used inside [`GamepadSettings`] to define the threshold for a [`GamepadButton`] ---- to be considered pressed or released. A button is considered pressed if the `press_threshold` ---- value is surpassed and released if the `release_threshold` value is undercut. ---- ---- Allowed values: `0.0 <= ``release_threshold`` <= ``press_threshold`` <= 1.0` ----@field press_threshold ? number ----@field release_threshold ? number -ButtonSettings = {} - ----@param _self ButtonSettings ----@param value number ----@return boolean -function ButtonSettings:is_released(_self,value) end - ----@param _self ButtonSettings ----@param value number ----@return number -function ButtonSettings:set_press_threshold(_self,value) end - ----@param _self ButtonSettings ----@param other ButtonSettings ----@return boolean -function ButtonSettings:eq(_self,other) end - ----@param _self ButtonSettings ----@param value number ----@return boolean -function ButtonSettings:is_pressed(_self,value) end - ----@param _self ButtonSettings ----@return number -function ButtonSettings:release_threshold(_self) end - ----@param _self ButtonSettings ----@param value number ----@return number -function ButtonSettings:set_release_threshold(_self,value) end - ----@param _self ButtonSettings ----@return ButtonSettings -function ButtonSettings:clone(_self) end - ----@param _self ButtonSettings ----@return number -function ButtonSettings:press_threshold(_self) end - - ----@class Gamepad : ReflectReference ---- Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`]. ---- ---- An entity with this component is spawned automatically after [`GamepadConnectionEvent`] ---- and updated by [`gamepad_event_processing_system`]. ---- ---- See also [`GamepadSettings`] for configuration. ---- ---- # Examples ---- ---- ``` ---- # use bevy_input::gamepad::{Gamepad, GamepadAxis, GamepadButton}; ---- # use bevy_ecs::system::Query; ---- # use bevy_ecs::name::Name; ---- # ---- fn gamepad_usage_system(gamepads: Query<(&Name, &Gamepad)>) { ---- for (name, gamepad) in &gamepads { ---- println!("{name}"); ---- ---- if gamepad.just_pressed(GamepadButton::North) { ---- println!("{} just pressed North", name) ---- } ---- ---- if let Some(left_stick_x) = gamepad.get(GamepadAxis::LeftStickX) { ---- println!("left stick X: {}", left_stick_x) ---- } ---- } ---- } ---- ``` ----@field vendor_id ? Option ----@field product_id ? Option ----@field digital ? ButtonInput ----@field analog ? Axis -Gamepad = {} - ----@param _self Gamepad ----@return Vec2 -function Gamepad:right_stick(_self) end - ----@param _self Gamepad ----@return Vec2 -function Gamepad:dpad(_self) end - ----@param _self Gamepad ----@return integer | nil -function Gamepad:vendor_id(_self) end - ----@param _self Gamepad ----@param button_type GamepadButton ----@return boolean -function Gamepad:just_released(_self,button_type) end - ----@param _self Gamepad ----@param button_type GamepadButton ----@return boolean -function Gamepad:pressed(_self,button_type) end - ----@param _self Gamepad ----@return Vec2 -function Gamepad:left_stick(_self) end - ----@param _self Gamepad ----@param button_type GamepadButton ----@return boolean -function Gamepad:just_pressed(_self,button_type) end - ----@param _self Gamepad ----@return integer | nil -function Gamepad:product_id(_self) end - - ----@class GamepadAxis : ReflectReference ---- Represents gamepad input types that are mapped in the range [-1.0, 1.0]. ---- ---- ## Usage ---- ---- This is used to determine which axis has changed its value when receiving a ---- gamepad axis event. It is also used in the [`Gamepad`] component. -GamepadAxis = {} - ----@param _self GamepadAxis ----@return nil -function GamepadAxis:assert_receiver_is_total_eq(_self) end - ----@param _self GamepadAxis ----@param other GamepadAxis ----@return boolean -function GamepadAxis:eq(_self,other) end - ----@param _self GamepadAxis ----@return GamepadAxis -function GamepadAxis:clone(_self) end - - ----@class GamepadAxisChangedEvent : ReflectReference ---- [`GamepadAxis`] event triggered by an analog state change. ----@field entity ? Entity ----@field axis ? GamepadAxis ----@field value ? number -GamepadAxisChangedEvent = {} - ----@param entity Entity ----@param axis GamepadAxis ----@param value number ----@return GamepadAxisChangedEvent -function GamepadAxisChangedEvent.new(entity,axis,value) end - ----@param _self GamepadAxisChangedEvent ----@return GamepadAxisChangedEvent -function GamepadAxisChangedEvent:clone(_self) end - ----@param _self GamepadAxisChangedEvent ----@param other GamepadAxisChangedEvent ----@return boolean -function GamepadAxisChangedEvent:eq(_self,other) end - - ----@class GamepadButton : ReflectReference ---- Represents gamepad input types that are mapped in the range [0.0, 1.0]. ---- ---- ## Usage ---- ---- This is used to determine which button has changed its value when receiving gamepad button events. ---- It is also used in the [`Gamepad`] component. -GamepadButton = {} - ----@param _self GamepadButton ----@return GamepadButton -function GamepadButton:clone(_self) end - ----@param _self GamepadButton ----@return nil -function GamepadButton:assert_receiver_is_total_eq(_self) end - ----@param _self GamepadButton ----@param other GamepadButton ----@return boolean -function GamepadButton:eq(_self,other) end - - ----@class GamepadButtonChangedEvent : ReflectReference ---- [`GamepadButton`] event triggered by an analog state change. ----@field entity ? Entity ----@field button ? GamepadButton ----@field state ? ButtonState ----@field value ? number -GamepadButtonChangedEvent = {} - ----@param entity Entity ----@param button GamepadButton ----@param state ButtonState ----@param value number ----@return GamepadButtonChangedEvent -function GamepadButtonChangedEvent.new(entity,button,state,value) end - ----@param _self GamepadButtonChangedEvent ----@param other GamepadButtonChangedEvent ----@return boolean -function GamepadButtonChangedEvent:eq(_self,other) end - ----@param _self GamepadButtonChangedEvent ----@return GamepadButtonChangedEvent -function GamepadButtonChangedEvent:clone(_self) end - - ----@class GamepadButtonStateChangedEvent : ReflectReference ---- [`GamepadButton`] event triggered by a digital state change. ----@field entity ? Entity ----@field button ? GamepadButton ----@field state ? ButtonState -GamepadButtonStateChangedEvent = {} - ----@param _self GamepadButtonStateChangedEvent ----@param other GamepadButtonStateChangedEvent ----@return boolean -function GamepadButtonStateChangedEvent:eq(_self,other) end - ----@param entity Entity ----@param button GamepadButton ----@param state ButtonState ----@return GamepadButtonStateChangedEvent -function GamepadButtonStateChangedEvent.new(entity,button,state) end - ----@param _self GamepadButtonStateChangedEvent ----@return GamepadButtonStateChangedEvent -function GamepadButtonStateChangedEvent:clone(_self) end - ----@param _self GamepadButtonStateChangedEvent ----@return nil -function GamepadButtonStateChangedEvent:assert_receiver_is_total_eq(_self) end - - ----@class GamepadConnection : ReflectReference ---- The connection status of a gamepad. -GamepadConnection = {} - ----@param _self GamepadConnection ----@return GamepadConnection -function GamepadConnection:clone(_self) end - ----@param _self GamepadConnection ----@param other GamepadConnection ----@return boolean -function GamepadConnection:eq(_self,other) end - - ----@class GamepadConnectionEvent : ReflectReference ---- A Gamepad connection event. Created when a connection to a gamepad ---- is established and when a gamepad is disconnected. ----@field gamepad ? Entity ----@field connection ? GamepadConnection -GamepadConnectionEvent = {} - ----@param gamepad Entity ----@param connection GamepadConnection ----@return GamepadConnectionEvent -function GamepadConnectionEvent.new(gamepad,connection) end - ----@param _self GamepadConnectionEvent ----@return boolean -function GamepadConnectionEvent:disconnected(_self) end - ----@param _self GamepadConnectionEvent ----@return GamepadConnectionEvent -function GamepadConnectionEvent:clone(_self) end - ----@param _self GamepadConnectionEvent ----@param other GamepadConnectionEvent ----@return boolean -function GamepadConnectionEvent:eq(_self,other) end - ----@param _self GamepadConnectionEvent ----@return boolean -function GamepadConnectionEvent:connected(_self) end - - ----@class GamepadEvent : ReflectReference ---- A gamepad event. ---- ---- This event type is used over the [`GamepadConnectionEvent`], ---- [`GamepadButtonChangedEvent`] and [`GamepadAxisChangedEvent`] when ---- the in-frame relative ordering of events is important. ---- ---- This event is produced by `bevy_input`. -GamepadEvent = {} - ----@param _self GamepadEvent ----@return GamepadEvent -function GamepadEvent:clone(_self) end - ----@param _self GamepadEvent ----@param other GamepadEvent ----@return boolean -function GamepadEvent:eq(_self,other) end - - ----@class GamepadInput : ReflectReference ---- Encapsulation over [`GamepadAxis`] and [`GamepadButton`]. -GamepadInput = {} - ----@param _self GamepadInput ----@return GamepadInput -function GamepadInput:clone(_self) end - ----@param _self GamepadInput ----@param other GamepadInput ----@return boolean -function GamepadInput:eq(_self,other) end - ----@param _self GamepadInput ----@return nil -function GamepadInput:assert_receiver_is_total_eq(_self) end - - ----@class GamepadRumbleIntensity : ReflectReference ---- The intensity at which a gamepad's force-feedback motors may rumble. ----@field strong_motor ? number ----@field weak_motor ? number -GamepadRumbleIntensity = {} - ----@param _self GamepadRumbleIntensity ----@param other GamepadRumbleIntensity ----@return boolean -function GamepadRumbleIntensity:eq(_self,other) end - ----@param _self GamepadRumbleIntensity ----@return GamepadRumbleIntensity -function GamepadRumbleIntensity:clone(_self) end - ----@param intensity number ----@return GamepadRumbleIntensity -function GamepadRumbleIntensity.strong_motor(intensity) end - ----@param intensity number ----@return GamepadRumbleIntensity -function GamepadRumbleIntensity.weak_motor(intensity) end - - ----@class GamepadRumbleRequest : ReflectReference ---- An event that controls force-feedback rumbling of a [`Gamepad`] [`entity`](Entity). ---- ---- # Notes ---- ---- Does nothing if the gamepad or platform does not support rumble. ---- ---- # Example ---- ---- ``` ---- # use bevy_input::gamepad::{Gamepad, GamepadRumbleRequest, GamepadRumbleIntensity}; ---- # use bevy_ecs::prelude::{EventWriter, Res, Query, Entity, With}; ---- # use core::time::Duration; ---- fn rumble_gamepad_system( ---- mut rumble_requests: EventWriter, ---- gamepads: Query>, ---- ) { ---- for entity in gamepads.iter() { ---- rumble_requests.write(GamepadRumbleRequest::Add { ---- gamepad: entity, ---- intensity: GamepadRumbleIntensity::MAX, ---- duration: Duration::from_secs_f32(0.5), ---- }); ---- } ---- } ---- ``` -GamepadRumbleRequest = {} - ----@param _self GamepadRumbleRequest ----@return GamepadRumbleRequest -function GamepadRumbleRequest:clone(_self) end - ----@param _self GamepadRumbleRequest ----@return Entity -function GamepadRumbleRequest:gamepad(_self) end - - ----@class GamepadSettings : ReflectReference ---- Gamepad settings component. ---- ---- ## Usage ---- ---- It is used to create a `bevy` component that stores the settings of [`GamepadButton`] and [`GamepadAxis`] in [`Gamepad`]. ---- If no user defined [`ButtonSettings`], [`AxisSettings`], or [`ButtonAxisSettings`] ---- are defined, the default settings of each are used as a fallback accordingly. ---- ---- ## Note ---- ---- The [`GamepadSettings`] are used to determine when raw gamepad events ---- should register. Events that don't meet the change thresholds defined in [`GamepadSettings`] ---- will not register. To modify these settings, mutate the corresponding component. ----@field default_button_settings ? ButtonSettings ----@field default_axis_settings ? AxisSettings ----@field default_button_axis_settings ? ButtonAxisSettings ----@field button_settings ? HashMap ----@field axis_settings ? HashMap ----@field button_axis_settings ? HashMap -GamepadSettings = {} - ----@param _self GamepadSettings ----@return GamepadSettings -function GamepadSettings:clone(_self) end - - ----@class RawGamepadAxisChangedEvent : ReflectReference ---- [`GamepadAxis`] changed event unfiltered by [`GamepadSettings`]. ----@field gamepad ? Entity ----@field axis ? GamepadAxis ----@field value ? number -RawGamepadAxisChangedEvent = {} - ----@param gamepad Entity ----@param axis_type GamepadAxis ----@param value number ----@return RawGamepadAxisChangedEvent -function RawGamepadAxisChangedEvent.new(gamepad,axis_type,value) end - ----@param _self RawGamepadAxisChangedEvent ----@param other RawGamepadAxisChangedEvent ----@return boolean -function RawGamepadAxisChangedEvent:eq(_self,other) end - ----@param _self RawGamepadAxisChangedEvent ----@return RawGamepadAxisChangedEvent -function RawGamepadAxisChangedEvent:clone(_self) end - - ----@class RawGamepadButtonChangedEvent : ReflectReference ---- [`GamepadButton`] changed event unfiltered by [`GamepadSettings`]. ----@field gamepad ? Entity ----@field button ? GamepadButton ----@field value ? number -RawGamepadButtonChangedEvent = {} - ----@param gamepad Entity ----@param button_type GamepadButton ----@param value number ----@return RawGamepadButtonChangedEvent -function RawGamepadButtonChangedEvent.new(gamepad,button_type,value) end - ----@param _self RawGamepadButtonChangedEvent ----@return RawGamepadButtonChangedEvent -function RawGamepadButtonChangedEvent:clone(_self) end - ----@param _self RawGamepadButtonChangedEvent ----@param other RawGamepadButtonChangedEvent ----@return boolean -function RawGamepadButtonChangedEvent:eq(_self,other) end - - ----@class RawGamepadEvent : ReflectReference ---- A raw gamepad event. ---- ---- This event type is used over the [`GamepadConnectionEvent`], ---- [`RawGamepadButtonChangedEvent`] and [`RawGamepadAxisChangedEvent`] when ---- the in-frame relative ordering of events is important. ---- ---- This event type is used by `bevy_input` to feed its components. -RawGamepadEvent = {} - ----@param _self RawGamepadEvent ----@return RawGamepadEvent -function RawGamepadEvent:clone(_self) end - ----@param _self RawGamepadEvent ----@param other RawGamepadEvent ----@return boolean -function RawGamepadEvent:eq(_self,other) end - - ----@class DoubleTapGesture : ReflectReference ---- Double tap gesture. ---- ---- ## Platform-specific ---- ---- - Only available on **`macOS`** and **`iOS`**. ---- - On **`iOS`**, must be enabled first -DoubleTapGesture = {} - ----@param _self DoubleTapGesture ----@param other DoubleTapGesture ----@return boolean -function DoubleTapGesture:eq(_self,other) end - ----@param _self DoubleTapGesture ----@return DoubleTapGesture -function DoubleTapGesture:clone(_self) end - - ----@class PanGesture : ReflectReference ---- Pan gesture. ---- ---- ## Platform-specific ---- ---- - On **`iOS`**, must be enabled first ----@field [1] ? Vec2 -PanGesture = {} - ----@param _self PanGesture ----@param other PanGesture ----@return boolean -function PanGesture:eq(_self,other) end - ----@param _self PanGesture ----@return PanGesture -function PanGesture:clone(_self) end - - ----@class PinchGesture : ReflectReference ---- Two-finger pinch gesture, often used for magnifications. ---- ---- Positive delta values indicate magnification (zooming in) and ---- negative delta values indicate shrinking (zooming out). ---- ---- ## Platform-specific ---- ---- - Only available on **`macOS`** and **`iOS`**. ---- - On **`iOS`**, must be enabled first ----@field [1] ? number -PinchGesture = {} - ----@param _self PinchGesture ----@return PinchGesture -function PinchGesture:clone(_self) end - ----@param _self PinchGesture ----@param other PinchGesture ----@return boolean -function PinchGesture:eq(_self,other) end - - ----@class RotationGesture : ReflectReference ---- Two-finger rotation gesture. ---- ---- Positive delta values indicate rotation counterclockwise and ---- negative delta values indicate rotation clockwise. ---- ---- ## Platform-specific ---- ---- - Only available on **`macOS`** and **`iOS`**. ---- - On **`iOS`**, must be enabled first ----@field [1] ? number -RotationGesture = {} - ----@param _self RotationGesture ----@return RotationGesture -function RotationGesture:clone(_self) end - ----@param _self RotationGesture ----@param other RotationGesture ----@return boolean -function RotationGesture:eq(_self,other) end - - ----@class Key : ReflectReference ---- The logical key code of a [`KeyboardInput`]. ---- ---- ## Technical ---- ---- Its values map 1 to 1 to winit's Key. -Key = {} - ----@param _self Key ----@param other Key ----@return boolean -function Key:eq(_self,other) end - ----@param _self Key ----@return Key -function Key:clone(_self) end - ----@param _self Key ----@return nil -function Key:assert_receiver_is_total_eq(_self) end - - ----@class KeyCode : ReflectReference ---- The key code of a [`KeyboardInput`]. ---- ---- ## Usage ---- ---- It is used as the generic `T` value of an [`ButtonInput`] to create a `Res>`. ---- ---- Code representing the location of a physical key ---- This mostly conforms to the UI Events Specification's [`KeyboardEvent.code`] with a few ---- exceptions: ---- - The keys that the specification calls `MetaLeft` and `MetaRight` are named `SuperLeft` and ---- `SuperRight` here. ---- - The key that the specification calls "Super" is reported as `Unidentified` here. ---- ---- [`KeyboardEvent.code`]: https://w3c.github.io/uievents-code/#code-value-tables ---- ---- ## Updating ---- ---- The resource is updated inside of the [`keyboard_input_system`]. -KeyCode = {} - ----@param _self KeyCode ----@return KeyCode -function KeyCode:clone(_self) end - ----@param _self KeyCode ----@return nil -function KeyCode:assert_receiver_is_total_eq(_self) end - ----@param _self KeyCode ----@param other KeyCode ----@return boolean -function KeyCode:eq(_self,other) end - - ----@class KeyboardFocusLost : ReflectReference ---- Gets generated from `bevy_winit::winit_runner` ---- ---- Used for clearing all cached states to avoid having 'stuck' key presses ---- when, for example, switching between windows with 'Alt-Tab' or using any other ---- OS specific key combination that leads to Bevy window losing focus and not receiving any ---- input events -KeyboardFocusLost = {} - ----@param _self KeyboardFocusLost ----@return KeyboardFocusLost -function KeyboardFocusLost:clone(_self) end - ----@param _self KeyboardFocusLost ----@param other KeyboardFocusLost ----@return boolean -function KeyboardFocusLost:eq(_self,other) end - ----@param _self KeyboardFocusLost ----@return nil -function KeyboardFocusLost:assert_receiver_is_total_eq(_self) end - - ----@class KeyboardInput : ReflectReference ---- A keyboard input event. ---- ---- This event is the translated version of the `WindowEvent::KeyboardInput` from the `winit` crate. ---- It is available to the end user and can be used for game logic. ---- ---- ## Usage ---- ---- The event is consumed inside of the [`keyboard_input_system`] ---- to update the [`ButtonInput`](ButtonInput) resource. ----@field key_code ? KeyCode ----@field logical_key ? Key ----@field state ? ButtonState ----@field text ? Option ----@field repeat ? boolean ----@field window ? Entity -KeyboardInput = {} - ----@param _self KeyboardInput ----@return KeyboardInput -function KeyboardInput:clone(_self) end - ----@param _self KeyboardInput ----@return nil -function KeyboardInput:assert_receiver_is_total_eq(_self) end - ----@param _self KeyboardInput ----@param other KeyboardInput ----@return boolean -function KeyboardInput:eq(_self,other) end - - ----@class NativeKey : ReflectReference ---- Contains the platform-native logical key identifier, known as keysym. ---- ---- Exactly what that means differs from platform to platform, but the values are to some degree ---- tied to the currently active keyboard layout. The same key on the same keyboard may also report ---- different values on different platforms, which is one of the reasons this is a per-platform ---- enum. ---- ---- This enum is primarily used to store raw keysym when Winit doesn't map a given native logical ---- key identifier to a meaningful [`Key`] variant. This lets you use [`Key`], and let the user ---- define keybinds which work in the presence of identifiers we haven't mapped for you yet. -NativeKey = {} - ----@param _self NativeKey ----@return NativeKey -function NativeKey:clone(_self) end - ----@param _self NativeKey ----@return nil -function NativeKey:assert_receiver_is_total_eq(_self) end - ----@param _self NativeKey ----@param other NativeKey ----@return boolean -function NativeKey:eq(_self,other) end - - ----@class NativeKeyCode : ReflectReference ---- Contains the platform-native physical key identifier ---- ---- The exact values vary from platform to platform (which is part of why this is a per-platform ---- enum), but the values are primarily tied to the key's physical location on the keyboard. ---- ---- This enum is primarily used to store raw keycodes when Winit doesn't map a given native ---- physical key identifier to a meaningful [`KeyCode`] variant. In the presence of identifiers we ---- haven't mapped for you yet, this lets you use [`KeyCode`] to: ---- ---- - Correctly match key press and release events. ---- - On non-web platforms, support assigning keybinds to virtually any key through a UI. -NativeKeyCode = {} - ----@param _self NativeKeyCode ----@return nil -function NativeKeyCode:assert_receiver_is_total_eq(_self) end - ----@param _self NativeKeyCode ----@param other NativeKeyCode ----@return boolean -function NativeKeyCode:eq(_self,other) end - ----@param _self NativeKeyCode ----@return NativeKeyCode -function NativeKeyCode:clone(_self) end - - ----@class AccumulatedMouseMotion : ReflectReference ---- Tracks how much the mouse has moved every frame. ---- ---- This resource is reset to zero every frame. ---- ---- This resource sums the total [`MouseMotion`] events received this frame. ----@field delta ? Vec2 -AccumulatedMouseMotion = {} - ----@param _self AccumulatedMouseMotion ----@param other AccumulatedMouseMotion ----@return boolean -function AccumulatedMouseMotion:eq(_self,other) end - ----@param _self AccumulatedMouseMotion ----@return AccumulatedMouseMotion -function AccumulatedMouseMotion:clone(_self) end - - ----@class AccumulatedMouseScroll : ReflectReference ---- Tracks how much the mouse has scrolled every frame. ---- ---- This resource is reset to zero every frame. ---- ---- This resource sums the total [`MouseWheel`] events received this frame. ----@field unit ? MouseScrollUnit ----@field delta ? Vec2 -AccumulatedMouseScroll = {} - ----@param _self AccumulatedMouseScroll ----@param other AccumulatedMouseScroll ----@return boolean -function AccumulatedMouseScroll:eq(_self,other) end - ----@param _self AccumulatedMouseScroll ----@return AccumulatedMouseScroll -function AccumulatedMouseScroll:clone(_self) end - - ----@class MouseButton : ReflectReference ---- A button on a mouse device. ---- ---- ## Usage ---- ---- It is used as the generic `T` value of an [`ButtonInput`] to create a `bevy` ---- resource. ---- ---- ## Updating ---- ---- The resource is updated inside of the [`mouse_button_input_system`]. -MouseButton = {} - ----@param _self MouseButton ----@return MouseButton -function MouseButton:clone(_self) end - ----@param _self MouseButton ----@param other MouseButton ----@return boolean -function MouseButton:eq(_self,other) end - ----@param _self MouseButton ----@return nil -function MouseButton:assert_receiver_is_total_eq(_self) end - - ----@class MouseButtonInput : ReflectReference ---- A mouse button input event. ---- ---- This event is the translated version of the `WindowEvent::MouseInput` from the `winit` crate. ---- ---- ## Usage ---- ---- The event is read inside of the [`mouse_button_input_system`] ---- to update the [`ButtonInput`] resource. ----@field button ? MouseButton ----@field state ? ButtonState ----@field window ? Entity -MouseButtonInput = {} - ----@param _self MouseButtonInput ----@return nil -function MouseButtonInput:assert_receiver_is_total_eq(_self) end - ----@param _self MouseButtonInput ----@return MouseButtonInput -function MouseButtonInput:clone(_self) end - ----@param _self MouseButtonInput ----@param other MouseButtonInput ----@return boolean -function MouseButtonInput:eq(_self,other) end - - ----@class MouseMotion : ReflectReference ---- An event reporting the change in physical position of a pointing device. ---- ---- This represents raw, unfiltered physical motion. ---- It is the translated version of [`DeviceEvent::MouseMotion`] from the `winit` crate. ---- ---- All pointing devices connected to a single machine at the same time can emit the event independently. ---- However, the event data does not make it possible to distinguish which device it is referring to. ---- ---- [`DeviceEvent::MouseMotion`]: https://docs.rs/winit/latest/winit/event/enum.DeviceEvent.html#variant.MouseMotion ----@field delta ? Vec2 -MouseMotion = {} - ----@param _self MouseMotion ----@param other MouseMotion ----@return boolean -function MouseMotion:eq(_self,other) end - ----@param _self MouseMotion ----@return MouseMotion -function MouseMotion:clone(_self) end - - ----@class MouseScrollUnit : ReflectReference ---- The scroll unit. ---- ---- Describes how a value of a [`MouseWheel`] event has to be interpreted. ---- ---- The value of the event can either be interpreted as the amount of lines or the amount of pixels ---- to scroll. -MouseScrollUnit = {} - ----@param _self MouseScrollUnit ----@param other MouseScrollUnit ----@return boolean -function MouseScrollUnit:eq(_self,other) end - ----@param _self MouseScrollUnit ----@return nil -function MouseScrollUnit:assert_receiver_is_total_eq(_self) end - ----@param _self MouseScrollUnit ----@return MouseScrollUnit -function MouseScrollUnit:clone(_self) end - - ----@class MouseWheel : ReflectReference ---- A mouse wheel event. ---- ---- This event is the translated version of the `WindowEvent::MouseWheel` from the `winit` crate. ----@field unit ? MouseScrollUnit ----@field x ? number ----@field y ? number ----@field window ? Entity -MouseWheel = {} - ----@param _self MouseWheel ----@param other MouseWheel ----@return boolean -function MouseWheel:eq(_self,other) end - ----@param _self MouseWheel ----@return MouseWheel -function MouseWheel:clone(_self) end - - ----@class ForceTouch : ReflectReference ---- A force description of a [`Touch`] input. -ForceTouch = {} - ----@param _self ForceTouch ----@param other ForceTouch ----@return boolean -function ForceTouch:eq(_self,other) end - ----@param _self ForceTouch ----@return ForceTouch -function ForceTouch:clone(_self) end - - ----@class TouchInput : ReflectReference ---- A touch input event. ---- ---- ## Logic ---- ---- Every time the user touches the screen, a new [`TouchPhase::Started`] event with an unique ---- identifier for the finger is generated. When the finger is lifted, the [`TouchPhase::Ended`] ---- event is generated with the same finger id. ---- ---- After a [`TouchPhase::Started`] event has been emitted, there may be zero or more [`TouchPhase::Moved`] ---- events when the finger is moved or the touch pressure changes. ---- ---- The finger id may be reused by the system after an [`TouchPhase::Ended`] event. The user ---- should assume that a new [`TouchPhase::Started`] event received with the same id has nothing ---- to do with the old finger and is a new finger. ---- ---- A [`TouchPhase::Canceled`] event is emitted when the system has canceled tracking this ---- touch, such as when the window loses focus, or on iOS if the user moves the ---- device against their face. ---- ---- ## Note ---- ---- This event is the translated version of the `WindowEvent::Touch` from the `winit` crate. ---- It is available to the end user and can be used for game logic. ----@field phase ? TouchPhase ----@field position ? Vec2 ----@field window ? Entity ----@field force ? Option ----@field id ? integer -TouchInput = {} - ----@param _self TouchInput ----@param other TouchInput ----@return boolean -function TouchInput:eq(_self,other) end - ----@param _self TouchInput ----@return TouchInput -function TouchInput:clone(_self) end - - ----@class TouchPhase : ReflectReference ---- A phase of a [`TouchInput`]. ---- ---- ## Usage ---- ---- It is used to describe the phase of the touch input that is currently active. ---- This includes a phase that indicates that a touch input has started or ended, ---- or that a finger has moved. There is also a canceled phase that indicates that ---- the system canceled the tracking of the finger. -TouchPhase = {} - ----@param _self TouchPhase ----@param other TouchPhase ----@return boolean -function TouchPhase:eq(_self,other) end - ----@param _self TouchPhase ----@return TouchPhase -function TouchPhase:clone(_self) end - ----@param _self TouchPhase ----@return nil -function TouchPhase:assert_receiver_is_total_eq(_self) end - - ----@class AspectRatio : ReflectReference ---- An `AspectRatio` is the ratio of width to height. ----@field [1] ? number -AspectRatio = {} - ----@param _self AspectRatio ----@return boolean -function AspectRatio:is_landscape(_self) end - ----@param _self AspectRatio ----@param other AspectRatio ----@return boolean -function AspectRatio:eq(_self,other) end - ----@param _self AspectRatio ----@return number -function AspectRatio:ratio(_self) end - ----@param _self AspectRatio ----@return boolean -function AspectRatio:is_square(_self) end - ----@param _self AspectRatio ----@return boolean -function AspectRatio:is_portrait(_self) end - ----@param _self AspectRatio ----@return AspectRatio -function AspectRatio:inverse(_self) end - ----@param _self AspectRatio ----@return AspectRatio -function AspectRatio:clone(_self) end - - ----@class Aabb2d : ReflectReference ---- A 2D axis-aligned bounding box, or bounding rectangle ----@field min ? Vec2 ----@field max ? Vec2 -Aabb2d = {} - ----@param _self Aabb2d ----@param other Aabb2d ----@return boolean -function Aabb2d:eq(_self,other) end - ----@param _self Aabb2d ----@param point Vec2 ----@return Vec2 -function Aabb2d:closest_point(_self,point) end - ----@param center Vec2 ----@param half_size Vec2 ----@return Aabb2d -function Aabb2d.new(center,half_size) end - ----@param _self Aabb2d ----@return BoundingCircle -function Aabb2d:bounding_circle(_self) end - ----@param _self Aabb2d ----@return Aabb2d -function Aabb2d:clone(_self) end - - ----@class BoundingCircle : ReflectReference ---- A bounding circle ----@field center ? Vec2 ----@field circle ? Circle -BoundingCircle = {} - ----@param _self BoundingCircle ----@return number -function BoundingCircle:radius(_self) end - ----@param _self BoundingCircle ----@return BoundingCircle -function BoundingCircle:clone(_self) end - ----@param _self BoundingCircle ----@param point Vec2 ----@return Vec2 -function BoundingCircle:closest_point(_self,point) end - ----@param center Vec2 ----@param radius number ----@return BoundingCircle -function BoundingCircle.new(center,radius) end - ----@param _self BoundingCircle ----@return Aabb2d -function BoundingCircle:aabb_2d(_self) end - ----@param _self BoundingCircle ----@param other BoundingCircle ----@return boolean -function BoundingCircle:eq(_self,other) end - - ----@class Aabb3d : ReflectReference ---- A 3D axis-aligned bounding box ----@field min ? Vec3A ----@field max ? Vec3A -Aabb3d = {} - ----@param _self Aabb3d ----@return Aabb3d -function Aabb3d:clone(_self) end - ----@param _self Aabb3d ----@return BoundingSphere -function Aabb3d:bounding_sphere(_self) end - ----@param _self Aabb3d ----@param other Aabb3d ----@return boolean -function Aabb3d:eq(_self,other) end - - ----@class BoundingSphere : ReflectReference ---- A bounding sphere ----@field center ? Vec3A ----@field sphere ? Sphere -BoundingSphere = {} - ----@param _self BoundingSphere ----@param other BoundingSphere ----@return boolean -function BoundingSphere:eq(_self,other) end - ----@param _self BoundingSphere ----@return number -function BoundingSphere:radius(_self) end - ----@param _self BoundingSphere ----@return BoundingSphere -function BoundingSphere:clone(_self) end - ----@param _self BoundingSphere ----@return Aabb3d -function BoundingSphere:aabb_3d(_self) end - - ----@class AabbCast2d : ReflectReference ---- An intersection test that casts an [`Aabb2d`] along a ray. ----@field ray ? RayCast2d ----@field aabb ? Aabb2d -AabbCast2d = {} - ----@param aabb Aabb2d ----@param origin Vec2 ----@param direction Dir2 ----@param max number ----@return AabbCast2d -function AabbCast2d.new(aabb,origin,direction,max) end - ----@param aabb Aabb2d ----@param ray Ray2d ----@param max number ----@return AabbCast2d -function AabbCast2d.from_ray(aabb,ray,max) end - ----@param _self AabbCast2d ----@param aabb Aabb2d ----@return number | nil -function AabbCast2d:aabb_collision_at(_self,aabb) end - ----@param _self AabbCast2d ----@return AabbCast2d -function AabbCast2d:clone(_self) end - - ----@class BoundingCircleCast : ReflectReference ---- An intersection test that casts a [`BoundingCircle`] along a ray. ----@field ray ? RayCast2d ----@field circle ? BoundingCircle -BoundingCircleCast = {} - ----@param circle BoundingCircle ----@param ray Ray2d ----@param max number ----@return BoundingCircleCast -function BoundingCircleCast.from_ray(circle,ray,max) end - ----@param circle BoundingCircle ----@param origin Vec2 ----@param direction Dir2 ----@param max number ----@return BoundingCircleCast -function BoundingCircleCast.new(circle,origin,direction,max) end - ----@param _self BoundingCircleCast ----@param circle BoundingCircle ----@return number | nil -function BoundingCircleCast:circle_collision_at(_self,circle) end - ----@param _self BoundingCircleCast ----@return BoundingCircleCast -function BoundingCircleCast:clone(_self) end - - ----@class RayCast2d : ReflectReference ---- A raycast intersection test for 2D bounding volumes ----@field ray ? Ray2d ----@field max ? number ----@field direction_recip ? Vec2 -RayCast2d = {} - ----@param _self RayCast2d ----@param aabb Aabb2d ----@return number | nil -function RayCast2d:aabb_intersection_at(_self,aabb) end - ----@param ray Ray2d ----@param max number ----@return RayCast2d -function RayCast2d.from_ray(ray,max) end - ----@param _self RayCast2d ----@return RayCast2d -function RayCast2d:clone(_self) end - ----@param origin Vec2 ----@param direction Dir2 ----@param max number ----@return RayCast2d -function RayCast2d.new(origin,direction,max) end - ----@param _self RayCast2d ----@return Vec2 -function RayCast2d:direction_recip(_self) end - ----@param _self RayCast2d ----@param circle BoundingCircle ----@return number | nil -function RayCast2d:circle_intersection_at(_self,circle) end - - ----@class AabbCast3d : ReflectReference ---- An intersection test that casts an [`Aabb3d`] along a ray. ----@field ray ? RayCast3d ----@field aabb ? Aabb3d -AabbCast3d = {} - ----@param _self AabbCast3d ----@param aabb Aabb3d ----@return number | nil -function AabbCast3d:aabb_collision_at(_self,aabb) end - ----@param _self AabbCast3d ----@return AabbCast3d -function AabbCast3d:clone(_self) end - ----@param aabb Aabb3d ----@param ray Ray3d ----@param max number ----@return AabbCast3d -function AabbCast3d.from_ray(aabb,ray,max) end - - ----@class BoundingSphereCast : ReflectReference ---- An intersection test that casts a [`BoundingSphere`] along a ray. ----@field ray ? RayCast3d ----@field sphere ? BoundingSphere -BoundingSphereCast = {} - ----@param sphere BoundingSphere ----@param ray Ray3d ----@param max number ----@return BoundingSphereCast -function BoundingSphereCast.from_ray(sphere,ray,max) end - ----@param _self BoundingSphereCast ----@return BoundingSphereCast -function BoundingSphereCast:clone(_self) end - ----@param _self BoundingSphereCast ----@param sphere BoundingSphere ----@return number | nil -function BoundingSphereCast:sphere_collision_at(_self,sphere) end - - ----@class RayCast3d : ReflectReference ---- A raycast intersection test for 3D bounding volumes ----@field origin ? Vec3A ----@field direction ? Dir3A ----@field max ? number ----@field direction_recip ? Vec3A -RayCast3d = {} - ----@param ray Ray3d ----@param max number ----@return RayCast3d -function RayCast3d.from_ray(ray,max) end - ----@param _self RayCast3d ----@return Vec3A -function RayCast3d:direction_recip(_self) end - ----@param _self RayCast3d ----@param sphere BoundingSphere ----@return number | nil -function RayCast3d:sphere_intersection_at(_self,sphere) end - ----@param _self RayCast3d ----@return RayCast3d -function RayCast3d:clone(_self) end - ----@param _self RayCast3d ----@param aabb Aabb3d ----@return number | nil -function RayCast3d:aabb_intersection_at(_self,aabb) end - - ----@class CompassOctant : ReflectReference ---- A compass enum with 8 directions. ---- ```text ---- N (North) ---- ▲ ---- NW │ NE ---- ╲ │ ╱ ---- W (West) ┼─────► E (East) ---- ╱ │ ╲ ---- SW │ SE ---- ▼ ---- S (South) ---- ``` -CompassOctant = {} - ----@param _self CompassOctant ----@return integer -function CompassOctant:to_index(_self) end - ----@param _self CompassOctant ----@return CompassOctant -function CompassOctant:opposite(_self) end - ----@param _self CompassOctant ----@return CompassOctant -function CompassOctant:clone(_self) end - ----@param _self CompassOctant ----@param other CompassOctant ----@return boolean -function CompassOctant:eq(_self,other) end - ----@param _self CompassOctant ----@return CompassOctant -function CompassOctant:neg(_self) end - ----@param _self CompassOctant ----@return nil -function CompassOctant:assert_receiver_is_total_eq(_self) end - - ----@class CompassQuadrant : ReflectReference ---- A compass enum with 4 directions. ---- ```text ---- N (North) ---- ▲ ---- │ ---- │ ---- W (West) ┼─────► E (East) ---- │ ---- │ ---- ▼ ---- S (South) ---- ``` -CompassQuadrant = {} - ----@param _self CompassQuadrant ----@return integer -function CompassQuadrant:to_index(_self) end - ----@param _self CompassQuadrant ----@param other CompassQuadrant ----@return boolean -function CompassQuadrant:eq(_self,other) end - ----@param _self CompassQuadrant ----@return CompassQuadrant -function CompassQuadrant:opposite(_self) end - ----@param _self CompassQuadrant ----@return CompassQuadrant -function CompassQuadrant:clone(_self) end - ----@param _self CompassQuadrant ----@return CompassQuadrant -function CompassQuadrant:neg(_self) end - ----@param _self CompassQuadrant ----@return nil -function CompassQuadrant:assert_receiver_is_total_eq(_self) end - - ----@class EaseFunction : ReflectReference ---- Curve functions over the [unit interval], commonly used for easing transitions. ---- ---- `EaseFunction` can be used on its own to interpolate between `0.0` and `1.0`. ---- It can also be combined with [`EasingCurve`] to interpolate between other ---- intervals and types, including vectors and rotations. ---- ---- # Example ---- ---- [`sample`] the smoothstep function at various points. This will return `None` ---- if the parameter is outside the unit interval. ---- ---- ``` ---- # use bevy_math::prelude::*; ---- let f = EaseFunction::SmoothStep; ---- ---- assert_eq!(f.sample(-1.0), None); ---- assert_eq!(f.sample(0.0), Some(0.0)); ---- assert_eq!(f.sample(0.5), Some(0.5)); ---- assert_eq!(f.sample(1.0), Some(1.0)); ---- assert_eq!(f.sample(2.0), None); ---- ``` ---- ---- [`sample_clamped`] will clamp the parameter to the unit interval, so it ---- always returns a value. ---- ---- ``` ---- # use bevy_math::prelude::*; ---- # let f = EaseFunction::SmoothStep; ---- assert_eq!(f.sample_clamped(-1.0), 0.0); ---- assert_eq!(f.sample_clamped(0.0), 0.0); ---- assert_eq!(f.sample_clamped(0.5), 0.5); ---- assert_eq!(f.sample_clamped(1.0), 1.0); ---- assert_eq!(f.sample_clamped(2.0), 1.0); ---- ``` ---- ---- [`sample`]: EaseFunction::sample ---- [`sample_clamped`]: EaseFunction::sample_clamped ---- [unit interval]: `Interval::UNIT` -EaseFunction = {} - ----@param _self EaseFunction ----@return EaseFunction -function EaseFunction:clone(_self) end - ----@param _self EaseFunction ----@param other EaseFunction ----@return boolean -function EaseFunction:eq(_self,other) end - - ----@class JumpAt : ReflectReference ---- Configuration options for the [`EaseFunction::Steps`] curves. This closely replicates the ---- [CSS step function specification]. ---- ---- [CSS step function specification]: https://developer.mozilla.org/en-US/docs/Web/CSS/easing-function/steps#description -JumpAt = {} - ----@param _self JumpAt ----@return nil -function JumpAt:assert_receiver_is_total_eq(_self) end - ----@param _self JumpAt ----@param other JumpAt ----@return boolean -function JumpAt:eq(_self,other) end - ----@param _self JumpAt ----@return JumpAt -function JumpAt:clone(_self) end - - ----@class Interval : ReflectReference ---- A nonempty closed interval, possibly unbounded in either direction. ---- ---- In other words, the interval may stretch all the way to positive or negative infinity, but it ---- will always have some nonempty interior. ----@field start ? number ----@field end ? number -Interval = {} - ----@param _self Interval ----@param other Interval ----@return boolean -function Interval:eq(_self,other) end - ----@param _self Interval ----@return boolean -function Interval:has_finite_start(_self) end - ----@param _self Interval ----@param value number ----@return number -function Interval:clamp(_self,value) end - ----@param _self Interval ----@return number -function Interval:length(_self) end - ----@param _self Interval ----@return boolean -function Interval:has_finite_end(_self) end - ----@param _self Interval ----@return boolean -function Interval:is_bounded(_self) end - ----@param _self Interval ----@param item number ----@return boolean -function Interval:contains(_self,item) end - - ----@param _self Interval ----@return Interval -function Interval:clone(_self) end - ----@param _self Interval ----@return number -function Interval:start(_self) end - ----@param _self Interval ----@param other Interval ----@return boolean -function Interval:contains_interval(_self,other) end - - ----@class Dir2 : ReflectReference ---- A normalized vector pointing in a direction in 2D space ----@field [1] ? Vec2 -Dir2 = {} - ----@param _self Dir2 ----@param rhs number ----@return Vec2 -function Dir2:mul(_self,rhs) end - ----@param _self Dir2 ----@param rhs Dir2 ----@param s number ----@return Dir2 -function Dir2:slerp(_self,rhs,s) end - ----@param _self Dir2 ----@return Dir2 -function Dir2:fast_renormalize(_self) end - ----@param _self Dir2 ----@return Vec2 -function Dir2:as_vec2(_self) end - ----@param _self Dir2 ----@return Rot2 -function Dir2:rotation_to_x(_self) end - ----@param _self Dir2 ----@return Dir2 -function Dir2:clone(_self) end - ----@param _self Dir2 ----@return Rot2 -function Dir2:rotation_from_x(_self) end - ----@param _self Dir2 ----@return Dir2 -function Dir2:neg(_self) end - ----@param x number ----@param y number ----@return Dir2 -function Dir2.from_xy_unchecked(x,y) end - ----@param _self Dir2 ----@param other Dir2 ----@return boolean -function Dir2:eq(_self,other) end - ----@param value Vec2 ----@return Dir2 -function Dir2.new_unchecked(value) end - ----@param _self Dir2 ----@return Rot2 -function Dir2:rotation_from_y(_self) end - ----@param _self Dir2 ----@return Rot2 -function Dir2:rotation_to_y(_self) end - ----@param _self Dir2 ----@param other Dir2 ----@return Rot2 -function Dir2:rotation_from(_self,other) end - ----@param _self Dir2 ----@param other Dir2 ----@return Rot2 -function Dir2:rotation_to(_self,other) end - - ----@class Dir3 : ReflectReference ---- A normalized vector pointing in a direction in 3D space ----@field [1] ? Vec3 -Dir3 = {} - ----@param value Vec3 ----@return Dir3 -function Dir3.new_unchecked(value) end - ----@param _self Dir3 ----@return Dir3 -function Dir3:neg(_self) end - ----@param _self Dir3 ----@param rhs Dir3 ----@param s number ----@return Dir3 -function Dir3:slerp(_self,rhs,s) end - ----@param _self Dir3 ----@param rhs number ----@return Vec3 -function Dir3:mul(_self,rhs) end - ----@param _self Dir3 ----@return Dir3 -function Dir3:clone(_self) end - ----@param _self Dir3 ----@return Vec3 -function Dir3:as_vec3(_self) end - ----@param _self Dir3 ----@return Dir3 -function Dir3:fast_renormalize(_self) end - ----@param _self Dir3 ----@param other Dir3 ----@return boolean -function Dir3:eq(_self,other) end - ----@param x number ----@param y number ----@param z number ----@return Dir3 -function Dir3.from_xyz_unchecked(x,y,z) end - - ----@class Dir3A : ReflectReference ---- A normalized SIMD vector pointing in a direction in 3D space. ---- ---- This type stores a 16 byte aligned [`Vec3A`]. ---- This may or may not be faster than [`Dir3`]: make sure to benchmark! ----@field [1] ? Vec3A -Dir3A = {} - ----@param _self Dir3A ----@return Dir3A -function Dir3A:fast_renormalize(_self) end - ----@param _self Dir3A ----@return Vec3A -function Dir3A:as_vec3a(_self) end - ----@param _self Dir3A ----@param rhs Dir3A ----@param s number ----@return Dir3A -function Dir3A:slerp(_self,rhs,s) end - ----@param value Vec3A ----@return Dir3A -function Dir3A.new_unchecked(value) end - ----@param _self Dir3A ----@return Dir3A -function Dir3A:clone(_self) end - ----@param _self Dir3A ----@param other Dir3A ----@return boolean -function Dir3A:eq(_self,other) end - ----@param x number ----@param y number ----@param z number ----@return Dir3A -function Dir3A.from_xyz_unchecked(x,y,z) end - ----@param _self Dir3A ----@param rhs number ----@return Vec3A -function Dir3A:mul(_self,rhs) end - ----@param _self Dir3A ----@return Dir3A -function Dir3A:neg(_self) end - - ----@class FloatOrd : ReflectReference ---- A wrapper for floats that implements [`Ord`], [`Eq`], and [`Hash`] traits. ---- ---- This is a work around for the fact that the IEEE 754-2008 standard, ---- implemented by Rust's [`f32`] type, ---- doesn't define an ordering for [`NaN`](f32::NAN), ---- and `NaN` is not considered equal to any other `NaN`. ---- ---- Wrapping a float with `FloatOrd` breaks conformance with the standard ---- by sorting `NaN` as less than all other numbers and equal to any other `NaN`. ----@field [1] ? number -FloatOrd = {} - ----@param _self FloatOrd ----@param other FloatOrd ----@return boolean -function FloatOrd:eq(_self,other) end - ----@param _self FloatOrd ----@param other FloatOrd ----@return boolean -function FloatOrd:lt(_self,other) end - ----@param _self FloatOrd ----@return FloatOrd -function FloatOrd:neg(_self) end - ----@param _self FloatOrd ----@param other FloatOrd ----@return boolean -function FloatOrd:ge(_self,other) end - ----@param _self FloatOrd ----@param other FloatOrd ----@return boolean -function FloatOrd:le(_self,other) end - ----@param _self FloatOrd ----@return FloatOrd -function FloatOrd:clone(_self) end - ----@param _self FloatOrd ----@param other FloatOrd ----@return boolean -function FloatOrd:gt(_self,other) end - - ----@class Isometry2d : ReflectReference ---- An isometry in two dimensions, representing a rotation followed by a translation. ---- This can often be useful for expressing relative positions and transformations from one position to another. ---- ---- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*, ---- and belongs to the special [Euclidean group] SE(2). This includes translation and rotation, but excludes reflection. ---- ---- For the three-dimensional version, see [`Isometry3d`]. ---- ---- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group ---- ---- # Example ---- ---- Isometries can be created from a given translation and rotation: ---- ---- ``` ---- # use bevy_math::{Isometry2d, Rot2, Vec2}; ---- # ---- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0)); ---- ``` ---- ---- Or from separate parts: ---- ---- ``` ---- # use bevy_math::{Isometry2d, Rot2, Vec2}; ---- # ---- let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0)); ---- let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0)); ---- ``` ---- ---- The isometries can be used to transform points: ---- ---- ``` ---- # use approx::assert_abs_diff_eq; ---- # use bevy_math::{Isometry2d, Rot2, Vec2}; ---- # ---- let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0)); ---- let point = Vec2::new(4.0, 4.0); ---- ---- // These are equivalent ---- let result = iso.transform_point(point); ---- let result = iso * point; ---- ---- assert_eq!(result, Vec2::new(-2.0, 5.0)); ---- ``` ---- ---- Isometries can also be composed together: ---- ---- ``` ---- # use bevy_math::{Isometry2d, Rot2, Vec2}; ---- # ---- # let iso = Isometry2d::new(Vec2::new(2.0, 1.0), Rot2::degrees(90.0)); ---- # let iso1 = Isometry2d::from_translation(Vec2::new(2.0, 1.0)); ---- # let iso2 = Isometry2d::from_rotation(Rot2::degrees(90.0)); ---- # ---- assert_eq!(iso1 * iso2, iso); ---- ``` ---- ---- One common operation is to compute an isometry representing the relative positions of two objects ---- for things like intersection tests. This can be done with an inverse transformation: ---- ---- ``` ---- # use bevy_math::{Isometry2d, Rot2, Vec2}; ---- # ---- let circle_iso = Isometry2d::from_translation(Vec2::new(2.0, 1.0)); ---- let rectangle_iso = Isometry2d::from_rotation(Rot2::degrees(90.0)); ---- ---- // Compute the relative position and orientation between the two shapes ---- let relative_iso = circle_iso.inverse() * rectangle_iso; ---- ---- // Or alternatively, to skip an extra rotation operation: ---- let relative_iso = circle_iso.inverse_mul(rectangle_iso); ---- ``` ----@field rotation ? Rot2 ----@field translation ? Vec2 -Isometry2d = {} - ----@param translation Vec2 ----@param rotation Rot2 ----@return Isometry2d -function Isometry2d.new(translation,rotation) end - ----@param rotation Rot2 ----@return Isometry2d -function Isometry2d.from_rotation(rotation) end - ----@param x number ----@param y number ----@return Isometry2d -function Isometry2d.from_xy(x,y) end - ----@param _self Isometry2d ----@return Isometry2d -function Isometry2d:clone(_self) end - ----@param _self Isometry2d ----@param point Vec2 ----@return Vec2 -function Isometry2d:transform_point(_self,point) end - ----@param _self Isometry2d ----@return Isometry2d -function Isometry2d:inverse(_self) end - ----@param translation Vec2 ----@return Isometry2d -function Isometry2d.from_translation(translation) end - ----@param p1 Isometry2d ----@param p2 Dir2 ----@return Dir2 -function Isometry2d:mul(p1,p2) end - ----@param _self Isometry2d ----@param point Vec2 ----@return Vec2 -function Isometry2d:inverse_transform_point(_self,point) end - ----@param _self Isometry2d ----@param rhs Isometry2d ----@return Isometry2d -function Isometry2d:mul(_self,rhs) end - ----@param _self Isometry2d ----@param rhs Isometry2d ----@return Isometry2d -function Isometry2d:inverse_mul(_self,rhs) end - ----@param _self Isometry2d ----@param other Isometry2d ----@return boolean -function Isometry2d:eq(_self,other) end - ----@param p1 Isometry2d ----@param p2 Vec2 ----@return Vec2 -function Isometry2d:mul(p1,p2) end - - ----@class Isometry3d : ReflectReference ---- An isometry in three dimensions, representing a rotation followed by a translation. ---- This can often be useful for expressing relative positions and transformations from one position to another. ---- ---- In particular, this type represents a distance-preserving transformation known as a *rigid motion* or a *direct motion*, ---- and belongs to the special [Euclidean group] SE(3). This includes translation and rotation, but excludes reflection. ---- ---- For the two-dimensional version, see [`Isometry2d`]. ---- ---- [Euclidean group]: https://en.wikipedia.org/wiki/Euclidean_group ---- ---- # Example ---- ---- Isometries can be created from a given translation and rotation: ---- ---- ``` ---- # use bevy_math::{Isometry3d, Quat, Vec3}; ---- # use std::f32::consts::FRAC_PI_2; ---- # ---- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2)); ---- ``` ---- ---- Or from separate parts: ---- ---- ``` ---- # use bevy_math::{Isometry3d, Quat, Vec3}; ---- # use std::f32::consts::FRAC_PI_2; ---- # ---- let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0)); ---- let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2)); ---- ``` ---- ---- The isometries can be used to transform points: ---- ---- ``` ---- # use approx::assert_relative_eq; ---- # use bevy_math::{Isometry3d, Quat, Vec3}; ---- # use std::f32::consts::FRAC_PI_2; ---- # ---- let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2)); ---- let point = Vec3::new(4.0, 4.0, 4.0); ---- ---- // These are equivalent ---- let result = iso.transform_point(point); ---- let result = iso * point; ---- ---- assert_relative_eq!(result, Vec3::new(-2.0, 5.0, 7.0)); ---- ``` ---- ---- Isometries can also be composed together: ---- ---- ``` ---- # use bevy_math::{Isometry3d, Quat, Vec3}; ---- # use std::f32::consts::FRAC_PI_2; ---- # ---- # let iso = Isometry3d::new(Vec3::new(2.0, 1.0, 3.0), Quat::from_rotation_z(FRAC_PI_2)); ---- # let iso1 = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0)); ---- # let iso2 = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2)); ---- # ---- assert_eq!(iso1 * iso2, iso); ---- ``` ---- ---- One common operation is to compute an isometry representing the relative positions of two objects ---- for things like intersection tests. This can be done with an inverse transformation: ---- ---- ``` ---- # use bevy_math::{Isometry3d, Quat, Vec3}; ---- # use std::f32::consts::FRAC_PI_2; ---- # ---- let sphere_iso = Isometry3d::from_translation(Vec3::new(2.0, 1.0, 3.0)); ---- let cuboid_iso = Isometry3d::from_rotation(Quat::from_rotation_z(FRAC_PI_2)); ---- ---- // Compute the relative position and orientation between the two shapes ---- let relative_iso = sphere_iso.inverse() * cuboid_iso; ---- ---- // Or alternatively, to skip an extra rotation operation: ---- let relative_iso = sphere_iso.inverse_mul(cuboid_iso); ---- ``` ----@field rotation ? Quat ----@field translation ? Vec3A -Isometry3d = {} - ----@param x number ----@param y number ----@param z number ----@return Isometry3d -function Isometry3d.from_xyz(x,y,z) end - ----@param rotation Quat ----@return Isometry3d -function Isometry3d.from_rotation(rotation) end - ----@param _self Isometry3d ----@param other Isometry3d ----@return boolean -function Isometry3d:eq(_self,other) end - ----@param _self Isometry3d ----@param rhs Isometry3d ----@return Isometry3d -function Isometry3d:mul(_self,rhs) end - ----@param _self Isometry3d ----@param rhs Isometry3d ----@return Isometry3d -function Isometry3d:inverse_mul(_self,rhs) end - ----@param _self Isometry3d ----@return Isometry3d -function Isometry3d:inverse(_self) end - ----@param p1 Isometry3d ----@param p2 Vec3A ----@return Vec3A -function Isometry3d:mul(p1,p2) end - ----@param p1 Isometry3d ----@param p2 Vec3 ----@return Vec3 -function Isometry3d:mul(p1,p2) end - ----@param _self Isometry3d ----@return Isometry3d -function Isometry3d:clone(_self) end - ----@param p1 Isometry3d ----@param p2 Dir3 ----@return Dir3 -function Isometry3d:mul(p1,p2) end - - ----@class Annulus : ReflectReference ---- A primitive shape formed by the region between two circles, also known as a ring. ----@field inner_circle ? Circle ----@field outer_circle ? Circle -Annulus = {} - ----@param _self Annulus ----@return number -function Annulus:thickness(_self) end - ----@param _self Annulus ----@return number -function Annulus:diameter(_self) end - ----@param inner_radius number ----@param outer_radius number ----@return Annulus -function Annulus.new(inner_radius,outer_radius) end - ----@param _self Annulus ----@param point Vec2 ----@return Vec2 -function Annulus:closest_point(_self,point) end - ----@param _self Annulus ----@return Annulus -function Annulus:clone(_self) end - ----@param _self Annulus ----@param other Annulus ----@return boolean -function Annulus:eq(_self,other) end - - ----@class Arc2d : ReflectReference ---- A primitive representing an arc between two points on a circle. ---- ---- An arc has no area. ---- If you want to include the portion of a circle's area swept out by the arc, ---- use the pie-shaped [`CircularSector`]. ---- If you want to include only the space inside the convex hull of the arc, ---- use the bowl-shaped [`CircularSegment`]. ---- ---- The arc is drawn starting from [`Vec2::Y`], extending by `half_angle` radians on ---- either side. The center of the circle is the origin [`Vec2::ZERO`]. Note that this ---- means that the origin may not be within the `Arc2d`'s convex hull. ---- ---- **Warning:** Arcs with negative angle or radius, or with angle greater than an entire circle, are not officially supported. ---- It is recommended to normalize arcs to have an angle in [0, 2π]. ----@field radius ? number ----@field half_angle ? number -Arc2d = {} - ----@param _self Arc2d ----@return Arc2d -function Arc2d:clone(_self) end - ----@param _self Arc2d ----@return boolean -function Arc2d:is_major(_self) end - ----@param _self Arc2d ----@return number -function Arc2d:angle(_self) end - ----@param _self Arc2d ----@return number -function Arc2d:length(_self) end - ----@param _self Arc2d ----@param other Arc2d ----@return boolean -function Arc2d:eq(_self,other) end - ----@param _self Arc2d ----@return boolean -function Arc2d:is_minor(_self) end - ----@param radius number ----@param angle number ----@return Arc2d -function Arc2d.from_degrees(radius,angle) end - ----@param _self Arc2d ----@return Vec2 -function Arc2d:chord_midpoint(_self) end - ----@param _self Arc2d ----@return Vec2 -function Arc2d:midpoint(_self) end - ----@param _self Arc2d ----@return number -function Arc2d:apothem(_self) end - ----@param _self Arc2d ----@return number -function Arc2d:chord_length(_self) end - ----@param _self Arc2d ----@return Vec2 -function Arc2d:right_endpoint(_self) end - ----@param _self Arc2d ----@return Vec2 -function Arc2d:left_endpoint(_self) end - ----@param _self Arc2d ----@return number -function Arc2d:sagitta(_self) end - ----@param radius number ----@param angle number ----@return Arc2d -function Arc2d.from_radians(radius,angle) end - ----@param radius number ----@param half_angle number ----@return Arc2d -function Arc2d.new(radius,half_angle) end - ----@param _self Arc2d ----@return number -function Arc2d:half_chord_length(_self) end - ----@param radius number ----@param fraction number ----@return Arc2d -function Arc2d.from_turns(radius,fraction) end - - ----@class Capsule2d : ReflectReference ---- A 2D capsule primitive, also known as a stadium or pill shape. ---- ---- A two-dimensional capsule is defined as a neighborhood of points at a distance (radius) from a line ----@field radius ? number ----@field half_length ? number -Capsule2d = {} - ----@param _self Capsule2d ----@return Rectangle -function Capsule2d:to_inner_rectangle(_self) end - ----@param radius number ----@param length number ----@return Capsule2d -function Capsule2d.new(radius,length) end - ----@param _self Capsule2d ----@param other Capsule2d ----@return boolean -function Capsule2d:eq(_self,other) end - ----@param _self Capsule2d ----@return Capsule2d -function Capsule2d:clone(_self) end - - ----@class Circle : ReflectReference ---- A circle primitive, representing the set of points some distance from the origin ----@field radius ? number -Circle = {} - ----@param _self Circle ----@param other Circle ----@return boolean -function Circle:eq(_self,other) end - ----@param _self Circle ----@return number -function Circle:diameter(_self) end - ----@param _self Circle ----@param point Vec2 ----@return Vec2 -function Circle:closest_point(_self,point) end - ----@param radius number ----@return Circle -function Circle.new(radius) end - ----@param _self Circle ----@return Circle -function Circle:clone(_self) end - - ----@class CircularSector : ReflectReference ---- A primitive representing a circular sector: a pie slice of a circle. ---- ---- The segment is positioned so that it always includes [`Vec2::Y`] and is vertically symmetrical. ---- To orient the sector differently, apply a rotation. ---- The sector is drawn with the center of its circle at the origin [`Vec2::ZERO`]. ---- ---- **Warning:** Circular sectors with negative angle or radius, or with angle greater than an entire circle, are not officially supported. ---- We recommend normalizing circular sectors to have an angle in [0, 2π]. ----@field arc ? Arc2d -CircularSector = {} - ----@param _self CircularSector ----@return number -function CircularSector:sagitta(_self) end - ----@param _self CircularSector ----@return number -function CircularSector:angle(_self) end - ----@param _self CircularSector ----@param other CircularSector ----@return boolean -function CircularSector:eq(_self,other) end - ----@param _self CircularSector ----@return number -function CircularSector:apothem(_self) end - ----@param _self CircularSector ----@return Vec2 -function CircularSector:chord_midpoint(_self) end - ----@param _self CircularSector ----@return CircularSector -function CircularSector:clone(_self) end - ----@param radius number ----@param angle number ----@return CircularSector -function CircularSector.new(radius,angle) end - ----@param _self CircularSector ----@return number -function CircularSector:half_angle(_self) end - ----@param _self CircularSector ----@return number -function CircularSector:arc_length(_self) end - ----@param _self CircularSector ----@return number -function CircularSector:chord_length(_self) end - ----@param _self CircularSector ----@return number -function CircularSector:radius(_self) end - ----@param radius number ----@param angle number ----@return CircularSector -function CircularSector.from_radians(radius,angle) end - ----@param radius number ----@param angle number ----@return CircularSector -function CircularSector.from_degrees(radius,angle) end - ----@param _self CircularSector ----@return number -function CircularSector:half_chord_length(_self) end - ----@param radius number ----@param fraction number ----@return CircularSector -function CircularSector.from_turns(radius,fraction) end - - ----@class CircularSegment : ReflectReference ---- A primitive representing a circular segment: ---- the area enclosed by the arc of a circle and its chord (the line between its endpoints). ---- ---- The segment is drawn starting from [`Vec2::Y`], extending equally on either side. ---- To orient the segment differently, apply a rotation. ---- The segment is drawn with the center of its circle at the origin [`Vec2::ZERO`]. ---- When positioning a segment, the [`apothem`](Self::apothem) function may be particularly useful. ---- ---- **Warning:** Circular segments with negative angle or radius, or with angle greater than an entire circle, are not officially supported. ---- We recommend normalizing circular segments to have an angle in [0, 2π]. ----@field arc ? Arc2d -CircularSegment = {} - ----@param radius number ----@param angle number ----@return CircularSegment -function CircularSegment.from_degrees(radius,angle) end - ----@param _self CircularSegment ----@return Vec2 -function CircularSegment:chord_midpoint(_self) end - ----@param _self CircularSegment ----@return number -function CircularSegment:chord_length(_self) end - ----@param _self CircularSegment ----@param other CircularSegment ----@return boolean -function CircularSegment:eq(_self,other) end - ----@param _self CircularSegment ----@return number -function CircularSegment:radius(_self) end - ----@param _self CircularSegment ----@return number -function CircularSegment:half_angle(_self) end - ----@param _self CircularSegment ----@return number -function CircularSegment:apothem(_self) end - ----@param _self CircularSegment ----@return number -function CircularSegment:angle(_self) end - ----@param _self CircularSegment ----@return CircularSegment -function CircularSegment:clone(_self) end - ----@param radius number ----@param fraction number ----@return CircularSegment -function CircularSegment.from_turns(radius,fraction) end - ----@param radius number ----@param angle number ----@return CircularSegment -function CircularSegment.from_radians(radius,angle) end - ----@param _self CircularSegment ----@return number -function CircularSegment:arc_length(_self) end - ----@param _self CircularSegment ----@return number -function CircularSegment:half_chord_length(_self) end - ----@param _self CircularSegment ----@return number -function CircularSegment:sagitta(_self) end - ----@param radius number ----@param angle number ----@return CircularSegment -function CircularSegment.new(radius,angle) end - - ----@class Ellipse : ReflectReference ---- An ellipse primitive, which is like a circle, but the width and height can be different ----@field half_size ? Vec2 -Ellipse = {} - ----@param _self Ellipse ----@return number -function Ellipse:focal_length(_self) end - ----@param _self Ellipse ----@param other Ellipse ----@return boolean -function Ellipse:eq(_self,other) end - ----@param half_width number ----@param half_height number ----@return Ellipse -function Ellipse.new(half_width,half_height) end - ----@param size Vec2 ----@return Ellipse -function Ellipse.from_size(size) end - ----@param _self Ellipse ----@return number -function Ellipse:semi_major(_self) end - ----@param _self Ellipse ----@return number -function Ellipse:eccentricity(_self) end - ----@param _self Ellipse ----@return number -function Ellipse:semi_minor(_self) end - ----@param _self Ellipse ----@return Ellipse -function Ellipse:clone(_self) end - - ----@class Line2d : ReflectReference ---- An infinite line going through the origin along a direction in 2D space. ---- ---- For a finite line: [`Segment2d`] ----@field direction ? Dir2 -Line2d = {} - ----@param _self Line2d ----@param other Line2d ----@return boolean -function Line2d:eq(_self,other) end - ----@param _self Line2d ----@return Line2d -function Line2d:clone(_self) end - - ----@class Plane2d : ReflectReference ---- An unbounded plane in 2D space. It forms a separating surface through the origin, ---- stretching infinitely far ----@field normal ? Dir2 -Plane2d = {} - ----@param _self Plane2d ----@param other Plane2d ----@return boolean -function Plane2d:eq(_self,other) end - ----@param normal Vec2 ----@return Plane2d -function Plane2d.new(normal) end - ----@param _self Plane2d ----@return Plane2d -function Plane2d:clone(_self) end - - ----@class Rectangle : ReflectReference ---- A rectangle primitive, which is like a square, except that the width and height can be different ----@field half_size ? Vec2 -Rectangle = {} - ----@param _self Rectangle ----@param other Rectangle ----@return boolean -function Rectangle:eq(_self,other) end - ----@param _self Rectangle ----@param point Vec2 ----@return Vec2 -function Rectangle:closest_point(_self,point) end - ----@param length number ----@return Rectangle -function Rectangle.from_length(length) end - ----@param point1 Vec2 ----@param point2 Vec2 ----@return Rectangle -function Rectangle.from_corners(point1,point2) end - ----@param _self Rectangle ----@return Rectangle -function Rectangle:clone(_self) end - ----@param _self Rectangle ----@return Vec2 -function Rectangle:size(_self) end - ----@param size Vec2 ----@return Rectangle -function Rectangle.from_size(size) end - ----@param width number ----@param height number ----@return Rectangle -function Rectangle.new(width,height) end - - ----@class RegularPolygon : ReflectReference ---- A polygon centered on the origin where all vertices lie on a circle, equally far apart. ----@field circumcircle ? Circle ----@field sides ? integer -RegularPolygon = {} - ----@param _self RegularPolygon ----@return number -function RegularPolygon:external_angle_degrees(_self) end - ----@param _self RegularPolygon ----@return number -function RegularPolygon:side_length(_self) end - ----@param _self RegularPolygon ----@return number -function RegularPolygon:circumradius(_self) end - ----@param _self RegularPolygon ----@return number -function RegularPolygon:external_angle_radians(_self) end - ----@param _self RegularPolygon ----@return number -function RegularPolygon:internal_angle_degrees(_self) end - ----@param _self RegularPolygon ----@param other RegularPolygon ----@return boolean -function RegularPolygon:eq(_self,other) end - ----@param _self RegularPolygon ----@return number -function RegularPolygon:internal_angle_radians(_self) end - ----@param circumradius number ----@param sides integer ----@return RegularPolygon -function RegularPolygon.new(circumradius,sides) end - ----@param _self RegularPolygon ----@return RegularPolygon -function RegularPolygon:clone(_self) end - ----@param _self RegularPolygon ----@return number -function RegularPolygon:inradius(_self) end - - ----@class Rhombus : ReflectReference ---- A rhombus primitive, also known as a diamond shape. ---- A four sided polygon, centered on the origin, where opposite sides are parallel but without ---- requiring right angles. ----@field half_diagonals ? Vec2 -Rhombus = {} - ----@param _self Rhombus ----@return Rhombus -function Rhombus:clone(_self) end - ----@param _self Rhombus ----@return number -function Rhombus:inradius(_self) end - ----@param horizontal_diagonal number ----@param vertical_diagonal number ----@return Rhombus -function Rhombus.new(horizontal_diagonal,vertical_diagonal) end - ----@param side number ----@return Rhombus -function Rhombus.from_side(side) end - ----@param _self Rhombus ----@param point Vec2 ----@return Vec2 -function Rhombus:closest_point(_self,point) end - ----@param _self Rhombus ----@return number -function Rhombus:circumradius(_self) end - ----@param _self Rhombus ----@param other Rhombus ----@return boolean -function Rhombus:eq(_self,other) end - ----@param _self Rhombus ----@return number -function Rhombus:side(_self) end - ----@param inradius number ----@return Rhombus -function Rhombus.from_inradius(inradius) end - - ----@class Segment2d : ReflectReference ---- A line segment defined by two endpoints in 2D space. ----@field vertices ? [glam::Vec2; 2] -Segment2d = {} - ----@param _self Segment2d ----@return number -function Segment2d:length_squared(_self) end - ----@param ray Ray2d ----@param length number ----@return Segment2d -function Segment2d.from_ray_and_length(ray,length) end - ----@param _self Segment2d ----@return Dir2 -function Segment2d:left_normal(_self) end - ----@param _self Segment2d ----@return Vec2 -function Segment2d:point2(_self) end - ----@param point1 Vec2 ----@param point2 Vec2 ----@return Segment2d -function Segment2d.new(point1,point2) end - ----@param _self Segment2d ----@return Vec2 -function Segment2d:center(_self) end - ----@param _self Segment2d ----@return Vec2 -function Segment2d:point1(_self) end - ----@param _self Segment2d ----@param rotation Rot2 ----@return Segment2d -function Segment2d:rotated(_self,rotation) end - ----@param _self Segment2d ----@param rotation Rot2 ----@return Segment2d -function Segment2d:rotated_around_center(_self,rotation) end - ----@param _self Segment2d ----@param rotation Rot2 ----@param point Vec2 ----@return Segment2d -function Segment2d:rotated_around(_self,rotation,point) end - ----@param direction Dir2 ----@param length number ----@return Segment2d -function Segment2d.from_direction_and_length(direction,length) end - ----@param _self Segment2d ----@return Vec2 -function Segment2d:scaled_left_normal(_self) end - ----@param _self Segment2d ----@return Segment2d -function Segment2d:centered(_self) end - ----@param _self Segment2d ----@return Dir2 -function Segment2d:right_normal(_self) end - ----@param scaled_direction Vec2 ----@return Segment2d -function Segment2d.from_scaled_direction(scaled_direction) end - ----@param _self Segment2d ----@return Dir2 -function Segment2d:direction(_self) end - ----@param _self Segment2d ----@return Vec2 -function Segment2d:scaled_right_normal(_self) end - ----@param _self Segment2d ----@return Segment2d -function Segment2d:reversed(_self) end - ----@param _self Segment2d ----@param length number ----@return Segment2d -function Segment2d:resized(_self,length) end - ----@param _self Segment2d ----@return Segment2d -function Segment2d:clone(_self) end - ----@param _self Segment2d ----@return nil -function Segment2d:reverse(_self) end - ----@param _self Segment2d ----@param other Segment2d ----@return boolean -function Segment2d:eq(_self,other) end - ----@param _self Segment2d ----@return number -function Segment2d:length(_self) end - ----@param _self Segment2d ----@param translation Vec2 ----@return Segment2d -function Segment2d:translated(_self,translation) end - ----@param _self Segment2d ----@return Vec2 -function Segment2d:scaled_direction(_self) end - - ----@class Triangle2d : ReflectReference ---- A triangle in 2D space ----@field vertices ? [glam::Vec2; 3] -Triangle2d = {} - ----@param _self Triangle2d ----@return nil -function Triangle2d:reverse(_self) end - ----@param _self Triangle2d ----@return Triangle2d -function Triangle2d:reversed(_self) end - ----@param _self Triangle2d ----@return boolean -function Triangle2d:is_acute(_self) end - ----@param _self Triangle2d ----@return boolean -function Triangle2d:is_obtuse(_self) end - ----@param _self Triangle2d ----@param other Triangle2d ----@return boolean -function Triangle2d:eq(_self,other) end - ----@param a Vec2 ----@param b Vec2 ----@param c Vec2 ----@return Triangle2d -function Triangle2d.new(a,b,c) end - ----@param _self Triangle2d ----@return Triangle2d -function Triangle2d:clone(_self) end - ----@param _self Triangle2d ----@return boolean -function Triangle2d:is_degenerate(_self) end - - ----@class Capsule3d : ReflectReference ---- A 3D capsule primitive centered on the origin ---- A three-dimensional capsule is defined as a surface at a distance (radius) from a line ----@field radius ? number ----@field half_length ? number -Capsule3d = {} - ----@param _self Capsule3d ----@return Cylinder -function Capsule3d:to_cylinder(_self) end - ----@param _self Capsule3d ----@return Capsule3d -function Capsule3d:clone(_self) end - ----@param _self Capsule3d ----@param other Capsule3d ----@return boolean -function Capsule3d:eq(_self,other) end - ----@param radius number ----@param length number ----@return Capsule3d -function Capsule3d.new(radius,length) end - - ----@class Cone : ReflectReference ---- A cone primitive centered on the midpoint between the tip of the cone and the center of its base. ---- ---- The cone is oriented with its tip pointing towards the Y axis. ----@field radius ? number ----@field height ? number -Cone = {} - ----@param _self Cone ----@return number -function Cone:slant_height(_self) end - ----@param _self Cone ----@return number -function Cone:base_area(_self) end - ----@param radius number ----@param height number ----@return Cone -function Cone.new(radius,height) end - ----@param _self Cone ----@return Cone -function Cone:clone(_self) end - ----@param _self Cone ----@param other Cone ----@return boolean -function Cone:eq(_self,other) end - ----@param _self Cone ----@return number -function Cone:lateral_area(_self) end - ----@param _self Cone ----@return Circle -function Cone:base(_self) end - - ----@class ConicalFrustum : ReflectReference ---- A conical frustum primitive. ---- A conical frustum can be created ---- by slicing off a section of a cone. ----@field radius_top ? number ----@field radius_bottom ? number ----@field height ? number -ConicalFrustum = {} - ----@param _self ConicalFrustum ----@param other ConicalFrustum ----@return boolean -function ConicalFrustum:eq(_self,other) end - ----@param _self ConicalFrustum ----@return ConicalFrustum -function ConicalFrustum:clone(_self) end - - ----@class Cuboid : ReflectReference ---- A cuboid primitive, which is like a cube, except that the x, y, and z dimensions are not ---- required to be the same. ----@field half_size ? Vec3 -Cuboid = {} - ----@param _self Cuboid ----@param point Vec3 ----@return Vec3 -function Cuboid:closest_point(_self,point) end - ----@param length number ----@return Cuboid -function Cuboid.from_length(length) end - ----@param _self Cuboid ----@return Cuboid -function Cuboid:clone(_self) end - ----@param _self Cuboid ----@param other Cuboid ----@return boolean -function Cuboid:eq(_self,other) end - ----@param size Vec3 ----@return Cuboid -function Cuboid.from_size(size) end - ----@param _self Cuboid ----@return Vec3 -function Cuboid:size(_self) end - ----@param x_length number ----@param y_length number ----@param z_length number ----@return Cuboid -function Cuboid.new(x_length,y_length,z_length) end - ----@param point1 Vec3 ----@param point2 Vec3 ----@return Cuboid -function Cuboid.from_corners(point1,point2) end - - ----@class Cylinder : ReflectReference ---- A cylinder primitive centered on the origin ----@field radius ? number ----@field half_height ? number -Cylinder = {} - ----@param _self Cylinder ----@param other Cylinder ----@return boolean -function Cylinder:eq(_self,other) end - ----@param _self Cylinder ----@return number -function Cylinder:lateral_area(_self) end - ----@param radius number ----@param height number ----@return Cylinder -function Cylinder.new(radius,height) end - ----@param _self Cylinder ----@return Circle -function Cylinder:base(_self) end - ----@param _self Cylinder ----@return Cylinder -function Cylinder:clone(_self) end - ----@param _self Cylinder ----@return number -function Cylinder:base_area(_self) end - - ----@class InfinitePlane3d : ReflectReference ---- An unbounded plane in 3D space. It forms a separating surface through the origin, ---- stretching infinitely far ----@field normal ? Dir3 -InfinitePlane3d = {} - ----@param _self InfinitePlane3d ----@param other InfinitePlane3d ----@return boolean -function InfinitePlane3d:eq(_self,other) end - ----@param _self InfinitePlane3d ----@return InfinitePlane3d -function InfinitePlane3d:clone(_self) end - ----@param _self InfinitePlane3d ----@param origin Vec3 ----@return Isometry3d -function InfinitePlane3d:isometry_from_xy(_self,origin) end - ----@param _self InfinitePlane3d ----@param origin Vec3 ----@return Isometry3d -function InfinitePlane3d:isometry_into_xy(_self,origin) end - - ----@class Line3d : ReflectReference ---- An infinite line going through the origin along a direction in 3D space. ---- ---- For a finite line: [`Segment3d`] ----@field direction ? Dir3 -Line3d = {} - ----@param _self Line3d ----@return Line3d -function Line3d:clone(_self) end - ----@param _self Line3d ----@param other Line3d ----@return boolean -function Line3d:eq(_self,other) end - - ----@class Plane3d : ReflectReference ---- A bounded plane in 3D space. It forms a surface starting from the origin with a defined height and width. ----@field normal ? Dir3 ----@field half_size ? Vec2 -Plane3d = {} - ----@param _self Plane3d ----@return Plane3d -function Plane3d:clone(_self) end - ----@param normal Vec3 ----@param half_size Vec2 ----@return Plane3d -function Plane3d.new(normal,half_size) end - ----@param _self Plane3d ----@param other Plane3d ----@return boolean -function Plane3d:eq(_self,other) end - - ----@class Segment3d : ReflectReference ---- A line segment defined by two endpoints in 3D space. ----@field vertices ? [glam::Vec3; 2] -Segment3d = {} - ----@param _self Segment3d ----@return Vec3 -function Segment3d:scaled_direction(_self) end - ----@param scaled_direction Vec3 ----@return Segment3d -function Segment3d.from_scaled_direction(scaled_direction) end - ----@param direction Dir3 ----@param length number ----@return Segment3d -function Segment3d.from_direction_and_length(direction,length) end - ----@param _self Segment3d ----@param rotation Quat ----@return Segment3d -function Segment3d:rotated(_self,rotation) end - ----@param _self Segment3d ----@return number -function Segment3d:length(_self) end - ----@param _self Segment3d ----@param translation Vec3 ----@return Segment3d -function Segment3d:translated(_self,translation) end - ----@param _self Segment3d ----@return nil -function Segment3d:reverse(_self) end - ----@param _self Segment3d ----@return Vec3 -function Segment3d:center(_self) end - ----@param _self Segment3d ----@return Dir3 -function Segment3d:direction(_self) end - ----@param _self Segment3d ----@return number -function Segment3d:length_squared(_self) end - ----@param _self Segment3d ----@return Vec3 -function Segment3d:point1(_self) end - ----@param _self Segment3d ----@param rotation Quat ----@param point Vec3 ----@return Segment3d -function Segment3d:rotated_around(_self,rotation,point) end - ----@param _self Segment3d ----@param rotation Quat ----@return Segment3d -function Segment3d:rotated_around_center(_self,rotation) end - ----@param _self Segment3d ----@param other Segment3d ----@return boolean -function Segment3d:eq(_self,other) end - ----@param _self Segment3d ----@return Segment3d -function Segment3d:clone(_self) end - ----@param _self Segment3d ----@return Vec3 -function Segment3d:point2(_self) end - ----@param _self Segment3d ----@return Segment3d -function Segment3d:reversed(_self) end - ----@param ray Ray3d ----@param length number ----@return Segment3d -function Segment3d.from_ray_and_length(ray,length) end - ----@param _self Segment3d ----@param length number ----@return Segment3d -function Segment3d:resized(_self,length) end - ----@param _self Segment3d ----@return Segment3d -function Segment3d:centered(_self) end - ----@param point1 Vec3 ----@param point2 Vec3 ----@return Segment3d -function Segment3d.new(point1,point2) end - - ----@class Sphere : ReflectReference ---- A sphere primitive, representing the set of all points some distance from the origin ----@field radius ? number -Sphere = {} - ----@param _self Sphere ----@param other Sphere ----@return boolean -function Sphere:eq(_self,other) end - ----@param _self Sphere ----@return number -function Sphere:diameter(_self) end - ----@param _self Sphere ----@param point Vec3 ----@return Vec3 -function Sphere:closest_point(_self,point) end - ----@param _self Sphere ----@return Sphere -function Sphere:clone(_self) end - ----@param radius number ----@return Sphere -function Sphere.new(radius) end - - ----@class Tetrahedron : ReflectReference ---- A tetrahedron primitive. ----@field vertices ? [glam::Vec3; 4] -Tetrahedron = {} - ----@param _self Tetrahedron ----@return Vec3 -function Tetrahedron:centroid(_self) end - ----@param _self Tetrahedron ----@return Tetrahedron -function Tetrahedron:clone(_self) end - ----@param _self Tetrahedron ----@return number -function Tetrahedron:signed_volume(_self) end - ----@param _self Tetrahedron ----@param other Tetrahedron ----@return boolean -function Tetrahedron:eq(_self,other) end - ----@param a Vec3 ----@param b Vec3 ----@param c Vec3 ----@param d Vec3 ----@return Tetrahedron -function Tetrahedron.new(a,b,c,d) end - - ----@class Torus : ReflectReference ---- A torus primitive, often representing a ring or donut shape ---- The set of points some distance from a circle centered at the origin ----@field minor_radius ? number ----@field major_radius ? number -Torus = {} - ----@param _self Torus ----@return number -function Torus:inner_radius(_self) end - ----@param _self Torus ----@return Torus -function Torus:clone(_self) end - ----@param inner_radius number ----@param outer_radius number ----@return Torus -function Torus.new(inner_radius,outer_radius) end - ----@param _self Torus ----@return number -function Torus:outer_radius(_self) end - ----@param _self Torus ----@param other Torus ----@return boolean -function Torus:eq(_self,other) end - - ----@class Triangle3d : ReflectReference ---- A 3D triangle primitive. ----@field vertices ? [glam::Vec3; 3] -Triangle3d = {} - ----@param _self Triangle3d ----@param other Triangle3d ----@return boolean -function Triangle3d:eq(_self,other) end - ----@param _self Triangle3d ----@return nil -function Triangle3d:reverse(_self) end - ----@param a Vec3 ----@param b Vec3 ----@param c Vec3 ----@return Triangle3d -function Triangle3d.new(a,b,c) end - ----@param _self Triangle3d ----@return boolean -function Triangle3d:is_obtuse(_self) end - ----@param _self Triangle3d ----@return Triangle3d -function Triangle3d:clone(_self) end - ----@param _self Triangle3d ----@return boolean -function Triangle3d:is_degenerate(_self) end - ----@param _self Triangle3d ----@return Vec3 -function Triangle3d:circumcenter(_self) end - ----@param _self Triangle3d ----@return Vec3 -function Triangle3d:centroid(_self) end - ----@param _self Triangle3d ----@return Triangle3d -function Triangle3d:reversed(_self) end - ----@param _self Triangle3d ----@return boolean -function Triangle3d:is_acute(_self) end - - ----@class Ray2d : ReflectReference ---- An infinite half-line starting at `origin` and going in `direction` in 2D space. ----@field origin ? Vec2 ----@field direction ? Dir2 -Ray2d = {} - ----@param _self Ray2d ----@param distance number ----@return Vec2 -function Ray2d:get_point(_self,distance) end - ----@param _self Ray2d ----@param plane_origin Vec2 ----@param plane Plane2d ----@return number | nil -function Ray2d:intersect_plane(_self,plane_origin,plane) end - ----@param _self Ray2d ----@return Ray2d -function Ray2d:clone(_self) end - ----@param _self Ray2d ----@param other Ray2d ----@return boolean -function Ray2d:eq(_self,other) end - ----@param origin Vec2 ----@param direction Dir2 ----@return Ray2d -function Ray2d.new(origin,direction) end - - ----@class Ray3d : ReflectReference ---- An infinite half-line starting at `origin` and going in `direction` in 3D space. ----@field origin ? Vec3 ----@field direction ? Dir3 -Ray3d = {} - ----@param origin Vec3 ----@param direction Dir3 ----@return Ray3d -function Ray3d.new(origin,direction) end - ----@param _self Ray3d ----@param other Ray3d ----@return boolean -function Ray3d:eq(_self,other) end - ----@param _self Ray3d ----@return Ray3d -function Ray3d:clone(_self) end - ----@param _self Ray3d ----@param distance number ----@return Vec3 -function Ray3d:get_point(_self,distance) end - ----@param _self Ray3d ----@param plane_origin Vec3 ----@param plane InfinitePlane3d ----@return number | nil -function Ray3d:intersect_plane(_self,plane_origin,plane) end - - ----@class IRect : ReflectReference ---- A rectangle defined by two opposite corners. ---- ---- The rectangle is axis aligned, and defined by its minimum and maximum coordinates, ---- stored in `IRect::min` and `IRect::max`, respectively. The minimum/maximum invariant ---- must be upheld by the user when directly assigning the fields, otherwise some methods ---- produce invalid results. It is generally recommended to use one of the constructor ---- methods instead, which will ensure this invariant is met, unless you already have ---- the minimum and maximum corners. ----@field min ? IVec2 ----@field max ? IVec2 -IRect = {} - ----@param _self IRect ----@return IVec2 -function IRect:size(_self) end - ----@param _self IRect ----@return IRect -function IRect:clone(_self) end - ----@param _self IRect ----@return nil -function IRect:assert_receiver_is_total_eq(_self) end - ----@param _self IRect ----@return Rect -function IRect:as_rect(_self) end - ----@param _self IRect ----@return IVec2 -function IRect:half_size(_self) end - ----@param _self IRect ----@return boolean -function IRect:is_empty(_self) end - ----@param _self IRect ----@return integer -function IRect:height(_self) end - ----@param _self IRect ----@param other IRect ----@return boolean -function IRect:eq(_self,other) end - ----@param _self IRect ----@param other IRect ----@return IRect -function IRect:union(_self,other) end - ----@param _self IRect ----@param point IVec2 ----@return boolean -function IRect:contains(_self,point) end - ----@param x0 integer ----@param y0 integer ----@param x1 integer ----@param y1 integer ----@return IRect -function IRect.new(x0,y0,x1,y1) end - ----@param _self IRect ----@param other IVec2 ----@return IRect -function IRect:union_point(_self,other) end - ----@param _self IRect ----@param expansion integer ----@return IRect -function IRect:inflate(_self,expansion) end - ----@param _self IRect ----@return URect -function IRect:as_urect(_self) end - ----@param _self IRect ----@return IVec2 -function IRect:center(_self) end - ----@param _self IRect ----@param other IRect ----@return IRect -function IRect:intersect(_self,other) end - ----@param _self IRect ----@return integer -function IRect:width(_self) end - ----@param p0 IVec2 ----@param p1 IVec2 ----@return IRect -function IRect.from_corners(p0,p1) end - ----@param origin IVec2 ----@param size IVec2 ----@return IRect -function IRect.from_center_size(origin,size) end - ----@param origin IVec2 ----@param half_size IVec2 ----@return IRect -function IRect.from_center_half_size(origin,half_size) end - - ----@class Rect : ReflectReference ---- A rectangle defined by two opposite corners. ---- ---- The rectangle is axis aligned, and defined by its minimum and maximum coordinates, ---- stored in `Rect::min` and `Rect::max`, respectively. The minimum/maximum invariant ---- must be upheld by the user when directly assigning the fields, otherwise some methods ---- produce invalid results. It is generally recommended to use one of the constructor ---- methods instead, which will ensure this invariant is met, unless you already have ---- the minimum and maximum corners. ----@field min ? Vec2 ----@field max ? Vec2 -Rect = {} - ----@param _self Rect ----@return IRect -function Rect:as_irect(_self) end - ----@param _self Rect ----@return number -function Rect:height(_self) end - ----@param origin Vec2 ----@param size Vec2 ----@return Rect -function Rect.from_center_size(origin,size) end - ----@param _self Rect ----@return Vec2 -function Rect:half_size(_self) end - ----@param _self Rect ----@param other Rect ----@return Rect -function Rect:normalize(_self,other) end - ----@param _self Rect ----@return number -function Rect:width(_self) end - ----@param _self Rect ----@param expansion number ----@return Rect -function Rect:inflate(_self,expansion) end - ----@param _self Rect ----@param other Rect ----@return boolean -function Rect:eq(_self,other) end - ----@param _self Rect ----@return Rect -function Rect:clone(_self) end - ----@param _self Rect ----@param other Rect ----@return Rect -function Rect:union(_self,other) end - ----@param _self Rect ----@return Vec2 -function Rect:center(_self) end - ----@param _self Rect ----@return URect -function Rect:as_urect(_self) end - ----@param p0 Vec2 ----@param p1 Vec2 ----@return Rect -function Rect.from_corners(p0,p1) end - ----@param x0 number ----@param y0 number ----@param x1 number ----@param y1 number ----@return Rect -function Rect.new(x0,y0,x1,y1) end - ----@param _self Rect ----@return Vec2 -function Rect:size(_self) end - ----@param _self Rect ----@param other Rect ----@return Rect -function Rect:intersect(_self,other) end - ----@param origin Vec2 ----@param half_size Vec2 ----@return Rect -function Rect.from_center_half_size(origin,half_size) end - ----@param _self Rect ----@param other Vec2 ----@return Rect -function Rect:union_point(_self,other) end - ----@param _self Rect ----@return boolean -function Rect:is_empty(_self) end - ----@param _self Rect ----@param point Vec2 ----@return boolean -function Rect:contains(_self,point) end - - ----@class URect : ReflectReference ---- A rectangle defined by two opposite corners. ---- ---- The rectangle is axis aligned, and defined by its minimum and maximum coordinates, ---- stored in `URect::min` and `URect::max`, respectively. The minimum/maximum invariant ---- must be upheld by the user when directly assigning the fields, otherwise some methods ---- produce invalid results. It is generally recommended to use one of the constructor ---- methods instead, which will ensure this invariant is met, unless you already have ---- the minimum and maximum corners. ----@field min ? UVec2 ----@field max ? UVec2 -URect = {} - ----@param origin UVec2 ----@param half_size UVec2 ----@return URect -function URect.from_center_half_size(origin,half_size) end - ----@param _self URect ----@return boolean -function URect:is_empty(_self) end - ----@param _self URect ----@return nil -function URect:assert_receiver_is_total_eq(_self) end - ----@param _self URect ----@param expansion integer ----@return URect -function URect:inflate(_self,expansion) end - ----@param _self URect ----@return UVec2 -function URect:center(_self) end - ----@param _self URect ----@return URect -function URect:clone(_self) end - ----@param _self URect ----@param point UVec2 ----@return boolean -function URect:contains(_self,point) end - ----@param _self URect ----@param other URect ----@return boolean -function URect:eq(_self,other) end - ----@param _self URect ----@return integer -function URect:height(_self) end - ----@param _self URect ----@return UVec2 -function URect:size(_self) end - ----@param x0 integer ----@param y0 integer ----@param x1 integer ----@param y1 integer ----@return URect -function URect.new(x0,y0,x1,y1) end - ----@param _self URect ----@return UVec2 -function URect:half_size(_self) end - ----@param _self URect ----@param other UVec2 ----@return URect -function URect:union_point(_self,other) end - ----@param _self URect ----@return IRect -function URect:as_irect(_self) end - ----@param _self URect ----@return integer -function URect:width(_self) end - ----@param _self URect ----@return Rect -function URect:as_rect(_self) end - ----@param _self URect ----@param other URect ----@return URect -function URect:union(_self,other) end - ----@param p0 UVec2 ----@param p1 UVec2 ----@return URect -function URect.from_corners(p0,p1) end - ----@param origin UVec2 ----@param size UVec2 ----@return URect -function URect.from_center_size(origin,size) end - ----@param _self URect ----@param other URect ----@return URect -function URect:intersect(_self,other) end - - ----@class Rot2 : ReflectReference ---- A counterclockwise 2D rotation. ---- ---- # Example ---- ---- ``` ---- # use approx::assert_relative_eq; ---- # use bevy_math::{Rot2, Vec2}; ---- use std::f32::consts::PI; ---- ---- // Create rotations from radians or degrees ---- let rotation1 = Rot2::radians(PI / 2.0); ---- let rotation2 = Rot2::degrees(45.0); ---- ---- // Get the angle back as radians or degrees ---- assert_eq!(rotation1.as_degrees(), 90.0); ---- assert_eq!(rotation2.as_radians(), PI / 4.0); ---- ---- // "Add" rotations together using `*` ---- #[cfg(feature = "approx")] ---- assert_relative_eq!(rotation1 * rotation2, Rot2::degrees(135.0)); ---- ---- // Rotate vectors ---- #[cfg(feature = "approx")] ---- assert_relative_eq!(rotation1 * Vec2::X, Vec2::Y); ---- ``` ----@field cos ? number ----@field sin ? number -Rot2 = {} - ----@param _self Rot2 ----@param other Rot2 ----@return number -function Rot2:angle_to(_self,other) end - ----@param degrees number ----@return Rot2 -function Rot2.degrees(degrees) end - ----@param _self Rot2 ----@return number -function Rot2:as_radians(_self) end - ----@param p1 Rot2 ----@param p2 Vec2 ----@return Vec2 -function Rot2:mul(p1,p2) end - ----@param _self Rot2 ----@return boolean -function Rot2:is_finite(_self) end - ----@param _self Rot2 ----@return number -function Rot2:length_recip(_self) end - ----@param _self Rot2 ----@return number -function Rot2:as_turn_fraction(_self) end - ----@param _self Rot2 ----@param _end Rot2 ----@param s number ----@return Rot2 -function Rot2:slerp(_self,_end,s) end - ----@param _self Rot2 ----@return number -function Rot2:length_squared(_self) end - ----@param _self Rot2 ----@param rhs Rot2 ----@return Rot2 -function Rot2:mul(_self,rhs) end - ----@param _self Rot2 ----@return Rot2 -function Rot2:inverse(_self) end - ----@param _self Rot2 ----@return Rot2 -function Rot2:normalize(_self) end - ----@param _self Rot2 ----@param other Rot2 ----@return boolean -function Rot2:eq(_self,other) end - ----@param radians number ----@return Rot2 -function Rot2.radians(radians) end - ----@param _self Rot2 ----@return Rot2 -function Rot2:fast_renormalize(_self) end - ----@param _self Rot2 ----@return Rot2 -function Rot2:clone(_self) end - ----@param _self Rot2 ----@return boolean -function Rot2:is_near_identity(_self) end - ----@param _self Rot2 ----@return boolean -function Rot2:is_nan(_self) end - ----@param _self Rot2 ----@return [number, number] -function Rot2:sin_cos(_self) end - ----@param p1 Rot2 ----@param p2 Dir2 ----@return Dir2 -function Rot2:mul(p1,p2) end - ----@param sin number ----@param cos number ----@return Rot2 -function Rot2.from_sin_cos(sin,cos) end - ----@param _self Rot2 ----@param _end Rot2 ----@param s number ----@return Rot2 -function Rot2:nlerp(_self,_end,s) end - ----@param _self Rot2 ----@return boolean -function Rot2:is_normalized(_self) end - ----@param _self Rot2 ----@return number -function Rot2:as_degrees(_self) end - ----@param _self Rot2 ----@return number -function Rot2:length(_self) end - ----@param fraction number ----@return Rot2 -function Rot2.turn_fraction(fraction) end - - ----@class Instant : ReflectReference -Instant = {} - ----@param _self Instant ----@param other Duration ----@return Instant -function Instant:add(_self,other) end - ----@param _self Instant ----@param earlier Instant ----@return Duration -function Instant:saturating_duration_since(_self,earlier) end - ----@param p1 Instant ----@param p2 Instant ----@return Duration -function Instant:sub(p1,p2) end - ----@param _self Instant ----@param earlier Instant ----@return Duration -function Instant:duration_since(_self,earlier) end - ----@param _self Instant ----@param other Duration ----@return Instant -function Instant:sub(_self,other) end - ----@param _self Instant ----@param other Instant ----@return boolean -function Instant:eq(_self,other) end - ----@param _self Instant ----@return Instant -function Instant:clone(_self) end - ----@param _self Instant ----@return nil -function Instant:assert_receiver_is_total_eq(_self) end - ----@param _self Instant ----@return Duration -function Instant:elapsed(_self) end - ----@return Instant -function Instant.now() end - - ----@class Fixed : ReflectReference ---- The fixed timestep game clock following virtual time. ---- ---- A specialization of the [`Time`] structure. **For method documentation, see ---- [`Time#impl-Time`].** ---- ---- It is automatically inserted as a resource by ---- [`TimePlugin`](crate::TimePlugin) and updated based on ---- [`Time`](Virtual). The fixed clock is automatically set as the ---- generic [`Time`] resource during [`FixedUpdate`](bevy_app::FixedUpdate) ---- schedule processing. ---- ---- The fixed timestep clock advances in fixed-size increments, which is ---- extremely useful for writing logic (like physics) that should have ---- consistent behavior, regardless of framerate. ---- ---- The default [`timestep()`](Time::timestep) is 64 hertz, or 15625 ---- microseconds. This value was chosen because using 60 hertz has the potential ---- for a pathological interaction with the monitor refresh rate where the game ---- alternates between running two fixed timesteps and zero fixed timesteps per ---- frame (for example when running two fixed timesteps takes longer than a ---- frame). Additionally, the value is a power of two which losslessly converts ---- into [`f32`] and [`f64`]. ---- ---- To run a system on a fixed timestep, add it to one of the [`FixedMain`] ---- schedules, most commonly [`FixedUpdate`](bevy_app::FixedUpdate). ---- ---- This schedule is run a number of times between ---- [`PreUpdate`](bevy_app::PreUpdate) and [`Update`](bevy_app::Update) ---- according to the accumulated [`overstep()`](Time::overstep) time divided by ---- the [`timestep()`](Time::timestep). This means the schedule may run 0, 1 or ---- more times during a single update (which typically corresponds to a rendered ---- frame). ---- ---- `Time` and the generic [`Time`] resource will report a ---- [`delta()`](Time::delta) equal to [`timestep()`](Time::timestep) and always ---- grow [`elapsed()`](Time::elapsed) by one [`timestep()`](Time::timestep) per ---- iteration. ---- ---- The fixed timestep clock follows the [`Time`](Virtual) clock, which ---- means it is affected by [`pause()`](Time::pause), ---- [`set_relative_speed()`](Time::set_relative_speed) and ---- [`set_max_delta()`](Time::set_max_delta) from virtual time. If the virtual ---- clock is paused, the [`FixedUpdate`](bevy_app::FixedUpdate) schedule will ---- not run. It is guaranteed that the [`elapsed()`](Time::elapsed) time in ---- `Time` is always between the previous `elapsed()` and the current ---- `elapsed()` value in `Time`, so the values are compatible. ---- ---- Changing the timestep size while the game is running should not normally be ---- done, as having a regular interval is the point of this schedule, but it may ---- be necessary for effects like "bullet-time" if the normal granularity of the ---- fixed timestep is too big for the slowed down time. In this case, ---- [`set_timestep()`](Time::set_timestep) and be called to set a new value. The ---- new value will be used immediately for the next run of the ---- [`FixedUpdate`](bevy_app::FixedUpdate) schedule, meaning that it will affect ---- the [`delta()`](Time::delta) value for the very next ---- [`FixedUpdate`](bevy_app::FixedUpdate), even if it is still during the same ---- frame. Any [`overstep()`](Time::overstep) present in the accumulator will be ---- processed according to the new [`timestep()`](Time::timestep) value. ----@field timestep ? Duration ----@field overstep ? Duration -Fixed = {} - ----@param _self Fixed ----@return Fixed -function Fixed:clone(_self) end - - ----@class Real : ReflectReference ---- Real time clock representing elapsed wall clock time. ---- ---- A specialization of the [`Time`] structure. **For method documentation, see ---- [`Time#impl-Time`].** ---- ---- It is automatically inserted as a resource by ---- [`TimePlugin`](crate::TimePlugin) and updated with time instants according ---- to [`TimeUpdateStrategy`](crate::TimeUpdateStrategy).[^disclaimer] ---- ---- Note: ---- Using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration) ---- allows for mocking the wall clock for testing purposes. ---- Besides this use case, it is not recommended to do this, as it will no longer ---- represent "wall clock" time as intended. ---- ---- The [`delta()`](Time::delta) and [`elapsed()`](Time::elapsed) values of this ---- clock should be used for anything which deals specifically with real time ---- (wall clock time). It will not be affected by relative game speed ---- adjustments, pausing or other adjustments.[^disclaimer] ---- ---- The clock does not count time from [`startup()`](Time::startup) to ---- [`first_update()`](Time::first_update()) into elapsed, but instead will ---- start counting time from the first update call. [`delta()`](Time::delta) and ---- [`elapsed()`](Time::elapsed) will report zero on the first update as there ---- is no previous update instant. This means that a [`delta()`](Time::delta) of ---- zero must be handled without errors in application logic, as it may ---- theoretically also happen at other times. ---- ---- [`Instant`]s for [`startup()`](Time::startup), ---- [`first_update()`](Time::first_update) and ---- [`last_update()`](Time::last_update) are recorded and accessible. ---- ---- [^disclaimer]: When using [`TimeUpdateStrategy::ManualDuration`](crate::TimeUpdateStrategy::ManualDuration), ---- [`Time#impl-Time`] is only a *mock* of wall clock time. ---- ----@field startup ? Instant ----@field first_update ? Option ----@field last_update ? Option -Real = {} - ----@param _self Real ----@return Real -function Real:clone(_self) end - - ----@class Stopwatch : ReflectReference ---- A Stopwatch is a struct that tracks elapsed time when started. ---- ---- Note that in order to advance the stopwatch [`tick`](Stopwatch::tick) **MUST** be called. ---- # Examples ---- ---- ``` ---- # use bevy_time::*; ---- use std::time::Duration; ---- let mut stopwatch = Stopwatch::new(); ---- assert_eq!(stopwatch.elapsed_secs(), 0.0); ---- ---- stopwatch.tick(Duration::from_secs_f32(1.0)); // tick one second ---- assert_eq!(stopwatch.elapsed_secs(), 1.0); ---- ---- stopwatch.pause(); ---- stopwatch.tick(Duration::from_secs_f32(1.0)); // paused stopwatches don't tick ---- assert_eq!(stopwatch.elapsed_secs(), 1.0); ---- ---- stopwatch.reset(); // reset the stopwatch ---- assert!(stopwatch.is_paused()); ---- assert_eq!(stopwatch.elapsed_secs(), 0.0); ---- ``` ----@field elapsed ? Duration ----@field is_paused ? boolean -Stopwatch = {} - ----@param _self Stopwatch ----@return nil -function Stopwatch:pause(_self) end - ----@return Stopwatch -function Stopwatch.new() end - ----@param _self Stopwatch ----@return Stopwatch -function Stopwatch:clone(_self) end - ----@param _self Stopwatch ----@return number -function Stopwatch:elapsed_secs(_self) end - ----@param _self Stopwatch ----@param time Duration ----@return nil -function Stopwatch:set_elapsed(_self,time) end - ----@param _self Stopwatch ----@param other Stopwatch ----@return boolean -function Stopwatch:eq(_self,other) end - ----@param _self Stopwatch ----@return nil -function Stopwatch:reset(_self) end - ----@param _self Stopwatch ----@return Duration -function Stopwatch:elapsed(_self) end - ----@param _self Stopwatch ----@return nil -function Stopwatch:unpause(_self) end - ----@param _self Stopwatch ----@return boolean -function Stopwatch:is_paused(_self) end - ----@param _self Stopwatch ----@return number -function Stopwatch:elapsed_secs_f64(_self) end - ----@param _self Stopwatch ----@return nil -function Stopwatch:assert_receiver_is_total_eq(_self) end - - ----@class Timer : ReflectReference ---- Tracks elapsed time. Enters the finished state once `duration` is reached. ---- ---- Non repeating timers will stop tracking and stay in the finished state until reset. ---- Repeating timers will only be in the finished state on each tick `duration` is reached or ---- exceeded, and can still be reset at any given point. ---- ---- Paused timers will not have elapsed time increased. ---- ---- Note that in order to advance the timer [`tick`](Timer::tick) **MUST** be called. ----@field stopwatch ? Stopwatch ----@field duration ? Duration ----@field mode ? TimerMode ----@field finished ? boolean ----@field times_finished_this_tick ? integer -Timer = {} - ----@param duration Duration ----@param mode TimerMode ----@return Timer -function Timer.new(duration,mode) end - ----@param _self Timer ----@param other Timer ----@return boolean -function Timer:eq(_self,other) end - ----@param _self Timer ----@return nil -function Timer:unpause(_self) end - ----@param _self Timer ----@return boolean -function Timer:just_finished(_self) end - ----@param _self Timer ----@param duration Duration ----@return nil -function Timer:set_duration(_self,duration) end - ----@param _self Timer ----@return boolean -function Timer:paused(_self) end - ----@param _self Timer ----@return TimerMode -function Timer:mode(_self) end - ----@param _self Timer ----@return Duration -function Timer:duration(_self) end - ----@param _self Timer ----@param time Duration ----@return nil -function Timer:set_elapsed(_self,time) end - ----@param duration number ----@param mode TimerMode ----@return Timer -function Timer.from_seconds(duration,mode) end - ----@param _self Timer ----@return nil -function Timer:reset(_self) end - ----@param _self Timer ----@return boolean -function Timer:finished(_self) end - ----@param _self Timer ----@return Duration -function Timer:remaining(_self) end - ----@param _self Timer ----@return number -function Timer:elapsed_secs(_self) end - ----@param _self Timer ----@return number -function Timer:remaining_secs(_self) end - ----@param _self Timer ----@return nil -function Timer:assert_receiver_is_total_eq(_self) end - ----@param _self Timer ----@return number -function Timer:fraction_remaining(_self) end - ----@param _self Timer ----@return number -function Timer:fraction(_self) end - ----@param _self Timer ----@return number -function Timer:elapsed_secs_f64(_self) end - ----@param _self Timer ----@return integer -function Timer:times_finished_this_tick(_self) end - ----@param _self Timer ----@return Duration -function Timer:elapsed(_self) end - ----@param _self Timer ----@param mode TimerMode ----@return nil -function Timer:set_mode(_self,mode) end - ----@param _self Timer ----@return Timer -function Timer:clone(_self) end - ----@param _self Timer ----@return nil -function Timer:pause(_self) end - - ----@class TimerMode : ReflectReference ---- Specifies [`Timer`] behavior. -TimerMode = {} - ----@param _self TimerMode ----@return TimerMode -function TimerMode:clone(_self) end - ----@param _self TimerMode ----@param other TimerMode ----@return boolean -function TimerMode:eq(_self,other) end - ----@param _self TimerMode ----@return nil -function TimerMode:assert_receiver_is_total_eq(_self) end - - ----@class Virtual : ReflectReference ---- The virtual game clock representing game time. ---- ---- A specialization of the [`Time`] structure. **For method documentation, see ---- [`Time#impl-Time`].** ---- ---- Normally used as `Time`. It is automatically inserted as a resource ---- by [`TimePlugin`](crate::TimePlugin) and updated based on ---- [`Time`](Real). The virtual clock is automatically set as the default ---- generic [`Time`] resource for the update. ---- ---- The virtual clock differs from real time clock in that it can be paused, sped up ---- and slowed down. It also limits how much it can advance in a single update ---- in order to prevent unexpected behavior in cases where updates do not happen ---- at regular intervals (e.g. coming back after the program was suspended a long time). ---- ---- The virtual clock can be paused by calling [`pause()`](Time::pause) and ---- unpaused by calling [`unpause()`](Time::unpause). When the game clock is ---- paused [`delta()`](Time::delta) will be zero on each update, and ---- [`elapsed()`](Time::elapsed) will not grow. ---- [`effective_speed()`](Time::effective_speed) will return `0.0`. Calling ---- [`pause()`](Time::pause) will not affect value the [`delta()`](Time::delta) ---- value for the update currently being processed. ---- ---- The speed of the virtual clock can be changed by calling ---- [`set_relative_speed()`](Time::set_relative_speed). A value of `2.0` means ---- that virtual clock should advance twice as fast as real time, meaning that ---- [`delta()`](Time::delta) values will be double of what ---- [`Time::delta()`](Time::delta) reports and ---- [`elapsed()`](Time::elapsed) will go twice as fast as ---- [`Time::elapsed()`](Time::elapsed). Calling ---- [`set_relative_speed()`](Time::set_relative_speed) will not affect the ---- [`delta()`](Time::delta) value for the update currently being processed. ---- ---- The maximum amount of delta time that can be added by a single update can be ---- set by [`set_max_delta()`](Time::set_max_delta). This value serves a dual ---- purpose in the virtual clock. ---- ---- If the game temporarily freezes due to any reason, such as disk access, a ---- blocking system call, or operating system level suspend, reporting the full ---- elapsed delta time is likely to cause bugs in game logic. Usually if a ---- laptop is suspended for an hour, it doesn't make sense to try to simulate ---- the game logic for the elapsed hour when resuming. Instead it is better to ---- lose the extra time and pretend a shorter duration of time passed. Setting ---- [`max_delta()`](Time::max_delta) to a relatively short time means that the ---- impact on game logic will be minimal. ---- ---- If the game lags for some reason, meaning that it will take a longer time to ---- compute a frame than the real time that passes during the computation, then ---- we would fall behind in processing virtual time. If this situation persists, ---- and computing a frame takes longer depending on how much virtual time has ---- passed, the game would enter a "death spiral" where computing each frame ---- takes longer and longer and the game will appear to freeze. By limiting the ---- maximum time that can be added at once, we also limit the amount of virtual ---- time the game needs to compute for each frame. This means that the game will ---- run slow, and it will run slower than real time, but it will not freeze and ---- it will recover as soon as computation becomes fast again. ---- ---- You should set [`max_delta()`](Time::max_delta) to a value that is ---- approximately the minimum FPS your game should have even if heavily lagged ---- for a moment. The actual FPS when lagged will be somewhat lower than this, ---- depending on how much more time it takes to compute a frame compared to real ---- time. You should also consider how stable your FPS is, as the limit will ---- also dictate how big of an FPS drop you can accept without losing time and ---- falling behind real time. ----@field max_delta ? Duration ----@field paused ? boolean ----@field relative_speed ? number ----@field effective_speed ? number -Virtual = {} - ----@param _self Virtual ----@return Virtual -function Virtual:clone(_self) end - - ----@class GlobalTransform : ReflectReference ---- [`GlobalTransform`] is an affine transformation from entity-local coordinates to worldspace coordinates. ---- ---- You cannot directly mutate [`GlobalTransform`]; instead, you change an entity's transform by manipulating ---- its [`Transform`], which indirectly causes Bevy to update its [`GlobalTransform`]. ---- ---- * To get the global transform of an entity, you should get its [`GlobalTransform`]. ---- * For transform hierarchies to work correctly, you must have both a [`Transform`] and a [`GlobalTransform`]. ---- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted. ---- ---- ## [`Transform`] and [`GlobalTransform`] ---- ---- [`Transform`] transforms an entity relative to its parent's reference frame, or relative to world space coordinates, ---- if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component. ---- ---- [`GlobalTransform`] is managed by Bevy; it is computed by successively applying the [`Transform`] of each ancestor ---- entity which has a Transform. This is done automatically by Bevy-internal systems in the system set ---- [`TransformPropagate`](crate::TransformSystem::TransformPropagate). ---- ---- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you ---- update the [`Transform`] of an entity in this schedule or after, you will notice a 1 frame lag ---- before the [`GlobalTransform`] is updated. ---- ---- # Examples ---- ---- - [`transform`][transform_example] ---- ---- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs ----@field [1] ? Affine3A -GlobalTransform = {} - ----@param scale Vec3 ----@return GlobalTransform -function GlobalTransform.from_scale(scale) end - ----@param x number ----@param y number ----@param z number ----@return GlobalTransform -function GlobalTransform.from_xyz(x,y,z) end - ----@param _self GlobalTransform ----@return Dir3 -function GlobalTransform:left(_self) end - ----@param _self GlobalTransform ----@param value Vec3 ----@return Vec3 -function GlobalTransform:mul(_self,value) end - ----@param _self GlobalTransform ----@return Dir3 -function GlobalTransform:up(_self) end - ----@param _self GlobalTransform ----@return Vec3A -function GlobalTransform:translation_vec3a(_self) end - ----@param _self GlobalTransform ----@param point Vec3 ----@return Vec3 -function GlobalTransform:transform_point(_self,point) end - ----@param rotation Quat ----@return GlobalTransform -function GlobalTransform.from_rotation(rotation) end - ----@param _self GlobalTransform ----@return Quat -function GlobalTransform:rotation(_self) end - ----@param _self GlobalTransform ----@return Dir3 -function GlobalTransform:forward(_self) end - ----@param _self GlobalTransform ----@return Vec3 -function GlobalTransform:scale(_self) end - ----@param _self GlobalTransform ----@return Dir3 -function GlobalTransform:down(_self) end - ----@param p1 GlobalTransform ----@param p2 GlobalTransform ----@return GlobalTransform -function GlobalTransform:mul(p1,p2) end - ----@param iso Isometry3d ----@return GlobalTransform -function GlobalTransform.from_isometry(iso) end - ----@param _self GlobalTransform ----@return GlobalTransform -function GlobalTransform:clone(_self) end - ----@param _self GlobalTransform ----@return Transform -function GlobalTransform:compute_transform(_self) end - ----@param _self GlobalTransform ----@return Affine3A -function GlobalTransform:affine(_self) end - ----@param _self GlobalTransform ----@param parent GlobalTransform ----@return Transform -function GlobalTransform:reparented_to(_self,parent) end - ----@param p1 GlobalTransform ----@param p2 Transform ----@return GlobalTransform -function GlobalTransform:mul(p1,p2) end - ----@param _self GlobalTransform ----@return Vec3 -function GlobalTransform:translation(_self) end - ----@param _self GlobalTransform ----@return Mat4 -function GlobalTransform:compute_matrix(_self) end - ----@param _self GlobalTransform ----@param extents Vec3A ----@return number -function GlobalTransform:radius_vec3a(_self,extents) end - ----@param _self GlobalTransform ----@param transform Transform ----@return GlobalTransform -function GlobalTransform:mul_transform(_self,transform) end - ----@param _self GlobalTransform ----@return Dir3 -function GlobalTransform:back(_self) end - ----@param _self GlobalTransform ----@return Dir3 -function GlobalTransform:right(_self) end - ----@param translation Vec3 ----@return GlobalTransform -function GlobalTransform.from_translation(translation) end - ----@param _self GlobalTransform ----@return Isometry3d -function GlobalTransform:to_isometry(_self) end - ----@param _self GlobalTransform ----@param other GlobalTransform ----@return boolean -function GlobalTransform:eq(_self,other) end - - ----@class Transform : ReflectReference ---- Describe the position of an entity. If the entity has a parent, the position is relative ---- to its parent position. ---- ---- * To place or move an entity, you should set its [`Transform`]. ---- * To get the global transform of an entity, you should get its [`GlobalTransform`]. ---- * To be displayed, an entity must have both a [`Transform`] and a [`GlobalTransform`]. ---- [`GlobalTransform`] is automatically inserted whenever [`Transform`] is inserted. ---- ---- ## [`Transform`] and [`GlobalTransform`] ---- ---- [`Transform`] is the position of an entity relative to its parent position, or the reference ---- frame if it doesn't have a [`ChildOf`](bevy_ecs::hierarchy::ChildOf) component. ---- ---- [`GlobalTransform`] is the position of an entity relative to the reference frame. ---- ---- [`GlobalTransform`] is updated from [`Transform`] by systems in the system set ---- [`TransformPropagate`](crate::TransformSystem::TransformPropagate). ---- ---- This system runs during [`PostUpdate`](bevy_app::PostUpdate). If you ---- update the [`Transform`] of an entity during this set or after, you will notice a 1 frame lag ---- before the [`GlobalTransform`] is updated. ---- ---- # Examples ---- ---- - [`transform`][transform_example] ---- ---- [transform_example]: https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs ----@field translation ? Vec3 ----@field rotation ? Quat ----@field scale ? Vec3 -Transform = {} - ----@param _self Transform ----@return boolean -function Transform:is_finite(_self) end - ----@param _self Transform ----@param point Vec3 ----@param rotation Quat ----@return nil -function Transform:rotate_around(_self,point,rotation) end - ----@param translation Vec3 ----@return Transform -function Transform.from_translation(translation) end - ----@param _self Transform ----@return Dir3 -function Transform:right(_self) end - ----@param p1 Transform ----@param p2 GlobalTransform ----@return GlobalTransform -function Transform:mul(p1,p2) end - ----@param _self Transform ----@param value Vec3 ----@return Vec3 -function Transform:mul(_self,value) end - ----@param _self Transform ----@return Dir3 -function Transform:left(_self) end - ----@param _self Transform ----@param angle number ----@return nil -function Transform:rotate_local_z(_self,angle) end - ----@param _self Transform ----@return Dir3 -function Transform:local_y(_self) end - ----@param _self Transform ----@param point Vec3 ----@param rotation Quat ----@return nil -function Transform:translate_around(_self,point,rotation) end - ----@param _self Transform ----@return Affine3A -function Transform:compute_affine(_self) end - ----@param _self Transform ----@param translation Vec3 ----@return Transform -function Transform:with_translation(_self,translation) end - ----@param _self Transform ----@param angle number ----@return nil -function Transform:rotate_z(_self,angle) end - ----@param _self Transform ----@param rotation Quat ----@return nil -function Transform:rotate(_self,rotation) end - ----@param _self Transform ----@return Dir3 -function Transform:forward(_self) end - ----@param _self Transform ----@param angle number ----@return nil -function Transform:rotate_x(_self,angle) end - ----@param _self Transform ----@param rotation Quat ----@return Transform -function Transform:with_rotation(_self,rotation) end - ----@param _self Transform ----@return Dir3 -function Transform:up(_self) end - ----@param _self Transform ----@return Dir3 -function Transform:local_x(_self) end - ----@param _self Transform ----@param point Vec3 ----@return Vec3 -function Transform:transform_point(_self,point) end - ----@param _self Transform ----@param angle number ----@return nil -function Transform:rotate_y(_self,angle) end - ----@param _self Transform ----@param transform Transform ----@return Transform -function Transform:mul_transform(_self,transform) end - ----@param _self Transform ----@return Dir3 -function Transform:down(_self) end - ----@param _self Transform ----@param other Transform ----@return boolean -function Transform:eq(_self,other) end - ----@param x number ----@param y number ----@param z number ----@return Transform -function Transform.from_xyz(x,y,z) end - ----@param rotation Quat ----@return Transform -function Transform.from_rotation(rotation) end - ----@param _self Transform ----@param axis Dir3 ----@param angle number ----@return nil -function Transform:rotate_axis(_self,axis,angle) end - ----@param _self Transform ----@param scale Vec3 ----@return Transform -function Transform:with_scale(_self,scale) end - ----@param _self Transform ----@return Transform -function Transform:clone(_self) end - ----@param iso Isometry3d ----@return Transform -function Transform.from_isometry(iso) end - ----@param _self Transform ----@return Dir3 -function Transform:back(_self) end - ----@param _self Transform ----@return Mat4 -function Transform:compute_matrix(_self) end - ----@param p1 Transform ----@param p2 Transform ----@return Transform -function Transform:mul(p1,p2) end - ----@param _self Transform ----@param angle number ----@return nil -function Transform:rotate_local_y(_self,angle) end - ----@param _self Transform ----@return Dir3 -function Transform:local_z(_self) end - ----@param world_from_local Mat4 ----@return Transform -function Transform.from_matrix(world_from_local) end - ----@param scale Vec3 ----@return Transform -function Transform.from_scale(scale) end - ----@param _self Transform ----@param angle number ----@return nil -function Transform:rotate_local_x(_self,angle) end - ----@param _self Transform ----@param axis Dir3 ----@param angle number ----@return nil -function Transform:rotate_local_axis(_self,axis,angle) end - ----@param _self Transform ----@param rotation Quat ----@return nil -function Transform:rotate_local(_self,rotation) end - ----@param _self Transform ----@return Isometry3d -function Transform:to_isometry(_self) end - - ----@class TransformTreeChanged : ReflectReference ---- An optimization for transform propagation. This ZST marker component uses change detection to ---- mark all entities of the hierarchy as "dirty" if any of their descendants have a changed ---- `Transform`. If this component is *not* marked `is_changed()`, propagation will halt. -TransformTreeChanged = {} - ----@param _self TransformTreeChanged ----@return TransformTreeChanged -function TransformTreeChanged:clone(_self) end - ----@param _self TransformTreeChanged ----@param other TransformTreeChanged ----@return boolean -function TransformTreeChanged:eq(_self,other) end - - ----@class TypeId : ReflectReference -TypeId = {} - ----@param _self TypeId ----@param other TypeId ----@return boolean -function TypeId:eq(_self,other) end - ----@param _self TypeId ----@return nil -function TypeId:assert_receiver_is_total_eq(_self) end - ----@param _self TypeId ----@return TypeId -function TypeId:clone(_self) end - - ----@class SocketAddr : ReflectReference -SocketAddr = {} - ----@param _self SocketAddr ----@param new_port integer ----@return nil -function SocketAddr:set_port(_self,new_port) end - ----@param _self SocketAddr ----@return boolean -function SocketAddr:is_ipv4(_self) end - ----@param _self SocketAddr ----@param other SocketAddr ----@return boolean -function SocketAddr:eq(_self,other) end - ----@param _self SocketAddr ----@return nil -function SocketAddr:assert_receiver_is_total_eq(_self) end - ----@param _self SocketAddr ----@return SocketAddr -function SocketAddr:clone(_self) end - ----@param _self SocketAddr ----@return integer -function SocketAddr:port(_self) end - ----@param _self SocketAddr ----@return boolean -function SocketAddr:is_ipv6(_self) end - - ----@class RangeFull : ReflectReference -RangeFull = {} - ----@param _self RangeFull ----@param other RangeFull ----@return boolean -function RangeFull:eq(_self,other) end - ----@param _self RangeFull ----@return RangeFull -function RangeFull:clone(_self) end - ----@param _self RangeFull ----@return nil -function RangeFull:assert_receiver_is_total_eq(_self) end - - ----@class AtomicBool : ReflectReference -AtomicBool = {} - ----@param _self AtomicBool ----@return boolean -function AtomicBool:into_inner(_self) end - ----@param v boolean ----@return AtomicBool -function AtomicBool.new(v) end - - ----@class AtomicI16 : ReflectReference -AtomicI16 = {} - ----@param v integer ----@return AtomicI16 -function AtomicI16.new(v) end - ----@param _self AtomicI16 ----@return integer -function AtomicI16:into_inner(_self) end - - ----@class AtomicI32 : ReflectReference -AtomicI32 = {} - ----@param _self AtomicI32 ----@return integer -function AtomicI32:into_inner(_self) end - ----@param v integer ----@return AtomicI32 -function AtomicI32.new(v) end - - ----@class AtomicI64 : ReflectReference -AtomicI64 = {} - ----@param _self AtomicI64 ----@return integer -function AtomicI64:into_inner(_self) end - ----@param v integer ----@return AtomicI64 -function AtomicI64.new(v) end - - ----@class AtomicI8 : ReflectReference -AtomicI8 = {} - ----@param v integer ----@return AtomicI8 -function AtomicI8.new(v) end - ----@param _self AtomicI8 ----@return integer -function AtomicI8:into_inner(_self) end - - ----@class AtomicIsize : ReflectReference -AtomicIsize = {} - ----@param v integer ----@return AtomicIsize -function AtomicIsize.new(v) end - ----@param _self AtomicIsize ----@return integer -function AtomicIsize:into_inner(_self) end - - ----@class AtomicU16 : ReflectReference -AtomicU16 = {} - ----@param _self AtomicU16 ----@return integer -function AtomicU16:into_inner(_self) end - ----@param v integer ----@return AtomicU16 -function AtomicU16.new(v) end - - ----@class AtomicU32 : ReflectReference -AtomicU32 = {} - ----@param _self AtomicU32 ----@return integer -function AtomicU32:into_inner(_self) end - ----@param v integer ----@return AtomicU32 -function AtomicU32.new(v) end - - ----@class AtomicU64 : ReflectReference -AtomicU64 = {} - ----@param _self AtomicU64 ----@return integer -function AtomicU64:into_inner(_self) end - ----@param v integer ----@return AtomicU64 -function AtomicU64.new(v) end - - ----@class AtomicU8 : ReflectReference -AtomicU8 = {} - ----@param v integer ----@return AtomicU8 -function AtomicU8.new(v) end - ----@param _self AtomicU8 ----@return integer -function AtomicU8:into_inner(_self) end - - ----@class AtomicUsize : ReflectReference -AtomicUsize = {} - ----@param v integer ----@return AtomicUsize -function AtomicUsize.new(v) end - ----@param _self AtomicUsize ----@return integer -function AtomicUsize:into_inner(_self) end - - ----@class Duration : ReflectReference -Duration = {} - ----@param _self Duration ----@return integer -function Duration:as_secs(_self) end - ----@param _self Duration ----@param other Duration ----@return Duration -function Duration:abs_diff(_self,other) end - ----@param _self Duration ----@param rhs Duration ----@return Duration -function Duration:sub(_self,rhs) end - ----@param _self Duration ----@param rhs integer ----@return Duration -function Duration:saturating_mul(_self,rhs) end - ----@param _self Duration ----@param rhs number ----@return Duration -function Duration:div_f64(_self,rhs) end - ----@param _self Duration ----@param rhs Duration ----@return Duration -function Duration:saturating_sub(_self,rhs) end - ----@param _self Duration ----@return integer -function Duration:as_nanos(_self) end - ----@param _self Duration ----@return integer -function Duration:subsec_nanos(_self) end - ----@param secs integer ----@return Duration -function Duration.from_secs(secs) end - ----@param _self Duration ----@return integer -function Duration:as_micros(_self) end - ----@param _self Duration ----@return number -function Duration:as_secs_f64(_self) end - ----@param _self Duration ----@param rhs integer ----@return Duration -function Duration:div(_self,rhs) end - ----@param _self Duration ----@return integer -function Duration:subsec_micros(_self) end - ----@param secs number ----@return Duration -function Duration.from_secs_f32(secs) end - ----@param _self Duration ----@param rhs number ----@return Duration -function Duration:mul_f32(_self,rhs) end - ----@param _self Duration ----@param rhs integer ----@return Duration -function Duration:mul(_self,rhs) end - ----@param nanos integer ----@return Duration -function Duration.from_nanos(nanos) end - ----@param _self Duration ----@return integer -function Duration:as_millis(_self) end - ----@param _self Duration ----@return number -function Duration:as_secs_f32(_self) end - ----@param _self Duration ----@param rhs Duration ----@return number -function Duration:div_duration_f32(_self,rhs) end - ----@param _self Duration ----@return nil -function Duration:assert_receiver_is_total_eq(_self) end - ----@param secs number ----@return Duration -function Duration.from_secs_f64(secs) end - ----@param _self Duration ----@param other Duration ----@return boolean -function Duration:eq(_self,other) end - ----@param _self Duration ----@param rhs number ----@return Duration -function Duration:mul_f64(_self,rhs) end - ----@param _self Duration ----@param rhs number ----@return Duration -function Duration:div_f32(_self,rhs) end - ----@param micros integer ----@return Duration -function Duration.from_micros(micros) end - ----@param _self Duration ----@param rhs Duration ----@return number -function Duration:div_duration_f64(_self,rhs) end - ----@param _self Duration ----@return integer -function Duration:subsec_millis(_self) end - ----@param _self Duration ----@param rhs Duration ----@return Duration -function Duration:saturating_add(_self,rhs) end - ----@param _self Duration ----@return boolean -function Duration:is_zero(_self) end - ----@param _self Duration ----@param rhs Duration ----@return Duration -function Duration:add(_self,rhs) end - ----@param secs integer ----@param nanos integer ----@return Duration -function Duration.new(secs,nanos) end - ----@param millis integer ----@return Duration -function Duration.from_millis(millis) end - ----@param _self Duration ----@return Duration -function Duration:clone(_self) end - - ----@class Affine2 : ReflectReference ----@field matrix2 ? Mat2 ----@field translation ? Vec2 -Affine2 = {} - ----@param matrix2 Mat2 ----@param translation Vec2 ----@return Affine2 -function Affine2.from_mat2_translation(matrix2,translation) end - ----@param scale Vec2 ----@return Affine2 -function Affine2.from_scale(scale) end - ----@param matrix2 Mat2 ----@return Affine2 -function Affine2.from_mat2(matrix2) end - ----@param _self Affine2 ----@param rhs Affine2 ----@return boolean -function Affine2:eq(_self,rhs) end - ----@param _self Affine2 ----@return number[][] -function Affine2:to_cols_array_2d(_self) end - ----@param _self Affine2 ----@return boolean -function Affine2:is_finite(_self) end - ----@param translation Vec2 ----@return Affine2 -function Affine2.from_translation(translation) end - ----@param _self Affine2 ----@param rhs Affine2 ----@return Affine2 -function Affine2:mul(_self,rhs) end - ----@param _self Affine2 ----@return Affine2 -function Affine2:clone(_self) end - ----@param m Mat3 ----@return Affine2 -function Affine2.from_mat3(m) end - ----@param p1 Affine2 ----@param p2 Mat3A ----@return Mat3A -function Affine2:mul(p1,p2) end - ----@param _self Affine2 ----@param rhs Affine2 ----@param max_abs_diff number ----@return boolean -function Affine2:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param angle number ----@return Affine2 -function Affine2.from_angle(angle) end - ----@param _self Affine2 ----@return Affine2 -function Affine2:inverse(_self) end - ----@param p1 Affine2 ----@param p2 Mat3 ----@return Mat3 -function Affine2:mul(p1,p2) end - ----@param x_axis Vec2 ----@param y_axis Vec2 ----@param z_axis Vec2 ----@return Affine2 -function Affine2.from_cols(x_axis,y_axis,z_axis) end - ----@param m Mat3A ----@return Affine2 -function Affine2.from_mat3a(m) end - ----@param _self Affine2 ----@param rhs Vec2 ----@return Vec2 -function Affine2:transform_point2(_self,rhs) end - ----@param _self Affine2 ----@return boolean -function Affine2:is_nan(_self) end - ----@param _self Affine2 ----@return number[] -function Affine2:to_cols_array(_self) end - ----@param _self Affine2 ----@param rhs Vec2 ----@return Vec2 -function Affine2:transform_vector2(_self,rhs) end - ----@param scale Vec2 ----@param angle number ----@param translation Vec2 ----@return Affine2 -function Affine2.from_scale_angle_translation(scale,angle,translation) end - ----@param angle number ----@param translation Vec2 ----@return Affine2 -function Affine2.from_angle_translation(angle,translation) end - - ----@class Affine3A : ReflectReference ----@field matrix3 ? Mat3A ----@field translation ? Vec3A -Affine3A = {} - ----@param axis Vec3 ----@param angle number ----@return Affine3A -function Affine3A.from_axis_angle(axis,angle) end - ----@param angle number ----@return Affine3A -function Affine3A.from_rotation_x(angle) end - ----@param eye Vec3 ----@param dir Vec3 ----@param up Vec3 ----@return Affine3A -function Affine3A.look_to_lh(eye,dir,up) end - ----@param _self Affine3A ----@param rhs Vec3 ----@return Vec3 -function Affine3A:transform_point3(_self,rhs) end - ----@param _self Affine3A ----@return number[][] -function Affine3A:to_cols_array_2d(_self) end - ----@param mat3 Mat3 ----@return Affine3A -function Affine3A.from_mat3(mat3) end - ----@param scale Vec3 ----@return Affine3A -function Affine3A.from_scale(scale) end - ----@param p1 Affine3A ----@param p2 Mat4 ----@return Mat4 -function Affine3A:mul(p1,p2) end - ----@param scale Vec3 ----@param rotation Quat ----@param translation Vec3 ----@return Affine3A -function Affine3A.from_scale_rotation_translation(scale,rotation,translation) end - ----@param _self Affine3A ----@param rhs Affine3A ----@return boolean -function Affine3A:eq(_self,rhs) end - ----@param eye Vec3 ----@param center Vec3 ----@param up Vec3 ----@return Affine3A -function Affine3A.look_at_rh(eye,center,up) end - ----@param angle number ----@return Affine3A -function Affine3A.from_rotation_z(angle) end - ----@param rotation Quat ----@param translation Vec3 ----@return Affine3A -function Affine3A.from_rotation_translation(rotation,translation) end - ----@param eye Vec3 ----@param center Vec3 ----@param up Vec3 ----@return Affine3A -function Affine3A.look_at_lh(eye,center,up) end - ----@param _self Affine3A ----@return Affine3A -function Affine3A:inverse(_self) end - ----@param _self Affine3A ----@param rhs Affine3A ----@param max_abs_diff number ----@return boolean -function Affine3A:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param mat3 Mat3 ----@param translation Vec3 ----@return Affine3A -function Affine3A.from_mat3_translation(mat3,translation) end - ----@param _self Affine3A ----@param rhs Affine3A ----@return Affine3A -function Affine3A:mul(_self,rhs) end - ----@param translation Vec3 ----@return Affine3A -function Affine3A.from_translation(translation) end - ----@param _self Affine3A ----@param rhs Vec3A ----@return Vec3A -function Affine3A:transform_point3a(_self,rhs) end - ----@param rotation Quat ----@return Affine3A -function Affine3A.from_quat(rotation) end - ----@param _self Affine3A ----@param rhs Vec3 ----@return Vec3 -function Affine3A:transform_vector3(_self,rhs) end - ----@param x_axis Vec3A ----@param y_axis Vec3A ----@param z_axis Vec3A ----@param w_axis Vec3A ----@return Affine3A -function Affine3A.from_cols(x_axis,y_axis,z_axis,w_axis) end - ----@param _self Affine3A ----@return boolean -function Affine3A:is_nan(_self) end - ----@param _self Affine3A ----@return number[] -function Affine3A:to_cols_array(_self) end - ----@param angle number ----@return Affine3A -function Affine3A.from_rotation_y(angle) end - ----@param _self Affine3A ----@return Affine3A -function Affine3A:clone(_self) end - ----@param _self Affine3A ----@return boolean -function Affine3A:is_finite(_self) end - ----@param eye Vec3 ----@param dir Vec3 ----@param up Vec3 ----@return Affine3A -function Affine3A.look_to_rh(eye,dir,up) end - ----@param m Mat4 ----@return Affine3A -function Affine3A.from_mat4(m) end - ----@param _self Affine3A ----@param rhs Vec3A ----@return Vec3A -function Affine3A:transform_vector3a(_self,rhs) end - - ----@class BVec2 : ReflectReference ----@field x ? boolean ----@field y ? boolean -BVec2 = {} - ----@param _self BVec2 ----@param index integer ----@param value boolean ----@return nil -function BVec2:set(_self,index,value) end - ----@param _self BVec2 ----@return BVec2 -function BVec2:clone(_self) end - ----@param v boolean ----@return BVec2 -function BVec2.splat(v) end - ----@param x boolean ----@param y boolean ----@return BVec2 -function BVec2.new(x,y) end - ----@param _self BVec2 ----@param index integer ----@return boolean -function BVec2:test(_self,index) end - ----@param _self BVec2 ----@param other BVec2 ----@return boolean -function BVec2:eq(_self,other) end - ----@param _self BVec2 ----@return integer -function BVec2:bitmask(_self) end - ----@param _self BVec2 ----@return nil -function BVec2:assert_receiver_is_total_eq(_self) end - ----@param _self BVec2 ----@return boolean -function BVec2:all(_self) end - ----@param _self BVec2 ----@return boolean -function BVec2:any(_self) end - ----@param a boolean[] ----@return BVec2 -function BVec2.from_array(a) end - - ----@class BVec3 : ReflectReference ----@field x ? boolean ----@field y ? boolean ----@field z ? boolean -BVec3 = {} - ----@param v boolean ----@return BVec3 -function BVec3.splat(v) end - ----@param _self BVec3 ----@return boolean -function BVec3:any(_self) end - ----@param a boolean[] ----@return BVec3 -function BVec3.from_array(a) end - ----@param _self BVec3 ----@param index integer ----@param value boolean ----@return nil -function BVec3:set(_self,index,value) end - ----@param _self BVec3 ----@param index integer ----@return boolean -function BVec3:test(_self,index) end - ----@param _self BVec3 ----@param other BVec3 ----@return boolean -function BVec3:eq(_self,other) end - ----@param _self BVec3 ----@return BVec3 -function BVec3:clone(_self) end - ----@param _self BVec3 ----@return nil -function BVec3:assert_receiver_is_total_eq(_self) end - ----@param _self BVec3 ----@return boolean -function BVec3:all(_self) end - ----@param _self BVec3 ----@return integer -function BVec3:bitmask(_self) end - ----@param x boolean ----@param y boolean ----@param z boolean ----@return BVec3 -function BVec3.new(x,y,z) end - - ----@class BVec3A : ReflectReference -BVec3A = {} - ----@param x boolean ----@param y boolean ----@param z boolean ----@return BVec3A -function BVec3A.new(x,y,z) end - ----@param _self BVec3A ----@return integer -function BVec3A:bitmask(_self) end - ----@param _self BVec3A ----@return BVec3A -function BVec3A:clone(_self) end - ----@param _self BVec3A ----@return boolean -function BVec3A:any(_self) end - ----@param _self BVec3A ----@param index integer ----@param value boolean ----@return nil -function BVec3A:set(_self,index,value) end - ----@param a boolean[] ----@return BVec3A -function BVec3A.from_array(a) end - ----@param _self BVec3A ----@param rhs BVec3A ----@return boolean -function BVec3A:eq(_self,rhs) end - ----@param _self BVec3A ----@param index integer ----@return boolean -function BVec3A:test(_self,index) end - ----@param v boolean ----@return BVec3A -function BVec3A.splat(v) end - ----@param _self BVec3A ----@return boolean -function BVec3A:all(_self) end - - ----@class BVec4 : ReflectReference ----@field x ? boolean ----@field y ? boolean ----@field z ? boolean ----@field w ? boolean -BVec4 = {} - ----@param x boolean ----@param y boolean ----@param z boolean ----@param w boolean ----@return BVec4 -function BVec4.new(x,y,z,w) end - ----@param _self BVec4 ----@param index integer ----@param value boolean ----@return nil -function BVec4:set(_self,index,value) end - ----@param _self BVec4 ----@return BVec4 -function BVec4:clone(_self) end - ----@param _self BVec4 ----@return nil -function BVec4:assert_receiver_is_total_eq(_self) end - ----@param _self BVec4 ----@param other BVec4 ----@return boolean -function BVec4:eq(_self,other) end - ----@param _self BVec4 ----@return integer -function BVec4:bitmask(_self) end - ----@param _self BVec4 ----@return boolean -function BVec4:all(_self) end - ----@param a boolean[] ----@return BVec4 -function BVec4.from_array(a) end - ----@param _self BVec4 ----@return boolean -function BVec4:any(_self) end - ----@param v boolean ----@return BVec4 -function BVec4.splat(v) end - ----@param _self BVec4 ----@param index integer ----@return boolean -function BVec4:test(_self,index) end - - ----@class BVec4A : ReflectReference -BVec4A = {} - ----@param _self BVec4A ----@param index integer ----@return boolean -function BVec4A:test(_self,index) end - ----@param _self BVec4A ----@return BVec4A -function BVec4A:clone(_self) end - ----@param _self BVec4A ----@return boolean -function BVec4A:any(_self) end - ----@param _self BVec4A ----@param index integer ----@param value boolean ----@return nil -function BVec4A:set(_self,index,value) end - ----@param a boolean[] ----@return BVec4A -function BVec4A.from_array(a) end - ----@param _self BVec4A ----@return boolean -function BVec4A:all(_self) end - ----@param _self BVec4A ----@param rhs BVec4A ----@return boolean -function BVec4A:eq(_self,rhs) end - ----@param _self BVec4A ----@return integer -function BVec4A:bitmask(_self) end - ----@param x boolean ----@param y boolean ----@param z boolean ----@param w boolean ----@return BVec4A -function BVec4A.new(x,y,z,w) end - ----@param v boolean ----@return BVec4A -function BVec4A.splat(v) end - - ----@class DAffine2 : ReflectReference ----@field matrix2 ? DMat2 ----@field translation ? DVec2 -DAffine2 = {} - ----@param angle number ----@param translation DVec2 ----@return DAffine2 -function DAffine2.from_angle_translation(angle,translation) end - ----@param _self DAffine2 ----@param rhs DVec2 ----@return DVec2 -function DAffine2:transform_point2(_self,rhs) end - ----@param scale DVec2 ----@param angle number ----@param translation DVec2 ----@return DAffine2 -function DAffine2.from_scale_angle_translation(scale,angle,translation) end - ----@param x_axis DVec2 ----@param y_axis DVec2 ----@param z_axis DVec2 ----@return DAffine2 -function DAffine2.from_cols(x_axis,y_axis,z_axis) end - ----@param translation DVec2 ----@return DAffine2 -function DAffine2.from_translation(translation) end - ----@param m DMat3 ----@return DAffine2 -function DAffine2.from_mat3(m) end - ----@param _self DAffine2 ----@param rhs DAffine2 ----@return boolean -function DAffine2:eq(_self,rhs) end - ----@param matrix2 DMat2 ----@return DAffine2 -function DAffine2.from_mat2(matrix2) end - ----@param _self DAffine2 ----@return boolean -function DAffine2:is_finite(_self) end - ----@param p1 DAffine2 ----@param p2 DMat3 ----@return DMat3 -function DAffine2:mul(p1,p2) end - ----@param matrix2 DMat2 ----@param translation DVec2 ----@return DAffine2 -function DAffine2.from_mat2_translation(matrix2,translation) end - ----@param _self DAffine2 ----@return number[][] -function DAffine2:to_cols_array_2d(_self) end - ----@param _self DAffine2 ----@return number[] -function DAffine2:to_cols_array(_self) end - ----@param _self DAffine2 ----@param rhs DAffine2 ----@return DAffine2 -function DAffine2:mul(_self,rhs) end - ----@param _self DAffine2 ----@param rhs DAffine2 ----@param max_abs_diff number ----@return boolean -function DAffine2:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param angle number ----@return DAffine2 -function DAffine2.from_angle(angle) end - ----@param _self DAffine2 ----@param rhs DVec2 ----@return DVec2 -function DAffine2:transform_vector2(_self,rhs) end - ----@param scale DVec2 ----@return DAffine2 -function DAffine2.from_scale(scale) end - ----@param _self DAffine2 ----@return DAffine2 -function DAffine2:inverse(_self) end - ----@param _self DAffine2 ----@return DAffine2 -function DAffine2:clone(_self) end - ----@param _self DAffine2 ----@return boolean -function DAffine2:is_nan(_self) end - - ----@class DAffine3 : ReflectReference ----@field matrix3 ? DMat3 ----@field translation ? DVec3 -DAffine3 = {} - ----@param eye DVec3 ----@param dir DVec3 ----@param up DVec3 ----@return DAffine3 -function DAffine3.look_to_lh(eye,dir,up) end - ----@param mat3 DMat3 ----@return DAffine3 -function DAffine3.from_mat3(mat3) end - ----@param axis DVec3 ----@param angle number ----@return DAffine3 -function DAffine3.from_axis_angle(axis,angle) end - ----@param angle number ----@return DAffine3 -function DAffine3.from_rotation_y(angle) end - ----@param angle number ----@return DAffine3 -function DAffine3.from_rotation_x(angle) end - ----@param eye DVec3 ----@param center DVec3 ----@param up DVec3 ----@return DAffine3 -function DAffine3.look_at_lh(eye,center,up) end - ----@param _self DAffine3 ----@param rhs DVec3 ----@return DVec3 -function DAffine3:transform_point3(_self,rhs) end - ----@param angle number ----@return DAffine3 -function DAffine3.from_rotation_z(angle) end - ----@param rotation DQuat ----@param translation DVec3 ----@return DAffine3 -function DAffine3.from_rotation_translation(rotation,translation) end - ----@param rotation DQuat ----@return DAffine3 -function DAffine3.from_quat(rotation) end - ----@param scale DVec3 ----@param rotation DQuat ----@param translation DVec3 ----@return DAffine3 -function DAffine3.from_scale_rotation_translation(scale,rotation,translation) end - ----@param _self DAffine3 ----@param rhs DAffine3 ----@return DAffine3 -function DAffine3:mul(_self,rhs) end - ----@param _self DAffine3 ----@return DAffine3 -function DAffine3:clone(_self) end - ----@param x_axis DVec3 ----@param y_axis DVec3 ----@param z_axis DVec3 ----@param w_axis DVec3 ----@return DAffine3 -function DAffine3.from_cols(x_axis,y_axis,z_axis,w_axis) end - ----@param _self DAffine3 ----@return boolean -function DAffine3:is_nan(_self) end - ----@param _self DAffine3 ----@param rhs DVec3 ----@return DVec3 -function DAffine3:transform_vector3(_self,rhs) end - ----@param _self DAffine3 ----@return DAffine3 -function DAffine3:inverse(_self) end - ----@param m DMat4 ----@return DAffine3 -function DAffine3.from_mat4(m) end - ----@param eye DVec3 ----@param center DVec3 ----@param up DVec3 ----@return DAffine3 -function DAffine3.look_at_rh(eye,center,up) end - ----@param translation DVec3 ----@return DAffine3 -function DAffine3.from_translation(translation) end - ----@param mat3 DMat3 ----@param translation DVec3 ----@return DAffine3 -function DAffine3.from_mat3_translation(mat3,translation) end - ----@param scale DVec3 ----@return DAffine3 -function DAffine3.from_scale(scale) end - ----@param _self DAffine3 ----@param rhs DAffine3 ----@param max_abs_diff number ----@return boolean -function DAffine3:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self DAffine3 ----@return boolean -function DAffine3:is_finite(_self) end - ----@param p1 DAffine3 ----@param p2 DMat4 ----@return DMat4 -function DAffine3:mul(p1,p2) end - ----@param _self DAffine3 ----@return number[][] -function DAffine3:to_cols_array_2d(_self) end - ----@param _self DAffine3 ----@param rhs DAffine3 ----@return boolean -function DAffine3:eq(_self,rhs) end - ----@param eye DVec3 ----@param dir DVec3 ----@param up DVec3 ----@return DAffine3 -function DAffine3.look_to_rh(eye,dir,up) end - ----@param _self DAffine3 ----@return number[] -function DAffine3:to_cols_array(_self) end - - ----@class DMat2 : ReflectReference ----@field x_axis ? DVec2 ----@field y_axis ? DVec2 -DMat2 = {} - ----@param _self DMat2 ----@return number[][] -function DMat2:to_cols_array_2d(_self) end - ----@param _self DMat2 ----@param rhs DMat2 ----@return DMat2 -function DMat2:add(_self,rhs) end - ----@param scale DVec2 ----@param angle number ----@return DMat2 -function DMat2.from_scale_angle(scale,angle) end - ----@param _self DMat2 ----@param rhs number ----@return DMat2 -function DMat2:mul_scalar(_self,rhs) end - ----@param _self DMat2 ----@return DMat2 -function DMat2:inverse(_self) end - ----@param x_axis DVec2 ----@param y_axis DVec2 ----@return DMat2 -function DMat2.from_cols(x_axis,y_axis) end - ----@param _self DMat2 ----@return DMat2 -function DMat2:neg(_self) end - ----@param _self DMat2 ----@return DMat2 -function DMat2:transpose(_self) end - ----@param diagonal DVec2 ----@return DMat2 -function DMat2.from_diagonal(diagonal) end - ----@param _self DMat2 ----@param rhs number ----@return DMat2 -function DMat2:div_scalar(_self,rhs) end - ----@param _self DMat2 ----@return DMat2 -function DMat2:abs(_self) end - ----@param _self DMat2 ----@return Mat2 -function DMat2:as_mat2(_self) end - ----@param _self DMat2 ----@param rhs DMat2 ----@param max_abs_diff number ----@return boolean -function DMat2:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self DMat2 ----@param rhs DMat2 ----@return boolean -function DMat2:eq(_self,rhs) end - ----@param _self DMat2 ----@param rhs DMat2 ----@return DMat2 -function DMat2:sub(_self,rhs) end - ----@param m DMat3 ----@param i integer ----@param j integer ----@return DMat2 -function DMat2.from_mat3_minor(m,i,j) end - ----@param _self DMat2 ----@param rhs DVec2 ----@return DVec2 -function DMat2:mul_vec2(_self,rhs) end - ----@param angle number ----@return DMat2 -function DMat2.from_angle(angle) end - ----@param _self DMat2 ----@param rhs DMat2 ----@return DMat2 -function DMat2:mul(_self,rhs) end - ----@param _self DMat2 ----@return boolean -function DMat2:is_finite(_self) end - ----@param m DMat3 ----@return DMat2 -function DMat2.from_mat3(m) end - ----@param _self DMat2 ----@param rhs DMat2 ----@return DMat2 -function DMat2:sub_mat2(_self,rhs) end - ----@param _self DMat2 ----@param rhs DMat2 ----@return DMat2 -function DMat2:mul_mat2(_self,rhs) end - ----@param _self DMat2 ----@param rhs number ----@return DMat2 -function DMat2:div(_self,rhs) end - ----@param _self DMat2 ----@return number -function DMat2:determinant(_self) end - ----@param _self DMat2 ----@return number[] -function DMat2:to_cols_array(_self) end - ----@param p1 DMat2 ----@param p2 DVec2 ----@return DVec2 -function DMat2:mul(p1,p2) end - ----@param _self DMat2 ----@param index integer ----@return DVec2 -function DMat2:row(_self,index) end - ----@param _self DMat2 ----@return DMat2 -function DMat2:clone(_self) end - ----@param _self DMat2 ----@return boolean -function DMat2:is_nan(_self) end - ----@param _self DMat2 ----@param index integer ----@return DVec2 -function DMat2:col(_self,index) end - ----@param p1 DMat2 ----@param p2 number ----@return DMat2 -function DMat2:mul(p1,p2) end - ----@param _self DMat2 ----@param rhs DMat2 ----@return DMat2 -function DMat2:add_mat2(_self,rhs) end - - ----@class DMat3 : ReflectReference ----@field x_axis ? DVec3 ----@field y_axis ? DVec3 ----@field z_axis ? DVec3 -DMat3 = {} - ----@param _self DMat3 ----@param rhs DMat3 ----@param max_abs_diff number ----@return boolean -function DMat3:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param axis DVec3 ----@param angle number ----@return DMat3 -function DMat3.from_axis_angle(axis,angle) end - ----@param _self DMat3 ----@param index integer ----@return DVec3 -function DMat3:col(_self,index) end - ----@param _self DMat3 ----@param rhs DMat3 ----@return DMat3 -function DMat3:add(_self,rhs) end - ----@param _self DMat3 ----@param rhs number ----@return DMat3 -function DMat3:div(_self,rhs) end - ----@param angle number ----@return DMat3 -function DMat3.from_rotation_x(angle) end - ----@param angle number ----@return DMat3 -function DMat3.from_angle(angle) end - ----@param _self DMat3 ----@param rhs number ----@return DMat3 -function DMat3:div_scalar(_self,rhs) end - ----@param rotation DQuat ----@return DMat3 -function DMat3.from_quat(rotation) end - ----@param _self DMat3 ----@param rhs DVec3 ----@return DVec3 -function DMat3:mul_vec3(_self,rhs) end - ----@param _self DMat3 ----@return DMat3 -function DMat3:neg(_self) end - ----@param m DMat4 ----@param i integer ----@param j integer ----@return DMat3 -function DMat3.from_mat4_minor(m,i,j) end - ----@param _self DMat3 ----@param rhs DVec2 ----@return DVec2 -function DMat3:transform_point2(_self,rhs) end - ----@param _self DMat3 ----@return boolean -function DMat3:is_nan(_self) end - ----@param _self DMat3 ----@param rhs DAffine2 ----@return DMat3 -function DMat3:mul(_self,rhs) end - ----@param _self DMat3 ----@param rhs DMat3 ----@return boolean -function DMat3:eq(_self,rhs) end - ----@param _self DMat3 ----@return boolean -function DMat3:is_finite(_self) end - ----@param _self DMat3 ----@param rhs DMat3 ----@return DMat3 -function DMat3:sub_mat3(_self,rhs) end - ----@param angle number ----@return DMat3 -function DMat3.from_rotation_y(angle) end - ----@param diagonal DVec3 ----@return DMat3 -function DMat3.from_diagonal(diagonal) end - ----@param angle number ----@return DMat3 -function DMat3.from_rotation_z(angle) end - ----@param _self DMat3 ----@param index integer ----@return DVec3 -function DMat3:row(_self,index) end - ----@param m DMat2 ----@return DMat3 -function DMat3.from_mat2(m) end - ----@param _self DMat3 ----@param rhs number ----@return DMat3 -function DMat3:mul_scalar(_self,rhs) end - ----@param p1 DMat3 ----@param p2 number ----@return DMat3 -function DMat3:mul(p1,p2) end - ----@param _self DMat3 ----@param rhs DVec2 ----@return DVec2 -function DMat3:transform_vector2(_self,rhs) end - ----@param order EulerRot ----@param a number ----@param b number ----@param c number ----@return DMat3 -function DMat3.from_euler(order,a,b,c) end - ----@param _self DMat3 ----@return DMat3 -function DMat3:clone(_self) end - ----@param _self DMat3 ----@param rhs DMat3 ----@return DMat3 -function DMat3:add_mat3(_self,rhs) end - ----@param scale DVec2 ----@return DMat3 -function DMat3.from_scale(scale) end - ----@param _self DMat3 ----@return DMat3 -function DMat3:transpose(_self) end - ----@param scale DVec2 ----@param angle number ----@param translation DVec2 ----@return DMat3 -function DMat3.from_scale_angle_translation(scale,angle,translation) end - ----@param m DMat4 ----@return DMat3 -function DMat3.from_mat4(m) end - ----@param _self DMat3 ----@return number[] -function DMat3:to_cols_array(_self) end - ----@param _self DMat3 ----@param rhs DMat3 ----@return DMat3 -function DMat3:sub(_self,rhs) end - ----@param _self DMat3 ----@return number[][] -function DMat3:to_cols_array_2d(_self) end - ----@param p1 DMat3 ----@param p2 DVec3 ----@return DVec3 -function DMat3:mul(p1,p2) end - ----@param p1 DMat3 ----@param p2 DMat3 ----@return DMat3 -function DMat3:mul(p1,p2) end - ----@param _self DMat3 ----@return DMat3 -function DMat3:inverse(_self) end - ----@param translation DVec2 ----@return DMat3 -function DMat3.from_translation(translation) end - ----@param _self DMat3 ----@return Mat3 -function DMat3:as_mat3(_self) end - ----@param _self DMat3 ----@param order EulerRot ----@return [number, number, number] -function DMat3:to_euler(_self,order) end - ----@param _self DMat3 ----@return number -function DMat3:determinant(_self) end - ----@param _self DMat3 ----@param rhs DMat3 ----@return DMat3 -function DMat3:mul_mat3(_self,rhs) end - ----@param x_axis DVec3 ----@param y_axis DVec3 ----@param z_axis DVec3 ----@return DMat3 -function DMat3.from_cols(x_axis,y_axis,z_axis) end - ----@param _self DMat3 ----@return DMat3 -function DMat3:abs(_self) end - - ----@class DMat4 : ReflectReference ----@field x_axis ? DVec4 ----@field y_axis ? DVec4 ----@field z_axis ? DVec4 ----@field w_axis ? DVec4 -DMat4 = {} - ----@param _self DMat4 ----@param rhs DAffine3 ----@return DMat4 -function DMat4:mul(_self,rhs) end - ----@param angle number ----@return DMat4 -function DMat4.from_rotation_z(angle) end - ----@param left number ----@param right number ----@param bottom number ----@param top number ----@param near number ----@param far number ----@return DMat4 -function DMat4.orthographic_rh_gl(left,right,bottom,top,near,far) end - ----@param _self DMat4 ----@param rhs DVec4 ----@return DVec4 -function DMat4:mul_vec4(_self,rhs) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@return DMat4 -function DMat4.perspective_infinite_reverse_rh(fov_y_radians,aspect_ratio,z_near) end - ----@param _self DMat4 ----@param rhs number ----@return DMat4 -function DMat4:div_scalar(_self,rhs) end - ----@param _self DMat4 ----@return DMat4 -function DMat4:neg(_self) end - ----@param _self DMat4 ----@param rhs DVec3 ----@return DVec3 -function DMat4:transform_point3(_self,rhs) end - ----@param angle number ----@return DMat4 -function DMat4.from_rotation_x(angle) end - ----@param _self DMat4 ----@return DMat4 -function DMat4:abs(_self) end - ----@param scale DVec3 ----@return DMat4 -function DMat4.from_scale(scale) end - ----@param _self DMat4 ----@param rhs DMat4 ----@param max_abs_diff number ----@return boolean -function DMat4:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param rotation DQuat ----@param translation DVec3 ----@return DMat4 -function DMat4.from_rotation_translation(rotation,translation) end - ----@param _self DMat4 ----@param rhs DMat4 ----@return DMat4 -function DMat4:add(_self,rhs) end - ----@param eye DVec3 ----@param dir DVec3 ----@param up DVec3 ----@return DMat4 -function DMat4.look_to_lh(eye,dir,up) end - ----@param order EulerRot ----@param a number ----@param b number ----@param c number ----@return DMat4 -function DMat4.from_euler(order,a,b,c) end - ----@param eye DVec3 ----@param center DVec3 ----@param up DVec3 ----@return DMat4 -function DMat4.look_at_rh(eye,center,up) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@return DMat4 -function DMat4.perspective_infinite_rh(fov_y_radians,aspect_ratio,z_near) end - ----@param angle number ----@return DMat4 -function DMat4.from_rotation_y(angle) end - ----@param p1 DMat4 ----@param p2 DVec4 ----@return DVec4 -function DMat4:mul(p1,p2) end - ----@param scale DVec3 ----@param rotation DQuat ----@param translation DVec3 ----@return DMat4 -function DMat4.from_scale_rotation_translation(scale,rotation,translation) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@return DMat4 -function DMat4.perspective_infinite_lh(fov_y_radians,aspect_ratio,z_near) end - ----@param x_axis DVec4 ----@param y_axis DVec4 ----@param z_axis DVec4 ----@param w_axis DVec4 ----@return DMat4 -function DMat4.from_cols(x_axis,y_axis,z_axis,w_axis) end - ----@param eye DVec3 ----@param center DVec3 ----@param up DVec3 ----@return DMat4 -function DMat4.look_at_lh(eye,center,up) end - ----@param _self DMat4 ----@param order EulerRot ----@return [number, number, number] -function DMat4:to_euler(_self,order) end - ----@param _self DMat4 ----@param rhs DMat4 ----@return DMat4 -function DMat4:sub(_self,rhs) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@param z_far number ----@return DMat4 -function DMat4.perspective_rh(fov_y_radians,aspect_ratio,z_near,z_far) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@param z_far number ----@return DMat4 -function DMat4.perspective_rh_gl(fov_y_radians,aspect_ratio,z_near,z_far) end - ----@param _self DMat4 ----@return Mat4 -function DMat4:as_mat4(_self) end - ----@param p1 DMat4 ----@param p2 DMat4 ----@return DMat4 -function DMat4:mul(p1,p2) end - ----@param _self DMat4 ----@param rhs DMat4 ----@return DMat4 -function DMat4:mul_mat4(_self,rhs) end - ----@param diagonal DVec4 ----@return DMat4 -function DMat4.from_diagonal(diagonal) end - ----@param _self DMat4 ----@param rhs DMat4 ----@return DMat4 -function DMat4:sub_mat4(_self,rhs) end - ----@param left number ----@param right number ----@param bottom number ----@param top number ----@param near number ----@param far number ----@return DMat4 -function DMat4.orthographic_rh(left,right,bottom,top,near,far) end - ----@param _self DMat4 ----@param rhs DVec3 ----@return DVec3 -function DMat4:project_point3(_self,rhs) end - ----@param left number ----@param right number ----@param bottom number ----@param top number ----@param near number ----@param far number ----@return DMat4 -function DMat4.orthographic_lh(left,right,bottom,top,near,far) end - ----@param _self DMat4 ----@return number -function DMat4:determinant(_self) end - ----@param axis DVec3 ----@param angle number ----@return DMat4 -function DMat4.from_axis_angle(axis,angle) end - ----@param _self DMat4 ----@param rhs DVec3 ----@return DVec3 -function DMat4:transform_vector3(_self,rhs) end - ----@param _self DMat4 ----@param rhs DMat4 ----@return DMat4 -function DMat4:add_mat4(_self,rhs) end - ----@param _self DMat4 ----@return DMat4 -function DMat4:inverse(_self) end - ----@param _self DMat4 ----@return boolean -function DMat4:is_nan(_self) end - ----@param rotation DQuat ----@return DMat4 -function DMat4.from_quat(rotation) end - ----@param eye DVec3 ----@param dir DVec3 ----@param up DVec3 ----@return DMat4 -function DMat4.look_to_rh(eye,dir,up) end - ----@param _self DMat4 ----@return boolean -function DMat4:is_finite(_self) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@return DMat4 -function DMat4.perspective_infinite_reverse_lh(fov_y_radians,aspect_ratio,z_near) end - ----@param _self DMat4 ----@param index integer ----@return DVec4 -function DMat4:row(_self,index) end - ----@param _self DMat4 ----@return number[][] -function DMat4:to_cols_array_2d(_self) end - ----@param m DMat3 ----@return DMat4 -function DMat4.from_mat3(m) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@param z_far number ----@return DMat4 -function DMat4.perspective_lh(fov_y_radians,aspect_ratio,z_near,z_far) end - ----@param _self DMat4 ----@param rhs DMat4 ----@return boolean -function DMat4:eq(_self,rhs) end - ----@param _self DMat4 ----@param rhs number ----@return DMat4 -function DMat4:div(_self,rhs) end - ----@param _self DMat4 ----@return DMat4 -function DMat4:transpose(_self) end - ----@param _self DMat4 ----@param rhs number ----@return DMat4 -function DMat4:mul_scalar(_self,rhs) end - ----@param _self DMat4 ----@param index integer ----@return DVec4 -function DMat4:col(_self,index) end - ----@param _self DMat4 ----@return number[] -function DMat4:to_cols_array(_self) end - ----@param _self DMat4 ----@return DMat4 -function DMat4:clone(_self) end - ----@param translation DVec3 ----@return DMat4 -function DMat4.from_translation(translation) end - ----@param p1 DMat4 ----@param p2 number ----@return DMat4 -function DMat4:mul(p1,p2) end - - ----@class DQuat : ReflectReference ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number -DQuat = {} - ----@param v DVec4 ----@return DQuat -function DQuat.from_vec4(v) end - ----@param from DVec2 ----@param to DVec2 ----@return DQuat -function DQuat.from_rotation_arc_2d(from,to) end - ----@param _self DQuat ----@return DQuat -function DQuat:normalize(_self) end - ----@param p1 DQuat ----@param p2 number ----@return DQuat -function DQuat:mul(p1,p2) end - ----@param _self DQuat ----@param rhs DQuat ----@return boolean -function DQuat:eq(_self,rhs) end - ----@param _self DQuat ----@return DQuat -function DQuat:conjugate(_self) end - ----@param _self DQuat ----@param rhs DQuat ----@return DQuat -function DQuat:mul_quat(_self,rhs) end - ----@param _self DQuat ----@return DVec3 -function DQuat:to_scaled_axis(_self) end - ----@param mat DMat3 ----@return DQuat -function DQuat.from_mat3(mat) end - ----@param _self DQuat ----@param order EulerRot ----@return [number, number, number] -function DQuat:to_euler(_self,order) end - ----@param _self DQuat ----@param rhs DQuat ----@param max_angle number ----@return DQuat -function DQuat:rotate_towards(_self,rhs,max_angle) end - ----@param _self DQuat ----@param _end DQuat ----@param s number ----@return DQuat -function DQuat:lerp(_self,_end,s) end - ----@param _self DQuat ----@return DQuat -function DQuat:inverse(_self) end - ----@param _self DQuat ----@return boolean -function DQuat:is_nan(_self) end - ----@param _self DQuat ----@return number[] -function DQuat:to_array(_self) end - ----@param _self DQuat ----@return DQuat -function DQuat:clone(_self) end - ----@param x number ----@param y number ----@param z number ----@param w number ----@return DQuat -function DQuat.from_xyzw(x,y,z,w) end - ----@param angle number ----@return DQuat -function DQuat.from_rotation_z(angle) end - ----@param _self DQuat ----@param rhs DQuat ----@return number -function DQuat:angle_between(_self,rhs) end - ----@param _self DQuat ----@param rhs DQuat ----@return DQuat -function DQuat:sub(_self,rhs) end - ----@param _self DQuat ----@param rhs DQuat ----@return number -function DQuat:dot(_self,rhs) end - ----@param angle number ----@return DQuat -function DQuat.from_rotation_y(angle) end - ----@param _self DQuat ----@param rhs DQuat ----@return DQuat -function DQuat:add(_self,rhs) end - ----@param _self DQuat ----@param _end DQuat ----@param s number ----@return DQuat -function DQuat:slerp(_self,_end,s) end - ----@param _self DQuat ----@param rhs DQuat ----@param max_abs_diff number ----@return boolean -function DQuat:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self DQuat ----@return number -function DQuat:length(_self) end - ----@param from DVec3 ----@param to DVec3 ----@return DQuat -function DQuat.from_rotation_arc(from,to) end - ----@param mat DMat4 ----@return DQuat -function DQuat.from_mat4(mat) end - ----@param _self DQuat ----@return DVec3 -function DQuat:xyz(_self) end - ----@param _self DQuat ----@param rhs number ----@return DQuat -function DQuat:div(_self,rhs) end - ----@param v DVec3 ----@return DQuat -function DQuat.from_scaled_axis(v) end - ----@param _self DQuat ----@return boolean -function DQuat:is_near_identity(_self) end - ----@param _self DQuat ----@return DQuat -function DQuat:neg(_self) end - ----@param _self DQuat ----@return Quat -function DQuat:as_quat(_self) end - ----@param _self DQuat ----@return boolean -function DQuat:is_finite(_self) end - ----@param p1 DQuat ----@param p2 DVec3 ----@return DVec3 -function DQuat:mul(p1,p2) end - ----@param _self DQuat ----@param rhs DQuat ----@return DQuat -function DQuat:mul(_self,rhs) end - ----@param a number[] ----@return DQuat -function DQuat.from_array(a) end - ----@param _self DQuat ----@return number -function DQuat:length_recip(_self) end - ----@param axis DVec3 ----@param angle number ----@return DQuat -function DQuat.from_axis_angle(axis,angle) end - ----@param from DVec3 ----@param to DVec3 ----@return DQuat -function DQuat.from_rotation_arc_colinear(from,to) end - ----@param angle number ----@return DQuat -function DQuat.from_rotation_x(angle) end - ----@param euler EulerRot ----@param a number ----@param b number ----@param c number ----@return DQuat -function DQuat.from_euler(euler,a,b,c) end - ----@param a DAffine3 ----@return DQuat -function DQuat.from_affine3(a) end - ----@param _self DQuat ----@param rhs DVec3 ----@return DVec3 -function DQuat:mul_vec3(_self,rhs) end - ----@param _self DQuat ----@return boolean -function DQuat:is_normalized(_self) end - ----@param _self DQuat ----@return number -function DQuat:length_squared(_self) end - - ----@class DVec2 : ReflectReference ----@field x ? number ----@field y ? number -DVec2 = {} - ----@param _self DVec2 ----@param rhs DVec2 ----@param max_angle number ----@return DVec2 -function DVec2:rotate_towards(_self,rhs,max_angle) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:normalize_or_zero(_self) end - ----@param p1 DVec2 ----@param p2 DVec2 ----@return DVec2 -function DVec2:div(p1,p2) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return BVec2 -function DVec2:cmplt(_self,rhs) end - ----@param p1 DVec2 ----@param p2 number ----@return DVec2 -function DVec2:mul(p1,p2) end - ----@param _self DVec2 ----@param y number ----@return DVec2 -function DVec2:with_y(_self,y) end - ----@param mask BVec2 ----@param if_true DVec2 ----@param if_false DVec2 ----@return DVec2 -function DVec2.select(mask,if_true,if_false) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return BVec2 -function DVec2:cmpeq(_self,rhs) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:rotate(_self,rhs) end - ----@param _self DVec2 ----@return integer -function DVec2:is_negative_bitmask(_self) end - ----@param _self DVec2 ----@return boolean -function DVec2:is_normalized(_self) end - ----@param _self DVec2 ----@return BVec2 -function DVec2:is_nan_mask(_self) end - ----@param _self DVec2 ----@return number -function DVec2:element_sum(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return BVec2 -function DVec2:cmpgt(_self,rhs) end - ----@param _self DVec2 ----@return number -function DVec2:to_angle(_self) end - ----@param _self DVec2 ----@param max number ----@return DVec2 -function DVec2:clamp_length_max(_self,max) end - ----@param _self DVec2 ----@param min DVec2 ----@param max DVec2 ----@return DVec2 -function DVec2:clamp(_self,min,max) end - ----@param _self DVec2 ----@return number -function DVec2:length_recip(_self) end - ----@param p1 DVec2 ----@param p2 DVec2 ----@return DVec2 -function DVec2:add(p1,p2) end - ----@param _self DVec2 ----@return U16Vec2 -function DVec2:as_u16vec2(_self) end - ----@param _self DVec2 ----@param normal DVec2 ----@return DVec2 -function DVec2:reflect(_self,normal) end - ----@param _self DVec2 ----@return UVec2 -function DVec2:as_uvec2(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:midpoint(_self,rhs) end - ----@param p1 DVec2 ----@param p2 DVec2 ----@return DVec2 -function DVec2:mul(p1,p2) end - ----@param _self DVec2 ----@param min number ----@param max number ----@return DVec2 -function DVec2:clamp_length(_self,min,max) end - ----@param x number ----@param y number ----@return DVec2 -function DVec2.new(x,y) end - ----@param _self DVec2 ----@return I16Vec2 -function DVec2:as_i16vec2(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return number -function DVec2:perp_dot(_self,rhs) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return number -function DVec2:distance_squared(_self,rhs) end - ----@param _self DVec2 ----@return number[] -function DVec2:to_array(_self) end - ----@param _self DVec2 ----@return number -function DVec2:max_element(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:copysign(_self,rhs) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:sub(_self,rhs) end - ----@param _self DVec2 ----@return Vec2 -function DVec2:as_vec2(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:add(_self,rhs) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:exp(_self) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:floor(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return number -function DVec2:angle_to(_self,rhs) end - ----@param _self DVec2 ----@param x number ----@return DVec2 -function DVec2:with_x(_self,x) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:reject_from_normalized(_self,rhs) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:fract_gl(_self) end - ----@param _self DVec2 ----@return number -function DVec2:length_squared(_self) end - ----@param _self DVec2 ----@param a DVec2 ----@param b DVec2 ----@return DVec2 -function DVec2:mul_add(_self,a,b) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return number -function DVec2:dot(_self,rhs) end - ----@param angle number ----@return DVec2 -function DVec2.from_angle(angle) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:recip(_self) end - ----@param _self DVec2 ----@return U64Vec2 -function DVec2:as_u64vec2(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@param d number ----@return DVec2 -function DVec2:move_towards(_self,rhs,d) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:abs(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:rem_euclid(_self,rhs) end - ----@param p1 DVec2 ----@param p2 number ----@return DVec2 -function DVec2:sub(p1,p2) end - ----@param _self DVec2 ----@return IVec2 -function DVec2:as_ivec2(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@param max_abs_diff number ----@return boolean -function DVec2:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:reject_from(_self,rhs) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:signum(_self) end - ----@param p1 DVec2 ----@param p2 number ----@return DVec2 -function DVec2:rem(p1,p2) end - ----@param _self DVec2 ----@return number -function DVec2:length(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:max(_self,rhs) end - ----@param _self DVec2 ----@param normal DVec2 ----@param eta number ----@return DVec2 -function DVec2:refract(_self,normal,eta) end - ----@param p1 DVec2 ----@param p2 DVec2 ----@return DVec2 -function DVec2:rem(p1,p2) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:round(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:project_onto(_self,rhs) end - ----@param _self DVec2 ----@return boolean -function DVec2:is_nan(_self) end - ----@param _self DVec2 ----@param other DVec2 ----@return boolean -function DVec2:eq(_self,other) end - ----@param _self DVec2 ----@return boolean -function DVec2:is_finite(_self) end - ----@param _self DVec2 ----@param fallback DVec2 ----@return DVec2 -function DVec2:normalize_or(_self,fallback) end - ----@param _self DVec2 ----@return I8Vec2 -function DVec2:as_i8vec2(_self) end - ----@param p1 DVec2 ----@param p2 number ----@return DVec2 -function DVec2:div(p1,p2) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return number -function DVec2:distance(_self,rhs) end - ----@param _self DVec2 ----@return number -function DVec2:min_element(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:mul(_self,rhs) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:neg(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return BVec2 -function DVec2:cmpne(_self,rhs) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:fract(_self) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:trunc(_self) end - ----@param _self DVec2 ----@param n number ----@return DVec2 -function DVec2:powf(_self,n) end - ----@param a number[] ----@return DVec2 -function DVec2.from_array(a) end - ----@param _self DVec2 ----@return number -function DVec2:element_product(_self) end - ----@param _self DVec2 ----@param min number ----@return DVec2 -function DVec2:clamp_length_min(_self,min) end - ----@param _self DVec2 ----@return U8Vec2 -function DVec2:as_u8vec2(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return number -function DVec2:angle_between(_self,rhs) end - ----@param _self DVec2 ----@return I64Vec2 -function DVec2:as_i64vec2(_self) end - ----@param p1 DVec2 ----@param p2 number ----@return DVec2 -function DVec2:add(p1,p2) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:div_euclid(_self,rhs) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:ceil(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return BVec2 -function DVec2:cmple(_self,rhs) end - ----@param v number ----@return DVec2 -function DVec2.splat(v) end - ----@param _self DVec2 ----@param rhs DVec2 ----@param s number ----@return DVec2 -function DVec2:lerp(_self,rhs,s) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:rem(_self,rhs) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:perp(_self) end - ----@param _self DVec2 ----@param z number ----@return DVec3 -function DVec2:extend(_self,z) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:normalize(_self) end - ----@param p1 DVec2 ----@param p2 DVec2 ----@return DVec2 -function DVec2:sub(p1,p2) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:min(_self,rhs) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:div(_self,rhs) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:project_onto_normalized(_self,rhs) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return BVec2 -function DVec2:cmpge(_self,rhs) end - ----@param _self DVec2 ----@return DVec2 -function DVec2:clone(_self) end - ----@param _self DVec2 ----@param rhs DVec2 ----@return DVec2 -function DVec2:dot_into_vec(_self,rhs) end - ----@param _self DVec2 ----@return BVec2 -function DVec2:is_finite_mask(_self) end - - ----@class DVec3 : ReflectReference ----@field x ? number ----@field y ? number ----@field z ? number -DVec3 = {} - ----@param _self DVec3 ----@param rhs DVec3 ----@return number -function DVec3:distance(_self,rhs) end - ----@param _self DVec3 ----@return number -function DVec3:length(_self) end - ----@param p1 DVec3 ----@param p2 DVec3 ----@return DVec3 -function DVec3:div(p1,p2) end - ----@param _self DVec3 ----@return UVec3 -function DVec3:as_uvec3(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@param max_abs_diff number ----@return boolean -function DVec3:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:add(_self,rhs) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return BVec3 -function DVec3:cmpne(_self,rhs) end - ----@param _self DVec3 ----@return number -function DVec3:element_sum(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:copysign(_self,rhs) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:sub(_self,rhs) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:clone(_self) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:normalize(_self) end - ----@param x number ----@param y number ----@param z number ----@return DVec3 -function DVec3.new(x,y,z) end - ----@param p1 DVec3 ----@param p2 DVec3 ----@return DVec3 -function DVec3:mul(p1,p2) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:rem_euclid(_self,rhs) end - ----@param p1 DVec3 ----@param p2 DVec3 ----@return DVec3 -function DVec3:rem(p1,p2) end - ----@param _self DVec3 ----@param fallback DVec3 ----@return DVec3 -function DVec3:normalize_or(_self,fallback) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:midpoint(_self,rhs) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:normalize_or_zero(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return BVec3 -function DVec3:cmpeq(_self,rhs) end - ----@param _self DVec3 ----@return number -function DVec3:length_recip(_self) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:signum(_self) end - ----@param _self DVec3 ----@param x number ----@return DVec3 -function DVec3:with_x(_self,x) end - ----@param _self DVec3 ----@param rhs DVec3 ----@param d number ----@return DVec3 -function DVec3:move_towards(_self,rhs,d) end - ----@param _self DVec3 ----@return I16Vec3 -function DVec3:as_i16vec3(_self) end - ----@param _self DVec3 ----@return number -function DVec3:length_squared(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:div_euclid(_self,rhs) end - ----@param _self DVec3 ----@param w number ----@return DVec4 -function DVec3:extend(_self,w) end - ----@param p1 DVec3 ----@param p2 number ----@return DVec3 -function DVec3:rem(p1,p2) end - ----@param _self DVec3 ----@return Vec3A -function DVec3:as_vec3a(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return BVec3 -function DVec3:cmpgt(_self,rhs) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:floor(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:div(_self,rhs) end - ----@param _self DVec3 ----@param rhs DVec3 ----@param s number ----@return DVec3 -function DVec3:lerp(_self,rhs,s) end - ----@param _self DVec3 ----@return I8Vec3 -function DVec3:as_i8vec3(_self) end - ----@param _self DVec3 ----@return boolean -function DVec3:is_finite(_self) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:ceil(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:dot_into_vec(_self,rhs) end - ----@param _self DVec3 ----@return boolean -function DVec3:is_nan(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return BVec3 -function DVec3:cmple(_self,rhs) end - ----@param _self DVec3 ----@return number -function DVec3:min_element(_self) end - ----@param mask BVec3 ----@param if_true DVec3 ----@param if_false DVec3 ----@return DVec3 -function DVec3.select(mask,if_true,if_false) end - ----@param _self DVec3 ----@param min number ----@param max number ----@return DVec3 -function DVec3:clamp_length(_self,min,max) end - ----@param p1 DVec3 ----@param p2 number ----@return DVec3 -function DVec3:div(p1,p2) end - ----@param _self DVec3 ----@param n number ----@return DVec3 -function DVec3:powf(_self,n) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return number -function DVec3:distance_squared(_self,rhs) end - ----@param _self DVec3 ----@return number[] -function DVec3:to_array(_self) end - ----@param p1 DVec3 ----@param p2 number ----@return DVec3 -function DVec3:sub(p1,p2) end - ----@param _self DVec3 ----@return U64Vec3 -function DVec3:as_u64vec3(_self) end - ----@param _self DVec3 ----@param z number ----@return DVec3 -function DVec3:with_z(_self,z) end - ----@param p1 DVec3 ----@param p2 number ----@return DVec3 -function DVec3:add(p1,p2) end - ----@param _self DVec3 ----@return boolean -function DVec3:is_normalized(_self) end - ----@param _self DVec3 ----@param y number ----@return DVec3 -function DVec3:with_y(_self,y) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:exp(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:project_onto_normalized(_self,rhs) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:fract_gl(_self) end - ----@param _self DVec3 ----@return BVec3 -function DVec3:is_finite_mask(_self) end - ----@param p1 DVec3 ----@param p2 DVec3 ----@return DVec3 -function DVec3:sub(p1,p2) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:fract(_self) end - ----@param _self DVec3 ----@param a DVec3 ----@param b DVec3 ----@return DVec3 -function DVec3:mul_add(_self,a,b) end - ----@param _self DVec3 ----@param normal DVec3 ----@return DVec3 -function DVec3:reflect(_self,normal) end - ----@param _self DVec3 ----@param min number ----@return DVec3 -function DVec3:clamp_length_min(_self,min) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:cross(_self,rhs) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:max(_self,rhs) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:reject_from_normalized(_self,rhs) end - ----@param _self DVec3 ----@param other DVec3 ----@return boolean -function DVec3:eq(_self,other) end - ----@param _self DVec3 ----@return number -function DVec3:element_product(_self) end - ----@param p1 DVec3 ----@param p2 DVec3 ----@return DVec3 -function DVec3:add(p1,p2) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:min(_self,rhs) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:any_orthogonal_vector(_self) end - ----@param _self DVec3 ----@param normal DVec3 ----@param eta number ----@return DVec3 -function DVec3:refract(_self,normal,eta) end - ----@param _self DVec3 ----@return I64Vec3 -function DVec3:as_i64vec3(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:mul(_self,rhs) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:recip(_self) end - ----@param a number[] ----@return DVec3 -function DVec3.from_array(a) end - ----@param v number ----@return DVec3 -function DVec3.splat(v) end - ----@param _self DVec3 ----@return IVec3 -function DVec3:as_ivec3(_self) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:round(_self) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:trunc(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:rem(_self,rhs) end - ----@param _self DVec3 ----@return BVec3 -function DVec3:is_nan_mask(_self) end - ----@param _self DVec3 ----@return U16Vec3 -function DVec3:as_u16vec3(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return number -function DVec3:angle_between(_self,rhs) end - ----@param _self DVec3 ----@return Vec3 -function DVec3:as_vec3(_self) end - ----@param p1 DVec3 ----@param p2 number ----@return DVec3 -function DVec3:mul(p1,p2) end - ----@param _self DVec3 ----@param min DVec3 ----@param max DVec3 ----@return DVec3 -function DVec3:clamp(_self,min,max) end - ----@param _self DVec3 ----@return number -function DVec3:max_element(_self) end - ----@param _self DVec3 ----@return DVec2 -function DVec3:truncate(_self) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:neg(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return BVec3 -function DVec3:cmpge(_self,rhs) end - ----@param _self DVec3 ----@return integer -function DVec3:is_negative_bitmask(_self) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:any_orthonormal_vector(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:reject_from(_self,rhs) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return BVec3 -function DVec3:cmplt(_self,rhs) end - ----@param _self DVec3 ----@param max number ----@return DVec3 -function DVec3:clamp_length_max(_self,max) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return DVec3 -function DVec3:project_onto(_self,rhs) end - ----@param _self DVec3 ----@return U8Vec3 -function DVec3:as_u8vec3(_self) end - ----@param _self DVec3 ----@param rhs DVec3 ----@return number -function DVec3:dot(_self,rhs) end - ----@param _self DVec3 ----@return DVec3 -function DVec3:abs(_self) end - - ----@class DVec4 : ReflectReference ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number -DVec4 = {} - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:div_euclid(_self,rhs) end - ----@param _self DVec4 ----@param normal DVec4 ----@param eta number ----@return DVec4 -function DVec4:refract(_self,normal,eta) end - ----@param _self DVec4 ----@param n number ----@return DVec4 -function DVec4:powf(_self,n) end - ----@param p1 DVec4 ----@param p2 number ----@return DVec4 -function DVec4:sub(p1,p2) end - ----@param _self DVec4 ----@return I16Vec4 -function DVec4:as_i16vec4(_self) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:ceil(_self) end - ----@param _self DVec4 ----@return number -function DVec4:min_element(_self) end - ----@param p1 DVec4 ----@param p2 number ----@return DVec4 -function DVec4:rem(p1,p2) end - ----@param _self DVec4 ----@param min DVec4 ----@param max DVec4 ----@return DVec4 -function DVec4:clamp(_self,min,max) end - ----@param _self DVec4 ----@param rhs DVec4 ----@param d number ----@return DVec4 -function DVec4:move_towards(_self,rhs,d) end - ----@param _self DVec4 ----@return boolean -function DVec4:is_nan(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:max(_self,rhs) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:normalize_or_zero(_self) end - ----@param p1 DVec4 ----@param p2 number ----@return DVec4 -function DVec4:mul(p1,p2) end - ----@param p1 DVec4 ----@param p2 DVec4 ----@return DVec4 -function DVec4:div(p1,p2) end - ----@param _self DVec4 ----@return boolean -function DVec4:is_normalized(_self) end - ----@param _self DVec4 ----@param a DVec4 ----@param b DVec4 ----@return DVec4 -function DVec4:mul_add(_self,a,b) end - ----@param _self DVec4 ----@return UVec4 -function DVec4:as_uvec4(_self) end - ----@param _self DVec4 ----@param min number ----@return DVec4 -function DVec4:clamp_length_min(_self,min) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:floor(_self) end - ----@param v number ----@return DVec4 -function DVec4.splat(v) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:fract(_self) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:exp(_self) end - ----@param _self DVec4 ----@param normal DVec4 ----@return DVec4 -function DVec4:reflect(_self,normal) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:recip(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return number -function DVec4:distance(_self,rhs) end - ----@param _self DVec4 ----@param rhs DVec4 ----@param s number ----@return DVec4 -function DVec4:lerp(_self,rhs,s) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:neg(_self) end - ----@param _self DVec4 ----@param w number ----@return DVec4 -function DVec4:with_w(_self,w) end - ----@param p1 DVec4 ----@param p2 DVec4 ----@return DVec4 -function DVec4:rem(p1,p2) end - ----@param _self DVec4 ----@return number -function DVec4:element_product(_self) end - ----@param _self DVec4 ----@param z number ----@return DVec4 -function DVec4:with_z(_self,z) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return BVec4 -function DVec4:cmple(_self,rhs) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:dot_into_vec(_self,rhs) end - ----@param _self DVec4 ----@return integer -function DVec4:is_negative_bitmask(_self) end - ----@param _self DVec4 ----@return number -function DVec4:element_sum(_self) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:clone(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:reject_from_normalized(_self,rhs) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:midpoint(_self,rhs) end - ----@param _self DVec4 ----@param min number ----@param max number ----@return DVec4 -function DVec4:clamp_length(_self,min,max) end - ----@param a number[] ----@return DVec4 -function DVec4.from_array(a) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return BVec4 -function DVec4:cmpne(_self,rhs) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return BVec4 -function DVec4:cmpge(_self,rhs) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:round(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:reject_from(_self,rhs) end - ----@param p1 DVec4 ----@param p2 number ----@return DVec4 -function DVec4:div(p1,p2) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:project_onto_normalized(_self,rhs) end - ----@param _self DVec4 ----@return BVec4 -function DVec4:is_nan_mask(_self) end - ----@param _self DVec4 ----@return U64Vec4 -function DVec4:as_u64vec4(_self) end - ----@param _self DVec4 ----@return I64Vec4 -function DVec4:as_i64vec4(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:rem_euclid(_self,rhs) end - ----@param _self DVec4 ----@param x number ----@return DVec4 -function DVec4:with_x(_self,x) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:trunc(_self) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:fract_gl(_self) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:signum(_self) end - ----@param _self DVec4 ----@param fallback DVec4 ----@return DVec4 -function DVec4:normalize_or(_self,fallback) end - ----@param _self DVec4 ----@return IVec4 -function DVec4:as_ivec4(_self) end - ----@param p1 DVec4 ----@param p2 DVec4 ----@return DVec4 -function DVec4:mul(p1,p2) end - ----@param _self DVec4 ----@param max number ----@return DVec4 -function DVec4:clamp_length_max(_self,max) end - ----@param _self DVec4 ----@return boolean -function DVec4:is_finite(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:sub(_self,rhs) end - ----@param _self DVec4 ----@return number -function DVec4:length_squared(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:add(_self,rhs) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:mul(_self,rhs) end - ----@param p1 DVec4 ----@param p2 DVec4 ----@return DVec4 -function DVec4:add(p1,p2) end - ----@param _self DVec4 ----@return U8Vec4 -function DVec4:as_u8vec4(_self) end - ----@param x number ----@param y number ----@param z number ----@param w number ----@return DVec4 -function DVec4.new(x,y,z,w) end - ----@param _self DVec4 ----@param other DVec4 ----@return boolean -function DVec4:eq(_self,other) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:project_onto(_self,rhs) end - ----@param p1 DVec4 ----@param p2 number ----@return DVec4 -function DVec4:add(p1,p2) end - ----@param _self DVec4 ----@return number[] -function DVec4:to_array(_self) end - ----@param p1 DVec4 ----@param p2 DVec4 ----@return DVec4 -function DVec4:sub(p1,p2) end - ----@param mask BVec4 ----@param if_true DVec4 ----@param if_false DVec4 ----@return DVec4 -function DVec4.select(mask,if_true,if_false) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:copysign(_self,rhs) end - ----@param _self DVec4 ----@return I8Vec4 -function DVec4:as_i8vec4(_self) end - ----@param _self DVec4 ----@param y number ----@return DVec4 -function DVec4:with_y(_self,y) end - ----@param _self DVec4 ----@return U16Vec4 -function DVec4:as_u16vec4(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return BVec4 -function DVec4:cmpeq(_self,rhs) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return number -function DVec4:distance_squared(_self,rhs) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:rem(_self,rhs) end - ----@param _self DVec4 ----@return number -function DVec4:length_recip(_self) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:normalize(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:div(_self,rhs) end - ----@param _self DVec4 ----@return DVec4 -function DVec4:abs(_self) end - ----@param _self DVec4 ----@return DVec3 -function DVec4:truncate(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@param max_abs_diff number ----@return boolean -function DVec4:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return BVec4 -function DVec4:cmpgt(_self,rhs) end - ----@param _self DVec4 ----@return BVec4 -function DVec4:is_finite_mask(_self) end - ----@param _self DVec4 ----@return number -function DVec4:length(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return BVec4 -function DVec4:cmplt(_self,rhs) end - ----@param _self DVec4 ----@return Vec4 -function DVec4:as_vec4(_self) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return number -function DVec4:dot(_self,rhs) end - ----@param _self DVec4 ----@param rhs DVec4 ----@return DVec4 -function DVec4:min(_self,rhs) end - ----@param _self DVec4 ----@return number -function DVec4:max_element(_self) end - - ----@class EulerRot : ReflectReference -EulerRot = {} - ----@param _self EulerRot ----@param other EulerRot ----@return boolean -function EulerRot:eq(_self,other) end - ----@param _self EulerRot ----@return EulerRot -function EulerRot:clone(_self) end - ----@param _self EulerRot ----@return nil -function EulerRot:assert_receiver_is_total_eq(_self) end - - ----@class I16Vec2 : ReflectReference ----@field x ? integer ----@field y ? integer -I16Vec2 = {} - ----@param _self I16Vec2 ----@param rhs U16Vec2 ----@return I16Vec2 -function I16Vec2:saturating_sub_unsigned(_self,rhs) end - ----@param x integer ----@param y integer ----@return I16Vec2 -function I16Vec2.new(x,y) end - ----@param p1 I16Vec2 ----@param p2 I16Vec2 ----@return I16Vec2 -function I16Vec2:mul(p1,p2) end - ----@param _self I16Vec2 ----@return UVec2 -function I16Vec2:as_uvec2(_self) end - ----@param _self I16Vec2 ----@return integer -function I16Vec2:length_squared(_self) end - ----@param p1 I16Vec2 ----@param p2 I16Vec2 ----@return I16Vec2 -function I16Vec2:sub(p1,p2) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:sub(_self,rhs) end - ----@param _self I16Vec2 ----@return I8Vec2 -function I16Vec2:as_i8vec2(_self) end - ----@param p1 I16Vec2 ----@param p2 I16Vec2 ----@return I16Vec2 -function I16Vec2:add(p1,p2) end - ----@param _self I16Vec2 ----@param rhs U16Vec2 ----@return I16Vec2 -function I16Vec2:saturating_add_unsigned(_self,rhs) end - ----@param _self I16Vec2 ----@return I64Vec2 -function I16Vec2:as_i64vec2(_self) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return BVec2 -function I16Vec2:cmplt(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return integer -function I16Vec2:distance_squared(_self,rhs) end - ----@param _self I16Vec2 ----@return I16Vec2 -function I16Vec2:neg(_self) end - ----@param _self I16Vec2 ----@return integer -function I16Vec2:min_element(_self) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:saturating_add(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:add(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:wrapping_div(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return BVec2 -function I16Vec2:cmpge(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:mul(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return BVec2 -function I16Vec2:cmple(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:saturating_div(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs U16Vec2 ----@return I16Vec2 -function I16Vec2:wrapping_add_unsigned(_self,rhs) end - ----@param p1 I16Vec2 ----@param p2 integer ----@return I16Vec2 -function I16Vec2:add(p1,p2) end - ----@param _self I16Vec2 ----@param other I16Vec2 ----@return boolean -function I16Vec2:eq(_self,other) end - ----@param _self I16Vec2 ----@return DVec2 -function I16Vec2:as_dvec2(_self) end - ----@param _self I16Vec2 ----@return integer -function I16Vec2:max_element(_self) end - ----@param _self I16Vec2 ----@return I16Vec2 -function I16Vec2:clone(_self) end - ----@param _self I16Vec2 ----@param min I16Vec2 ----@param max I16Vec2 ----@return I16Vec2 -function I16Vec2:clamp(_self,min,max) end - ----@param _self I16Vec2 ----@return integer[] -function I16Vec2:to_array(_self) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:saturating_mul(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:min(_self,rhs) end - ----@param _self I16Vec2 ----@param z integer ----@return I16Vec3 -function I16Vec2:extend(_self,z) end - ----@param _self I16Vec2 ----@return I16Vec2 -function I16Vec2:signum(_self) end - ----@param _self I16Vec2 ----@return Vec2 -function I16Vec2:as_vec2(_self) end - ----@param _self I16Vec2 ----@return U64Vec2 -function I16Vec2:as_u64vec2(_self) end - ----@param v integer ----@return I16Vec2 -function I16Vec2.splat(v) end - ----@param _self I16Vec2 ----@return integer -function I16Vec2:is_negative_bitmask(_self) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:rem_euclid(_self,rhs) end - ----@param _self I16Vec2 ----@return IVec2 -function I16Vec2:as_ivec2(_self) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:div(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:rotate(_self,rhs) end - ----@param p1 I16Vec2 ----@param p2 integer ----@return I16Vec2 -function I16Vec2:sub(p1,p2) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return integer -function I16Vec2:perp_dot(_self,rhs) end - ----@param _self I16Vec2 ----@return integer -function I16Vec2:element_sum(_self) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:max(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:rem(_self,rhs) end - ----@param _self I16Vec2 ----@return I16Vec2 -function I16Vec2:abs(_self) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:saturating_sub(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return BVec2 -function I16Vec2:cmpgt(_self,rhs) end - ----@param p1 I16Vec2 ----@param p2 I16Vec2 ----@return I16Vec2 -function I16Vec2:div(p1,p2) end - ----@param p1 I16Vec2 ----@param p2 integer ----@return I16Vec2 -function I16Vec2:rem(p1,p2) end - ----@param p1 I16Vec2 ----@param p2 integer ----@return I16Vec2 -function I16Vec2:mul(p1,p2) end - ----@param _self I16Vec2 ----@return U16Vec2 -function I16Vec2:as_u16vec2(_self) end - ----@param _self I16Vec2 ----@param y integer ----@return I16Vec2 -function I16Vec2:with_y(_self,y) end - ----@param mask BVec2 ----@param if_true I16Vec2 ----@param if_false I16Vec2 ----@return I16Vec2 -function I16Vec2.select(mask,if_true,if_false) end - ----@param _self I16Vec2 ----@return integer -function I16Vec2:element_product(_self) end - ----@param _self I16Vec2 ----@return nil -function I16Vec2:assert_receiver_is_total_eq(_self) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:wrapping_mul(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return BVec2 -function I16Vec2:cmpeq(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:div_euclid(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs U16Vec2 ----@return I16Vec2 -function I16Vec2:wrapping_sub_unsigned(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return integer -function I16Vec2:dot(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:wrapping_add(_self,rhs) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:wrapping_sub(_self,rhs) end - ----@param _self I16Vec2 ----@return U8Vec2 -function I16Vec2:as_u8vec2(_self) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return I16Vec2 -function I16Vec2:dot_into_vec(_self,rhs) end - ----@param p1 I16Vec2 ----@param p2 I16Vec2 ----@return I16Vec2 -function I16Vec2:rem(p1,p2) end - ----@param _self I16Vec2 ----@param rhs I16Vec2 ----@return BVec2 -function I16Vec2:cmpne(_self,rhs) end - ----@param _self I16Vec2 ----@param x integer ----@return I16Vec2 -function I16Vec2:with_x(_self,x) end - ----@param p1 I16Vec2 ----@param p2 integer ----@return I16Vec2 -function I16Vec2:div(p1,p2) end - ----@param _self I16Vec2 ----@return I16Vec2 -function I16Vec2:perp(_self) end - ----@param a integer[] ----@return I16Vec2 -function I16Vec2.from_array(a) end - - ----@class I16Vec3 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer -I16Vec3 = {} - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return BVec3 -function I16Vec3:cmplt(_self,rhs) end - ----@param _self I16Vec3 ----@return integer[] -function I16Vec3:to_array(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return BVec3 -function I16Vec3:cmple(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:mul(_self,rhs) end - ----@param p1 I16Vec3 ----@param p2 I16Vec3 ----@return I16Vec3 -function I16Vec3:add(p1,p2) end - ----@param _self I16Vec3 ----@param rhs U16Vec3 ----@return I16Vec3 -function I16Vec3:saturating_sub_unsigned(_self,rhs) end - ----@param _self I16Vec3 ----@return integer -function I16Vec3:element_sum(_self) end - ----@param p1 I16Vec3 ----@param p2 integer ----@return I16Vec3 -function I16Vec3:add(p1,p2) end - ----@param p1 I16Vec3 ----@param p2 integer ----@return I16Vec3 -function I16Vec3:rem(p1,p2) end - ----@param _self I16Vec3 ----@return integer -function I16Vec3:element_product(_self) end - ----@param _self I16Vec3 ----@param rhs U16Vec3 ----@return I16Vec3 -function I16Vec3:wrapping_sub_unsigned(_self,rhs) end - ----@param _self I16Vec3 ----@return I16Vec2 -function I16Vec3:truncate(_self) end - ----@param _self I16Vec3 ----@return I16Vec3 -function I16Vec3:neg(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return BVec3 -function I16Vec3:cmpne(_self,rhs) end - ----@param _self I16Vec3 ----@return integer -function I16Vec3:length_squared(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return BVec3 -function I16Vec3:cmpge(_self,rhs) end - ----@param p1 I16Vec3 ----@param p2 integer ----@return I16Vec3 -function I16Vec3:div(p1,p2) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:add(_self,rhs) end - ----@param _self I16Vec3 ----@return Vec3 -function I16Vec3:as_vec3(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:saturating_mul(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:saturating_add(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:cross(_self,rhs) end - ----@param _self I16Vec3 ----@param min I16Vec3 ----@param max I16Vec3 ----@return I16Vec3 -function I16Vec3:clamp(_self,min,max) end - ----@param p1 I16Vec3 ----@param p2 integer ----@return I16Vec3 -function I16Vec3:mul(p1,p2) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:wrapping_div(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return BVec3 -function I16Vec3:cmpeq(_self,rhs) end - ----@param p1 I16Vec3 ----@param p2 I16Vec3 ----@return I16Vec3 -function I16Vec3:rem(p1,p2) end - ----@param _self I16Vec3 ----@return Vec3A -function I16Vec3:as_vec3a(_self) end - ----@param _self I16Vec3 ----@return I16Vec3 -function I16Vec3:clone(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:saturating_sub(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:min(_self,rhs) end - ----@param _self I16Vec3 ----@param w integer ----@return I16Vec4 -function I16Vec3:extend(_self,w) end - ----@param _self I16Vec3 ----@return I64Vec3 -function I16Vec3:as_i64vec3(_self) end - ----@param _self I16Vec3 ----@param y integer ----@return I16Vec3 -function I16Vec3:with_y(_self,y) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:max(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return BVec3 -function I16Vec3:cmpgt(_self,rhs) end - ----@param _self I16Vec3 ----@return U16Vec3 -function I16Vec3:as_u16vec3(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:wrapping_mul(_self,rhs) end - ----@param p1 I16Vec3 ----@param p2 I16Vec3 ----@return I16Vec3 -function I16Vec3:mul(p1,p2) end - ----@param _self I16Vec3 ----@return I16Vec3 -function I16Vec3:signum(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:sub(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return integer -function I16Vec3:dot(_self,rhs) end - ----@param mask BVec3 ----@param if_true I16Vec3 ----@param if_false I16Vec3 ----@return I16Vec3 -function I16Vec3.select(mask,if_true,if_false) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:wrapping_sub(_self,rhs) end - ----@param _self I16Vec3 ----@return I8Vec3 -function I16Vec3:as_i8vec3(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:div(_self,rhs) end - ----@param _self I16Vec3 ----@param z integer ----@return I16Vec3 -function I16Vec3:with_z(_self,z) end - ----@param _self I16Vec3 ----@return integer -function I16Vec3:max_element(_self) end - ----@param _self I16Vec3 ----@return integer -function I16Vec3:min_element(_self) end - ----@param a integer[] ----@return I16Vec3 -function I16Vec3.from_array(a) end - ----@param _self I16Vec3 ----@return nil -function I16Vec3:assert_receiver_is_total_eq(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return integer -function I16Vec3:distance_squared(_self,rhs) end - ----@param _self I16Vec3 ----@return DVec3 -function I16Vec3:as_dvec3(_self) end - ----@param _self I16Vec3 ----@param rhs U16Vec3 ----@return I16Vec3 -function I16Vec3:wrapping_add_unsigned(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:div_euclid(_self,rhs) end - ----@param _self I16Vec3 ----@return integer -function I16Vec3:is_negative_bitmask(_self) end - ----@param _self I16Vec3 ----@return UVec3 -function I16Vec3:as_uvec3(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:rem_euclid(_self,rhs) end - ----@param _self I16Vec3 ----@return U64Vec3 -function I16Vec3:as_u64vec3(_self) end - ----@param _self I16Vec3 ----@param other I16Vec3 ----@return boolean -function I16Vec3:eq(_self,other) end - ----@param _self I16Vec3 ----@return U8Vec3 -function I16Vec3:as_u8vec3(_self) end - ----@param _self I16Vec3 ----@return IVec3 -function I16Vec3:as_ivec3(_self) end - ----@param p1 I16Vec3 ----@param p2 I16Vec3 ----@return I16Vec3 -function I16Vec3:sub(p1,p2) end - ----@param _self I16Vec3 ----@param x integer ----@return I16Vec3 -function I16Vec3:with_x(_self,x) end - ----@param p1 I16Vec3 ----@param p2 integer ----@return I16Vec3 -function I16Vec3:sub(p1,p2) end - ----@param v integer ----@return I16Vec3 -function I16Vec3.splat(v) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:dot_into_vec(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:wrapping_add(_self,rhs) end - ----@param _self I16Vec3 ----@return I16Vec3 -function I16Vec3:abs(_self) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:rem(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs I16Vec3 ----@return I16Vec3 -function I16Vec3:saturating_div(_self,rhs) end - ----@param _self I16Vec3 ----@param rhs U16Vec3 ----@return I16Vec3 -function I16Vec3:saturating_add_unsigned(_self,rhs) end - ----@param p1 I16Vec3 ----@param p2 I16Vec3 ----@return I16Vec3 -function I16Vec3:div(p1,p2) end - ----@param x integer ----@param y integer ----@param z integer ----@return I16Vec3 -function I16Vec3.new(x,y,z) end - - ----@class I16Vec4 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer -I16Vec4 = {} - ----@param _self I16Vec4 ----@param rhs U16Vec4 ----@return I16Vec4 -function I16Vec4:saturating_add_unsigned(_self,rhs) end - ----@param _self I16Vec4 ----@return nil -function I16Vec4:assert_receiver_is_total_eq(_self) end - ----@param v integer ----@return I16Vec4 -function I16Vec4.splat(v) end - ----@param _self I16Vec4 ----@param w integer ----@return I16Vec4 -function I16Vec4:with_w(_self,w) end - ----@param a integer[] ----@return I16Vec4 -function I16Vec4.from_array(a) end - ----@param p1 I16Vec4 ----@param p2 I16Vec4 ----@return I16Vec4 -function I16Vec4:add(p1,p2) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:saturating_sub(_self,rhs) end - ----@param x integer ----@param y integer ----@param z integer ----@param w integer ----@return I16Vec4 -function I16Vec4.new(x,y,z,w) end - ----@param _self I16Vec4 ----@return I8Vec4 -function I16Vec4:as_i8vec4(_self) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:rem(_self,rhs) end - ----@param _self I16Vec4 ----@return I16Vec4 -function I16Vec4:neg(_self) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return BVec4 -function I16Vec4:cmpgt(_self,rhs) end - ----@param _self I16Vec4 ----@return Vec4 -function I16Vec4:as_vec4(_self) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:wrapping_mul(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs U16Vec4 ----@return I16Vec4 -function I16Vec4:wrapping_add_unsigned(_self,rhs) end - ----@param _self I16Vec4 ----@param min I16Vec4 ----@param max I16Vec4 ----@return I16Vec4 -function I16Vec4:clamp(_self,min,max) end - ----@param p1 I16Vec4 ----@param p2 I16Vec4 ----@return I16Vec4 -function I16Vec4:mul(p1,p2) end - ----@param _self I16Vec4 ----@return integer[] -function I16Vec4:to_array(_self) end - ----@param _self I16Vec4 ----@param other I16Vec4 ----@return boolean -function I16Vec4:eq(_self,other) end - ----@param _self I16Vec4 ----@return integer -function I16Vec4:length_squared(_self) end - ----@param _self I16Vec4 ----@return I16Vec3 -function I16Vec4:truncate(_self) end - ----@param _self I16Vec4 ----@param y integer ----@return I16Vec4 -function I16Vec4:with_y(_self,y) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return BVec4 -function I16Vec4:cmple(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return BVec4 -function I16Vec4:cmpne(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:saturating_add(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:div_euclid(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return BVec4 -function I16Vec4:cmpge(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:saturating_mul(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:wrapping_add(_self,rhs) end - ----@param mask BVec4 ----@param if_true I16Vec4 ----@param if_false I16Vec4 ----@return I16Vec4 -function I16Vec4.select(mask,if_true,if_false) end - ----@param _self I16Vec4 ----@return DVec4 -function I16Vec4:as_dvec4(_self) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:wrapping_sub(_self,rhs) end - ----@param _self I16Vec4 ----@return U64Vec4 -function I16Vec4:as_u64vec4(_self) end - ----@param _self I16Vec4 ----@param rhs U16Vec4 ----@return I16Vec4 -function I16Vec4:saturating_sub_unsigned(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:max(_self,rhs) end - ----@param _self I16Vec4 ----@return IVec4 -function I16Vec4:as_ivec4(_self) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return BVec4 -function I16Vec4:cmpeq(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:div(_self,rhs) end - ----@param p1 I16Vec4 ----@param p2 integer ----@return I16Vec4 -function I16Vec4:rem(p1,p2) end - ----@param _self I16Vec4 ----@param x integer ----@return I16Vec4 -function I16Vec4:with_x(_self,x) end - ----@param _self I16Vec4 ----@return I64Vec4 -function I16Vec4:as_i64vec4(_self) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return BVec4 -function I16Vec4:cmplt(_self,rhs) end - ----@param _self I16Vec4 ----@return integer -function I16Vec4:is_negative_bitmask(_self) end - ----@param _self I16Vec4 ----@return I16Vec4 -function I16Vec4:abs(_self) end - ----@param _self I16Vec4 ----@return I16Vec4 -function I16Vec4:signum(_self) end - ----@param p1 I16Vec4 ----@param p2 integer ----@return I16Vec4 -function I16Vec4:mul(p1,p2) end - ----@param _self I16Vec4 ----@return U16Vec4 -function I16Vec4:as_u16vec4(_self) end - ----@param _self I16Vec4 ----@return U8Vec4 -function I16Vec4:as_u8vec4(_self) end - ----@param _self I16Vec4 ----@return integer -function I16Vec4:min_element(_self) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:sub(_self,rhs) end - ----@param p1 I16Vec4 ----@param p2 integer ----@return I16Vec4 -function I16Vec4:sub(p1,p2) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:wrapping_div(_self,rhs) end - ----@param p1 I16Vec4 ----@param p2 integer ----@return I16Vec4 -function I16Vec4:div(p1,p2) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:min(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:mul(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:add(_self,rhs) end - ----@param p1 I16Vec4 ----@param p2 integer ----@return I16Vec4 -function I16Vec4:add(p1,p2) end - ----@param _self I16Vec4 ----@param rhs U16Vec4 ----@return I16Vec4 -function I16Vec4:wrapping_sub_unsigned(_self,rhs) end - ----@param _self I16Vec4 ----@param z integer ----@return I16Vec4 -function I16Vec4:with_z(_self,z) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:rem_euclid(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return integer -function I16Vec4:dot(_self,rhs) end - ----@param _self I16Vec4 ----@return integer -function I16Vec4:element_product(_self) end - ----@param _self I16Vec4 ----@return integer -function I16Vec4:max_element(_self) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return integer -function I16Vec4:distance_squared(_self,rhs) end - ----@param p1 I16Vec4 ----@param p2 I16Vec4 ----@return I16Vec4 -function I16Vec4:sub(p1,p2) end - ----@param p1 I16Vec4 ----@param p2 I16Vec4 ----@return I16Vec4 -function I16Vec4:div(p1,p2) end - ----@param _self I16Vec4 ----@return UVec4 -function I16Vec4:as_uvec4(_self) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:saturating_div(_self,rhs) end - ----@param _self I16Vec4 ----@param rhs I16Vec4 ----@return I16Vec4 -function I16Vec4:dot_into_vec(_self,rhs) end - ----@param _self I16Vec4 ----@return I16Vec4 -function I16Vec4:clone(_self) end - ----@param p1 I16Vec4 ----@param p2 I16Vec4 ----@return I16Vec4 -function I16Vec4:rem(p1,p2) end - ----@param _self I16Vec4 ----@return integer -function I16Vec4:element_sum(_self) end - - ----@class I64Vec2 : ReflectReference ----@field x ? integer ----@field y ? integer -I64Vec2 = {} - ----@param _self I64Vec2 ----@return U8Vec2 -function I64Vec2:as_u8vec2(_self) end - ----@param _self I64Vec2 ----@param rhs U64Vec2 ----@return I64Vec2 -function I64Vec2:wrapping_add_unsigned(_self,rhs) end - ----@param p1 I64Vec2 ----@param p2 I64Vec2 ----@return I64Vec2 -function I64Vec2:mul(p1,p2) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:div(_self,rhs) end - ----@param _self I64Vec2 ----@return I64Vec2 -function I64Vec2:abs(_self) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return BVec2 -function I64Vec2:cmpeq(_self,rhs) end - ----@param _self I64Vec2 ----@return I64Vec2 -function I64Vec2:signum(_self) end - ----@param _self I64Vec2 ----@return I64Vec2 -function I64Vec2:neg(_self) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return BVec2 -function I64Vec2:cmpgt(_self,rhs) end - ----@param _self I64Vec2 ----@return integer -function I64Vec2:element_product(_self) end - ----@param _self I64Vec2 ----@param z integer ----@return I64Vec3 -function I64Vec2:extend(_self,z) end - ----@param p1 I64Vec2 ----@param p2 I64Vec2 ----@return I64Vec2 -function I64Vec2:rem(p1,p2) end - ----@param _self I64Vec2 ----@return nil -function I64Vec2:assert_receiver_is_total_eq(_self) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:wrapping_add(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:wrapping_sub(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return integer -function I64Vec2:distance_squared(_self,rhs) end - ----@param _self I64Vec2 ----@param other I64Vec2 ----@return boolean -function I64Vec2:eq(_self,other) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return BVec2 -function I64Vec2:cmpne(_self,rhs) end - ----@param p1 I64Vec2 ----@param p2 I64Vec2 ----@return I64Vec2 -function I64Vec2:add(p1,p2) end - ----@param p1 I64Vec2 ----@param p2 integer ----@return I64Vec2 -function I64Vec2:mul(p1,p2) end - ----@param _self I64Vec2 ----@param rhs U64Vec2 ----@return I64Vec2 -function I64Vec2:saturating_add_unsigned(_self,rhs) end - ----@param p1 I64Vec2 ----@param p2 integer ----@return I64Vec2 -function I64Vec2:rem(p1,p2) end - ----@param p1 I64Vec2 ----@param p2 I64Vec2 ----@return I64Vec2 -function I64Vec2:div(p1,p2) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:saturating_mul(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:saturating_sub(_self,rhs) end - ----@param _self I64Vec2 ----@return integer -function I64Vec2:element_sum(_self) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:min(_self,rhs) end - ----@param _self I64Vec2 ----@return Vec2 -function I64Vec2:as_vec2(_self) end - ----@param p1 I64Vec2 ----@param p2 integer ----@return I64Vec2 -function I64Vec2:add(p1,p2) end - ----@param _self I64Vec2 ----@return IVec2 -function I64Vec2:as_ivec2(_self) end - ----@param _self I64Vec2 ----@return integer[] -function I64Vec2:to_array(_self) end - ----@param x integer ----@param y integer ----@return I64Vec2 -function I64Vec2.new(x,y) end - ----@param _self I64Vec2 ----@param y integer ----@return I64Vec2 -function I64Vec2:with_y(_self,y) end - ----@param _self I64Vec2 ----@return DVec2 -function I64Vec2:as_dvec2(_self) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:dot_into_vec(_self,rhs) end - ----@param p1 I64Vec2 ----@param p2 integer ----@return I64Vec2 -function I64Vec2:div(p1,p2) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:saturating_add(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:rem_euclid(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs U64Vec2 ----@return I64Vec2 -function I64Vec2:wrapping_sub_unsigned(_self,rhs) end - ----@param _self I64Vec2 ----@param min I64Vec2 ----@param max I64Vec2 ----@return I64Vec2 -function I64Vec2:clamp(_self,min,max) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:rotate(_self,rhs) end - ----@param _self I64Vec2 ----@return UVec2 -function I64Vec2:as_uvec2(_self) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return BVec2 -function I64Vec2:cmpge(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return BVec2 -function I64Vec2:cmplt(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return integer -function I64Vec2:dot(_self,rhs) end - ----@param p1 I64Vec2 ----@param p2 integer ----@return I64Vec2 -function I64Vec2:sub(p1,p2) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:add(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return BVec2 -function I64Vec2:cmple(_self,rhs) end - ----@param _self I64Vec2 ----@return U16Vec2 -function I64Vec2:as_u16vec2(_self) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:max(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:wrapping_div(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:saturating_div(_self,rhs) end - ----@param _self I64Vec2 ----@return integer -function I64Vec2:min_element(_self) end - ----@param _self I64Vec2 ----@param x integer ----@return I64Vec2 -function I64Vec2:with_x(_self,x) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:rem(_self,rhs) end - ----@param mask BVec2 ----@param if_true I64Vec2 ----@param if_false I64Vec2 ----@return I64Vec2 -function I64Vec2.select(mask,if_true,if_false) end - ----@param _self I64Vec2 ----@return I16Vec2 -function I64Vec2:as_i16vec2(_self) end - ----@param v integer ----@return I64Vec2 -function I64Vec2.splat(v) end - ----@param _self I64Vec2 ----@return integer -function I64Vec2:length_squared(_self) end - ----@param _self I64Vec2 ----@return I8Vec2 -function I64Vec2:as_i8vec2(_self) end - ----@param _self I64Vec2 ----@return integer -function I64Vec2:max_element(_self) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:mul(_self,rhs) end - ----@param _self I64Vec2 ----@return U64Vec2 -function I64Vec2:as_u64vec2(_self) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:wrapping_mul(_self,rhs) end - ----@param p1 I64Vec2 ----@param p2 I64Vec2 ----@return I64Vec2 -function I64Vec2:sub(p1,p2) end - ----@param _self I64Vec2 ----@return integer -function I64Vec2:is_negative_bitmask(_self) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:div_euclid(_self,rhs) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return I64Vec2 -function I64Vec2:sub(_self,rhs) end - ----@param _self I64Vec2 ----@return I64Vec2 -function I64Vec2:perp(_self) end - ----@param _self I64Vec2 ----@param rhs U64Vec2 ----@return I64Vec2 -function I64Vec2:saturating_sub_unsigned(_self,rhs) end - ----@param a integer[] ----@return I64Vec2 -function I64Vec2.from_array(a) end - ----@param _self I64Vec2 ----@param rhs I64Vec2 ----@return integer -function I64Vec2:perp_dot(_self,rhs) end - ----@param _self I64Vec2 ----@return I64Vec2 -function I64Vec2:clone(_self) end - - ----@class I64Vec3 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer -I64Vec3 = {} - ----@param _self I64Vec3 ----@return integer -function I64Vec3:element_sum(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:div_euclid(_self,rhs) end - ----@param _self I64Vec3 ----@param min I64Vec3 ----@param max I64Vec3 ----@return I64Vec3 -function I64Vec3:clamp(_self,min,max) end - ----@param p1 I64Vec3 ----@param p2 integer ----@return I64Vec3 -function I64Vec3:rem(p1,p2) end - ----@param p1 I64Vec3 ----@param p2 I64Vec3 ----@return I64Vec3 -function I64Vec3:sub(p1,p2) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return BVec3 -function I64Vec3:cmpne(_self,rhs) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:cross(_self,rhs) end - ----@param p1 I64Vec3 ----@param p2 integer ----@return I64Vec3 -function I64Vec3:sub(p1,p2) end - ----@param _self I64Vec3 ----@return I64Vec2 -function I64Vec3:truncate(_self) end - ----@param p1 I64Vec3 ----@param p2 I64Vec3 ----@return I64Vec3 -function I64Vec3:rem(p1,p2) end - ----@param _self I64Vec3 ----@param rhs U64Vec3 ----@return I64Vec3 -function I64Vec3:wrapping_add_unsigned(_self,rhs) end - ----@param _self I64Vec3 ----@return I64Vec3 -function I64Vec3:neg(_self) end - ----@param _self I64Vec3 ----@return U16Vec3 -function I64Vec3:as_u16vec3(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:saturating_div(_self,rhs) end - ----@param _self I64Vec3 ----@param other I64Vec3 ----@return boolean -function I64Vec3:eq(_self,other) end - ----@param p1 I64Vec3 ----@param p2 I64Vec3 ----@return I64Vec3 -function I64Vec3:div(p1,p2) end - ----@param _self I64Vec3 ----@return integer -function I64Vec3:is_negative_bitmask(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:saturating_mul(_self,rhs) end - ----@param _self I64Vec3 ----@param rhs U64Vec3 ----@return I64Vec3 -function I64Vec3:saturating_add_unsigned(_self,rhs) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:max(_self,rhs) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:saturating_add(_self,rhs) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return integer -function I64Vec3:dot(_self,rhs) end - ----@param v integer ----@return I64Vec3 -function I64Vec3.splat(v) end - ----@param a integer[] ----@return I64Vec3 -function I64Vec3.from_array(a) end - ----@param _self I64Vec3 ----@param w integer ----@return I64Vec4 -function I64Vec3:extend(_self,w) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return BVec3 -function I64Vec3:cmpgt(_self,rhs) end - ----@param _self I64Vec3 ----@return I64Vec3 -function I64Vec3:clone(_self) end - ----@param p1 I64Vec3 ----@param p2 I64Vec3 ----@return I64Vec3 -function I64Vec3:mul(p1,p2) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:rem(_self,rhs) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:div(_self,rhs) end - ----@param x integer ----@param y integer ----@param z integer ----@return I64Vec3 -function I64Vec3.new(x,y,z) end - ----@param _self I64Vec3 ----@return nil -function I64Vec3:assert_receiver_is_total_eq(_self) end - ----@param _self I64Vec3 ----@return U64Vec3 -function I64Vec3:as_u64vec3(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:rem_euclid(_self,rhs) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:wrapping_mul(_self,rhs) end - ----@param _self I64Vec3 ----@return I8Vec3 -function I64Vec3:as_i8vec3(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:mul(_self,rhs) end - ----@param _self I64Vec3 ----@return I64Vec3 -function I64Vec3:abs(_self) end - ----@param mask BVec3 ----@param if_true I64Vec3 ----@param if_false I64Vec3 ----@return I64Vec3 -function I64Vec3.select(mask,if_true,if_false) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:add(_self,rhs) end - ----@param _self I64Vec3 ----@param z integer ----@return I64Vec3 -function I64Vec3:with_z(_self,z) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return integer -function I64Vec3:distance_squared(_self,rhs) end - ----@param _self I64Vec3 ----@return integer -function I64Vec3:min_element(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:min(_self,rhs) end - ----@param _self I64Vec3 ----@return I64Vec3 -function I64Vec3:signum(_self) end - ----@param _self I64Vec3 ----@return integer[] -function I64Vec3:to_array(_self) end - ----@param p1 I64Vec3 ----@param p2 integer ----@return I64Vec3 -function I64Vec3:div(p1,p2) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:dot_into_vec(_self,rhs) end - ----@param _self I64Vec3 ----@return integer -function I64Vec3:element_product(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:wrapping_div(_self,rhs) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return BVec3 -function I64Vec3:cmpeq(_self,rhs) end - ----@param p1 I64Vec3 ----@param p2 integer ----@return I64Vec3 -function I64Vec3:mul(p1,p2) end - ----@param _self I64Vec3 ----@return DVec3 -function I64Vec3:as_dvec3(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:wrapping_sub(_self,rhs) end - ----@param _self I64Vec3 ----@return integer -function I64Vec3:length_squared(_self) end - ----@param _self I64Vec3 ----@return Vec3A -function I64Vec3:as_vec3a(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:sub(_self,rhs) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return BVec3 -function I64Vec3:cmple(_self,rhs) end - ----@param _self I64Vec3 ----@return U8Vec3 -function I64Vec3:as_u8vec3(_self) end - ----@param p1 I64Vec3 ----@param p2 integer ----@return I64Vec3 -function I64Vec3:add(p1,p2) end - ----@param _self I64Vec3 ----@return I16Vec3 -function I64Vec3:as_i16vec3(_self) end - ----@param _self I64Vec3 ----@param rhs U64Vec3 ----@return I64Vec3 -function I64Vec3:wrapping_sub_unsigned(_self,rhs) end - ----@param _self I64Vec3 ----@return IVec3 -function I64Vec3:as_ivec3(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:wrapping_add(_self,rhs) end - ----@param _self I64Vec3 ----@return Vec3 -function I64Vec3:as_vec3(_self) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return BVec3 -function I64Vec3:cmpge(_self,rhs) end - ----@param _self I64Vec3 ----@return integer -function I64Vec3:max_element(_self) end - ----@param _self I64Vec3 ----@param rhs U64Vec3 ----@return I64Vec3 -function I64Vec3:saturating_sub_unsigned(_self,rhs) end - ----@param p1 I64Vec3 ----@param p2 I64Vec3 ----@return I64Vec3 -function I64Vec3:add(p1,p2) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return BVec3 -function I64Vec3:cmplt(_self,rhs) end - ----@param _self I64Vec3 ----@return UVec3 -function I64Vec3:as_uvec3(_self) end - ----@param _self I64Vec3 ----@param x integer ----@return I64Vec3 -function I64Vec3:with_x(_self,x) end - ----@param _self I64Vec3 ----@param rhs I64Vec3 ----@return I64Vec3 -function I64Vec3:saturating_sub(_self,rhs) end - ----@param _self I64Vec3 ----@param y integer ----@return I64Vec3 -function I64Vec3:with_y(_self,y) end - - ----@class I64Vec4 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer -I64Vec4 = {} - ----@param p1 I64Vec4 ----@param p2 I64Vec4 ----@return I64Vec4 -function I64Vec4:add(p1,p2) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return BVec4 -function I64Vec4:cmple(_self,rhs) end - ----@param _self I64Vec4 ----@return I64Vec4 -function I64Vec4:signum(_self) end - ----@param _self I64Vec4 ----@return integer -function I64Vec4:min_element(_self) end - ----@param _self I64Vec4 ----@return I64Vec4 -function I64Vec4:neg(_self) end - ----@param _self I64Vec4 ----@param w integer ----@return I64Vec4 -function I64Vec4:with_w(_self,w) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:wrapping_add(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return integer -function I64Vec4:dot(_self,rhs) end - ----@param p1 I64Vec4 ----@param p2 integer ----@return I64Vec4 -function I64Vec4:sub(p1,p2) end - ----@param _self I64Vec4 ----@return I16Vec4 -function I64Vec4:as_i16vec4(_self) end - ----@param _self I64Vec4 ----@return I64Vec3 -function I64Vec4:truncate(_self) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return BVec4 -function I64Vec4:cmplt(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs U64Vec4 ----@return I64Vec4 -function I64Vec4:wrapping_add_unsigned(_self,rhs) end - ----@param _self I64Vec4 ----@return integer -function I64Vec4:length_squared(_self) end - ----@param _self I64Vec4 ----@return integer -function I64Vec4:max_element(_self) end - ----@param _self I64Vec4 ----@param z integer ----@return I64Vec4 -function I64Vec4:with_z(_self,z) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:add(_self,rhs) end - ----@param p1 I64Vec4 ----@param p2 integer ----@return I64Vec4 -function I64Vec4:add(p1,p2) end - ----@param _self I64Vec4 ----@return UVec4 -function I64Vec4:as_uvec4(_self) end - ----@param _self I64Vec4 ----@param min I64Vec4 ----@param max I64Vec4 ----@return I64Vec4 -function I64Vec4:clamp(_self,min,max) end - ----@param _self I64Vec4 ----@param y integer ----@return I64Vec4 -function I64Vec4:with_y(_self,y) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:sub(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:mul(_self,rhs) end - ----@param mask BVec4 ----@param if_true I64Vec4 ----@param if_false I64Vec4 ----@return I64Vec4 -function I64Vec4.select(mask,if_true,if_false) end - ----@param p1 I64Vec4 ----@param p2 integer ----@return I64Vec4 -function I64Vec4:rem(p1,p2) end - ----@param p1 I64Vec4 ----@param p2 integer ----@return I64Vec4 -function I64Vec4:mul(p1,p2) end - ----@param _self I64Vec4 ----@param rhs U64Vec4 ----@return I64Vec4 -function I64Vec4:wrapping_sub_unsigned(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return BVec4 -function I64Vec4:cmpgt(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:rem_euclid(_self,rhs) end - ----@param x integer ----@param y integer ----@param z integer ----@param w integer ----@return I64Vec4 -function I64Vec4.new(x,y,z,w) end - ----@param _self I64Vec4 ----@param x integer ----@return I64Vec4 -function I64Vec4:with_x(_self,x) end - ----@param _self I64Vec4 ----@return integer[] -function I64Vec4:to_array(_self) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return BVec4 -function I64Vec4:cmpge(_self,rhs) end - ----@param p1 I64Vec4 ----@param p2 I64Vec4 ----@return I64Vec4 -function I64Vec4:div(p1,p2) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:div(_self,rhs) end - ----@param _self I64Vec4 ----@return Vec4 -function I64Vec4:as_vec4(_self) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:saturating_sub(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:wrapping_mul(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:div_euclid(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs U64Vec4 ----@return I64Vec4 -function I64Vec4:saturating_add_unsigned(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:saturating_add(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs U64Vec4 ----@return I64Vec4 -function I64Vec4:saturating_sub_unsigned(_self,rhs) end - ----@param _self I64Vec4 ----@return IVec4 -function I64Vec4:as_ivec4(_self) end - ----@param _self I64Vec4 ----@param other I64Vec4 ----@return boolean -function I64Vec4:eq(_self,other) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:saturating_div(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:wrapping_div(_self,rhs) end - ----@param p1 I64Vec4 ----@param p2 I64Vec4 ----@return I64Vec4 -function I64Vec4:rem(p1,p2) end - ----@param _self I64Vec4 ----@return nil -function I64Vec4:assert_receiver_is_total_eq(_self) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:rem(_self,rhs) end - ----@param _self I64Vec4 ----@return integer -function I64Vec4:element_product(_self) end - ----@param p1 I64Vec4 ----@param p2 integer ----@return I64Vec4 -function I64Vec4:div(p1,p2) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:min(_self,rhs) end - ----@param p1 I64Vec4 ----@param p2 I64Vec4 ----@return I64Vec4 -function I64Vec4:mul(p1,p2) end - ----@param _self I64Vec4 ----@return integer -function I64Vec4:element_sum(_self) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return BVec4 -function I64Vec4:cmpne(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:wrapping_sub(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:dot_into_vec(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return BVec4 -function I64Vec4:cmpeq(_self,rhs) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:saturating_mul(_self,rhs) end - ----@param _self I64Vec4 ----@return I64Vec4 -function I64Vec4:clone(_self) end - ----@param _self I64Vec4 ----@return I64Vec4 -function I64Vec4:abs(_self) end - ----@param _self I64Vec4 ----@return U8Vec4 -function I64Vec4:as_u8vec4(_self) end - ----@param _self I64Vec4 ----@return U16Vec4 -function I64Vec4:as_u16vec4(_self) end - ----@param _self I64Vec4 ----@return U64Vec4 -function I64Vec4:as_u64vec4(_self) end - ----@param _self I64Vec4 ----@return DVec4 -function I64Vec4:as_dvec4(_self) end - ----@param a integer[] ----@return I64Vec4 -function I64Vec4.from_array(a) end - ----@param _self I64Vec4 ----@return I8Vec4 -function I64Vec4:as_i8vec4(_self) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return I64Vec4 -function I64Vec4:max(_self,rhs) end - ----@param p1 I64Vec4 ----@param p2 I64Vec4 ----@return I64Vec4 -function I64Vec4:sub(p1,p2) end - ----@param _self I64Vec4 ----@return integer -function I64Vec4:is_negative_bitmask(_self) end - ----@param v integer ----@return I64Vec4 -function I64Vec4.splat(v) end - ----@param _self I64Vec4 ----@param rhs I64Vec4 ----@return integer -function I64Vec4:distance_squared(_self,rhs) end - - ----@class I8Vec2 : ReflectReference ----@field x ? integer ----@field y ? integer -I8Vec2 = {} - ----@param v integer ----@return I8Vec2 -function I8Vec2.splat(v) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:mul(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:sub(_self,rhs) end - ----@param _self I8Vec2 ----@return DVec2 -function I8Vec2:as_dvec2(_self) end - ----@param p1 I8Vec2 ----@param p2 I8Vec2 ----@return I8Vec2 -function I8Vec2:div(p1,p2) end - ----@param p1 I8Vec2 ----@param p2 integer ----@return I8Vec2 -function I8Vec2:mul(p1,p2) end - ----@param _self I8Vec2 ----@param rhs U8Vec2 ----@return I8Vec2 -function I8Vec2:wrapping_sub_unsigned(_self,rhs) end - ----@param _self I8Vec2 ----@param other I8Vec2 ----@return boolean -function I8Vec2:eq(_self,other) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:add(_self,rhs) end - ----@param mask BVec2 ----@param if_true I8Vec2 ----@param if_false I8Vec2 ----@return I8Vec2 -function I8Vec2.select(mask,if_true,if_false) end - ----@param p1 I8Vec2 ----@param p2 I8Vec2 ----@return I8Vec2 -function I8Vec2:mul(p1,p2) end - ----@param _self I8Vec2 ----@return integer[] -function I8Vec2:to_array(_self) end - ----@param _self I8Vec2 ----@return U8Vec2 -function I8Vec2:as_u8vec2(_self) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:wrapping_add(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return BVec2 -function I8Vec2:cmpgt(_self,rhs) end - ----@param _self I8Vec2 ----@return U16Vec2 -function I8Vec2:as_u16vec2(_self) end - ----@param _self I8Vec2 ----@return Vec2 -function I8Vec2:as_vec2(_self) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:saturating_div(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return BVec2 -function I8Vec2:cmplt(_self,rhs) end - ----@param p1 I8Vec2 ----@param p2 integer ----@return I8Vec2 -function I8Vec2:add(p1,p2) end - ----@param x integer ----@param y integer ----@return I8Vec2 -function I8Vec2.new(x,y) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:div(_self,rhs) end - ----@param _self I8Vec2 ----@param y integer ----@return I8Vec2 -function I8Vec2:with_y(_self,y) end - ----@param p1 I8Vec2 ----@param p2 I8Vec2 ----@return I8Vec2 -function I8Vec2:rem(p1,p2) end - ----@param _self I8Vec2 ----@return integer -function I8Vec2:is_negative_bitmask(_self) end - ----@param a integer[] ----@return I8Vec2 -function I8Vec2.from_array(a) end - ----@param _self I8Vec2 ----@param x integer ----@return I8Vec2 -function I8Vec2:with_x(_self,x) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:wrapping_sub(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:saturating_mul(_self,rhs) end - ----@param _self I8Vec2 ----@return I8Vec2 -function I8Vec2:perp(_self) end - ----@param p1 I8Vec2 ----@param p2 I8Vec2 ----@return I8Vec2 -function I8Vec2:add(p1,p2) end - ----@param p1 I8Vec2 ----@param p2 integer ----@return I8Vec2 -function I8Vec2:div(p1,p2) end - ----@param _self I8Vec2 ----@return I64Vec2 -function I8Vec2:as_i64vec2(_self) end - ----@param p1 I8Vec2 ----@param p2 I8Vec2 ----@return I8Vec2 -function I8Vec2:sub(p1,p2) end - ----@param _self I8Vec2 ----@return integer -function I8Vec2:element_product(_self) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:max(_self,rhs) end - ----@param _self I8Vec2 ----@return U64Vec2 -function I8Vec2:as_u64vec2(_self) end - ----@param p1 I8Vec2 ----@param p2 integer ----@return I8Vec2 -function I8Vec2:rem(p1,p2) end - ----@param _self I8Vec2 ----@return I16Vec2 -function I8Vec2:as_i16vec2(_self) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:min(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:rem(_self,rhs) end - ----@param _self I8Vec2 ----@return integer -function I8Vec2:max_element(_self) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return BVec2 -function I8Vec2:cmpeq(_self,rhs) end - ----@param _self I8Vec2 ----@return IVec2 -function I8Vec2:as_ivec2(_self) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return BVec2 -function I8Vec2:cmpge(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:rotate(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return BVec2 -function I8Vec2:cmpne(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs U8Vec2 ----@return I8Vec2 -function I8Vec2:saturating_sub_unsigned(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:rem_euclid(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return integer -function I8Vec2:distance_squared(_self,rhs) end - ----@param _self I8Vec2 ----@param z integer ----@return I8Vec3 -function I8Vec2:extend(_self,z) end - ----@param _self I8Vec2 ----@return I8Vec2 -function I8Vec2:neg(_self) end - ----@param _self I8Vec2 ----@return integer -function I8Vec2:min_element(_self) end - ----@param _self I8Vec2 ----@return I8Vec2 -function I8Vec2:signum(_self) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return integer -function I8Vec2:perp_dot(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return BVec2 -function I8Vec2:cmple(_self,rhs) end - ----@param p1 I8Vec2 ----@param p2 integer ----@return I8Vec2 -function I8Vec2:sub(p1,p2) end - ----@param _self I8Vec2 ----@param min I8Vec2 ----@param max I8Vec2 ----@return I8Vec2 -function I8Vec2:clamp(_self,min,max) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:wrapping_div(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return integer -function I8Vec2:dot(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:dot_into_vec(_self,rhs) end - ----@param _self I8Vec2 ----@return I8Vec2 -function I8Vec2:clone(_self) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:wrapping_mul(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:saturating_add(_self,rhs) end - ----@param _self I8Vec2 ----@return I8Vec2 -function I8Vec2:abs(_self) end - ----@param _self I8Vec2 ----@param rhs U8Vec2 ----@return I8Vec2 -function I8Vec2:wrapping_add_unsigned(_self,rhs) end - ----@param _self I8Vec2 ----@return nil -function I8Vec2:assert_receiver_is_total_eq(_self) end - ----@param _self I8Vec2 ----@param rhs U8Vec2 ----@return I8Vec2 -function I8Vec2:saturating_add_unsigned(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:div_euclid(_self,rhs) end - ----@param _self I8Vec2 ----@param rhs I8Vec2 ----@return I8Vec2 -function I8Vec2:saturating_sub(_self,rhs) end - ----@param _self I8Vec2 ----@return integer -function I8Vec2:length_squared(_self) end - ----@param _self I8Vec2 ----@return UVec2 -function I8Vec2:as_uvec2(_self) end - ----@param _self I8Vec2 ----@return integer -function I8Vec2:element_sum(_self) end - - ----@class I8Vec3 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer -I8Vec3 = {} - ----@param _self I8Vec3 ----@return Vec3 -function I8Vec3:as_vec3(_self) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:rem_euclid(_self,rhs) end - ----@param _self I8Vec3 ----@param w integer ----@return I8Vec4 -function I8Vec3:extend(_self,w) end - ----@param _self I8Vec3 ----@return U16Vec3 -function I8Vec3:as_u16vec3(_self) end - ----@param p1 I8Vec3 ----@param p2 integer ----@return I8Vec3 -function I8Vec3:add(p1,p2) end - ----@param _self I8Vec3 ----@return I8Vec3 -function I8Vec3:signum(_self) end - ----@param _self I8Vec3 ----@return DVec3 -function I8Vec3:as_dvec3(_self) end - ----@param _self I8Vec3 ----@return integer -function I8Vec3:element_product(_self) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return BVec3 -function I8Vec3:cmpgt(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs U8Vec3 ----@return I8Vec3 -function I8Vec3:saturating_sub_unsigned(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs U8Vec3 ----@return I8Vec3 -function I8Vec3:wrapping_add_unsigned(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs U8Vec3 ----@return I8Vec3 -function I8Vec3:saturating_add_unsigned(_self,rhs) end - ----@param _self I8Vec3 ----@return UVec3 -function I8Vec3:as_uvec3(_self) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:add(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:max(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:cross(_self,rhs) end - ----@param p1 I8Vec3 ----@param p2 I8Vec3 ----@return I8Vec3 -function I8Vec3:div(p1,p2) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:div_euclid(_self,rhs) end - ----@param _self I8Vec3 ----@param min I8Vec3 ----@param max I8Vec3 ----@return I8Vec3 -function I8Vec3:clamp(_self,min,max) end - ----@param _self I8Vec3 ----@return integer -function I8Vec3:max_element(_self) end - ----@param p1 I8Vec3 ----@param p2 integer ----@return I8Vec3 -function I8Vec3:sub(p1,p2) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:wrapping_sub(_self,rhs) end - ----@param _self I8Vec3 ----@return Vec3A -function I8Vec3:as_vec3a(_self) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return BVec3 -function I8Vec3:cmpeq(_self,rhs) end - ----@param _self I8Vec3 ----@return I8Vec3 -function I8Vec3:neg(_self) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return BVec3 -function I8Vec3:cmpne(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:wrapping_div(_self,rhs) end - ----@param _self I8Vec3 ----@return U64Vec3 -function I8Vec3:as_u64vec3(_self) end - ----@param x integer ----@param y integer ----@param z integer ----@return I8Vec3 -function I8Vec3.new(x,y,z) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:saturating_add(_self,rhs) end - ----@param _self I8Vec3 ----@return I8Vec2 -function I8Vec3:truncate(_self) end - ----@param p1 I8Vec3 ----@param p2 I8Vec3 ----@return I8Vec3 -function I8Vec3:sub(p1,p2) end - ----@param p1 I8Vec3 ----@param p2 I8Vec3 ----@return I8Vec3 -function I8Vec3:add(p1,p2) end - ----@param _self I8Vec3 ----@return nil -function I8Vec3:assert_receiver_is_total_eq(_self) end - ----@param v integer ----@return I8Vec3 -function I8Vec3.splat(v) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return BVec3 -function I8Vec3:cmplt(_self,rhs) end - ----@param _self I8Vec3 ----@return I64Vec3 -function I8Vec3:as_i64vec3(_self) end - ----@param mask BVec3 ----@param if_true I8Vec3 ----@param if_false I8Vec3 ----@return I8Vec3 -function I8Vec3.select(mask,if_true,if_false) end - ----@param p1 I8Vec3 ----@param p2 integer ----@return I8Vec3 -function I8Vec3:rem(p1,p2) end - ----@param a integer[] ----@return I8Vec3 -function I8Vec3.from_array(a) end - ----@param _self I8Vec3 ----@return integer -function I8Vec3:is_negative_bitmask(_self) end - ----@param _self I8Vec3 ----@param other I8Vec3 ----@return boolean -function I8Vec3:eq(_self,other) end - ----@param _self I8Vec3 ----@param y integer ----@return I8Vec3 -function I8Vec3:with_y(_self,y) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:mul(_self,rhs) end - ----@param _self I8Vec3 ----@return integer[] -function I8Vec3:to_array(_self) end - ----@param _self I8Vec3 ----@return I8Vec3 -function I8Vec3:abs(_self) end - ----@param _self I8Vec3 ----@param z integer ----@return I8Vec3 -function I8Vec3:with_z(_self,z) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:sub(_self,rhs) end - ----@param p1 I8Vec3 ----@param p2 I8Vec3 ----@return I8Vec3 -function I8Vec3:mul(p1,p2) end - ----@param _self I8Vec3 ----@param x integer ----@return I8Vec3 -function I8Vec3:with_x(_self,x) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return integer -function I8Vec3:distance_squared(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:div(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:dot_into_vec(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return integer -function I8Vec3:dot(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:wrapping_add(_self,rhs) end - ----@param p1 I8Vec3 ----@param p2 I8Vec3 ----@return I8Vec3 -function I8Vec3:rem(p1,p2) end - ----@param _self I8Vec3 ----@return integer -function I8Vec3:min_element(_self) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:saturating_sub(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs U8Vec3 ----@return I8Vec3 -function I8Vec3:wrapping_sub_unsigned(_self,rhs) end - ----@param _self I8Vec3 ----@return U8Vec3 -function I8Vec3:as_u8vec3(_self) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return BVec3 -function I8Vec3:cmple(_self,rhs) end - ----@param _self I8Vec3 ----@return I8Vec3 -function I8Vec3:clone(_self) end - ----@param _self I8Vec3 ----@return I16Vec3 -function I8Vec3:as_i16vec3(_self) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:saturating_mul(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:saturating_div(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return BVec3 -function I8Vec3:cmpge(_self,rhs) end - ----@param p1 I8Vec3 ----@param p2 integer ----@return I8Vec3 -function I8Vec3:div(p1,p2) end - ----@param _self I8Vec3 ----@return integer -function I8Vec3:length_squared(_self) end - ----@param _self I8Vec3 ----@return IVec3 -function I8Vec3:as_ivec3(_self) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:min(_self,rhs) end - ----@param p1 I8Vec3 ----@param p2 integer ----@return I8Vec3 -function I8Vec3:mul(p1,p2) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:wrapping_mul(_self,rhs) end - ----@param _self I8Vec3 ----@param rhs I8Vec3 ----@return I8Vec3 -function I8Vec3:rem(_self,rhs) end - ----@param _self I8Vec3 ----@return integer -function I8Vec3:element_sum(_self) end - - ----@class I8Vec4 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer -I8Vec4 = {} - ----@param _self I8Vec4 ----@return IVec4 -function I8Vec4:as_ivec4(_self) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return BVec4 -function I8Vec4:cmple(_self,rhs) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:max(_self,rhs) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return integer -function I8Vec4:dot(_self,rhs) end - ----@param _self I8Vec4 ----@param w integer ----@return I8Vec4 -function I8Vec4:with_w(_self,w) end - ----@param _self I8Vec4 ----@return integer -function I8Vec4:length_squared(_self) end - ----@param _self I8Vec4 ----@param rhs U8Vec4 ----@return I8Vec4 -function I8Vec4:wrapping_add_unsigned(_self,rhs) end - ----@param _self I8Vec4 ----@return integer -function I8Vec4:max_element(_self) end - ----@param p1 I8Vec4 ----@param p2 I8Vec4 ----@return I8Vec4 -function I8Vec4:add(p1,p2) end - ----@param _self I8Vec4 ----@return I8Vec3 -function I8Vec4:truncate(_self) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:sub(_self,rhs) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:rem_euclid(_self,rhs) end - ----@param _self I8Vec4 ----@return integer[] -function I8Vec4:to_array(_self) end - ----@param _self I8Vec4 ----@param other I8Vec4 ----@return boolean -function I8Vec4:eq(_self,other) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:add(_self,rhs) end - ----@param _self I8Vec4 ----@return U8Vec4 -function I8Vec4:as_u8vec4(_self) end - ----@param _self I8Vec4 ----@return nil -function I8Vec4:assert_receiver_is_total_eq(_self) end - ----@param _self I8Vec4 ----@return U64Vec4 -function I8Vec4:as_u64vec4(_self) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:mul(_self,rhs) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return BVec4 -function I8Vec4:cmpge(_self,rhs) end - ----@param _self I8Vec4 ----@return I16Vec4 -function I8Vec4:as_i16vec4(_self) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:saturating_mul(_self,rhs) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:min(_self,rhs) end - ----@param _self I8Vec4 ----@return integer -function I8Vec4:min_element(_self) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:saturating_add(_self,rhs) end - ----@param _self I8Vec4 ----@return I64Vec4 -function I8Vec4:as_i64vec4(_self) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return BVec4 -function I8Vec4:cmplt(_self,rhs) end - ----@param _self I8Vec4 ----@return integer -function I8Vec4:is_negative_bitmask(_self) end - ----@param x integer ----@param y integer ----@param z integer ----@param w integer ----@return I8Vec4 -function I8Vec4.new(x,y,z,w) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:saturating_div(_self,rhs) end - ----@param _self I8Vec4 ----@return DVec4 -function I8Vec4:as_dvec4(_self) end - ----@param v integer ----@return I8Vec4 -function I8Vec4.splat(v) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:div_euclid(_self,rhs) end - ----@param _self I8Vec4 ----@return I8Vec4 -function I8Vec4:signum(_self) end - ----@param _self I8Vec4 ----@return integer -function I8Vec4:element_product(_self) end - ----@param _self I8Vec4 ----@param x integer ----@return I8Vec4 -function I8Vec4:with_x(_self,x) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:rem(_self,rhs) end - ----@param _self I8Vec4 ----@return UVec4 -function I8Vec4:as_uvec4(_self) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:wrapping_div(_self,rhs) end - ----@param p1 I8Vec4 ----@param p2 integer ----@return I8Vec4 -function I8Vec4:sub(p1,p2) end - ----@param _self I8Vec4 ----@param min I8Vec4 ----@param max I8Vec4 ----@return I8Vec4 -function I8Vec4:clamp(_self,min,max) end - ----@param p1 I8Vec4 ----@param p2 I8Vec4 ----@return I8Vec4 -function I8Vec4:sub(p1,p2) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:wrapping_mul(_self,rhs) end - ----@param _self I8Vec4 ----@return I8Vec4 -function I8Vec4:clone(_self) end - ----@param _self I8Vec4 ----@param rhs U8Vec4 ----@return I8Vec4 -function I8Vec4:wrapping_sub_unsigned(_self,rhs) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return BVec4 -function I8Vec4:cmpeq(_self,rhs) end - ----@param _self I8Vec4 ----@param z integer ----@return I8Vec4 -function I8Vec4:with_z(_self,z) end - ----@param p1 I8Vec4 ----@param p2 integer ----@return I8Vec4 -function I8Vec4:add(p1,p2) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return BVec4 -function I8Vec4:cmpne(_self,rhs) end - ----@param _self I8Vec4 ----@return I8Vec4 -function I8Vec4:neg(_self) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:wrapping_sub(_self,rhs) end - ----@param _self I8Vec4 ----@param rhs U8Vec4 ----@return I8Vec4 -function I8Vec4:saturating_add_unsigned(_self,rhs) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:dot_into_vec(_self,rhs) end - ----@param p1 I8Vec4 ----@param p2 I8Vec4 ----@return I8Vec4 -function I8Vec4:rem(p1,p2) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return BVec4 -function I8Vec4:cmpgt(_self,rhs) end - ----@param p1 I8Vec4 ----@param p2 I8Vec4 ----@return I8Vec4 -function I8Vec4:div(p1,p2) end - ----@param p1 I8Vec4 ----@param p2 I8Vec4 ----@return I8Vec4 -function I8Vec4:mul(p1,p2) end - ----@param _self I8Vec4 ----@return U16Vec4 -function I8Vec4:as_u16vec4(_self) end - ----@param _self I8Vec4 ----@param rhs U8Vec4 ----@return I8Vec4 -function I8Vec4:saturating_sub_unsigned(_self,rhs) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:div(_self,rhs) end - ----@param _self I8Vec4 ----@return I8Vec4 -function I8Vec4:abs(_self) end - ----@param _self I8Vec4 ----@param y integer ----@return I8Vec4 -function I8Vec4:with_y(_self,y) end - ----@param _self I8Vec4 ----@return integer -function I8Vec4:element_sum(_self) end - ----@param a integer[] ----@return I8Vec4 -function I8Vec4.from_array(a) end - ----@param p1 I8Vec4 ----@param p2 integer ----@return I8Vec4 -function I8Vec4:rem(p1,p2) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:saturating_sub(_self,rhs) end - ----@param mask BVec4 ----@param if_true I8Vec4 ----@param if_false I8Vec4 ----@return I8Vec4 -function I8Vec4.select(mask,if_true,if_false) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return I8Vec4 -function I8Vec4:wrapping_add(_self,rhs) end - ----@param _self I8Vec4 ----@return Vec4 -function I8Vec4:as_vec4(_self) end - ----@param p1 I8Vec4 ----@param p2 integer ----@return I8Vec4 -function I8Vec4:mul(p1,p2) end - ----@param p1 I8Vec4 ----@param p2 integer ----@return I8Vec4 -function I8Vec4:div(p1,p2) end - ----@param _self I8Vec4 ----@param rhs I8Vec4 ----@return integer -function I8Vec4:distance_squared(_self,rhs) end - - ----@class IVec2 : ReflectReference ----@field x ? integer ----@field y ? integer -IVec2 = {} - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:rotate(_self,rhs) end - ----@param _self IVec2 ----@return DVec2 -function IVec2:as_dvec2(_self) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:add(_self,rhs) end - ----@param _self IVec2 ----@return I8Vec2 -function IVec2:as_i8vec2(_self) end - ----@param _self IVec2 ----@param min IVec2 ----@param max IVec2 ----@return IVec2 -function IVec2:clamp(_self,min,max) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return integer -function IVec2:distance_squared(_self,rhs) end - ----@param p1 IVec2 ----@param p2 IVec2 ----@return IVec2 -function IVec2:sub(p1,p2) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:saturating_mul(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:div(_self,rhs) end - ----@param _self IVec2 ----@param rhs UVec2 ----@return IVec2 -function IVec2:wrapping_add_unsigned(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return BVec2 -function IVec2:cmpne(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:mul(_self,rhs) end - ----@param p1 IVec2 ----@param p2 IVec2 ----@return IVec2 -function IVec2:div(p1,p2) end - ----@param p1 IVec2 ----@param p2 integer ----@return IVec2 -function IVec2:rem(p1,p2) end - ----@param _self IVec2 ----@return UVec2 -function IVec2:as_uvec2(_self) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:wrapping_add(_self,rhs) end - ----@param p1 IVec2 ----@param p2 IVec2 ----@return IVec2 -function IVec2:add(p1,p2) end - ----@param p1 IVec2 ----@param p2 integer ----@return IVec2 -function IVec2:div(p1,p2) end - ----@param _self IVec2 ----@return integer -function IVec2:element_sum(_self) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return BVec2 -function IVec2:cmpeq(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:rem(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:div_euclid(_self,rhs) end - ----@param _self IVec2 ----@return integer[] -function IVec2:to_array(_self) end - ----@param _self IVec2 ----@return nil -function IVec2:assert_receiver_is_total_eq(_self) end - ----@param _self IVec2 ----@return integer -function IVec2:max_element(_self) end - ----@param _self IVec2 ----@param other IVec2 ----@return boolean -function IVec2:eq(_self,other) end - ----@param _self IVec2 ----@param rhs UVec2 ----@return IVec2 -function IVec2:wrapping_sub_unsigned(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return BVec2 -function IVec2:cmple(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:saturating_div(_self,rhs) end - ----@param p1 IVec2 ----@param p2 integer ----@return IVec2 -function IVec2:mul(p1,p2) end - ----@param _self IVec2 ----@param rhs UVec2 ----@return IVec2 -function IVec2:saturating_sub_unsigned(_self,rhs) end - ----@param a integer[] ----@return IVec2 -function IVec2.from_array(a) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return BVec2 -function IVec2:cmpgt(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return BVec2 -function IVec2:cmplt(_self,rhs) end - ----@param _self IVec2 ----@param x integer ----@return IVec2 -function IVec2:with_x(_self,x) end - ----@param v integer ----@return IVec2 -function IVec2.splat(v) end - ----@param _self IVec2 ----@return integer -function IVec2:is_negative_bitmask(_self) end - ----@param p1 IVec2 ----@param p2 IVec2 ----@return IVec2 -function IVec2:rem(p1,p2) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:wrapping_mul(_self,rhs) end - ----@param _self IVec2 ----@return IVec2 -function IVec2:perp(_self) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return integer -function IVec2:perp_dot(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:dot_into_vec(_self,rhs) end - ----@param p1 IVec2 ----@param p2 IVec2 ----@return IVec2 -function IVec2:mul(p1,p2) end - ----@param mask BVec2 ----@param if_true IVec2 ----@param if_false IVec2 ----@return IVec2 -function IVec2.select(mask,if_true,if_false) end - ----@param _self IVec2 ----@return U64Vec2 -function IVec2:as_u64vec2(_self) end - ----@param p1 IVec2 ----@param p2 integer ----@return IVec2 -function IVec2:add(p1,p2) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:rem_euclid(_self,rhs) end - ----@param _self IVec2 ----@return integer -function IVec2:length_squared(_self) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return integer -function IVec2:dot(_self,rhs) end - ----@param _self IVec2 ----@return U8Vec2 -function IVec2:as_u8vec2(_self) end - ----@param _self IVec2 ----@return Vec2 -function IVec2:as_vec2(_self) end - ----@param _self IVec2 ----@return U16Vec2 -function IVec2:as_u16vec2(_self) end - ----@param p1 IVec2 ----@param p2 integer ----@return IVec2 -function IVec2:sub(p1,p2) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return BVec2 -function IVec2:cmpge(_self,rhs) end - ----@param _self IVec2 ----@return IVec2 -function IVec2:neg(_self) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:wrapping_sub(_self,rhs) end - ----@param _self IVec2 ----@param z integer ----@return IVec3 -function IVec2:extend(_self,z) end - ----@param _self IVec2 ----@param y integer ----@return IVec2 -function IVec2:with_y(_self,y) end - ----@param _self IVec2 ----@return IVec2 -function IVec2:clone(_self) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:wrapping_div(_self,rhs) end - ----@param _self IVec2 ----@return I64Vec2 -function IVec2:as_i64vec2(_self) end - ----@param x integer ----@param y integer ----@return IVec2 -function IVec2.new(x,y) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:saturating_sub(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:saturating_add(_self,rhs) end - ----@param _self IVec2 ----@return integer -function IVec2:element_product(_self) end - ----@param _self IVec2 ----@return IVec2 -function IVec2:signum(_self) end - ----@param _self IVec2 ----@return I16Vec2 -function IVec2:as_i16vec2(_self) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:min(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:max(_self,rhs) end - ----@param _self IVec2 ----@param rhs IVec2 ----@return IVec2 -function IVec2:sub(_self,rhs) end - ----@param _self IVec2 ----@return integer -function IVec2:min_element(_self) end - ----@param _self IVec2 ----@return IVec2 -function IVec2:abs(_self) end - ----@param _self IVec2 ----@param rhs UVec2 ----@return IVec2 -function IVec2:saturating_add_unsigned(_self,rhs) end - - ----@class IVec3 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer -IVec3 = {} - ----@param _self IVec3 ----@param other IVec3 ----@return boolean -function IVec3:eq(_self,other) end - ----@param a integer[] ----@return IVec3 -function IVec3.from_array(a) end - ----@param p1 IVec3 ----@param p2 integer ----@return IVec3 -function IVec3:rem(p1,p2) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:saturating_sub(_self,rhs) end - ----@param p1 IVec3 ----@param p2 IVec3 ----@return IVec3 -function IVec3:mul(p1,p2) end - ----@param _self IVec3 ----@return U64Vec3 -function IVec3:as_u64vec3(_self) end - ----@param _self IVec3 ----@return integer -function IVec3:min_element(_self) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return BVec3 -function IVec3:cmpne(_self,rhs) end - ----@param _self IVec3 ----@param y integer ----@return IVec3 -function IVec3:with_y(_self,y) end - ----@param p1 IVec3 ----@param p2 integer ----@return IVec3 -function IVec3:div(p1,p2) end - ----@param _self IVec3 ----@return IVec2 -function IVec3:truncate(_self) end - ----@param _self IVec3 ----@return Vec3 -function IVec3:as_vec3(_self) end - ----@param mask BVec3 ----@param if_true IVec3 ----@param if_false IVec3 ----@return IVec3 -function IVec3.select(mask,if_true,if_false) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:mul(_self,rhs) end - ----@param _self IVec3 ----@param min IVec3 ----@param max IVec3 ----@return IVec3 -function IVec3:clamp(_self,min,max) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:wrapping_div(_self,rhs) end - ----@param _self IVec3 ----@param x integer ----@return IVec3 -function IVec3:with_x(_self,x) end - ----@param p1 IVec3 ----@param p2 integer ----@return IVec3 -function IVec3:add(p1,p2) end - ----@param _self IVec3 ----@param rhs UVec3 ----@return IVec3 -function IVec3:wrapping_sub_unsigned(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:wrapping_add(_self,rhs) end - ----@param _self IVec3 ----@return I16Vec3 -function IVec3:as_i16vec3(_self) end - ----@param _self IVec3 ----@return I64Vec3 -function IVec3:as_i64vec3(_self) end - ----@param _self IVec3 ----@return integer -function IVec3:max_element(_self) end - ----@param _self IVec3 ----@param rhs UVec3 ----@return IVec3 -function IVec3:saturating_sub_unsigned(_self,rhs) end - ----@param _self IVec3 ----@return integer -function IVec3:element_sum(_self) end - ----@param p1 IVec3 ----@param p2 integer ----@return IVec3 -function IVec3:sub(p1,p2) end - ----@param _self IVec3 ----@param rhs UVec3 ----@return IVec3 -function IVec3:wrapping_add_unsigned(_self,rhs) end - ----@param _self IVec3 ----@return U8Vec3 -function IVec3:as_u8vec3(_self) end - ----@param _self IVec3 ----@return IVec3 -function IVec3:clone(_self) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:saturating_div(_self,rhs) end - ----@param _self IVec3 ----@param w integer ----@return IVec4 -function IVec3:extend(_self,w) end - ----@param p1 IVec3 ----@param p2 integer ----@return IVec3 -function IVec3:mul(p1,p2) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:div_euclid(_self,rhs) end - ----@param p1 IVec3 ----@param p2 IVec3 ----@return IVec3 -function IVec3:add(p1,p2) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:sub(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:max(_self,rhs) end - ----@param _self IVec3 ----@return integer -function IVec3:length_squared(_self) end - ----@param _self IVec3 ----@return IVec3 -function IVec3:signum(_self) end - ----@param _self IVec3 ----@return U16Vec3 -function IVec3:as_u16vec3(_self) end - ----@param _self IVec3 ----@return UVec3 -function IVec3:as_uvec3(_self) end - ----@param v integer ----@return IVec3 -function IVec3.splat(v) end - ----@param _self IVec3 ----@return IVec3 -function IVec3:abs(_self) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:cross(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return BVec3 -function IVec3:cmpgt(_self,rhs) end - ----@param p1 IVec3 ----@param p2 IVec3 ----@return IVec3 -function IVec3:div(p1,p2) end - ----@param _self IVec3 ----@return Vec3A -function IVec3:as_vec3a(_self) end - ----@param _self IVec3 ----@return nil -function IVec3:assert_receiver_is_total_eq(_self) end - ----@param _self IVec3 ----@param z integer ----@return IVec3 -function IVec3:with_z(_self,z) end - ----@param _self IVec3 ----@return integer -function IVec3:is_negative_bitmask(_self) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return integer -function IVec3:distance_squared(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:wrapping_sub(_self,rhs) end - ----@param x integer ----@param y integer ----@param z integer ----@return IVec3 -function IVec3.new(x,y,z) end - ----@param _self IVec3 ----@param rhs UVec3 ----@return IVec3 -function IVec3:saturating_add_unsigned(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:saturating_add(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:rem_euclid(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:min(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return integer -function IVec3:dot(_self,rhs) end - ----@param _self IVec3 ----@return IVec3 -function IVec3:neg(_self) end - ----@param p1 IVec3 ----@param p2 IVec3 ----@return IVec3 -function IVec3:rem(p1,p2) end - ----@param _self IVec3 ----@return integer[] -function IVec3:to_array(_self) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:dot_into_vec(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:div(_self,rhs) end - ----@param _self IVec3 ----@return I8Vec3 -function IVec3:as_i8vec3(_self) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:rem(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:saturating_mul(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return BVec3 -function IVec3:cmpge(_self,rhs) end - ----@param p1 IVec3 ----@param p2 IVec3 ----@return IVec3 -function IVec3:sub(p1,p2) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return BVec3 -function IVec3:cmple(_self,rhs) end - ----@param _self IVec3 ----@return DVec3 -function IVec3:as_dvec3(_self) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return BVec3 -function IVec3:cmpeq(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:add(_self,rhs) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return BVec3 -function IVec3:cmplt(_self,rhs) end - ----@param _self IVec3 ----@return integer -function IVec3:element_product(_self) end - ----@param _self IVec3 ----@param rhs IVec3 ----@return IVec3 -function IVec3:wrapping_mul(_self,rhs) end - - ----@class IVec4 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer -IVec4 = {} - ----@param _self IVec4 ----@return nil -function IVec4:assert_receiver_is_total_eq(_self) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:saturating_add(_self,rhs) end - ----@param _self IVec4 ----@param min IVec4 ----@param max IVec4 ----@return IVec4 -function IVec4:clamp(_self,min,max) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return BVec4 -function IVec4:cmpeq(_self,rhs) end - ----@param v integer ----@return IVec4 -function IVec4.splat(v) end - ----@param _self IVec4 ----@param rhs UVec4 ----@return IVec4 -function IVec4:saturating_sub_unsigned(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return integer -function IVec4:distance_squared(_self,rhs) end - ----@param _self IVec4 ----@return integer -function IVec4:length_squared(_self) end - ----@param p1 IVec4 ----@param p2 IVec4 ----@return IVec4 -function IVec4:rem(p1,p2) end - ----@param _self IVec4 ----@param z integer ----@return IVec4 -function IVec4:with_z(_self,z) end - ----@param p1 IVec4 ----@param p2 IVec4 ----@return IVec4 -function IVec4:sub(p1,p2) end - ----@param _self IVec4 ----@return IVec4 -function IVec4:neg(_self) end - ----@param _self IVec4 ----@return integer -function IVec4:min_element(_self) end - ----@param _self IVec4 ----@return I16Vec4 -function IVec4:as_i16vec4(_self) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:wrapping_div(_self,rhs) end - ----@param p1 IVec4 ----@param p2 integer ----@return IVec4 -function IVec4:rem(p1,p2) end - ----@param _self IVec4 ----@return integer -function IVec4:max_element(_self) end - ----@param _self IVec4 ----@return UVec4 -function IVec4:as_uvec4(_self) end - ----@param mask BVec4 ----@param if_true IVec4 ----@param if_false IVec4 ----@return IVec4 -function IVec4.select(mask,if_true,if_false) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:dot_into_vec(_self,rhs) end - ----@param _self IVec4 ----@return U8Vec4 -function IVec4:as_u8vec4(_self) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:saturating_div(_self,rhs) end - ----@param _self IVec4 ----@return integer -function IVec4:element_product(_self) end - ----@param _self IVec4 ----@return integer[] -function IVec4:to_array(_self) end - ----@param _self IVec4 ----@param rhs UVec4 ----@return IVec4 -function IVec4:wrapping_add_unsigned(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:rem_euclid(_self,rhs) end - ----@param _self IVec4 ----@return DVec4 -function IVec4:as_dvec4(_self) end - ----@param _self IVec4 ----@return IVec4 -function IVec4:abs(_self) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:add(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:max(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:div(_self,rhs) end - ----@param _self IVec4 ----@return integer -function IVec4:is_negative_bitmask(_self) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:mul(_self,rhs) end - ----@param _self IVec4 ----@return U16Vec4 -function IVec4:as_u16vec4(_self) end - ----@param _self IVec4 ----@return U64Vec4 -function IVec4:as_u64vec4(_self) end - ----@param _self IVec4 ----@param rhs UVec4 ----@return IVec4 -function IVec4:wrapping_sub_unsigned(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:saturating_sub(_self,rhs) end - ----@param p1 IVec4 ----@param p2 integer ----@return IVec4 -function IVec4:div(p1,p2) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:min(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return BVec4 -function IVec4:cmpge(_self,rhs) end - ----@param _self IVec4 ----@return IVec4 -function IVec4:clone(_self) end - ----@param _self IVec4 ----@return Vec4 -function IVec4:as_vec4(_self) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return BVec4 -function IVec4:cmpgt(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:sub(_self,rhs) end - ----@param p1 IVec4 ----@param p2 integer ----@return IVec4 -function IVec4:sub(p1,p2) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:rem(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return BVec4 -function IVec4:cmpne(_self,rhs) end - ----@param _self IVec4 ----@return I8Vec4 -function IVec4:as_i8vec4(_self) end - ----@param _self IVec4 ----@param y integer ----@return IVec4 -function IVec4:with_y(_self,y) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:div_euclid(_self,rhs) end - ----@param a integer[] ----@return IVec4 -function IVec4.from_array(a) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:saturating_mul(_self,rhs) end - ----@param p1 IVec4 ----@param p2 IVec4 ----@return IVec4 -function IVec4:add(p1,p2) end - ----@param _self IVec4 ----@return integer -function IVec4:element_sum(_self) end - ----@param p1 IVec4 ----@param p2 IVec4 ----@return IVec4 -function IVec4:div(p1,p2) end - ----@param _self IVec4 ----@param other IVec4 ----@return boolean -function IVec4:eq(_self,other) end - ----@param _self IVec4 ----@param w integer ----@return IVec4 -function IVec4:with_w(_self,w) end - ----@param _self IVec4 ----@return IVec4 -function IVec4:signum(_self) end - ----@param p1 IVec4 ----@param p2 integer ----@return IVec4 -function IVec4:mul(p1,p2) end - ----@param p1 IVec4 ----@param p2 integer ----@return IVec4 -function IVec4:add(p1,p2) end - ----@param _self IVec4 ----@param x integer ----@return IVec4 -function IVec4:with_x(_self,x) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:wrapping_mul(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return BVec4 -function IVec4:cmplt(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:wrapping_add(_self,rhs) end - ----@param x integer ----@param y integer ----@param z integer ----@param w integer ----@return IVec4 -function IVec4.new(x,y,z,w) end - ----@param _self IVec4 ----@return I64Vec4 -function IVec4:as_i64vec4(_self) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return IVec4 -function IVec4:wrapping_sub(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return BVec4 -function IVec4:cmple(_self,rhs) end - ----@param _self IVec4 ----@param rhs UVec4 ----@return IVec4 -function IVec4:saturating_add_unsigned(_self,rhs) end - ----@param _self IVec4 ----@param rhs IVec4 ----@return integer -function IVec4:dot(_self,rhs) end - ----@param _self IVec4 ----@return IVec3 -function IVec4:truncate(_self) end - ----@param p1 IVec4 ----@param p2 IVec4 ----@return IVec4 -function IVec4:mul(p1,p2) end - - ----@class Mat2 : ReflectReference ----@field x_axis ? Vec2 ----@field y_axis ? Vec2 -Mat2 = {} - ----@param _self Mat2 ----@return Mat2 -function Mat2:clone(_self) end - ----@param _self Mat2 ----@param rhs Mat2 ----@return Mat2 -function Mat2:mul(_self,rhs) end - ----@param _self Mat2 ----@param index integer ----@return Vec2 -function Mat2:row(_self,index) end - ----@param m Mat3A ----@return Mat2 -function Mat2.from_mat3a(m) end - ----@param _self Mat2 ----@param rhs number ----@return Mat2 -function Mat2:div(_self,rhs) end - ----@param _self Mat2 ----@return boolean -function Mat2:is_nan(_self) end - ----@param _self Mat2 ----@param rhs Mat2 ----@param max_abs_diff number ----@return boolean -function Mat2:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self Mat2 ----@param rhs number ----@return Mat2 -function Mat2:mul_scalar(_self,rhs) end - ----@param p1 Mat2 ----@param p2 number ----@return Mat2 -function Mat2:mul(p1,p2) end - ----@param _self Mat2 ----@param rhs Mat2 ----@return Mat2 -function Mat2:add_mat2(_self,rhs) end - ----@param _self Mat2 ----@return number[][] -function Mat2:to_cols_array_2d(_self) end - ----@param x_axis Vec2 ----@param y_axis Vec2 ----@return Mat2 -function Mat2.from_cols(x_axis,y_axis) end - ----@param _self Mat2 ----@param rhs number ----@return Mat2 -function Mat2:div_scalar(_self,rhs) end - ----@param _self Mat2 ----@return number[] -function Mat2:to_cols_array(_self) end - ----@param _self Mat2 ----@return Mat2 -function Mat2:transpose(_self) end - ----@param _self Mat2 ----@return boolean -function Mat2:is_finite(_self) end - ----@param _self Mat2 ----@return Mat2 -function Mat2:inverse(_self) end - ----@param _self Mat2 ----@param rhs Mat2 ----@return boolean -function Mat2:eq(_self,rhs) end - ----@param _self Mat2 ----@return DMat2 -function Mat2:as_dmat2(_self) end - ----@param _self Mat2 ----@return Mat2 -function Mat2:abs(_self) end - ----@param m Mat3 ----@return Mat2 -function Mat2.from_mat3(m) end - ----@param m Mat3A ----@param i integer ----@param j integer ----@return Mat2 -function Mat2.from_mat3a_minor(m,i,j) end - ----@param _self Mat2 ----@param rhs Mat2 ----@return Mat2 -function Mat2:mul_mat2(_self,rhs) end - ----@param angle number ----@return Mat2 -function Mat2.from_angle(angle) end - ----@param diagonal Vec2 ----@return Mat2 -function Mat2.from_diagonal(diagonal) end - ----@param _self Mat2 ----@param index integer ----@return Vec2 -function Mat2:col(_self,index) end - ----@param _self Mat2 ----@param rhs Vec2 ----@return Vec2 -function Mat2:mul_vec2(_self,rhs) end - ----@param _self Mat2 ----@return number -function Mat2:determinant(_self) end - ----@param _self Mat2 ----@param rhs Mat2 ----@return Mat2 -function Mat2:add(_self,rhs) end - ----@param _self Mat2 ----@param rhs Mat2 ----@return Mat2 -function Mat2:sub_mat2(_self,rhs) end - ----@param _self Mat2 ----@param rhs Mat2 ----@return Mat2 -function Mat2:sub(_self,rhs) end - ----@param _self Mat2 ----@return Mat2 -function Mat2:neg(_self) end - ----@param m Mat3 ----@param i integer ----@param j integer ----@return Mat2 -function Mat2.from_mat3_minor(m,i,j) end - ----@param scale Vec2 ----@param angle number ----@return Mat2 -function Mat2.from_scale_angle(scale,angle) end - ----@param p1 Mat2 ----@param p2 Vec2 ----@return Vec2 -function Mat2:mul(p1,p2) end - - ----@class Mat3 : ReflectReference ----@field x_axis ? Vec3 ----@field y_axis ? Vec3 ----@field z_axis ? Vec3 -Mat3 = {} - ----@param translation Vec2 ----@return Mat3 -function Mat3.from_translation(translation) end - ----@param x_axis Vec3 ----@param y_axis Vec3 ----@param z_axis Vec3 ----@return Mat3 -function Mat3.from_cols(x_axis,y_axis,z_axis) end - ----@param m Mat2 ----@return Mat3 -function Mat3.from_mat2(m) end - ----@param _self Mat3 ----@return boolean -function Mat3:is_finite(_self) end - ----@param p1 Mat3 ----@param p2 Mat3 ----@return Mat3 -function Mat3:mul(p1,p2) end - ----@param m Mat4 ----@return Mat3 -function Mat3.from_mat4(m) end - ----@param _self Mat3 ----@param rhs Mat3 ----@return Mat3 -function Mat3:add(_self,rhs) end - ----@param diagonal Vec3 ----@return Mat3 -function Mat3.from_diagonal(diagonal) end - ----@param _self Mat3 ----@return Mat3 -function Mat3:clone(_self) end - ----@param _self Mat3 ----@param index integer ----@return Vec3 -function Mat3:col(_self,index) end - ----@param order EulerRot ----@param a number ----@param b number ----@param c number ----@return Mat3 -function Mat3.from_euler(order,a,b,c) end - ----@param p1 Mat3 ----@param p2 Vec3 ----@return Vec3 -function Mat3:mul(p1,p2) end - ----@param _self Mat3 ----@param rhs Mat3 ----@param max_abs_diff number ----@return boolean -function Mat3:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param scale Vec2 ----@param angle number ----@param translation Vec2 ----@return Mat3 -function Mat3.from_scale_angle_translation(scale,angle,translation) end - ----@param _self Mat3 ----@param rhs Mat3 ----@return Mat3 -function Mat3:sub(_self,rhs) end - ----@param scale Vec2 ----@return Mat3 -function Mat3.from_scale(scale) end - ----@param p1 Mat3 ----@param p2 Vec3A ----@return Vec3A -function Mat3:mul(p1,p2) end - ----@param angle number ----@return Mat3 -function Mat3.from_rotation_y(angle) end - ----@param angle number ----@return Mat3 -function Mat3.from_angle(angle) end - ----@param rotation Quat ----@return Mat3 -function Mat3.from_quat(rotation) end - ----@param _self Mat3 ----@return number[] -function Mat3:to_cols_array(_self) end - ----@param _self Mat3 ----@return Mat3 -function Mat3:abs(_self) end - ----@param _self Mat3 ----@param rhs Mat3 ----@return Mat3 -function Mat3:add_mat3(_self,rhs) end - ----@param _self Mat3 ----@param order EulerRot ----@return [number, number, number] -function Mat3:to_euler(_self,order) end - ----@param _self Mat3 ----@return Mat3 -function Mat3:transpose(_self) end - ----@param _self Mat3 ----@param rhs Vec3A ----@return Vec3A -function Mat3:mul_vec3a(_self,rhs) end - ----@param axis Vec3 ----@param angle number ----@return Mat3 -function Mat3.from_axis_angle(axis,angle) end - ----@param angle number ----@return Mat3 -function Mat3.from_rotation_x(angle) end - ----@param _self Mat3 ----@return boolean -function Mat3:is_nan(_self) end - ----@param _self Mat3 ----@return number -function Mat3:determinant(_self) end - ----@param _self Mat3 ----@return Mat3 -function Mat3:inverse(_self) end - ----@param _self Mat3 ----@param index integer ----@return Vec3 -function Mat3:row(_self,index) end - ----@param _self Mat3 ----@param rhs Vec2 ----@return Vec2 -function Mat3:transform_vector2(_self,rhs) end - ----@param _self Mat3 ----@return DMat3 -function Mat3:as_dmat3(_self) end - ----@param _self Mat3 ----@return number[][] -function Mat3:to_cols_array_2d(_self) end - ----@param _self Mat3 ----@param rhs Vec2 ----@return Vec2 -function Mat3:transform_point2(_self,rhs) end - ----@param _self Mat3 ----@return Mat3 -function Mat3:neg(_self) end - ----@param angle number ----@return Mat3 -function Mat3.from_rotation_z(angle) end - ----@param m Mat4 ----@param i integer ----@param j integer ----@return Mat3 -function Mat3.from_mat4_minor(m,i,j) end - ----@param _self Mat3 ----@param rhs number ----@return Mat3 -function Mat3:div_scalar(_self,rhs) end - ----@param _self Mat3 ----@param rhs number ----@return Mat3 -function Mat3:div(_self,rhs) end - ----@param _self Mat3 ----@param rhs number ----@return Mat3 -function Mat3:mul_scalar(_self,rhs) end - ----@param p1 Mat3 ----@param p2 number ----@return Mat3 -function Mat3:mul(p1,p2) end - ----@param _self Mat3 ----@param rhs Mat3 ----@return Mat3 -function Mat3:mul_mat3(_self,rhs) end - ----@param _self Mat3 ----@param rhs Vec3 ----@return Vec3 -function Mat3:mul_vec3(_self,rhs) end - ----@param _self Mat3 ----@param rhs Affine2 ----@return Mat3 -function Mat3:mul(_self,rhs) end - ----@param _self Mat3 ----@param rhs Mat3 ----@return boolean -function Mat3:eq(_self,rhs) end - ----@param _self Mat3 ----@param rhs Mat3 ----@return Mat3 -function Mat3:sub_mat3(_self,rhs) end - - ----@class Mat3A : ReflectReference ----@field x_axis ? Vec3A ----@field y_axis ? Vec3A ----@field z_axis ? Vec3A -Mat3A = {} - ----@param _self Mat3A ----@return number[] -function Mat3A:to_cols_array(_self) end - ----@param p1 Mat3A ----@param p2 Vec3 ----@return Vec3 -function Mat3A:mul(p1,p2) end - ----@param _self Mat3A ----@param rhs Mat3A ----@return Mat3A -function Mat3A:sub(_self,rhs) end - ----@param _self Mat3A ----@param order EulerRot ----@return [number, number, number] -function Mat3A:to_euler(_self,order) end - ----@param _self Mat3A ----@return Mat3A -function Mat3A:inverse(_self) end - ----@param angle number ----@return Mat3A -function Mat3A.from_angle(angle) end - ----@param _self Mat3A ----@param rhs Mat3A ----@return Mat3A -function Mat3A:add(_self,rhs) end - ----@param rotation Quat ----@return Mat3A -function Mat3A.from_quat(rotation) end - ----@param _self Mat3A ----@return DMat3 -function Mat3A:as_dmat3(_self) end - ----@param _self Mat3A ----@return boolean -function Mat3A:is_finite(_self) end - ----@param _self Mat3A ----@param rhs Affine2 ----@return Mat3A -function Mat3A:mul(_self,rhs) end - ----@param _self Mat3A ----@param rhs Mat3A ----@return boolean -function Mat3A:eq(_self,rhs) end - ----@param axis Vec3 ----@param angle number ----@return Mat3A -function Mat3A.from_axis_angle(axis,angle) end - ----@param _self Mat3A ----@param rhs Mat3A ----@return Mat3A -function Mat3A:add_mat3(_self,rhs) end - ----@param _self Mat3A ----@param rhs number ----@return Mat3A -function Mat3A:div(_self,rhs) end - ----@param p1 Mat3A ----@param p2 number ----@return Mat3A -function Mat3A:mul(p1,p2) end - ----@param _self Mat3A ----@param rhs Mat3A ----@param max_abs_diff number ----@return boolean -function Mat3A:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self Mat3A ----@param rhs Mat3A ----@return Mat3A -function Mat3A:mul_mat3(_self,rhs) end - ----@param _self Mat3A ----@return Mat3A -function Mat3A:neg(_self) end - ----@param scale Vec2 ----@return Mat3A -function Mat3A.from_scale(scale) end - ----@param _self Mat3A ----@return boolean -function Mat3A:is_nan(_self) end - ----@param _self Mat3A ----@return number[][] -function Mat3A:to_cols_array_2d(_self) end - ----@param angle number ----@return Mat3A -function Mat3A.from_rotation_x(angle) end - ----@param _self Mat3A ----@return number -function Mat3A:determinant(_self) end - ----@param angle number ----@return Mat3A -function Mat3A.from_rotation_z(angle) end - ----@param p1 Mat3A ----@param p2 Mat3A ----@return Mat3A -function Mat3A:mul(p1,p2) end - ----@param p1 Mat3A ----@param p2 Vec3A ----@return Vec3A -function Mat3A:mul(p1,p2) end - ----@param m Mat4 ----@return Mat3A -function Mat3A.from_mat4(m) end - ----@param _self Mat3A ----@param index integer ----@return Vec3A -function Mat3A:row(_self,index) end - ----@param _self Mat3A ----@param rhs Vec2 ----@return Vec2 -function Mat3A:transform_point2(_self,rhs) end - ----@param scale Vec2 ----@param angle number ----@param translation Vec2 ----@return Mat3A -function Mat3A.from_scale_angle_translation(scale,angle,translation) end - ----@param _self Mat3A ----@param rhs number ----@return Mat3A -function Mat3A:mul_scalar(_self,rhs) end - ----@param _self Mat3A ----@param rhs Vec3A ----@return Vec3A -function Mat3A:mul_vec3a(_self,rhs) end - ----@param diagonal Vec3 ----@return Mat3A -function Mat3A.from_diagonal(diagonal) end - ----@param _self Mat3A ----@param rhs Vec2 ----@return Vec2 -function Mat3A:transform_vector2(_self,rhs) end - ----@param _self Mat3A ----@return Mat3A -function Mat3A:transpose(_self) end - ----@param _self Mat3A ----@param rhs Vec3 ----@return Vec3 -function Mat3A:mul_vec3(_self,rhs) end - ----@param x_axis Vec3A ----@param y_axis Vec3A ----@param z_axis Vec3A ----@return Mat3A -function Mat3A.from_cols(x_axis,y_axis,z_axis) end - ----@param order EulerRot ----@param a number ----@param b number ----@param c number ----@return Mat3A -function Mat3A.from_euler(order,a,b,c) end - ----@param _self Mat3A ----@param rhs Mat3A ----@return Mat3A -function Mat3A:sub_mat3(_self,rhs) end - ----@param angle number ----@return Mat3A -function Mat3A.from_rotation_y(angle) end - ----@param _self Mat3A ----@return Mat3A -function Mat3A:clone(_self) end - ----@param _self Mat3A ----@param index integer ----@return Vec3A -function Mat3A:col(_self,index) end - ----@param m Mat2 ----@return Mat3A -function Mat3A.from_mat2(m) end - ----@param _self Mat3A ----@param rhs number ----@return Mat3A -function Mat3A:div_scalar(_self,rhs) end - ----@param _self Mat3A ----@return Mat3A -function Mat3A:abs(_self) end - ----@param translation Vec2 ----@return Mat3A -function Mat3A.from_translation(translation) end - ----@param m Mat4 ----@param i integer ----@param j integer ----@return Mat3A -function Mat3A.from_mat4_minor(m,i,j) end - - ----@class Mat4 : ReflectReference ----@field x_axis ? Vec4 ----@field y_axis ? Vec4 ----@field z_axis ? Vec4 ----@field w_axis ? Vec4 -Mat4 = {} - ----@param eye Vec3 ----@param dir Vec3 ----@param up Vec3 ----@return Mat4 -function Mat4.look_to_rh(eye,dir,up) end - ----@param left number ----@param right number ----@param bottom number ----@param top number ----@param near number ----@param far number ----@return Mat4 -function Mat4.orthographic_rh(left,right,bottom,top,near,far) end - ----@param diagonal Vec4 ----@return Mat4 -function Mat4.from_diagonal(diagonal) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@param z_far number ----@return Mat4 -function Mat4.perspective_rh(fov_y_radians,aspect_ratio,z_near,z_far) end - ----@param angle number ----@return Mat4 -function Mat4.from_rotation_x(angle) end - ----@param eye Vec3 ----@param dir Vec3 ----@param up Vec3 ----@return Mat4 -function Mat4.look_to_lh(eye,dir,up) end - ----@param _self Mat4 ----@param order EulerRot ----@return [number, number, number] -function Mat4:to_euler(_self,order) end - ----@param _self Mat4 ----@param rhs Mat4 ----@return Mat4 -function Mat4:add(_self,rhs) end - ----@param _self Mat4 ----@param index integer ----@return Vec4 -function Mat4:col(_self,index) end - ----@param p1 Mat4 ----@param p2 number ----@return Mat4 -function Mat4:mul(p1,p2) end - ----@param _self Mat4 ----@param rhs Vec3A ----@return Vec3A -function Mat4:transform_vector3a(_self,rhs) end - ----@param _self Mat4 ----@param rhs Mat4 ----@return Mat4 -function Mat4:sub_mat4(_self,rhs) end - ----@param rotation Quat ----@param translation Vec3 ----@return Mat4 -function Mat4.from_rotation_translation(rotation,translation) end - ----@param _self Mat4 ----@param rhs Vec3 ----@return Vec3 -function Mat4:project_point3(_self,rhs) end - ----@param _self Mat4 ----@param rhs number ----@return Mat4 -function Mat4:div_scalar(_self,rhs) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@return Mat4 -function Mat4.perspective_infinite_lh(fov_y_radians,aspect_ratio,z_near) end - ----@param left number ----@param right number ----@param bottom number ----@param top number ----@param near number ----@param far number ----@return Mat4 -function Mat4.orthographic_lh(left,right,bottom,top,near,far) end - ----@param left number ----@param right number ----@param bottom number ----@param top number ----@param near number ----@param far number ----@return Mat4 -function Mat4.orthographic_rh_gl(left,right,bottom,top,near,far) end - ----@param _self Mat4 ----@return Mat4 -function Mat4:neg(_self) end - ----@param scale Vec3 ----@return Mat4 -function Mat4.from_scale(scale) end - ----@param _self Mat4 ----@return Mat4 -function Mat4:transpose(_self) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@param z_far number ----@return Mat4 -function Mat4.perspective_rh_gl(fov_y_radians,aspect_ratio,z_near,z_far) end - ----@param _self Mat4 ----@param rhs Vec3A ----@return Vec3A -function Mat4:project_point3a(_self,rhs) end - ----@param translation Vec3 ----@return Mat4 -function Mat4.from_translation(translation) end - ----@param _self Mat4 ----@param rhs Mat4 ----@return boolean -function Mat4:eq(_self,rhs) end - ----@param m Mat3 ----@return Mat4 -function Mat4.from_mat3(m) end - ----@param _self Mat4 ----@param rhs Vec3A ----@return Vec3A -function Mat4:transform_point3a(_self,rhs) end - ----@param m Mat3A ----@return Mat4 -function Mat4.from_mat3a(m) end - ----@param order EulerRot ----@param a number ----@param b number ----@param c number ----@return Mat4 -function Mat4.from_euler(order,a,b,c) end - ----@param _self Mat4 ----@param rhs number ----@return Mat4 -function Mat4:mul_scalar(_self,rhs) end - ----@param _self Mat4 ----@param rhs Mat4 ----@return Mat4 -function Mat4:add_mat4(_self,rhs) end - ----@param p1 Mat4 ----@param p2 Vec4 ----@return Vec4 -function Mat4:mul(p1,p2) end - ----@param _self Mat4 ----@return boolean -function Mat4:is_nan(_self) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@return Mat4 -function Mat4.perspective_infinite_reverse_rh(fov_y_radians,aspect_ratio,z_near) end - ----@param _self Mat4 ----@param rhs Affine3A ----@return Mat4 -function Mat4:mul(_self,rhs) end - ----@param _self Mat4 ----@param rhs Mat4 ----@return Mat4 -function Mat4:sub(_self,rhs) end - ----@param _self Mat4 ----@return Mat4 -function Mat4:clone(_self) end - ----@param _self Mat4 ----@param index integer ----@return Vec4 -function Mat4:row(_self,index) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@param z_far number ----@return Mat4 -function Mat4.perspective_lh(fov_y_radians,aspect_ratio,z_near,z_far) end - ----@param _self Mat4 ----@param rhs Vec4 ----@return Vec4 -function Mat4:mul_vec4(_self,rhs) end - ----@param rotation Quat ----@return Mat4 -function Mat4.from_quat(rotation) end - ----@param _self Mat4 ----@return boolean -function Mat4:is_finite(_self) end - ----@param _self Mat4 ----@return Mat4 -function Mat4:inverse(_self) end - ----@param angle number ----@return Mat4 -function Mat4.from_rotation_z(angle) end - ----@param _self Mat4 ----@return number -function Mat4:determinant(_self) end - ----@param eye Vec3 ----@param center Vec3 ----@param up Vec3 ----@return Mat4 -function Mat4.look_at_rh(eye,center,up) end - ----@param _self Mat4 ----@return number[] -function Mat4:to_cols_array(_self) end - ----@param p1 Mat4 ----@param p2 Mat4 ----@return Mat4 -function Mat4:mul(p1,p2) end - ----@param _self Mat4 ----@param rhs Mat4 ----@param max_abs_diff number ----@return boolean -function Mat4:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self Mat4 ----@param rhs Vec3 ----@return Vec3 -function Mat4:transform_vector3(_self,rhs) end - ----@param x_axis Vec4 ----@param y_axis Vec4 ----@param z_axis Vec4 ----@param w_axis Vec4 ----@return Mat4 -function Mat4.from_cols(x_axis,y_axis,z_axis,w_axis) end - ----@param scale Vec3 ----@param rotation Quat ----@param translation Vec3 ----@return Mat4 -function Mat4.from_scale_rotation_translation(scale,rotation,translation) end - ----@param _self Mat4 ----@return number[][] -function Mat4:to_cols_array_2d(_self) end - ----@param _self Mat4 ----@return DMat4 -function Mat4:as_dmat4(_self) end - ----@param _self Mat4 ----@param rhs Vec3 ----@return Vec3 -function Mat4:transform_point3(_self,rhs) end - ----@param axis Vec3 ----@param angle number ----@return Mat4 -function Mat4.from_axis_angle(axis,angle) end - ----@param eye Vec3 ----@param center Vec3 ----@param up Vec3 ----@return Mat4 -function Mat4.look_at_lh(eye,center,up) end - ----@param _self Mat4 ----@param rhs Mat4 ----@return Mat4 -function Mat4:mul_mat4(_self,rhs) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@return Mat4 -function Mat4.perspective_infinite_rh(fov_y_radians,aspect_ratio,z_near) end - ----@param fov_y_radians number ----@param aspect_ratio number ----@param z_near number ----@return Mat4 -function Mat4.perspective_infinite_reverse_lh(fov_y_radians,aspect_ratio,z_near) end - ----@param _self Mat4 ----@param rhs number ----@return Mat4 -function Mat4:div(_self,rhs) end - ----@param _self Mat4 ----@return Mat4 -function Mat4:abs(_self) end - ----@param angle number ----@return Mat4 -function Mat4.from_rotation_y(angle) end - - ----@class Quat : ReflectReference ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number -Quat = {} - ----@param _self Quat ----@param rhs Quat ----@return Quat -function Quat:sub(_self,rhs) end - ----@param p1 Quat ----@param p2 number ----@return Quat -function Quat:mul(p1,p2) end - ----@param _self Quat ----@return boolean -function Quat:is_normalized(_self) end - ----@param _self Quat ----@return Quat -function Quat:conjugate(_self) end - ----@param euler EulerRot ----@param a number ----@param b number ----@param c number ----@return Quat -function Quat.from_euler(euler,a,b,c) end - ----@param _self Quat ----@return Quat -function Quat:inverse(_self) end - ----@param _self Quat ----@return DQuat -function Quat:as_dquat(_self) end - ----@param angle number ----@return Quat -function Quat.from_rotation_y(angle) end - ----@param _self Quat ----@return number[] -function Quat:to_array(_self) end - ----@param _self Quat ----@return boolean -function Quat:is_nan(_self) end - ----@param _self Quat ----@param rhs Quat ----@return Quat -function Quat:add(_self,rhs) end - ----@param x number ----@param y number ----@param z number ----@param w number ----@return Quat -function Quat.from_xyzw(x,y,z,w) end - ----@param angle number ----@return Quat -function Quat.from_rotation_z(angle) end - ----@param _self Quat ----@param rhs Quat ----@return number -function Quat:angle_between(_self,rhs) end - ----@param _self Quat ----@param _end Quat ----@param s number ----@return Quat -function Quat:slerp(_self,_end,s) end - ----@param from Vec3 ----@param to Vec3 ----@return Quat -function Quat.from_rotation_arc_colinear(from,to) end - ----@param _self Quat ----@return Quat -function Quat:neg(_self) end - ----@param _self Quat ----@param rhs Quat ----@param max_angle number ----@return Quat -function Quat:rotate_towards(_self,rhs,max_angle) end - ----@param angle number ----@return Quat -function Quat.from_rotation_x(angle) end - ----@param p1 Quat ----@param p2 Vec3 ----@return Vec3 -function Quat:mul(p1,p2) end - ----@param _self Quat ----@param rhs Vec3 ----@return Vec3 -function Quat:mul_vec3(_self,rhs) end - ----@param mat Mat3A ----@return Quat -function Quat.from_mat3a(mat) end - ----@param _self Quat ----@return Vec3 -function Quat:to_scaled_axis(_self) end - ----@param p1 Quat ----@param p2 Vec3A ----@return Vec3A -function Quat:mul(p1,p2) end - ----@param from Vec2 ----@param to Vec2 ----@return Quat -function Quat.from_rotation_arc_2d(from,to) end - ----@param _self Quat ----@param rhs Quat ----@return Quat -function Quat:mul(_self,rhs) end - ----@param _self Quat ----@param rhs number ----@return Quat -function Quat:div(_self,rhs) end - ----@param _self Quat ----@param rhs Quat ----@return number -function Quat:dot(_self,rhs) end - ----@param from Vec3 ----@param to Vec3 ----@return Quat -function Quat.from_rotation_arc(from,to) end - ----@param _self Quat ----@param rhs Quat ----@return boolean -function Quat:eq(_self,rhs) end - ----@param _self Quat ----@param order EulerRot ----@return [number, number, number] -function Quat:to_euler(_self,order) end - ----@param _self Quat ----@param _end Quat ----@param s number ----@return Quat -function Quat:lerp(_self,_end,s) end - ----@param _self Quat ----@param rhs Quat ----@param max_abs_diff number ----@return boolean -function Quat:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self Quat ----@return number -function Quat:length_squared(_self) end - ----@param _self Quat ----@param rhs Vec3A ----@return Vec3A -function Quat:mul_vec3a(_self,rhs) end - ----@param a number[] ----@return Quat -function Quat.from_array(a) end - ----@param v Vec4 ----@return Quat -function Quat.from_vec4(v) end - ----@param a Affine3A ----@return Quat -function Quat.from_affine3(a) end - ----@param _self Quat ----@return Quat -function Quat:clone(_self) end - ----@param _self Quat ----@return Vec3 -function Quat:xyz(_self) end - ----@param mat Mat4 ----@return Quat -function Quat.from_mat4(mat) end - ----@param axis Vec3 ----@param angle number ----@return Quat -function Quat.from_axis_angle(axis,angle) end - ----@param _self Quat ----@return Quat -function Quat:normalize(_self) end - ----@param _self Quat ----@return boolean -function Quat:is_finite(_self) end - ----@param _self Quat ----@return boolean -function Quat:is_near_identity(_self) end - ----@param mat Mat3 ----@return Quat -function Quat.from_mat3(mat) end - ----@param _self Quat ----@return number -function Quat:length(_self) end - ----@param v Vec3 ----@return Quat -function Quat.from_scaled_axis(v) end - ----@param _self Quat ----@param rhs Quat ----@return Quat -function Quat:mul_quat(_self,rhs) end - ----@param _self Quat ----@return number -function Quat:length_recip(_self) end - - ----@class U16Vec2 : ReflectReference ----@field x ? integer ----@field y ? integer -U16Vec2 = {} - ----@param _self U16Vec2 ----@return integer[] -function U16Vec2:to_array(_self) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:min(_self,rhs) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return BVec2 -function U16Vec2:cmplt(_self,rhs) end - ----@param p1 U16Vec2 ----@param p2 U16Vec2 ----@return U16Vec2 -function U16Vec2:div(p1,p2) end - ----@param _self U16Vec2 ----@return integer -function U16Vec2:min_element(_self) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:wrapping_mul(_self,rhs) end - ----@param mask BVec2 ----@param if_true U16Vec2 ----@param if_false U16Vec2 ----@return U16Vec2 -function U16Vec2.select(mask,if_true,if_false) end - ----@param p1 U16Vec2 ----@param p2 integer ----@return U16Vec2 -function U16Vec2:rem(p1,p2) end - ----@param p1 U16Vec2 ----@param p2 U16Vec2 ----@return U16Vec2 -function U16Vec2:rem(p1,p2) end - ----@param p1 U16Vec2 ----@param p2 integer ----@return U16Vec2 -function U16Vec2:div(p1,p2) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:max(_self,rhs) end - ----@param _self U16Vec2 ----@return nil -function U16Vec2:assert_receiver_is_total_eq(_self) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:saturating_add(_self,rhs) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:dot_into_vec(_self,rhs) end - ----@param p1 U16Vec2 ----@param p2 integer ----@return U16Vec2 -function U16Vec2:mul(p1,p2) end - ----@param _self U16Vec2 ----@return U64Vec2 -function U16Vec2:as_u64vec2(_self) end - ----@param _self U16Vec2 ----@return DVec2 -function U16Vec2:as_dvec2(_self) end - ----@param _self U16Vec2 ----@return I64Vec2 -function U16Vec2:as_i64vec2(_self) end - ----@param p1 U16Vec2 ----@param p2 U16Vec2 ----@return U16Vec2 -function U16Vec2:sub(p1,p2) end - ----@param _self U16Vec2 ----@return U8Vec2 -function U16Vec2:as_u8vec2(_self) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return BVec2 -function U16Vec2:cmple(_self,rhs) end - ----@param _self U16Vec2 ----@return U16Vec2 -function U16Vec2:clone(_self) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:div(_self,rhs) end - ----@param _self U16Vec2 ----@return UVec2 -function U16Vec2:as_uvec2(_self) end - ----@param _self U16Vec2 ----@param rhs I16Vec2 ----@return U16Vec2 -function U16Vec2:wrapping_add_signed(_self,rhs) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return BVec2 -function U16Vec2:cmpeq(_self,rhs) end - ----@param _self U16Vec2 ----@param x integer ----@return U16Vec2 -function U16Vec2:with_x(_self,x) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return BVec2 -function U16Vec2:cmpne(_self,rhs) end - ----@param v integer ----@return U16Vec2 -function U16Vec2.splat(v) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return BVec2 -function U16Vec2:cmpgt(_self,rhs) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return integer -function U16Vec2:dot(_self,rhs) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:wrapping_sub(_self,rhs) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:wrapping_div(_self,rhs) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:saturating_sub(_self,rhs) end - ----@param p1 U16Vec2 ----@param p2 U16Vec2 ----@return U16Vec2 -function U16Vec2:mul(p1,p2) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:mul(_self,rhs) end - ----@param _self U16Vec2 ----@param other U16Vec2 ----@return boolean -function U16Vec2:eq(_self,other) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return BVec2 -function U16Vec2:cmpge(_self,rhs) end - ----@param _self U16Vec2 ----@return integer -function U16Vec2:element_product(_self) end - ----@param p1 U16Vec2 ----@param p2 U16Vec2 ----@return U16Vec2 -function U16Vec2:add(p1,p2) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:saturating_mul(_self,rhs) end - ----@param _self U16Vec2 ----@return IVec2 -function U16Vec2:as_ivec2(_self) end - ----@param _self U16Vec2 ----@param rhs I16Vec2 ----@return U16Vec2 -function U16Vec2:saturating_add_signed(_self,rhs) end - ----@param _self U16Vec2 ----@return integer -function U16Vec2:length_squared(_self) end - ----@param _self U16Vec2 ----@param z integer ----@return U16Vec3 -function U16Vec2:extend(_self,z) end - ----@param _self U16Vec2 ----@return integer -function U16Vec2:element_sum(_self) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:saturating_div(_self,rhs) end - ----@param _self U16Vec2 ----@return integer -function U16Vec2:max_element(_self) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:rem(_self,rhs) end - ----@param p1 U16Vec2 ----@param p2 integer ----@return U16Vec2 -function U16Vec2:add(p1,p2) end - ----@param _self U16Vec2 ----@param y integer ----@return U16Vec2 -function U16Vec2:with_y(_self,y) end - ----@param x integer ----@param y integer ----@return U16Vec2 -function U16Vec2.new(x,y) end - ----@param p1 U16Vec2 ----@param p2 integer ----@return U16Vec2 -function U16Vec2:sub(p1,p2) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:sub(_self,rhs) end - ----@param _self U16Vec2 ----@return I8Vec2 -function U16Vec2:as_i8vec2(_self) end - ----@param _self U16Vec2 ----@param min U16Vec2 ----@param max U16Vec2 ----@return U16Vec2 -function U16Vec2:clamp(_self,min,max) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:wrapping_add(_self,rhs) end - ----@param _self U16Vec2 ----@return Vec2 -function U16Vec2:as_vec2(_self) end - ----@param _self U16Vec2 ----@return I16Vec2 -function U16Vec2:as_i16vec2(_self) end - ----@param a integer[] ----@return U16Vec2 -function U16Vec2.from_array(a) end - ----@param _self U16Vec2 ----@param rhs U16Vec2 ----@return U16Vec2 -function U16Vec2:add(_self,rhs) end - - ----@class U16Vec3 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer -U16Vec3 = {} - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:add(_self,rhs) end - ----@param p1 U16Vec3 ----@param p2 U16Vec3 ----@return U16Vec3 -function U16Vec3:mul(p1,p2) end - ----@param _self U16Vec3 ----@return nil -function U16Vec3:assert_receiver_is_total_eq(_self) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:saturating_mul(_self,rhs) end - ----@param _self U16Vec3 ----@return integer -function U16Vec3:element_product(_self) end - ----@param _self U16Vec3 ----@return Vec3A -function U16Vec3:as_vec3a(_self) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:wrapping_add(_self,rhs) end - ----@param _self U16Vec3 ----@return integer -function U16Vec3:element_sum(_self) end - ----@param _self U16Vec3 ----@return U8Vec3 -function U16Vec3:as_u8vec3(_self) end - ----@param p1 U16Vec3 ----@param p2 integer ----@return U16Vec3 -function U16Vec3:sub(p1,p2) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return BVec3 -function U16Vec3:cmpge(_self,rhs) end - ----@param _self U16Vec3 ----@return integer -function U16Vec3:min_element(_self) end - ----@param _self U16Vec3 ----@param w integer ----@return U16Vec4 -function U16Vec3:extend(_self,w) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:div(_self,rhs) end - ----@param p1 U16Vec3 ----@param p2 U16Vec3 ----@return U16Vec3 -function U16Vec3:rem(p1,p2) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:max(_self,rhs) end - ----@param _self U16Vec3 ----@return I16Vec3 -function U16Vec3:as_i16vec3(_self) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:dot_into_vec(_self,rhs) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return integer -function U16Vec3:dot(_self,rhs) end - ----@param p1 U16Vec3 ----@param p2 integer ----@return U16Vec3 -function U16Vec3:mul(p1,p2) end - ----@param _self U16Vec3 ----@return integer -function U16Vec3:length_squared(_self) end - ----@param _self U16Vec3 ----@return U64Vec3 -function U16Vec3:as_u64vec3(_self) end - ----@param _self U16Vec3 ----@return U16Vec3 -function U16Vec3:clone(_self) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:saturating_add(_self,rhs) end - ----@param _self U16Vec3 ----@return U16Vec2 -function U16Vec3:truncate(_self) end - ----@param p1 U16Vec3 ----@param p2 U16Vec3 ----@return U16Vec3 -function U16Vec3:sub(p1,p2) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return BVec3 -function U16Vec3:cmpeq(_self,rhs) end - ----@param a integer[] ----@return U16Vec3 -function U16Vec3.from_array(a) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:wrapping_div(_self,rhs) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:saturating_div(_self,rhs) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return BVec3 -function U16Vec3:cmple(_self,rhs) end - ----@param _self U16Vec3 ----@param rhs I16Vec3 ----@return U16Vec3 -function U16Vec3:saturating_add_signed(_self,rhs) end - ----@param p1 U16Vec3 ----@param p2 integer ----@return U16Vec3 -function U16Vec3:rem(p1,p2) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:mul(_self,rhs) end - ----@param _self U16Vec3 ----@return IVec3 -function U16Vec3:as_ivec3(_self) end - ----@param _self U16Vec3 ----@return I8Vec3 -function U16Vec3:as_i8vec3(_self) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:sub(_self,rhs) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return BVec3 -function U16Vec3:cmplt(_self,rhs) end - ----@param _self U16Vec3 ----@param other U16Vec3 ----@return boolean -function U16Vec3:eq(_self,other) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:rem(_self,rhs) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:min(_self,rhs) end - ----@param _self U16Vec3 ----@return DVec3 -function U16Vec3:as_dvec3(_self) end - ----@param p1 U16Vec3 ----@param p2 integer ----@return U16Vec3 -function U16Vec3:div(p1,p2) end - ----@param _self U16Vec3 ----@return integer -function U16Vec3:max_element(_self) end - ----@param x integer ----@param y integer ----@param z integer ----@return U16Vec3 -function U16Vec3.new(x,y,z) end - ----@param _self U16Vec3 ----@param y integer ----@return U16Vec3 -function U16Vec3:with_y(_self,y) end - ----@param p1 U16Vec3 ----@param p2 U16Vec3 ----@return U16Vec3 -function U16Vec3:add(p1,p2) end - ----@param v integer ----@return U16Vec3 -function U16Vec3.splat(v) end - ----@param p1 U16Vec3 ----@param p2 U16Vec3 ----@return U16Vec3 -function U16Vec3:div(p1,p2) end - ----@param mask BVec3 ----@param if_true U16Vec3 ----@param if_false U16Vec3 ----@return U16Vec3 -function U16Vec3.select(mask,if_true,if_false) end - ----@param _self U16Vec3 ----@param x integer ----@return U16Vec3 -function U16Vec3:with_x(_self,x) end - ----@param _self U16Vec3 ----@param min U16Vec3 ----@param max U16Vec3 ----@return U16Vec3 -function U16Vec3:clamp(_self,min,max) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:wrapping_sub(_self,rhs) end - ----@param _self U16Vec3 ----@return integer[] -function U16Vec3:to_array(_self) end - ----@param _self U16Vec3 ----@return Vec3 -function U16Vec3:as_vec3(_self) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return BVec3 -function U16Vec3:cmpgt(_self,rhs) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:cross(_self,rhs) end - ----@param p1 U16Vec3 ----@param p2 integer ----@return U16Vec3 -function U16Vec3:add(p1,p2) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:saturating_sub(_self,rhs) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return BVec3 -function U16Vec3:cmpne(_self,rhs) end - ----@param _self U16Vec3 ----@return UVec3 -function U16Vec3:as_uvec3(_self) end - ----@param _self U16Vec3 ----@param rhs I16Vec3 ----@return U16Vec3 -function U16Vec3:wrapping_add_signed(_self,rhs) end - ----@param _self U16Vec3 ----@return I64Vec3 -function U16Vec3:as_i64vec3(_self) end - ----@param _self U16Vec3 ----@param rhs U16Vec3 ----@return U16Vec3 -function U16Vec3:wrapping_mul(_self,rhs) end - ----@param _self U16Vec3 ----@param z integer ----@return U16Vec3 -function U16Vec3:with_z(_self,z) end - - ----@class U16Vec4 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer -U16Vec4 = {} - ----@param p1 U16Vec4 ----@param p2 U16Vec4 ----@return U16Vec4 -function U16Vec4:sub(p1,p2) end - ----@param _self U16Vec4 ----@param y integer ----@return U16Vec4 -function U16Vec4:with_y(_self,y) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:add(_self,rhs) end - ----@param _self U16Vec4 ----@return integer -function U16Vec4:element_product(_self) end - ----@param _self U16Vec4 ----@param w integer ----@return U16Vec4 -function U16Vec4:with_w(_self,w) end - ----@param _self U16Vec4 ----@return I8Vec4 -function U16Vec4:as_i8vec4(_self) end - ----@param _self U16Vec4 ----@param rhs I16Vec4 ----@return U16Vec4 -function U16Vec4:saturating_add_signed(_self,rhs) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return BVec4 -function U16Vec4:cmpeq(_self,rhs) end - ----@param _self U16Vec4 ----@return integer -function U16Vec4:min_element(_self) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return BVec4 -function U16Vec4:cmplt(_self,rhs) end - ----@param _self U16Vec4 ----@return integer[] -function U16Vec4:to_array(_self) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:saturating_mul(_self,rhs) end - ----@param _self U16Vec4 ----@return U64Vec4 -function U16Vec4:as_u64vec4(_self) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:wrapping_mul(_self,rhs) end - ----@param mask BVec4 ----@param if_true U16Vec4 ----@param if_false U16Vec4 ----@return U16Vec4 -function U16Vec4.select(mask,if_true,if_false) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return BVec4 -function U16Vec4:cmpge(_self,rhs) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:wrapping_sub(_self,rhs) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:saturating_sub(_self,rhs) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:wrapping_div(_self,rhs) end - ----@param _self U16Vec4 ----@return integer -function U16Vec4:length_squared(_self) end - ----@param _self U16Vec4 ----@return U8Vec4 -function U16Vec4:as_u8vec4(_self) end - ----@param p1 U16Vec4 ----@param p2 integer ----@return U16Vec4 -function U16Vec4:div(p1,p2) end - ----@param _self U16Vec4 ----@return I16Vec4 -function U16Vec4:as_i16vec4(_self) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return integer -function U16Vec4:dot(_self,rhs) end - ----@param _self U16Vec4 ----@return U16Vec3 -function U16Vec4:truncate(_self) end - ----@param p1 U16Vec4 ----@param p2 U16Vec4 ----@return U16Vec4 -function U16Vec4:mul(p1,p2) end - ----@param p1 U16Vec4 ----@param p2 integer ----@return U16Vec4 -function U16Vec4:mul(p1,p2) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return BVec4 -function U16Vec4:cmpne(_self,rhs) end - ----@param _self U16Vec4 ----@param min U16Vec4 ----@param max U16Vec4 ----@return U16Vec4 -function U16Vec4:clamp(_self,min,max) end - ----@param v integer ----@return U16Vec4 -function U16Vec4.splat(v) end - ----@param _self U16Vec4 ----@param rhs I16Vec4 ----@return U16Vec4 -function U16Vec4:wrapping_add_signed(_self,rhs) end - ----@param _self U16Vec4 ----@return IVec4 -function U16Vec4:as_ivec4(_self) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:dot_into_vec(_self,rhs) end - ----@param _self U16Vec4 ----@return integer -function U16Vec4:element_sum(_self) end - ----@param _self U16Vec4 ----@param x integer ----@return U16Vec4 -function U16Vec4:with_x(_self,x) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:div(_self,rhs) end - ----@param _self U16Vec4 ----@return UVec4 -function U16Vec4:as_uvec4(_self) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return BVec4 -function U16Vec4:cmple(_self,rhs) end - ----@param _self U16Vec4 ----@return Vec4 -function U16Vec4:as_vec4(_self) end - ----@param _self U16Vec4 ----@return U16Vec4 -function U16Vec4:clone(_self) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:mul(_self,rhs) end - ----@param _self U16Vec4 ----@param z integer ----@return U16Vec4 -function U16Vec4:with_z(_self,z) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:saturating_div(_self,rhs) end - ----@param _self U16Vec4 ----@return I64Vec4 -function U16Vec4:as_i64vec4(_self) end - ----@param p1 U16Vec4 ----@param p2 U16Vec4 ----@return U16Vec4 -function U16Vec4:div(p1,p2) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:rem(_self,rhs) end - ----@param p1 U16Vec4 ----@param p2 U16Vec4 ----@return U16Vec4 -function U16Vec4:add(p1,p2) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return BVec4 -function U16Vec4:cmpgt(_self,rhs) end - ----@param p1 U16Vec4 ----@param p2 integer ----@return U16Vec4 -function U16Vec4:add(p1,p2) end - ----@param x integer ----@param y integer ----@param z integer ----@param w integer ----@return U16Vec4 -function U16Vec4.new(x,y,z,w) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:saturating_add(_self,rhs) end - ----@param p1 U16Vec4 ----@param p2 integer ----@return U16Vec4 -function U16Vec4:sub(p1,p2) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:max(_self,rhs) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:min(_self,rhs) end - ----@param a integer[] ----@return U16Vec4 -function U16Vec4.from_array(a) end - ----@param p1 U16Vec4 ----@param p2 U16Vec4 ----@return U16Vec4 -function U16Vec4:rem(p1,p2) end - ----@param _self U16Vec4 ----@return nil -function U16Vec4:assert_receiver_is_total_eq(_self) end - ----@param _self U16Vec4 ----@return integer -function U16Vec4:max_element(_self) end - ----@param _self U16Vec4 ----@param other U16Vec4 ----@return boolean -function U16Vec4:eq(_self,other) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:sub(_self,rhs) end - ----@param _self U16Vec4 ----@param rhs U16Vec4 ----@return U16Vec4 -function U16Vec4:wrapping_add(_self,rhs) end - ----@param _self U16Vec4 ----@return DVec4 -function U16Vec4:as_dvec4(_self) end - ----@param p1 U16Vec4 ----@param p2 integer ----@return U16Vec4 -function U16Vec4:rem(p1,p2) end - - ----@class U64Vec2 : ReflectReference ----@field x ? integer ----@field y ? integer -U64Vec2 = {} - ----@param _self U64Vec2 ----@return U64Vec2 -function U64Vec2:clone(_self) end - ----@param _self U64Vec2 ----@param z integer ----@return U64Vec3 -function U64Vec2:extend(_self,z) end - ----@param p1 U64Vec2 ----@param p2 U64Vec2 ----@return U64Vec2 -function U64Vec2:add(p1,p2) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:wrapping_sub(_self,rhs) end - ----@param p1 U64Vec2 ----@param p2 integer ----@return U64Vec2 -function U64Vec2:add(p1,p2) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:sub(_self,rhs) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:min(_self,rhs) end - ----@param p1 U64Vec2 ----@param p2 integer ----@return U64Vec2 -function U64Vec2:sub(p1,p2) end - ----@param p1 U64Vec2 ----@param p2 U64Vec2 ----@return U64Vec2 -function U64Vec2:div(p1,p2) end - ----@param p1 U64Vec2 ----@param p2 integer ----@return U64Vec2 -function U64Vec2:div(p1,p2) end - ----@param a integer[] ----@return U64Vec2 -function U64Vec2.from_array(a) end - ----@param _self U64Vec2 ----@return I8Vec2 -function U64Vec2:as_i8vec2(_self) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return BVec2 -function U64Vec2:cmple(_self,rhs) end - ----@param _self U64Vec2 ----@return DVec2 -function U64Vec2:as_dvec2(_self) end - ----@param p1 U64Vec2 ----@param p2 U64Vec2 ----@return U64Vec2 -function U64Vec2:sub(p1,p2) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:rem(_self,rhs) end - ----@param p1 U64Vec2 ----@param p2 U64Vec2 ----@return U64Vec2 -function U64Vec2:mul(p1,p2) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:wrapping_mul(_self,rhs) end - ----@param _self U64Vec2 ----@param rhs I64Vec2 ----@return U64Vec2 -function U64Vec2:wrapping_add_signed(_self,rhs) end - ----@param _self U64Vec2 ----@return nil -function U64Vec2:assert_receiver_is_total_eq(_self) end - ----@param _self U64Vec2 ----@param x integer ----@return U64Vec2 -function U64Vec2:with_x(_self,x) end - ----@param _self U64Vec2 ----@return integer[] -function U64Vec2:to_array(_self) end - ----@param _self U64Vec2 ----@return integer -function U64Vec2:length_squared(_self) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:max(_self,rhs) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:div(_self,rhs) end - ----@param _self U64Vec2 ----@param other U64Vec2 ----@return boolean -function U64Vec2:eq(_self,other) end - ----@param _self U64Vec2 ----@param min U64Vec2 ----@param max U64Vec2 ----@return U64Vec2 -function U64Vec2:clamp(_self,min,max) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return BVec2 -function U64Vec2:cmplt(_self,rhs) end - ----@param _self U64Vec2 ----@return U8Vec2 -function U64Vec2:as_u8vec2(_self) end - ----@param p1 U64Vec2 ----@param p2 integer ----@return U64Vec2 -function U64Vec2:rem(p1,p2) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:wrapping_div(_self,rhs) end - ----@param _self U64Vec2 ----@return Vec2 -function U64Vec2:as_vec2(_self) end - ----@param _self U64Vec2 ----@return integer -function U64Vec2:element_sum(_self) end - ----@param _self U64Vec2 ----@return I64Vec2 -function U64Vec2:as_i64vec2(_self) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return BVec2 -function U64Vec2:cmpeq(_self,rhs) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return BVec2 -function U64Vec2:cmpge(_self,rhs) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:dot_into_vec(_self,rhs) end - ----@param _self U64Vec2 ----@return integer -function U64Vec2:element_product(_self) end - ----@param p1 U64Vec2 ----@param p2 U64Vec2 ----@return U64Vec2 -function U64Vec2:rem(p1,p2) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:add(_self,rhs) end - ----@param _self U64Vec2 ----@return UVec2 -function U64Vec2:as_uvec2(_self) end - ----@param _self U64Vec2 ----@return integer -function U64Vec2:min_element(_self) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:saturating_div(_self,rhs) end - ----@param _self U64Vec2 ----@return I16Vec2 -function U64Vec2:as_i16vec2(_self) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:mul(_self,rhs) end - ----@param p1 U64Vec2 ----@param p2 integer ----@return U64Vec2 -function U64Vec2:mul(p1,p2) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:saturating_add(_self,rhs) end - ----@param _self U64Vec2 ----@param rhs I64Vec2 ----@return U64Vec2 -function U64Vec2:saturating_add_signed(_self,rhs) end - ----@param mask BVec2 ----@param if_true U64Vec2 ----@param if_false U64Vec2 ----@return U64Vec2 -function U64Vec2.select(mask,if_true,if_false) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return BVec2 -function U64Vec2:cmpne(_self,rhs) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:wrapping_add(_self,rhs) end - ----@param _self U64Vec2 ----@return U16Vec2 -function U64Vec2:as_u16vec2(_self) end - ----@param v integer ----@return U64Vec2 -function U64Vec2.splat(v) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return integer -function U64Vec2:dot(_self,rhs) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return BVec2 -function U64Vec2:cmpgt(_self,rhs) end - ----@param x integer ----@param y integer ----@return U64Vec2 -function U64Vec2.new(x,y) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:saturating_sub(_self,rhs) end - ----@param _self U64Vec2 ----@param y integer ----@return U64Vec2 -function U64Vec2:with_y(_self,y) end - ----@param _self U64Vec2 ----@return IVec2 -function U64Vec2:as_ivec2(_self) end - ----@param _self U64Vec2 ----@return integer -function U64Vec2:max_element(_self) end - ----@param _self U64Vec2 ----@param rhs U64Vec2 ----@return U64Vec2 -function U64Vec2:saturating_mul(_self,rhs) end - - ----@class U64Vec3 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer -U64Vec3 = {} - ----@param _self U64Vec3 ----@return IVec3 -function U64Vec3:as_ivec3(_self) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:wrapping_div(_self,rhs) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return BVec3 -function U64Vec3:cmpge(_self,rhs) end - ----@param p1 U64Vec3 ----@param p2 U64Vec3 ----@return U64Vec3 -function U64Vec3:mul(p1,p2) end - ----@param a integer[] ----@return U64Vec3 -function U64Vec3.from_array(a) end - ----@param _self U64Vec3 ----@return I8Vec3 -function U64Vec3:as_i8vec3(_self) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:saturating_div(_self,rhs) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:min(_self,rhs) end - ----@param _self U64Vec3 ----@param w integer ----@return U64Vec4 -function U64Vec3:extend(_self,w) end - ----@param _self U64Vec3 ----@return U64Vec2 -function U64Vec3:truncate(_self) end - ----@param _self U64Vec3 ----@return Vec3 -function U64Vec3:as_vec3(_self) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:wrapping_mul(_self,rhs) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:add(_self,rhs) end - ----@param _self U64Vec3 ----@param z integer ----@return U64Vec3 -function U64Vec3:with_z(_self,z) end - ----@param p1 U64Vec3 ----@param p2 integer ----@return U64Vec3 -function U64Vec3:add(p1,p2) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:rem(_self,rhs) end - ----@param _self U64Vec3 ----@param rhs I64Vec3 ----@return U64Vec3 -function U64Vec3:saturating_add_signed(_self,rhs) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:saturating_add(_self,rhs) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:saturating_sub(_self,rhs) end - ----@param _self U64Vec3 ----@return integer -function U64Vec3:max_element(_self) end - ----@param p1 U64Vec3 ----@param p2 integer ----@return U64Vec3 -function U64Vec3:rem(p1,p2) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:saturating_mul(_self,rhs) end - ----@param p1 U64Vec3 ----@param p2 integer ----@return U64Vec3 -function U64Vec3:div(p1,p2) end - ----@param _self U64Vec3 ----@return I16Vec3 -function U64Vec3:as_i16vec3(_self) end - ----@param v integer ----@return U64Vec3 -function U64Vec3.splat(v) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:wrapping_sub(_self,rhs) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:cross(_self,rhs) end - ----@param _self U64Vec3 ----@return U64Vec3 -function U64Vec3:clone(_self) end - ----@param _self U64Vec3 ----@return DVec3 -function U64Vec3:as_dvec3(_self) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:mul(_self,rhs) end - ----@param p1 U64Vec3 ----@param p2 integer ----@return U64Vec3 -function U64Vec3:sub(p1,p2) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return integer -function U64Vec3:dot(_self,rhs) end - ----@param _self U64Vec3 ----@return U8Vec3 -function U64Vec3:as_u8vec3(_self) end - ----@param _self U64Vec3 ----@return I64Vec3 -function U64Vec3:as_i64vec3(_self) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return BVec3 -function U64Vec3:cmpgt(_self,rhs) end - ----@param _self U64Vec3 ----@return nil -function U64Vec3:assert_receiver_is_total_eq(_self) end - ----@param p1 U64Vec3 ----@param p2 U64Vec3 ----@return U64Vec3 -function U64Vec3:rem(p1,p2) end - ----@param _self U64Vec3 ----@return U16Vec3 -function U64Vec3:as_u16vec3(_self) end - ----@param _self U64Vec3 ----@param min U64Vec3 ----@param max U64Vec3 ----@return U64Vec3 -function U64Vec3:clamp(_self,min,max) end - ----@param _self U64Vec3 ----@param y integer ----@return U64Vec3 -function U64Vec3:with_y(_self,y) end - ----@param _self U64Vec3 ----@param x integer ----@return U64Vec3 -function U64Vec3:with_x(_self,x) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return BVec3 -function U64Vec3:cmpeq(_self,rhs) end - ----@param _self U64Vec3 ----@param other U64Vec3 ----@return boolean -function U64Vec3:eq(_self,other) end - ----@param _self U64Vec3 ----@return integer -function U64Vec3:length_squared(_self) end - ----@param _self U64Vec3 ----@return Vec3A -function U64Vec3:as_vec3a(_self) end - ----@param p1 U64Vec3 ----@param p2 U64Vec3 ----@return U64Vec3 -function U64Vec3:div(p1,p2) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return BVec3 -function U64Vec3:cmplt(_self,rhs) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:div(_self,rhs) end - ----@param _self U64Vec3 ----@return integer -function U64Vec3:element_product(_self) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:dot_into_vec(_self,rhs) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:sub(_self,rhs) end - ----@param p1 U64Vec3 ----@param p2 U64Vec3 ----@return U64Vec3 -function U64Vec3:sub(p1,p2) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return BVec3 -function U64Vec3:cmpne(_self,rhs) end - ----@param p1 U64Vec3 ----@param p2 integer ----@return U64Vec3 -function U64Vec3:mul(p1,p2) end - ----@param x integer ----@param y integer ----@param z integer ----@return U64Vec3 -function U64Vec3.new(x,y,z) end - ----@param _self U64Vec3 ----@return integer -function U64Vec3:min_element(_self) end - ----@param _self U64Vec3 ----@return UVec3 -function U64Vec3:as_uvec3(_self) end - ----@param _self U64Vec3 ----@param rhs I64Vec3 ----@return U64Vec3 -function U64Vec3:wrapping_add_signed(_self,rhs) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:max(_self,rhs) end - ----@param mask BVec3 ----@param if_true U64Vec3 ----@param if_false U64Vec3 ----@return U64Vec3 -function U64Vec3.select(mask,if_true,if_false) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return BVec3 -function U64Vec3:cmple(_self,rhs) end - ----@param p1 U64Vec3 ----@param p2 U64Vec3 ----@return U64Vec3 -function U64Vec3:add(p1,p2) end - ----@param _self U64Vec3 ----@return integer -function U64Vec3:element_sum(_self) end - ----@param _self U64Vec3 ----@param rhs U64Vec3 ----@return U64Vec3 -function U64Vec3:wrapping_add(_self,rhs) end - ----@param _self U64Vec3 ----@return integer[] -function U64Vec3:to_array(_self) end - - ----@class U64Vec4 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer -U64Vec4 = {} - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:rem(_self,rhs) end - ----@param _self U64Vec4 ----@return nil -function U64Vec4:assert_receiver_is_total_eq(_self) end - ----@param _self U64Vec4 ----@return UVec4 -function U64Vec4:as_uvec4(_self) end - ----@param _self U64Vec4 ----@return integer -function U64Vec4:max_element(_self) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:saturating_mul(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:saturating_div(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:wrapping_sub(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return BVec4 -function U64Vec4:cmpeq(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:sub(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return BVec4 -function U64Vec4:cmpge(_self,rhs) end - ----@param _self U64Vec4 ----@return integer -function U64Vec4:length_squared(_self) end - ----@param _self U64Vec4 ----@param z integer ----@return U64Vec4 -function U64Vec4:with_z(_self,z) end - ----@param _self U64Vec4 ----@return integer -function U64Vec4:element_product(_self) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return BVec4 -function U64Vec4:cmpgt(_self,rhs) end - ----@param x integer ----@param y integer ----@param z integer ----@param w integer ----@return U64Vec4 -function U64Vec4.new(x,y,z,w) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:dot_into_vec(_self,rhs) end - ----@param _self U64Vec4 ----@return DVec4 -function U64Vec4:as_dvec4(_self) end - ----@param p1 U64Vec4 ----@param p2 integer ----@return U64Vec4 -function U64Vec4:sub(p1,p2) end - ----@param _self U64Vec4 ----@return I8Vec4 -function U64Vec4:as_i8vec4(_self) end - ----@param _self U64Vec4 ----@param rhs I64Vec4 ----@return U64Vec4 -function U64Vec4:wrapping_add_signed(_self,rhs) end - ----@param p1 U64Vec4 ----@param p2 U64Vec4 ----@return U64Vec4 -function U64Vec4:sub(p1,p2) end - ----@param _self U64Vec4 ----@return U64Vec3 -function U64Vec4:truncate(_self) end - ----@param _self U64Vec4 ----@return I64Vec4 -function U64Vec4:as_i64vec4(_self) end - ----@param mask BVec4 ----@param if_true U64Vec4 ----@param if_false U64Vec4 ----@return U64Vec4 -function U64Vec4.select(mask,if_true,if_false) end - ----@param _self U64Vec4 ----@return integer -function U64Vec4:min_element(_self) end - ----@param p1 U64Vec4 ----@param p2 U64Vec4 ----@return U64Vec4 -function U64Vec4:rem(p1,p2) end - ----@param p1 U64Vec4 ----@param p2 U64Vec4 ----@return U64Vec4 -function U64Vec4:mul(p1,p2) end - ----@param _self U64Vec4 ----@return integer -function U64Vec4:element_sum(_self) end - ----@param _self U64Vec4 ----@param x integer ----@return U64Vec4 -function U64Vec4:with_x(_self,x) end - ----@param p1 U64Vec4 ----@param p2 integer ----@return U64Vec4 -function U64Vec4:div(p1,p2) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return BVec4 -function U64Vec4:cmple(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:saturating_add(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:div(_self,rhs) end - ----@param _self U64Vec4 ----@return Vec4 -function U64Vec4:as_vec4(_self) end - ----@param _self U64Vec4 ----@return IVec4 -function U64Vec4:as_ivec4(_self) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:wrapping_div(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:saturating_sub(_self,rhs) end - ----@param _self U64Vec4 ----@return integer[] -function U64Vec4:to_array(_self) end - ----@param _self U64Vec4 ----@param rhs I64Vec4 ----@return U64Vec4 -function U64Vec4:saturating_add_signed(_self,rhs) end - ----@param _self U64Vec4 ----@param w integer ----@return U64Vec4 -function U64Vec4:with_w(_self,w) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:min(_self,rhs) end - ----@param p1 U64Vec4 ----@param p2 U64Vec4 ----@return U64Vec4 -function U64Vec4:add(p1,p2) end - ----@param _self U64Vec4 ----@param y integer ----@return U64Vec4 -function U64Vec4:with_y(_self,y) end - ----@param a integer[] ----@return U64Vec4 -function U64Vec4.from_array(a) end - ----@param _self U64Vec4 ----@return U64Vec4 -function U64Vec4:clone(_self) end - ----@param v integer ----@return U64Vec4 -function U64Vec4.splat(v) end - ----@param _self U64Vec4 ----@return U8Vec4 -function U64Vec4:as_u8vec4(_self) end - ----@param p1 U64Vec4 ----@param p2 integer ----@return U64Vec4 -function U64Vec4:add(p1,p2) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:add(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return BVec4 -function U64Vec4:cmplt(_self,rhs) end - ----@param _self U64Vec4 ----@param other U64Vec4 ----@return boolean -function U64Vec4:eq(_self,other) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:wrapping_mul(_self,rhs) end - ----@param p1 U64Vec4 ----@param p2 U64Vec4 ----@return U64Vec4 -function U64Vec4:div(p1,p2) end - ----@param _self U64Vec4 ----@return I16Vec4 -function U64Vec4:as_i16vec4(_self) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:wrapping_add(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return integer -function U64Vec4:dot(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:max(_self,rhs) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return BVec4 -function U64Vec4:cmpne(_self,rhs) end - ----@param _self U64Vec4 ----@return U16Vec4 -function U64Vec4:as_u16vec4(_self) end - ----@param _self U64Vec4 ----@param min U64Vec4 ----@param max U64Vec4 ----@return U64Vec4 -function U64Vec4:clamp(_self,min,max) end - ----@param p1 U64Vec4 ----@param p2 integer ----@return U64Vec4 -function U64Vec4:rem(p1,p2) end - ----@param p1 U64Vec4 ----@param p2 integer ----@return U64Vec4 -function U64Vec4:mul(p1,p2) end - ----@param _self U64Vec4 ----@param rhs U64Vec4 ----@return U64Vec4 -function U64Vec4:mul(_self,rhs) end - - ----@class U8Vec2 : ReflectReference ----@field x ? integer ----@field y ? integer -U8Vec2 = {} - ----@param p1 U8Vec2 ----@param p2 integer ----@return U8Vec2 -function U8Vec2:sub(p1,p2) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:rem(_self,rhs) end - ----@param p1 U8Vec2 ----@param p2 integer ----@return U8Vec2 -function U8Vec2:rem(p1,p2) end - ----@param _self U8Vec2 ----@param y integer ----@return U8Vec2 -function U8Vec2:with_y(_self,y) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:min(_self,rhs) end - ----@param v integer ----@return U8Vec2 -function U8Vec2.splat(v) end - ----@param _self U8Vec2 ----@param x integer ----@return U8Vec2 -function U8Vec2:with_x(_self,x) end - ----@param _self U8Vec2 ----@param rhs I8Vec2 ----@return U8Vec2 -function U8Vec2:saturating_add_signed(_self,rhs) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:saturating_sub(_self,rhs) end - ----@param p1 U8Vec2 ----@param p2 U8Vec2 ----@return U8Vec2 -function U8Vec2:add(p1,p2) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return BVec2 -function U8Vec2:cmpne(_self,rhs) end - ----@param p1 U8Vec2 ----@param p2 U8Vec2 ----@return U8Vec2 -function U8Vec2:mul(p1,p2) end - ----@param _self U8Vec2 ----@param min U8Vec2 ----@param max U8Vec2 ----@return U8Vec2 -function U8Vec2:clamp(_self,min,max) end - ----@param _self U8Vec2 ----@param other U8Vec2 ----@return boolean -function U8Vec2:eq(_self,other) end - ----@param _self U8Vec2 ----@return U8Vec2 -function U8Vec2:clone(_self) end - ----@param _self U8Vec2 ----@return UVec2 -function U8Vec2:as_uvec2(_self) end - ----@param _self U8Vec2 ----@return integer -function U8Vec2:min_element(_self) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:saturating_mul(_self,rhs) end - ----@param a integer[] ----@return U8Vec2 -function U8Vec2.from_array(a) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:wrapping_sub(_self,rhs) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return BVec2 -function U8Vec2:cmpgt(_self,rhs) end - ----@param p1 U8Vec2 ----@param p2 integer ----@return U8Vec2 -function U8Vec2:add(p1,p2) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:saturating_add(_self,rhs) end - ----@param p1 U8Vec2 ----@param p2 integer ----@return U8Vec2 -function U8Vec2:mul(p1,p2) end - ----@param _self U8Vec2 ----@return nil -function U8Vec2:assert_receiver_is_total_eq(_self) end - ----@param _self U8Vec2 ----@param z integer ----@return U8Vec3 -function U8Vec2:extend(_self,z) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return BVec2 -function U8Vec2:cmpge(_self,rhs) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:saturating_div(_self,rhs) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:wrapping_mul(_self,rhs) end - ----@param _self U8Vec2 ----@return integer -function U8Vec2:element_product(_self) end - ----@param _self U8Vec2 ----@return I16Vec2 -function U8Vec2:as_i16vec2(_self) end - ----@param p1 U8Vec2 ----@param p2 integer ----@return U8Vec2 -function U8Vec2:div(p1,p2) end - ----@param _self U8Vec2 ----@return IVec2 -function U8Vec2:as_ivec2(_self) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return integer -function U8Vec2:dot(_self,rhs) end - ----@param x integer ----@param y integer ----@return U8Vec2 -function U8Vec2.new(x,y) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:sub(_self,rhs) end - ----@param mask BVec2 ----@param if_true U8Vec2 ----@param if_false U8Vec2 ----@return U8Vec2 -function U8Vec2.select(mask,if_true,if_false) end - ----@param _self U8Vec2 ----@return integer[] -function U8Vec2:to_array(_self) end - ----@param _self U8Vec2 ----@return integer -function U8Vec2:max_element(_self) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:wrapping_add(_self,rhs) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:mul(_self,rhs) end - ----@param _self U8Vec2 ----@return Vec2 -function U8Vec2:as_vec2(_self) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:wrapping_div(_self,rhs) end - ----@param _self U8Vec2 ----@return I64Vec2 -function U8Vec2:as_i64vec2(_self) end - ----@param _self U8Vec2 ----@return DVec2 -function U8Vec2:as_dvec2(_self) end - ----@param _self U8Vec2 ----@return integer -function U8Vec2:length_squared(_self) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:max(_self,rhs) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return BVec2 -function U8Vec2:cmpeq(_self,rhs) end - ----@param _self U8Vec2 ----@return U16Vec2 -function U8Vec2:as_u16vec2(_self) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:div(_self,rhs) end - ----@param p1 U8Vec2 ----@param p2 U8Vec2 ----@return U8Vec2 -function U8Vec2:rem(p1,p2) end - ----@param p1 U8Vec2 ----@param p2 U8Vec2 ----@return U8Vec2 -function U8Vec2:div(p1,p2) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:add(_self,rhs) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return BVec2 -function U8Vec2:cmple(_self,rhs) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return BVec2 -function U8Vec2:cmplt(_self,rhs) end - ----@param _self U8Vec2 ----@return integer -function U8Vec2:element_sum(_self) end - ----@param _self U8Vec2 ----@return I8Vec2 -function U8Vec2:as_i8vec2(_self) end - ----@param _self U8Vec2 ----@param rhs U8Vec2 ----@return U8Vec2 -function U8Vec2:dot_into_vec(_self,rhs) end - ----@param _self U8Vec2 ----@param rhs I8Vec2 ----@return U8Vec2 -function U8Vec2:wrapping_add_signed(_self,rhs) end - ----@param _self U8Vec2 ----@return U64Vec2 -function U8Vec2:as_u64vec2(_self) end - ----@param p1 U8Vec2 ----@param p2 U8Vec2 ----@return U8Vec2 -function U8Vec2:sub(p1,p2) end - - ----@class U8Vec3 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer -U8Vec3 = {} - ----@param p1 U8Vec3 ----@param p2 integer ----@return U8Vec3 -function U8Vec3:mul(p1,p2) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return BVec3 -function U8Vec3:cmpne(_self,rhs) end - ----@param _self U8Vec3 ----@return IVec3 -function U8Vec3:as_ivec3(_self) end - ----@param _self U8Vec3 ----@return integer -function U8Vec3:element_product(_self) end - ----@param _self U8Vec3 ----@return integer[] -function U8Vec3:to_array(_self) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return BVec3 -function U8Vec3:cmpgt(_self,rhs) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:saturating_sub(_self,rhs) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:saturating_mul(_self,rhs) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:mul(_self,rhs) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return integer -function U8Vec3:dot(_self,rhs) end - ----@param _self U8Vec3 ----@return UVec3 -function U8Vec3:as_uvec3(_self) end - ----@param p1 U8Vec3 ----@param p2 integer ----@return U8Vec3 -function U8Vec3:add(p1,p2) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:add(_self,rhs) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:rem(_self,rhs) end - ----@param _self U8Vec3 ----@return integer -function U8Vec3:element_sum(_self) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:saturating_add(_self,rhs) end - ----@param _self U8Vec3 ----@param y integer ----@return U8Vec3 -function U8Vec3:with_y(_self,y) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:cross(_self,rhs) end - ----@param _self U8Vec3 ----@return Vec3A -function U8Vec3:as_vec3a(_self) end - ----@param _self U8Vec3 ----@param x integer ----@return U8Vec3 -function U8Vec3:with_x(_self,x) end - ----@param p1 U8Vec3 ----@param p2 U8Vec3 ----@return U8Vec3 -function U8Vec3:mul(p1,p2) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:div(_self,rhs) end - ----@param _self U8Vec3 ----@return U8Vec3 -function U8Vec3:clone(_self) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:wrapping_add(_self,rhs) end - ----@param _self U8Vec3 ----@return integer -function U8Vec3:min_element(_self) end - ----@param _self U8Vec3 ----@return DVec3 -function U8Vec3:as_dvec3(_self) end - ----@param _self U8Vec3 ----@param z integer ----@return U8Vec3 -function U8Vec3:with_z(_self,z) end - ----@param x integer ----@param y integer ----@param z integer ----@return U8Vec3 -function U8Vec3.new(x,y,z) end - ----@param p1 U8Vec3 ----@param p2 integer ----@return U8Vec3 -function U8Vec3:rem(p1,p2) end - ----@param _self U8Vec3 ----@return I8Vec3 -function U8Vec3:as_i8vec3(_self) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:wrapping_mul(_self,rhs) end - ----@param _self U8Vec3 ----@return Vec3 -function U8Vec3:as_vec3(_self) end - ----@param _self U8Vec3 ----@return U16Vec3 -function U8Vec3:as_u16vec3(_self) end - ----@param _self U8Vec3 ----@return integer -function U8Vec3:max_element(_self) end - ----@param _self U8Vec3 ----@param rhs I8Vec3 ----@return U8Vec3 -function U8Vec3:wrapping_add_signed(_self,rhs) end - ----@param _self U8Vec3 ----@return U8Vec2 -function U8Vec3:truncate(_self) end - ----@param mask BVec3 ----@param if_true U8Vec3 ----@param if_false U8Vec3 ----@return U8Vec3 -function U8Vec3.select(mask,if_true,if_false) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:wrapping_div(_self,rhs) end - ----@param p1 U8Vec3 ----@param p2 integer ----@return U8Vec3 -function U8Vec3:sub(p1,p2) end - ----@param _self U8Vec3 ----@return U64Vec3 -function U8Vec3:as_u64vec3(_self) end - ----@param p1 U8Vec3 ----@param p2 U8Vec3 ----@return U8Vec3 -function U8Vec3:add(p1,p2) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:saturating_div(_self,rhs) end - ----@param _self U8Vec3 ----@param w integer ----@return U8Vec4 -function U8Vec3:extend(_self,w) end - ----@param _self U8Vec3 ----@return integer -function U8Vec3:length_squared(_self) end - ----@param _self U8Vec3 ----@return I64Vec3 -function U8Vec3:as_i64vec3(_self) end - ----@param _self U8Vec3 ----@return nil -function U8Vec3:assert_receiver_is_total_eq(_self) end - ----@param _self U8Vec3 ----@param rhs I8Vec3 ----@return U8Vec3 -function U8Vec3:saturating_add_signed(_self,rhs) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:dot_into_vec(_self,rhs) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return BVec3 -function U8Vec3:cmplt(_self,rhs) end - ----@param _self U8Vec3 ----@return I16Vec3 -function U8Vec3:as_i16vec3(_self) end - ----@param p1 U8Vec3 ----@param p2 U8Vec3 ----@return U8Vec3 -function U8Vec3:rem(p1,p2) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:wrapping_sub(_self,rhs) end - ----@param _self U8Vec3 ----@param other U8Vec3 ----@return boolean -function U8Vec3:eq(_self,other) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return BVec3 -function U8Vec3:cmpge(_self,rhs) end - ----@param p1 U8Vec3 ----@param p2 integer ----@return U8Vec3 -function U8Vec3:div(p1,p2) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:max(_self,rhs) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return BVec3 -function U8Vec3:cmple(_self,rhs) end - ----@param v integer ----@return U8Vec3 -function U8Vec3.splat(v) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return BVec3 -function U8Vec3:cmpeq(_self,rhs) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:min(_self,rhs) end - ----@param a integer[] ----@return U8Vec3 -function U8Vec3.from_array(a) end - ----@param _self U8Vec3 ----@param rhs U8Vec3 ----@return U8Vec3 -function U8Vec3:sub(_self,rhs) end - ----@param _self U8Vec3 ----@param min U8Vec3 ----@param max U8Vec3 ----@return U8Vec3 -function U8Vec3:clamp(_self,min,max) end - ----@param p1 U8Vec3 ----@param p2 U8Vec3 ----@return U8Vec3 -function U8Vec3:div(p1,p2) end - ----@param p1 U8Vec3 ----@param p2 U8Vec3 ----@return U8Vec3 -function U8Vec3:sub(p1,p2) end - - ----@class U8Vec4 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer -U8Vec4 = {} - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:max(_self,rhs) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:saturating_mul(_self,rhs) end - ----@param _self U8Vec4 ----@return U16Vec4 -function U8Vec4:as_u16vec4(_self) end - ----@param _self U8Vec4 ----@param other U8Vec4 ----@return boolean -function U8Vec4:eq(_self,other) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:add(_self,rhs) end - ----@param _self U8Vec4 ----@param rhs I8Vec4 ----@return U8Vec4 -function U8Vec4:wrapping_add_signed(_self,rhs) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:dot_into_vec(_self,rhs) end - ----@param p1 U8Vec4 ----@param p2 U8Vec4 ----@return U8Vec4 -function U8Vec4:sub(p1,p2) end - ----@param _self U8Vec4 ----@return I8Vec4 -function U8Vec4:as_i8vec4(_self) end - ----@param _self U8Vec4 ----@return U8Vec3 -function U8Vec4:truncate(_self) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:div(_self,rhs) end - ----@param x integer ----@param y integer ----@param z integer ----@param w integer ----@return U8Vec4 -function U8Vec4.new(x,y,z,w) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return BVec4 -function U8Vec4:cmpeq(_self,rhs) end - ----@param _self U8Vec4 ----@return integer[] -function U8Vec4:to_array(_self) end - ----@param p1 U8Vec4 ----@param p2 U8Vec4 ----@return U8Vec4 -function U8Vec4:add(p1,p2) end - ----@param _self U8Vec4 ----@param x integer ----@return U8Vec4 -function U8Vec4:with_x(_self,x) end - ----@param _self U8Vec4 ----@param rhs I8Vec4 ----@return U8Vec4 -function U8Vec4:saturating_add_signed(_self,rhs) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return BVec4 -function U8Vec4:cmpgt(_self,rhs) end - ----@param a integer[] ----@return U8Vec4 -function U8Vec4.from_array(a) end - ----@param p1 U8Vec4 ----@param p2 integer ----@return U8Vec4 -function U8Vec4:sub(p1,p2) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:saturating_sub(_self,rhs) end - ----@param _self U8Vec4 ----@return IVec4 -function U8Vec4:as_ivec4(_self) end - ----@param p1 U8Vec4 ----@param p2 integer ----@return U8Vec4 -function U8Vec4:add(p1,p2) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:wrapping_add(_self,rhs) end - ----@param _self U8Vec4 ----@param min U8Vec4 ----@param max U8Vec4 ----@return U8Vec4 -function U8Vec4:clamp(_self,min,max) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:wrapping_mul(_self,rhs) end - ----@param _self U8Vec4 ----@param z integer ----@return U8Vec4 -function U8Vec4:with_z(_self,z) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:wrapping_sub(_self,rhs) end - ----@param _self U8Vec4 ----@return integer -function U8Vec4:element_product(_self) end - ----@param p1 U8Vec4 ----@param p2 integer ----@return U8Vec4 -function U8Vec4:div(p1,p2) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return integer -function U8Vec4:dot(_self,rhs) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:wrapping_div(_self,rhs) end - ----@param _self U8Vec4 ----@return UVec4 -function U8Vec4:as_uvec4(_self) end - ----@param _self U8Vec4 ----@return integer -function U8Vec4:element_sum(_self) end - ----@param v integer ----@return U8Vec4 -function U8Vec4.splat(v) end - ----@param mask BVec4 ----@param if_true U8Vec4 ----@param if_false U8Vec4 ----@return U8Vec4 -function U8Vec4.select(mask,if_true,if_false) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:sub(_self,rhs) end - ----@param _self U8Vec4 ----@return integer -function U8Vec4:max_element(_self) end - ----@param _self U8Vec4 ----@param w integer ----@return U8Vec4 -function U8Vec4:with_w(_self,w) end - ----@param _self U8Vec4 ----@return integer -function U8Vec4:min_element(_self) end - ----@param _self U8Vec4 ----@return nil -function U8Vec4:assert_receiver_is_total_eq(_self) end - ----@param p1 U8Vec4 ----@param p2 integer ----@return U8Vec4 -function U8Vec4:rem(p1,p2) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return BVec4 -function U8Vec4:cmpge(_self,rhs) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:mul(_self,rhs) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return BVec4 -function U8Vec4:cmpne(_self,rhs) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return BVec4 -function U8Vec4:cmplt(_self,rhs) end - ----@param _self U8Vec4 ----@return integer -function U8Vec4:length_squared(_self) end - ----@param _self U8Vec4 ----@return I64Vec4 -function U8Vec4:as_i64vec4(_self) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:saturating_add(_self,rhs) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:rem(_self,rhs) end - ----@param _self U8Vec4 ----@return U8Vec4 -function U8Vec4:clone(_self) end - ----@param p1 U8Vec4 ----@param p2 integer ----@return U8Vec4 -function U8Vec4:mul(p1,p2) end - ----@param p1 U8Vec4 ----@param p2 U8Vec4 ----@return U8Vec4 -function U8Vec4:rem(p1,p2) end - ----@param _self U8Vec4 ----@param y integer ----@return U8Vec4 -function U8Vec4:with_y(_self,y) end - ----@param p1 U8Vec4 ----@param p2 U8Vec4 ----@return U8Vec4 -function U8Vec4:div(p1,p2) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:min(_self,rhs) end - ----@param _self U8Vec4 ----@return DVec4 -function U8Vec4:as_dvec4(_self) end - ----@param p1 U8Vec4 ----@param p2 U8Vec4 ----@return U8Vec4 -function U8Vec4:mul(p1,p2) end - ----@param _self U8Vec4 ----@return Vec4 -function U8Vec4:as_vec4(_self) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return U8Vec4 -function U8Vec4:saturating_div(_self,rhs) end - ----@param _self U8Vec4 ----@return I16Vec4 -function U8Vec4:as_i16vec4(_self) end - ----@param _self U8Vec4 ----@param rhs U8Vec4 ----@return BVec4 -function U8Vec4:cmple(_self,rhs) end - ----@param _self U8Vec4 ----@return U64Vec4 -function U8Vec4:as_u64vec4(_self) end - - ----@class UVec2 : ReflectReference ----@field x ? integer ----@field y ? integer -UVec2 = {} - ----@param p1 UVec2 ----@param p2 UVec2 ----@return UVec2 -function UVec2:add(p1,p2) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return BVec2 -function UVec2:cmpeq(_self,rhs) end - ----@param _self UVec2 ----@param rhs IVec2 ----@return UVec2 -function UVec2:saturating_add_signed(_self,rhs) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:mul(_self,rhs) end - ----@param _self UVec2 ----@return U64Vec2 -function UVec2:as_u64vec2(_self) end - ----@param _self UVec2 ----@return I16Vec2 -function UVec2:as_i16vec2(_self) end - ----@param _self UVec2 ----@return integer -function UVec2:element_sum(_self) end - ----@param _self UVec2 ----@return integer -function UVec2:length_squared(_self) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:wrapping_add(_self,rhs) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return BVec2 -function UVec2:cmplt(_self,rhs) end - ----@param _self UVec2 ----@return U16Vec2 -function UVec2:as_u16vec2(_self) end - ----@param p1 UVec2 ----@param p2 integer ----@return UVec2 -function UVec2:add(p1,p2) end - ----@param p1 UVec2 ----@param p2 integer ----@return UVec2 -function UVec2:div(p1,p2) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:saturating_div(_self,rhs) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return BVec2 -function UVec2:cmple(_self,rhs) end - ----@param v integer ----@return UVec2 -function UVec2.splat(v) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:sub(_self,rhs) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return BVec2 -function UVec2:cmpgt(_self,rhs) end - ----@param _self UVec2 ----@return integer[] -function UVec2:to_array(_self) end - ----@param p1 UVec2 ----@param p2 integer ----@return UVec2 -function UVec2:mul(p1,p2) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:max(_self,rhs) end - ----@param _self UVec2 ----@return integer -function UVec2:max_element(_self) end - ----@param _self UVec2 ----@param rhs IVec2 ----@return UVec2 -function UVec2:wrapping_add_signed(_self,rhs) end - ----@param _self UVec2 ----@param y integer ----@return UVec2 -function UVec2:with_y(_self,y) end - ----@param _self UVec2 ----@return IVec2 -function UVec2:as_ivec2(_self) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return BVec2 -function UVec2:cmpge(_self,rhs) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:wrapping_sub(_self,rhs) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:min(_self,rhs) end - ----@param p1 UVec2 ----@param p2 UVec2 ----@return UVec2 -function UVec2:sub(p1,p2) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:div(_self,rhs) end - ----@param p1 UVec2 ----@param p2 UVec2 ----@return UVec2 -function UVec2:rem(p1,p2) end - ----@param p1 UVec2 ----@param p2 integer ----@return UVec2 -function UVec2:sub(p1,p2) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:add(_self,rhs) end - ----@param p1 UVec2 ----@param p2 UVec2 ----@return UVec2 -function UVec2:div(p1,p2) end - ----@param _self UVec2 ----@return U8Vec2 -function UVec2:as_u8vec2(_self) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:saturating_add(_self,rhs) end - ----@param _self UVec2 ----@return Vec2 -function UVec2:as_vec2(_self) end - ----@param _self UVec2 ----@return DVec2 -function UVec2:as_dvec2(_self) end - ----@param _self UVec2 ----@return integer -function UVec2:element_product(_self) end - ----@param p1 UVec2 ----@param p2 integer ----@return UVec2 -function UVec2:rem(p1,p2) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:wrapping_div(_self,rhs) end - ----@param a integer[] ----@return UVec2 -function UVec2.from_array(a) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return BVec2 -function UVec2:cmpne(_self,rhs) end - ----@param p1 UVec2 ----@param p2 UVec2 ----@return UVec2 -function UVec2:mul(p1,p2) end - ----@param _self UVec2 ----@return I8Vec2 -function UVec2:as_i8vec2(_self) end - ----@param _self UVec2 ----@return integer -function UVec2:min_element(_self) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:dot_into_vec(_self,rhs) end - ----@param _self UVec2 ----@param other UVec2 ----@return boolean -function UVec2:eq(_self,other) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:saturating_mul(_self,rhs) end - ----@param _self UVec2 ----@param z integer ----@return UVec3 -function UVec2:extend(_self,z) end - ----@param _self UVec2 ----@return I64Vec2 -function UVec2:as_i64vec2(_self) end - ----@param mask BVec2 ----@param if_true UVec2 ----@param if_false UVec2 ----@return UVec2 -function UVec2.select(mask,if_true,if_false) end - ----@param _self UVec2 ----@param x integer ----@return UVec2 -function UVec2:with_x(_self,x) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return integer -function UVec2:dot(_self,rhs) end - ----@param x integer ----@param y integer ----@return UVec2 -function UVec2.new(x,y) end - ----@param _self UVec2 ----@return nil -function UVec2:assert_receiver_is_total_eq(_self) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:rem(_self,rhs) end - ----@param _self UVec2 ----@param min UVec2 ----@param max UVec2 ----@return UVec2 -function UVec2:clamp(_self,min,max) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:wrapping_mul(_self,rhs) end - ----@param _self UVec2 ----@return UVec2 -function UVec2:clone(_self) end - ----@param _self UVec2 ----@param rhs UVec2 ----@return UVec2 -function UVec2:saturating_sub(_self,rhs) end - - ----@class UVec3 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer -UVec3 = {} - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:rem(_self,rhs) end - ----@param _self UVec3 ----@param z integer ----@return UVec3 -function UVec3:with_z(_self,z) end - ----@param _self UVec3 ----@return Vec3 -function UVec3:as_vec3(_self) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:saturating_div(_self,rhs) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:saturating_sub(_self,rhs) end - ----@param _self UVec3 ----@return I64Vec3 -function UVec3:as_i64vec3(_self) end - ----@param _self UVec3 ----@return integer -function UVec3:min_element(_self) end - ----@param _self UVec3 ----@return Vec3A -function UVec3:as_vec3a(_self) end - ----@param _self UVec3 ----@param min UVec3 ----@param max UVec3 ----@return UVec3 -function UVec3:clamp(_self,min,max) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:saturating_mul(_self,rhs) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return BVec3 -function UVec3:cmple(_self,rhs) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:dot_into_vec(_self,rhs) end - ----@param _self UVec3 ----@return DVec3 -function UVec3:as_dvec3(_self) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return BVec3 -function UVec3:cmplt(_self,rhs) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:min(_self,rhs) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:sub(_self,rhs) end - ----@param _self UVec3 ----@return IVec3 -function UVec3:as_ivec3(_self) end - ----@param p1 UVec3 ----@param p2 integer ----@return UVec3 -function UVec3:div(p1,p2) end - ----@param _self UVec3 ----@return UVec2 -function UVec3:truncate(_self) end - ----@param _self UVec3 ----@return I8Vec3 -function UVec3:as_i8vec3(_self) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return BVec3 -function UVec3:cmpgt(_self,rhs) end - ----@param p1 UVec3 ----@param p2 UVec3 ----@return UVec3 -function UVec3:rem(p1,p2) end - ----@param _self UVec3 ----@return integer[] -function UVec3:to_array(_self) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return BVec3 -function UVec3:cmpne(_self,rhs) end - ----@param x integer ----@param y integer ----@param z integer ----@return UVec3 -function UVec3.new(x,y,z) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:max(_self,rhs) end - ----@param _self UVec3 ----@return integer -function UVec3:length_squared(_self) end - ----@param _self UVec3 ----@param rhs IVec3 ----@return UVec3 -function UVec3:saturating_add_signed(_self,rhs) end - ----@param p1 UVec3 ----@param p2 UVec3 ----@return UVec3 -function UVec3:sub(p1,p2) end - ----@param a integer[] ----@return UVec3 -function UVec3.from_array(a) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:cross(_self,rhs) end - ----@param _self UVec3 ----@param other UVec3 ----@return boolean -function UVec3:eq(_self,other) end - ----@param p1 UVec3 ----@param p2 UVec3 ----@return UVec3 -function UVec3:div(p1,p2) end - ----@param _self UVec3 ----@param w integer ----@return UVec4 -function UVec3:extend(_self,w) end - ----@param p1 UVec3 ----@param p2 integer ----@return UVec3 -function UVec3:rem(p1,p2) end - ----@param _self UVec3 ----@param x integer ----@return UVec3 -function UVec3:with_x(_self,x) end - ----@param p1 UVec3 ----@param p2 integer ----@return UVec3 -function UVec3:sub(p1,p2) end - ----@param _self UVec3 ----@return integer -function UVec3:max_element(_self) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:wrapping_div(_self,rhs) end - ----@param _self UVec3 ----@return U64Vec3 -function UVec3:as_u64vec3(_self) end - ----@param p1 UVec3 ----@param p2 integer ----@return UVec3 -function UVec3:mul(p1,p2) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:wrapping_add(_self,rhs) end - ----@param v integer ----@return UVec3 -function UVec3.splat(v) end - ----@param _self UVec3 ----@return U16Vec3 -function UVec3:as_u16vec3(_self) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:wrapping_sub(_self,rhs) end - ----@param _self UVec3 ----@param y integer ----@return UVec3 -function UVec3:with_y(_self,y) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return BVec3 -function UVec3:cmpeq(_self,rhs) end - ----@param _self UVec3 ----@return nil -function UVec3:assert_receiver_is_total_eq(_self) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return integer -function UVec3:dot(_self,rhs) end - ----@param mask BVec3 ----@param if_true UVec3 ----@param if_false UVec3 ----@return UVec3 -function UVec3.select(mask,if_true,if_false) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:mul(_self,rhs) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:saturating_add(_self,rhs) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return BVec3 -function UVec3:cmpge(_self,rhs) end - ----@param _self UVec3 ----@return integer -function UVec3:element_sum(_self) end - ----@param p1 UVec3 ----@param p2 UVec3 ----@return UVec3 -function UVec3:mul(p1,p2) end - ----@param _self UVec3 ----@param rhs IVec3 ----@return UVec3 -function UVec3:wrapping_add_signed(_self,rhs) end - ----@param p1 UVec3 ----@param p2 UVec3 ----@return UVec3 -function UVec3:add(p1,p2) end - ----@param _self UVec3 ----@return I16Vec3 -function UVec3:as_i16vec3(_self) end - ----@param _self UVec3 ----@return U8Vec3 -function UVec3:as_u8vec3(_self) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:add(_self,rhs) end - ----@param p1 UVec3 ----@param p2 integer ----@return UVec3 -function UVec3:add(p1,p2) end - ----@param _self UVec3 ----@return UVec3 -function UVec3:clone(_self) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:div(_self,rhs) end - ----@param _self UVec3 ----@param rhs UVec3 ----@return UVec3 -function UVec3:wrapping_mul(_self,rhs) end - ----@param _self UVec3 ----@return integer -function UVec3:element_product(_self) end - - ----@class UVec4 : ReflectReference ----@field x ? integer ----@field y ? integer ----@field z ? integer ----@field w ? integer -UVec4 = {} - ----@param _self UVec4 ----@param rhs UVec4 ----@return BVec4 -function UVec4:cmpne(_self,rhs) end - ----@param _self UVec4 ----@return integer -function UVec4:element_product(_self) end - ----@param p1 UVec4 ----@param p2 integer ----@return UVec4 -function UVec4:rem(p1,p2) end - ----@param x integer ----@param y integer ----@param z integer ----@param w integer ----@return UVec4 -function UVec4.new(x,y,z,w) end - ----@param _self UVec4 ----@return UVec4 -function UVec4:clone(_self) end - ----@param _self UVec4 ----@param rhs IVec4 ----@return UVec4 -function UVec4:wrapping_add_signed(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return BVec4 -function UVec4:cmple(_self,rhs) end - ----@param p1 UVec4 ----@param p2 UVec4 ----@return UVec4 -function UVec4:add(p1,p2) end - ----@param _self UVec4 ----@param x integer ----@return UVec4 -function UVec4:with_x(_self,x) end - ----@param p1 UVec4 ----@param p2 integer ----@return UVec4 -function UVec4:sub(p1,p2) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return BVec4 -function UVec4:cmpge(_self,rhs) end - ----@param _self UVec4 ----@param other UVec4 ----@return boolean -function UVec4:eq(_self,other) end - ----@param _self UVec4 ----@return IVec4 -function UVec4:as_ivec4(_self) end - ----@param _self UVec4 ----@return integer -function UVec4:length_squared(_self) end - ----@param _self UVec4 ----@return U16Vec4 -function UVec4:as_u16vec4(_self) end - ----@param _self UVec4 ----@param min UVec4 ----@param max UVec4 ----@return UVec4 -function UVec4:clamp(_self,min,max) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:min(_self,rhs) end - ----@param _self UVec4 ----@return DVec4 -function UVec4:as_dvec4(_self) end - ----@param _self UVec4 ----@return nil -function UVec4:assert_receiver_is_total_eq(_self) end - ----@param _self UVec4 ----@return U64Vec4 -function UVec4:as_u64vec4(_self) end - ----@param _self UVec4 ----@return I8Vec4 -function UVec4:as_i8vec4(_self) end - ----@param v integer ----@return UVec4 -function UVec4.splat(v) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:saturating_mul(_self,rhs) end - ----@param _self UVec4 ----@param w integer ----@return UVec4 -function UVec4:with_w(_self,w) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:sub(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:wrapping_div(_self,rhs) end - ----@param a integer[] ----@return UVec4 -function UVec4.from_array(a) end - ----@param _self UVec4 ----@return integer -function UVec4:element_sum(_self) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return BVec4 -function UVec4:cmpgt(_self,rhs) end - ----@param _self UVec4 ----@param z integer ----@return UVec4 -function UVec4:with_z(_self,z) end - ----@param _self UVec4 ----@return integer -function UVec4:max_element(_self) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:max(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:rem(_self,rhs) end - ----@param p1 UVec4 ----@param p2 UVec4 ----@return UVec4 -function UVec4:rem(p1,p2) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:mul(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return BVec4 -function UVec4:cmpeq(_self,rhs) end - ----@param _self UVec4 ----@return I64Vec4 -function UVec4:as_i64vec4(_self) end - ----@param p1 UVec4 ----@param p2 UVec4 ----@return UVec4 -function UVec4:div(p1,p2) end - ----@param _self UVec4 ----@return integer[] -function UVec4:to_array(_self) end - ----@param _self UVec4 ----@return I16Vec4 -function UVec4:as_i16vec4(_self) end - ----@param _self UVec4 ----@return integer -function UVec4:min_element(_self) end - ----@param _self UVec4 ----@return Vec4 -function UVec4:as_vec4(_self) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return integer -function UVec4:dot(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:wrapping_mul(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:saturating_sub(_self,rhs) end - ----@param _self UVec4 ----@param rhs IVec4 ----@return UVec4 -function UVec4:saturating_add_signed(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:dot_into_vec(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:div(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:saturating_div(_self,rhs) end - ----@param _self UVec4 ----@param y integer ----@return UVec4 -function UVec4:with_y(_self,y) end - ----@param mask BVec4 ----@param if_true UVec4 ----@param if_false UVec4 ----@return UVec4 -function UVec4.select(mask,if_true,if_false) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return BVec4 -function UVec4:cmplt(_self,rhs) end - ----@param p1 UVec4 ----@param p2 integer ----@return UVec4 -function UVec4:div(p1,p2) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:saturating_add(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:wrapping_sub(_self,rhs) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:add(_self,rhs) end - ----@param p1 UVec4 ----@param p2 integer ----@return UVec4 -function UVec4:add(p1,p2) end - ----@param _self UVec4 ----@return UVec3 -function UVec4:truncate(_self) end - ----@param p1 UVec4 ----@param p2 UVec4 ----@return UVec4 -function UVec4:mul(p1,p2) end - ----@param _self UVec4 ----@return U8Vec4 -function UVec4:as_u8vec4(_self) end - ----@param p1 UVec4 ----@param p2 UVec4 ----@return UVec4 -function UVec4:sub(p1,p2) end - ----@param _self UVec4 ----@param rhs UVec4 ----@return UVec4 -function UVec4:wrapping_add(_self,rhs) end - ----@param p1 UVec4 ----@param p2 integer ----@return UVec4 -function UVec4:mul(p1,p2) end - - ----@class Vec2 : ReflectReference ----@field x ? number ----@field y ? number -Vec2 = {} - ----@param _self Vec2 ----@param rhs Vec2 ----@return BVec2 -function Vec2:cmpeq(_self,rhs) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:fract(_self) end - ----@param _self Vec2 ----@param max number ----@return Vec2 -function Vec2:clamp_length_max(_self,max) end - ----@param a number[] ----@return Vec2 -function Vec2.from_array(a) end - ----@param _self Vec2 ----@return integer -function Vec2:is_negative_bitmask(_self) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:clone(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:project_onto_normalized(_self,rhs) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:div(_self,rhs) end - ----@param _self Vec2 ----@param min Vec2 ----@param max Vec2 ----@return Vec2 -function Vec2:clamp(_self,min,max) end - ----@param _self Vec2 ----@param rhs Vec2 ----@param s number ----@return Vec2 -function Vec2:lerp(_self,rhs,s) end - ----@param _self Vec2 ----@return number -function Vec2:element_sum(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:div_euclid(_self,rhs) end - ----@param angle number ----@return Vec2 -function Vec2.from_angle(angle) end - ----@param _self Vec2 ----@param normal Vec2 ----@param eta number ----@return Vec2 -function Vec2:refract(_self,normal,eta) end - ----@param _self Vec2 ----@param rhs Vec2 ----@param max_angle number ----@return Vec2 -function Vec2:rotate_towards(_self,rhs,max_angle) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:mul(_self,rhs) end - ----@param _self Vec2 ----@return U64Vec2 -function Vec2:as_u64vec2(_self) end - ----@param _self Vec2 ----@return number -function Vec2:max_element(_self) end - ----@param _self Vec2 ----@param other Vec2 ----@return boolean -function Vec2:eq(_self,other) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return BVec2 -function Vec2:cmpgt(_self,rhs) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:trunc(_self) end - ----@param _self Vec2 ----@return BVec2 -function Vec2:is_nan_mask(_self) end - ----@param _self Vec2 ----@param y number ----@return Vec2 -function Vec2:with_y(_self,y) end - ----@param _self Vec2 ----@param x number ----@return Vec2 -function Vec2:with_x(_self,x) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:recip(_self) end - ----@param _self Vec2 ----@return boolean -function Vec2:is_nan(_self) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:signum(_self) end - ----@param p1 Vec2 ----@param p2 number ----@return Vec2 -function Vec2:rem(p1,p2) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:project_onto(_self,rhs) end - ----@param _self Vec2 ----@param z number ----@return Vec3 -function Vec2:extend(_self,z) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:midpoint(_self,rhs) end - ----@param _self Vec2 ----@return U8Vec2 -function Vec2:as_u8vec2(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return number -function Vec2:dot(_self,rhs) end - ----@param _self Vec2 ----@return UVec2 -function Vec2:as_uvec2(_self) end - ----@param _self Vec2 ----@return BVec2 -function Vec2:is_finite_mask(_self) end - ----@param _self Vec2 ----@param n number ----@return Vec2 -function Vec2:powf(_self,n) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:normalize_or_zero(_self) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:round(_self) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:perp(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return BVec2 -function Vec2:cmplt(_self,rhs) end - ----@param _self Vec2 ----@param min number ----@param max number ----@return Vec2 -function Vec2:clamp_length(_self,min,max) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return BVec2 -function Vec2:cmpge(_self,rhs) end - ----@param _self Vec2 ----@return number -function Vec2:to_angle(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:rotate(_self,rhs) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:dot_into_vec(_self,rhs) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:exp(_self) end - ----@param p1 Vec2 ----@param p2 Vec2 ----@return Vec2 -function Vec2:rem(p1,p2) end - ----@param _self Vec2 ----@param normal Vec2 ----@return Vec2 -function Vec2:reflect(_self,normal) end - ----@param p1 Vec2 ----@param p2 number ----@return Vec2 -function Vec2:div(p1,p2) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:add(_self,rhs) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:neg(_self) end - ----@param p1 Vec2 ----@param p2 Vec2 ----@return Vec2 -function Vec2:sub(p1,p2) end - ----@param mask BVec2 ----@param if_true Vec2 ----@param if_false Vec2 ----@return Vec2 -function Vec2.select(mask,if_true,if_false) end - ----@param _self Vec2 ----@return U16Vec2 -function Vec2:as_u16vec2(_self) end - ----@param p1 Vec2 ----@param p2 number ----@return Vec2 -function Vec2:sub(p1,p2) end - ----@param p1 Vec2 ----@param p2 number ----@return Vec2 -function Vec2:mul(p1,p2) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:rem_euclid(_self,rhs) end - ----@param p1 Vec2 ----@param p2 Vec2 ----@return Vec2 -function Vec2:mul(p1,p2) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return number -function Vec2:distance_squared(_self,rhs) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:ceil(_self) end - ----@param _self Vec2 ----@return number -function Vec2:length_squared(_self) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:floor(_self) end - ----@param _self Vec2 ----@return DVec2 -function Vec2:as_dvec2(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:max(_self,rhs) end - ----@param _self Vec2 ----@return boolean -function Vec2:is_finite(_self) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:abs(_self) end - ----@param _self Vec2 ----@param a Vec2 ----@param b Vec2 ----@return Vec2 -function Vec2:mul_add(_self,a,b) end - ----@param _self Vec2 ----@param fallback Vec2 ----@return Vec2 -function Vec2:normalize_or(_self,fallback) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:reject_from(_self,rhs) end - ----@param p1 Vec2 ----@param p2 number ----@return Vec2 -function Vec2:add(p1,p2) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return number -function Vec2:angle_to(_self,rhs) end - ----@param p1 Vec2 ----@param p2 Vec2 ----@return Vec2 -function Vec2:div(p1,p2) end - ----@param _self Vec2 ----@return I16Vec2 -function Vec2:as_i16vec2(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return number -function Vec2:distance(_self,rhs) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:fract_gl(_self) end - ----@param _self Vec2 ----@return number -function Vec2:length_recip(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:sub(_self,rhs) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return number -function Vec2:angle_between(_self,rhs) end - ----@param _self Vec2 ----@return number -function Vec2:min_element(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:copysign(_self,rhs) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:rem(_self,rhs) end - ----@param _self Vec2 ----@return IVec2 -function Vec2:as_ivec2(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return BVec2 -function Vec2:cmpne(_self,rhs) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:reject_from_normalized(_self,rhs) end - ----@param _self Vec2 ----@return boolean -function Vec2:is_normalized(_self) end - ----@param _self Vec2 ----@return number -function Vec2:element_product(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@param d number ----@return Vec2 -function Vec2:move_towards(_self,rhs,d) end - ----@param v number ----@return Vec2 -function Vec2.splat(v) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return Vec2 -function Vec2:min(_self,rhs) end - ----@param p1 Vec2 ----@param p2 Vec2 ----@return Vec2 -function Vec2:add(p1,p2) end - ----@param _self Vec2 ----@return I8Vec2 -function Vec2:as_i8vec2(_self) end - ----@param _self Vec2 ----@return I64Vec2 -function Vec2:as_i64vec2(_self) end - ----@param _self Vec2 ----@return number -function Vec2:length(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return number -function Vec2:perp_dot(_self,rhs) end - ----@param _self Vec2 ----@param min number ----@return Vec2 -function Vec2:clamp_length_min(_self,min) end - ----@param x number ----@param y number ----@return Vec2 -function Vec2.new(x,y) end - ----@param _self Vec2 ----@param rhs Vec2 ----@param max_abs_diff number ----@return boolean -function Vec2:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self Vec2 ----@return Vec2 -function Vec2:normalize(_self) end - ----@param _self Vec2 ----@param rhs Vec2 ----@return BVec2 -function Vec2:cmple(_self,rhs) end - ----@param _self Vec2 ----@return number[] -function Vec2:to_array(_self) end - - ----@class Vec3 : ReflectReference ----@field x ? number ----@field y ? number ----@field z ? number -Vec3 = {} - ----@param _self Vec3 ----@return integer -function Vec3:is_negative_bitmask(_self) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:clone(_self) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:ceil(_self) end - ----@param _self Vec3 ----@return number -function Vec3:max_element(_self) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:min(_self,rhs) end - ----@param _self Vec3 ----@param a Vec3 ----@param b Vec3 ----@return Vec3 -function Vec3:mul_add(_self,a,b) end - ----@param v number ----@return Vec3 -function Vec3.splat(v) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:any_orthogonal_vector(_self) end - ----@param _self Vec3 ----@return I64Vec3 -function Vec3:as_i64vec3(_self) end - ----@param _self Vec3 ----@return boolean -function Vec3:is_finite(_self) end - ----@param _self Vec3 ----@return number[] -function Vec3:to_array(_self) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:copysign(_self,rhs) end - ----@param _self Vec3 ----@param rhs Vec3 ----@param s number ----@return Vec3 -function Vec3:lerp(_self,rhs,s) end - ----@param p1 Vec3 ----@param p2 Vec3 ----@return Vec3 -function Vec3:rem(p1,p2) end - ----@param _self Vec3 ----@param fallback Vec3 ----@return Vec3 -function Vec3:normalize_or(_self,fallback) end - ----@param _self Vec3 ----@return number -function Vec3:length(_self) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:floor(_self) end - ----@param _self Vec3 ----@return number -function Vec3:element_product(_self) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:normalize_or_zero(_self) end - ----@param _self Vec3 ----@param rhs Vec3 ----@param d number ----@return Vec3 -function Vec3:move_towards(_self,rhs,d) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return number -function Vec3:angle_between(_self,rhs) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return BVec3 -function Vec3:cmplt(_self,rhs) end - ----@param p1 Vec3 ----@param p2 number ----@return Vec3 -function Vec3:sub(p1,p2) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:mul(_self,rhs) end - ----@param _self Vec3 ----@param rhs Vec3 ----@param max_abs_diff number ----@return boolean -function Vec3:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return BVec3 -function Vec3:cmpge(_self,rhs) end - ----@param _self Vec3 ----@param min number ----@param max number ----@return Vec3 -function Vec3:clamp_length(_self,min,max) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:div(_self,rhs) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:midpoint(_self,rhs) end - ----@param _self Vec3 ----@return boolean -function Vec3:is_nan(_self) end - ----@param p1 Vec3 ----@param p2 number ----@return Vec3 -function Vec3:mul(p1,p2) end - ----@param _self Vec3 ----@return BVec3 -function Vec3:is_nan_mask(_self) end - ----@param _self Vec3 ----@return U64Vec3 -function Vec3:as_u64vec3(_self) end - ----@param _self Vec3 ----@return BVec3 -function Vec3:is_finite_mask(_self) end - ----@param _self Vec3 ----@param w number ----@return Vec4 -function Vec3:extend(_self,w) end - ----@param _self Vec3 ----@param normal Vec3 ----@param eta number ----@return Vec3 -function Vec3:refract(_self,normal,eta) end - ----@param _self Vec3 ----@param min number ----@return Vec3 -function Vec3:clamp_length_min(_self,min) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:rem_euclid(_self,rhs) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:neg(_self) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:fract(_self) end - ----@param p1 Vec3 ----@param p2 Vec3 ----@return Vec3 -function Vec3:mul(p1,p2) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return number -function Vec3:distance(_self,rhs) end - ----@param _self Vec3 ----@return UVec3 -function Vec3:as_uvec3(_self) end - ----@param _self Vec3 ----@return boolean -function Vec3:is_normalized(_self) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:cross(_self,rhs) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:signum(_self) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:fract_gl(_self) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:recip(_self) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:sub(_self,rhs) end - ----@param p1 Vec3 ----@param p2 Vec3 ----@return Vec3 -function Vec3:sub(p1,p2) end - ----@param p1 Vec3 ----@param p2 number ----@return Vec3 -function Vec3:rem(p1,p2) end - ----@param a number[] ----@return Vec3 -function Vec3.from_array(a) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:round(_self) end - ----@param x number ----@param y number ----@param z number ----@return Vec3 -function Vec3.new(x,y,z) end - ----@param _self Vec3 ----@return U16Vec3 -function Vec3:as_u16vec3(_self) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:add(_self,rhs) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return BVec3 -function Vec3:cmpne(_self,rhs) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return BVec3 -function Vec3:cmpgt(_self,rhs) end - ----@param p1 Vec3 ----@param p2 number ----@return Vec3 -function Vec3:add(p1,p2) end - ----@param _self Vec3 ----@return number -function Vec3:length_squared(_self) end - ----@param _self Vec3 ----@return number -function Vec3:element_sum(_self) end - ----@param _self Vec3 ----@return IVec3 -function Vec3:as_ivec3(_self) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:any_orthonormal_vector(_self) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return BVec3 -function Vec3:cmple(_self,rhs) end - ----@param p1 Vec3 ----@param p2 Vec3 ----@return Vec3 -function Vec3:add(p1,p2) end - ----@param mask BVec3 ----@param if_true Vec3 ----@param if_false Vec3 ----@return Vec3 -function Vec3.select(mask,if_true,if_false) end - ----@param _self Vec3 ----@param max number ----@return Vec3 -function Vec3:clamp_length_max(_self,max) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:trunc(_self) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:max(_self,rhs) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:abs(_self) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:exp(_self) end - ----@param _self Vec3 ----@return number -function Vec3:length_recip(_self) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:rem(_self,rhs) end - ----@param _self Vec3 ----@param normal Vec3 ----@return Vec3 -function Vec3:reflect(_self,normal) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:project_onto_normalized(_self,rhs) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return BVec3 -function Vec3:cmpeq(_self,rhs) end - ----@param _self Vec3 ----@return I16Vec3 -function Vec3:as_i16vec3(_self) end - ----@param p1 Vec3 ----@param p2 number ----@return Vec3 -function Vec3:div(p1,p2) end - ----@param _self Vec3 ----@param other Vec3 ----@return boolean -function Vec3:eq(_self,other) end - ----@param _self Vec3 ----@return I8Vec3 -function Vec3:as_i8vec3(_self) end - ----@param p1 Vec3 ----@param p2 Vec3 ----@return Vec3 -function Vec3:div(p1,p2) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return number -function Vec3:dot(_self,rhs) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:reject_from_normalized(_self,rhs) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:div_euclid(_self,rhs) end - ----@param _self Vec3 ----@param y number ----@return Vec3 -function Vec3:with_y(_self,y) end - ----@param _self Vec3 ----@return U8Vec3 -function Vec3:as_u8vec3(_self) end - ----@param _self Vec3 ----@return number -function Vec3:min_element(_self) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:project_onto(_self,rhs) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:reject_from(_self,rhs) end - ----@param _self Vec3 ----@param z number ----@return Vec3 -function Vec3:with_z(_self,z) end - ----@param _self Vec3 ----@return DVec3 -function Vec3:as_dvec3(_self) end - ----@param _self Vec3 ----@return Vec3 -function Vec3:normalize(_self) end - ----@param _self Vec3 ----@param n number ----@return Vec3 -function Vec3:powf(_self,n) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return number -function Vec3:distance_squared(_self,rhs) end - ----@param _self Vec3 ----@param x number ----@return Vec3 -function Vec3:with_x(_self,x) end - ----@param _self Vec3 ----@param rhs Vec3 ----@return Vec3 -function Vec3:dot_into_vec(_self,rhs) end - ----@param _self Vec3 ----@param min Vec3 ----@param max Vec3 ----@return Vec3 -function Vec3:clamp(_self,min,max) end - ----@param _self Vec3 ----@return Vec2 -function Vec3:truncate(_self) end - - ----@class Vec3A : ReflectReference ----@field x ? number ----@field y ? number ----@field z ? number -Vec3A = {} - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:copysign(_self,rhs) end - ----@param _self Vec3A ----@return boolean -function Vec3A:is_finite(_self) end - ----@param p1 Vec3A ----@param p2 number ----@return Vec3A -function Vec3A:rem(p1,p2) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return number -function Vec3A:distance(_self,rhs) end - ----@param _self Vec3A ----@param min number ----@return Vec3A -function Vec3A:clamp_length_min(_self,min) end - ----@param _self Vec3A ----@return boolean -function Vec3A:is_normalized(_self) end - ----@param _self Vec3A ----@return I64Vec3 -function Vec3A:as_i64vec3(_self) end - ----@param _self Vec3A ----@return number[] -function Vec3A:to_array(_self) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:reject_from_normalized(_self,rhs) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:round(_self) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:max(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:midpoint(_self,rhs) end - ----@param _self Vec3A ----@return BVec3A -function Vec3A:is_finite_mask(_self) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:project_onto_normalized(_self,rhs) end - ----@param _self Vec3A ----@param y number ----@return Vec3A -function Vec3A:with_y(_self,y) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:div_euclid(_self,rhs) end - ----@param _self Vec3A ----@param fallback Vec3A ----@return Vec3A -function Vec3A:normalize_or(_self,fallback) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:fract(_self) end - ----@param _self Vec3A ----@return U16Vec3 -function Vec3A:as_u16vec3(_self) end - ----@param p1 Vec3A ----@param p2 Vec3A ----@return Vec3A -function Vec3A:mul(p1,p2) end - ----@param a number[] ----@return Vec3A -function Vec3A.from_array(a) end - ----@param _self Vec3A ----@param rhs Vec3A ----@param d number ----@return Vec3A -function Vec3A:move_towards(_self,rhs,d) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:cross(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return BVec3A -function Vec3A:cmpne(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return BVec3A -function Vec3A:cmpeq(_self,rhs) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:neg(_self) end - ----@param _self Vec3A ----@param normal Vec3A ----@param eta number ----@return Vec3A -function Vec3A:refract(_self,normal,eta) end - ----@param _self Vec3A ----@return DVec3 -function Vec3A:as_dvec3(_self) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:signum(_self) end - ----@param _self Vec3A ----@param n number ----@return Vec3A -function Vec3A:powf(_self,n) end - ----@param _self Vec3A ----@return number -function Vec3A:min_element(_self) end - ----@param p1 Vec3A ----@param p2 Vec3A ----@return Vec3A -function Vec3A:div(p1,p2) end - ----@param _self Vec3A ----@return boolean -function Vec3A:is_nan(_self) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:rem_euclid(_self,rhs) end - ----@param _self Vec3A ----@return number -function Vec3A:element_product(_self) end - ----@param x number ----@param y number ----@param z number ----@return Vec3A -function Vec3A.new(x,y,z) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:ceil(_self) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:abs(_self) end - ----@param v Vec4 ----@return Vec3A -function Vec3A.from_vec4(v) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:trunc(_self) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:project_onto(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:reject_from(_self,rhs) end - ----@param p1 Vec3A ----@param p2 Vec3A ----@return Vec3A -function Vec3A:sub(p1,p2) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return BVec3A -function Vec3A:cmpgt(_self,rhs) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:normalize(_self) end - ----@param _self Vec3A ----@return number -function Vec3A:length(_self) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return boolean -function Vec3A:eq(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@param max_abs_diff number ----@return boolean -function Vec3A:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self Vec3A ----@return number -function Vec3A:max_element(_self) end - ----@param _self Vec3A ----@return I8Vec3 -function Vec3A:as_i8vec3(_self) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:sub(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return number -function Vec3A:angle_between(_self,rhs) end - ----@param _self Vec3A ----@return I16Vec3 -function Vec3A:as_i16vec3(_self) end - ----@param _self Vec3A ----@param a Vec3A ----@param b Vec3A ----@return Vec3A -function Vec3A:mul_add(_self,a,b) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:min(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:rem(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:dot_into_vec(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return number -function Vec3A:dot(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return BVec3A -function Vec3A:cmple(_self,rhs) end - ----@param _self Vec3A ----@return IVec3 -function Vec3A:as_ivec3(_self) end - ----@param p1 Vec3A ----@param p2 number ----@return Vec3A -function Vec3A:add(p1,p2) end - ----@param _self Vec3A ----@return number -function Vec3A:length_squared(_self) end - ----@param p1 Vec3A ----@param p2 Vec3A ----@return Vec3A -function Vec3A:add(p1,p2) end - ----@param _self Vec3A ----@return number -function Vec3A:element_sum(_self) end - ----@param _self Vec3A ----@param max number ----@return Vec3A -function Vec3A:clamp_length_max(_self,max) end - ----@param _self Vec3A ----@return BVec3A -function Vec3A:is_nan_mask(_self) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:div(_self,rhs) end - ----@param _self Vec3A ----@return integer -function Vec3A:is_negative_bitmask(_self) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:mul(_self,rhs) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:recip(_self) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:any_orthogonal_vector(_self) end - ----@param _self Vec3A ----@param min Vec3A ----@param max Vec3A ----@return Vec3A -function Vec3A:clamp(_self,min,max) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return number -function Vec3A:distance_squared(_self,rhs) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return BVec3A -function Vec3A:cmpge(_self,rhs) end - ----@param _self Vec3A ----@param w number ----@return Vec4 -function Vec3A:extend(_self,w) end - ----@param _self Vec3A ----@param x number ----@return Vec3A -function Vec3A:with_x(_self,x) end - ----@param v number ----@return Vec3A -function Vec3A.splat(v) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:any_orthonormal_vector(_self) end - ----@param _self Vec3A ----@return UVec3 -function Vec3A:as_uvec3(_self) end - ----@param p1 Vec3A ----@param p2 number ----@return Vec3A -function Vec3A:mul(p1,p2) end - ----@param _self Vec3A ----@param rhs Vec3A ----@param s number ----@return Vec3A -function Vec3A:lerp(_self,rhs,s) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:clone(_self) end - ----@param _self Vec3A ----@return number -function Vec3A:length_recip(_self) end - ----@param p1 Vec3A ----@param p2 number ----@return Vec3A -function Vec3A:sub(p1,p2) end - ----@param _self Vec3A ----@return U64Vec3 -function Vec3A:as_u64vec3(_self) end - ----@param _self Vec3A ----@return Vec2 -function Vec3A:truncate(_self) end - ----@param p1 Vec3A ----@param p2 number ----@return Vec3A -function Vec3A:div(p1,p2) end - ----@param _self Vec3A ----@param normal Vec3A ----@return Vec3A -function Vec3A:reflect(_self,normal) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return BVec3A -function Vec3A:cmplt(_self,rhs) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:floor(_self) end - ----@param _self Vec3A ----@param z number ----@return Vec3A -function Vec3A:with_z(_self,z) end - ----@param _self Vec3A ----@param min number ----@param max number ----@return Vec3A -function Vec3A:clamp_length(_self,min,max) end - ----@param _self Vec3A ----@return U8Vec3 -function Vec3A:as_u8vec3(_self) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:fract_gl(_self) end - ----@param _self Vec3A ----@param rhs Vec3A ----@return Vec3A -function Vec3A:add(_self,rhs) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:normalize_or_zero(_self) end - ----@param _self Vec3A ----@return Vec3A -function Vec3A:exp(_self) end - ----@param mask BVec3A ----@param if_true Vec3A ----@param if_false Vec3A ----@return Vec3A -function Vec3A.select(mask,if_true,if_false) end - ----@param p1 Vec3A ----@param p2 Vec3A ----@return Vec3A -function Vec3A:rem(p1,p2) end - - ----@class Vec4 : ReflectReference ----@field x ? number ----@field y ? number ----@field z ? number ----@field w ? number -Vec4 = {} - ----@param a number[] ----@return Vec4 -function Vec4.from_array(a) end - ----@param _self Vec4 ----@param a Vec4 ----@param b Vec4 ----@return Vec4 -function Vec4:mul_add(_self,a,b) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:abs(_self) end - ----@param _self Vec4 ----@return boolean -function Vec4:is_normalized(_self) end - ----@param x number ----@param y number ----@param z number ----@param w number ----@return Vec4 -function Vec4.new(x,y,z,w) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:reject_from_normalized(_self,rhs) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:midpoint(_self,rhs) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:fract(_self) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:signum(_self) end - ----@param mask BVec4A ----@param if_true Vec4 ----@param if_false Vec4 ----@return Vec4 -function Vec4.select(mask,if_true,if_false) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return BVec4A -function Vec4:cmpgt(_self,rhs) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:ceil(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:div(_self,rhs) end - ----@param _self Vec4 ----@return number -function Vec4:element_sum(_self) end - ----@param p1 Vec4 ----@param p2 number ----@return Vec4 -function Vec4:sub(p1,p2) end - ----@param p1 Vec4 ----@param p2 number ----@return Vec4 -function Vec4:div(p1,p2) end - ----@param _self Vec4 ----@return U16Vec4 -function Vec4:as_u16vec4(_self) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:normalize_or_zero(_self) end - ----@param _self Vec4 ----@return U8Vec4 -function Vec4:as_u8vec4(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:rem(_self,rhs) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return number -function Vec4:dot(_self,rhs) end - ----@param _self Vec4 ----@param min number ----@return Vec4 -function Vec4:clamp_length_min(_self,min) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return BVec4A -function Vec4:cmpne(_self,rhs) end - ----@param _self Vec4 ----@param rhs Vec4 ----@param d number ----@return Vec4 -function Vec4:move_towards(_self,rhs,d) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:exp(_self) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:floor(_self) end - ----@param _self Vec4 ----@param fallback Vec4 ----@return Vec4 -function Vec4:normalize_or(_self,fallback) end - ----@param p1 Vec4 ----@param p2 Vec4 ----@return Vec4 -function Vec4:rem(p1,p2) end - ----@param p1 Vec4 ----@param p2 number ----@return Vec4 -function Vec4:mul(p1,p2) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:reject_from(_self,rhs) end - ----@param _self Vec4 ----@return I16Vec4 -function Vec4:as_i16vec4(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:copysign(_self,rhs) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return number -function Vec4:distance_squared(_self,rhs) end - ----@param _self Vec4 ----@return boolean -function Vec4:is_nan(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:add(_self,rhs) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:mul(_self,rhs) end - ----@param _self Vec4 ----@return number -function Vec4:length_recip(_self) end - ----@param _self Vec4 ----@return number -function Vec4:length_squared(_self) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:trunc(_self) end - ----@param _self Vec4 ----@return number[] -function Vec4:to_array(_self) end - ----@param p1 Vec4 ----@param p2 number ----@return Vec4 -function Vec4:rem(p1,p2) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:project_onto(_self,rhs) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:sub(_self,rhs) end - ----@param _self Vec4 ----@return DVec4 -function Vec4:as_dvec4(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return BVec4A -function Vec4:cmple(_self,rhs) end - ----@param _self Vec4 ----@param max number ----@return Vec4 -function Vec4:clamp_length_max(_self,max) end - ----@param _self Vec4 ----@return I64Vec4 -function Vec4:as_i64vec4(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:max(_self,rhs) end - ----@param _self Vec4 ----@param normal Vec4 ----@return Vec4 -function Vec4:reflect(_self,normal) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:dot_into_vec(_self,rhs) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:rem_euclid(_self,rhs) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return boolean -function Vec4:eq(_self,rhs) end - ----@param _self Vec4 ----@param n number ----@return Vec4 -function Vec4:powf(_self,n) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:clone(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return BVec4A -function Vec4:cmpge(_self,rhs) end - ----@param _self Vec4 ----@return integer -function Vec4:is_negative_bitmask(_self) end - ----@param _self Vec4 ----@return number -function Vec4:max_element(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@param s number ----@return Vec4 -function Vec4:lerp(_self,rhs,s) end - ----@param _self Vec4 ----@param min number ----@param max number ----@return Vec4 -function Vec4:clamp_length(_self,min,max) end - ----@param _self Vec4 ----@param rhs Vec4 ----@param max_abs_diff number ----@return boolean -function Vec4:abs_diff_eq(_self,rhs,max_abs_diff) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:project_onto_normalized(_self,rhs) end - ----@param p1 Vec4 ----@param p2 Vec4 ----@return Vec4 -function Vec4:div(p1,p2) end - ----@param _self Vec4 ----@return BVec4A -function Vec4:is_nan_mask(_self) end - ----@param _self Vec4 ----@return number -function Vec4:length(_self) end - ----@param _self Vec4 ----@param y number ----@return Vec4 -function Vec4:with_y(_self,y) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:min(_self,rhs) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:recip(_self) end - ----@param p1 Vec4 ----@param p2 Vec4 ----@return Vec4 -function Vec4:sub(p1,p2) end - ----@param p1 Vec4 ----@param p2 Vec4 ----@return Vec4 -function Vec4:mul(p1,p2) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:fract_gl(_self) end - ----@param _self Vec4 ----@param w number ----@return Vec4 -function Vec4:with_w(_self,w) end - ----@param _self Vec4 ----@return Vec3 -function Vec4:truncate(_self) end - ----@param _self Vec4 ----@return number -function Vec4:min_element(_self) end - ----@param _self Vec4 ----@return I8Vec4 -function Vec4:as_i8vec4(_self) end - ----@param _self Vec4 ----@return boolean -function Vec4:is_finite(_self) end - ----@param _self Vec4 ----@param z number ----@return Vec4 -function Vec4:with_z(_self,z) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:neg(_self) end - ----@param _self Vec4 ----@return BVec4A -function Vec4:is_finite_mask(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return number -function Vec4:distance(_self,rhs) end - ----@param _self Vec4 ----@return UVec4 -function Vec4:as_uvec4(_self) end - ----@param _self Vec4 ----@param x number ----@return Vec4 -function Vec4:with_x(_self,x) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return BVec4A -function Vec4:cmplt(_self,rhs) end - ----@param _self Vec4 ----@param min Vec4 ----@param max Vec4 ----@return Vec4 -function Vec4:clamp(_self,min,max) end - ----@param _self Vec4 ----@return IVec4 -function Vec4:as_ivec4(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return BVec4A -function Vec4:cmpeq(_self,rhs) end - ----@param _self Vec4 ----@return number -function Vec4:element_product(_self) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:round(_self) end - ----@param _self Vec4 ----@param normal Vec4 ----@param eta number ----@return Vec4 -function Vec4:refract(_self,normal,eta) end - ----@param v number ----@return Vec4 -function Vec4.splat(v) end - ----@param p1 Vec4 ----@param p2 number ----@return Vec4 -function Vec4:add(p1,p2) end - ----@param _self Vec4 ----@return Vec4 -function Vec4:normalize(_self) end - ----@param p1 Vec4 ----@param p2 Vec4 ----@return Vec4 -function Vec4:add(p1,p2) end - ----@param _self Vec4 ----@return U64Vec4 -function Vec4:as_u64vec4(_self) end - ----@param _self Vec4 ----@param rhs Vec4 ----@return Vec4 -function Vec4:div_euclid(_self,rhs) end - - ----@class SmolStr : ReflectReference -SmolStr = {} - ----@param _self SmolStr ----@return string -function SmolStr:to_string(_self) end - ----@param _self SmolStr ----@return integer -function SmolStr:len(_self) end - ----@param _self SmolStr ----@return boolean -function SmolStr:is_empty(_self) end - ----@param _self SmolStr ----@return boolean -function SmolStr:is_heap_allocated(_self) end - ----@param _self SmolStr ----@param other SmolStr ----@return boolean -function SmolStr:eq(_self,other) end - ----@param _self SmolStr ----@return SmolStr -function SmolStr:clone(_self) end - - ----@class Uuid : ReflectReference -Uuid = {} - ----@param _self Uuid ----@param other Uuid ----@return boolean -function Uuid:eq(_self,other) end - ----@return integer[] -function Uuid.encode_buffer() end - - ----@param _self Uuid ----@return boolean -function Uuid:is_max(_self) end - ----@param _self Uuid ----@return Uuid -function Uuid:clone(_self) end - ----@return Uuid -function Uuid.new_v4() end - ----@param _self Uuid ----@return [integer, integer] -function Uuid:as_u64_pair(_self) end - ----@param _self Uuid ----@return integer[] -function Uuid:into_bytes(_self) end - ----@param _self Uuid ----@return integer[] | nil -function Uuid:get_node_id(_self) end - ----@param bytes integer[] ----@return Uuid -function Uuid.from_bytes(bytes) end - ----@param _self Uuid ----@return integer -function Uuid:as_u128(_self) end - ----@param _self Uuid ----@return integer -function Uuid:get_version_num(_self) end - ----@param _self Uuid ----@return integer[] -function Uuid:to_bytes_le(_self) end - ----@param v integer ----@return Uuid -function Uuid.from_u128_le(v) end - ----@param v integer ----@return Uuid -function Uuid.from_u128(v) end - ----@param _self Uuid ----@return nil -function Uuid:assert_receiver_is_total_eq(_self) end - ----@param _self Uuid ----@return integer -function Uuid:to_u128_le(_self) end - ----@return Uuid -function Uuid.max() end - ----@param b integer[] ----@return Uuid -function Uuid.from_bytes_le(b) end - ----@param _self Uuid ----@return boolean -function Uuid:is_nil(_self) end - ----@param high_bits integer ----@param low_bits integer ----@return Uuid -function Uuid.from_u64_pair(high_bits,low_bits) end - - ----@class DynamicFunction : ReflectReference ---- A dynamic script function. -DynamicFunction = {} - - ----@class DynamicFunctionMut : ReflectReference ---- A dynamic mutable script function. -DynamicFunctionMut = {} - - ----@class FunctionCallContext : ReflectReference ---- The caller context when calling a script function. ---- Functions can choose to react to caller preferences such as converting 1-indexed numbers to 0-indexed numbers -FunctionCallContext = {} - - ----@class PathBuf : ReflectReference ---- A heap allocated file path -PathBuf = {} - - ----@class String : ReflectReference ---- A heap allocated string -String = {} - - ----@class AssetIndex : ReflectReference ---- A generational runtime-only identifier for a specific [`Asset`] stored in [`Assets`]. This is optimized for efficient runtime ---- usage and is not suitable for identifying assets across app runs. ----@field generation ? integer ----@field index ? integer -AssetIndex = {} - - ----@class AssetPath : ReflectReference ---- Represents a path to an asset in a "virtual filesystem". ---- ---- Asset paths consist of three main parts: ---- * [`AssetPath::source`]: The name of the [`AssetSource`](crate::io::AssetSource) to load the asset from. ---- This is optional. If one is not set the default source will be used (which is the `assets` folder by default). ---- * [`AssetPath::path`]: The "virtual filesystem path" pointing to an asset source file. ---- * [`AssetPath::label`]: An optional "named sub asset". When assets are loaded, they are ---- allowed to load "sub assets" of any type, which are identified by a named "label". ---- ---- Asset paths are generally constructed (and visualized) as strings: ---- ---- ```no_run ---- # use bevy_asset::{Asset, AssetServer, Handle}; ---- # use bevy_reflect::TypePath; ---- # ---- # #[derive(Asset, TypePath, Default)] ---- # struct Mesh; ---- # ---- # #[derive(Asset, TypePath, Default)] ---- # struct Scene; ---- # ---- # let asset_server: AssetServer = panic!(); ---- // This loads the `my_scene.scn` base asset from the default asset source. ---- let scene: Handle = asset_server.load("my_scene.scn"); ---- ---- // This loads the `PlayerMesh` labeled asset from the `my_scene.scn` base asset in the default asset source. ---- let mesh: Handle = asset_server.load("my_scene.scn#PlayerMesh"); ---- ---- // This loads the `my_scene.scn` base asset from a custom 'remote' asset source. ---- let scene: Handle = asset_server.load("remote://my_scene.scn"); ---- ``` ---- ---- [`AssetPath`] implements [`From`] for `&'static str`, `&'static Path`, and `&'a String`, ---- which allows us to optimize the static cases. ---- This means that the common case of `asset_server.load("my_scene.scn")` when it creates and ---- clones internal owned [`AssetPaths`](AssetPath). ---- This also means that you should use [`AssetPath::parse`] in cases where `&str` is the explicit type. -AssetPath = {} - - ----@class RenderAssetUsages : ReflectReference ---- Defines where the asset will be used. ---- ---- If an asset is set to the `RENDER_WORLD` but not the `MAIN_WORLD`, the asset will be ---- unloaded from the asset server once it's been extracted and prepared in the render world. ---- ---- Unloading the asset saves on memory, as for most cases it is no longer necessary to keep ---- it in RAM once it's been uploaded to the GPU's VRAM. However, this means you can no longer ---- access the asset from the CPU (via the `Assets` resource) once unloaded (without re-loading it). ---- ---- If you never need access to the asset from the CPU past the first frame it's loaded on, ---- or only need very infrequent access, then set this to `RENDER_WORLD`. Otherwise, set this to ---- `RENDER_WORLD | MAIN_WORLD`. ---- ---- If you have an asset that doesn't actually need to end up in the render world, like an Image ---- that will be decoded into another Image asset, use `MAIN_WORLD` only. ---- ---- ## Platform-specific ---- ---- On Wasm, it is not possible for now to free reserved memory. To control memory usage, load assets ---- in sequence and unload one before loading the next. See this ---- [discussion about memory management](https://github.com/WebAssembly/design/issues/1397) for more ---- details. -RenderAssetUsages = {} - - ----@class DeferredPrepass : ReflectReference ---- If added to a [`crate::prelude::Camera3d`] then deferred materials will be rendered to the deferred gbuffer texture and will be available to subsequent passes. ---- Note the default deferred lighting plugin also requires `DepthPrepass` to work correctly. -DeferredPrepass = {} - - ----@class SystemIdMarker : ReflectReference ---- Marker [`Component`](bevy_ecs::component::Component) for identifying [`SystemId`] [`Entity`]s. -SystemIdMarker = {} - - ----@class OnAdd : ReflectReference ---- Trigger emitted when a component is inserted onto an entity that does not already have that ---- component. Runs before `OnInsert`. ---- See [`crate::component::ComponentHooks::on_add`] for more information. -OnAdd = {} - - ----@class OnDespawn : ReflectReference ---- Trigger emitted for each component on an entity when it is despawned. ---- See [`crate::component::ComponentHooks::on_despawn`] for more information. -OnDespawn = {} - - ----@class OnInsert : ReflectReference ---- Trigger emitted when a component is inserted, regardless of whether or not the entity already ---- had that component. Runs after `OnAdd`, if it ran. ---- See [`crate::component::ComponentHooks::on_insert`] for more information. -OnInsert = {} - - ----@class OnRemove : ReflectReference ---- Trigger emitted when a component is removed from an entity, and runs before the component is ---- removed, so you can still access the component data. ---- See [`crate::component::ComponentHooks::on_remove`] for more information. -OnRemove = {} - - ----@class OnReplace : ReflectReference ---- Trigger emitted when a component is inserted onto an entity that already has that component. ---- Runs before the value is replaced, so you can still access the original component data. ---- See [`crate::component::ComponentHooks::on_replace`] for more information. -OnReplace = {} - - ----@class Image : ReflectReference -Image = {} - - ----@class TextureAtlas : ReflectReference ---- An index into a [`TextureAtlasLayout`], which corresponds to a specific section of a texture. ---- ---- It stores a handle to [`TextureAtlasLayout`] and the index of the current section of the atlas. ---- The texture atlas contains various *sections* of a given texture, allowing users to have a single ---- image file for either sprite animation or global mapping. ---- You can change the texture [`index`](Self::index) of the atlas to animate the sprite or display only a *section* of the texture ---- for efficient rendering of related game objects. ---- ---- Check the following examples for usage: ---- - [`animated sprite sheet example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs) ---- - [`sprite animation event example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs) ---- - [`texture atlas example`](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) ----@field layout ? Handle ----@field index ? integer -TextureAtlas = {} - - ----@class TextureAtlasLayout : ReflectReference ---- Stores a map used to lookup the position of a texture in a [`TextureAtlas`]. ---- This can be used to either use and look up a specific section of a texture, or animate frame-by-frame as a sprite sheet. ---- ---- Optionally it can store a mapping from sub texture handles to the related area index (see ---- [`TextureAtlasBuilder`]). ---- ---- [Example usage animating sprite.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_sheet.rs) ---- [Example usage animating sprite in response to an event.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/sprite_animation.rs) ---- [Example usage loading sprite sheet.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/texture_atlas.rs) ---- ---- [`TextureAtlasBuilder`]: crate::TextureAtlasBuilder ----@field size ? UVec2 ----@field textures ? Vec -TextureAtlasLayout = {} - - ----@class Affine3 : ReflectReference ---- Reduced-size version of `glam::Affine3A` for use when storage has ---- significant performance impact. Convert to `glam::Affine3A` to do ---- non-trivial calculations. ----@field matrix3 ? Mat3 ----@field translation ? Vec3 -Affine3 = {} - - ----@class Indices : ReflectReference ---- An array of indices into the [`VertexAttributeValues`](super::VertexAttributeValues) for a mesh. ---- ---- It describes the order in which the vertex attributes should be joined into faces. -Indices = {} - - ----@class Mesh : ReflectReference ---- A 3D object made out of vertices representing triangles, lines, or points, ---- with "attribute" values for each vertex. ---- ---- Meshes can be automatically generated by a bevy `AssetLoader` (generally by loading a `Gltf` file), ---- or by converting a [primitive](bevy_math::primitives) using [`into`](Into). ---- It is also possible to create one manually. They can be edited after creation. ---- ---- Meshes can be rendered with a `Mesh2d` and `MeshMaterial2d` ---- or `Mesh3d` and `MeshMaterial3d` for 2D and 3D respectively. ---- ---- A [`Mesh`] in Bevy is equivalent to a "primitive" in the glTF format, for a ---- glTF Mesh representation, see `GltfMesh`. ---- ---- ## Manual creation ---- ---- The following function will construct a flat mesh, to be rendered with a ---- `StandardMaterial` or `ColorMaterial`: ---- ---- ``` ---- # use bevy_mesh::{Mesh, Indices, PrimitiveTopology}; ---- # use bevy_asset::RenderAssetUsages; ---- fn create_simple_parallelogram() -> Mesh { ---- // Create a new mesh using a triangle list topology, where each set of 3 vertices composes a triangle. ---- Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsages::default()) ---- // Add 4 vertices, each with its own position attribute (coordinate in ---- // 3D space), for each of the corners of the parallelogram. ---- .with_inserted_attribute( ---- Mesh::ATTRIBUTE_POSITION, ---- vec![[0.0, 0.0, 0.0], [1.0, 2.0, 0.0], [2.0, 2.0, 0.0], [1.0, 0.0, 0.0]] ---- ) ---- // Assign a UV coordinate to each vertex. ---- .with_inserted_attribute( ---- Mesh::ATTRIBUTE_UV_0, ---- vec![[0.0, 1.0], [0.5, 0.0], [1.0, 0.0], [0.5, 1.0]] ---- ) ---- // Assign normals (everything points outwards) ---- .with_inserted_attribute( ---- Mesh::ATTRIBUTE_NORMAL, ---- vec![[0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0], [0.0, 0.0, 1.0]] ---- ) ---- // After defining all the vertices and their attributes, build each triangle using the ---- // indices of the vertices that make it up in a counter-clockwise order. ---- .with_inserted_indices(Indices::U32(vec![ ---- // First triangle ---- 0, 3, 1, ---- // Second triangle ---- 1, 3, 2 ---- ])) ---- } ---- ``` ---- ---- You can see how it looks like [here](https://github.com/bevyengine/bevy/blob/main/assets/docs/Mesh.png), ---- used in a `Mesh3d` with a square bevy logo texture, with added axis, points, ---- lines and text for clarity. ---- ---- ## Other examples ---- ---- For further visualization, explanation, and examples, see the built-in Bevy examples, ---- and the [implementation of the built-in shapes](https://github.com/bevyengine/bevy/tree/main/crates/bevy_mesh/src/primitives). ---- In particular, [generate_custom_mesh](https://github.com/bevyengine/bevy/blob/main/examples/3d/generate_custom_mesh.rs) ---- teaches you to access and modify the attributes of a [`Mesh`] after creating it. ---- ---- ## Common points of confusion ---- ---- - UV maps in Bevy start at the top-left, see [`ATTRIBUTE_UV_0`](Mesh::ATTRIBUTE_UV_0), ---- other APIs can have other conventions, `OpenGL` starts at bottom-left. ---- - It is possible and sometimes useful for multiple vertices to have the same ---- [position attribute](Mesh::ATTRIBUTE_POSITION) value, ---- it's a common technique in 3D modeling for complex UV mapping or other calculations. ---- - Bevy performs frustum culling based on the `Aabb` of meshes, which is calculated ---- and added automatically for new meshes only. If a mesh is modified, the entity's `Aabb` ---- needs to be updated manually or deleted so that it is re-calculated. ---- ---- ## Use with `StandardMaterial` ---- ---- To render correctly with `StandardMaterial`, a mesh needs to have properly defined: ---- - [`UVs`](Mesh::ATTRIBUTE_UV_0): Bevy needs to know how to map a texture onto the mesh ---- (also true for `ColorMaterial`). ---- - [`Normals`](Mesh::ATTRIBUTE_NORMAL): Bevy needs to know how light interacts with your mesh. ---- [0.0, 0.0, 1.0] is very common for simple flat meshes on the XY plane, ---- because simple meshes are smooth and they don't require complex light calculations. ---- - Vertex winding order: by default, `StandardMaterial.cull_mode` is `Some(Face::Back)`, ---- which means that Bevy would *only* render the "front" of each triangle, which ---- is the side of the triangle from where the vertices appear in a *counter-clockwise* order. ----@field indices ? Option ----@field morph_targets ? Option ----@field morph_target_names ? Option ----@field asset_usage ? RenderAssetUsages -Mesh = {} - - ----@class MeshMorphWeights : ReflectReference ---- Control a specific [`Mesh`] instance's [morph targets]. These control the weights of ---- specific "mesh primitives" in scene formats like GLTF. They can be set manually, but ---- in most cases they should "automatically" synced by setting the [`MorphWeights`] component ---- on a parent entity. ---- ---- See [`MorphWeights`] for more details on Bevy's morph target implementation. ---- ---- Add this to an [`Entity`] with a `Mesh3d` with a [`MorphAttributes`] set ---- to control individual weights of each morph target. ---- ---- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation ----@field weights ? Vec -MeshMorphWeights = {} - - ----@class MorphWeights : ReflectReference ---- Controls the [morph targets] for all child `Mesh3d` entities. In most cases, [`MorphWeights`] should be considered ---- the "source of truth" when writing morph targets for meshes. However you can choose to write child [`MeshMorphWeights`] ---- if your situation requires more granularity. Just note that if you set [`MorphWeights`], it will overwrite child ---- [`MeshMorphWeights`] values. ---- ---- This exists because Bevy's [`Mesh`] corresponds to a _single_ surface / material, whereas morph targets ---- as defined in the GLTF spec exist on "multi-primitive meshes" (where each primitive is its own surface with its own material). ---- Therefore in Bevy [`MorphWeights`] an a parent entity are the "canonical weights" from a GLTF perspective, which then ---- synchronized to child `Mesh3d` / [`MeshMorphWeights`] (which correspond to "primitives" / "surfaces" from a GLTF perspective). ---- ---- Add this to the parent of one or more [`Entities`](`Entity`) with a `Mesh3d` with a [`MeshMorphWeights`]. ---- ---- [morph targets]: https://en.wikipedia.org/wiki/Morph_target_animation ----@field weights ? Vec ----@field first_mesh ? Option -MorphWeights = {} - - ----@class AnnulusMeshBuilder : ReflectReference ---- A builder for creating a [`Mesh`] with an [`Annulus`] shape. ----@field annulus ? Annulus ----@field resolution ? integer -AnnulusMeshBuilder = {} - - ----@class Capsule2dMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Capsule2d`] shape. ----@field capsule ? Capsule2d ----@field resolution ? integer -Capsule2dMeshBuilder = {} - - ----@class CircleMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Circle`] shape. ----@field circle ? Circle ----@field resolution ? integer -CircleMeshBuilder = {} - - ----@class CircularMeshUvMode : ReflectReference ---- Specifies how to generate UV-mappings for the [`CircularSector`] and [`CircularSegment`] shapes. ---- ---- Currently the only variant is `Mask`, which is good for showing a portion of a texture that includes ---- the entire circle, particularly the same texture will be displayed with different fractions of a ---- complete circle. ---- ---- It's expected that more will be added in the future, such as a variant that causes the texture to be ---- scaled to fit the bounding box of the shape, which would be good for packed textures only including the ---- portion of the circle that is needed to display. -CircularMeshUvMode = {} - - ----@class CircularSectorMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`CircularSector`] shape. ---- ---- The resulting mesh will have a UV-map such that the center of the circle is ---- at the center of the texture. ----@field sector ? CircularSector ----@field resolution ? integer ----@field uv_mode ? CircularMeshUvMode -CircularSectorMeshBuilder = {} - - ----@class CircularSegmentMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`CircularSegment`] shape. ---- ---- The resulting mesh will have a UV-map such that the center of the circle is ---- at the center of the texture. ----@field segment ? CircularSegment ----@field resolution ? integer ----@field uv_mode ? CircularMeshUvMode -CircularSegmentMeshBuilder = {} - - ----@class EllipseMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with an [`Ellipse`] shape. ----@field ellipse ? Ellipse ----@field resolution ? integer -EllipseMeshBuilder = {} - - ----@class RectangleMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Rectangle`] shape. ----@field half_size ? Vec2 -RectangleMeshBuilder = {} - - ----@class RegularPolygonMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`RegularPolygon`] shape. ----@field circumradius ? number ----@field sides ? integer -RegularPolygonMeshBuilder = {} - - ----@class RhombusMeshBuilder : ReflectReference ---- A builder for creating a [`Mesh`] with an [`Rhombus`] shape. ----@field half_diagonals ? Vec2 -RhombusMeshBuilder = {} - - ----@class Triangle2dMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Triangle2d`] shape. ----@field triangle ? Triangle2d -Triangle2dMeshBuilder = {} - - ----@class Capsule3dMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Capsule3d`] shape. ----@field capsule ? Capsule3d ----@field rings ? integer ----@field longitudes ? integer ----@field latitudes ? integer ----@field uv_profile ? CapsuleUvProfile -Capsule3dMeshBuilder = {} - - ----@class CapsuleUvProfile : ReflectReference ---- Manner in which UV coordinates are distributed vertically. -CapsuleUvProfile = {} - - ----@class ConeAnchor : ReflectReference ---- Anchoring options for [`ConeMeshBuilder`] -ConeAnchor = {} - - ----@class ConeMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Cone`] shape. ----@field cone ? Cone ----@field resolution ? integer ----@field anchor ? ConeAnchor -ConeMeshBuilder = {} - - ----@class ConicalFrustumMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`ConicalFrustum`] shape. ----@field frustum ? ConicalFrustum ----@field resolution ? integer ----@field segments ? integer -ConicalFrustumMeshBuilder = {} - - ----@class CuboidMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Cuboid`] shape. ----@field half_size ? Vec3 -CuboidMeshBuilder = {} - - ----@class CylinderAnchor : ReflectReference ---- Anchoring options for [`CylinderMeshBuilder`] -CylinderAnchor = {} - - ----@class CylinderMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Cylinder`] shape. ----@field cylinder ? Cylinder ----@field resolution ? integer ----@field segments ? integer ----@field caps ? boolean ----@field anchor ? CylinderAnchor -CylinderMeshBuilder = {} - - ----@class PlaneMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Plane3d`] shape. ----@field plane ? Plane3d ----@field subdivisions ? integer -PlaneMeshBuilder = {} - - ----@class SphereKind : ReflectReference ---- A type of sphere mesh. -SphereKind = {} - - ----@class SphereMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with an [`Sphere`] shape. ----@field sphere ? Sphere ----@field kind ? SphereKind -SphereMeshBuilder = {} - - ----@class TetrahedronMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Tetrahedron`] shape. ----@field tetrahedron ? Tetrahedron -TetrahedronMeshBuilder = {} - - ----@class TorusMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Torus`] shape. ----@field torus ? Torus ----@field minor_resolution ? integer ----@field major_resolution ? integer ----@field angle_range ? RangeInclusive -TorusMeshBuilder = {} - - ----@class Triangle3dMeshBuilder : ReflectReference ---- A builder used for creating a [`Mesh`] with a [`Triangle3d`] shape. ----@field triangle ? Triangle3d -Triangle3dMeshBuilder = {} - - ----@class SkinnedMesh : ReflectReference ----@field inverse_bindposes ? bevy_asset::handle::Handle ----@field joints ? Vec -SkinnedMesh = {} - - ----@class ScriptAsset : ReflectReference ---- Represents a script loaded into memory as an asset -ScriptAsset = {} - - ----@class FunctionArgInfo : ReflectReference ---- Information about a function argument. ----@field name ? Option ----@field arg_index ? integer ----@field type_id ? TypeId -FunctionArgInfo = {} - - ----@class FunctionInfo : ReflectReference ---- Information about a function. ----@field name ? Cow ----@field namespace ? Namespace ----@field arg_info ? Vec ----@field return_info ? FunctionReturnInfo ----@field docs ? Option -FunctionInfo = {} - - ----@class FunctionReturnInfo : ReflectReference ---- Information about a function return value. ----@field type_id ? TypeId -FunctionReturnInfo = {} - - ----@class InteropError : ReflectReference ---- An error occurring when converting between rust and a script context. -InteropError = {} - - ----@class Namespace : ReflectReference ---- A namespace for functions -Namespace = {} - - ----@class DynamicComponent : ReflectReference ---- A dynamic script component ----@field data ? ScriptValue -DynamicComponent = {} - - ----@class ScriptValue : ReflectReference ---- An abstraction of values that can be passed to and from scripts. ---- This allows us to re-use logic between scripting languages. -ScriptValue = {} - - ----@class AlphaMode : ReflectReference ---- Sets how a material's base color alpha channel is used for transparency. -AlphaMode = {} - - ----@class Camera : ReflectReference ---- The defining [`Component`] for camera entities, ---- storing information about how and what to render through this camera. ---- ---- The [`Camera`] component is added to an entity to define the properties of the viewpoint from ---- which rendering occurs. It defines the position of the view to render, the projection method ---- to transform the 3D objects into a 2D image, as well as the render target into which that image ---- is produced. ---- ---- Note that a [`Camera`] needs a [`CameraRenderGraph`] to render anything. ---- This is typically provided by adding a [`Camera2d`] or [`Camera3d`] component, ---- but custom render graphs can also be defined. Inserting a [`Camera`] with no render ---- graph will emit an error at runtime. ---- ---- [`Camera2d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_2d/struct.Camera2d.html ---- [`Camera3d`]: https://docs.rs/bevy/latest/bevy/core_pipeline/core_3d/struct.Camera3d.html ----@field viewport ? Option ----@field order ? integer ----@field is_active ? boolean ----@field target ? RenderTarget ----@field hdr ? boolean ----@field msaa_writeback ? boolean ----@field clear_color ? ClearColorConfig ----@field sub_camera_view ? Option -Camera = {} - - ----@class CameraMainTextureUsages : ReflectReference ---- This component lets you control the [`TextureUsages`] field of the main texture generated for the camera -CameraMainTextureUsages = {} - - ----@class CameraRenderGraph : ReflectReference ---- Configures the [`RenderGraph`](crate::render_graph::RenderGraph) name assigned to be run for a given [`Camera`] entity. -CameraRenderGraph = {} - - ----@class Exposure : ReflectReference ---- How much energy a `Camera3d` absorbs from incoming light. ---- ---- -Exposure = {} - - ----@class ImageRenderTarget : ReflectReference ---- A render target that renders to an [`Image`]. ----@field handle ? Handle ----@field scale_factor ? FloatOrd -ImageRenderTarget = {} - - ----@class MipBias : ReflectReference ---- Camera component specifying a mip bias to apply when sampling from material textures. ---- ---- Often used in conjunction with antialiasing post-process effects to reduce textures blurriness. ----@field [1] ? number -MipBias = {} - - ----@class RenderTarget : ReflectReference ---- The "target" that a [`Camera`] will render to. For example, this could be a [`Window`] ---- swapchain or an [`Image`]. -RenderTarget = {} - - ----@class SubCameraView : ReflectReference ---- Settings to define a camera sub view. ---- ---- When [`Camera::sub_camera_view`] is `Some`, only the sub-section of the ---- image defined by `size` and `offset` (relative to the `full_size` of the ---- whole image) is projected to the cameras viewport. ---- ---- Take the example of the following multi-monitor setup: ---- ```css ---- ┌───┬───┐ ---- │ A │ B │ ---- ├───┼───┤ ---- │ C │ D │ ---- └───┴───┘ ---- ``` ---- If each monitor is 1920x1080, the whole image will have a resolution of ---- 3840x2160. For each monitor we can use a single camera with a viewport of ---- the same size as the monitor it corresponds to. To ensure that the image is ---- cohesive, we can use a different sub view on each camera: ---- - Camera A: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,0 ---- - Camera B: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 1920,0 ---- - Camera C: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = 0,1080 ---- - Camera D: `full_size` = 3840x2160, `size` = 1920x1080, `offset` = ---- 1920,1080 ---- ---- However since only the ratio between the values is important, they could all ---- be divided by 120 and still produce the same image. Camera D would for ---- example have the following values: ---- `full_size` = 32x18, `size` = 16x9, `offset` = 16,9 ----@field full_size ? UVec2 ----@field offset ? Vec2 ----@field size ? UVec2 -SubCameraView = {} - - ----@class TemporalJitter : ReflectReference ---- A subpixel offset to jitter a perspective camera's frustum by. ---- ---- Useful for temporal rendering techniques. ---- ---- Do not use with [`OrthographicProjection`]. ---- ---- [`OrthographicProjection`]: crate::camera::OrthographicProjection ----@field offset ? Vec2 -TemporalJitter = {} - - ----@class Viewport : ReflectReference ---- Render viewport configuration for the [`Camera`] component. ---- ---- The viewport defines the area on the render target to which the camera renders its image. ---- You can overlay multiple cameras in a single window using viewports to create effects like ---- split screen, minimaps, and character viewers. ----@field physical_position ? UVec2 ----@field physical_size ? UVec2 ----@field depth ? Range -Viewport = {} - - ----@class ClearColor : ReflectReference ---- A [`Resource`] that stores the color that is used to clear the screen between frames. ---- ---- This color appears as the "background" color for simple apps, ---- when there are portions of the screen with nothing rendered. ----@field [1] ? Color -ClearColor = {} - - ----@class ClearColorConfig : ReflectReference ---- For a camera, specifies the color used to clear the viewport before rendering. -ClearColorConfig = {} - - ----@class ManualTextureViewHandle : ReflectReference ---- A unique id that corresponds to a specific [`ManualTextureView`] in the [`ManualTextureViews`] collection. ----@field [1] ? integer -ManualTextureViewHandle = {} - - ----@class CustomProjection : ReflectReference ---- Holds a dynamic [`CameraProjection`] trait object. Use [`Projection::custom()`] to construct a ---- custom projection. ---- ---- The contained dynamic object can be downcast into a static type using [`CustomProjection::get`]. -CustomProjection = {} - - ----@class OrthographicProjection : ReflectReference ---- Project a 3D space onto a 2D surface using parallel lines, i.e., unlike [`PerspectiveProjection`], ---- the size of objects remains the same regardless of their distance to the camera. ---- ---- The volume contained in the projection is called the *view frustum*. Since the viewport is rectangular ---- and projection lines are parallel, the view frustum takes the shape of a cuboid. ---- ---- Note that the scale of the projection and the apparent size of objects are inversely proportional. ---- As the size of the projection increases, the size of objects decreases. ---- ---- # Examples ---- ---- Configure the orthographic projection to one world unit per 100 window pixels: ---- ---- ``` ---- # use bevy_render::camera::{OrthographicProjection, Projection, ScalingMode}; ---- let projection = Projection::Orthographic(OrthographicProjection { ---- scaling_mode: ScalingMode::WindowSize, ---- scale: 0.01, ---- ..OrthographicProjection::default_2d() ---- }); ---- ``` ----@field near ? number ----@field far ? number ----@field viewport_origin ? Vec2 ----@field scaling_mode ? ScalingMode ----@field scale ? number ----@field area ? Rect -OrthographicProjection = {} - - ----@class PerspectiveProjection : ReflectReference ---- A 3D camera projection in which distant objects appear smaller than close objects. ----@field fov ? number ----@field aspect_ratio ? number ----@field near ? number ----@field far ? number -PerspectiveProjection = {} - - ----@class Projection : ReflectReference ---- Component that defines how to compute a [`Camera`]'s projection matrix. ---- ---- Common projections, like perspective and orthographic, are provided out of the box to handle the ---- majority of use cases. Custom projections can be added using the [`CameraProjection`] trait and ---- the [`Projection::custom`] constructor. ---- ---- ## What's a projection? ---- ---- A camera projection essentially describes how 3d points from the point of view of a camera are ---- projected onto a 2d screen. This is where properties like a camera's field of view are defined. ---- More specifically, a projection is a 4x4 matrix that transforms points from view space (the ---- point of view of the camera) into clip space. Clip space is almost, but not quite, equivalent to ---- the rectangle that is rendered to your screen, with a depth axis. Any points that land outside ---- the bounds of this cuboid are "clipped" and not rendered. ---- ---- You can also think of the projection as the thing that describes the shape of a camera's ---- frustum: the volume in 3d space that is visible to a camera. ---- ---- [`Camera`]: crate::camera::Camera -Projection = {} - - ----@class OcclusionCulling : ReflectReference ---- Add this component to a view in order to enable experimental GPU occlusion ---- culling. ---- ---- *Bevy's occlusion culling is currently marked as experimental.* There are ---- known issues whereby, in rare circumstances, occlusion culling can result in ---- meshes being culled that shouldn't be (i.e. meshes that turn invisible). ---- Please try it out and report issues. ---- ---- *Occlusion culling* allows Bevy to avoid rendering objects that are fully ---- behind other opaque or alpha tested objects. This is different from, and ---- complements, depth fragment rejection as the `DepthPrepass` enables. While ---- depth rejection allows Bevy to avoid rendering *pixels* that are behind ---- other objects, the GPU still has to examine those pixels to reject them, ---- which requires transforming the vertices of the objects and performing ---- skinning if the objects were skinned. Occlusion culling allows the GPU to go ---- a step further, avoiding even transforming the vertices of objects that it ---- can quickly prove to be behind other objects. ---- ---- Occlusion culling inherently has some overhead, because Bevy must examine ---- the objects' bounding boxes, and create an acceleration structure ---- (hierarchical Z-buffer) to perform the occlusion tests. Therefore, occlusion ---- culling is disabled by default. Only enable it if you measure it to be a ---- speedup on your scene. Note that, because Bevy's occlusion culling runs on ---- the GPU and is quite efficient, it's rare for occlusion culling to result in ---- a significant slowdown. ---- ---- Occlusion culling currently requires a `DepthPrepass`. If no depth prepass ---- is present on the view, the [`OcclusionCulling`] component will be ignored. ---- Additionally, occlusion culling is currently incompatible with deferred ---- shading; including both `DeferredPrepass` and [`OcclusionCulling`] results ---- in unspecified behavior. ---- ---- The algorithm that Bevy uses is known as [*two-phase occlusion culling*]. ---- When you enable occlusion culling, Bevy splits the depth prepass into two: ---- an *early* depth prepass and a *late* depth prepass. The early depth prepass ---- renders all the meshes that were visible last frame to produce a ---- conservative approximation of the depth buffer. Then, after producing an ---- acceleration structure known as a hierarchical Z-buffer or depth pyramid, ---- Bevy tests the bounding boxes of all meshes against that depth buffer. Those ---- that can be quickly proven to be behind the geometry rendered during the ---- early depth prepass are skipped entirely. The other potentially-visible ---- meshes are rendered during the late prepass, and finally all the visible ---- meshes are rendered as usual during the opaque, transparent, etc. passes. ---- ---- Unlike other occlusion culling systems you may be familiar with, Bevy's ---- occlusion culling is fully dynamic and requires no baking step. The CPU ---- overhead is minimal. Large skinned meshes and other dynamic objects can ---- occlude other objects. ---- ---- [*two-phase occlusion culling*]: ---- https://medium.com/@mil_kru/two-pass-occlusion-culling-4100edcad501 -OcclusionCulling = {} - - ----@class GlobalsUniform : ReflectReference ---- Contains global values useful when writing shaders. ---- Currently only contains values related to time. ----@field time ? number ----@field delta_time ? number ----@field frame_count ? integer -GlobalsUniform = {} - - ----@class Mesh2d : ReflectReference ---- A component for 2D meshes. Requires a [`MeshMaterial2d`] to be rendered, commonly using a [`ColorMaterial`]. ---- ---- [`MeshMaterial2d`]: ---- [`ColorMaterial`]: ---- ---- # Example ---- ---- ```ignore ---- # use bevy_sprite::{ColorMaterial, Mesh2d, MeshMaterial2d}; ---- # use bevy_ecs::prelude::*; ---- # use bevy_render::mesh::Mesh; ---- # use bevy_color::palettes::basic::RED; ---- # use bevy_asset::Assets; ---- # use bevy_math::primitives::Circle; ---- # ---- // Spawn an entity with a mesh using `ColorMaterial`. ---- fn setup( ---- mut commands: Commands, ---- mut meshes: ResMut>, ---- mut materials: ResMut>, ---- ) { ---- commands.spawn(( ---- Mesh2d(meshes.add(Circle::new(50.0))), ---- MeshMaterial2d(materials.add(ColorMaterial::from_color(RED))), ---- )); ---- } ---- ``` ----@field [1] ? Handle -Mesh2d = {} - - ----@class Mesh3d : ReflectReference ---- A component for 3D meshes. Requires a [`MeshMaterial3d`] to be rendered, commonly using a [`StandardMaterial`]. ---- ---- [`MeshMaterial3d`]: ---- [`StandardMaterial`]: ---- ---- # Example ---- ---- ```ignore ---- # use bevy_pbr::{Material, MeshMaterial3d, StandardMaterial}; ---- # use bevy_ecs::prelude::*; ---- # use bevy_render::mesh::{Mesh, Mesh3d}; ---- # use bevy_color::palettes::basic::RED; ---- # use bevy_asset::Assets; ---- # use bevy_math::primitives::Capsule3d; ---- # ---- // Spawn an entity with a mesh using `StandardMaterial`. ---- fn setup( ---- mut commands: Commands, ---- mut meshes: ResMut>, ---- mut materials: ResMut>, ---- ) { ---- commands.spawn(( ---- Mesh3d(meshes.add(Capsule3d::default())), ---- MeshMaterial3d(materials.add(StandardMaterial { ---- base_color: RED.into(), ---- ..Default::default() ---- })), ---- )); ---- } ---- ``` ----@field [1] ? Handle -Mesh3d = {} - - ----@class Aabb : ReflectReference ---- An axis-aligned bounding box, defined by: ---- - a center, ---- - the distances from the center to each faces along the axis, ---- the faces are orthogonal to the axis. ---- ---- It is typically used as a component on an entity to represent the local space ---- occupied by this entity, with faces orthogonal to its local axis. ---- ---- This component is notably used during "frustum culling", a process to determine ---- if an entity should be rendered by a [`Camera`] if its bounding box intersects ---- with the camera's [`Frustum`]. ---- ---- It will be added automatically by the systems in [`CalculateBounds`] to entities that: ---- - could be subject to frustum culling, for example with a [`Mesh3d`] ---- or `Sprite` component, ---- - don't have the [`NoFrustumCulling`] component. ---- ---- It won't be updated automatically if the space occupied by the entity changes, ---- for example if the vertex positions of a [`Mesh3d`] are updated. ---- ---- [`Camera`]: crate::camera::Camera ---- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling ---- [`CalculateBounds`]: crate::view::visibility::VisibilitySystems::CalculateBounds ---- [`Mesh3d`]: crate::mesh::Mesh ----@field center ? Vec3A ----@field half_extents ? Vec3A -Aabb = {} - - ----@class CascadesFrusta : ReflectReference -CascadesFrusta = {} - - ----@class CubemapFrusta : ReflectReference -CubemapFrusta = {} - - ----@class Frustum : ReflectReference ---- A region of 3D space defined by the intersection of 6 [`HalfSpace`]s. ---- ---- Frustums are typically an apex-truncated square pyramid (a pyramid without the top) or a cuboid. ---- ---- Half spaces are ordered left, right, top, bottom, near, far. The normal vectors ---- of the half-spaces point towards the interior of the frustum. ---- ---- A frustum component is used on an entity with a [`Camera`] component to ---- determine which entities will be considered for rendering by this camera. ---- All entities with an [`Aabb`] component that are not contained by (or crossing ---- the boundary of) the frustum will not be rendered, and not be used in rendering computations. ---- ---- This process is called frustum culling, and entities can opt out of it using ---- the [`NoFrustumCulling`] component. ---- ---- The frustum component is typically added automatically for cameras, either `Camera2d` or `Camera3d`. ---- It is usually updated automatically by [`update_frusta`] from the ---- [`CameraProjection`] component and [`GlobalTransform`] of the camera entity. ---- ---- [`Camera`]: crate::camera::Camera ---- [`NoFrustumCulling`]: crate::view::visibility::NoFrustumCulling ---- [`update_frusta`]: crate::view::visibility::update_frusta ---- [`CameraProjection`]: crate::camera::CameraProjection ---- [`GlobalTransform`]: bevy_transform::components::GlobalTransform -Frustum = {} - - ----@class ShaderStorageBuffer : ReflectReference ---- A storage buffer that is prepared as a [`RenderAsset`] and uploaded to the GPU. -ShaderStorageBuffer = {} - - ----@class SyncToRenderWorld : ReflectReference ---- Marker component that indicates that its entity needs to be synchronized to the render world. ---- ---- This component is automatically added as a required component by [`ExtractComponentPlugin`] and [`SyncComponentPlugin`]. ---- For more information see [`SyncWorldPlugin`]. ---- ---- NOTE: This component should persist throughout the entity's entire lifecycle. ---- If this component is removed from its entity, the entity will be despawned. ---- ---- [`ExtractComponentPlugin`]: crate::extract_component::ExtractComponentPlugin ---- [`SyncComponentPlugin`]: crate::sync_component::SyncComponentPlugin -SyncToRenderWorld = {} - - ----@class ColorGrading : ReflectReference ---- Configures filmic color grading parameters to adjust the image appearance. ---- ---- Color grading is applied just before tonemapping for a given ---- [`Camera`](crate::camera::Camera) entity, with the sole exception of the ---- `post_saturation` value in [`ColorGradingGlobal`], which is applied after ---- tonemapping. ----@field global ? ColorGradingGlobal ----@field shadows ? ColorGradingSection ----@field midtones ? ColorGradingSection ----@field highlights ? ColorGradingSection -ColorGrading = {} - - ----@class ColorGradingGlobal : ReflectReference ---- Filmic color grading values applied to the image as a whole (as opposed to ---- individual sections, like shadows and highlights). ----@field exposure ? number ----@field temperature ? number ----@field tint ? number ----@field hue ? number ----@field post_saturation ? number ----@field midtones_range ? Range -ColorGradingGlobal = {} - - ----@class ColorGradingSection : ReflectReference ---- A section of color grading values that can be selectively applied to ---- shadows, midtones, and highlights. ----@field saturation ? number ----@field contrast ? number ----@field gamma ? number ----@field gain ? number ----@field lift ? number -ColorGradingSection = {} - - ----@class Msaa : ReflectReference ---- Component for configuring the number of samples for [Multi-Sample Anti-Aliasing](https://en.wikipedia.org/wiki/Multisample_anti-aliasing) ---- for a [`Camera`](crate::camera::Camera). ---- ---- Defaults to 4 samples. A higher number of samples results in smoother edges. ---- ---- Some advanced rendering features may require that MSAA is disabled. ---- ---- Note that the web currently only supports 1 or 4 samples. -Msaa = {} - - ----@class InheritedVisibility : ReflectReference ---- Whether or not an entity is visible in the hierarchy. ---- This will not be accurate until [`VisibilityPropagate`] runs in the [`PostUpdate`] schedule. ---- ---- If this is false, then [`ViewVisibility`] should also be false. ---- ---- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate ----@field [1] ? boolean -InheritedVisibility = {} - - ----@class NoFrustumCulling : ReflectReference ---- Use this component to opt-out of built-in frustum culling for entities, see ---- [`Frustum`]. ---- ---- It can be used for example: ---- - when a [`Mesh`] is updated but its [`Aabb`] is not, which might happen with animations, ---- - when using some light effects, like wanting a [`Mesh`] out of the [`Frustum`] ---- to appear in the reflection of a [`Mesh`] within. -NoFrustumCulling = {} - - ----@class ViewVisibility : ReflectReference ---- Algorithmically-computed indication of whether an entity is visible and should be extracted for rendering. ---- ---- Each frame, this will be reset to `false` during [`VisibilityPropagate`] systems in [`PostUpdate`]. ---- Later in the frame, systems in [`CheckVisibility`] will mark any visible entities using [`ViewVisibility::set`]. ---- Because of this, values of this type will be marked as changed every frame, even when they do not change. ---- ---- If you wish to add custom visibility system that sets this value, make sure you add it to the [`CheckVisibility`] set. ---- ---- [`VisibilityPropagate`]: VisibilitySystems::VisibilityPropagate ---- [`CheckVisibility`]: VisibilitySystems::CheckVisibility ----@field [1] ? boolean -ViewVisibility = {} - - ----@class Visibility : ReflectReference ---- User indication of whether an entity is visible. Propagates down the entity hierarchy. ---- ---- If an entity is hidden in this way, all [`Children`] (and all of their children and so on) who ---- are set to [`Inherited`](Self::Inherited) will also be hidden. ---- ---- This is done by the `visibility_propagate_system` which uses the entity hierarchy and ---- `Visibility` to set the values of each entity's [`InheritedVisibility`] component. -Visibility = {} - - ----@class VisibilityClass : ReflectReference ---- A bucket into which we group entities for the purposes of visibility. ---- ---- Bevy's various rendering subsystems (3D, 2D, UI, etc.) want to be able to ---- quickly winnow the set of entities to only those that the subsystem is ---- tasked with rendering, to avoid spending time examining irrelevant entities. ---- At the same time, Bevy wants the [`check_visibility`] system to determine ---- all entities' visibilities at the same time, regardless of what rendering ---- subsystem is responsible for drawing them. Additionally, your application ---- may want to add more types of renderable objects that Bevy determines ---- visibility for just as it does for Bevy's built-in objects. ---- ---- The solution to this problem is *visibility classes*. A visibility class is ---- a type, typically the type of a component, that represents the subsystem ---- that renders it: for example, `Mesh3d`, `Mesh2d`, and `Sprite`. The ---- [`VisibilityClass`] component stores the visibility class or classes that ---- the entity belongs to. (Generally, an object will belong to only one ---- visibility class, but in rare cases it may belong to multiple.) ---- ---- When adding a new renderable component, you'll typically want to write an ---- add-component hook that adds the type ID of that component to the ---- [`VisibilityClass`] array. See `custom_phase_item` for an example. ----@field [1] ? SmallVec -VisibilityClass = {} - - ----@class VisibleEntities : ReflectReference ---- Collection of entities visible from the current view. ---- ---- This component contains all entities which are visible from the currently ---- rendered view. The collection is updated automatically by the [`VisibilitySystems::CheckVisibility`] ---- system set. Renderers can use the equivalent [`RenderVisibleEntities`] to optimize rendering of ---- a particular view, to prevent drawing items not visible from that view. ---- ---- This component is intended to be attached to the same entity as the [`Camera`] and ---- the [`Frustum`] defining the view. -VisibleEntities = {} - - ----@class VisibilityRange : ReflectReference ---- Specifies the range of distances that this entity must be from the camera in ---- order to be rendered. ---- ---- This is also known as *hierarchical level of detail* or *HLOD*. ---- ---- Use this component when you want to render a high-polygon mesh when the ---- camera is close and a lower-polygon mesh when the camera is far away. This ---- is a common technique for improving performance, because fine details are ---- hard to see in a mesh at a distance. To avoid an artifact known as *popping* ---- between levels, each level has a *margin*, within which the object ---- transitions gradually from invisible to visible using a dithering effect. ---- ---- You can also use this feature to replace multiple meshes with a single mesh ---- when the camera is distant. This is the reason for the term "*hierarchical* ---- level of detail". Reducing the number of meshes can be useful for reducing ---- drawcall count. Note that you must place the [`VisibilityRange`] component ---- on each entity you want to be part of a LOD group, as [`VisibilityRange`] ---- isn't automatically propagated down to children. ---- ---- A typical use of this feature might look like this: ---- ---- | Entity | `start_margin` | `end_margin` | ---- |-------------------------|----------------|--------------| ---- | Root | N/A | N/A | ---- | ├─ High-poly mesh | [0, 0) | [20, 25) | ---- | ├─ Low-poly mesh | [20, 25) | [70, 75) | ---- | └─ Billboard *imposter* | [70, 75) | [150, 160) | ---- ---- With this setup, the user will see a high-poly mesh when the camera is ---- closer than 20 units. As the camera zooms out, between 20 units to 25 units, ---- the high-poly mesh will gradually fade to a low-poly mesh. When the camera ---- is 70 to 75 units away, the low-poly mesh will fade to a single textured ---- quad. And between 150 and 160 units, the object fades away entirely. Note ---- that the `end_margin` of a higher LOD is always identical to the ---- `start_margin` of the next lower LOD; this is important for the crossfade ---- effect to function properly. ----@field start_margin ? Range ----@field end_margin ? Range ----@field use_aabb ? boolean -VisibilityRange = {} - - ----@class RenderLayers : ReflectReference ---- Describes which rendering layers an entity belongs to. ---- ---- Cameras with this component will only render entities with intersecting ---- layers. ---- ---- Entities may belong to one or more layers, or no layer at all. ---- ---- The [`Default`] instance of `RenderLayers` contains layer `0`, the first layer. ---- ---- An entity with this component without any layers is invisible. ---- ---- Entities without this component belong to layer `0`. ----@field [1] ? SmallVec -RenderLayers = {} - - ----@class Screenshot : ReflectReference ---- A component that signals to the renderer to capture a screenshot this frame. ---- ---- This component should be spawned on a new entity with an observer that will trigger ---- with [`ScreenshotCaptured`] when the screenshot is ready. ---- ---- Screenshots are captured asynchronously and may not be available immediately after the frame ---- that the component is spawned on. The observer should be used to handle the screenshot when it ---- is ready. ---- ---- Note that the screenshot entity will be despawned after the screenshot is captured and the ---- observer is triggered. ---- ---- # Usage ---- ---- ``` ---- # use bevy_ecs::prelude::*; ---- # use bevy_render::view::screenshot::{save_to_disk, Screenshot}; ---- ---- fn take_screenshot(mut commands: Commands) { ---- commands.spawn(Screenshot::primary_window()) ---- .observe(save_to_disk("screenshot.png")); ---- } ---- ``` ----@field [1] ? RenderTarget -Screenshot = {} - - ----@class ScreenshotCaptured : ReflectReference ----@field [1] ? Image -ScreenshotCaptured = {} - - ----@class ColorMaterial : ReflectReference ---- A [2d material](Material2d) that renders [2d meshes](crate::Mesh2d) with a texture tinted by a uniform color ----@field color ? Color ----@field alpha_mode ? AlphaMode2d ----@field uv_transform ? Affine2 ----@field texture ? Option -ColorMaterial = {} - - ----@class AlphaMode2d : ReflectReference ---- Sets how a 2d material's base color alpha channel is used for transparency. ---- Currently, this only works with [`Mesh2d`]. Sprites are always transparent. ---- ---- This is very similar to [`AlphaMode`](bevy_render::alpha::AlphaMode) but this only applies to 2d meshes. ---- We use a separate type because 2d doesn't support all the transparency modes that 3d does. -AlphaMode2d = {} - - ----@class Anchor : ReflectReference ---- How a sprite is positioned relative to its [`Transform`]. ---- It defaults to `Anchor::Center`. -Anchor = {} - - ----@class Sprite : ReflectReference ---- Describes a sprite to be rendered to a 2D camera ----@field image ? Handle ----@field texture_atlas ? Option ----@field color ? Color ----@field flip_x ? boolean ----@field flip_y ? boolean ----@field custom_size ? Option ----@field rect ? Option ----@field anchor ? Anchor ----@field image_mode ? SpriteImageMode -Sprite = {} - - ----@class SpriteImageMode : ReflectReference ---- Controls how the image is altered when scaled. -SpriteImageMode = {} - - ----@class BorderRect : ReflectReference ---- Defines the extents of the border of a rectangle. ---- ---- This struct is used to represent thickness or offsets from the edges ---- of a rectangle (left, right, top, and bottom), with values increasing inwards. ----@field left ? number ----@field right ? number ----@field top ? number ----@field bottom ? number -BorderRect = {} - - ----@class SliceScaleMode : ReflectReference ---- Defines how a texture slice scales when resized -SliceScaleMode = {} - - ----@class TextureSlicer : ReflectReference ---- Slices a texture using the **9-slicing** technique. This allows to reuse an image at various sizes ---- without needing to prepare multiple assets. The associated texture will be split into nine portions, ---- so that on resize the different portions scale or tile in different ways to keep the texture in proportion. ---- ---- For example, when resizing a 9-sliced texture the corners will remain unscaled while the other ---- sections will be scaled or tiled. ---- ---- See [9-sliced](https://en.wikipedia.org/wiki/9-slice_scaling) textures. ----@field border ? BorderRect ----@field center_scale_mode ? SliceScaleMode ----@field sides_scale_mode ? SliceScaleMode ----@field max_corner_scale ? number -TextureSlicer = {} - - ----@class ReflectableScheduleLabel : ReflectReference -ReflectableScheduleLabel = {} - - ----@class TextBounds : ReflectReference ---- The maximum width and height of text. The text will wrap according to the specified size. ---- ---- Characters out of the bounds after wrapping will be truncated. Text is aligned according to the ---- specified [`JustifyText`](crate::text::JustifyText). ---- ---- Note: only characters that are completely out of the bounds will be truncated, so this is not a ---- reliable limit if it is necessary to contain the text strictly in the bounds. Currently this ---- component is mainly useful for text wrapping only. ----@field width ? Option ----@field height ? Option -TextBounds = {} - - ----@class GlyphAtlasInfo : ReflectReference ---- Information about a glyph in an atlas. ---- ---- Rasterized glyphs are stored as rectangles ---- in one or more [`FontAtlas`](crate::FontAtlas)es. ---- ---- Used in [`PositionedGlyph`] and [`FontAtlasSet`](crate::FontAtlasSet). ----@field texture ? Handle ----@field texture_atlas ? Handle ----@field location ? GlyphAtlasLocation -GlyphAtlasInfo = {} - - ----@class GlyphAtlasLocation : ReflectReference ---- The location of a glyph in an atlas, ---- and how it should be positioned when placed. ---- ---- Used in [`GlyphAtlasInfo`] and [`FontAtlas`](crate::FontAtlas). ----@field glyph_index ? integer ----@field offset ? IVec2 -GlyphAtlasLocation = {} - - ----@class PositionedGlyph : ReflectReference ---- A glyph of a font, typically representing a single character, positioned in screen space. ---- ---- Contains information about how and where to render a glyph. ---- ---- Used in [`TextPipeline::queue_text`](crate::TextPipeline::queue_text) and [`crate::TextLayoutInfo`] for rendering glyphs. ----@field position ? Vec2 ----@field size ? Vec2 ----@field atlas_info ? GlyphAtlasInfo ----@field span_index ? integer ----@field line_index ? integer ----@field byte_index ? integer ----@field byte_length ? integer -PositionedGlyph = {} - - ----@class TextLayoutInfo : ReflectReference ---- Render information for a corresponding text block. ---- ---- Contains scaled glyphs and their size. Generated via [`TextPipeline::queue_text`] when an entity has ---- [`TextLayout`] and [`ComputedTextBlock`] components. ----@field glyphs ? Vec ----@field size ? Vec2 -TextLayoutInfo = {} - - ----@class Text2d : ReflectReference ---- The top-level 2D text component. ---- ---- Adding `Text2d` to an entity will pull in required components for setting up 2d text. ---- [Example usage.](https://github.com/bevyengine/bevy/blob/latest/examples/2d/text2d.rs) ---- ---- The string in this component is the first 'text span' in a hierarchy of text spans that are collected into ---- a [`ComputedTextBlock`]. See [`TextSpan`](crate::TextSpan) for the component used by children of entities with [`Text2d`]. ---- ---- With `Text2d` the `justify` field of [`TextLayout`] only affects the internal alignment of a block of text and not its ---- relative position, which is controlled by the [`Anchor`] component. ---- This means that for a block of text consisting of only one line that doesn't wrap, the `justify` field will have no effect. ---- ---- ---- ``` ---- # use bevy_asset::Handle; ---- # use bevy_color::Color; ---- # use bevy_color::palettes::basic::BLUE; ---- # use bevy_ecs::world::World; ---- # use bevy_text::{Font, JustifyText, Text2d, TextLayout, TextFont, TextColor, TextSpan}; ---- # ---- # let font_handle: Handle = Default::default(); ---- # let mut world = World::default(); ---- # ---- // Basic usage. ---- world.spawn(Text2d::new("hello world!")); ---- ---- // With non-default style. ---- world.spawn(( ---- Text2d::new("hello world!"), ---- TextFont { ---- font: font_handle.clone().into(), ---- font_size: 60.0, ---- ..Default::default() ---- }, ---- TextColor(BLUE.into()), ---- )); ---- ---- // With text justification. ---- world.spawn(( ---- Text2d::new("hello world\nand bevy!"), ---- TextLayout::new_with_justify(JustifyText::Center) ---- )); ---- ---- // With spans ---- world.spawn(Text2d::new("hello ")).with_children(|parent| { ---- parent.spawn(TextSpan::new("world")); ---- parent.spawn((TextSpan::new("!"), TextColor(BLUE.into()))); ---- }); ---- ``` ----@field [1] ? string -Text2d = {} - - ----@class ComputedTextBlock : ReflectReference ---- Computed information for a text block. ---- ---- See [`TextLayout`]. ---- ---- Automatically updated by 2d and UI text systems. ----@field entities ? SmallVec ----@field needs_rerender ? boolean -ComputedTextBlock = {} - - ----@class FontSmoothing : ReflectReference ---- Determines which antialiasing method to use when rendering text. By default, text is ---- rendered with grayscale antialiasing, but this can be changed to achieve a pixelated look. ---- ---- **Note:** Subpixel antialiasing is not currently supported. -FontSmoothing = {} - - ----@class JustifyText : ReflectReference ---- Describes the horizontal alignment of multiple lines of text relative to each other. ---- ---- This only affects the internal positioning of the lines of text within a text entity and ---- does not affect the text entity's position. ---- ---- _Has no affect on a single line text entity_, unless used together with a ---- [`TextBounds`](super::bounds::TextBounds) component with an explicit `width` value. -JustifyText = {} - - ----@class LineBreak : ReflectReference ---- Determines how lines will be broken when preventing text from running out of bounds. -LineBreak = {} - - ----@class LineHeight : ReflectReference ---- Specifies the height of each line of text for `Text` and `Text2d` ---- ---- Default is 1.2x the font size -LineHeight = {} - - ----@class TextColor : ReflectReference ---- The color of the text for this section. ----@field [1] ? Color -TextColor = {} - - ----@class TextEntity : ReflectReference ---- A sub-entity of a [`ComputedTextBlock`]. ---- ---- Returned by [`ComputedTextBlock::entities`]. ----@field entity ? Entity ----@field depth ? integer -TextEntity = {} - - ----@class TextFont : ReflectReference ---- `TextFont` determines the style of a text span within a [`ComputedTextBlock`], specifically ---- the font face, the font size, and the color. ----@field font ? bevy_asset::handle::Handle ----@field font_size ? number ----@field line_height ? LineHeight ----@field font_smoothing ? FontSmoothing -TextFont = {} - - ----@class TextLayout : ReflectReference ---- Component with text format settings for a block of text. ---- ---- A block of text is composed of text spans, which each have a separate string value and [`TextFont`]. Text ---- spans associated with a text block are collected into [`ComputedTextBlock`] for layout, and then inserted ---- to [`TextLayoutInfo`] for rendering. ---- ---- See [`Text2d`](crate::Text2d) for the core component of 2d text, and `Text` in `bevy_ui` for UI text. ----@field justify ? JustifyText ----@field linebreak ? LineBreak -TextLayout = {} - - ----@class TextSpan : ReflectReference ---- A span of text in a tree of spans. ---- ---- `TextSpan` is only valid as a child of an entity with [`TextLayout`], which is provided by `Text` ---- for text in `bevy_ui` or `Text2d` for text in 2d world-space. ---- ---- Spans are collected in hierarchy traversal order into a [`ComputedTextBlock`] for layout. ---- ---- ``` ---- # use bevy_asset::Handle; ---- # use bevy_color::Color; ---- # use bevy_color::palettes::basic::{RED, BLUE}; ---- # use bevy_ecs::world::World; ---- # use bevy_text::{Font, TextLayout, TextFont, TextSpan, TextColor}; ---- ---- # let font_handle: Handle = Default::default(); ---- # let mut world = World::default(); ---- # ---- world.spawn(( ---- // `Text` or `Text2d` are needed, and will provide default instances ---- // of the following components. ---- TextLayout::default(), ---- TextFont { ---- font: font_handle.clone().into(), ---- font_size: 60.0, ---- ..Default::default() ---- }, ---- TextColor(BLUE.into()), ---- )) ---- .with_child(( ---- // Children must be `TextSpan`, not `Text` or `Text2d`. ---- TextSpan::new("Hello!"), ---- TextFont { ---- font: font_handle.into(), ---- font_size: 60.0, ---- ..Default::default() ---- }, ---- TextColor(RED.into()), ---- )); ---- ``` ----@field [1] ? string -TextSpan = {} - - ----@class UiScale : ReflectReference ---- The current scale of the UI. ---- ---- A multiplier to fixed-sized ui values. ---- **Note:** This will only affect fixed ui values like [`Val::Px`] ----@field [1] ? number -UiScale = {} - - ----@class FocusPolicy : ReflectReference ---- Describes whether the node should block interactions with lower nodes -FocusPolicy = {} - - ----@class Interaction : ReflectReference ---- Describes what type of input interaction has occurred for a UI node. ---- ---- This is commonly queried with a `Changed` filter. ---- ---- Updated in [`ui_focus_system`]. ---- ---- If a UI node has both [`Interaction`] and [`InheritedVisibility`] components, ---- [`Interaction`] will always be [`Interaction::None`] ---- when [`InheritedVisibility::get()`] is false. ---- This ensures that hidden UI nodes are not interactable, ---- and do not end up stuck in an active state if hidden at the wrong time. ---- ---- Note that you can also control the visibility of a node using the [`Display`](crate::ui_node::Display) property, ---- which fully collapses it during layout calculations. ---- ---- # See also ---- ---- - [`Button`](crate::widget::Button) which requires this component ---- - [`RelativeCursorPosition`] to obtain the position of the cursor relative to current node -Interaction = {} - - ----@class RelativeCursorPosition : ReflectReference ---- A component storing the position of the mouse relative to the node, (0., 0.) being the top-left corner and (1., 1.) being the bottom-right ---- If the mouse is not over the node, the value will go beyond the range of (0., 0.) to (1., 1.) ---- ---- It can be used alongside [`Interaction`] to get the position of the press. ---- ---- The component is updated when it is in the same entity with [`Node`](crate::Node). ----@field normalized_visible_node_rect ? Rect ----@field normalized ? Option -RelativeCursorPosition = {} - - ----@class UiRect : ReflectReference ---- A type which is commonly used to define margins, paddings and borders. ---- ---- # Examples ---- ---- ## Margin ---- ---- A margin is used to create space around UI elements, outside of any defined borders. ---- ---- ``` ---- # use bevy_ui::{UiRect, Val}; ---- # ---- let margin = UiRect::all(Val::Auto); // Centers the UI element ---- ``` ---- ---- ## Padding ---- ---- A padding is used to create space around UI elements, inside of any defined borders. ---- ---- ``` ---- # use bevy_ui::{UiRect, Val}; ---- # ---- let padding = UiRect { ---- left: Val::Px(10.0), ---- right: Val::Px(20.0), ---- top: Val::Px(30.0), ---- bottom: Val::Px(40.0), ---- }; ---- ``` ---- ---- ## Borders ---- ---- A border is used to define the width of the border of a UI element. ---- ---- ``` ---- # use bevy_ui::{UiRect, Val}; ---- # ---- let border = UiRect { ---- left: Val::Px(10.0), ---- right: Val::Px(20.0), ---- top: Val::Px(30.0), ---- bottom: Val::Px(40.0), ---- }; ---- ``` ----@field left ? Val ----@field right ? Val ----@field top ? Val ----@field bottom ? Val -UiRect = {} - - ----@class Val : ReflectReference ---- Represents the possible value types for layout properties. ---- ---- This enum allows specifying values for various [`Node`](crate::Node) properties in different units, ---- such as logical pixels, percentages, or automatically determined values. ---- ---- `Val` also implements [`core::str::FromStr`] to allow parsing values from strings in the format `#.#px`. Whitespaces between the value and unit is allowed. The following units are supported: ---- * `px`: logical pixels ---- * `%`: percentage ---- * `vw`: percentage of the viewport width ---- * `vh`: percentage of the viewport height ---- * `vmin`: percentage of the viewport's smaller dimension ---- * `vmax`: percentage of the viewport's larger dimension ---- ---- Additionally, `auto` will be parsed as [`Val::Auto`]. -Val = {} - - ----@class ContentSize : ReflectReference ---- A node with a `ContentSize` component is a node where its size ---- is based on its content. -ContentSize = {} - - ----@class AlignContent : ReflectReference ---- Used to control how items are distributed. ---- - For Flexbox containers, controls alignment of lines if `flex_wrap` is set to [`FlexWrap::Wrap`] and there are multiple lines of items. ---- - For CSS Grid containers, controls alignment of grid rows. ---- ---- -AlignContent = {} - - ----@class AlignItems : ReflectReference ---- Used to control how each individual item is aligned by default within the space they're given. ---- - For Flexbox containers, sets default cross axis alignment of the child items. ---- - For CSS Grid containers, controls block (vertical) axis alignment of children of this grid container within their grid areas. ---- ---- -AlignItems = {} - - ----@class AlignSelf : ReflectReference ---- Used to control how the specified item is aligned within the space it's given. ---- - For Flexbox items, controls cross axis alignment of the item. ---- - For CSS Grid items, controls block (vertical) axis alignment of a grid item within its grid area. ---- ---- -AlignSelf = {} - - ----@class BackgroundColor : ReflectReference ---- The background color of the node ---- ---- This serves as the "fill" color. ----@field [1] ? Color -BackgroundColor = {} - - ----@class BorderColor : ReflectReference ---- The border color of the UI node. ----@field [1] ? Color -BorderColor = {} - - ----@class BorderRadius : ReflectReference ---- Used to add rounded corners to a UI node. You can set a UI node to have uniformly ---- rounded corners or specify different radii for each corner. If a given radius exceeds half ---- the length of the smallest dimension between the node's height or width, the radius will ---- calculated as half the smallest dimension. ---- ---- Elliptical nodes are not supported yet. Percentage values are based on the node's smallest ---- dimension, either width or height. ---- ---- # Example ---- ```rust ---- # use bevy_ecs::prelude::*; ---- # use bevy_ui::prelude::*; ---- # use bevy_color::palettes::basic::{BLUE}; ---- fn setup_ui(mut commands: Commands) { ---- commands.spawn(( ---- Node { ---- width: Val::Px(100.), ---- height: Val::Px(100.), ---- border: UiRect::all(Val::Px(2.)), ---- ..Default::default() ---- }, ---- BackgroundColor(BLUE.into()), ---- BorderRadius::new( ---- // top left ---- Val::Px(10.), ---- // top right ---- Val::Px(20.), ---- // bottom right ---- Val::Px(30.), ---- // bottom left ---- Val::Px(40.), ---- ), ---- )); ---- } ---- ``` ---- ---- ----@field top_left ? Val ----@field top_right ? Val ----@field bottom_left ? Val ----@field bottom_right ? Val -BorderRadius = {} - - ----@class BoxShadow : ReflectReference ---- List of shadows to draw for a [`Node`]. ---- ---- Draw order is determined implicitly from the vector of [`ShadowStyle`]s, back-to-front. ----@field [1] ? Vec -BoxShadow = {} - - ----@class BoxShadowSamples : ReflectReference ---- Number of shadow samples. ---- A larger value will result in higher quality shadows. ---- Default is 4, values higher than ~10 offer diminishing returns. ---- ---- ``` ---- use bevy_core_pipeline::prelude::*; ---- use bevy_ecs::prelude::*; ---- use bevy_ui::prelude::*; ---- ---- fn spawn_camera(mut commands: Commands) { ---- commands.spawn(( ---- Camera2d, ---- BoxShadowSamples(6), ---- )); ---- } ---- ``` ----@field [1] ? integer -BoxShadowSamples = {} - - ----@class BoxSizing : ReflectReference ---- Which part of a Node's box length styles like width and height control ---- ---- See: -BoxSizing = {} - - ----@class CalculatedClip : ReflectReference ---- The calculated clip of the node ----@field clip ? Rect -CalculatedClip = {} - - ----@class ComputedNode : ReflectReference ---- Provides the computed size and layout properties of the node. ---- ---- Fields in this struct are public but should not be modified under most circumstances. ---- For example, in a scrollbar you may want to derive the handle's size from the proportion of ---- scrollable content in-view. You can directly modify `ComputedNode` after layout to set the ---- handle size without any delays. ----@field stack_index ? integer ----@field size ? Vec2 ----@field content_size ? Vec2 ----@field outline_width ? number ----@field outline_offset ? number ----@field unrounded_size ? Vec2 ----@field border ? BorderRect ----@field border_radius ? ResolvedBorderRadius ----@field padding ? BorderRect ----@field inverse_scale_factor ? number -ComputedNode = {} - - ----@class ComputedNodeTarget : ReflectReference ---- Derived information about the camera target for this UI node. ----@field camera ? Entity ----@field scale_factor ? number ----@field physical_size ? UVec2 -ComputedNodeTarget = {} - - ----@class Display : ReflectReference ---- Defines the layout model used by this node. ---- ---- Part of the [`Node`] component. -Display = {} - - ----@class FlexDirection : ReflectReference ---- Defines how flexbox items are ordered within a flexbox -FlexDirection = {} - - ----@class FlexWrap : ReflectReference ---- Defines if flexbox items appear on a single line or on multiple lines -FlexWrap = {} - - ----@class GridAutoFlow : ReflectReference ---- Controls whether grid items are placed row-wise or column-wise as well as whether the sparse or dense packing algorithm is used. ---- ---- The "dense" packing algorithm attempts to fill in holes earlier in the grid, if smaller items come up later. ---- This may cause items to appear out-of-order when doing so would fill in holes left by larger items. ---- ---- Defaults to [`GridAutoFlow::Row`]. ---- ---- -GridAutoFlow = {} - - ----@class GridPlacement : ReflectReference ---- Represents the position of a grid item in a single axis. ---- ---- There are 3 fields which may be set: ---- - `start`: which grid line the item should start at ---- - `end`: which grid line the item should end at ---- - `span`: how many tracks the item should span ---- ---- The default `span` is 1. If neither `start` or `end` is set then the item will be placed automatically. ---- ---- Generally, at most two fields should be set. If all three fields are specified then `span` will be ignored. If `end` specifies an earlier ---- grid line than `start` then `end` will be ignored and the item will have a span of 1. ---- ---- ----@field start ? Option ----@field span ? Option ----@field end ? Option -GridPlacement = {} - - ----@class GridTrack : ReflectReference ---- A [`GridTrack`] is a Row or Column of a CSS Grid. This struct specifies what size the track should be. ---- See below for the different "track sizing functions" you can specify. ----@field min_sizing_function ? MinTrackSizingFunction ----@field max_sizing_function ? MaxTrackSizingFunction -GridTrack = {} - - ----@class GridTrackRepetition : ReflectReference ---- How many times to repeat a repeated grid track ---- ---- -GridTrackRepetition = {} - - ----@class JustifyContent : ReflectReference ---- Used to control how items are distributed. ---- - For Flexbox containers, controls alignment of items in the main axis. ---- - For CSS Grid containers, controls alignment of grid columns. ---- ---- -JustifyContent = {} - - ----@class JustifyItems : ReflectReference ---- Used to control how each individual item is aligned by default within the space they're given. ---- - For Flexbox containers, this property has no effect. See `justify_content` for main axis alignment of flex items. ---- - For CSS Grid containers, sets default inline (horizontal) axis alignment of child items within their grid areas. ---- ---- -JustifyItems = {} - - ----@class JustifySelf : ReflectReference ---- Used to control how the specified item is aligned within the space it's given. ---- - For Flexbox items, this property has no effect. See `justify_content` for main axis alignment of flex items. ---- - For CSS Grid items, controls inline (horizontal) axis alignment of a grid item within its grid area. ---- ---- -JustifySelf = {} - - ----@class MaxTrackSizingFunction : ReflectReference -MaxTrackSizingFunction = {} - - ----@class MinTrackSizingFunction : ReflectReference -MinTrackSizingFunction = {} - - ----@class Node : ReflectReference ---- The base component for UI entities. It describes UI layout and style properties. ---- ---- When defining new types of UI entities, require [`Node`] to make them behave like UI nodes. ---- ---- Nodes can be laid out using either Flexbox or CSS Grid Layout. ---- ---- See below for general learning resources and for documentation on the individual style properties. ---- ---- ### Flexbox ---- ---- - [MDN: Basic Concepts of Flexbox](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox) ---- - [A Complete Guide To Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) by CSS Tricks. This is detailed guide with illustrations and comprehensive written explanation of the different Flexbox properties and how they work. ---- - [Flexbox Froggy](https://flexboxfroggy.com/). An interactive tutorial/game that teaches the essential parts of Flexbox in a fun engaging way. ---- ---- ### CSS Grid ---- ---- - [MDN: Basic Concepts of Grid Layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout) ---- - [A Complete Guide To CSS Grid](https://css-tricks.com/snippets/css/complete-guide-grid/) by CSS Tricks. This is detailed guide with illustrations and comprehensive written explanation of the different CSS Grid properties and how they work. ---- - [CSS Grid Garden](https://cssgridgarden.com/). An interactive tutorial/game that teaches the essential parts of CSS Grid in a fun engaging way. ---- ---- # See also ---- ---- - [`RelativeCursorPosition`](crate::RelativeCursorPosition) to obtain the cursor position relative to this node ---- - [`Interaction`](crate::Interaction) to obtain the interaction state of this node ----@field display ? Display ----@field box_sizing ? BoxSizing ----@field position_type ? PositionType ----@field overflow ? Overflow ----@field overflow_clip_margin ? OverflowClipMargin ----@field left ? Val ----@field right ? Val ----@field top ? Val ----@field bottom ? Val ----@field width ? Val ----@field height ? Val ----@field min_width ? Val ----@field min_height ? Val ----@field max_width ? Val ----@field max_height ? Val ----@field aspect_ratio ? Option ----@field align_items ? AlignItems ----@field justify_items ? JustifyItems ----@field align_self ? AlignSelf ----@field justify_self ? JustifySelf ----@field align_content ? AlignContent ----@field justify_content ? JustifyContent ----@field margin ? UiRect ----@field padding ? UiRect ----@field border ? UiRect ----@field flex_direction ? FlexDirection ----@field flex_wrap ? FlexWrap ----@field flex_grow ? number ----@field flex_shrink ? number ----@field flex_basis ? Val ----@field row_gap ? Val ----@field column_gap ? Val ----@field grid_auto_flow ? GridAutoFlow ----@field grid_template_rows ? Vec ----@field grid_template_columns ? Vec ----@field grid_auto_rows ? Vec ----@field grid_auto_columns ? Vec ----@field grid_row ? GridPlacement ----@field grid_column ? GridPlacement -Node = {} - - ----@class Outline : ReflectReference ---- The [`Outline`] component adds an outline outside the edge of a UI node. ---- Outlines do not take up space in the layout. ---- ---- To add an [`Outline`] to a ui node you can spawn a `(Node, Outline)` tuple bundle: ---- ``` ---- # use bevy_ecs::prelude::*; ---- # use bevy_ui::prelude::*; ---- # use bevy_color::palettes::basic::{RED, BLUE}; ---- fn setup_ui(mut commands: Commands) { ---- commands.spawn(( ---- Node { ---- width: Val::Px(100.), ---- height: Val::Px(100.), ---- ..Default::default() ---- }, ---- BackgroundColor(BLUE.into()), ---- Outline::new(Val::Px(10.), Val::ZERO, RED.into()) ---- )); ---- } ---- ``` ---- ---- [`Outline`] components can also be added later to existing UI nodes: ---- ``` ---- # use bevy_ecs::prelude::*; ---- # use bevy_ui::prelude::*; ---- # use bevy_color::Color; ---- fn outline_hovered_button_system( ---- mut commands: Commands, ---- mut node_query: Query<(Entity, &Interaction, Option<&mut Outline>), Changed>, ---- ) { ---- for (entity, interaction, mut maybe_outline) in node_query.iter_mut() { ---- let outline_color = ---- if matches!(*interaction, Interaction::Hovered) { ---- Color::WHITE ---- } else { ---- Color::NONE ---- }; ---- if let Some(mut outline) = maybe_outline { ---- outline.color = outline_color; ---- } else { ---- commands.entity(entity).insert(Outline::new(Val::Px(10.), Val::ZERO, outline_color)); ---- } ---- } ---- } ---- ``` ---- Inserting and removing an [`Outline`] component repeatedly will result in table moves, so it is generally preferable to ---- set `Outline::color` to [`Color::NONE`] to hide an outline. ----@field width ? Val ----@field offset ? Val ----@field color ? Color -Outline = {} - - ----@class Overflow : ReflectReference ---- Whether to show or hide overflowing items ----@field x ? OverflowAxis ----@field y ? OverflowAxis -Overflow = {} - - ----@class OverflowAxis : ReflectReference ---- Whether to show or hide overflowing items -OverflowAxis = {} - - ----@class OverflowClipBox : ReflectReference ---- Used to determine the bounds of the visible area when a UI node is clipped. -OverflowClipBox = {} - - ----@class OverflowClipMargin : ReflectReference ---- The bounds of the visible area when a UI node is clipped. ----@field visual_box ? OverflowClipBox ----@field margin ? number -OverflowClipMargin = {} - - ----@class PositionType : ReflectReference ---- The strategy used to position this node -PositionType = {} - - ----@class RepeatedGridTrack : ReflectReference ---- Represents a *possibly* repeated [`GridTrack`]. ---- ---- The repetition parameter can either be: ---- - The integer `1`, in which case the track is non-repeated. ---- - a `u16` count to repeat the track N times. ---- - A `GridTrackRepetition::AutoFit` or `GridTrackRepetition::AutoFill`. ---- ---- Note: that in the common case you want a non-repeating track (repetition count 1), you may use the constructor methods on [`GridTrack`] ---- to create a `RepeatedGridTrack`. i.e. `GridTrack::px(10.0)` is equivalent to `RepeatedGridTrack::px(1, 10.0)`. ---- ---- You may only use one auto-repetition per track list. And if your track list contains an auto repetition ---- then all tracks (in and outside of the repetition) must be fixed size (px or percent). Integer repetitions are just shorthand for writing out ---- N tracks longhand and are not subject to the same limitations. ----@field repetition ? GridTrackRepetition ----@field tracks ? SmallVec -RepeatedGridTrack = {} - - ----@class ResolvedBorderRadius : ReflectReference ---- Represents the resolved border radius values for a UI node. ---- ---- The values are in physical pixels. ----@field top_left ? number ----@field top_right ? number ----@field bottom_left ? number ----@field bottom_right ? number -ResolvedBorderRadius = {} - - ----@class ScrollPosition : ReflectReference ---- The scroll position of the node. ---- ---- Updating the values of `ScrollPosition` will reposition the children of the node by the offset amount. ---- `ScrollPosition` may be updated by the layout system when a layout change makes a previously valid `ScrollPosition` invalid. ---- Changing this does nothing on a `Node` without setting at least one `OverflowAxis` to `OverflowAxis::Scroll`. ----@field offset_x ? number ----@field offset_y ? number -ScrollPosition = {} - - ----@class ShadowStyle : ReflectReference ----@field color ? Color ----@field x_offset ? Val ----@field y_offset ? Val ----@field spread_radius ? Val ----@field blur_radius ? Val -ShadowStyle = {} - - ----@class TextShadow : ReflectReference ---- Adds a shadow behind text ----@field offset ? Vec2 ----@field color ? Color -TextShadow = {} - - ----@class UiAntiAlias : ReflectReference ---- Marker for controlling whether Ui is rendered with or without anti-aliasing ---- in a camera. By default, Ui is always anti-aliased. ---- ---- **Note:** This does not affect text anti-aliasing. For that, use the `font_smoothing` property of the [`TextFont`](bevy_text::TextFont) component. ---- ---- ``` ---- use bevy_core_pipeline::prelude::*; ---- use bevy_ecs::prelude::*; ---- use bevy_ui::prelude::*; ---- ---- fn spawn_camera(mut commands: Commands) { ---- commands.spawn(( ---- Camera2d, ---- // This will cause all Ui in this camera to be rendered without ---- // anti-aliasing ---- UiAntiAlias::Off, ---- )); ---- } ---- ``` -UiAntiAlias = {} - - ----@class UiTargetCamera : ReflectReference ---- Indicates that this root [`Node`] entity should be rendered to a specific camera. ---- ---- UI then will be laid out respecting the camera's viewport and scale factor, and ---- rendered to this camera's [`bevy_render::camera::RenderTarget`]. ---- ---- Setting this component on a non-root node will have no effect. It will be overridden ---- by the root node's component. ---- ---- Root node's without an explicit [`UiTargetCamera`] will be rendered to the default UI camera, ---- which is either a single camera with the [`IsDefaultUiCamera`] marker component or the highest ---- order camera targeting the primary window. ----@field [1] ? Entity -UiTargetCamera = {} - - ----@class ZIndex : ReflectReference ---- Indicates that this [`Node`] entity's front-to-back ordering is not controlled solely ---- by its location in the UI hierarchy. A node with a higher z-index will appear on top ---- of sibling nodes with a lower z-index. ---- ---- UI nodes that have the same z-index will appear according to the order in which they ---- appear in the UI hierarchy. In such a case, the last node to be added to its parent ---- will appear in front of its siblings. ---- ---- Nodes without this component will be treated as if they had a value of [`ZIndex(0)`]. ---- ---- Use [`GlobalZIndex`] if you need to order separate UI hierarchies or nodes that are ---- not siblings in a given UI hierarchy. ----@field [1] ? integer -ZIndex = {} - - ----@class Button : ReflectReference ---- Marker struct for buttons -Button = {} - - ----@class ImageNode : ReflectReference ---- A UI Node that renders an image. ----@field color ? Color ----@field image ? Handle ----@field texture_atlas ? Option ----@field flip_x ? boolean ----@field flip_y ? boolean ----@field rect ? Option ----@field image_mode ? NodeImageMode -ImageNode = {} - - ----@class ImageNodeSize : ReflectReference ---- The size of the image's texture ---- ---- This component is updated automatically by [`update_image_content_size_system`] ----@field size ? UVec2 -ImageNodeSize = {} - - ----@class NodeImageMode : ReflectReference ---- Controls how the image is altered to fit within the layout and how the layout algorithm determines the space in the layout for the image -NodeImageMode = {} - - ----@class Label : ReflectReference ---- Marker struct for labels -Label = {} - - ----@class Text : ReflectReference ---- The top-level UI text component. ---- ---- Adding [`Text`] to an entity will pull in required components for setting up a UI text node. ---- ---- The string in this component is the first 'text span' in a hierarchy of text spans that are collected into ---- a [`ComputedTextBlock`]. See [`TextSpan`](bevy_text::TextSpan) for the component used by children of entities with [`Text`]. ---- ---- Note that [`Transform`](bevy_transform::components::Transform) on this entity is managed automatically by the UI layout system. ---- ---- ---- ``` ---- # use bevy_asset::Handle; ---- # use bevy_color::Color; ---- # use bevy_color::palettes::basic::BLUE; ---- # use bevy_ecs::world::World; ---- # use bevy_text::{Font, JustifyText, TextLayout, TextFont, TextColor, TextSpan}; ---- # use bevy_ui::prelude::Text; ---- # ---- # let font_handle: Handle = Default::default(); ---- # let mut world = World::default(); ---- # ---- // Basic usage. ---- world.spawn(Text::new("hello world!")); ---- ---- // With non-default style. ---- world.spawn(( ---- Text::new("hello world!"), ---- TextFont { ---- font: font_handle.clone().into(), ---- font_size: 60.0, ---- ..Default::default() ---- }, ---- TextColor(BLUE.into()), ---- )); ---- ---- // With text justification. ---- world.spawn(( ---- Text::new("hello world\nand bevy!"), ---- TextLayout::new_with_justify(JustifyText::Center) ---- )); ---- ---- // With spans ---- world.spawn(Text::new("hello ")).with_children(|parent| { ---- parent.spawn(TextSpan::new("world")); ---- parent.spawn((TextSpan::new("!"), TextColor(BLUE.into()))); ---- }); ---- ``` ----@field [1] ? string -Text = {} - - ----@class TextNodeFlags : ReflectReference ---- UI text system flags. ---- ---- Used internally by [`measure_text_system`] and [`text_system`] to schedule text for processing. ----@field needs_measure_fn ? boolean ----@field needs_recompute ? boolean -TextNodeFlags = {} - - ----@class AppLifecycle : ReflectReference ---- Application lifetime events -AppLifecycle = {} - - ----@class CursorEntered : ReflectReference ---- An event that is sent whenever the user's cursor enters a window. ----@field window ? Entity -CursorEntered = {} - - ----@class CursorLeft : ReflectReference ---- An event that is sent whenever the user's cursor leaves a window. ----@field window ? Entity -CursorLeft = {} - - ----@class CursorMoved : ReflectReference ---- An event reporting that the mouse cursor has moved inside a window. ---- ---- The event is sent only if the cursor is over one of the application's windows. ---- It is the translated version of [`WindowEvent::CursorMoved`] from the `winit` crate with the addition of `delta`. ---- ---- Not to be confused with the `MouseMotion` event from `bevy_input`. ---- ---- Because the range of data is limited by the window area and it may have been transformed by the OS to implement certain effects like acceleration, ---- you should not use it for non-cursor-like behavior such as 3D camera control. Please see `MouseMotion` instead. ---- ---- [`WindowEvent::CursorMoved`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.CursorMoved ----@field window ? Entity ----@field position ? Vec2 ----@field delta ? Option -CursorMoved = {} - - ----@class FileDragAndDrop : ReflectReference ---- Events related to files being dragged and dropped on a window. -FileDragAndDrop = {} - - ----@class Ime : ReflectReference ---- An Input Method Editor event. ---- ---- This event is the translated version of the `WindowEvent::Ime` from the `winit` crate. ---- ---- It is only sent if IME was enabled on the window with [`Window::ime_enabled`](crate::window::Window::ime_enabled). -Ime = {} - - ----@class RequestRedraw : ReflectReference ---- An event that indicates all of the application's windows should be redrawn, ---- even if their control flow is set to `Wait` and there have been no window events. -RequestRedraw = {} - - ----@class WindowBackendScaleFactorChanged : ReflectReference ---- An event that indicates a window's OS-reported scale factor has changed. ----@field window ? Entity ----@field scale_factor ? number -WindowBackendScaleFactorChanged = {} - - ----@class WindowCloseRequested : ReflectReference ---- An event that is sent whenever the operating systems requests that a window ---- be closed. This will be sent when the close button of the window is pressed. ---- ---- If the default [`WindowPlugin`] is used, these events are handled ---- by closing the corresponding [`Window`]. ---- To disable this behavior, set `close_when_requested` on the [`WindowPlugin`] ---- to `false`. ---- ---- [`WindowPlugin`]: crate::WindowPlugin ---- [`Window`]: crate::Window ----@field window ? Entity -WindowCloseRequested = {} - - ----@class WindowClosed : ReflectReference ---- An event that is sent whenever a window is closed. This will be sent when ---- the window entity loses its [`Window`](crate::window::Window) component or is despawned. ----@field window ? Entity -WindowClosed = {} - - ----@class WindowClosing : ReflectReference ---- An event that is sent whenever a window is closing. This will be sent when ---- after a [`WindowCloseRequested`] event is received and the window is in the process of closing. ----@field window ? Entity -WindowClosing = {} - - ----@class WindowCreated : ReflectReference ---- An event that is sent whenever a new window is created. ---- ---- To create a new window, spawn an entity with a [`crate::Window`] on it. ----@field window ? Entity -WindowCreated = {} - - ----@class WindowDestroyed : ReflectReference ---- An event that is sent whenever a window is destroyed by the underlying window system. ---- ---- Note that if your application only has a single window, this event may be your last chance to ---- persist state before the application terminates. ----@field window ? Entity -WindowDestroyed = {} - - ----@class WindowEvent : ReflectReference ---- Wraps all `bevy_window` and `bevy_input` events in a common enum. ---- ---- Read these events with `EventReader` if you need to ---- access window events in the order they were received from the ---- operating system. Otherwise, the event types are individually ---- readable with `EventReader` (e.g. `EventReader`). -WindowEvent = {} - - ----@class WindowFocused : ReflectReference ---- An event that indicates a window has received or lost focus. ----@field window ? Entity ----@field focused ? boolean -WindowFocused = {} - - ----@class WindowMoved : ReflectReference ---- An event that is sent when a window is repositioned in physical pixels. ----@field window ? Entity ----@field position ? IVec2 -WindowMoved = {} - - ----@class WindowOccluded : ReflectReference ---- The window has been occluded (completely hidden from view). ---- ---- This is different to window visibility as it depends on ---- whether the window is closed, minimized, set invisible, ---- or fully occluded by another window. ---- ---- It is the translated version of [`WindowEvent::Occluded`] from the `winit` crate. ---- ---- [`WindowEvent::Occluded`]: https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.Occluded ----@field window ? Entity ----@field occluded ? boolean -WindowOccluded = {} - - ----@class WindowResized : ReflectReference ---- A window event that is sent whenever a window's logical size has changed. ----@field window ? Entity ----@field width ? number ----@field height ? number -WindowResized = {} - - ----@class WindowScaleFactorChanged : ReflectReference ---- An event that indicates a window's scale factor has changed. ----@field window ? Entity ----@field scale_factor ? number -WindowScaleFactorChanged = {} - - ----@class WindowThemeChanged : ReflectReference ---- An event sent when the system theme changes for a window. ---- ---- This event is only sent when the window is relying on the system theme to control its appearance. ---- i.e. It is only sent when [`Window::window_theme`](crate::window::Window::window_theme) is `None` and the system theme changes. ----@field window ? Entity ----@field theme ? WindowTheme -WindowThemeChanged = {} - - ----@class Monitor : ReflectReference ---- Represents an available monitor as reported by the user's operating system, which can be used ---- to query information about the display, such as its size, position, and video modes. ---- ---- Each monitor corresponds to an entity and can be used to position a monitor using ---- [`crate::window::MonitorSelection::Entity`]. ---- ---- # Warning ---- ---- This component is synchronized with `winit` through `bevy_winit`, but is effectively ---- read-only as `winit` does not support changing monitor properties. ----@field name ? Option ----@field physical_height ? integer ----@field physical_width ? integer ----@field physical_position ? IVec2 ----@field refresh_rate_millihertz ? Option ----@field scale_factor ? number ----@field video_modes ? Vec -Monitor = {} - - ----@class VideoMode : ReflectReference ---- Represents a video mode that a monitor supports ----@field physical_size ? UVec2 ----@field bit_depth ? integer ----@field refresh_rate_millihertz ? integer -VideoMode = {} - - ----@class SystemCursorIcon : ReflectReference ---- The icon to display for a window. ---- ---- Examples of all of these cursors can be found [here](https://www.w3schools.com/cssref/playit.php?filename=playcss_cursor&preval=crosshair). ---- This `enum` is simply a copy of a similar `enum` found in [`winit`](https://docs.rs/winit/latest/winit/window/enum.CursorIcon.html). ---- `winit`, in turn, is based upon the [CSS3 UI spec](https://www.w3.org/TR/css-ui-3/#cursor). ---- ---- See the [`window_settings`] example for usage. ---- ---- [`window_settings`]: https://github.com/bevyengine/bevy/blob/latest/examples/window/window_settings.rs -SystemCursorIcon = {} - - ----@class CompositeAlphaMode : ReflectReference ---- Specifies how the alpha channel of the textures should be handled during compositing, for a [`Window`]. -CompositeAlphaMode = {} - - ----@class CursorGrabMode : ReflectReference ---- Defines if and how the cursor is grabbed by a [`Window`]. ---- ---- ## Platform-specific ---- ---- - **`Windows`** doesn't support [`CursorGrabMode::Locked`] ---- - **`macOS`** doesn't support [`CursorGrabMode::Confined`] ---- - **`iOS/Android`** don't have cursors. ---- ---- Since `Windows` and `macOS` have different [`CursorGrabMode`] support, we first try to set the grab mode that was asked for. If it doesn't work then use the alternate grab mode. -CursorGrabMode = {} - - ----@class CursorOptions : ReflectReference ---- Cursor data for a [`Window`]. ----@field visible ? boolean ----@field grab_mode ? CursorGrabMode ----@field hit_test ? boolean -CursorOptions = {} - - ----@class EnabledButtons : ReflectReference ---- Specifies which [`Window`] control buttons should be enabled. ---- ---- ## Platform-specific ---- ---- **`iOS`**, **`Android`**, and the **`Web`** do not have window control buttons. ---- ---- On some **`Linux`** environments these values have no effect. ----@field minimize ? boolean ----@field maximize ? boolean ----@field close ? boolean -EnabledButtons = {} - - ----@class InternalWindowState : ReflectReference ---- Stores internal [`Window`] state that isn't directly accessible. ----@field minimize_request ? Option ----@field maximize_request ? Option ----@field drag_move_request ? boolean ----@field drag_resize_request ? Option ----@field physical_cursor_position ? Option -InternalWindowState = {} - - ----@class MonitorSelection : ReflectReference ---- References a screen monitor. ---- ---- Used when centering a [`Window`] on a monitor. -MonitorSelection = {} - - ----@class PresentMode : ReflectReference ---- Presentation mode for a [`Window`]. ---- ---- The presentation mode specifies when a frame is presented to the window. The [`Fifo`] ---- option corresponds to a traditional `VSync`, where the framerate is capped by the ---- display refresh rate. Both [`Immediate`] and [`Mailbox`] are low-latency and are not ---- capped by the refresh rate, but may not be available on all platforms. Tearing ---- may be observed with [`Immediate`] mode, but will not be observed with [`Mailbox`] or ---- [`Fifo`]. ---- ---- [`AutoVsync`] or [`AutoNoVsync`] will gracefully fallback to [`Fifo`] when unavailable. ---- ---- [`Immediate`] or [`Mailbox`] will panic if not supported by the platform. ---- ---- [`Fifo`]: PresentMode::Fifo ---- [`FifoRelaxed`]: PresentMode::FifoRelaxed ---- [`Immediate`]: PresentMode::Immediate ---- [`Mailbox`]: PresentMode::Mailbox ---- [`AutoVsync`]: PresentMode::AutoVsync ---- [`AutoNoVsync`]: PresentMode::AutoNoVsync -PresentMode = {} - - ----@class PrimaryWindow : ReflectReference ---- Marker [`Component`] for the window considered the primary window. ---- ---- Currently this is assumed to only exist on 1 entity at a time. ---- ---- [`WindowPlugin`](crate::WindowPlugin) will spawn a [`Window`] entity ---- with this component if [`primary_window`](crate::WindowPlugin::primary_window) ---- is `Some`. -PrimaryWindow = {} - - ----@class VideoModeSelection : ReflectReference ---- References an exclusive fullscreen video mode. ---- ---- Used when setting [`WindowMode::Fullscreen`] on a window. -VideoModeSelection = {} - - ----@class Window : ReflectReference ---- The defining [`Component`] for window entities, ---- storing information about how it should appear and behave. ---- ---- Each window corresponds to an entity, and is uniquely identified by the value of their [`Entity`]. ---- When the [`Window`] component is added to an entity, a new window will be opened. ---- When it is removed or the entity is despawned, the window will close. ---- ---- The primary window entity (and the corresponding window) is spawned by default ---- by [`WindowPlugin`](crate::WindowPlugin) and is marked with the [`PrimaryWindow`] component. ---- ---- This component is synchronized with `winit` through `bevy_winit`: ---- it will reflect the current state of the window and can be modified to change this state. ---- ---- # Example ---- ---- Because this component is synchronized with `winit`, it can be used to perform ---- OS-integrated windowing operations. For example, here's a simple system ---- to change the window mode: ---- ---- ``` ---- # use bevy_ecs::query::With; ---- # use bevy_ecs::system::Query; ---- # use bevy_window::{WindowMode, PrimaryWindow, Window, MonitorSelection, VideoModeSelection}; ---- fn change_window_mode(mut windows: Query<&mut Window, With>) { ---- // Query returns one window typically. ---- for mut window in windows.iter_mut() { ---- window.mode = ---- WindowMode::Fullscreen(MonitorSelection::Current, VideoModeSelection::Current); ---- } ---- } ---- ``` ----@field cursor_options ? CursorOptions ----@field present_mode ? PresentMode ----@field mode ? WindowMode ----@field position ? WindowPosition ----@field resolution ? WindowResolution ----@field title ? string ----@field name ? Option ----@field composite_alpha_mode ? CompositeAlphaMode ----@field resize_constraints ? WindowResizeConstraints ----@field resizable ? boolean ----@field enabled_buttons ? EnabledButtons ----@field decorations ? boolean ----@field transparent ? boolean ----@field focused ? boolean ----@field window_level ? WindowLevel ----@field canvas ? Option ----@field fit_canvas_to_parent ? boolean ----@field prevent_default_event_handling ? boolean ----@field internal ? InternalWindowState ----@field ime_enabled ? boolean ----@field ime_position ? Vec2 ----@field window_theme ? Option ----@field visible ? boolean ----@field skip_taskbar ? boolean ----@field clip_children ? boolean ----@field desired_maximum_frame_latency ? Option ----@field recognize_pinch_gesture ? boolean ----@field recognize_rotation_gesture ? boolean ----@field recognize_doubletap_gesture ? boolean ----@field recognize_pan_gesture ? Option ----@field movable_by_window_background ? boolean ----@field fullsize_content_view ? boolean ----@field has_shadow ? boolean ----@field titlebar_shown ? boolean ----@field titlebar_transparent ? boolean ----@field titlebar_show_title ? boolean ----@field titlebar_show_buttons ? boolean ----@field prefers_home_indicator_hidden ? boolean ----@field prefers_status_bar_hidden ? boolean -Window = {} - - ----@class WindowLevel : ReflectReference ---- Specifies where a [`Window`] should appear relative to other overlapping windows (on top or under) . ---- ---- Levels are groups of windows with respect to their z-position. ---- ---- The relative ordering between windows in different window levels is fixed. ---- The z-order of windows within the same window level may change dynamically on user interaction. ---- ---- ## Platform-specific ---- ---- - **iOS / Android / Web / Wayland:** Unsupported. -WindowLevel = {} - - ----@class WindowMode : ReflectReference ---- Defines the way a [`Window`] is displayed. -WindowMode = {} - - ----@class WindowPosition : ReflectReference ---- Defines where a [`Window`] should be placed on the screen. -WindowPosition = {} - - ----@class WindowRef : ReflectReference ---- Reference to a [`Window`], whether it be a direct link to a specific entity or ---- a more vague defaulting choice. -WindowRef = {} - - ----@class WindowResizeConstraints : ReflectReference ---- The size limits on a [`Window`]. ---- ---- These values are measured in logical pixels (see [`WindowResolution`]), so the user's ---- scale factor does affect the size limits on the window. ---- ---- Please note that if the window is resizable, then when the window is ---- maximized it may have a size outside of these limits. The functionality ---- required to disable maximizing is not yet exposed by winit. ----@field min_width ? number ----@field min_height ? number ----@field max_width ? number ----@field max_height ? number -WindowResizeConstraints = {} - - ----@class WindowResolution : ReflectReference ---- Controls the size of a [`Window`] ---- ---- ## Physical, logical and requested sizes ---- ---- There are three sizes associated with a window: ---- - the physical size, ---- which represents the actual height and width in physical pixels ---- the window occupies on the monitor, ---- - the logical size, ---- which represents the size that should be used to scale elements ---- inside the window, measured in logical pixels, ---- - the requested size, ---- measured in logical pixels, which is the value submitted ---- to the API when creating the window, or requesting that it be resized. ---- ---- ## Scale factor ---- ---- The reason logical size and physical size are separated and can be different ---- is to account for the cases where: ---- - several monitors have different pixel densities, ---- - the user has set up a pixel density preference in its operating system, ---- - the Bevy `App` has specified a specific scale factor between both. ---- ---- The factor between physical size and logical size can be retrieved with ---- [`WindowResolution::scale_factor`]. ---- ---- For the first two cases, a scale factor is set automatically by the operating ---- system through the window backend. You can get it with ---- [`WindowResolution::base_scale_factor`]. ---- ---- For the third case, you can override this automatic scale factor with ---- [`WindowResolution::set_scale_factor_override`]. ---- ---- ## Requested and obtained sizes ---- ---- The logical size should be equal to the requested size after creating/resizing, ---- when possible. ---- The reason the requested size and logical size might be different ---- is because the corresponding physical size might exceed limits (either the ---- size limits of the monitor, or limits defined in [`WindowResizeConstraints`]). ---- ---- Note: The requested size is not kept in memory, for example requesting a size ---- too big for the screen, making the logical size different from the requested size, ---- and then setting a scale factor that makes the previous requested size within ---- the limits of the screen will not get back that previous requested size. ----@field physical_width ? integer ----@field physical_height ? integer ----@field scale_factor_override ? Option ----@field scale_factor ? number -WindowResolution = {} - - ----@class WindowTheme : ReflectReference ---- The [`Window`] theme variant to use. -WindowTheme = {} - - ----@class CursorIcon : ReflectReference ---- Insert into a window entity to set the cursor for that window. -CursorIcon = {} - - ----@class bool : ReflectReference ---- A boolean value -bool = {} - - ----@class char : ReflectReference ---- An 8-bit character -char = {} - - ----@class NonZeroI16 : ReflectReference -NonZeroI16 = {} - - ----@class NonZeroU16 : ReflectReference -NonZeroU16 = {} - - ----@class NonZeroU32 : ReflectReference -NonZeroU32 = {} - - ----@class f32 : ReflectReference ---- A 32-bit floating point number -f32 = {} - - ----@class f64 : ReflectReference ---- A 64-bit floating point number -f64 = {} - - ----@class i128 : ReflectReference ---- A signed 128-bit integer -i128 = {} - - ----@class i16 : ReflectReference ---- A signed 16-bit integer -i16 = {} - - ----@class i32 : ReflectReference ---- A signed 32-bit integer -i32 = {} - - ----@class i64 : ReflectReference ---- A signed 64-bit integer -i64 = {} - - ----@class i8 : ReflectReference ---- A signed 8-bit integer -i8 = {} - - ----@class isize : ReflectReference ---- A signed pointer-sized integer -isize = {} - - ----@class u128 : ReflectReference ---- An unsigned 128-bit integer -u128 = {} - - ----@class u16 : ReflectReference ---- An unsigned 16-bit integer -u16 = {} - - ----@class u32 : ReflectReference ---- An unsigned 32-bit integer -u32 = {} - - ----@class u64 : ReflectReference ---- An unsigned 64-bit integer -u64 = {} - - ----@class u8 : ReflectReference ---- An unsigned 8-bit integer -u8 = {} - - ----@class usize : ReflectReference ---- An unsigned pointer-sized integer -usize = {} - - ----@class Cow : ReflectReference -Cow = {} - - ----@class Arc : ReflectReference -Arc = {} - - ----@class Range : ReflectReference -Range = {} - - ----@class RangeInclusive : ReflectReference -RangeInclusive = {} - - - - ----@type Annulus ---- A static class allowing calls through the "." operator only. -Annulus = {} - ----@type AlignItems ---- A static class allowing calls through the "." operator only. -AlignItems = {} - ----@type FunctionInfo ---- A static class allowing calls through the "." operator only. -FunctionInfo = {} - ----@type WindowBackendScaleFactorChanged ---- A static class allowing calls through the "." operator only. -WindowBackendScaleFactorChanged = {} - ----@type TextColor ---- A static class allowing calls through the "." operator only. -TextColor = {} - ----@type BackgroundColor ---- A static class allowing calls through the "." operator only. -BackgroundColor = {} - ----@type AtomicU16 ---- A static class allowing calls through the "." operator only. -AtomicU16 = {} - ----@type GamepadRumbleRequest ---- A static class allowing calls through the "." operator only. -GamepadRumbleRequest = {} - ----@type ConeMeshBuilder ---- A static class allowing calls through the "." operator only. -ConeMeshBuilder = {} - ----@type KeyboardFocusLost ---- A static class allowing calls through the "." operator only. -KeyboardFocusLost = {} - ----@type ComputedNode ---- A static class allowing calls through the "." operator only. -ComputedNode = {} - ----@type SmolStr ---- A static class allowing calls through the "." operator only. -SmolStr = {} - ----@type RegularPolygonMeshBuilder ---- A static class allowing calls through the "." operator only. -RegularPolygonMeshBuilder = {} - ----@type ChromaticAberration ---- A static class allowing calls through the "." operator only. -ChromaticAberration = {} - ----@type OnInsert ---- A static class allowing calls through the "." operator only. -OnInsert = {} - ----@type U8Vec3 ---- A static class allowing calls through the "." operator only. -U8Vec3 = {} - ----@type DQuat ---- A static class allowing calls through the "." operator only. -DQuat = {} - ----@type DynamicComponent ---- A static class allowing calls through the "." operator only. -DynamicComponent = {} - ----@type U16Vec4 ---- A static class allowing calls through the "." operator only. -U16Vec4 = {} - ----@type CursorLeft ---- A static class allowing calls through the "." operator only. -CursorLeft = {} - ----@type Arc2d ---- A static class allowing calls through the "." operator only. -Arc2d = {} - ----@type BloomCompositeMode ---- A static class allowing calls through the "." operator only. -BloomCompositeMode = {} - ----@type CameraRenderGraph ---- A static class allowing calls through the "." operator only. -CameraRenderGraph = {} - ----@type NonZeroI16 ---- A static class allowing calls through the "." operator only. -NonZeroI16 = {} - ----@type FileDragAndDrop ---- A static class allowing calls through the "." operator only. -FileDragAndDrop = {} - ----@type Mat3 ---- A static class allowing calls through the "." operator only. -Mat3 = {} - ----@type Frustum ---- A static class allowing calls through the "." operator only. -Frustum = {} - ----@type ColorGradingSection ---- A static class allowing calls through the "." operator only. -ColorGradingSection = {} - ----@type bool ---- A static class allowing calls through the "." operator only. -bool = {} - ----@type ComputedNodeTarget ---- A static class allowing calls through the "." operator only. -ComputedNodeTarget = {} - ----@type BorderColor ---- A static class allowing calls through the "." operator only. -BorderColor = {} - ----@type SystemIdMarker ---- A static class allowing calls through the "." operator only. -SystemIdMarker = {} - ----@type ImageNode ---- A static class allowing calls through the "." operator only. -ImageNode = {} - ----@type AccumulatedMouseMotion ---- A static class allowing calls through the "." operator only. -AccumulatedMouseMotion = {} - ----@type WindowPosition ---- A static class allowing calls through the "." operator only. -WindowPosition = {} - ----@type Label ---- A static class allowing calls through the "." operator only. -Label = {} - ----@type WindowCreated ---- A static class allowing calls through the "." operator only. -WindowCreated = {} - ----@type FontSmoothing ---- A static class allowing calls through the "." operator only. -FontSmoothing = {} - ----@type SmaaPreset ---- A static class allowing calls through the "." operator only. -SmaaPreset = {} - ----@type i16 ---- A static class allowing calls through the "." operator only. -i16 = {} - ----@type MinTrackSizingFunction ---- A static class allowing calls through the "." operator only. -MinTrackSizingFunction = {} - ----@type PathBuf ---- A static class allowing calls through the "." operator only. -PathBuf = {} - ----@type ZIndex ---- A static class allowing calls through the "." operator only. -ZIndex = {} - ----@type WindowClosing ---- A static class allowing calls through the "." operator only. -WindowClosing = {} - ----@type Entity ---- A static class allowing calls through the "." operator only. -Entity = {} - ----@type Sensitivity ---- A static class allowing calls through the "." operator only. -Sensitivity = {} - ----@type Isometry2d ---- A static class allowing calls through the "." operator only. -Isometry2d = {} - ----@type RemovedComponentEntity ---- A static class allowing calls through the "." operator only. -RemovedComponentEntity = {} - ----@type f64 ---- A static class allowing calls through the "." operator only. -f64 = {} - ----@type Namespace ---- A static class allowing calls through the "." operator only. -Namespace = {} - ----@type BloomPrefilter ---- A static class allowing calls through the "." operator only. -BloomPrefilter = {} - ----@type Text2d ---- A static class allowing calls through the "." operator only. -Text2d = {} - ----@type TouchPhase ---- A static class allowing calls through the "." operator only. -TouchPhase = {} - ----@type TorusMeshBuilder ---- A static class allowing calls through the "." operator only. -TorusMeshBuilder = {} - ----@type OrderIndependentTransparencySettings ---- A static class allowing calls through the "." operator only. -OrderIndependentTransparencySettings = {} - ----@type EulerRot ---- A static class allowing calls through the "." operator only. -EulerRot = {} - ----@type Camera3dDepthTextureUsage ---- A static class allowing calls through the "." operator only. -Camera3dDepthTextureUsage = {} - ----@type U64Vec2 ---- A static class allowing calls through the "." operator only. -U64Vec2 = {} - ----@type I8Vec2 ---- A static class allowing calls through the "." operator only. -I8Vec2 = {} - ----@type ContentSize ---- A static class allowing calls through the "." operator only. -ContentSize = {} - ----@type u8 ---- A static class allowing calls through the "." operator only. -u8 = {} - ----@type Tetrahedron ---- A static class allowing calls through the "." operator only. -Tetrahedron = {} - ----@type Dir3A ---- A static class allowing calls through the "." operator only. -Dir3A = {} - ----@type ImageRenderTarget ---- A static class allowing calls through the "." operator only. -ImageRenderTarget = {} - ----@type Quat ---- A static class allowing calls through the "." operator only. -Quat = {} - ----@type Plane2d ---- A static class allowing calls through the "." operator only. -Plane2d = {} - ----@type I16Vec4 ---- A static class allowing calls through the "." operator only. -I16Vec4 = {} - ----@type GamepadButtonChangedEvent ---- A static class allowing calls through the "." operator only. -GamepadButtonChangedEvent = {} - ----@type CompassOctant ---- A static class allowing calls through the "." operator only. -CompassOctant = {} - ----@type Ime ---- A static class allowing calls through the "." operator only. -Ime = {} - ----@type TextEntity ---- A static class allowing calls through the "." operator only. -TextEntity = {} - ----@type Line2d ---- A static class allowing calls through the "." operator only. -Line2d = {} - ----@type Sprite ---- A static class allowing calls through the "." operator only. -Sprite = {} - ----@type DeferredPrepass ---- A static class allowing calls through the "." operator only. -DeferredPrepass = {} - ----@type KeyCode ---- A static class allowing calls through the "." operator only. -KeyCode = {} - ----@type TemporalJitter ---- A static class allowing calls through the "." operator only. -TemporalJitter = {} - ----@type ViewVisibility ---- A static class allowing calls through the "." operator only. -ViewVisibility = {} - ----@type Ellipse ---- A static class allowing calls through the "." operator only. -Ellipse = {} - ----@type AspectRatio ---- A static class allowing calls through the "." operator only. -AspectRatio = {} - ----@type I64Vec4 ---- A static class allowing calls through the "." operator only. -I64Vec4 = {} - ----@type Color ---- A static class allowing calls through the "." operator only. -Color = {} - ----@type WindowRef ---- A static class allowing calls through the "." operator only. -WindowRef = {} - ----@type GlobalTransform ---- A static class allowing calls through the "." operator only. -GlobalTransform = {} - ----@type Rectangle ---- A static class allowing calls through the "." operator only. -Rectangle = {} - ----@type WindowLevel ---- A static class allowing calls through the "." operator only. -WindowLevel = {} - ----@type ButtonSettings ---- A static class allowing calls through the "." operator only. -ButtonSettings = {} - ----@type IVec4 ---- A static class allowing calls through the "." operator only. -IVec4 = {} - ----@type RequestRedraw ---- A static class allowing calls through the "." operator only. -RequestRedraw = {} - ----@type CalculatedClip ---- A static class allowing calls through the "." operator only. -CalculatedClip = {} - ----@type Line3d ---- A static class allowing calls through the "." operator only. -Line3d = {} - ----@type PrimaryWindow ---- A static class allowing calls through the "." operator only. -PrimaryWindow = {} - ----@type Triangle2dMeshBuilder ---- A static class allowing calls through the "." operator only. -Triangle2dMeshBuilder = {} - ----@type U8Vec2 ---- A static class allowing calls through the "." operator only. -U8Vec2 = {} - ----@type BoxShadow ---- A static class allowing calls through the "." operator only. -BoxShadow = {} - ----@type U64Vec4 ---- A static class allowing calls through the "." operator only. -U64Vec4 = {} - ----@type SubCameraView ---- A static class allowing calls through the "." operator only. -SubCameraView = {} - ----@type UVec3 ---- A static class allowing calls through the "." operator only. -UVec3 = {} - ----@type DebandDither ---- A static class allowing calls through the "." operator only. -DebandDither = {} - ----@type Screenshot ---- A static class allowing calls through the "." operator only. -Screenshot = {} - ----@type OverflowClipMargin ---- A static class allowing calls through the "." operator only. -OverflowClipMargin = {} - ----@type GlyphAtlasLocation ---- A static class allowing calls through the "." operator only. -GlyphAtlasLocation = {} - ----@type Image ---- A static class allowing calls through the "." operator only. -Image = {} - ----@type FunctionReturnInfo ---- A static class allowing calls through the "." operator only. -FunctionReturnInfo = {} - ----@type I8Vec3 ---- A static class allowing calls through the "." operator only. -I8Vec3 = {} - ----@type Fixed ---- A static class allowing calls through the "." operator only. -Fixed = {} - ----@type Triangle3d ---- A static class allowing calls through the "." operator only. -Triangle3d = {} - ----@type UiScale ---- A static class allowing calls through the "." operator only. -UiScale = {} - ----@type TextBounds ---- A static class allowing calls through the "." operator only. -TextBounds = {} - ----@type Vec2 ---- A static class allowing calls through the "." operator only. -Vec2 = {} - ----@type Camera ---- A static class allowing calls through the "." operator only. -Camera = {} - ----@type BoundingCircle ---- A static class allowing calls through the "." operator only. -BoundingCircle = {} - ----@type Laba ---- A static class allowing calls through the "." operator only. -Laba = {} - ----@type Capsule3dMeshBuilder ---- A static class allowing calls through the "." operator only. -Capsule3dMeshBuilder = {} - ----@type DepthOfField ---- A static class allowing calls through the "." operator only. -DepthOfField = {} - ----@type f32 ---- A static class allowing calls through the "." operator only. -f32 = {} - ----@type BorderRect ---- A static class allowing calls through the "." operator only. -BorderRect = {} - ----@type DAffine3 ---- A static class allowing calls through the "." operator only. -DAffine3 = {} - ----@type i8 ---- A static class allowing calls through the "." operator only. -i8 = {} - ----@type OverflowAxis ---- A static class allowing calls through the "." operator only. -OverflowAxis = {} - ----@type Range ---- A static class allowing calls through the "." operator only. -Range = {} - ----@type NonZeroU32 ---- A static class allowing calls through the "." operator only. -NonZeroU32 = {} - ----@type BoundingCircleCast ---- A static class allowing calls through the "." operator only. -BoundingCircleCast = {} - ----@type Ray3d ---- A static class allowing calls through the "." operator only. -Ray3d = {} - ----@type Indices ---- A static class allowing calls through the "." operator only. -Indices = {} - ----@type AlignSelf ---- A static class allowing calls through the "." operator only. -AlignSelf = {} - ----@type SliceScaleMode ---- A static class allowing calls through the "." operator only. -SliceScaleMode = {} - ----@type u64 ---- A static class allowing calls through the "." operator only. -u64 = {} - ----@type VideoMode ---- A static class allowing calls through the "." operator only. -VideoMode = {} - ----@type AtomicUsize ---- A static class allowing calls through the "." operator only. -AtomicUsize = {} - ----@type BVec3A ---- A static class allowing calls through the "." operator only. -BVec3A = {} - ----@type RenderAssetUsages ---- A static class allowing calls through the "." operator only. -RenderAssetUsages = {} - ----@type MouseButton ---- A static class allowing calls through the "." operator only. -MouseButton = {} - ----@type Vec3A ---- A static class allowing calls through the "." operator only. -Vec3A = {} - ----@type RotationGesture ---- A static class allowing calls through the "." operator only. -RotationGesture = {} - ----@type VisibilityClass ---- A static class allowing calls through the "." operator only. -VisibilityClass = {} - ----@type GamepadConnection ---- A static class allowing calls through the "." operator only. -GamepadConnection = {} - ----@type AutoExposure ---- A static class allowing calls through the "." operator only. -AutoExposure = {} - ----@type ScriptAsset ---- A static class allowing calls through the "." operator only. -ScriptAsset = {} - ----@type Xyza ---- A static class allowing calls through the "." operator only. -Xyza = {} - ----@type EntityHashSet ---- A static class allowing calls through the "." operator only. -EntityHashSet = {} - ----@type FlexDirection ---- A static class allowing calls through the "." operator only. -FlexDirection = {} - ----@type CircularMeshUvMode ---- A static class allowing calls through the "." operator only. -CircularMeshUvMode = {} - ----@type OnAdd ---- A static class allowing calls through the "." operator only. -OnAdd = {} - ----@type Text ---- A static class allowing calls through the "." operator only. -Text = {} - ----@type CapsuleUvProfile ---- A static class allowing calls through the "." operator only. -CapsuleUvProfile = {} - ----@type ReflectReference ---- A static class allowing calls through the "." operator only. -ReflectReference = {} - ----@type CustomProjection ---- A static class allowing calls through the "." operator only. -CustomProjection = {} - ----@type ReflectSystem ---- A static class allowing calls through the "." operator only. -ReflectSystem = {} - ----@type Tonemapping ---- A static class allowing calls through the "." operator only. -Tonemapping = {} - ----@type Mat4 ---- A static class allowing calls through the "." operator only. -Mat4 = {} - ----@type OnDespawn ---- A static class allowing calls through the "." operator only. -OnDespawn = {} - ----@type RawGamepadEvent ---- A static class allowing calls through the "." operator only. -RawGamepadEvent = {} - ----@type Virtual ---- A static class allowing calls through the "." operator only. -Virtual = {} - ----@type CursorIcon ---- A static class allowing calls through the "." operator only. -CursorIcon = {} - ----@type InfinitePlane3d ---- A static class allowing calls through the "." operator only. -InfinitePlane3d = {} - ----@type Affine2 ---- A static class allowing calls through the "." operator only. -Affine2 = {} - ----@type AtomicU32 ---- A static class allowing calls through the "." operator only. -AtomicU32 = {} - ----@type JumpAt ---- A static class allowing calls through the "." operator only. -JumpAt = {} - ----@type ComponentId ---- A static class allowing calls through the "." operator only. -ComponentId = {} - ----@type AtomicBool ---- A static class allowing calls through the "." operator only. -AtomicBool = {} - ----@type Bloom ---- A static class allowing calls through the "." operator only. -Bloom = {} - ----@type ManualTextureViewHandle ---- A static class allowing calls through the "." operator only. -ManualTextureViewHandle = {} - ----@type Segment3d ---- A static class allowing calls through the "." operator only. -Segment3d = {} - ----@type WindowClosed ---- A static class allowing calls through the "." operator only. -WindowClosed = {} - ----@type Cow ---- A static class allowing calls through the "." operator only. -Cow = {} - ----@type EnabledButtons ---- A static class allowing calls through the "." operator only. -EnabledButtons = {} - ----@type GamepadConnectionEvent ---- A static class allowing calls through the "." operator only. -GamepadConnectionEvent = {} - ----@type RangeInclusive ---- A static class allowing calls through the "." operator only. -RangeInclusive = {} - ----@type InternalWindowState ---- A static class allowing calls through the "." operator only. -InternalWindowState = {} - ----@type Outline ---- A static class allowing calls through the "." operator only. -Outline = {} - ----@type VideoModeSelection ---- A static class allowing calls through the "." operator only. -VideoModeSelection = {} - ----@type u128 ---- A static class allowing calls through the "." operator only. -u128 = {} - ----@type ChildOf ---- A static class allowing calls through the "." operator only. -ChildOf = {} - ----@type CylinderAnchor ---- A static class allowing calls through the "." operator only. -CylinderAnchor = {} - ----@type U16Vec2 ---- A static class allowing calls through the "." operator only. -U16Vec2 = {} - ----@type GamepadRumbleIntensity ---- A static class allowing calls through the "." operator only. -GamepadRumbleIntensity = {} - ----@type table ---- An global instance of this type -types = {} - ----@type Skybox ---- A static class allowing calls through the "." operator only. -Skybox = {} - ----@type CylinderMeshBuilder ---- A static class allowing calls through the "." operator only. -CylinderMeshBuilder = {} - ----@type Camera3dDepthLoadOp ---- A static class allowing calls through the "." operator only. -Camera3dDepthLoadOp = {} - ----@type JustifySelf ---- A static class allowing calls through the "." operator only. -JustifySelf = {} - ----@type ScreenSpaceTransmissionQuality ---- A static class allowing calls through the "." operator only. -ScreenSpaceTransmissionQuality = {} - ----@type Dir2 ---- A static class allowing calls through the "." operator only. -Dir2 = {} - ----@type CircularSegment ---- A static class allowing calls through the "." operator only. -CircularSegment = {} - ----@type BoxShadowSamples ---- A static class allowing calls through the "." operator only. -BoxShadowSamples = {} - ----@type LinearRgba ---- A static class allowing calls through the "." operator only. -LinearRgba = {} - ----@type TextLayoutInfo ---- A static class allowing calls through the "." operator only. -TextLayoutInfo = {} - ----@type ImageNodeSize ---- A static class allowing calls through the "." operator only. -ImageNodeSize = {} - ----@type TypeId ---- A static class allowing calls through the "." operator only. -TypeId = {} - ----@type I16Vec2 ---- A static class allowing calls through the "." operator only. -I16Vec2 = {} - ----@type RectangleMeshBuilder ---- A static class allowing calls through the "." operator only. -RectangleMeshBuilder = {} - ----@type URect ---- A static class allowing calls through the "." operator only. -URect = {} - ----@type Capsule2dMeshBuilder ---- A static class allowing calls through the "." operator only. -Capsule2dMeshBuilder = {} - ----@type SphereMeshBuilder ---- A static class allowing calls through the "." operator only. -SphereMeshBuilder = {} - ----@type I64Vec2 ---- A static class allowing calls through the "." operator only. -I64Vec2 = {} - ----@type Children ---- A static class allowing calls through the "." operator only. -Children = {} - ----@type i32 ---- A static class allowing calls through the "." operator only. -i32 = {} - ----@type CursorOptions ---- A static class allowing calls through the "." operator only. -CursorOptions = {} - ----@type AtomicI16 ---- A static class allowing calls through the "." operator only. -AtomicI16 = {} - ----@type MeshMorphWeights ---- A static class allowing calls through the "." operator only. -MeshMorphWeights = {} - ----@type Projection ---- A static class allowing calls through the "." operator only. -Projection = {} - ----@type DMat4 ---- A static class allowing calls through the "." operator only. -DMat4 = {} - ----@type Gamepad ---- A static class allowing calls through the "." operator only. -Gamepad = {} - ----@type Affine3 ---- A static class allowing calls through the "." operator only. -Affine3 = {} - ----@type TimerMode ---- A static class allowing calls through the "." operator only. -TimerMode = {} - ----@type Display ---- A static class allowing calls through the "." operator only. -Display = {} - ----@type VisibilityRange ---- A static class allowing calls through the "." operator only. -VisibilityRange = {} - ----@type RenderLayers ---- A static class allowing calls through the "." operator only. -RenderLayers = {} - ----@type U8Vec4 ---- A static class allowing calls through the "." operator only. -U8Vec4 = {} - ----@type SyncToRenderWorld ---- A static class allowing calls through the "." operator only. -SyncToRenderWorld = {} - ----@type TextShadow ---- A static class allowing calls through the "." operator only. -TextShadow = {} - ----@type AabbCast3d ---- A static class allowing calls through the "." operator only. -AabbCast3d = {} - ----@type I8Vec4 ---- A static class allowing calls through the "." operator only. -I8Vec4 = {} - ----@type ConicalFrustumMeshBuilder ---- A static class allowing calls through the "." operator only. -ConicalFrustumMeshBuilder = {} - ----@type LineBreak ---- A static class allowing calls through the "." operator only. -LineBreak = {} - ----@type Real ---- A static class allowing calls through the "." operator only. -Real = {} - ----@type WindowCloseRequested ---- A static class allowing calls through the "." operator only. -WindowCloseRequested = {} - ----@type ScrollPosition ---- A static class allowing calls through the "." operator only. -ScrollPosition = {} - ----@type RayCast3d ---- A static class allowing calls through the "." operator only. -RayCast3d = {} - ----@type OverflowClipBox ---- A static class allowing calls through the "." operator only. -OverflowClipBox = {} - ----@type Aabb3d ---- A static class allowing calls through the "." operator only. -Aabb3d = {} - ----@type Window ---- A static class allowing calls through the "." operator only. -Window = {} - ----@type InheritedVisibility ---- A static class allowing calls through the "." operator only. -InheritedVisibility = {} - ----@type TextureAtlasLayout ---- A static class allowing calls through the "." operator only. -TextureAtlasLayout = {} - ----@type Triangle3dMeshBuilder ---- A static class allowing calls through the "." operator only. -Triangle3dMeshBuilder = {} - ----@type I16Vec3 ---- A static class allowing calls through the "." operator only. -I16Vec3 = {} - ----@type Smaa ---- A static class allowing calls through the "." operator only. -Smaa = {} - ----@type Oklcha ---- A static class allowing calls through the "." operator only. -Oklcha = {} - ----@type ShadowStyle ---- A static class allowing calls through the "." operator only. -ShadowStyle = {} - ----@type GridTrackRepetition ---- A static class allowing calls through the "." operator only. -GridTrackRepetition = {} - ----@type CompositeAlphaMode ---- A static class allowing calls through the "." operator only. -CompositeAlphaMode = {} - ----@type Aabb2d ---- A static class allowing calls through the "." operator only. -Aabb2d = {} - ----@type GamepadSettings ---- A static class allowing calls through the "." operator only. -GamepadSettings = {} - ----@type Camera3d ---- A static class allowing calls through the "." operator only. -Camera3d = {} - ----@type Arc ---- A static class allowing calls through the "." operator only. -Arc = {} - ----@type ClearColorConfig ---- A static class allowing calls through the "." operator only. -ClearColorConfig = {} - ----@type DVec3 ---- A static class allowing calls through the "." operator only. -DVec3 = {} - ----@type FocusPolicy ---- A static class allowing calls through the "." operator only. -FocusPolicy = {} - ----@type Segment2d ---- A static class allowing calls through the "." operator only. -Segment2d = {} - ----@type Hwba ---- A static class allowing calls through the "." operator only. -Hwba = {} - ----@type DMat3 ---- A static class allowing calls through the "." operator only. -DMat3 = {} - ----@type Identifier ---- A static class allowing calls through the "." operator only. -Identifier = {} - ----@type RepeatedGridTrack ---- A static class allowing calls through the "." operator only. -RepeatedGridTrack = {} - ----@type MotionVectorPrepass ---- A static class allowing calls through the "." operator only. -MotionVectorPrepass = {} - ----@type DynamicFunctionMut ---- A static class allowing calls through the "." operator only. -DynamicScriptFunctionMut = {} - ----@type ButtonAxisSettings ---- A static class allowing calls through the "." operator only. -ButtonAxisSettings = {} - ----@type OrthographicProjection ---- A static class allowing calls through the "." operator only. -OrthographicProjection = {} - ----@type SystemCursorIcon ---- A static class allowing calls through the "." operator only. -SystemCursorIcon = {} - ----@type U64Vec3 ---- A static class allowing calls through the "." operator only. -U64Vec3 = {} - ----@type BVec4 ---- A static class allowing calls through the "." operator only. -BVec4 = {} - ----@type Uuid ---- A static class allowing calls through the "." operator only. -Uuid = {} - ----@type Mesh2d ---- A static class allowing calls through the "." operator only. -Mesh2d = {} - ----@type ShaderStorageBuffer ---- A static class allowing calls through the "." operator only. -ShaderStorageBuffer = {} - ----@type GamepadButtonStateChangedEvent ---- A static class allowing calls through the "." operator only. -GamepadButtonStateChangedEvent = {} - ----@type AabbCast2d ---- A static class allowing calls through the "." operator only. -AabbCast2d = {} - ----@type ReflectableScheduleLabel ---- A static class allowing calls through the "." operator only. -ReflectableScheduleLabel = {} - ----@type AutoExposureCompensationCurve ---- A static class allowing calls through the "." operator only. -AutoExposureCompensationCurve = {} - ----@type GridTrack ---- A static class allowing calls through the "." operator only. -GridTrack = {} - ----@type ClearColor ---- A static class allowing calls through the "." operator only. -ClearColor = {} - ----@type Plane3d ---- A static class allowing calls through the "." operator only. -Plane3d = {} - ----@type Button ---- A static class allowing calls through the "." operator only. -Button = {} - ----@type WindowDestroyed ---- A static class allowing calls through the "." operator only. -WindowDestroyed = {} - ----@type Capsule3d ---- A static class allowing calls through the "." operator only. -Capsule3d = {} - ----@type CircularSectorMeshBuilder ---- A static class allowing calls through the "." operator only. -CircularSectorMeshBuilder = {} - ----@type MouseWheel ---- A static class allowing calls through the "." operator only. -MouseWheel = {} - ----@type JustifyText ---- A static class allowing calls through the "." operator only. -JustifyText = {} - ----@type BoundingSphereCast ---- A static class allowing calls through the "." operator only. -BoundingSphereCast = {} - ----@type NativeKeyCode ---- A static class allowing calls through the "." operator only. -NativeKeyCode = {} - ----@type DMat2 ---- A static class allowing calls through the "." operator only. -DMat2 = {} - ----@type PositionType ---- A static class allowing calls through the "." operator only. -PositionType = {} - ----@type IVec2 ---- A static class allowing calls through the "." operator only. -IVec2 = {} - ----@type ReflectSchedule ---- A static class allowing calls through the "." operator only. -ReflectSchedule = {} - ----@type UiAntiAlias ---- A static class allowing calls through the "." operator only. -UiAntiAlias = {} - ----@type DefaultQueryFilters ---- A static class allowing calls through the "." operator only. -DefaultQueryFilters = {} - ----@type FloatOrd ---- A static class allowing calls through the "." operator only. -FloatOrd = {} - ----@type Capsule2d ---- A static class allowing calls through the "." operator only. -Capsule2d = {} - ----@type Anchor ---- A static class allowing calls through the "." operator only. -Anchor = {} - ----@type Hsla ---- A static class allowing calls through the "." operator only. -Hsla = {} - ----@type AtomicU64 ---- A static class allowing calls through the "." operator only. -AtomicU64 = {} - ----@type ComponentTicks ---- A static class allowing calls through the "." operator only. -ComponentTicks = {} - ----@type Torus ---- A static class allowing calls through the "." operator only. -Torus = {} - ----@type ScriptSystemBuilder ---- A static class allowing calls through the "." operator only. -ScriptSystemBuilder = {} - ----@type Interval ---- A static class allowing calls through the "." operator only. -Interval = {} - ----@type NormalPrepass ---- A static class allowing calls through the "." operator only. -NormalPrepass = {} - ----@type UiRect ---- A static class allowing calls through the "." operator only. -UiRect = {} - ----@type AtomicU8 ---- A static class allowing calls through the "." operator only. -AtomicU8 = {} - ----@type CompassQuadrant ---- A static class allowing calls through the "." operator only. -CompassQuadrant = {} - ----@type DynamicFunction ---- A static class allowing calls through the "." operator only. -DynamicScriptFunction = {} - ----@type NativeKey ---- A static class allowing calls through the "." operator only. -NativeKey = {} - ----@type AlphaMode2d ---- A static class allowing calls through the "." operator only. -AlphaMode2d = {} - ----@type SocketAddr ---- A static class allowing calls through the "." operator only. -SocketAddr = {} - ----@type IVec3 ---- A static class allowing calls through the "." operator only. -IVec3 = {} - ----@type TextLayout ---- A static class allowing calls through the "." operator only. -TextLayout = {} - ----@type DepthPrepass ---- A static class allowing calls through the "." operator only. -DepthPrepass = {} - ----@type DVec2 ---- A static class allowing calls through the "." operator only. -DVec2 = {} - ----@type I64Vec3 ---- A static class allowing calls through the "." operator only. -I64Vec3 = {} - ----@type Viewport ---- A static class allowing calls through the "." operator only. -Viewport = {} - ----@type Oklaba ---- A static class allowing calls through the "." operator only. -Oklaba = {} - ----@type WindowFocused ---- A static class allowing calls through the "." operator only. -WindowFocused = {} - ----@type MouseMotion ---- A static class allowing calls through the "." operator only. -MouseMotion = {} - ----@type Cuboid ---- A static class allowing calls through the "." operator only. -Cuboid = {} - ----@type Vec4 ---- A static class allowing calls through the "." operator only. -Vec4 = {} - ----@type ScriptAttachment ---- A static class allowing calls through the "." operator only. -ScriptAttachment = {} - ----@type BVec3 ---- A static class allowing calls through the "." operator only. -BVec3 = {} - ----@type TextFont ---- A static class allowing calls through the "." operator only. -TextFont = {} - ----@type WindowOccluded ---- A static class allowing calls through the "." operator only. -WindowOccluded = {} - ----@type DenoiseCas ---- A static class allowing calls through the "." operator only. -DenoiseCas = {} - ----@type ScreenshotCaptured ---- A static class allowing calls through the "." operator only. -ScreenshotCaptured = {} - ----@type RawGamepadAxisChangedEvent ---- A static class allowing calls through the "." operator only. -RawGamepadAxisChangedEvent = {} - ----@type TextNodeFlags ---- A static class allowing calls through the "." operator only. -TextNodeFlags = {} - ----@type Key ---- A static class allowing calls through the "." operator only. -Key = {} - ----@type PinchGesture ---- A static class allowing calls through the "." operator only. -PinchGesture = {} - ----@type Monitor ---- A static class allowing calls through the "." operator only. -Monitor = {} - ----@type CircularSegmentMeshBuilder ---- A static class allowing calls through the "." operator only. -CircularSegmentMeshBuilder = {} - ----@type Cone ---- A static class allowing calls through the "." operator only. -Cone = {} - ----@type OnRemove ---- A static class allowing calls through the "." operator only. -OnRemove = {} - ----@type GamepadButton ---- A static class allowing calls through the "." operator only. -GamepadButton = {} - ----@type AtomicI8 ---- A static class allowing calls through the "." operator only. -AtomicI8 = {} - ----@type Msaa ---- A static class allowing calls through the "." operator only. -Msaa = {} - ----@type TetrahedronMeshBuilder ---- A static class allowing calls through the "." operator only. -TetrahedronMeshBuilder = {} - ----@type WindowResized ---- A static class allowing calls through the "." operator only. -WindowResized = {} - ----@type BVec2 ---- A static class allowing calls through the "." operator only. -BVec2 = {} - ----@type TextureAtlas ---- A static class allowing calls through the "." operator only. -TextureAtlas = {} - ----@type AtomicI32 ---- A static class allowing calls through the "." operator only. -AtomicI32 = {} - ----@type WindowMode ---- A static class allowing calls through the "." operator only. -WindowMode = {} - ----@type Dir3 ---- A static class allowing calls through the "." operator only. -Dir3 = {} - ----@type Mesh3d ---- A static class allowing calls through the "." operator only. -Mesh3d = {} - ----@type BoxSizing ---- A static class allowing calls through the "." operator only. -BoxSizing = {} - ----@type FlexWrap ---- A static class allowing calls through the "." operator only. -FlexWrap = {} - ----@type ResolvedBorderRadius ---- A static class allowing calls through the "." operator only. -ResolvedBorderRadius = {} - ----@type Mat2 ---- A static class allowing calls through the "." operator only. -Mat2 = {} - ----@type WindowThemeChanged ---- A static class allowing calls through the "." operator only. -WindowThemeChanged = {} - ----@type PerspectiveProjection ---- A static class allowing calls through the "." operator only. -PerspectiveProjection = {} - ----@type IRect ---- A static class allowing calls through the "." operator only. -IRect = {} - ----@type ContrastAdaptiveSharpening ---- A static class allowing calls through the "." operator only. -ContrastAdaptiveSharpening = {} - ----@type CameraMainTextureUsages ---- A static class allowing calls through the "." operator only. -CameraMainTextureUsages = {} - ----@type SphereKind ---- A static class allowing calls through the "." operator only. -SphereKind = {} - ----@type AlphaMode ---- A static class allowing calls through the "." operator only. -AlphaMode = {} - ----@type CubemapFrusta ---- A static class allowing calls through the "." operator only. -CubemapFrusta = {} - ----@type ScalingMode ---- A static class allowing calls through the "." operator only. -ScalingMode = {} - ----@type Exposure ---- A static class allowing calls through the "." operator only. -Exposure = {} - ----@type MotionBlur ---- A static class allowing calls through the "." operator only. -MotionBlur = {} - ----@type Transform ---- A static class allowing calls through the "." operator only. -Transform = {} - ----@type TemporalAntiAliasing ---- A static class allowing calls through the "." operator only. -TemporalAntiAliasing = {} - ----@type i64 ---- A static class allowing calls through the "." operator only. -i64 = {} - ----@type ScriptQueryBuilder ---- A static class allowing calls through the "." operator only. -ScriptQueryBuilder = {} - ----@type UVec4 ---- A static class allowing calls through the "." operator only. -UVec4 = {} - ----@type ButtonState ---- A static class allowing calls through the "." operator only. -ButtonState = {} - ----@type RegularPolygon ---- A static class allowing calls through the "." operator only. -RegularPolygon = {} - ----@type Hsva ---- A static class allowing calls through the "." operator only. -Hsva = {} - ----@type WindowMoved ---- A static class allowing calls through the "." operator only. -WindowMoved = {} - ----@type ScriptValue ---- A static class allowing calls through the "." operator only. -ScriptValue = {} - ----@type CircleMeshBuilder ---- A static class allowing calls through the "." operator only. -CircleMeshBuilder = {} - ----@type Duration ---- A static class allowing calls through the "." operator only. -Duration = {} - ----@type CursorGrabMode ---- A static class allowing calls through the "." operator only. -CursorGrabMode = {} - ----@type Lcha ---- A static class allowing calls through the "." operator only. -Lcha = {} - ----@type JustifyItems ---- A static class allowing calls through the "." operator only. -JustifyItems = {} - ----@type AssetPath ---- A static class allowing calls through the "." operator only. -AssetPath = {} - ----@type EllipseMeshBuilder ---- A static class allowing calls through the "." operator only. -EllipseMeshBuilder = {} - ----@type GamepadAxisChangedEvent ---- A static class allowing calls through the "." operator only. -GamepadAxisChangedEvent = {} - ----@type VisibleEntities ---- A static class allowing calls through the "." operator only. -VisibleEntities = {} - ----@type MipBias ---- A static class allowing calls through the "." operator only. -MipBias = {} - ----@type CascadesFrusta ---- A static class allowing calls through the "." operator only. -CascadesFrusta = {} - ----@type RawGamepadButtonChangedEvent ---- A static class allowing calls through the "." operator only. -RawGamepadButtonChangedEvent = {} - ----@type MorphWeights ---- A static class allowing calls through the "." operator only. -MorphWeights = {} - ----@type Rect ---- A static class allowing calls through the "." operator only. -Rect = {} - ----@type ScriptResourceRegistration ---- A static class allowing calls through the "." operator only. -ScriptResourceRegistration = {} - ----@type Node ---- A static class allowing calls through the "." operator only. -Node = {} - ----@type AxisSettings ---- A static class allowing calls through the "." operator only. -AxisSettings = {} - ----@type Vec3 ---- A static class allowing calls through the "." operator only. -Vec3 = {} - ----@type Overflow ---- A static class allowing calls through the "." operator only. -Overflow = {} - ----@type AssetIndex ---- A static class allowing calls through the "." operator only. -AssetIndex = {} - ----@type Fxaa ---- A static class allowing calls through the "." operator only. -Fxaa = {} - ----@type Ray2d ---- A static class allowing calls through the "." operator only. -Ray2d = {} - ----@type GlyphAtlasInfo ---- A static class allowing calls through the "." operator only. -GlyphAtlasInfo = {} - ----@type ComputedTextBlock ---- A static class allowing calls through the "." operator only. -ComputedTextBlock = {} - ----@type AtomicIsize ---- A static class allowing calls through the "." operator only. -AtomicIsize = {} - ----@type TransformTreeChanged ---- A static class allowing calls through the "." operator only. -TransformTreeChanged = {} - ----@type ScriptComponentRegistration ---- A static class allowing calls through the "." operator only. -ScriptComponentRegistration = {} - ----@type AtomicI64 ---- A static class allowing calls through the "." operator only. -AtomicI64 = {} - ----@type UiTargetCamera ---- A static class allowing calls through the "." operator only. -UiTargetCamera = {} - ----@type CircularSector ---- A static class allowing calls through the "." operator only. -CircularSector = {} - ----@type Rot2 ---- A static class allowing calls through the "." operator only. -Rot2 = {} - ----@type RayCast2d ---- A static class allowing calls through the "." operator only. -RayCast2d = {} - ----@type TextureSlicer ---- A static class allowing calls through the "." operator only. -TextureSlicer = {} - ----@type Srgba ---- A static class allowing calls through the "." operator only. -Srgba = {} - ----@type DVec4 ---- A static class allowing calls through the "." operator only. -DVec4 = {} - ----@type Visibility ---- A static class allowing calls through the "." operator only. -Visibility = {} - ----@type Camera2d ---- A static class allowing calls through the "." operator only. -Camera2d = {} - ----@type Instant ---- A static class allowing calls through the "." operator only. -Instant = {} - ----@type CuboidMeshBuilder ---- A static class allowing calls through the "." operator only. -CuboidMeshBuilder = {} - ----@type NonZeroU16 ---- A static class allowing calls through the "." operator only. -NonZeroU16 = {} - ----@type BoundingSphere ---- A static class allowing calls through the "." operator only. -BoundingSphere = {} - ----@type GamepadAxis ---- A static class allowing calls through the "." operator only. -GamepadAxis = {} - ----@type Mesh ---- A static class allowing calls through the "." operator only. -Mesh = {} - ----@type ColorGradingGlobal ---- A static class allowing calls through the "." operator only. -ColorGradingGlobal = {} - ----@type i128 ---- A static class allowing calls through the "." operator only. -i128 = {} - ----@type isize ---- A static class allowing calls through the "." operator only. -isize = {} - ----@type MonitorSelection ---- A static class allowing calls through the "." operator only. -MonitorSelection = {} - ----@type Isometry3d ---- A static class allowing calls through the "." operator only. -Isometry3d = {} - ----@type FunctionCallContext ---- A static class allowing calls through the "." operator only. -FunctionCallContext = {} - ----@type GridPlacement ---- A static class allowing calls through the "." operator only. -GridPlacement = {} - ----@type Circle ---- A static class allowing calls through the "." operator only. -Circle = {} - ----@type FunctionArgInfo ---- A static class allowing calls through the "." operator only. -FunctionArgInfo = {} - ----@type SpriteImageMode ---- A static class allowing calls through the "." operator only. -SpriteImageMode = {} - ----@type RangeFull ---- A static class allowing calls through the "." operator only. -RangeFull = {} - ----@type OcclusionCulling ---- A static class allowing calls through the "." operator only. -OcclusionCulling = {} - ----@type GridAutoFlow ---- A static class allowing calls through the "." operator only. -GridAutoFlow = {} - ----@type ScriptTypeRegistration ---- A static class allowing calls through the "." operator only. -ScriptTypeRegistration = {} - ----@type RelativeCursorPosition ---- A static class allowing calls through the "." operator only. -RelativeCursorPosition = {} - ----@type Disabled ---- A static class allowing calls through the "." operator only. -Disabled = {} - ----@type U16Vec3 ---- A static class allowing calls through the "." operator only. -U16Vec3 = {} - ----@type ScriptQueryResult ---- A static class allowing calls through the "." operator only. -ScriptQueryResult = {} - ----@type u32 ---- A static class allowing calls through the "." operator only. -u32 = {} - ----@type ColorGrading ---- A static class allowing calls through the "." operator only. -ColorGrading = {} - ----@type Timer ---- A static class allowing calls through the "." operator only. -Timer = {} - ----@type usize ---- A static class allowing calls through the "." operator only. -usize = {} - ----@type RenderTarget ---- A static class allowing calls through the "." operator only. -RenderTarget = {} - ----@type WindowScaleFactorChanged ---- A static class allowing calls through the "." operator only. -WindowScaleFactorChanged = {} - ----@type DAffine2 ---- A static class allowing calls through the "." operator only. -DAffine2 = {} - ----@type AnnulusMeshBuilder ---- A static class allowing calls through the "." operator only. -AnnulusMeshBuilder = {} - ----@type Interaction ---- A static class allowing calls through the "." operator only. -Interaction = {} - ----@type ForceTouch ---- A static class allowing calls through the "." operator only. -ForceTouch = {} - ----@type InteropError ---- A static class allowing calls through the "." operator only. -InteropError = {} - ----@type WindowResolution ---- A static class allowing calls through the "." operator only. -WindowResolution = {} - ----@type Val ---- A static class allowing calls through the "." operator only. -Val = {} - ----@type AccumulatedMouseScroll ---- A static class allowing calls through the "." operator only. -AccumulatedMouseScroll = {} - ----@type WindowEvent ---- A static class allowing calls through the "." operator only. -WindowEvent = {} - ----@type LineHeight ---- A static class allowing calls through the "." operator only. -LineHeight = {} - ----@type Sphere ---- A static class allowing calls through the "." operator only. -Sphere = {} - ----@type ConicalFrustum ---- A static class allowing calls through the "." operator only. -ConicalFrustum = {} - ----@type NoFrustumCulling ---- A static class allowing calls through the "." operator only. -NoFrustumCulling = {} - ----@type DepthOfFieldMode ---- A static class allowing calls through the "." operator only. -DepthOfFieldMode = {} - ----@type KeyboardInput ---- A static class allowing calls through the "." operator only. -KeyboardInput = {} - ----@type Name ---- A static class allowing calls through the "." operator only. -Name = {} - ----@type AppLifecycle ---- A static class allowing calls through the "." operator only. -AppLifecycle = {} - ----@type MouseScrollUnit ---- A static class allowing calls through the "." operator only. -MouseScrollUnit = {} - ----@type PositionedGlyph ---- A static class allowing calls through the "." operator only. -PositionedGlyph = {} - ----@type char ---- A static class allowing calls through the "." operator only. -char = {} - ----@type TouchInput ---- A static class allowing calls through the "." operator only. -TouchInput = {} - ----@type EaseFunction ---- A static class allowing calls through the "." operator only. -EaseFunction = {} - ----@type GamepadEvent ---- A static class allowing calls through the "." operator only. -GamepadEvent = {} - ----@type Triangle2d ---- A static class allowing calls through the "." operator only. -Triangle2d = {} - ----@type u16 ---- A static class allowing calls through the "." operator only. -u16 = {} - ----@type String ---- A static class allowing calls through the "." operator only. -String = {} - ----@type ConeAnchor ---- A static class allowing calls through the "." operator only. -ConeAnchor = {} - ----@type MouseButtonInput ---- A static class allowing calls through the "." operator only. -MouseButtonInput = {} - ----@type TextSpan ---- A static class allowing calls through the "." operator only. -TextSpan = {} - ----@type MaxTrackSizingFunction ---- A static class allowing calls through the "." operator only. -MaxTrackSizingFunction = {} - ----@type GamepadInput ---- A static class allowing calls through the "." operator only. -GamepadInput = {} - ----@type CursorMoved ---- A static class allowing calls through the "." operator only. -CursorMoved = {} - ----@type BorderRadius ---- A static class allowing calls through the "." operator only. -BorderRadius = {} - ----@type ColorMaterial ---- A static class allowing calls through the "." operator only. -ColorMaterial = {} - ----@type GlobalsUniform ---- A static class allowing calls through the "." operator only. -GlobalsUniform = {} - ----@type Tick ---- A static class allowing calls through the "." operator only. -Tick = {} - ----@type BVec4A ---- A static class allowing calls through the "." operator only. -BVec4A = {} - ----@type OnReplace ---- A static class allowing calls through the "." operator only. -OnReplace = {} - ----@type RhombusMeshBuilder ---- A static class allowing calls through the "." operator only. -RhombusMeshBuilder = {} - ----@type Affine3A ---- A static class allowing calls through the "." operator only. -Affine3A = {} - ----@type DoubleTapGesture ---- A static class allowing calls through the "." operator only. -DoubleTapGesture = {} - ----@type Stopwatch ---- A static class allowing calls through the "." operator only. -Stopwatch = {} - ----@type AlignContent ---- A static class allowing calls through the "." operator only. -AlignContent = {} - ----@type WindowTheme ---- A static class allowing calls through the "." operator only. -WindowTheme = {} - ----@type PlaneMeshBuilder ---- A static class allowing calls through the "." operator only. -PlaneMeshBuilder = {} - ----@type Mat3A ---- A static class allowing calls through the "." operator only. -Mat3A = {} - ----@type SkinnedMesh ---- A static class allowing calls through the "." operator only. -SkinnedMesh = {} - ----@type PresentMode ---- A static class allowing calls through the "." operator only. -PresentMode = {} - ----@type EntityHash ---- A static class allowing calls through the "." operator only. -EntityHash = {} - ----@type UVec2 ---- A static class allowing calls through the "." operator only. -UVec2 = {} - ----@type JustifyContent ---- A static class allowing calls through the "." operator only. -JustifyContent = {} - ----@type CursorEntered ---- A static class allowing calls through the "." operator only. -CursorEntered = {} - ----@type Aabb ---- A static class allowing calls through the "." operator only. -Aabb = {} - ----@type PanGesture ---- A static class allowing calls through the "." operator only. -PanGesture = {} - ----@type Rhombus ---- A static class allowing calls through the "." operator only. -Rhombus = {} - ----@type NodeImageMode ---- A static class allowing calls through the "." operator only. -NodeImageMode = {} - ----@type WindowResizeConstraints ---- A static class allowing calls through the "." operator only. -WindowResizeConstraints = {} - ----@type Cylinder ---- A static class allowing calls through the "." operator only. -Cylinder = {} - ----@type Handle ---- An global instance of this type -script_asset = {} - ----@type World ---- An global instance of this type -world = {} - ----@type Entity ---- An global instance of this type -entity = {} - diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs index 773866b3a5..114797188b 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -18,7 +18,9 @@ pub fn convert_ladfile_to_lua_declaration_file( diagnostics: vec![], }; - let rust_types = ladfile.polymorphizied_types(); + // // ignore primitive types + // let exclude_primitives = true; + let rust_types = ladfile.polymorphizied_types(false); // convert each rust type to a lua class with generics @@ -79,6 +81,11 @@ pub fn convert_ladfile_to_lua_declaration_file( "An global instance of this type" }; + // ignore primitives + if matches!(class, LuaType::Primitive(..)) { + continue; + } + globals_module .globals .push(crate::lua_declaration_file::TypeInstance { @@ -155,7 +162,7 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( } }, scope: crate::lua_declaration_file::FieldScope::Public, - optional: true, + optional: false, description: None, }) } @@ -453,7 +460,14 @@ pub fn lad_instance_to_lua_type( ladfile::LadFieldOrVariableKind::Ref(lad_type_id) | ladfile::LadFieldOrVariableKind::Mut(lad_type_id) | ladfile::LadFieldOrVariableKind::Val(lad_type_id) => { - LuaType::Alias(ladfile.get_type_identifier(lad_type_id, None).to_string()) + if ladfile.get_type_generics(lad_type_id).is_none() { + LuaType::Alias(ladfile.get_type_identifier(lad_type_id, None).to_string()) + } else { + return Err(anyhow::anyhow!( + "Generic fields are not supported: {}", + lad_type_id + )); + } } ladfile::LadFieldOrVariableKind::Option(lad_type_kind) => LuaType::Union(vec![ lad_instance_to_lua_type(ladfile, lad_type_kind)?, diff --git a/crates/ladfile/src/lib.rs b/crates/ladfile/src/lib.rs index 0cacab730b..02b4e5729a 100644 --- a/crates/ladfile/src/lib.rs +++ b/crates/ladfile/src/lib.rs @@ -101,12 +101,18 @@ impl LadFile { /// this grouping represents types as expected to be seen in rust source code. /// /// For example `Vec` and `Vec` will be grouped together as `Vec` with arity 1. - pub fn polymorphizied_types(&self) -> IndexMap> { + pub fn polymorphizied_types( + &self, + exclude_primitives: bool, + ) -> IndexMap> { let mut types_by_identifier_and_arity: IndexMap> = IndexMap::>::new(); for type_id in self.types.keys() { let arity = self.get_type_arity(type_id); let identifier = self.get_type_identifier(type_id, None); + if exclude_primitives && self.primitive_kind(type_id).is_some() { + continue; + } types_by_identifier_and_arity .entry(PolymorphicTypeKey { identifier, arity }) .or_default() From 94eb66268fd55c478383c5e88f5eff4f79ef24bc Mon Sep 17 00:00:00 2001 From: makspll Date: Wed, 5 Nov 2025 20:06:14 +0000 Subject: [PATCH 12/20] finish lad processor pipeline --- Cargo.toml | 14 +- crates/bevy_mod_scripting_core/Cargo.toml | 2 - crates/bevy_mod_scripting_core/src/lib.rs | 1 - .../Cargo.toml | 20 ++- .../src/convert.rs | 38 +++--- .../src/lib.rs | 14 +- .../src/main.rs | 16 ++- .../src/plugin.rs | 34 +++++ .../src/templating.rs | 5 +- .../tests/integration_tests.rs | 10 +- crates/ladfile/src/lib.rs | 2 + crates/ladfile/src/plugin.rs | 11 ++ crates/ladfile_builder/Cargo.toml | 5 + crates/ladfile_builder/src/plugin.rs | 127 ++++++++++++------ examples/docgen.rs | 44 +++--- release-plz.toml | 4 + src/lib.rs | 7 + xtask/src/main.rs | 11 +- 18 files changed, 251 insertions(+), 114 deletions(-) create mode 100644 crates/lad_backends/lua_language_server_lad_backend/src/plugin.rs create mode 100644 crates/ladfile/src/plugin.rs diff --git a/Cargo.toml b/Cargo.toml index 0d77b7270e..37ab7aa4b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,10 +44,9 @@ default = [ "bevy_core_pipeline_bindings", ] -lua = [ - "bevy_mod_scripting_lua", - "bevy_mod_scripting_functions/lua_bindings", -] ## lua + +# lua +lua = ["bevy_mod_scripting_lua", "bevy_mod_scripting_functions/lua_bindings"] # one of these must be selected lua51 = ["bevy_mod_scripting_lua/lua51", "lua"] lua52 = ["bevy_mod_scripting_lua/lua52", "lua"] @@ -56,6 +55,10 @@ lua54 = ["bevy_mod_scripting_lua/lua54", "lua"] luajit = ["bevy_mod_scripting_lua/luajit", "lua"] luajit52 = ["bevy_mod_scripting_lua/luajit52", "lua"] luau = ["bevy_mod_scripting_lua/luau", "lua"] +lua_language_server_files = [ + "ladfile_builder", + "ladfile_builder/lua_language_server_files", +] # bindings core_functions = ["bevy_mod_scripting_functions/core_functions"] @@ -114,6 +117,7 @@ bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_bindings_domain = { workspace = true } bevy_mod_scripting_display = { workspace = true } bevy_mod_scripting_script = { workspace = true } +ladfile_builder = { workspace = true, optional = true } [workspace.dependencies] # local crates @@ -131,6 +135,8 @@ bevy_mod_scripting_bindings = { path = "crates/bevy_mod_scripting_bindings", ver bevy_mod_scripting_bindings_domain = { path = "crates/bevy_mod_scripting_bindings_domain", version = "0.16.0", default-features = false } bevy_mod_scripting_display = { path = "crates/bevy_mod_scripting_display", version = "0.16.0", default-features = false } bevy_mod_scripting_script = { path = "crates/bevy_mod_scripting_script", version = "0.16.0", default-features = false } +lua_language_server_lad_backend = { path = "crates/lad_backends/lua_language_server_lad_backend", version = "0.16.0", default-features = false } + # bevy bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.16.0" } diff --git a/crates/bevy_mod_scripting_core/Cargo.toml b/crates/bevy_mod_scripting_core/Cargo.toml index 34d187e9d8..25ed1685d3 100644 --- a/crates/bevy_mod_scripting_core/Cargo.toml +++ b/crates/bevy_mod_scripting_core/Cargo.toml @@ -17,8 +17,6 @@ path = "src/lib.rs" [features] default = [] -# if enabled enables documentation updating in optimized builds -doc_always = [] [dependencies] diff --git a/crates/bevy_mod_scripting_core/src/lib.rs b/crates/bevy_mod_scripting_core/src/lib.rs index 7b001e07f6..6ddd081a7b 100644 --- a/crates/bevy_mod_scripting_core/src/lib.rs +++ b/crates/bevy_mod_scripting_core/src/lib.rs @@ -43,7 +43,6 @@ pub mod pipeline; pub mod runtime; pub mod script; pub mod script_system; - #[derive(SystemSet, Hash, Debug, Eq, PartialEq, Clone)] /// Labels for various BMS systems pub enum ScriptingSystemSet { diff --git a/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml b/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml index b0202d983f..bb265f446c 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml +++ b/crates/lad_backends/lua_language_server_lad_backend/Cargo.toml @@ -1,16 +1,14 @@ [package] name = "lua_language_server_lad_backend" -version = "0.1.0" -edition = "2021" -authors = ["Maksymilian Mozolewski "] -license = "MIT OR Apache-2.0" -description = "Language Agnostic Declaration (LAD) file format post processor for generating Lua language server files for the bevy_mod_scripting crate" -repository = "https://github.com/makspll/bevy_mod_scripting" -homepage = "https://github.com/makspll/bevy_mod_scripting" -keywords = ["bevy", "gamedev", "scripting", "documentation", "generator"] -categories = ["game-development", "development-tools"] -include = ["readme.md", "/src"] -readme = "readme.md" +version.workspace = true +edition.workspace = true +authors.workspace = true +license.workspace = true +homepage.workspace = true +repository.workspace = true +keywords.workspace = true +categories.workspace = true +readme.workspace = true [dependencies] bevy_mod_scripting_bindings_domain = { workspace = true } diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs index 114797188b..5eb1fa45a1 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -11,7 +11,7 @@ use crate::{ }; pub fn convert_ladfile_to_lua_declaration_file( - ladfile: ladfile::LadFile, + ladfile: &ladfile::LadFile, ) -> Result { let mut definition_file = LuaDefinitionFile { modules: vec![], @@ -31,10 +31,10 @@ pub fn convert_ladfile_to_lua_declaration_file( // right now one class == one lad type id, when we can properly denormorphize types, we will // be able to have multiple lad type ids per class let lua_classes_for_type = - match convert_polymorphic_type_to_lua_classes(key, types.iter().copied(), &ladfile) { + match convert_polymorphic_type_to_lua_classes(key, types.iter().copied(), ladfile) { Ok(r) => r, Err(e) => { - log::error!("{e}"); + log::warn!("{e}"); continue; } }; @@ -67,10 +67,10 @@ pub fn convert_ladfile_to_lua_declaration_file( ..Default::default() }; for (name, instance) in ladfile.globals.iter() { - let class = match lad_instance_to_lua_type(&ladfile, &instance.type_kind) { + let class = match lad_instance_to_lua_type(ladfile, &instance.type_kind) { Ok(c) => c, Err(e) => { - log::error!("Error generating global {name}: {e}. Using `any` type"); + log::warn!("Error generating global {name}: {e}. Using `any` type"); LuaType::Any } }; @@ -142,6 +142,8 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( let mut lua_fields = vec![]; let mut lua_functions = vec![]; let mut lua_operators = vec![]; + let mut parents = vec![]; + let name = polymorphic_type_key.identifier.to_string(); if let Some(lad_type) = ladfile.types.get(*lad_type_id) { // add fields for the type @@ -155,7 +157,7 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( ty: match lad_instance_to_lua_type(ladfile, &field.type_) { Ok(ty) => ty, Err(e) => { - log::error!( + log::warn!( "error converting field {idx}: {e}. for tuple struct {name}" ); LuaType::Any @@ -174,7 +176,7 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( ty: match lad_instance_to_lua_type(ladfile, &field.type_) { Ok(ty) => ty, Err(e) => { - log::error!( + log::warn!( "error converting field {}: {e}. for struct {name}", field.name ); @@ -199,7 +201,7 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( let lua_function = match lad_function_to_lua_function(ladfile, function) { Ok(func) => func, Err(err) => { - log::error!( + log::warn!( "Error converting function: {} on namespace {:?}: {err}. Using empty definition", function.identifier, function.namespace @@ -216,7 +218,7 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( Some(Ok(op)) => lua_operators.push(op), Some(Err(func)) => lua_functions.push(func), None => { - log::error!( + log::warn!( "Error converting operator function: {} on namespace {:?}. Skipping", function.identifier, function.namespace @@ -227,12 +229,8 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( lua_functions.push(lua_function); } } - } - let name = polymorphic_type_key.identifier.to_string(); - let mut parents = vec![]; - if let Some(metadata) = ladfile.get_type_metadata(lad_type_id) { - if metadata.is_reflect && name != "ReflectReference" { + if lad_type.metadata.is_reflect && name != "ReflectReference" { parents.push(String::from("ReflectReference")) } // if metadata.is_component { @@ -245,7 +243,7 @@ pub fn convert_polymorphic_type_to_lua_classes<'a>( let class = LuaClass { name, - parents: vec![String::from("ReflectReference")], + parents, fields: lua_fields, generics, documentation, @@ -301,26 +299,26 @@ pub fn lua_function_to_operator( return Some(Err(FunctionSignature { name: "__eq".into(), ..func.clone() - })) + })); } ScriptOperatorNames::LessThanComparison => { return Some(Err(FunctionSignature { name: "__lt".into(), ..func.clone() - })) + })); } ScriptOperatorNames::Length => (LuaOperatorKind::Len, None, func.returns.first()?), ScriptOperatorNames::Iteration => { return Some(Err(FunctionSignature { name: "__pairs".into(), ..func.clone() - })) + })); } ScriptOperatorNames::DisplayPrint | ScriptOperatorNames::DebugPrint => { return Some(Err(FunctionSignature { name: "__tostring".into(), ..func.clone() - })) + })); } }; @@ -530,7 +528,7 @@ pub fn lad_primitive_to_lua_type(lad_primitive: &ReflectionPrimitiveKind) -> Lua LuaPrimitiveType::Function } ReflectionPrimitiveKind::ReflectReference => { - return LuaType::Alias("ReflectReference".to_string()) + return LuaType::Alias("ReflectReference".to_string()); } ReflectionPrimitiveKind::ScriptValue => return LuaType::Any, ReflectionPrimitiveKind::External(_) => return LuaType::Any, diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs b/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs index 70d0fc6b93..fbac8be151 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/lib.rs @@ -9,18 +9,19 @@ use crate::{convert::convert_ladfile_to_lua_declaration_file, templating::render mod convert; mod keywords; mod lua_declaration_file; +mod plugin; mod templating; - -const DECLARATION_FILE_NAME: &str = "bindings.lua"; +pub use plugin::*; /// Processess a LAD file and generates Lua language server files. pub fn generate_lua_language_server_files( - ladfile: ladfile::LadFile, + ladfile: &ladfile::LadFile, output_dir: &Path, + file_name: &Path, ) -> Result<(), anyhow::Error> { let declaration_file = convert_ladfile_to_lua_declaration_file(ladfile)?; - let output_path = output_dir.join(DECLARATION_FILE_NAME); + let output_path = output_dir.join(file_name); std::fs::create_dir_all( output_path .parent() @@ -28,7 +29,10 @@ pub fn generate_lua_language_server_files( ) .with_context(|| "failed to create output directories")?; let context = tera::Context::from_serialize(&declaration_file).with_context(|| { - format!("Failed to serialize LuaModule for template rendering: {DECLARATION_FILE_NAME}") + format!( + "Failed to serialize LuaModule for template rendering: {}", + file_name.as_os_str().display() + ) })?; let rendered = render_template("declaration_file.tera", &context)?; diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/main.rs b/crates/lad_backends/lua_language_server_lad_backend/src/main.rs index b53fef4bc4..4766eeca86 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/main.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/main.rs @@ -16,9 +16,13 @@ pub struct Args { #[clap( short, long, - help = "Output directory for the generated Lua language server files, will generate multiple files" + help = "Output directory for the generated Lua language server file" )] pub output: PathBuf, + + #[clap(short, long, help = "The file name of the definition file")] + /// File name + pub filename: Option, } fn main() { if let Err(e) = try_main() { @@ -34,14 +38,18 @@ fn try_main() -> Result<(), anyhow::Error> { env_logger::init(); // Log the input and output paths - log::info!("Input LAD file: {}", args.input); - log::info!("Output directory: {:?}", args.output); + log::trace!("Input LAD file: {}", args.input); + log::trace!("Output directory: {:?}", args.output); // Load the LAD file let file = std::fs::read_to_string(&args.input) .map_err(|e| anyhow::anyhow!("Failed to read LAD file {}: {}", args.input, e))?; let ladfile = ladfile::parse_lad_file(&file)?; - generate_lua_language_server_files(ladfile, &args.output)?; + generate_lua_language_server_files( + &ladfile, + &args.output, + &args.filename.unwrap_or(PathBuf::from("bindings.lua")), + )?; Ok(()) } diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/plugin.rs b/crates/lad_backends/lua_language_server_lad_backend/src/plugin.rs new file mode 100644 index 0000000000..0d38c14598 --- /dev/null +++ b/crates/lad_backends/lua_language_server_lad_backend/src/plugin.rs @@ -0,0 +1,34 @@ +use std::{ + error::Error, + path::{Path, PathBuf}, +}; + +use ladfile::LadFilePlugin; + +use crate::generate_lua_language_server_files; + +/// A plugin which generates lua language definition files to a specified directory when run +#[derive(Clone)] +pub struct LuaLanguageServerLadPlugin { + /// The filename of the generated definition file + pub filename: PathBuf, +} + +impl Default for LuaLanguageServerLadPlugin { + fn default() -> Self { + Self { + filename: PathBuf::from("bindings.lua"), + } + } +} + +impl LadFilePlugin for LuaLanguageServerLadPlugin { + fn run(&self, ladfile: &ladfile::LadFile, path: &Path) -> Result<(), Box> { + generate_lua_language_server_files(ladfile, path, &self.filename) + .map_err(|e| e.into_boxed_dyn_error() as Box) + } + + fn name(&self) -> &'static str { + "Lua language server definition file generator" + } +} diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs b/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs index f2de29c8e0..417b97b06e 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/templating.rs @@ -1,4 +1,4 @@ -use include_dir::{include_dir, Dir}; +use include_dir::{Dir, include_dir}; use std::error::Error; pub const TEMPLATE_DIRECTORY: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/templates"); @@ -14,7 +14,6 @@ pub fn prepare_tera() -> Result { let template_name = file.path().to_string_lossy(); tera.add_raw_template(&template_name, content_utf8) .map_err(handle_tera_error)?; - log::info!("Added template: {template_name}"); } Ok(tera) @@ -34,7 +33,7 @@ pub fn render_template( ) -> Result { let tera = prepare_tera()?; tera.get_template_names().for_each(|name| { - log::info!("Available template: {name}"); + log::trace!("Available template: {name}"); }); tera.render(template_name, context) .map_err(handle_tera_error) diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs index b0d77c129c..557edecdf3 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs @@ -13,10 +13,12 @@ fn add_executable_dir_to_path() { let mut paths = std::env::split_paths(&std::env::var("PATH").expect("failed to get PATH")) .collect::>(); paths.insert(0, dir.to_owned()); - std::env::set_var( - "PATH", - std::env::join_paths(paths).expect("failed to join paths"), - ); + unsafe { + std::env::set_var( + "PATH", + std::env::join_paths(paths).expect("failed to join paths"), + ); + } } // use cargo manifest dir diff --git a/crates/ladfile/src/lib.rs b/crates/ladfile/src/lib.rs index 02b4e5729a..e2e3d3f1f0 100644 --- a/crates/ladfile/src/lib.rs +++ b/crates/ladfile/src/lib.rs @@ -11,6 +11,8 @@ use std::{ pub use bevy_mod_scripting_bindings_domain::ReflectionPrimitiveKind; // re-export the thing we use use indexmap::IndexMap; +mod plugin; +pub use plugin::*; /// The current version of the LAD_VERSION format supported by this library. /// Earlier versions are not guaranteed to be supported. diff --git a/crates/ladfile/src/plugin.rs b/crates/ladfile/src/plugin.rs new file mode 100644 index 0000000000..e1e4eee287 --- /dev/null +++ b/crates/ladfile/src/plugin.rs @@ -0,0 +1,11 @@ +use std::{any::Any, error::Error, path::Path}; + +use crate::LadFile; + +/// A trait implemented by ladfile post-processors. +pub trait LadFilePlugin: Any { + /// A user friendly name of the pkugin + fn name(&self) -> &'static str; + /// Apply the ladfile plugin, given the specified output directory + fn run(&self, ladfile: &LadFile, output_dir: &Path) -> Result<(), Box>; +} diff --git a/crates/ladfile_builder/Cargo.toml b/crates/ladfile_builder/Cargo.toml index 6cae7fb72d..ee41d6ffc1 100644 --- a/crates/ladfile_builder/Cargo.toml +++ b/crates/ladfile_builder/Cargo.toml @@ -11,6 +11,10 @@ keywords.workspace = true categories.workspace = true readme.workspace = true +[features] +default = [] +lua_language_server_files = ["lua_language_server_lad_backend"] + [dependencies] bevy_app = { workspace = true, default-features = false, features = [] } bevy_ecs = { workspace = true, default-features = false, features = [] } @@ -20,6 +24,7 @@ bevy_mod_scripting_core = { workspace = true } bevy_mod_scripting_bindings = { workspace = true } bevy_mod_scripting_bindings_domain = { workspace = true } bevy_reflect = { workspace = true, features = ["documentation"] } +lua_language_server_lad_backend = { workspace = true, optional = true } ladfile = { workspace = true } regex = { workspace = true } diff --git a/crates/ladfile_builder/src/plugin.rs b/crates/ladfile_builder/src/plugin.rs index b907186cf9..26741f2f32 100644 --- a/crates/ladfile_builder/src/plugin.rs +++ b/crates/ladfile_builder/src/plugin.rs @@ -1,6 +1,6 @@ //! Plugins for bevy which allow generating ladfiles at startup -use std::path::PathBuf; +use std::{ops::Deref, path::PathBuf, sync::Arc}; use ::{ bevy_app::{App, Plugin, Startup}, @@ -13,24 +13,42 @@ use bevy_mod_scripting_bindings::{ globals::AppScriptGlobalsRegistry, into_through_type_info, }; -use ladfile::{LadFieldOrVariableKind, default_importance}; +use ladfile::{LadFieldOrVariableKind, LadFilePlugin, default_importance}; 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 -#[derive(Default)] -pub struct ScriptingDocgenPlugin(LadFileSettings); +#[derive(Default, Clone)] +pub struct ScriptingFilesGenerationPlugin(LadFileSettingsArc); + +/// Stores the settings for the generated Ladfile +#[derive(Resource, Default, Clone)] +pub struct LadFileSettingsArc(pub Arc); + +impl Deref for LadFileSettingsArc { + type Target = LadFileSettings; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} -#[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` + /// Can be used to decide whether or not to generate ladfiles and associated files at runtime + /// by default enabled. + pub enabled: bool, + + /// if set the file name in the output directory to write the ladfile. Not saved by default + pub ladfile_filename: Option, + + /// The path at which to generate the LAD file and other outputs from each processor. /// - /// By default this will be `assets/bindings.lad.json` - pub path: PathBuf, + /// By default this will be the current working directory. + pub output_directory: PathBuf, + /// The description to use for the LAD file, by default it's empty pub description: &'static str, @@ -41,33 +59,56 @@ pub struct LadFileSettings { /// Whether to pretty print the output JSON. By default this is true (slay) pub pretty: bool, + + /// Processors to apply to the generated ladfile + pub processors: Vec>, } impl Default for LadFileSettings { fn default() -> Self { Self { - path: PathBuf::from("bindings.lad.json"), + enabled: true, + ladfile_filename: None, + output_directory: PathBuf::from("."), description: "", pretty: true, exclude_types_containing_unregistered: true, + processors: ScriptingFilesGenerationPlugin::default_processors(), } } } -impl ScriptingDocgenPlugin { - /// Create a new instance of the plugin with the given path +impl ScriptingFilesGenerationPlugin { + /// The default processors according to currently set features + #[allow(unused_mut, clippy::vec_init_then_push)] + pub fn default_processors() -> Vec> { + let mut processors = Vec::default(); + + #[cfg(feature = "lua_language_server_files")] + processors.push(Box::new( + lua_language_server_lad_backend::LuaLanguageServerLadPlugin::default(), + ) as Box); + processors + } + + /// Create a new instance of the plugin responsible for setting up the ladfile processing pipeline pub fn new( - path: PathBuf, + enabled: bool, + output_directory: PathBuf, + ladfile_filename: Option, description: &'static str, exclude_types_containing_unregistered: bool, pretty: bool, ) -> Self { - Self(LadFileSettings { - path, + Self(LadFileSettingsArc(Arc::new(LadFileSettings { + enabled, + output_directory, + ladfile_filename, description, pretty, exclude_types_containing_unregistered, - }) + processors: Self::default_processors(), + }))) } } @@ -157,26 +198,34 @@ pub fn generate_lad_file( } let file = builder.build(); + let directory = &settings.output_directory; - 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) => { - error!("Error serializing LAD file: {}", e); - return; + for processor in settings.processors.iter() { + bevy_log::info!("Running ladfile processor: '{}'", processor.name()); + if let Err(e) = processor.run(&file, directory) { + bevy_log::error!("Error in running ladfile processor: {e}") } - }; + } - // save - match std::fs::write(&path, file) { - Ok(_) => { - info!("Successfully generated LAD file at {:?}", path); - } - Err(e) => { - error!("Error saving LAD file to {:?}: {}", path, e); + if let Some(filename) = &settings.ladfile_filename { + let path = directory.join(filename); + // generate + let file = match ladfile::serialize_lad_file(&file, settings.pretty) { + Ok(file) => file, + Err(e) => { + error!("Error serializing LAD file: {}", e); + return; + } + }; + + // save + match std::fs::write(&path, file) { + Ok(_) => { + info!("Successfully generated LAD file at {:?}", path); + } + Err(e) => { + error!("Error saving LAD file to {:?}: {}", path, e); + } } } } @@ -186,20 +235,22 @@ fn generate_lad_file_system( function_registry: Res, dummy_function_registry: Res, global_registry: Res, - settings: Res, + settings: Res, ) { generate_lad_file( &type_registry, &function_registry, &dummy_function_registry, &global_registry, - &settings, + &settings.0, ); } -impl Plugin for ScriptingDocgenPlugin { +impl Plugin for ScriptingFilesGenerationPlugin { fn build(&self, app: &mut App) { - app.insert_resource(self.0.clone()); - app.add_systems(Startup, generate_lad_file_system); + if self.0.0.enabled { + app.insert_resource(self.0.clone()); + app.add_systems(Startup, generate_lad_file_system); + } } } diff --git a/examples/docgen.rs b/examples/docgen.rs index 3da9fead12..92ebaf1620 100644 --- a/examples/docgen.rs +++ b/examples/docgen.rs @@ -1,32 +1,35 @@ +use bevy::prelude::PluginGroup; use bevy::{DefaultPlugins, app::App, ecs::reflect::AppTypeRegistry}; -use bevy_mod_scripting::ScriptFunctionsPlugin; +use bevy_mod_scripting::BMSPlugin; use bevy_mod_scripting_bindings::{ - DummyScriptFunctionRegistry, - function::script_function::AppScriptFunctionRegistry, - globals::{AppScriptGlobalsRegistry, core::CoreScriptGlobalsPlugin}, + DummyScriptFunctionRegistry, function::script_function::AppScriptFunctionRegistry, + globals::AppScriptGlobalsRegistry, }; -use bevy_mod_scripting_core::BMSScriptingInfrastructurePlugin; -use ladfile_builder::plugin::{LadFileSettings, ScriptingDocgenPlugin, generate_lad_file}; - +use ladfile_builder::plugin::{ + LadFileSettingsArc, ScriptingFilesGenerationPlugin, generate_lad_file, +}; +use std::path::PathBuf; fn main() -> std::io::Result<()> { let mut app = App::new(); // headless bevy, kinda, I want to include as many plugins as I can which actually // provide reflected type definitions, but exclude anything that runs rendering stuff. app.add_plugins(DefaultPlugins); - // docgen + scripting - app.add_plugins(( - // normally the global plugin is included as part of each scripting plugin, here we just take - // the definitions by themselves - CoreScriptGlobalsPlugin::default(), - ScriptFunctionsPlugin, - BMSScriptingInfrastructurePlugin::default(), + // this example is used to drive the generated docs on the official BMS book + app.add_plugins(BMSPlugin.set::( + ScriptingFilesGenerationPlugin::new( + true, // enabled, you can use a compilation feature to disable this here + PathBuf::from("assets").join("definitions"), + Some(PathBuf::from("bindings.lad.json")), // do also save the ladfile itself + "Core BMS framework bindings", + true, + true, + ), )); // there are two ways to generate the ladfile // 1. add the docgen plugin and run your app as normal - app.add_plugins(ScriptingDocgenPlugin::default()); app.finish(); app.cleanup(); // running update once will do the trick @@ -56,17 +59,18 @@ fn main() -> std::io::Result<()> { .unwrap() .clone(); - let settings = LadFileSettings { - description: "Core BMS framework bindings", - ..Default::default() - }; + let settings = app + .world() + .get_resource::() + .unwrap() + .clone(); generate_lad_file( &type_registry, &function_registry, &dummy_function_registry, &global_registry, - &settings, + &settings.0, ); // bah bye, the generated file will be found in assets/ diff --git a/release-plz.toml b/release-plz.toml index 94721dffc0..1b33a2525d 100644 --- a/release-plz.toml +++ b/release-plz.toml @@ -72,6 +72,10 @@ version_group = "main" name = "bevy_mod_scripting_functions" version_group = "main" +[[package]] +name = "lua_language_server_lad_backend" +version_group = "main" + [[package]] name = "ladfile" git_release_enable = true diff --git a/src/lib.rs b/src/lib.rs index f7a3adcdae..2385adbaf9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,6 +33,11 @@ pub mod rhai { pub use bevy_mod_scripting_rhai::*; } +#[cfg(feature = "lua_language_server_files")] +pub mod ladfile { + pub use ladfile_builder::*; +} + use bevy_app::plugin_group; use bevy_mod_scripting_bindings::CoreScriptGlobalsPlugin; use bevy_mod_scripting_core::BMSScriptingInfrastructurePlugin; @@ -48,5 +53,7 @@ plugin_group! { bevy_mod_scripting_lua:::LuaScriptingPlugin, #[custom(cfg(feature = "rhai"))] bevy_mod_scripting_rhai:::RhaiScriptingPlugin, + #[custom(cfg(feature = "lua_language_server_files"))] + ladfile_builder::plugin:::ScriptingFilesGenerationPlugin } } diff --git a/xtask/src/main.rs b/xtask/src/main.rs index b4b018306e..aba753a007 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -58,6 +58,9 @@ enum Feature { BevySpriteBindings, BevyTextBindings, + // Ladfile + LuaLanguageServerFiles, + // Lua Lua51, Lua52, @@ -149,7 +152,9 @@ impl IntoFeatureGroup for Feature { | Feature::BevySceneBindings | Feature::BevySpriteBindings | Feature::BevyTextBindings => FeatureGroup::BMSFeatureNotInPowerset, - Feature::CoreFunctions | Feature::ProfileWithTracy => FeatureGroup::BMSFeature, // don't use wildcard here, we want to be explicit + Feature::CoreFunctions + | Feature::ProfileWithTracy + | Feature::LuaLanguageServerFiles => FeatureGroup::BMSFeature, // don't use wildcard here, we want to be explicit } } } @@ -172,6 +177,7 @@ impl Default for Features { Feature::BevyTransformBindings, Feature::BevyColorBindings, Feature::BevyCorePipelineBindings, + Feature::LuaLanguageServerFiles, ]) } } @@ -1434,7 +1440,8 @@ impl Xtasks { 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 ladfile_path = + Self::relative_workspace_dir(&app_settings, "assets/definitions/bindings.lad.json")?; let destination_path = Self::relative_workspace_dir(&app_settings, "docs/src/ladfiles/bindings.lad.json")?; From 16915915cf2ed3ed9629a86f23564cb8b2ab8c27 Mon Sep 17 00:00:00 2001 From: makspll Date: Wed, 5 Nov 2025 22:04:43 +0000 Subject: [PATCH 13/20] clippy fix --- .../src/convert.rs | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs index 5eb1fa45a1..b4b47a8126 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/src/convert.rs @@ -430,25 +430,6 @@ pub fn to_lua_many( Ok(lua_types) } -// pub fn lad_type_to_lua_type( -// ladfile: &LadFile, -// lad_type_id: LadTypeId, -// ) -> Result { -// if let Some(primitive) = ladfile.primitives.get(&lad_type_id) { -// Ok(lad_primitive_to_lua_type(&primitive.kind)) -// } else { -// if ladfile.get_type_generics(&lad_type_id).is_some() { -// return Err(anyhow::anyhow!( -// "Type contains generics: {}", -// ladfile.get_type_identifier(&lad_type_id, None) -// )); -// } -// Ok(LuaType::Alias( -// ladfile.get_type_identifier(&lad_type_id, None).to_string(), -// )) -// } -// } - pub fn lad_instance_to_lua_type( ladfile: &LadFile, lad_type: &ladfile::LadFieldOrVariableKind, @@ -462,8 +443,7 @@ pub fn lad_instance_to_lua_type( LuaType::Alias(ladfile.get_type_identifier(lad_type_id, None).to_string()) } else { return Err(anyhow::anyhow!( - "Generic fields are not supported: {}", - lad_type_id + "Generic fields are not supported: {lad_type_id}", )); } } From 6a0ad543db67b4e13538e5e6a90714efd96cdac8 Mon Sep 17 00:00:00 2001 From: makspll Date: Wed, 5 Nov 2025 22:50:06 +0000 Subject: [PATCH 14/20] bless tests --- .../src/docgen/info.rs | 10 +- .../src/docgen/typed_through.rs | 106 ++--- .../tests/example_ladfile/expected.lua | 141 ++++++- .../tests/integration_tests.rs | 4 +- .../src/argument_visitor.rs | 30 +- .../tests/book_integration_tests.rs | 13 +- .../parent/lad/functions/hello_world.md | 4 +- .../expected/parent/lad/globals.md | 2 +- .../expected/parent/lad/types.md | 28 +- crates/ladfile/test_assets/test.lad.json | 368 +++++++++++++++++- xtask/src/main.rs | 4 + 11 files changed, 600 insertions(+), 110 deletions(-) diff --git a/crates/bevy_mod_scripting_bindings/src/docgen/info.rs b/crates/bevy_mod_scripting_bindings/src/docgen/info.rs index b9afd5115c..069e0a22cf 100644 --- a/crates/bevy_mod_scripting_bindings/src/docgen/info.rs +++ b/crates/bevy_mod_scripting_bindings/src/docgen/info.rs @@ -229,6 +229,8 @@ variadics_please::all_tuples!(impl_documentable, 0, 13, T); #[cfg(test)] mod test { + use bevy_mod_scripting_bindings_domain::ReflectionPrimitiveKind; + use crate::{ docgen::typed_through::UntypedWrapperKind, function::from::{Mut, Ref, Val}, @@ -252,15 +254,15 @@ mod test { assert_eq!(info.arg_info[1].type_id, TypeId::of::()); match info.arg_info[0].type_info.as_ref().unwrap() { - ThroughTypeInfo::TypeInfo(type_info) => { - assert_eq!(type_info.type_id(), TypeId::of::()); + ThroughTypeInfo::Primitive(prim) => { + assert_eq!(*prim, ReflectionPrimitiveKind::I32); } _ => panic!("Expected TypeInfo"), } match info.arg_info[1].type_info.as_ref().unwrap() { - ThroughTypeInfo::TypeInfo(type_info) => { - assert_eq!(type_info.type_id(), TypeId::of::()); + ThroughTypeInfo::Primitive(prim) => { + assert_eq!(*prim, ReflectionPrimitiveKind::F32); } _ => panic!("Expected TypeInfo"), } diff --git a/crates/bevy_mod_scripting_bindings/src/docgen/typed_through.rs b/crates/bevy_mod_scripting_bindings/src/docgen/typed_through.rs index 688ee4b58d..f9eb5e86d1 100644 --- a/crates/bevy_mod_scripting_bindings/src/docgen/typed_through.rs +++ b/crates/bevy_mod_scripting_bindings/src/docgen/typed_through.rs @@ -342,80 +342,54 @@ variadics_please::all_tuples!(impl_through_typed_tuple, 0, 13, T); mod test { use super::*; - fn assert_type_info_is_through() { + fn assert_type_info_is_primitive(kind: ReflectionPrimitiveKind) { let type_info = T::type_info(); let through_type_info = T::through_type_info(); - - match through_type_info { - ThroughTypeInfo::TypeInfo(info) => { - assert_eq!(info.type_id(), type_info.type_id()); - assert_eq!(info.type_path(), type_info.type_path()); - } - _ => panic!("Expected ThroughTypeInfo::TypeInfo"), - } - } - - fn assert_dynamic_through_type_is_val_info() { - let type_info = T::type_info(); - let through_type_info = into_through_type_info(type_info); - - match through_type_info { - ThroughTypeInfo::UntypedWrapper { - through_type, - wrapper_kind, - } => { - assert_eq!(wrapper_kind, UntypedWrapperKind::Val); - assert_eq!(through_type.type_id(), type_info.type_id()); - assert_eq!(through_type.type_path(), type_info.type_path()); + let dynamic_through_type_info = into_through_type_info(type_info); + + for (test, info) in [ + ("static", through_type_info), + ("dynamic", dynamic_through_type_info), + ] { + match info { + ThroughTypeInfo::Primitive(prim) => { + assert_eq!( + prim, + kind, + "expected {} to have primitive {test} type info: {kind}", + std::any::type_name::() + ) + } + _ => panic!("Expected ThroughTypeInfo::TypeInfo"), } - _ => panic!("Expected ThroughTypeInfo::TypeInfo"), } } #[test] fn test_typed_through_primitives() { - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::(); - assert_dynamic_through_type_is_val_info::(); - assert_type_info_is_through::<&'static str>(); - assert_dynamic_through_type_is_val_info::<&'static str>(); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::Bool); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::I8); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::I16); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::I32); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::I64); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::I128); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::U8); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::U16); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::U32); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::U64); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::U128); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::F32); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::F64); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::Usize); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::Isize); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::String); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::PathBuf); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::OsString); + assert_type_info_is_primitive::(ReflectionPrimitiveKind::Char); + assert_type_info_is_primitive::( + ReflectionPrimitiveKind::ReflectReference, + ); + assert_type_info_is_primitive::<&'static str>(ReflectionPrimitiveKind::Str); } #[test] diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua b/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua index 70490565ad..fd99bd68fa 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/example_ladfile/expected.lua @@ -1,40 +1,161 @@ ---@meta ---@module "PlainStructType" ----@class PlainStructType +---@class PlainStructType : ReflectReference --- I am a simple plain struct type ---@field int_field ? integer PlainStructType = {} ----@package ---@param p1 PlainStructType - ---@param p2 integer - ---@return any function PlainStructType:plain_struct_function(p1,p2) end ----@class EnumType +---@class Bool +--- A boolean value +Bool = {} + + +---@class Char +--- An 8-bit character +Char = {} + + +---@class DynamicFunction +--- A callable dynamic function +DynamicFunction = {} + + +---@class DynamicFunctionMut +--- A stateful and callable dynamic function +DynamicFunctionMut = {} + + +---@class F32 +--- A 32-bit floating point number +F32 = {} + + +---@class F64 +--- A 64-bit floating point number +F64 = {} + + +---@class FunctionCallContext +--- Function call context, if accepted by a function, means the function can access the world in arbitrary ways. +FunctionCallContext = {} + + +---@class I128 +--- A signed 128-bit integer +I128 = {} + + +---@class I16 +--- A signed 16-bit integer +I16 = {} + + +---@class I32 +--- A signed 32-bit integer +I32 = {} + + +---@class I64 +--- A signed 64-bit integer +I64 = {} + + +---@class I8 +--- A signed 8-bit integer +I8 = {} + + +---@class Isize +--- A signed pointer-sized integer +Isize = {} + + +---@class OsString +--- A heap allocated OS string +OsString = {} + + +---@class PathBuf +--- A heap allocated file path +PathBuf = {} + + +---@class ReflectReference +--- A reference to a reflectable type +ReflectReference = {} + + +---@class ScriptValue +--- A value representing the union of all representable values +ScriptValue = {} + + +---@class Str +--- A string slice +Str = {} + + +---@class String +--- A heap allocated string +String = {} + + +---@class U128 +--- An unsigned 128-bit integer +U128 = {} + + +---@class U16 +--- An unsigned 16-bit integer +U16 = {} + + +---@class U32 +--- An unsigned 32-bit integer +U32 = {} + + +---@class U64 +--- An unsigned 64-bit integer +U64 = {} + + +---@class U8 +--- An unsigned 8-bit integer +U8 = {} + + +---@class Usize +--- An unsigned pointer-sized integer +Usize = {} + +---@class EnumType : ReflectReference EnumType = {} ----@class TupleStructType +---@class TupleStructType : ReflectReference --- I am a tuple test type ----@field [1] ? integer ----@field [2] ? string +---@field [1] integer +---@field [2] string TupleStructType = {} ----@class UnitType +---@class UnitType : ReflectReference --- I am a unit test type UnitType = {} ----@type GenericStructType +---@type any --- A static class allowing calls through the "." operator only. my_static_instance = {} diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs index 557edecdf3..feab346342 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs @@ -82,6 +82,7 @@ fn main() { if std::env::var("BLESS_MODE").is_ok() { std::fs::write(&expected_path, &generated_str) .expect("failed to write expected.lua file"); + panic!("BLESS_MODE is enabled, please disable it to run the tests"); } else { pretty_assertions::assert_eq!( expected_str, @@ -92,7 +93,4 @@ fn main() { } } } - if std::env::var("BLESS_MODE").is_ok() { - panic!("BLESS_MODE is enabled, please disable it to run the tests"); - } } diff --git a/crates/lad_backends/mdbook_lad_preprocessor/src/argument_visitor.rs b/crates/lad_backends/mdbook_lad_preprocessor/src/argument_visitor.rs index 4d7b3766af..cab3a106e9 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/src/argument_visitor.rs +++ b/crates/lad_backends/mdbook_lad_preprocessor/src/argument_visitor.rs @@ -176,11 +176,11 @@ mod test { PathBuf::from("root\\asd").join(str) }); - let first_type_id = ladfile.types.first().unwrap().0; - visitor.visit_lad_type_id(first_type_id); + let second_type_id = ladfile.types.iter().nth(1).unwrap().0; + visitor.visit_lad_type_id(second_type_id); assert_eq!( visitor.buffer.build(), - "StructType<[usize](root/asd/usize)>" + "GenericStructType<[Usize](root/asd/Usize)>" ); } @@ -192,13 +192,13 @@ mod test { let mut visitor = MarkdownArgumentVisitor::new(&ladfile); visitor.visit_lad_type_id(first_type_id); - assert_eq!(visitor.buffer.build(), "StructType"); + assert_eq!(visitor.buffer.build(), "PlainStructType"); visitor.buffer.clear(); let second_type_id = ladfile.types.iter().nth(1).unwrap().0; visitor.visit_lad_type_id(second_type_id); - assert_eq!(visitor.buffer.build(), "EnumType"); + assert_eq!(visitor.buffer.build(), "GenericStructType"); } #[test] @@ -209,7 +209,7 @@ mod test { let mut visitor = MarkdownArgumentVisitor::new(&ladfile); visitor.visit(&LadFieldOrVariableKind::Ref(first_type_id.clone())); - assert_eq!(visitor.buffer.build(), "StructType"); + assert_eq!(visitor.buffer.build(), "PlainStructType"); } #[test] @@ -220,7 +220,7 @@ mod test { let mut visitor = MarkdownArgumentVisitor::new(&ladfile); visitor.visit(&LadFieldOrVariableKind::Mut(first_type_id.clone())); - assert_eq!(visitor.buffer.build(), "StructType"); + assert_eq!(visitor.buffer.build(), "PlainStructType"); } #[test] @@ -231,7 +231,7 @@ mod test { let mut visitor = MarkdownArgumentVisitor::new(&ladfile); visitor.visit(&LadFieldOrVariableKind::Val(first_type_id.clone())); - assert_eq!(visitor.buffer.build(), "StructType"); + assert_eq!(visitor.buffer.build(), "PlainStructType"); } #[test] @@ -243,7 +243,7 @@ mod test { visitor.visit(&LadFieldOrVariableKind::Option(Box::new( LadFieldOrVariableKind::Primitive(ReflectionPrimitiveKind::Bool), ))); - assert_eq!(visitor.buffer.build(), "Optional"); + assert_eq!(visitor.buffer.build(), "Optional"); } #[test] @@ -255,7 +255,7 @@ mod test { visitor.visit(&LadFieldOrVariableKind::Vec(Box::new( LadFieldOrVariableKind::Primitive(ReflectionPrimitiveKind::Bool), ))); - assert_eq!(visitor.buffer.build(), "Vec"); + assert_eq!(visitor.buffer.build(), "Vec"); } #[test] @@ -273,7 +273,7 @@ mod test { )), )); - assert_eq!(visitor.buffer.build(), "HashMap"); + assert_eq!(visitor.buffer.build(), "HashMap"); } #[test] @@ -297,7 +297,7 @@ mod test { )); assert_eq!( visitor.buffer.build(), - "HashMap | StructType | StructType>" + "HashMap" ); } @@ -311,7 +311,7 @@ mod test { LadFieldOrVariableKind::Primitive(ReflectionPrimitiveKind::Bool), LadFieldOrVariableKind::Primitive(ReflectionPrimitiveKind::String), ])); - assert_eq!(visitor.buffer.build(), "(bool, String)"); + assert_eq!(visitor.buffer.build(), "(Bool, String)"); } #[test] @@ -326,7 +326,7 @@ mod test { )), 5, )); - assert_eq!(visitor.buffer.build(), "[bool; 5]"); + assert_eq!(visitor.buffer.build(), "[Bool; 5]"); } #[test] @@ -338,6 +338,6 @@ mod test { let first_type_id = ladfile.types.first().unwrap().0; visitor.visit(&LadFieldOrVariableKind::Unknown(first_type_id.clone())); - assert_eq!(visitor.buffer.build(), "StructType"); + assert_eq!(visitor.buffer.build(), "PlainStructType"); } } diff --git a/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs b/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs index 5ec59ac757..90c8a92959 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs +++ b/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs @@ -87,12 +87,23 @@ fn test_on_example_ladfile() { book_files.contains(&book_file), "File not found: {book_file:?}" ); + + let book_content = std::fs::read_to_string(&book_file).expect("failed to read file"); + + if std::env::var("BLESS_MODE").is_ok() { + std::fs::write(&expected_file, book_content.clone()).unwrap(); + } + let expected_content = std::fs::read_to_string(&expected_file).expect("failed to read file"); - let book_content = std::fs::read_to_string(&book_file).expect("failed to read file"); + pretty_assertions::assert_eq!( normalize_file(expected_content), normalize_file(book_content) ); } + + if std::env::var("BLESS_MODE").is_ok() { + panic!("BLESS_MODE is enabled, re-run the test with this off") + } } diff --git a/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/functions/hello_world.md b/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/functions/hello_world.md index b0fa92768f..6ddc551b6a 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/functions/hello_world.md +++ b/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/functions/hello_world.md @@ -6,11 +6,11 @@ | Name | Type | Documentation | | --- | --- | --- | -| **arg1** | [usize](../types/usize.md) | No Documentation 🚧 | +| **arg1** | [Usize](../types/usize.md) | No Documentation 🚧 | #### Returns | Name | Type | Documentation | | --- | --- | --- | -| **arg0** | [usize](../types/usize.md) | No Documentation 🚧 | +| **arg0** | [Usize](../types/usize.md) | No Documentation 🚧 | diff --git a/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/globals.md b/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/globals.md index 0fbafcca88..c4350a74d5 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/globals.md +++ b/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/globals.md @@ -19,5 +19,5 @@ Static type references, existing for the purpose of typed static function calls\ | Instance | Type | | --- | --- | -| `my_static_instance` | StructType\<[usize](./types/usize.md)\> | +| `my_static_instance` | GenericStructType\<[Usize](./types/usize.md)\> | diff --git a/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/types.md b/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/types.md index d77185356f..ac5154c3dc 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/types.md +++ b/crates/lad_backends/mdbook_lad_preprocessor/tests/books/example_ladfile/expected/parent/lad/types.md @@ -6,7 +6,33 @@ All registered reflect\-able types which can be constructed and directly manipul | Type | Summary | | --- | --- | -| [`StructType`](././types/structtypeusize.md) | I am a struct | +| [`PlainStructType`](././types/plainstructtype.md) | I am a simple plain struct type | +| [`GenericStructType`](././types/genericstructtypeusize.md) | I am a struct | +| [`Bool`](././types/bool.md) | A boolean value | +| [`Char`](././types/char.md) | An 8\-bit character | +| [`DynamicFunction`](././types/dynamicfunction.md) | A callable dynamic function | +| [`DynamicFunctionMut`](././types/dynamicfunctionmut.md) | A stateful and callable dynamic function | +| [`F32`](././types/f32.md) | A 32\-bit floating point number | +| [`F64`](././types/f64.md) | A 64\-bit floating point number | +| [`FunctionCallContext`](././types/functioncallcontext.md) | Function call context, if accepted by a function, means the function can access the world in arbitra\.\.\. | +| [`I128`](././types/i128.md) | A signed 128\-bit integer | +| [`I16`](././types/i16.md) | A signed 16\-bit integer | +| [`I32`](././types/i32.md) | A signed 32\-bit integer | +| [`I64`](././types/i64.md) | A signed 64\-bit integer | +| [`I8`](././types/i8.md) | A signed 8\-bit integer | +| [`Isize`](././types/isize.md) | A signed pointer\-sized integer | +| [`OsString`](././types/osstring.md) | A heap allocated OS string | +| [`PathBuf`](././types/pathbuf.md) | A heap allocated file path | +| [`ReflectReference`](././types/reflectreference.md) | A reference to a reflectable type | +| [`ScriptValue`](././types/scriptvalue.md) | A value representing the union of all representable values | +| [`Str`](././types/str.md) | A string slice | +| [`String`](././types/string.md) | A heap allocated string | +| [`U128`](././types/u128.md) | An unsigned 128\-bit integer | +| [`U16`](././types/u16.md) | An unsigned 16\-bit integer | +| [`U32`](././types/u32.md) | An unsigned 32\-bit integer | +| [`U64`](././types/u64.md) | An unsigned 64\-bit integer | +| [`U8`](././types/u8.md) | An unsigned 8\-bit integer | +| [`Usize`](././types/usize.md) | An unsigned pointer\-sized integer | | [`EnumType`](././types/enumtype.md) | No Documentation 🚧 | | [`TupleStructType`](././types/tuplestructtype.md) | I am a tuple test type | | [`UnitType`](././types/unittype.md) | I am a unit test type | diff --git a/crates/ladfile/test_assets/test.lad.json b/crates/ladfile/test_assets/test.lad.json index 5707b07bd9..4a5643205e 100644 --- a/crates/ladfile/test_assets/test.lad.json +++ b/crates/ladfile/test_assets/test.lad.json @@ -62,7 +62,8 @@ "metadata": { "is_component": false, "is_resource": false, - "is_reflect": true + "is_reflect": true, + "mapped_to_primitive_kind": null } }, "ladfile_builder::test::GenericStructType": { @@ -71,7 +72,7 @@ "path": "ladfile_builder::test::GenericStructType", "generics": [ { - "type_id": "usize", + "type_id": "Usize", "name": "T" } ], @@ -102,7 +103,358 @@ "metadata": { "is_component": false, "is_resource": false, - "is_reflect": true + "is_reflect": true, + "mapped_to_primitive_kind": null + } + }, + "Bool": { + "identifier": "Bool", + "path": "Bool", + "documentation": "A boolean value", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "bool" + } + }, + "Char": { + "identifier": "Char", + "path": "Char", + "documentation": "An 8-bit character", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "char" + } + }, + "DynamicFunction": { + "identifier": "DynamicFunction", + "path": "DynamicFunction", + "documentation": "A callable dynamic function", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "dynamicFunction" + } + }, + "DynamicFunctionMut": { + "identifier": "DynamicFunctionMut", + "path": "DynamicFunctionMut", + "documentation": "A stateful and callable dynamic function", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "dynamicFunctionMut" + } + }, + "F32": { + "identifier": "F32", + "path": "F32", + "documentation": "A 32-bit floating point number", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "f32" + } + }, + "F64": { + "identifier": "F64", + "path": "F64", + "documentation": "A 64-bit floating point number", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "f64" + } + }, + "FunctionCallContext": { + "identifier": "FunctionCallContext", + "path": "FunctionCallContext", + "documentation": "Function call context, if accepted by a function, means the function can access the world in arbitrary ways.", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "functionCallContext" + } + }, + "I128": { + "identifier": "I128", + "path": "I128", + "documentation": "A signed 128-bit integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "i128" + } + }, + "I16": { + "identifier": "I16", + "path": "I16", + "documentation": "A signed 16-bit integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "i16" + } + }, + "I32": { + "identifier": "I32", + "path": "I32", + "documentation": "A signed 32-bit integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "i32" + } + }, + "I64": { + "identifier": "I64", + "path": "I64", + "documentation": "A signed 64-bit integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "i64" + } + }, + "I8": { + "identifier": "I8", + "path": "I8", + "documentation": "A signed 8-bit integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "i8" + } + }, + "Isize": { + "identifier": "Isize", + "path": "Isize", + "documentation": "A signed pointer-sized integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "isize" + } + }, + "OsString": { + "identifier": "OsString", + "path": "OsString", + "documentation": "A heap allocated OS string", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "osString" + } + }, + "PathBuf": { + "identifier": "PathBuf", + "path": "PathBuf", + "documentation": "A heap allocated file path", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "pathBuf" + } + }, + "ReflectReference": { + "identifier": "ReflectReference", + "path": "ReflectReference", + "documentation": "A reference to a reflectable type", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "reflectReference" + } + }, + "ScriptValue": { + "identifier": "ScriptValue", + "path": "ScriptValue", + "documentation": "A value representing the union of all representable values", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "scriptValue" + } + }, + "Str": { + "identifier": "Str", + "path": "Str", + "documentation": "A string slice", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "str" + } + }, + "String": { + "identifier": "String", + "path": "String", + "documentation": "A heap allocated string", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "string" + } + }, + "U128": { + "identifier": "U128", + "path": "U128", + "documentation": "An unsigned 128-bit integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "u128" + } + }, + "U16": { + "identifier": "U16", + "path": "U16", + "documentation": "An unsigned 16-bit integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "u16" + } + }, + "U32": { + "identifier": "U32", + "path": "U32", + "documentation": "An unsigned 32-bit integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "u32" + } + }, + "U64": { + "identifier": "U64", + "path": "U64", + "documentation": "An unsigned 64-bit integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "u64" + } + }, + "U8": { + "identifier": "U8", + "path": "U8", + "documentation": "An unsigned 8-bit integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "u8" + } + }, + "Usize": { + "identifier": "Usize", + "path": "Usize", + "documentation": "An unsigned pointer-sized integer", + "layout": null, + "generated": false, + "insignificance": 1000, + "metadata": { + "is_component": false, + "is_resource": false, + "is_reflect": false, + "mapped_to_primitive_kind": "usize" } }, "ladfile_builder::test::EnumType": { @@ -148,7 +500,8 @@ "metadata": { "is_component": false, "is_resource": false, - "is_reflect": true + "is_reflect": true, + "mapped_to_primitive_kind": null } }, "ladfile_builder::test::TupleStructType": { @@ -177,7 +530,8 @@ "metadata": { "is_component": false, "is_resource": false, - "is_reflect": true + "is_reflect": true, + "mapped_to_primitive_kind": null } }, "ladfile_builder::test::UnitType": { @@ -194,7 +548,8 @@ "metadata": { "is_component": false, "is_resource": false, - "is_reflect": true + "is_reflect": true, + "mapped_to_primitive_kind": null } } }, @@ -295,6 +650,5 @@ } } }, - "primitives": {}, "description": "## Hello gentlemen\n I am markdown file.\n - hello\n - world" } \ No newline at end of file diff --git a/xtask/src/main.rs b/xtask/src/main.rs index aba753a007..e598e57bce 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -1823,6 +1823,10 @@ impl Xtasks { test_args.push("--exclude".to_owned()); test_args.push("xtask".to_owned()); + if std::env::var("BLESS_MODE").is_ok() { + test_args.push("--no-fail-fast".to_owned()) + } + Self::run_workspace_command( &app_settings, "test", From 4313958d446f6d8a1c713fb84a26a16c90cd1f37 Mon Sep 17 00:00:00 2001 From: makspll Date: Wed, 5 Nov 2025 23:07:33 +0000 Subject: [PATCH 15/20] add docs --- .luarc.json | 2 +- docs/src/SUMMARY.md | 5 ++ docs/src/ScriptTooling/summary.md | 51 +++++++++++++++++++ .../src/Summary/scripting-ide-integrations.md | 3 ++ 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 docs/src/ScriptTooling/summary.md create mode 100644 docs/src/Summary/scripting-ide-integrations.md diff --git a/.luarc.json b/.luarc.json index 6defa13128..389e940799 100644 --- a/.luarc.json +++ b/.luarc.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", "workspace.library": [ - "assets" + "assets/definitions" ], "runtime.version": "Lua 5.4", "hint.enable": false, diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index f62f56a21a..a80948c5a1 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -12,6 +12,11 @@ - [Callbacks](./Summary/callbacks.md) - [Script Systems](./ScriptSystems/introduction.md) - [Examples](./Examples/introduction.md) +- [Scripting IDE Integrations](./ScriptTooling/summary.md) + +# Script Tooling + +- [Ladfiles](./ScriptTooling/summary.md) # Script Pipeline diff --git a/docs/src/ScriptTooling/summary.md b/docs/src/ScriptTooling/summary.md new file mode 100644 index 0000000000..9953da8f97 --- /dev/null +++ b/docs/src/ScriptTooling/summary.md @@ -0,0 +1,51 @@ +## Ladfiles +BMS provides a custom Language Agnostic Declaration format (LAD), which can be used to integrate with other tooling. + +If you use `#[script_bindings]` macros, these files will magically contain your code comments, bindings as well as everything else required to drive other powerful integrations. + +The declaration file is generated from the type registry and serves as a light abstraction layer simplifying the traversal of all +available types and globals as well as functions. + +You can customize how / where and if these files are stored using the main BMS plugin group: +```rust,ignore + app.add_plugins(BMSPlugin.set::( + ScriptingFilesGenerationPlugin::new( + true, // enabled, you can use a compilation feature to disable this here + PathBuf::from("assets").join("definitions"), + Some(PathBuf::from("bindings.lad.json")), // do also save the ladfile itself + "Core BMS framework bindings", + true, + true, + ), + )); +``` + +This plugin is only available when one of the sub features (like `lua_language_server_files`) mentioned in this chapter is enabled. + + +You might not want to run this pipeline in your final binary, but rather bundle some of the generated files into some sort of development pack for modding. You can use compiler flags like `#[cfg(not(debug_assertions))]` to disable ladfile generation at runtime, or simply disable the lower level features within BMS to avoid compiling related dependencies too. + +## Lua Language Server + +
+ This feature is in early stages, the definitions provide 90% of the way there, but there are rough edges that will need to be worked out +
+ +[Luals](https://github.com/LuaLS/lua-language-server) or LLS, is an open source language server which integrates with many IDE's. + +It is powered by lua specific annotation or definition files which BMS can generate directly from its own LADfiles. + +To enable this simply enable the `lua_language_server_files` feature, and a `bindings.lua` definition file will be generated in the LADfile output directory in the `Startup` schedule. + +Script writers can then use this generated file by pointing their `.luarc.json` file to these definitions: +```json +{ + "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", + "workspace.library": [ + "assets/definitions" + ], + "runtime.version": "Lua 5.4", + "hint.enable": false, +} +``` + diff --git a/docs/src/Summary/scripting-ide-integrations.md b/docs/src/Summary/scripting-ide-integrations.md new file mode 100644 index 0000000000..485af5f03a --- /dev/null +++ b/docs/src/Summary/scripting-ide-integrations.md @@ -0,0 +1,3 @@ +# Scripting IDE Integrations + +See the [script tooling](../ScriptTooling/summary.md) section to find out more about how BMS integrates with other tooling to make scripting easier. \ No newline at end of file From 1916a6a52a6e5813627cb4795d033972c563e789 Mon Sep 17 00:00:00 2001 From: makspll Date: Wed, 5 Nov 2025 23:15:14 +0000 Subject: [PATCH 16/20] bump assert_cmd --- Cargo.toml | 2 +- .../tests/integration_tests.rs | 7 +++---- .../tests/book_integration_tests.rs | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 37ab7aa4b0..10e246aeb4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -222,7 +222,7 @@ pretty_assertions = { version = "1.4", default-features = false, features = [ "std", ] } manifest-dir-macros = { version = "0.1.18", default-features = false } -assert_cmd = { version = "2.0", default-features = false } +assert_cmd = { version = "2.1", default-features = false } tokio = { version = "1", default-features = false } bevy_console = { version = "0.14", default-features = false } tracing-tracy = { version = "0.11", default-features = false } diff --git a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs index feab346342..9aa6a9f5df 100644 --- a/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs +++ b/crates/lad_backends/lua_language_server_lad_backend/tests/integration_tests.rs @@ -2,9 +2,9 @@ use std::{fs::DirEntry, path::PathBuf}; -use assert_cmd::Command; +use assert_cmd::{Command, cargo_bin}; fn add_executable_dir_to_path() { - let command_path = Command::cargo_bin("lad-lls").expect("failed to find lad-lls binary"); + let command_path = Command::new(cargo_bin!("lad-lls")); let command_path = command_path.get_program(); let command_path = PathBuf::from(command_path); let dir = command_path @@ -62,8 +62,7 @@ fn main() { let folder_path = entry.path(); let ladfile_path = folder_path.join("test.lad.json"); - Command::cargo_bin("lad-lls") - .expect("failed to find lad-lls binary") + Command::new(cargo_bin!("lad-lls")) .arg("--input") .arg(&ladfile_path) .arg("--output") diff --git a/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs b/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs index 90c8a92959..7525132160 100644 --- a/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs +++ b/crates/lad_backends/mdbook_lad_preprocessor/tests/book_integration_tests.rs @@ -2,10 +2,10 @@ use std::path::PathBuf; -use assert_cmd::Command; +use assert_cmd::{Command, cargo_bin}; fn add_executable_dir_to_path() { - let command_path = Command::cargo_bin("mdbook-lad-preprocessor") - .expect("failed to find mdbook-lad-preprocessor binary"); + let command_path = Command::new(cargo_bin!("mdbook-lad-preprocessor")); + let command_path = command_path.get_program(); let command_path = PathBuf::from(command_path); let dir = command_path From f7354153f60f99f6998e1087424501af8713b41e Mon Sep 17 00:00:00 2001 From: makspll Date: Thu, 6 Nov 2025 07:54:48 +0000 Subject: [PATCH 17/20] fix mdbook --- docs/src/SUMMARY.md | 2 +- docs/src/ScriptTooling/{summary.md => introduction.md} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename docs/src/ScriptTooling/{summary.md => introduction.md} (100%) diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index a80948c5a1..1b5d4ecb6b 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -16,7 +16,7 @@ # Script Tooling -- [Ladfiles](./ScriptTooling/summary.md) +- [Ladfiles](./ScriptTooling/introduction.md) # Script Pipeline diff --git a/docs/src/ScriptTooling/summary.md b/docs/src/ScriptTooling/introduction.md similarity index 100% rename from docs/src/ScriptTooling/summary.md rename to docs/src/ScriptTooling/introduction.md From 8e9d38fcbf3e10d8bb8452173fb4481402119bea Mon Sep 17 00:00:00 2001 From: makspll Date: Thu, 6 Nov 2025 07:58:49 +0000 Subject: [PATCH 18/20] fix docs --- docs/src/SUMMARY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index 1b5d4ecb6b..387f724134 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -16,7 +16,7 @@ # Script Tooling -- [Ladfiles](./ScriptTooling/introduction.md) +- [LADfiles](./ScriptTooling/introduction.md) # Script Pipeline From 9d0073825dc3b6995e97958ff6111f9fef546a64 Mon Sep 17 00:00:00 2001 From: makspll Date: Thu, 6 Nov 2025 08:02:59 +0000 Subject: [PATCH 19/20] ladfile rename --- docs/src/ScriptTooling/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/ScriptTooling/introduction.md b/docs/src/ScriptTooling/introduction.md index 9953da8f97..bfa7b44f07 100644 --- a/docs/src/ScriptTooling/introduction.md +++ b/docs/src/ScriptTooling/introduction.md @@ -1,4 +1,4 @@ -## Ladfiles +## LADfiles BMS provides a custom Language Agnostic Declaration format (LAD), which can be used to integrate with other tooling. If you use `#[script_bindings]` macros, these files will magically contain your code comments, bindings as well as everything else required to drive other powerful integrations. From 59c3b01a044ef34a88b8217d17701c1a11ee6fa8 Mon Sep 17 00:00:00 2001 From: makspll Date: Thu, 6 Nov 2025 08:03:33 +0000 Subject: [PATCH 20/20] fix div --- docs/src/ScriptTooling/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/ScriptTooling/introduction.md b/docs/src/ScriptTooling/introduction.md index bfa7b44f07..94bf390167 100644 --- a/docs/src/ScriptTooling/introduction.md +++ b/docs/src/ScriptTooling/introduction.md @@ -27,7 +27,7 @@ You might not want to run this pipeline in your final binary, but rather bundle ## Lua Language Server -
+
This feature is in early stages, the definitions provide 90% of the way there, but there are rough edges that will need to be worked out