diff --git a/Cargo.lock b/Cargo.lock index 38be07290..676b50dae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12097,6 +12097,7 @@ dependencies = [ name = "unavi-shapes" version = "0.0.6" dependencies = [ + "glam 0.28.0", "hexasphere 14.1.0", "parry3d 0.17.0", "wit-bindgen-rt", diff --git a/wasm/example-unavi-scene/src/bindings.rs b/wasm/example-unavi-scene/src/bindings.rs index 71b2ad394..0ee852970 100644 --- a/wasm/example-unavi-scene/src/bindings.rs +++ b/wasm/example-unavi-scene/src/bindings.rs @@ -490,9 +490,57 @@ pub mod unavi { static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; + pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type Node = super::super::super::wired::scene::node::Node; + /// 2D + + #[derive(Debug)] + #[repr(transparent)] + pub struct Rectangle { + handle: _rt::Resource, + } + + impl Rectangle { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for Rectangle { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-drop]rectangle"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + /// 3D #[derive(Debug)] #[repr(transparent)] @@ -668,6 +716,138 @@ pub mod unavi { } } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn new(size: Vec2) -> Self { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[constructor]rectangle"] + fn wit_import(_: f32, _: f32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: f32, _: f32) -> i32 { + unreachable!() + } + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0)); + Rectangle::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn size(&self) -> Vec2 { + unsafe { + #[repr(align(4))] + struct RetArea([::core::mem::MaybeUninit; 8]); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); + let ptr0 = ret_area.0.as_mut_ptr().cast::(); + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.size"] + fn wit_import(_: i32, _: *mut u8); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: *mut u8) { + unreachable!() + } + wit_import((self).handle() as i32, ptr0); + let l1 = *ptr0.add(0).cast::(); + let l2 = *ptr0.add(4).cast::(); + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn set_size(&self, value: Vec2) { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.set-size"] + fn wit_import(_: i32, _: f32, _: f32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: f32, _: f32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a mesh of this shape. + pub fn to_mesh(&self) -> Mesh { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-mesh"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh of this shape. + pub fn to_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh and physics collider of this shape. + pub fn to_physics_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-physics-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } impl Cylinder { #[allow(unused_unsafe, clippy::all)] pub fn new(radius: f32, height: f32) -> Self { @@ -2243,6 +2423,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -4505,128 +4699,135 @@ pub(crate) use __export_script_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:script:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 5459] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xd6)\x01A\x02\x01A\x1e\ -\x01B\x06\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01\ -zv\x01wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btransl\ -ation\x01\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\0\x01B\x11\ -\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08material\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\x01@\x01\x04\ -self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15\ -[method]material.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x19[met\ -hod]material.set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\0\x16[method]materi\ -al.color\x01\x09\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\0\x1a[method]materi\ -al.set-color\x01\x0a\x03\x01\x14wired:scene/material\x05\x01\x02\x03\0\x01\x08ma\ -terial\x01B)\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x04\0\x09primitive\x03\ -\x01\x04\0\x04mesh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\0\x14[method]pri\ -mitive.id\x01\x05\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]\ -primitive.material\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\ -\0\x04\0\x1e[method]primitive.set-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05\ -value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04\ -self\x04\x05value\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\ -\x1f[method]primitive.set-positions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\ -\x0f\x01i\x03\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04\ -self\x12\0y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[m\ -ethod]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]me\ -sh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[metho\ -d]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.\ -create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d[metho\ -d]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04\ -vec3\x02\x03\0\0\x04quat\x01B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\ -\x02\x01\x05\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-sid\ -e\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05join\ -t\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\ -\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06\ -middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\ -\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\ -\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01\ -q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\ -\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\ -\0\x13\x03\x01\x11wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\ -\x02\x03\x02\x01\x07\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\ -\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handle-input\x01\x07\ -\x03\x01\x13wired:input/handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04ve\ -c3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0esha\ -pe-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphe\ -re\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynam\ -ic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05\ -shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\ -\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\ -\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-\ -body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04\ -self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05\ -value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]\ -rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\ -\x13wired:physics/types\x05\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-han\ -dler\x02\x03\0\0\x09transform\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-b\ -ody\x01BB\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0d\ -input-handler\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\ -\x02\x01\x0d\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\ -\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]nod\ -e\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\ -\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05v\ -alues\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\ -\x02\x03\0\x06\x04node\x01B\"\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\0\x02\ -\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\x04root\x03\x01\x04\0\x05scene\x03\ -\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18[static]root.list-scenes\x01\x08\x01\ -h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[static]root.add-scene\x01\x0a\x04\0\x19\ -[static]root.remove-scene\x01\x0a\x01@\0\0\x06\x04\0\x12[constructor]scene\x01\x0b\ -\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\x0d\x04\0\x18[method]scene.list-nodes\x01\ -\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19[method]scene.create-node\x01\x0f\x01h\x03\ -\x01@\x02\x04self\x09\x05value\x10\x01\0\x04\0\x16[method]scene.add-node\x01\x11\ -\x04\0\x19[method]scene.remove-node\x01\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17\ -[method]scene.transform\x01\x12\x01@\x02\x04self\x09\x05value\x01\x01\0\x04\0\x1b\ -[method]scene.set-transform\x01\x13\x01@\x01\x04self\x09\0\x7f\x04\0\x14[method]\ -scene.active\x01\x14\x01@\x02\x04self\x09\x05value\x7f\x01\0\x04\0\x18[method]sc\ -ene.set-active\x01\x15\x03\x01\x0funavi:scene/api\x05\x11\x01BI\x02\x03\x02\x01\x04\ -\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\ -\x10\x04\0\x04node\x03\0\x04\x04\0\x08cylinder\x03\x01\x04\0\x06cuboid\x03\x01\x01\ -r\x01\x0csubdivisions}\x04\0\x0asphere-ico\x03\0\x08\x01r\x02\x07sectors}\x06sta\ -cks}\x04\0\x09sphere-uv\x03\0\x0a\x01q\x02\x03ico\x01\x09\0\x02uv\x01\x0b\0\x04\0\ -\x0bsphere-kind\x03\0\x0c\x04\0\x06sphere\x03\x01\x01i\x06\x01@\x02\x06radiusv\x06\ -heightv\0\x0f\x04\0\x15[constructor]cylinder\x01\x10\x01h\x06\x01@\x01\x04self\x11\ -\0\x7f\x04\0\x14[method]cylinder.cap\x01\x12\x01@\x02\x04self\x11\x05value\x7f\x01\ -\0\x04\0\x18[method]cylinder.set-cap\x01\x13\x01@\x01\x04self\x11\0v\x04\0\x17[m\ -ethod]cylinder.height\x01\x14\x01@\x02\x04self\x11\x05valuev\x01\0\x04\0\x1b[met\ -hod]cylinder.set-height\x01\x15\x04\0\x17[method]cylinder.radius\x01\x14\x04\0\x1b\ -[method]cylinder.set-radius\x01\x15\x01@\x01\x04self\x11\0}\x04\0\x1b[method]cyl\ -inder.resolution\x01\x16\x01@\x02\x04self\x11\x05value}\x01\0\x04\0\x1f[method]c\ -ylinder.set-resolution\x01\x17\x04\0\x19[method]cylinder.segments\x01\x16\x04\0\x1d\ -[method]cylinder.set-segments\x01\x17\x01i\x03\x01@\x01\x04self\x11\0\x18\x04\0\x18\ -[method]cylinder.to-mesh\x01\x19\x01i\x05\x01@\x01\x04self\x11\0\x1a\x04\0\x18[m\ -ethod]cylinder.to-node\x01\x1b\x04\0\x20[method]cylinder.to-physics-node\x01\x1b\ -\x01i\x07\x01@\x01\x04size\x01\0\x1c\x04\0\x13[constructor]cuboid\x01\x1d\x01h\x07\ -\x01@\x01\x04self\x1e\0\x01\x04\0\x13[method]cuboid.size\x01\x1f\x01@\x02\x04sel\ -f\x1e\x05value\x01\x01\0\x04\0\x17[method]cuboid.set-size\x01\x20\x01@\x01\x04se\ -lf\x1e\0\x18\x04\0\x16[method]cuboid.to-mesh\x01!\x01@\x01\x04self\x1e\0\x1a\x04\ -\0\x16[method]cuboid.to-node\x01\"\x04\0\x1e[method]cuboid.to-physics-node\x01\"\ -\x01i\x0e\x01@\x01\x06radiusv\0#\x04\0\x16[static]sphere.new-ico\x01$\x04\0\x15[\ -static]sphere.new-uv\x01$\x01h\x0e\x01@\x01\x04self%\0v\x04\0\x15[method]sphere.\ -radius\x01&\x01@\x02\x04self%\x05valuev\x01\0\x04\0\x19[method]sphere.set-radius\ -\x01'\x01@\x01\x04self%\0\x0d\x04\0\x13[method]sphere.kind\x01(\x01@\x02\x04self\ -%\x05value\x0d\x01\0\x04\0\x17[method]sphere.set-kind\x01)\x01@\x01\x04self%\0\x18\ -\x04\0\x16[method]sphere.to-mesh\x01*\x01@\x01\x04self%\0\x1a\x04\0\x16[method]s\ -phere.to-node\x01+\x04\0\x1e[method]sphere.to-physics-node\x01+\x03\x01\x10unavi\ -:shapes/api\x05\x12\x01B\x07\x04\0\x06script\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13\ -[constructor]script\x01\x02\x01h\0\x01@\x02\x04self\x03\x05deltav\x01\0\x04\0\x15\ -[method]script.update\x01\x04\x04\x01\x12wired:script/types\x05\x13\x04\x01\x1ae\ -xample:unavi-scene/script\x04\0\x0b\x0c\x01\0\x06script\x03\0\0\0G\x09producers\x01\ -\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 5767] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x8a,\x01A\x02\x01A\x1f\ +\x01B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\ +\0\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01\ +r\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\0\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\ +\0\x05color\x03\0\0\x04\0\x08material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[co\ +nstructor]material\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]mat\ +erial.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15[method]material.name\x01\x07\x01\ +@\x02\x04self\x05\x05values\x01\0\x04\0\x19[method]material.set-name\x01\x08\x01\ +@\x01\x04self\x05\0\x01\x04\0\x16[method]material.color\x01\x09\x01@\x02\x04self\ +\x05\x05value\x01\x01\0\x04\0\x1a[method]material.set-color\x01\x0a\x03\x01\x14w\ +ired:scene/material\x05\x01\x02\x03\0\x01\x08material\x01B)\x02\x03\x02\x01\x02\x04\ +\0\x08material\x03\0\0\x04\0\x09primitive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\ +\x01@\x01\x04self\x04\0y\x04\0\x14[method]primitive.id\x01\x05\x01i\x01\x01k\x06\ +\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]primitive.material\x01\x08\x01h\x01\ +\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\0\x04\0\x1e[method]primitive.set\ +-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05value\x0c\x01\0\x04\0\x1d[method\ +]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04self\x04\x05value\x0e\x01\0\x04\ +\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\x1f[method]primitive.set-posit\ +ions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\ +\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04self\x12\0y\x04\0\x0f[metho\ +d]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[method]mesh.name\x01\x14\x01\ +@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]mesh.set-name\x01\x15\x01i\x02\ +\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[method]mesh.list-primitives\x01\x18\ +\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.create-primitive\x01\x19\x01@\x02\ +\x04self\x12\x05value\x16\x01\0\x04\0\x1d[method]mesh.remove-primitive\x01\x1a\x03\ +\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\ +\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\x02\x03\x02\x01\x07\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x04\0\x08collid\ +er\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\ +\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-handler\x02\x03\0\0\x09transfo\ +rm\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-body\x01BB\x02\x03\x02\x01\x0a\ +\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0dinput-handler\x03\0\x02\x02\x03\ +\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0d\x04\0\x08collider\x03\ +\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01\ +i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\ +\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]no\ +de.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-n\ +ame\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\ +\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\ +\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\ +\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[metho\ +d]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[metho\ +d]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11\ +[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\ +\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\ +\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\ +\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\ +\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04\ +self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k\ +*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k\ +-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01\ +/\x03\x01\x10wired:scene/node\x05\x0f\x02\x03\0\x06\x04node\x01B\"\x02\x03\x02\x01\ +\x0c\x04\0\x09transform\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\ +\x04root\x03\x01\x04\0\x05scene\x03\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18\ +[static]root.list-scenes\x01\x08\x01h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[\ +static]root.add-scene\x01\x0a\x04\0\x19[static]root.remove-scene\x01\x0a\x01@\0\0\ +\x06\x04\0\x12[constructor]scene\x01\x0b\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\ +\x0d\x04\0\x18[method]scene.list-nodes\x01\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19\ +[method]scene.create-node\x01\x0f\x01h\x03\x01@\x02\x04self\x09\x05value\x10\x01\ +\0\x04\0\x16[method]scene.add-node\x01\x11\x04\0\x19[method]scene.remove-node\x01\ +\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17[method]scene.transform\x01\x12\x01@\x02\ +\x04self\x09\x05value\x01\x01\0\x04\0\x1b[method]scene.set-transform\x01\x13\x01\ +@\x01\x04self\x09\0\x7f\x04\0\x14[method]scene.active\x01\x14\x01@\x02\x04self\x09\ +\x05value\x7f\x01\0\x04\0\x18[method]scene.set-active\x01\x15\x03\x01\x0funavi:s\ +cene/api\x05\x11\x02\x03\0\0\x04vec2\x01BY\x02\x03\x02\x01\x12\x04\0\x04vec2\x03\ +\0\0\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\x02\x02\x03\x02\x01\x0a\x04\0\x04me\ +sh\x03\0\x04\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x06\x04\0\x09rectangle\x03\x01\ +\x04\0\x08cylinder\x03\x01\x04\0\x06cuboid\x03\x01\x01r\x01\x0csubdivisions}\x04\ +\0\x0asphere-ico\x03\0\x0b\x01r\x02\x07sectors}\x06stacks}\x04\0\x09sphere-uv\x03\ +\0\x0d\x01q\x02\x03ico\x01\x0c\0\x02uv\x01\x0e\0\x04\0\x0bsphere-kind\x03\0\x0f\x04\ +\0\x06sphere\x03\x01\x01i\x08\x01@\x01\x04size\x01\0\x12\x04\0\x16[constructor]r\ +ectangle\x01\x13\x01h\x08\x01@\x01\x04self\x14\0\x01\x04\0\x16[method]rectangle.\ +size\x01\x15\x01@\x02\x04self\x14\x05value\x01\x01\0\x04\0\x1a[method]rectangle.\ +set-size\x01\x16\x01i\x05\x01@\x01\x04self\x14\0\x17\x04\0\x19[method]rectangle.\ +to-mesh\x01\x18\x01i\x07\x01@\x01\x04self\x14\0\x19\x04\0\x19[method]rectangle.t\ +o-node\x01\x1a\x04\0![method]rectangle.to-physics-node\x01\x1a\x01i\x09\x01@\x02\ +\x06radiusv\x06heightv\0\x1b\x04\0\x15[constructor]cylinder\x01\x1c\x01h\x09\x01\ +@\x01\x04self\x1d\0\x7f\x04\0\x14[method]cylinder.cap\x01\x1e\x01@\x02\x04self\x1d\ +\x05value\x7f\x01\0\x04\0\x18[method]cylinder.set-cap\x01\x1f\x01@\x01\x04self\x1d\ +\0v\x04\0\x17[method]cylinder.height\x01\x20\x01@\x02\x04self\x1d\x05valuev\x01\0\ +\x04\0\x1b[method]cylinder.set-height\x01!\x04\0\x17[method]cylinder.radius\x01\x20\ +\x04\0\x1b[method]cylinder.set-radius\x01!\x01@\x01\x04self\x1d\0}\x04\0\x1b[met\ +hod]cylinder.resolution\x01\"\x01@\x02\x04self\x1d\x05value}\x01\0\x04\0\x1f[met\ +hod]cylinder.set-resolution\x01#\x04\0\x19[method]cylinder.segments\x01\"\x04\0\x1d\ +[method]cylinder.set-segments\x01#\x01@\x01\x04self\x1d\0\x17\x04\0\x18[method]c\ +ylinder.to-mesh\x01$\x01@\x01\x04self\x1d\0\x19\x04\0\x18[method]cylinder.to-nod\ +e\x01%\x04\0\x20[method]cylinder.to-physics-node\x01%\x01i\x0a\x01@\x01\x04size\x03\ +\0&\x04\0\x13[constructor]cuboid\x01'\x01h\x0a\x01@\x01\x04self(\0\x03\x04\0\x13\ +[method]cuboid.size\x01)\x01@\x02\x04self(\x05value\x03\x01\0\x04\0\x17[method]c\ +uboid.set-size\x01*\x01@\x01\x04self(\0\x17\x04\0\x16[method]cuboid.to-mesh\x01+\ +\x01@\x01\x04self(\0\x19\x04\0\x16[method]cuboid.to-node\x01,\x04\0\x1e[method]c\ +uboid.to-physics-node\x01,\x01i\x11\x01@\x01\x06radiusv\0-\x04\0\x16[static]sphe\ +re.new-ico\x01.\x04\0\x15[static]sphere.new-uv\x01.\x01h\x11\x01@\x01\x04self/\0\ +v\x04\0\x15[method]sphere.radius\x010\x01@\x02\x04self/\x05valuev\x01\0\x04\0\x19\ +[method]sphere.set-radius\x011\x01@\x01\x04self/\0\x10\x04\0\x13[method]sphere.k\ +ind\x012\x01@\x02\x04self/\x05value\x10\x01\0\x04\0\x17[method]sphere.set-kind\x01\ +3\x01@\x01\x04self/\0\x17\x04\0\x16[method]sphere.to-mesh\x014\x01@\x01\x04self/\ +\0\x19\x04\0\x16[method]sphere.to-node\x015\x04\0\x1e[method]sphere.to-physics-n\ +ode\x015\x03\x01\x10unavi:shapes/api\x05\x13\x01B\x07\x04\0\x06script\x03\x01\x01\ +i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\x02\x01h\0\x01@\x02\x04self\x03\ +\x05deltav\x01\0\x04\0\x15[method]script.update\x01\x04\x04\x01\x12wired:script/\ +types\x05\x14\x04\x01\x1aexample:unavi-scene/script\x04\0\x0b\x0c\x01\0\x06scrip\ +t\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10\ +wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/example-unavi-shapes/src/bindings.rs b/wasm/example-unavi-shapes/src/bindings.rs index 3220c0a99..e71dd406f 100644 --- a/wasm/example-unavi-shapes/src/bindings.rs +++ b/wasm/example-unavi-shapes/src/bindings.rs @@ -490,9 +490,57 @@ pub mod unavi { static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; + pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type Node = super::super::super::wired::scene::node::Node; + /// 2D + + #[derive(Debug)] + #[repr(transparent)] + pub struct Rectangle { + handle: _rt::Resource, + } + + impl Rectangle { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for Rectangle { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-drop]rectangle"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + /// 3D #[derive(Debug)] #[repr(transparent)] @@ -668,6 +716,138 @@ pub mod unavi { } } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn new(size: Vec2) -> Self { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[constructor]rectangle"] + fn wit_import(_: f32, _: f32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: f32, _: f32) -> i32 { + unreachable!() + } + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0)); + Rectangle::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn size(&self) -> Vec2 { + unsafe { + #[repr(align(4))] + struct RetArea([::core::mem::MaybeUninit; 8]); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); + let ptr0 = ret_area.0.as_mut_ptr().cast::(); + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.size"] + fn wit_import(_: i32, _: *mut u8); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: *mut u8) { + unreachable!() + } + wit_import((self).handle() as i32, ptr0); + let l1 = *ptr0.add(0).cast::(); + let l2 = *ptr0.add(4).cast::(); + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn set_size(&self, value: Vec2) { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.set-size"] + fn wit_import(_: i32, _: f32, _: f32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: f32, _: f32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a mesh of this shape. + pub fn to_mesh(&self) -> Mesh { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-mesh"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh of this shape. + pub fn to_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh and physics collider of this shape. + pub fn to_physics_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-physics-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } impl Cylinder { #[allow(unused_unsafe, clippy::all)] pub fn new(radius: f32, height: f32) -> Self { @@ -2243,6 +2423,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -4505,129 +4699,135 @@ pub(crate) use __export_script_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:script:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 5460] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xd7)\x01A\x02\x01A\x1e\ -\x01B\x06\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01\ -zv\x01wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btransl\ -ation\x01\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\0\x01B\x11\ -\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08material\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\x01@\x01\x04\ -self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15\ -[method]material.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x19[met\ -hod]material.set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\0\x16[method]materi\ -al.color\x01\x09\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\0\x1a[method]materi\ -al.set-color\x01\x0a\x03\x01\x14wired:scene/material\x05\x01\x02\x03\0\x01\x08ma\ -terial\x01B)\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x04\0\x09primitive\x03\ -\x01\x04\0\x04mesh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\0\x14[method]pri\ -mitive.id\x01\x05\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]\ -primitive.material\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\ -\0\x04\0\x1e[method]primitive.set-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05\ -value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04\ -self\x04\x05value\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\ -\x1f[method]primitive.set-positions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\ -\x0f\x01i\x03\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04\ -self\x12\0y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[m\ -ethod]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]me\ -sh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[metho\ -d]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.\ -create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d[metho\ -d]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04\ -vec3\x02\x03\0\0\x04quat\x01B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\ -\x02\x01\x05\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-sid\ -e\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05join\ -t\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\ -\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06\ -middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\ -\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\ -\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01\ -q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\ -\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\ -\0\x13\x03\x01\x11wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\ -\x02\x03\x02\x01\x07\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\ -\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handle-input\x01\x07\ -\x03\x01\x13wired:input/handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04ve\ -c3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0esha\ -pe-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphe\ -re\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynam\ -ic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05\ -shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\ -\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\ -\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-\ -body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04\ -self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05\ -value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]\ -rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\ -\x13wired:physics/types\x05\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-han\ -dler\x02\x03\0\0\x09transform\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-b\ -ody\x01BB\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0d\ -input-handler\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\ -\x02\x01\x0d\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\ -\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]nod\ -e\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\ -\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05v\ -alues\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\ -\x02\x03\0\x06\x04node\x01B\"\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\0\x02\ -\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\x04root\x03\x01\x04\0\x05scene\x03\ -\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18[static]root.list-scenes\x01\x08\x01\ -h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[static]root.add-scene\x01\x0a\x04\0\x19\ -[static]root.remove-scene\x01\x0a\x01@\0\0\x06\x04\0\x12[constructor]scene\x01\x0b\ -\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\x0d\x04\0\x18[method]scene.list-nodes\x01\ -\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19[method]scene.create-node\x01\x0f\x01h\x03\ -\x01@\x02\x04self\x09\x05value\x10\x01\0\x04\0\x16[method]scene.add-node\x01\x11\ -\x04\0\x19[method]scene.remove-node\x01\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17\ -[method]scene.transform\x01\x12\x01@\x02\x04self\x09\x05value\x01\x01\0\x04\0\x1b\ -[method]scene.set-transform\x01\x13\x01@\x01\x04self\x09\0\x7f\x04\0\x14[method]\ -scene.active\x01\x14\x01@\x02\x04self\x09\x05value\x7f\x01\0\x04\0\x18[method]sc\ -ene.set-active\x01\x15\x03\x01\x0funavi:scene/api\x05\x11\x01BI\x02\x03\x02\x01\x04\ -\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\ -\x10\x04\0\x04node\x03\0\x04\x04\0\x08cylinder\x03\x01\x04\0\x06cuboid\x03\x01\x01\ -r\x01\x0csubdivisions}\x04\0\x0asphere-ico\x03\0\x08\x01r\x02\x07sectors}\x06sta\ -cks}\x04\0\x09sphere-uv\x03\0\x0a\x01q\x02\x03ico\x01\x09\0\x02uv\x01\x0b\0\x04\0\ -\x0bsphere-kind\x03\0\x0c\x04\0\x06sphere\x03\x01\x01i\x06\x01@\x02\x06radiusv\x06\ -heightv\0\x0f\x04\0\x15[constructor]cylinder\x01\x10\x01h\x06\x01@\x01\x04self\x11\ -\0\x7f\x04\0\x14[method]cylinder.cap\x01\x12\x01@\x02\x04self\x11\x05value\x7f\x01\ -\0\x04\0\x18[method]cylinder.set-cap\x01\x13\x01@\x01\x04self\x11\0v\x04\0\x17[m\ -ethod]cylinder.height\x01\x14\x01@\x02\x04self\x11\x05valuev\x01\0\x04\0\x1b[met\ -hod]cylinder.set-height\x01\x15\x04\0\x17[method]cylinder.radius\x01\x14\x04\0\x1b\ -[method]cylinder.set-radius\x01\x15\x01@\x01\x04self\x11\0}\x04\0\x1b[method]cyl\ -inder.resolution\x01\x16\x01@\x02\x04self\x11\x05value}\x01\0\x04\0\x1f[method]c\ -ylinder.set-resolution\x01\x17\x04\0\x19[method]cylinder.segments\x01\x16\x04\0\x1d\ -[method]cylinder.set-segments\x01\x17\x01i\x03\x01@\x01\x04self\x11\0\x18\x04\0\x18\ -[method]cylinder.to-mesh\x01\x19\x01i\x05\x01@\x01\x04self\x11\0\x1a\x04\0\x18[m\ -ethod]cylinder.to-node\x01\x1b\x04\0\x20[method]cylinder.to-physics-node\x01\x1b\ -\x01i\x07\x01@\x01\x04size\x01\0\x1c\x04\0\x13[constructor]cuboid\x01\x1d\x01h\x07\ -\x01@\x01\x04self\x1e\0\x01\x04\0\x13[method]cuboid.size\x01\x1f\x01@\x02\x04sel\ -f\x1e\x05value\x01\x01\0\x04\0\x17[method]cuboid.set-size\x01\x20\x01@\x01\x04se\ -lf\x1e\0\x18\x04\0\x16[method]cuboid.to-mesh\x01!\x01@\x01\x04self\x1e\0\x1a\x04\ -\0\x16[method]cuboid.to-node\x01\"\x04\0\x1e[method]cuboid.to-physics-node\x01\"\ -\x01i\x0e\x01@\x01\x06radiusv\0#\x04\0\x16[static]sphere.new-ico\x01$\x04\0\x15[\ -static]sphere.new-uv\x01$\x01h\x0e\x01@\x01\x04self%\0v\x04\0\x15[method]sphere.\ -radius\x01&\x01@\x02\x04self%\x05valuev\x01\0\x04\0\x19[method]sphere.set-radius\ -\x01'\x01@\x01\x04self%\0\x0d\x04\0\x13[method]sphere.kind\x01(\x01@\x02\x04self\ -%\x05value\x0d\x01\0\x04\0\x17[method]sphere.set-kind\x01)\x01@\x01\x04self%\0\x18\ -\x04\0\x16[method]sphere.to-mesh\x01*\x01@\x01\x04self%\0\x1a\x04\0\x16[method]s\ -phere.to-node\x01+\x04\0\x1e[method]sphere.to-physics-node\x01+\x03\x01\x10unavi\ -:shapes/api\x05\x12\x01B\x07\x04\0\x06script\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13\ -[constructor]script\x01\x02\x01h\0\x01@\x02\x04self\x03\x05deltav\x01\0\x04\0\x15\ -[method]script.update\x01\x04\x04\x01\x12wired:script/types\x05\x13\x04\x01\x1be\ -xample:unavi-shapes/script\x04\0\x0b\x0c\x01\0\x06script\x03\0\0\0G\x09producers\ -\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rust\x060.25\ -.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 5768] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x8b,\x01A\x02\x01A\x1f\ +\x01B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\ +\0\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01\ +r\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\0\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\ +\0\x05color\x03\0\0\x04\0\x08material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[co\ +nstructor]material\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]mat\ +erial.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15[method]material.name\x01\x07\x01\ +@\x02\x04self\x05\x05values\x01\0\x04\0\x19[method]material.set-name\x01\x08\x01\ +@\x01\x04self\x05\0\x01\x04\0\x16[method]material.color\x01\x09\x01@\x02\x04self\ +\x05\x05value\x01\x01\0\x04\0\x1a[method]material.set-color\x01\x0a\x03\x01\x14w\ +ired:scene/material\x05\x01\x02\x03\0\x01\x08material\x01B)\x02\x03\x02\x01\x02\x04\ +\0\x08material\x03\0\0\x04\0\x09primitive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\ +\x01@\x01\x04self\x04\0y\x04\0\x14[method]primitive.id\x01\x05\x01i\x01\x01k\x06\ +\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]primitive.material\x01\x08\x01h\x01\ +\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\0\x04\0\x1e[method]primitive.set\ +-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05value\x0c\x01\0\x04\0\x1d[method\ +]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04self\x04\x05value\x0e\x01\0\x04\ +\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\x1f[method]primitive.set-posit\ +ions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\ +\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04self\x12\0y\x04\0\x0f[metho\ +d]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[method]mesh.name\x01\x14\x01\ +@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]mesh.set-name\x01\x15\x01i\x02\ +\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[method]mesh.list-primitives\x01\x18\ +\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.create-primitive\x01\x19\x01@\x02\ +\x04self\x12\x05value\x16\x01\0\x04\0\x1d[method]mesh.remove-primitive\x01\x1a\x03\ +\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\ +\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\x02\x03\x02\x01\x07\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x04\0\x08collid\ +er\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\ +\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-handler\x02\x03\0\0\x09transfo\ +rm\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-body\x01BB\x02\x03\x02\x01\x0a\ +\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0dinput-handler\x03\0\x02\x02\x03\ +\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0d\x04\0\x08collider\x03\ +\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01\ +i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\ +\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]no\ +de.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-n\ +ame\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\ +\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\ +\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\ +\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[metho\ +d]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[metho\ +d]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11\ +[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\ +\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\ +\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\ +\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\ +\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04\ +self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k\ +*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k\ +-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01\ +/\x03\x01\x10wired:scene/node\x05\x0f\x02\x03\0\x06\x04node\x01B\"\x02\x03\x02\x01\ +\x0c\x04\0\x09transform\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\ +\x04root\x03\x01\x04\0\x05scene\x03\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18\ +[static]root.list-scenes\x01\x08\x01h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[\ +static]root.add-scene\x01\x0a\x04\0\x19[static]root.remove-scene\x01\x0a\x01@\0\0\ +\x06\x04\0\x12[constructor]scene\x01\x0b\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\ +\x0d\x04\0\x18[method]scene.list-nodes\x01\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19\ +[method]scene.create-node\x01\x0f\x01h\x03\x01@\x02\x04self\x09\x05value\x10\x01\ +\0\x04\0\x16[method]scene.add-node\x01\x11\x04\0\x19[method]scene.remove-node\x01\ +\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17[method]scene.transform\x01\x12\x01@\x02\ +\x04self\x09\x05value\x01\x01\0\x04\0\x1b[method]scene.set-transform\x01\x13\x01\ +@\x01\x04self\x09\0\x7f\x04\0\x14[method]scene.active\x01\x14\x01@\x02\x04self\x09\ +\x05value\x7f\x01\0\x04\0\x18[method]scene.set-active\x01\x15\x03\x01\x0funavi:s\ +cene/api\x05\x11\x02\x03\0\0\x04vec2\x01BY\x02\x03\x02\x01\x12\x04\0\x04vec2\x03\ +\0\0\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\x02\x02\x03\x02\x01\x0a\x04\0\x04me\ +sh\x03\0\x04\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x06\x04\0\x09rectangle\x03\x01\ +\x04\0\x08cylinder\x03\x01\x04\0\x06cuboid\x03\x01\x01r\x01\x0csubdivisions}\x04\ +\0\x0asphere-ico\x03\0\x0b\x01r\x02\x07sectors}\x06stacks}\x04\0\x09sphere-uv\x03\ +\0\x0d\x01q\x02\x03ico\x01\x0c\0\x02uv\x01\x0e\0\x04\0\x0bsphere-kind\x03\0\x0f\x04\ +\0\x06sphere\x03\x01\x01i\x08\x01@\x01\x04size\x01\0\x12\x04\0\x16[constructor]r\ +ectangle\x01\x13\x01h\x08\x01@\x01\x04self\x14\0\x01\x04\0\x16[method]rectangle.\ +size\x01\x15\x01@\x02\x04self\x14\x05value\x01\x01\0\x04\0\x1a[method]rectangle.\ +set-size\x01\x16\x01i\x05\x01@\x01\x04self\x14\0\x17\x04\0\x19[method]rectangle.\ +to-mesh\x01\x18\x01i\x07\x01@\x01\x04self\x14\0\x19\x04\0\x19[method]rectangle.t\ +o-node\x01\x1a\x04\0![method]rectangle.to-physics-node\x01\x1a\x01i\x09\x01@\x02\ +\x06radiusv\x06heightv\0\x1b\x04\0\x15[constructor]cylinder\x01\x1c\x01h\x09\x01\ +@\x01\x04self\x1d\0\x7f\x04\0\x14[method]cylinder.cap\x01\x1e\x01@\x02\x04self\x1d\ +\x05value\x7f\x01\0\x04\0\x18[method]cylinder.set-cap\x01\x1f\x01@\x01\x04self\x1d\ +\0v\x04\0\x17[method]cylinder.height\x01\x20\x01@\x02\x04self\x1d\x05valuev\x01\0\ +\x04\0\x1b[method]cylinder.set-height\x01!\x04\0\x17[method]cylinder.radius\x01\x20\ +\x04\0\x1b[method]cylinder.set-radius\x01!\x01@\x01\x04self\x1d\0}\x04\0\x1b[met\ +hod]cylinder.resolution\x01\"\x01@\x02\x04self\x1d\x05value}\x01\0\x04\0\x1f[met\ +hod]cylinder.set-resolution\x01#\x04\0\x19[method]cylinder.segments\x01\"\x04\0\x1d\ +[method]cylinder.set-segments\x01#\x01@\x01\x04self\x1d\0\x17\x04\0\x18[method]c\ +ylinder.to-mesh\x01$\x01@\x01\x04self\x1d\0\x19\x04\0\x18[method]cylinder.to-nod\ +e\x01%\x04\0\x20[method]cylinder.to-physics-node\x01%\x01i\x0a\x01@\x01\x04size\x03\ +\0&\x04\0\x13[constructor]cuboid\x01'\x01h\x0a\x01@\x01\x04self(\0\x03\x04\0\x13\ +[method]cuboid.size\x01)\x01@\x02\x04self(\x05value\x03\x01\0\x04\0\x17[method]c\ +uboid.set-size\x01*\x01@\x01\x04self(\0\x17\x04\0\x16[method]cuboid.to-mesh\x01+\ +\x01@\x01\x04self(\0\x19\x04\0\x16[method]cuboid.to-node\x01,\x04\0\x1e[method]c\ +uboid.to-physics-node\x01,\x01i\x11\x01@\x01\x06radiusv\0-\x04\0\x16[static]sphe\ +re.new-ico\x01.\x04\0\x15[static]sphere.new-uv\x01.\x01h\x11\x01@\x01\x04self/\0\ +v\x04\0\x15[method]sphere.radius\x010\x01@\x02\x04self/\x05valuev\x01\0\x04\0\x19\ +[method]sphere.set-radius\x011\x01@\x01\x04self/\0\x10\x04\0\x13[method]sphere.k\ +ind\x012\x01@\x02\x04self/\x05value\x10\x01\0\x04\0\x17[method]sphere.set-kind\x01\ +3\x01@\x01\x04self/\0\x17\x04\0\x16[method]sphere.to-mesh\x014\x01@\x01\x04self/\ +\0\x19\x04\0\x16[method]sphere.to-node\x015\x04\0\x1e[method]sphere.to-physics-n\ +ode\x015\x03\x01\x10unavi:shapes/api\x05\x13\x01B\x07\x04\0\x06script\x03\x01\x01\ +i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\x02\x01h\0\x01@\x02\x04self\x03\ +\x05deltav\x01\0\x04\0\x15[method]script.update\x01\x04\x04\x01\x12wired:script/\ +types\x05\x14\x04\x01\x1bexample:unavi-shapes/script\x04\0\x0b\x0c\x01\0\x06scri\ +pt\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10\ +wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/example-unavi-shapes/src/lib.rs b/wasm/example-unavi-shapes/src/lib.rs index b82769a25..3f69515ff 100644 --- a/wasm/example-unavi-shapes/src/lib.rs +++ b/wasm/example-unavi-shapes/src/lib.rs @@ -2,9 +2,9 @@ use bindings::{ exports::wired::script::types::{Guest, GuestScript}, unavi::{ scene::api::{Root, Scene}, - shapes::api::{Cuboid, Cylinder, Sphere, Vec3}, + shapes::api::{Cuboid, Cylinder, Rectangle, Sphere}, }, - wired::math::types::Transform, + wired::math::types::{Transform, Vec2, Vec3}, }; #[allow(warnings)] @@ -17,6 +17,7 @@ impl GuestScript for Script { fn new() -> Self { let scene = Scene::new(); + // 3D let cuboid = Cuboid::new(Vec3::new(1.0, 0.5, 1.5)).to_physics_node(); cuboid.set_transform(Transform::from_translation(Vec3::new(3.0, 0.0, 0.0))); scene.add_node(&cuboid); @@ -32,6 +33,11 @@ impl GuestScript for Script { let cylinder = Cylinder::new(0.5, 1.0).to_physics_node(); scene.add_node(&cylinder); + // 2D + let rectangle = Rectangle::new(Vec2::splat(1.0)).to_physics_node(); + rectangle.set_transform(Transform::from_translation(Vec3::new(-1.5, 0.0, 0.0))); + scene.add_node(&rectangle); + Root::add_scene(&scene); Script diff --git a/wasm/example-unavi-ui/Cargo.toml b/wasm/example-unavi-ui/Cargo.toml index 6c57ec8e2..928969334 100644 --- a/wasm/example-unavi-ui/Cargo.toml +++ b/wasm/example-unavi-ui/Cargo.toml @@ -17,6 +17,7 @@ package = "example:unavi-ui" [package.metadata.component.target.dependencies] "unavi:scene" = { path = "../unavi-scene/wit" } +"unavi:shapes" = { path = "../unavi-shapes/wit" } "unavi:ui" = { path = "../unavi-ui/wit" } "wired:input" = { path = "../../wired-protocol/spatial/wit/wired-input" } "wired:log" = { path = "../../wired-protocol/spatial/wit/wired-log" } diff --git a/wasm/example-unavi-ui/src/bindings.rs b/wasm/example-unavi-ui/src/bindings.rs index 65122ddd8..94d19db93 100644 --- a/wasm/example-unavi-ui/src/bindings.rs +++ b/wasm/example-unavi-ui/src/bindings.rs @@ -2197,6 +2197,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -4459,127 +4473,127 @@ pub(crate) use __export_script_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:script:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 5331] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xd6(\x01A\x02\x01A#\x01\ -B\x06\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01z\ -v\x01wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btransla\ -tion\x01\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\0\x01B\x11\ -\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08material\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\x01@\x01\x04\ -self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15\ -[method]material.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x19[met\ -hod]material.set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\0\x16[method]materi\ -al.color\x01\x09\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\0\x1a[method]materi\ -al.set-color\x01\x0a\x03\x01\x14wired:scene/material\x05\x01\x02\x03\0\x01\x08ma\ -terial\x01B)\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x04\0\x09primitive\x03\ -\x01\x04\0\x04mesh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\0\x14[method]pri\ -mitive.id\x01\x05\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]\ -primitive.material\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\ -\0\x04\0\x1e[method]primitive.set-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05\ -value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04\ -self\x04\x05value\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\ -\x1f[method]primitive.set-positions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\ -\x0f\x01i\x03\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04\ -self\x12\0y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[m\ -ethod]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]me\ -sh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[metho\ -d]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.\ -create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d[metho\ -d]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04\ -vec3\x02\x03\0\0\x04quat\x01B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\ -\x02\x01\x05\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-sid\ -e\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05join\ -t\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\ -\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06\ -middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\ -\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\ -\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01\ -q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\ -\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\ -\0\x13\x03\x01\x11wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\ -\x02\x03\x02\x01\x07\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\ -\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handle-input\x01\x07\ -\x03\x01\x13wired:input/handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04ve\ -c3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0esha\ -pe-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphe\ -re\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynam\ -ic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05\ -shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\ -\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\ -\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-\ -body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04\ -self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05\ -value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]\ -rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\ -\x13wired:physics/types\x05\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-han\ -dler\x02\x03\0\0\x09transform\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-b\ -ody\x01BB\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0d\ -input-handler\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\ -\x02\x01\x0d\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\ -\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]nod\ -e\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\ -\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05v\ -alues\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\ -\x02\x03\0\x06\x04node\x01B\"\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\0\x02\ -\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\x04root\x03\x01\x04\0\x05scene\x03\ -\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18[static]root.list-scenes\x01\x08\x01\ -h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[static]root.add-scene\x01\x0a\x04\0\x19\ -[static]root.remove-scene\x01\x0a\x01@\0\0\x06\x04\0\x12[constructor]scene\x01\x0b\ -\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\x0d\x04\0\x18[method]scene.list-nodes\x01\ -\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19[method]scene.create-node\x01\x0f\x01h\x03\ -\x01@\x02\x04self\x09\x05value\x10\x01\0\x04\0\x16[method]scene.add-node\x01\x11\ -\x04\0\x19[method]scene.remove-node\x01\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17\ -[method]scene.transform\x01\x12\x01@\x02\x04self\x09\x05value\x01\x01\0\x04\0\x1b\ -[method]scene.set-transform\x01\x13\x01@\x01\x04self\x09\0\x7f\x04\0\x14[method]\ -scene.active\x01\x14\x01@\x02\x04self\x09\x05value\x7f\x01\0\x04\0\x18[method]sc\ -ene.set-active\x01\x15\x03\x01\x0funavi:scene/api\x05\x11\x01B\x1c\x02\x03\x02\x01\ -\x10\x04\0\x04node\x03\0\0\x04\0\x09container\x03\x01\x01m\x03\x06center\x03end\x05\ -start\x04\0\x09alignment\x03\0\x03\x01i\x02\x01@\0\0\x05\x04\0\x16[constructor]c\ -ontainer\x01\x06\x01h\x02\x01i\x01\x01@\x01\x04self\x07\0\x08\x04\0\x16[method]c\ -ontainer.root\x01\x09\x01@\x01\x04self\x07\0v\x04\0\x17[method]container.x-len\x01\ -\x0a\x04\0\x17[method]container.y-len\x01\x0a\x04\0\x17[method]container.z-len\x01\ -\x0a\x01@\x02\x04self\x07\x05valuev\x01\0\x04\0\x1b[method]container.set-x-len\x01\ -\x0b\x04\0\x1b[method]container.set-y-len\x01\x0b\x04\0\x1b[method]container.set\ --z-len\x01\x0b\x01@\x01\x04self\x07\0\x04\x04\0\x19[method]container.align-x\x01\ -\x0c\x04\0\x19[method]container.align-y\x01\x0c\x04\0\x19[method]container.align\ --z\x01\x0c\x01@\x02\x04self\x07\x05value\x04\x01\0\x04\0\x1d[method]container.se\ -t-align-x\x01\x0d\x04\0\x1d[method]container.set-align-y\x01\x0d\x04\0\x1d[metho\ -d]container.set-align-z\x01\x0d\x03\x01\x12unavi:ui/container\x05\x12\x02\x03\0\x08\ -\x09container\x01B\x0a\x02\x03\x02\x01\x13\x04\0\x09container\x03\0\0\x04\0\x06b\ -utton\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x13[constructor]button\x01\x04\x01h\x02\ -\x01i\x01\x01@\x01\x04self\x05\0\x06\x04\0\x13[method]button.root\x01\x07\x03\x01\ -\x0funavi:ui/button\x05\x14\x01B\x1d\x02\x03\x02\x01\x13\x04\0\x09container\x03\0\ -\0\x04\0\x04grid\x03\x01\x01m\x07\x01x\x01y\x01z\x02xy\x02xz\x02yz\x03xyz\x04\0\x09\ -direction\x03\0\x03\x01i\x02\x01@\0\0\x05\x04\0\x11[constructor]grid\x01\x06\x01\ -h\x02\x01i\x01\x01@\x01\x04self\x07\0\x08\x04\0\x11[method]grid.root\x01\x09\x01\ -@\x01\x04self\x07\0y\x04\0\x14[method]grid.columns\x01\x0a\x01@\x02\x04self\x07\x05\ -valuey\x01\0\x04\0\x18[method]grid.set-columns\x01\x0b\x04\0\x11[method]grid.row\ -s\x01\x0a\x04\0\x15[method]grid.set-rows\x01\x0b\x01@\x01\x04self\x07\0\x04\x04\0\ -\x16[method]grid.direction\x01\x0c\x01@\x02\x04self\x07\x05value\x04\x01\0\x04\0\ -\x1a[method]grid.set-direction\x01\x0d\x01h\x01\x01@\x02\x04self\x07\x04item\x0e\ -\x01\0\x04\0\x15[method]grid.add-item\x01\x0f\x04\0\x18[method]grid.remove-item\x01\ -\x0f\x01p\x08\x01@\x01\x04self\x07\0\x10\x04\0\x17[method]grid.list-items\x01\x11\ -\x03\x01\x0dunavi:ui/grid\x05\x15\x01B\x07\x04\0\x06script\x03\x01\x01i\0\x01@\0\ -\0\x01\x04\0\x13[constructor]script\x01\x02\x01h\0\x01@\x02\x04self\x03\x05delta\ -v\x01\0\x04\0\x15[method]script.update\x01\x04\x04\x01\x12wired:script/types\x05\ -\x16\x04\x01\x17example:unavi-ui/script\x04\0\x0b\x0c\x01\0\x06script\x03\0\0\0G\ -\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen\ --rust\x060.25.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 5350] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xe9(\x01A\x02\x01A#\x01\ +B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\0\ +\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01r\ +\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\0\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\ +\0\x05color\x03\0\0\x04\0\x08material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[co\ +nstructor]material\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]mat\ +erial.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15[method]material.name\x01\x07\x01\ +@\x02\x04self\x05\x05values\x01\0\x04\0\x19[method]material.set-name\x01\x08\x01\ +@\x01\x04self\x05\0\x01\x04\0\x16[method]material.color\x01\x09\x01@\x02\x04self\ +\x05\x05value\x01\x01\0\x04\0\x1a[method]material.set-color\x01\x0a\x03\x01\x14w\ +ired:scene/material\x05\x01\x02\x03\0\x01\x08material\x01B)\x02\x03\x02\x01\x02\x04\ +\0\x08material\x03\0\0\x04\0\x09primitive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\ +\x01@\x01\x04self\x04\0y\x04\0\x14[method]primitive.id\x01\x05\x01i\x01\x01k\x06\ +\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]primitive.material\x01\x08\x01h\x01\ +\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\0\x04\0\x1e[method]primitive.set\ +-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05value\x0c\x01\0\x04\0\x1d[method\ +]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04self\x04\x05value\x0e\x01\0\x04\ +\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\x1f[method]primitive.set-posit\ +ions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\ +\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04self\x12\0y\x04\0\x0f[metho\ +d]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[method]mesh.name\x01\x14\x01\ +@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]mesh.set-name\x01\x15\x01i\x02\ +\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[method]mesh.list-primitives\x01\x18\ +\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.create-primitive\x01\x19\x01@\x02\ +\x04self\x12\x05value\x16\x01\0\x04\0\x1d[method]mesh.remove-primitive\x01\x1a\x03\ +\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\ +\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\x02\x03\x02\x01\x07\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x04\0\x08collid\ +er\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\ +\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-handler\x02\x03\0\0\x09transfo\ +rm\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-body\x01BB\x02\x03\x02\x01\x0a\ +\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0dinput-handler\x03\0\x02\x02\x03\ +\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0d\x04\0\x08collider\x03\ +\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01\ +i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\ +\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]no\ +de.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-n\ +ame\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\ +\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\ +\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\ +\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[metho\ +d]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[metho\ +d]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11\ +[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\ +\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\ +\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\ +\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\ +\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04\ +self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k\ +*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k\ +-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01\ +/\x03\x01\x10wired:scene/node\x05\x0f\x02\x03\0\x06\x04node\x01B\"\x02\x03\x02\x01\ +\x0c\x04\0\x09transform\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\ +\x04root\x03\x01\x04\0\x05scene\x03\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18\ +[static]root.list-scenes\x01\x08\x01h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[\ +static]root.add-scene\x01\x0a\x04\0\x19[static]root.remove-scene\x01\x0a\x01@\0\0\ +\x06\x04\0\x12[constructor]scene\x01\x0b\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\ +\x0d\x04\0\x18[method]scene.list-nodes\x01\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19\ +[method]scene.create-node\x01\x0f\x01h\x03\x01@\x02\x04self\x09\x05value\x10\x01\ +\0\x04\0\x16[method]scene.add-node\x01\x11\x04\0\x19[method]scene.remove-node\x01\ +\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17[method]scene.transform\x01\x12\x01@\x02\ +\x04self\x09\x05value\x01\x01\0\x04\0\x1b[method]scene.set-transform\x01\x13\x01\ +@\x01\x04self\x09\0\x7f\x04\0\x14[method]scene.active\x01\x14\x01@\x02\x04self\x09\ +\x05value\x7f\x01\0\x04\0\x18[method]scene.set-active\x01\x15\x03\x01\x0funavi:s\ +cene/api\x05\x11\x01B\x1c\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\x09con\ +tainer\x03\x01\x01m\x03\x06center\x03end\x05start\x04\0\x09alignment\x03\0\x03\x01\ +i\x02\x01@\0\0\x05\x04\0\x16[constructor]container\x01\x06\x01h\x02\x01i\x01\x01\ +@\x01\x04self\x07\0\x08\x04\0\x16[method]container.root\x01\x09\x01@\x01\x04self\ +\x07\0v\x04\0\x17[method]container.x-len\x01\x0a\x04\0\x17[method]container.y-le\ +n\x01\x0a\x04\0\x17[method]container.z-len\x01\x0a\x01@\x02\x04self\x07\x05value\ +v\x01\0\x04\0\x1b[method]container.set-x-len\x01\x0b\x04\0\x1b[method]container.\ +set-y-len\x01\x0b\x04\0\x1b[method]container.set-z-len\x01\x0b\x01@\x01\x04self\x07\ +\0\x04\x04\0\x19[method]container.align-x\x01\x0c\x04\0\x19[method]container.ali\ +gn-y\x01\x0c\x04\0\x19[method]container.align-z\x01\x0c\x01@\x02\x04self\x07\x05\ +value\x04\x01\0\x04\0\x1d[method]container.set-align-x\x01\x0d\x04\0\x1d[method]\ +container.set-align-y\x01\x0d\x04\0\x1d[method]container.set-align-z\x01\x0d\x03\ +\x01\x12unavi:ui/container\x05\x12\x02\x03\0\x08\x09container\x01B\x0a\x02\x03\x02\ +\x01\x13\x04\0\x09container\x03\0\0\x04\0\x06button\x03\x01\x01i\x02\x01@\0\0\x03\ +\x04\0\x13[constructor]button\x01\x04\x01h\x02\x01i\x01\x01@\x01\x04self\x05\0\x06\ +\x04\0\x13[method]button.root\x01\x07\x03\x01\x0funavi:ui/button\x05\x14\x01B\x1d\ +\x02\x03\x02\x01\x13\x04\0\x09container\x03\0\0\x04\0\x04grid\x03\x01\x01m\x07\x01\ +x\x01y\x01z\x02xy\x02xz\x02yz\x03xyz\x04\0\x09direction\x03\0\x03\x01i\x02\x01@\0\ +\0\x05\x04\0\x11[constructor]grid\x01\x06\x01h\x02\x01i\x01\x01@\x01\x04self\x07\ +\0\x08\x04\0\x11[method]grid.root\x01\x09\x01@\x01\x04self\x07\0y\x04\0\x14[meth\ +od]grid.columns\x01\x0a\x01@\x02\x04self\x07\x05valuey\x01\0\x04\0\x18[method]gr\ +id.set-columns\x01\x0b\x04\0\x11[method]grid.rows\x01\x0a\x04\0\x15[method]grid.\ +set-rows\x01\x0b\x01@\x01\x04self\x07\0\x04\x04\0\x16[method]grid.direction\x01\x0c\ +\x01@\x02\x04self\x07\x05value\x04\x01\0\x04\0\x1a[method]grid.set-direction\x01\ +\x0d\x01h\x01\x01@\x02\x04self\x07\x04item\x0e\x01\0\x04\0\x15[method]grid.add-i\ +tem\x01\x0f\x04\0\x18[method]grid.remove-item\x01\x0f\x01p\x08\x01@\x01\x04self\x07\ +\0\x10\x04\0\x17[method]grid.list-items\x01\x11\x03\x01\x0dunavi:ui/grid\x05\x15\ +\x01B\x07\x04\0\x06script\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13[constructor]scri\ +pt\x01\x02\x01h\0\x01@\x02\x04self\x03\x05deltav\x01\0\x04\0\x15[method]script.u\ +pdate\x01\x04\x04\x01\x12wired:script/types\x05\x16\x04\x01\x17example:unavi-ui/\ +script\x04\0\x0b\x0c\x01\0\x06script\x03\0\0\0G\x09producers\x01\x0cprocessed-by\ +\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/example-wired-input/src/bindings.rs b/wasm/example-wired-input/src/bindings.rs index af88506e8..e30d6e9de 100644 --- a/wasm/example-wired-input/src/bindings.rs +++ b/wasm/example-wired-input/src/bindings.rs @@ -490,9 +490,57 @@ pub mod unavi { static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; + pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type Node = super::super::super::wired::scene::node::Node; + /// 2D + + #[derive(Debug)] + #[repr(transparent)] + pub struct Rectangle { + handle: _rt::Resource, + } + + impl Rectangle { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for Rectangle { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-drop]rectangle"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + /// 3D #[derive(Debug)] #[repr(transparent)] @@ -668,6 +716,138 @@ pub mod unavi { } } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn new(size: Vec2) -> Self { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[constructor]rectangle"] + fn wit_import(_: f32, _: f32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: f32, _: f32) -> i32 { + unreachable!() + } + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0)); + Rectangle::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn size(&self) -> Vec2 { + unsafe { + #[repr(align(4))] + struct RetArea([::core::mem::MaybeUninit; 8]); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); + let ptr0 = ret_area.0.as_mut_ptr().cast::(); + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.size"] + fn wit_import(_: i32, _: *mut u8); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: *mut u8) { + unreachable!() + } + wit_import((self).handle() as i32, ptr0); + let l1 = *ptr0.add(0).cast::(); + let l2 = *ptr0.add(4).cast::(); + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn set_size(&self, value: Vec2) { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.set-size"] + fn wit_import(_: i32, _: f32, _: f32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: f32, _: f32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a mesh of this shape. + pub fn to_mesh(&self) -> Mesh { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-mesh"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh of this shape. + pub fn to_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh and physics collider of this shape. + pub fn to_physics_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-physics-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } impl Cylinder { #[allow(unused_unsafe, clippy::all)] pub fn new(radius: f32, height: f32) -> Self { @@ -2312,6 +2492,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -7102,206 +7296,212 @@ pub(crate) use __export_script_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:script:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 9040] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xd3E\x01A\x02\x01A*\x01\ -B\x06\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01z\ -v\x01wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btransla\ -tion\x01\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\0\x01B\x11\ -\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08material\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\x01@\x01\x04\ -self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15\ -[method]material.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x19[met\ -hod]material.set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\0\x16[method]materi\ -al.color\x01\x09\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\0\x1a[method]materi\ -al.set-color\x01\x0a\x03\x01\x14wired:scene/material\x05\x01\x02\x03\0\x01\x08ma\ -terial\x01B)\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x04\0\x09primitive\x03\ -\x01\x04\0\x04mesh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\0\x14[method]pri\ -mitive.id\x01\x05\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]\ -primitive.material\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\ -\0\x04\0\x1e[method]primitive.set-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05\ -value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04\ -self\x04\x05value\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\ -\x1f[method]primitive.set-positions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\ -\x0f\x01i\x03\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04\ -self\x12\0y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[m\ -ethod]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]me\ -sh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[metho\ -d]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.\ -create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d[metho\ -d]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04\ -vec3\x02\x03\0\0\x04quat\x01B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\ -\x02\x01\x05\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-sid\ -e\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05join\ -t\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\ -\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06\ -middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\ -\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\ -\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01\ -q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\ -\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\ -\0\x13\x03\x01\x11wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\ -\x02\x03\x02\x01\x07\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\ -\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handle-input\x01\x07\ -\x03\x01\x13wired:input/handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04ve\ -c3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0esha\ -pe-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphe\ -re\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynam\ -ic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05\ -shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\ -\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\ -\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-\ -body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04\ -self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05\ -value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]\ -rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\ -\x13wired:physics/types\x05\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-han\ -dler\x02\x03\0\0\x09transform\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-b\ -ody\x01BB\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0d\ -input-handler\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\ -\x02\x01\x0d\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\ -\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]nod\ -e\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\ -\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05v\ -alues\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\ -\x02\x03\0\x06\x04node\x01B\"\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\0\x02\ -\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\x04root\x03\x01\x04\0\x05scene\x03\ -\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18[static]root.list-scenes\x01\x08\x01\ -h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[static]root.add-scene\x01\x0a\x04\0\x19\ -[static]root.remove-scene\x01\x0a\x01@\0\0\x06\x04\0\x12[constructor]scene\x01\x0b\ -\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\x0d\x04\0\x18[method]scene.list-nodes\x01\ -\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19[method]scene.create-node\x01\x0f\x01h\x03\ -\x01@\x02\x04self\x09\x05value\x10\x01\0\x04\0\x16[method]scene.add-node\x01\x11\ -\x04\0\x19[method]scene.remove-node\x01\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17\ -[method]scene.transform\x01\x12\x01@\x02\x04self\x09\x05value\x01\x01\0\x04\0\x1b\ -[method]scene.set-transform\x01\x13\x01@\x01\x04self\x09\0\x7f\x04\0\x14[method]\ -scene.active\x01\x14\x01@\x02\x04self\x09\x05value\x7f\x01\0\x04\0\x18[method]sc\ -ene.set-active\x01\x15\x03\x01\x0funavi:scene/api\x05\x11\x01BI\x02\x03\x02\x01\x04\ -\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\ -\x10\x04\0\x04node\x03\0\x04\x04\0\x08cylinder\x03\x01\x04\0\x06cuboid\x03\x01\x01\ -r\x01\x0csubdivisions}\x04\0\x0asphere-ico\x03\0\x08\x01r\x02\x07sectors}\x06sta\ -cks}\x04\0\x09sphere-uv\x03\0\x0a\x01q\x02\x03ico\x01\x09\0\x02uv\x01\x0b\0\x04\0\ -\x0bsphere-kind\x03\0\x0c\x04\0\x06sphere\x03\x01\x01i\x06\x01@\x02\x06radiusv\x06\ -heightv\0\x0f\x04\0\x15[constructor]cylinder\x01\x10\x01h\x06\x01@\x01\x04self\x11\ -\0\x7f\x04\0\x14[method]cylinder.cap\x01\x12\x01@\x02\x04self\x11\x05value\x7f\x01\ -\0\x04\0\x18[method]cylinder.set-cap\x01\x13\x01@\x01\x04self\x11\0v\x04\0\x17[m\ -ethod]cylinder.height\x01\x14\x01@\x02\x04self\x11\x05valuev\x01\0\x04\0\x1b[met\ -hod]cylinder.set-height\x01\x15\x04\0\x17[method]cylinder.radius\x01\x14\x04\0\x1b\ -[method]cylinder.set-radius\x01\x15\x01@\x01\x04self\x11\0}\x04\0\x1b[method]cyl\ -inder.resolution\x01\x16\x01@\x02\x04self\x11\x05value}\x01\0\x04\0\x1f[method]c\ -ylinder.set-resolution\x01\x17\x04\0\x19[method]cylinder.segments\x01\x16\x04\0\x1d\ -[method]cylinder.set-segments\x01\x17\x01i\x03\x01@\x01\x04self\x11\0\x18\x04\0\x18\ -[method]cylinder.to-mesh\x01\x19\x01i\x05\x01@\x01\x04self\x11\0\x1a\x04\0\x18[m\ -ethod]cylinder.to-node\x01\x1b\x04\0\x20[method]cylinder.to-physics-node\x01\x1b\ -\x01i\x07\x01@\x01\x04size\x01\0\x1c\x04\0\x13[constructor]cuboid\x01\x1d\x01h\x07\ -\x01@\x01\x04self\x1e\0\x01\x04\0\x13[method]cuboid.size\x01\x1f\x01@\x02\x04sel\ -f\x1e\x05value\x01\x01\0\x04\0\x17[method]cuboid.set-size\x01\x20\x01@\x01\x04se\ -lf\x1e\0\x18\x04\0\x16[method]cuboid.to-mesh\x01!\x01@\x01\x04self\x1e\0\x1a\x04\ -\0\x16[method]cuboid.to-node\x01\"\x04\0\x1e[method]cuboid.to-physics-node\x01\"\ -\x01i\x0e\x01@\x01\x06radiusv\0#\x04\0\x16[static]sphere.new-ico\x01$\x04\0\x15[\ -static]sphere.new-uv\x01$\x01h\x0e\x01@\x01\x04self%\0v\x04\0\x15[method]sphere.\ -radius\x01&\x01@\x02\x04self%\x05valuev\x01\0\x04\0\x19[method]sphere.set-radius\ -\x01'\x01@\x01\x04self%\0\x0d\x04\0\x13[method]sphere.kind\x01(\x01@\x02\x04self\ -%\x05value\x0d\x01\0\x04\0\x17[method]sphere.set-kind\x01)\x01@\x01\x04self%\0\x18\ -\x04\0\x16[method]sphere.to-mesh\x01*\x01@\x01\x04self%\0\x1a\x04\0\x16[method]s\ -phere.to-node\x01+\x04\0\x1e[method]sphere.to-physics-node\x01+\x03\x01\x10unavi\ -:shapes/api\x05\x12\x01B\x04\x01m\x04\x05debug\x04info\x04warn\x05error\x04\0\x09\ -log-level\x03\0\0\x01@\x02\x05level\x01\x07messages\x01\0\x04\0\x03log\x01\x02\x03\ -\x01\x0dwired:log/api\x05\x13\x01B\x0f\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\ -\x01i\x01\x01r\x0f\x04head\x02\x05spine\x02\x04hips\x02\x0eleft-upper-arm\x02\x0e\ -left-lower-arm\x02\x09left-hand\x02\x0fright-upper-arm\x02\x0fright-lower-arm\x02\ -\x0aright-hand\x02\x0eleft-upper-leg\x02\x0eleft-lower-leg\x02\x09left-foot\x02\x0f\ -right-upper-leg\x02\x0fright-lower-leg\x02\x0aright-foot\x02\x04\0\x08skeleton\x03\ -\0\x03\x04\0\x06player\x03\x01\x01h\x05\x01@\x01\x04self\x06\0\x04\x04\0\x17[met\ -hod]player.skeleton\x01\x07\x01i\x05\x01p\x08\x01@\0\0\x09\x04\0\x0clist-players\ -\x01\x0a\x01@\0\0\x08\x04\0\x0clocal-player\x01\x0b\x03\x01\x10wired:player/api\x05\ -\x14\x01B\x15\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\x05scene\x03\x01\x01\ -i\x02\x01@\0\0\x03\x04\0\x12[constructor]scene\x01\x04\x01h\x02\x01@\x01\x04self\ -\x05\0y\x04\0\x10[method]scene.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x12[meth\ -od]scene.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x16[method]scen\ -e.set-name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04self\x05\0\x0a\x04\0\x13[method\ -]scene.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\x05value\x0c\x01\0\x04\0\x16[\ -method]scene.add-node\x01\x0d\x04\0\x19[method]scene.remove-node\x01\x0d\x03\x01\ -\x11wired:scene/scene\x05\x15\x02\x03\0\x0b\x05scene\x01B5\x02\x03\x02\x01\x02\x04\ -\0\x08material\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\ -\x10\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x16\x04\0\x05scene\x03\0\x06\x04\0\x04\ -gltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[constructor]gltf\x01\x0a\x01h\x08\x01\ -i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\0\x1b[method]gltf.list-materials\x01\ -\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\x0f\x01\0\x04\0\x19[method]gltf.add-\ -material\x01\x10\x04\0\x1c[method]gltf.remove-material\x01\x10\x01i\x03\x01p\x11\ -\x01@\x01\x04self\x0b\0\x12\x04\0\x18[method]gltf.list-meshes\x01\x13\x01h\x03\x01\ -@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\x15[method]gltf.add-mesh\x01\x15\x04\0\ -\x18[method]gltf.remove-mesh\x01\x15\x01i\x05\x01p\x16\x01@\x01\x04self\x0b\0\x17\ -\x04\0\x17[method]gltf.list-nodes\x01\x18\x01h\x05\x01@\x02\x04self\x0b\x05value\ -\x19\x01\0\x04\0\x15[method]gltf.add-node\x01\x1a\x04\0\x18[method]gltf.remove-n\ -ode\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\x04\0\x18[method]gltf.l\ -ist-scenes\x01\x1d\x01h\x07\x01@\x02\x04self\x0b\x05value\x1e\x01\0\x04\0\x16[me\ -thod]gltf.add-scene\x01\x1f\x04\0\x19[method]gltf.remove-scene\x01\x1f\x01k\x1b\x01\ -@\x01\x04self\x0b\0\x20\x04\0\x19[method]gltf.active-scene\x01!\x01k\x1e\x01@\x02\ -\x04self\x0b\x05value\"\x01\0\x04\0\x1d[method]gltf.set-active-scene\x01#\x04\0\x1a\ -[method]gltf.default-scene\x01!\x04\0\x1e[method]gltf.set-default-scene\x01\x1f\x03\ -\x01\x10wired:scene/gltf\x05\x17\x02\x03\0\x0c\x04gltf\x01Bt\x02\x03\x02\x01\x18\ -\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x02\x03\x02\x01\ -\x0c\x04\0\x09transform\x03\0\x04\x04\0\x04glxf\x03\x01\x04\0\x0aasset-gltf\x03\x01\ -\x04\0\x0aasset-glxf\x03\x01\x01i\x07\x01i\x08\x01q\x02\x04gltf\x01\x09\0\x04glx\ -f\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01h\x07\x01h\x08\x01q\x02\x04gltf\x01\x0d\0\ -\x04glxf\x01\x0e\0\x04\0\x0casset-borrow\x03\0\x0f\x04\0\x09glxf-node\x03\x01\x01\ -i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\0\x05nodes\x01\x13\0\x04\0\x08children\x03\ -\0\x14\x01h\x11\x01p\x16\x01q\x02\x05asset\x01\x10\0\x05nodes\x01\x17\0\x04\0\x0f\ -children-borrow\x03\0\x18\x04\0\x0aglxf-scene\x03\x01\x01i\x06\x01@\0\0\x1b\x04\0\ -\x11[constructor]glxf\x01\x1c\x01h\x06\x01p\x0c\x01@\x01\x04self\x1d\0\x1e\x04\0\ -\x18[method]glxf.list-assets\x01\x1f\x01@\x02\x04self\x1d\x05value\x10\x01\0\x04\ -\0\x16[method]glxf.add-asset\x01\x20\x04\0\x19[method]glxf.remove-asset\x01\x20\x01\ -@\x01\x04self\x1d\0\x13\x04\0\x17[method]glxf.list-nodes\x01!\x01@\x02\x04self\x1d\ -\x05value\x16\x01\0\x04\0\x15[method]glxf.add-node\x01\"\x04\0\x18[method]glxf.r\ -emove-node\x01\"\x01i\x1a\x01p#\x01@\x01\x04self\x1d\0$\x04\0\x18[method]glxf.li\ -st-scenes\x01%\x01h\x1a\x01@\x02\x04self\x1d\x05value&\x01\0\x04\0\x16[method]gl\ -xf.add-scene\x01'\x04\0\x19[method]glxf.remove-scene\x01'\x01k#\x01@\x01\x04self\ -\x1d\0(\x04\0\x19[method]glxf.active-scene\x01)\x01k&\x01@\x02\x04self\x1d\x05va\ -lue*\x01\0\x04\0\x1d[method]glxf.set-active-scene\x01+\x04\0\x1a[method]glxf.def\ -ault-scene\x01)\x04\0\x1e[method]glxf.set-default-scene\x01'\x01h\x01\x01@\x01\x08\ -document,\0\x09\x04\0\x17[constructor]asset-gltf\x01-\x01i\x01\x01@\x01\x04self\x0d\ -\0.\x04\0\x1b[method]asset-gltf.document\x01/\x01i\x03\x01p0\x01@\x01\x04self\x0d\ -\01\x04\0\x1d[method]asset-gltf.list-nodes\x012\x01h\x03\x01@\x02\x04self\x0d\x05\ -value3\x01\0\x04\0\x1b[method]asset-gltf.add-node\x014\x04\0\x1e[method]asset-gl\ -tf.remove-node\x014\x01@\x01\x08document\x1d\0\x0a\x04\0\x17[constructor]asset-g\ -lxf\x015\x01@\x01\x04self\x0e\0\x1b\x04\0\x1b[method]asset-glxf.document\x016\x01\ -@\x01\x04self\x0e\0\x13\x04\0\x1d[method]asset-glxf.list-nodes\x017\x01@\x02\x04\ -self\x0e\x05value\x16\x01\0\x04\0\x1b[method]asset-glxf.add-node\x018\x04\0\x1e[\ -method]asset-glxf.remove-node\x018\x01@\0\0\x12\x04\0\x16[constructor]glxf-node\x01\ -9\x01@\x01\x04self\x16\0y\x04\0\x14[method]glxf-node.id\x01:\x01@\x01\x04self\x16\ -\0s\x04\0\x16[method]glxf-node.name\x01;\x01@\x02\x04self\x16\x05values\x01\0\x04\ -\0\x1a[method]glxf-node.set-name\x01<\x01@\x01\x04self\x16\0\x05\x04\0\x1b[metho\ -d]glxf-node.transform\x01=\x01@\x02\x04self\x16\x05value\x05\x01\0\x04\0\x1f[met\ -hod]glxf-node.set-transform\x01>\x01k\x12\x01@\x01\x04self\x16\0?\x04\0\x18[meth\ -od]glxf-node.parent\x01@\x01k\x15\x01@\x01\x04self\x16\0\xc1\0\x04\0\x1a[method]\ -glxf-node.children\x01B\x01k\x19\x01@\x02\x04self\x16\x05value\xc3\0\x01\0\x04\0\ -\x1e[method]glxf-node.set-children\x01D\x01@\0\0#\x04\0\x17[constructor]glxf-sce\ -ne\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]glxf-scene.id\x01F\x01@\x01\x04sel\ -f&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01@\x02\x04self&\x05values\x01\0\x04\ -\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\x04self&\0\x13\x04\0\x18[method]\ -glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\x16\x01\0\x04\0\x1b[method]glxf-\ -scene.add-node\x01J\x04\0\x1e[method]glxf-scene.remove-node\x01J\x04\0\x08get-ro\ -ot\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x19\x01B\x07\x04\0\x06script\x03\x01\x01\ -i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\x02\x01h\0\x01@\x02\x04self\x03\ -\x05deltav\x01\0\x04\0\x15[method]script.update\x01\x04\x04\x01\x12wired:script/\ -types\x05\x1a\x04\x01\x1aexample:wired-input/script\x04\0\x0b\x0c\x01\0\x06scrip\ -t\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10\ -wit-bindgen-rust\x060.25.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 9348] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x87H\x01A\x02\x01A+\x01\ +B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\0\ +\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01r\ +\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\0\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\ +\0\x05color\x03\0\0\x04\0\x08material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[co\ +nstructor]material\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]mat\ +erial.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15[method]material.name\x01\x07\x01\ +@\x02\x04self\x05\x05values\x01\0\x04\0\x19[method]material.set-name\x01\x08\x01\ +@\x01\x04self\x05\0\x01\x04\0\x16[method]material.color\x01\x09\x01@\x02\x04self\ +\x05\x05value\x01\x01\0\x04\0\x1a[method]material.set-color\x01\x0a\x03\x01\x14w\ +ired:scene/material\x05\x01\x02\x03\0\x01\x08material\x01B)\x02\x03\x02\x01\x02\x04\ +\0\x08material\x03\0\0\x04\0\x09primitive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\ +\x01@\x01\x04self\x04\0y\x04\0\x14[method]primitive.id\x01\x05\x01i\x01\x01k\x06\ +\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]primitive.material\x01\x08\x01h\x01\ +\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\0\x04\0\x1e[method]primitive.set\ +-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05value\x0c\x01\0\x04\0\x1d[method\ +]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04self\x04\x05value\x0e\x01\0\x04\ +\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\x1f[method]primitive.set-posit\ +ions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\ +\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04self\x12\0y\x04\0\x0f[metho\ +d]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[method]mesh.name\x01\x14\x01\ +@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]mesh.set-name\x01\x15\x01i\x02\ +\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[method]mesh.list-primitives\x01\x18\ +\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.create-primitive\x01\x19\x01@\x02\ +\x04self\x12\x05value\x16\x01\0\x04\0\x1d[method]mesh.remove-primitive\x01\x1a\x03\ +\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\ +\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\x02\x03\x02\x01\x07\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x04\0\x08collid\ +er\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\ +\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-handler\x02\x03\0\0\x09transfo\ +rm\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-body\x01BB\x02\x03\x02\x01\x0a\ +\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0dinput-handler\x03\0\x02\x02\x03\ +\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0d\x04\0\x08collider\x03\ +\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01\ +i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\ +\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]no\ +de.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-n\ +ame\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\ +\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\ +\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\ +\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[metho\ +d]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[metho\ +d]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11\ +[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\ +\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\ +\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\ +\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\ +\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04\ +self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k\ +*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k\ +-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01\ +/\x03\x01\x10wired:scene/node\x05\x0f\x02\x03\0\x06\x04node\x01B\"\x02\x03\x02\x01\ +\x0c\x04\0\x09transform\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\ +\x04root\x03\x01\x04\0\x05scene\x03\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18\ +[static]root.list-scenes\x01\x08\x01h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[\ +static]root.add-scene\x01\x0a\x04\0\x19[static]root.remove-scene\x01\x0a\x01@\0\0\ +\x06\x04\0\x12[constructor]scene\x01\x0b\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\ +\x0d\x04\0\x18[method]scene.list-nodes\x01\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19\ +[method]scene.create-node\x01\x0f\x01h\x03\x01@\x02\x04self\x09\x05value\x10\x01\ +\0\x04\0\x16[method]scene.add-node\x01\x11\x04\0\x19[method]scene.remove-node\x01\ +\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17[method]scene.transform\x01\x12\x01@\x02\ +\x04self\x09\x05value\x01\x01\0\x04\0\x1b[method]scene.set-transform\x01\x13\x01\ +@\x01\x04self\x09\0\x7f\x04\0\x14[method]scene.active\x01\x14\x01@\x02\x04self\x09\ +\x05value\x7f\x01\0\x04\0\x18[method]scene.set-active\x01\x15\x03\x01\x0funavi:s\ +cene/api\x05\x11\x02\x03\0\0\x04vec2\x01BY\x02\x03\x02\x01\x12\x04\0\x04vec2\x03\ +\0\0\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\x02\x02\x03\x02\x01\x0a\x04\0\x04me\ +sh\x03\0\x04\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x06\x04\0\x09rectangle\x03\x01\ +\x04\0\x08cylinder\x03\x01\x04\0\x06cuboid\x03\x01\x01r\x01\x0csubdivisions}\x04\ +\0\x0asphere-ico\x03\0\x0b\x01r\x02\x07sectors}\x06stacks}\x04\0\x09sphere-uv\x03\ +\0\x0d\x01q\x02\x03ico\x01\x0c\0\x02uv\x01\x0e\0\x04\0\x0bsphere-kind\x03\0\x0f\x04\ +\0\x06sphere\x03\x01\x01i\x08\x01@\x01\x04size\x01\0\x12\x04\0\x16[constructor]r\ +ectangle\x01\x13\x01h\x08\x01@\x01\x04self\x14\0\x01\x04\0\x16[method]rectangle.\ +size\x01\x15\x01@\x02\x04self\x14\x05value\x01\x01\0\x04\0\x1a[method]rectangle.\ +set-size\x01\x16\x01i\x05\x01@\x01\x04self\x14\0\x17\x04\0\x19[method]rectangle.\ +to-mesh\x01\x18\x01i\x07\x01@\x01\x04self\x14\0\x19\x04\0\x19[method]rectangle.t\ +o-node\x01\x1a\x04\0![method]rectangle.to-physics-node\x01\x1a\x01i\x09\x01@\x02\ +\x06radiusv\x06heightv\0\x1b\x04\0\x15[constructor]cylinder\x01\x1c\x01h\x09\x01\ +@\x01\x04self\x1d\0\x7f\x04\0\x14[method]cylinder.cap\x01\x1e\x01@\x02\x04self\x1d\ +\x05value\x7f\x01\0\x04\0\x18[method]cylinder.set-cap\x01\x1f\x01@\x01\x04self\x1d\ +\0v\x04\0\x17[method]cylinder.height\x01\x20\x01@\x02\x04self\x1d\x05valuev\x01\0\ +\x04\0\x1b[method]cylinder.set-height\x01!\x04\0\x17[method]cylinder.radius\x01\x20\ +\x04\0\x1b[method]cylinder.set-radius\x01!\x01@\x01\x04self\x1d\0}\x04\0\x1b[met\ +hod]cylinder.resolution\x01\"\x01@\x02\x04self\x1d\x05value}\x01\0\x04\0\x1f[met\ +hod]cylinder.set-resolution\x01#\x04\0\x19[method]cylinder.segments\x01\"\x04\0\x1d\ +[method]cylinder.set-segments\x01#\x01@\x01\x04self\x1d\0\x17\x04\0\x18[method]c\ +ylinder.to-mesh\x01$\x01@\x01\x04self\x1d\0\x19\x04\0\x18[method]cylinder.to-nod\ +e\x01%\x04\0\x20[method]cylinder.to-physics-node\x01%\x01i\x0a\x01@\x01\x04size\x03\ +\0&\x04\0\x13[constructor]cuboid\x01'\x01h\x0a\x01@\x01\x04self(\0\x03\x04\0\x13\ +[method]cuboid.size\x01)\x01@\x02\x04self(\x05value\x03\x01\0\x04\0\x17[method]c\ +uboid.set-size\x01*\x01@\x01\x04self(\0\x17\x04\0\x16[method]cuboid.to-mesh\x01+\ +\x01@\x01\x04self(\0\x19\x04\0\x16[method]cuboid.to-node\x01,\x04\0\x1e[method]c\ +uboid.to-physics-node\x01,\x01i\x11\x01@\x01\x06radiusv\0-\x04\0\x16[static]sphe\ +re.new-ico\x01.\x04\0\x15[static]sphere.new-uv\x01.\x01h\x11\x01@\x01\x04self/\0\ +v\x04\0\x15[method]sphere.radius\x010\x01@\x02\x04self/\x05valuev\x01\0\x04\0\x19\ +[method]sphere.set-radius\x011\x01@\x01\x04self/\0\x10\x04\0\x13[method]sphere.k\ +ind\x012\x01@\x02\x04self/\x05value\x10\x01\0\x04\0\x17[method]sphere.set-kind\x01\ +3\x01@\x01\x04self/\0\x17\x04\0\x16[method]sphere.to-mesh\x014\x01@\x01\x04self/\ +\0\x19\x04\0\x16[method]sphere.to-node\x015\x04\0\x1e[method]sphere.to-physics-n\ +ode\x015\x03\x01\x10unavi:shapes/api\x05\x13\x01B\x04\x01m\x04\x05debug\x04info\x04\ +warn\x05error\x04\0\x09log-level\x03\0\0\x01@\x02\x05level\x01\x07messages\x01\0\ +\x04\0\x03log\x01\x02\x03\x01\x0dwired:log/api\x05\x14\x01B\x0f\x02\x03\x02\x01\x10\ +\x04\0\x04node\x03\0\0\x01i\x01\x01r\x0f\x04head\x02\x05spine\x02\x04hips\x02\x0e\ +left-upper-arm\x02\x0eleft-lower-arm\x02\x09left-hand\x02\x0fright-upper-arm\x02\ +\x0fright-lower-arm\x02\x0aright-hand\x02\x0eleft-upper-leg\x02\x0eleft-lower-le\ +g\x02\x09left-foot\x02\x0fright-upper-leg\x02\x0fright-lower-leg\x02\x0aright-fo\ +ot\x02\x04\0\x08skeleton\x03\0\x03\x04\0\x06player\x03\x01\x01h\x05\x01@\x01\x04\ +self\x06\0\x04\x04\0\x17[method]player.skeleton\x01\x07\x01i\x05\x01p\x08\x01@\0\ +\0\x09\x04\0\x0clist-players\x01\x0a\x01@\0\0\x08\x04\0\x0clocal-player\x01\x0b\x03\ +\x01\x10wired:player/api\x05\x15\x01B\x15\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\ +\0\x04\0\x05scene\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x12[constructor]scene\x01\x04\ +\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x10[method]scene.id\x01\x06\x01@\x01\x04\ +self\x05\0s\x04\0\x12[method]scene.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\ +\0\x04\0\x16[method]scene.set-name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04self\x05\ +\0\x0a\x04\0\x13[method]scene.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\x05val\ +ue\x0c\x01\0\x04\0\x16[method]scene.add-node\x01\x0d\x04\0\x19[method]scene.remo\ +ve-node\x01\x0d\x03\x01\x11wired:scene/scene\x05\x16\x02\x03\0\x0b\x05scene\x01B\ +5\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mes\ +h\x03\0\x02\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x17\x04\0\ +\x05scene\x03\0\x06\x04\0\x04gltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[constr\ +uctor]gltf\x01\x0a\x01h\x08\x01i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\0\x1b\ +[method]gltf.list-materials\x01\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\x0f\x01\ +\0\x04\0\x19[method]gltf.add-material\x01\x10\x04\0\x1c[method]gltf.remove-mater\ +ial\x01\x10\x01i\x03\x01p\x11\x01@\x01\x04self\x0b\0\x12\x04\0\x18[method]gltf.l\ +ist-meshes\x01\x13\x01h\x03\x01@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\x15[me\ +thod]gltf.add-mesh\x01\x15\x04\0\x18[method]gltf.remove-mesh\x01\x15\x01i\x05\x01\ +p\x16\x01@\x01\x04self\x0b\0\x17\x04\0\x17[method]gltf.list-nodes\x01\x18\x01h\x05\ +\x01@\x02\x04self\x0b\x05value\x19\x01\0\x04\0\x15[method]gltf.add-node\x01\x1a\x04\ +\0\x18[method]gltf.remove-node\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\ +\x04\0\x18[method]gltf.list-scenes\x01\x1d\x01h\x07\x01@\x02\x04self\x0b\x05valu\ +e\x1e\x01\0\x04\0\x16[method]gltf.add-scene\x01\x1f\x04\0\x19[method]gltf.remove\ +-scene\x01\x1f\x01k\x1b\x01@\x01\x04self\x0b\0\x20\x04\0\x19[method]gltf.active-\ +scene\x01!\x01k\x1e\x01@\x02\x04self\x0b\x05value\"\x01\0\x04\0\x1d[method]gltf.\ +set-active-scene\x01#\x04\0\x1a[method]gltf.default-scene\x01!\x04\0\x1e[method]\ +gltf.set-default-scene\x01\x1f\x03\x01\x10wired:scene/gltf\x05\x18\x02\x03\0\x0c\ +\x04gltf\x01Bt\x02\x03\x02\x01\x19\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\x10\x04\ +\0\x04node\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x04\0\x04g\ +lxf\x03\x01\x04\0\x0aasset-gltf\x03\x01\x04\0\x0aasset-glxf\x03\x01\x01i\x07\x01\ +i\x08\x01q\x02\x04gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01h\ +\x07\x01h\x08\x01q\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\0\x04\0\x0casset-borrow\ +\x03\0\x0f\x04\0\x09glxf-node\x03\x01\x01i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\ +\0\x05nodes\x01\x13\0\x04\0\x08children\x03\0\x14\x01h\x11\x01p\x16\x01q\x02\x05\ +asset\x01\x10\0\x05nodes\x01\x17\0\x04\0\x0fchildren-borrow\x03\0\x18\x04\0\x0ag\ +lxf-scene\x03\x01\x01i\x06\x01@\0\0\x1b\x04\0\x11[constructor]glxf\x01\x1c\x01h\x06\ +\x01p\x0c\x01@\x01\x04self\x1d\0\x1e\x04\0\x18[method]glxf.list-assets\x01\x1f\x01\ +@\x02\x04self\x1d\x05value\x10\x01\0\x04\0\x16[method]glxf.add-asset\x01\x20\x04\ +\0\x19[method]glxf.remove-asset\x01\x20\x01@\x01\x04self\x1d\0\x13\x04\0\x17[met\ +hod]glxf.list-nodes\x01!\x01@\x02\x04self\x1d\x05value\x16\x01\0\x04\0\x15[metho\ +d]glxf.add-node\x01\"\x04\0\x18[method]glxf.remove-node\x01\"\x01i\x1a\x01p#\x01\ +@\x01\x04self\x1d\0$\x04\0\x18[method]glxf.list-scenes\x01%\x01h\x1a\x01@\x02\x04\ +self\x1d\x05value&\x01\0\x04\0\x16[method]glxf.add-scene\x01'\x04\0\x19[method]g\ +lxf.remove-scene\x01'\x01k#\x01@\x01\x04self\x1d\0(\x04\0\x19[method]glxf.active\ +-scene\x01)\x01k&\x01@\x02\x04self\x1d\x05value*\x01\0\x04\0\x1d[method]glxf.set\ +-active-scene\x01+\x04\0\x1a[method]glxf.default-scene\x01)\x04\0\x1e[method]glx\ +f.set-default-scene\x01'\x01h\x01\x01@\x01\x08document,\0\x09\x04\0\x17[construc\ +tor]asset-gltf\x01-\x01i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b[method]asset-gltf\ +.document\x01/\x01i\x03\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d[method]asset-glt\ +f.list-nodes\x012\x01h\x03\x01@\x02\x04self\x0d\x05value3\x01\0\x04\0\x1b[method\ +]asset-gltf.add-node\x014\x04\0\x1e[method]asset-gltf.remove-node\x014\x01@\x01\x08\ +document\x1d\0\x0a\x04\0\x17[constructor]asset-glxf\x015\x01@\x01\x04self\x0e\0\x1b\ +\x04\0\x1b[method]asset-glxf.document\x016\x01@\x01\x04self\x0e\0\x13\x04\0\x1d[\ +method]asset-glxf.list-nodes\x017\x01@\x02\x04self\x0e\x05value\x16\x01\0\x04\0\x1b\ +[method]asset-glxf.add-node\x018\x04\0\x1e[method]asset-glxf.remove-node\x018\x01\ +@\0\0\x12\x04\0\x16[constructor]glxf-node\x019\x01@\x01\x04self\x16\0y\x04\0\x14\ +[method]glxf-node.id\x01:\x01@\x01\x04self\x16\0s\x04\0\x16[method]glxf-node.nam\ +e\x01;\x01@\x02\x04self\x16\x05values\x01\0\x04\0\x1a[method]glxf-node.set-name\x01\ +<\x01@\x01\x04self\x16\0\x05\x04\0\x1b[method]glxf-node.transform\x01=\x01@\x02\x04\ +self\x16\x05value\x05\x01\0\x04\0\x1f[method]glxf-node.set-transform\x01>\x01k\x12\ +\x01@\x01\x04self\x16\0?\x04\0\x18[method]glxf-node.parent\x01@\x01k\x15\x01@\x01\ +\x04self\x16\0\xc1\0\x04\0\x1a[method]glxf-node.children\x01B\x01k\x19\x01@\x02\x04\ +self\x16\x05value\xc3\0\x01\0\x04\0\x1e[method]glxf-node.set-children\x01D\x01@\0\ +\0#\x04\0\x17[constructor]glxf-scene\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]\ +glxf-scene.id\x01F\x01@\x01\x04self&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01\ +@\x02\x04self&\x05values\x01\0\x04\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\ +\x04self&\0\x13\x04\0\x18[method]glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\ +\x16\x01\0\x04\0\x1b[method]glxf-scene.add-node\x01J\x04\0\x1e[method]glxf-scene\ +.remove-node\x01J\x04\0\x08get-root\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x1a\x01\ +B\x07\x04\0\x06script\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\ +\x02\x01h\0\x01@\x02\x04self\x03\x05deltav\x01\0\x04\0\x15[method]script.update\x01\ +\x04\x04\x01\x12wired:script/types\x05\x1b\x04\x01\x1aexample:wired-input/script\ +\x04\0\x0b\x0c\x01\0\x06script\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0d\ +wit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/example-wired-physics/src/bindings.rs b/wasm/example-wired-physics/src/bindings.rs index 0bf9f4b1f..86e9f1175 100644 --- a/wasm/example-wired-physics/src/bindings.rs +++ b/wasm/example-wired-physics/src/bindings.rs @@ -490,9 +490,57 @@ pub mod unavi { static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; + pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type Node = super::super::super::wired::scene::node::Node; + /// 2D + + #[derive(Debug)] + #[repr(transparent)] + pub struct Rectangle { + handle: _rt::Resource, + } + + impl Rectangle { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for Rectangle { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-drop]rectangle"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + /// 3D #[derive(Debug)] #[repr(transparent)] @@ -668,6 +716,138 @@ pub mod unavi { } } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn new(size: Vec2) -> Self { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[constructor]rectangle"] + fn wit_import(_: f32, _: f32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: f32, _: f32) -> i32 { + unreachable!() + } + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0)); + Rectangle::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn size(&self) -> Vec2 { + unsafe { + #[repr(align(4))] + struct RetArea([::core::mem::MaybeUninit; 8]); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); + let ptr0 = ret_area.0.as_mut_ptr().cast::(); + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.size"] + fn wit_import(_: i32, _: *mut u8); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: *mut u8) { + unreachable!() + } + wit_import((self).handle() as i32, ptr0); + let l1 = *ptr0.add(0).cast::(); + let l2 = *ptr0.add(4).cast::(); + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn set_size(&self, value: Vec2) { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.set-size"] + fn wit_import(_: i32, _: f32, _: f32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: f32, _: f32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a mesh of this shape. + pub fn to_mesh(&self) -> Mesh { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-mesh"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh of this shape. + pub fn to_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh and physics collider of this shape. + pub fn to_physics_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-physics-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } impl Cylinder { #[allow(unused_unsafe, clippy::all)] pub fn new(radius: f32, height: f32) -> Self { @@ -2312,6 +2492,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -7102,206 +7296,212 @@ pub(crate) use __export_script_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:script:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 9042] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xd5E\x01A\x02\x01A*\x01\ -B\x06\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01z\ -v\x01wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btransla\ -tion\x01\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\0\x01B\x11\ -\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08material\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\x01@\x01\x04\ -self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15\ -[method]material.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x19[met\ -hod]material.set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\0\x16[method]materi\ -al.color\x01\x09\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\0\x1a[method]materi\ -al.set-color\x01\x0a\x03\x01\x14wired:scene/material\x05\x01\x02\x03\0\x01\x08ma\ -terial\x01B)\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x04\0\x09primitive\x03\ -\x01\x04\0\x04mesh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\0\x14[method]pri\ -mitive.id\x01\x05\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]\ -primitive.material\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\ -\0\x04\0\x1e[method]primitive.set-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05\ -value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04\ -self\x04\x05value\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\ -\x1f[method]primitive.set-positions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\ -\x0f\x01i\x03\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04\ -self\x12\0y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[m\ -ethod]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]me\ -sh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[metho\ -d]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.\ -create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d[metho\ -d]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04\ -vec3\x02\x03\0\0\x04quat\x01B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\ -\x02\x01\x05\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-sid\ -e\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05join\ -t\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\ -\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06\ -middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\ -\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\ -\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01\ -q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\ -\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\ -\0\x13\x03\x01\x11wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\ -\x02\x03\x02\x01\x07\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\ -\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handle-input\x01\x07\ -\x03\x01\x13wired:input/handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04ve\ -c3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0esha\ -pe-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphe\ -re\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynam\ -ic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05\ -shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\ -\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\ -\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-\ -body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04\ -self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05\ -value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]\ -rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\ -\x13wired:physics/types\x05\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-han\ -dler\x02\x03\0\0\x09transform\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-b\ -ody\x01BB\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0d\ -input-handler\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\ -\x02\x01\x0d\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\ -\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]nod\ -e\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\ -\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05v\ -alues\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\ -\x02\x03\0\x06\x04node\x01B\"\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\0\x02\ -\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\x04root\x03\x01\x04\0\x05scene\x03\ -\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18[static]root.list-scenes\x01\x08\x01\ -h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[static]root.add-scene\x01\x0a\x04\0\x19\ -[static]root.remove-scene\x01\x0a\x01@\0\0\x06\x04\0\x12[constructor]scene\x01\x0b\ -\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\x0d\x04\0\x18[method]scene.list-nodes\x01\ -\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19[method]scene.create-node\x01\x0f\x01h\x03\ -\x01@\x02\x04self\x09\x05value\x10\x01\0\x04\0\x16[method]scene.add-node\x01\x11\ -\x04\0\x19[method]scene.remove-node\x01\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17\ -[method]scene.transform\x01\x12\x01@\x02\x04self\x09\x05value\x01\x01\0\x04\0\x1b\ -[method]scene.set-transform\x01\x13\x01@\x01\x04self\x09\0\x7f\x04\0\x14[method]\ -scene.active\x01\x14\x01@\x02\x04self\x09\x05value\x7f\x01\0\x04\0\x18[method]sc\ -ene.set-active\x01\x15\x03\x01\x0funavi:scene/api\x05\x11\x01BI\x02\x03\x02\x01\x04\ -\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\ -\x10\x04\0\x04node\x03\0\x04\x04\0\x08cylinder\x03\x01\x04\0\x06cuboid\x03\x01\x01\ -r\x01\x0csubdivisions}\x04\0\x0asphere-ico\x03\0\x08\x01r\x02\x07sectors}\x06sta\ -cks}\x04\0\x09sphere-uv\x03\0\x0a\x01q\x02\x03ico\x01\x09\0\x02uv\x01\x0b\0\x04\0\ -\x0bsphere-kind\x03\0\x0c\x04\0\x06sphere\x03\x01\x01i\x06\x01@\x02\x06radiusv\x06\ -heightv\0\x0f\x04\0\x15[constructor]cylinder\x01\x10\x01h\x06\x01@\x01\x04self\x11\ -\0\x7f\x04\0\x14[method]cylinder.cap\x01\x12\x01@\x02\x04self\x11\x05value\x7f\x01\ -\0\x04\0\x18[method]cylinder.set-cap\x01\x13\x01@\x01\x04self\x11\0v\x04\0\x17[m\ -ethod]cylinder.height\x01\x14\x01@\x02\x04self\x11\x05valuev\x01\0\x04\0\x1b[met\ -hod]cylinder.set-height\x01\x15\x04\0\x17[method]cylinder.radius\x01\x14\x04\0\x1b\ -[method]cylinder.set-radius\x01\x15\x01@\x01\x04self\x11\0}\x04\0\x1b[method]cyl\ -inder.resolution\x01\x16\x01@\x02\x04self\x11\x05value}\x01\0\x04\0\x1f[method]c\ -ylinder.set-resolution\x01\x17\x04\0\x19[method]cylinder.segments\x01\x16\x04\0\x1d\ -[method]cylinder.set-segments\x01\x17\x01i\x03\x01@\x01\x04self\x11\0\x18\x04\0\x18\ -[method]cylinder.to-mesh\x01\x19\x01i\x05\x01@\x01\x04self\x11\0\x1a\x04\0\x18[m\ -ethod]cylinder.to-node\x01\x1b\x04\0\x20[method]cylinder.to-physics-node\x01\x1b\ -\x01i\x07\x01@\x01\x04size\x01\0\x1c\x04\0\x13[constructor]cuboid\x01\x1d\x01h\x07\ -\x01@\x01\x04self\x1e\0\x01\x04\0\x13[method]cuboid.size\x01\x1f\x01@\x02\x04sel\ -f\x1e\x05value\x01\x01\0\x04\0\x17[method]cuboid.set-size\x01\x20\x01@\x01\x04se\ -lf\x1e\0\x18\x04\0\x16[method]cuboid.to-mesh\x01!\x01@\x01\x04self\x1e\0\x1a\x04\ -\0\x16[method]cuboid.to-node\x01\"\x04\0\x1e[method]cuboid.to-physics-node\x01\"\ -\x01i\x0e\x01@\x01\x06radiusv\0#\x04\0\x16[static]sphere.new-ico\x01$\x04\0\x15[\ -static]sphere.new-uv\x01$\x01h\x0e\x01@\x01\x04self%\0v\x04\0\x15[method]sphere.\ -radius\x01&\x01@\x02\x04self%\x05valuev\x01\0\x04\0\x19[method]sphere.set-radius\ -\x01'\x01@\x01\x04self%\0\x0d\x04\0\x13[method]sphere.kind\x01(\x01@\x02\x04self\ -%\x05value\x0d\x01\0\x04\0\x17[method]sphere.set-kind\x01)\x01@\x01\x04self%\0\x18\ -\x04\0\x16[method]sphere.to-mesh\x01*\x01@\x01\x04self%\0\x1a\x04\0\x16[method]s\ -phere.to-node\x01+\x04\0\x1e[method]sphere.to-physics-node\x01+\x03\x01\x10unavi\ -:shapes/api\x05\x12\x01B\x04\x01m\x04\x05debug\x04info\x04warn\x05error\x04\0\x09\ -log-level\x03\0\0\x01@\x02\x05level\x01\x07messages\x01\0\x04\0\x03log\x01\x02\x03\ -\x01\x0dwired:log/api\x05\x13\x01B\x0f\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\ -\x01i\x01\x01r\x0f\x04head\x02\x05spine\x02\x04hips\x02\x0eleft-upper-arm\x02\x0e\ -left-lower-arm\x02\x09left-hand\x02\x0fright-upper-arm\x02\x0fright-lower-arm\x02\ -\x0aright-hand\x02\x0eleft-upper-leg\x02\x0eleft-lower-leg\x02\x09left-foot\x02\x0f\ -right-upper-leg\x02\x0fright-lower-leg\x02\x0aright-foot\x02\x04\0\x08skeleton\x03\ -\0\x03\x04\0\x06player\x03\x01\x01h\x05\x01@\x01\x04self\x06\0\x04\x04\0\x17[met\ -hod]player.skeleton\x01\x07\x01i\x05\x01p\x08\x01@\0\0\x09\x04\0\x0clist-players\ -\x01\x0a\x01@\0\0\x08\x04\0\x0clocal-player\x01\x0b\x03\x01\x10wired:player/api\x05\ -\x14\x01B\x15\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\x05scene\x03\x01\x01\ -i\x02\x01@\0\0\x03\x04\0\x12[constructor]scene\x01\x04\x01h\x02\x01@\x01\x04self\ -\x05\0y\x04\0\x10[method]scene.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x12[meth\ -od]scene.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x16[method]scen\ -e.set-name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04self\x05\0\x0a\x04\0\x13[method\ -]scene.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\x05value\x0c\x01\0\x04\0\x16[\ -method]scene.add-node\x01\x0d\x04\0\x19[method]scene.remove-node\x01\x0d\x03\x01\ -\x11wired:scene/scene\x05\x15\x02\x03\0\x0b\x05scene\x01B5\x02\x03\x02\x01\x02\x04\ -\0\x08material\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\ -\x10\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x16\x04\0\x05scene\x03\0\x06\x04\0\x04\ -gltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[constructor]gltf\x01\x0a\x01h\x08\x01\ -i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\0\x1b[method]gltf.list-materials\x01\ -\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\x0f\x01\0\x04\0\x19[method]gltf.add-\ -material\x01\x10\x04\0\x1c[method]gltf.remove-material\x01\x10\x01i\x03\x01p\x11\ -\x01@\x01\x04self\x0b\0\x12\x04\0\x18[method]gltf.list-meshes\x01\x13\x01h\x03\x01\ -@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\x15[method]gltf.add-mesh\x01\x15\x04\0\ -\x18[method]gltf.remove-mesh\x01\x15\x01i\x05\x01p\x16\x01@\x01\x04self\x0b\0\x17\ -\x04\0\x17[method]gltf.list-nodes\x01\x18\x01h\x05\x01@\x02\x04self\x0b\x05value\ -\x19\x01\0\x04\0\x15[method]gltf.add-node\x01\x1a\x04\0\x18[method]gltf.remove-n\ -ode\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\x04\0\x18[method]gltf.l\ -ist-scenes\x01\x1d\x01h\x07\x01@\x02\x04self\x0b\x05value\x1e\x01\0\x04\0\x16[me\ -thod]gltf.add-scene\x01\x1f\x04\0\x19[method]gltf.remove-scene\x01\x1f\x01k\x1b\x01\ -@\x01\x04self\x0b\0\x20\x04\0\x19[method]gltf.active-scene\x01!\x01k\x1e\x01@\x02\ -\x04self\x0b\x05value\"\x01\0\x04\0\x1d[method]gltf.set-active-scene\x01#\x04\0\x1a\ -[method]gltf.default-scene\x01!\x04\0\x1e[method]gltf.set-default-scene\x01\x1f\x03\ -\x01\x10wired:scene/gltf\x05\x17\x02\x03\0\x0c\x04gltf\x01Bt\x02\x03\x02\x01\x18\ -\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x02\x03\x02\x01\ -\x0c\x04\0\x09transform\x03\0\x04\x04\0\x04glxf\x03\x01\x04\0\x0aasset-gltf\x03\x01\ -\x04\0\x0aasset-glxf\x03\x01\x01i\x07\x01i\x08\x01q\x02\x04gltf\x01\x09\0\x04glx\ -f\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01h\x07\x01h\x08\x01q\x02\x04gltf\x01\x0d\0\ -\x04glxf\x01\x0e\0\x04\0\x0casset-borrow\x03\0\x0f\x04\0\x09glxf-node\x03\x01\x01\ -i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\0\x05nodes\x01\x13\0\x04\0\x08children\x03\ -\0\x14\x01h\x11\x01p\x16\x01q\x02\x05asset\x01\x10\0\x05nodes\x01\x17\0\x04\0\x0f\ -children-borrow\x03\0\x18\x04\0\x0aglxf-scene\x03\x01\x01i\x06\x01@\0\0\x1b\x04\0\ -\x11[constructor]glxf\x01\x1c\x01h\x06\x01p\x0c\x01@\x01\x04self\x1d\0\x1e\x04\0\ -\x18[method]glxf.list-assets\x01\x1f\x01@\x02\x04self\x1d\x05value\x10\x01\0\x04\ -\0\x16[method]glxf.add-asset\x01\x20\x04\0\x19[method]glxf.remove-asset\x01\x20\x01\ -@\x01\x04self\x1d\0\x13\x04\0\x17[method]glxf.list-nodes\x01!\x01@\x02\x04self\x1d\ -\x05value\x16\x01\0\x04\0\x15[method]glxf.add-node\x01\"\x04\0\x18[method]glxf.r\ -emove-node\x01\"\x01i\x1a\x01p#\x01@\x01\x04self\x1d\0$\x04\0\x18[method]glxf.li\ -st-scenes\x01%\x01h\x1a\x01@\x02\x04self\x1d\x05value&\x01\0\x04\0\x16[method]gl\ -xf.add-scene\x01'\x04\0\x19[method]glxf.remove-scene\x01'\x01k#\x01@\x01\x04self\ -\x1d\0(\x04\0\x19[method]glxf.active-scene\x01)\x01k&\x01@\x02\x04self\x1d\x05va\ -lue*\x01\0\x04\0\x1d[method]glxf.set-active-scene\x01+\x04\0\x1a[method]glxf.def\ -ault-scene\x01)\x04\0\x1e[method]glxf.set-default-scene\x01'\x01h\x01\x01@\x01\x08\ -document,\0\x09\x04\0\x17[constructor]asset-gltf\x01-\x01i\x01\x01@\x01\x04self\x0d\ -\0.\x04\0\x1b[method]asset-gltf.document\x01/\x01i\x03\x01p0\x01@\x01\x04self\x0d\ -\01\x04\0\x1d[method]asset-gltf.list-nodes\x012\x01h\x03\x01@\x02\x04self\x0d\x05\ -value3\x01\0\x04\0\x1b[method]asset-gltf.add-node\x014\x04\0\x1e[method]asset-gl\ -tf.remove-node\x014\x01@\x01\x08document\x1d\0\x0a\x04\0\x17[constructor]asset-g\ -lxf\x015\x01@\x01\x04self\x0e\0\x1b\x04\0\x1b[method]asset-glxf.document\x016\x01\ -@\x01\x04self\x0e\0\x13\x04\0\x1d[method]asset-glxf.list-nodes\x017\x01@\x02\x04\ -self\x0e\x05value\x16\x01\0\x04\0\x1b[method]asset-glxf.add-node\x018\x04\0\x1e[\ -method]asset-glxf.remove-node\x018\x01@\0\0\x12\x04\0\x16[constructor]glxf-node\x01\ -9\x01@\x01\x04self\x16\0y\x04\0\x14[method]glxf-node.id\x01:\x01@\x01\x04self\x16\ -\0s\x04\0\x16[method]glxf-node.name\x01;\x01@\x02\x04self\x16\x05values\x01\0\x04\ -\0\x1a[method]glxf-node.set-name\x01<\x01@\x01\x04self\x16\0\x05\x04\0\x1b[metho\ -d]glxf-node.transform\x01=\x01@\x02\x04self\x16\x05value\x05\x01\0\x04\0\x1f[met\ -hod]glxf-node.set-transform\x01>\x01k\x12\x01@\x01\x04self\x16\0?\x04\0\x18[meth\ -od]glxf-node.parent\x01@\x01k\x15\x01@\x01\x04self\x16\0\xc1\0\x04\0\x1a[method]\ -glxf-node.children\x01B\x01k\x19\x01@\x02\x04self\x16\x05value\xc3\0\x01\0\x04\0\ -\x1e[method]glxf-node.set-children\x01D\x01@\0\0#\x04\0\x17[constructor]glxf-sce\ -ne\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]glxf-scene.id\x01F\x01@\x01\x04sel\ -f&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01@\x02\x04self&\x05values\x01\0\x04\ -\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\x04self&\0\x13\x04\0\x18[method]\ -glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\x16\x01\0\x04\0\x1b[method]glxf-\ -scene.add-node\x01J\x04\0\x1e[method]glxf-scene.remove-node\x01J\x04\0\x08get-ro\ -ot\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x19\x01B\x07\x04\0\x06script\x03\x01\x01\ -i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\x02\x01h\0\x01@\x02\x04self\x03\ -\x05deltav\x01\0\x04\0\x15[method]script.update\x01\x04\x04\x01\x12wired:script/\ -types\x05\x1a\x04\x01\x1cexample:wired-physics/script\x04\0\x0b\x0c\x01\0\x06scr\ -ipt\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10\ -wit-bindgen-rust\x060.25.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 9350] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x89H\x01A\x02\x01A+\x01\ +B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\0\ +\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01r\ +\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\0\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\ +\0\x05color\x03\0\0\x04\0\x08material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[co\ +nstructor]material\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]mat\ +erial.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15[method]material.name\x01\x07\x01\ +@\x02\x04self\x05\x05values\x01\0\x04\0\x19[method]material.set-name\x01\x08\x01\ +@\x01\x04self\x05\0\x01\x04\0\x16[method]material.color\x01\x09\x01@\x02\x04self\ +\x05\x05value\x01\x01\0\x04\0\x1a[method]material.set-color\x01\x0a\x03\x01\x14w\ +ired:scene/material\x05\x01\x02\x03\0\x01\x08material\x01B)\x02\x03\x02\x01\x02\x04\ +\0\x08material\x03\0\0\x04\0\x09primitive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\ +\x01@\x01\x04self\x04\0y\x04\0\x14[method]primitive.id\x01\x05\x01i\x01\x01k\x06\ +\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]primitive.material\x01\x08\x01h\x01\ +\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\0\x04\0\x1e[method]primitive.set\ +-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05value\x0c\x01\0\x04\0\x1d[method\ +]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04self\x04\x05value\x0e\x01\0\x04\ +\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\x1f[method]primitive.set-posit\ +ions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\ +\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04self\x12\0y\x04\0\x0f[metho\ +d]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[method]mesh.name\x01\x14\x01\ +@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]mesh.set-name\x01\x15\x01i\x02\ +\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[method]mesh.list-primitives\x01\x18\ +\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.create-primitive\x01\x19\x01@\x02\ +\x04self\x12\x05value\x16\x01\0\x04\0\x1d[method]mesh.remove-primitive\x01\x1a\x03\ +\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\ +\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\x02\x03\x02\x01\x07\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x04\0\x08collid\ +er\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\ +\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-handler\x02\x03\0\0\x09transfo\ +rm\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-body\x01BB\x02\x03\x02\x01\x0a\ +\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0dinput-handler\x03\0\x02\x02\x03\ +\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0d\x04\0\x08collider\x03\ +\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01\ +i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\ +\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]no\ +de.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-n\ +ame\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\ +\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\ +\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\ +\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[metho\ +d]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[metho\ +d]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11\ +[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\ +\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\ +\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\ +\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\ +\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04\ +self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k\ +*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k\ +-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01\ +/\x03\x01\x10wired:scene/node\x05\x0f\x02\x03\0\x06\x04node\x01B\"\x02\x03\x02\x01\ +\x0c\x04\0\x09transform\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\ +\x04root\x03\x01\x04\0\x05scene\x03\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18\ +[static]root.list-scenes\x01\x08\x01h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[\ +static]root.add-scene\x01\x0a\x04\0\x19[static]root.remove-scene\x01\x0a\x01@\0\0\ +\x06\x04\0\x12[constructor]scene\x01\x0b\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\ +\x0d\x04\0\x18[method]scene.list-nodes\x01\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19\ +[method]scene.create-node\x01\x0f\x01h\x03\x01@\x02\x04self\x09\x05value\x10\x01\ +\0\x04\0\x16[method]scene.add-node\x01\x11\x04\0\x19[method]scene.remove-node\x01\ +\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17[method]scene.transform\x01\x12\x01@\x02\ +\x04self\x09\x05value\x01\x01\0\x04\0\x1b[method]scene.set-transform\x01\x13\x01\ +@\x01\x04self\x09\0\x7f\x04\0\x14[method]scene.active\x01\x14\x01@\x02\x04self\x09\ +\x05value\x7f\x01\0\x04\0\x18[method]scene.set-active\x01\x15\x03\x01\x0funavi:s\ +cene/api\x05\x11\x02\x03\0\0\x04vec2\x01BY\x02\x03\x02\x01\x12\x04\0\x04vec2\x03\ +\0\0\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\x02\x02\x03\x02\x01\x0a\x04\0\x04me\ +sh\x03\0\x04\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x06\x04\0\x09rectangle\x03\x01\ +\x04\0\x08cylinder\x03\x01\x04\0\x06cuboid\x03\x01\x01r\x01\x0csubdivisions}\x04\ +\0\x0asphere-ico\x03\0\x0b\x01r\x02\x07sectors}\x06stacks}\x04\0\x09sphere-uv\x03\ +\0\x0d\x01q\x02\x03ico\x01\x0c\0\x02uv\x01\x0e\0\x04\0\x0bsphere-kind\x03\0\x0f\x04\ +\0\x06sphere\x03\x01\x01i\x08\x01@\x01\x04size\x01\0\x12\x04\0\x16[constructor]r\ +ectangle\x01\x13\x01h\x08\x01@\x01\x04self\x14\0\x01\x04\0\x16[method]rectangle.\ +size\x01\x15\x01@\x02\x04self\x14\x05value\x01\x01\0\x04\0\x1a[method]rectangle.\ +set-size\x01\x16\x01i\x05\x01@\x01\x04self\x14\0\x17\x04\0\x19[method]rectangle.\ +to-mesh\x01\x18\x01i\x07\x01@\x01\x04self\x14\0\x19\x04\0\x19[method]rectangle.t\ +o-node\x01\x1a\x04\0![method]rectangle.to-physics-node\x01\x1a\x01i\x09\x01@\x02\ +\x06radiusv\x06heightv\0\x1b\x04\0\x15[constructor]cylinder\x01\x1c\x01h\x09\x01\ +@\x01\x04self\x1d\0\x7f\x04\0\x14[method]cylinder.cap\x01\x1e\x01@\x02\x04self\x1d\ +\x05value\x7f\x01\0\x04\0\x18[method]cylinder.set-cap\x01\x1f\x01@\x01\x04self\x1d\ +\0v\x04\0\x17[method]cylinder.height\x01\x20\x01@\x02\x04self\x1d\x05valuev\x01\0\ +\x04\0\x1b[method]cylinder.set-height\x01!\x04\0\x17[method]cylinder.radius\x01\x20\ +\x04\0\x1b[method]cylinder.set-radius\x01!\x01@\x01\x04self\x1d\0}\x04\0\x1b[met\ +hod]cylinder.resolution\x01\"\x01@\x02\x04self\x1d\x05value}\x01\0\x04\0\x1f[met\ +hod]cylinder.set-resolution\x01#\x04\0\x19[method]cylinder.segments\x01\"\x04\0\x1d\ +[method]cylinder.set-segments\x01#\x01@\x01\x04self\x1d\0\x17\x04\0\x18[method]c\ +ylinder.to-mesh\x01$\x01@\x01\x04self\x1d\0\x19\x04\0\x18[method]cylinder.to-nod\ +e\x01%\x04\0\x20[method]cylinder.to-physics-node\x01%\x01i\x0a\x01@\x01\x04size\x03\ +\0&\x04\0\x13[constructor]cuboid\x01'\x01h\x0a\x01@\x01\x04self(\0\x03\x04\0\x13\ +[method]cuboid.size\x01)\x01@\x02\x04self(\x05value\x03\x01\0\x04\0\x17[method]c\ +uboid.set-size\x01*\x01@\x01\x04self(\0\x17\x04\0\x16[method]cuboid.to-mesh\x01+\ +\x01@\x01\x04self(\0\x19\x04\0\x16[method]cuboid.to-node\x01,\x04\0\x1e[method]c\ +uboid.to-physics-node\x01,\x01i\x11\x01@\x01\x06radiusv\0-\x04\0\x16[static]sphe\ +re.new-ico\x01.\x04\0\x15[static]sphere.new-uv\x01.\x01h\x11\x01@\x01\x04self/\0\ +v\x04\0\x15[method]sphere.radius\x010\x01@\x02\x04self/\x05valuev\x01\0\x04\0\x19\ +[method]sphere.set-radius\x011\x01@\x01\x04self/\0\x10\x04\0\x13[method]sphere.k\ +ind\x012\x01@\x02\x04self/\x05value\x10\x01\0\x04\0\x17[method]sphere.set-kind\x01\ +3\x01@\x01\x04self/\0\x17\x04\0\x16[method]sphere.to-mesh\x014\x01@\x01\x04self/\ +\0\x19\x04\0\x16[method]sphere.to-node\x015\x04\0\x1e[method]sphere.to-physics-n\ +ode\x015\x03\x01\x10unavi:shapes/api\x05\x13\x01B\x04\x01m\x04\x05debug\x04info\x04\ +warn\x05error\x04\0\x09log-level\x03\0\0\x01@\x02\x05level\x01\x07messages\x01\0\ +\x04\0\x03log\x01\x02\x03\x01\x0dwired:log/api\x05\x14\x01B\x0f\x02\x03\x02\x01\x10\ +\x04\0\x04node\x03\0\0\x01i\x01\x01r\x0f\x04head\x02\x05spine\x02\x04hips\x02\x0e\ +left-upper-arm\x02\x0eleft-lower-arm\x02\x09left-hand\x02\x0fright-upper-arm\x02\ +\x0fright-lower-arm\x02\x0aright-hand\x02\x0eleft-upper-leg\x02\x0eleft-lower-le\ +g\x02\x09left-foot\x02\x0fright-upper-leg\x02\x0fright-lower-leg\x02\x0aright-fo\ +ot\x02\x04\0\x08skeleton\x03\0\x03\x04\0\x06player\x03\x01\x01h\x05\x01@\x01\x04\ +self\x06\0\x04\x04\0\x17[method]player.skeleton\x01\x07\x01i\x05\x01p\x08\x01@\0\ +\0\x09\x04\0\x0clist-players\x01\x0a\x01@\0\0\x08\x04\0\x0clocal-player\x01\x0b\x03\ +\x01\x10wired:player/api\x05\x15\x01B\x15\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\ +\0\x04\0\x05scene\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x12[constructor]scene\x01\x04\ +\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x10[method]scene.id\x01\x06\x01@\x01\x04\ +self\x05\0s\x04\0\x12[method]scene.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\ +\0\x04\0\x16[method]scene.set-name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04self\x05\ +\0\x0a\x04\0\x13[method]scene.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\x05val\ +ue\x0c\x01\0\x04\0\x16[method]scene.add-node\x01\x0d\x04\0\x19[method]scene.remo\ +ve-node\x01\x0d\x03\x01\x11wired:scene/scene\x05\x16\x02\x03\0\x0b\x05scene\x01B\ +5\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mes\ +h\x03\0\x02\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x17\x04\0\ +\x05scene\x03\0\x06\x04\0\x04gltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[constr\ +uctor]gltf\x01\x0a\x01h\x08\x01i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\0\x1b\ +[method]gltf.list-materials\x01\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\x0f\x01\ +\0\x04\0\x19[method]gltf.add-material\x01\x10\x04\0\x1c[method]gltf.remove-mater\ +ial\x01\x10\x01i\x03\x01p\x11\x01@\x01\x04self\x0b\0\x12\x04\0\x18[method]gltf.l\ +ist-meshes\x01\x13\x01h\x03\x01@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\x15[me\ +thod]gltf.add-mesh\x01\x15\x04\0\x18[method]gltf.remove-mesh\x01\x15\x01i\x05\x01\ +p\x16\x01@\x01\x04self\x0b\0\x17\x04\0\x17[method]gltf.list-nodes\x01\x18\x01h\x05\ +\x01@\x02\x04self\x0b\x05value\x19\x01\0\x04\0\x15[method]gltf.add-node\x01\x1a\x04\ +\0\x18[method]gltf.remove-node\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\ +\x04\0\x18[method]gltf.list-scenes\x01\x1d\x01h\x07\x01@\x02\x04self\x0b\x05valu\ +e\x1e\x01\0\x04\0\x16[method]gltf.add-scene\x01\x1f\x04\0\x19[method]gltf.remove\ +-scene\x01\x1f\x01k\x1b\x01@\x01\x04self\x0b\0\x20\x04\0\x19[method]gltf.active-\ +scene\x01!\x01k\x1e\x01@\x02\x04self\x0b\x05value\"\x01\0\x04\0\x1d[method]gltf.\ +set-active-scene\x01#\x04\0\x1a[method]gltf.default-scene\x01!\x04\0\x1e[method]\ +gltf.set-default-scene\x01\x1f\x03\x01\x10wired:scene/gltf\x05\x18\x02\x03\0\x0c\ +\x04gltf\x01Bt\x02\x03\x02\x01\x19\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\x10\x04\ +\0\x04node\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x04\0\x04g\ +lxf\x03\x01\x04\0\x0aasset-gltf\x03\x01\x04\0\x0aasset-glxf\x03\x01\x01i\x07\x01\ +i\x08\x01q\x02\x04gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01h\ +\x07\x01h\x08\x01q\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\0\x04\0\x0casset-borrow\ +\x03\0\x0f\x04\0\x09glxf-node\x03\x01\x01i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\ +\0\x05nodes\x01\x13\0\x04\0\x08children\x03\0\x14\x01h\x11\x01p\x16\x01q\x02\x05\ +asset\x01\x10\0\x05nodes\x01\x17\0\x04\0\x0fchildren-borrow\x03\0\x18\x04\0\x0ag\ +lxf-scene\x03\x01\x01i\x06\x01@\0\0\x1b\x04\0\x11[constructor]glxf\x01\x1c\x01h\x06\ +\x01p\x0c\x01@\x01\x04self\x1d\0\x1e\x04\0\x18[method]glxf.list-assets\x01\x1f\x01\ +@\x02\x04self\x1d\x05value\x10\x01\0\x04\0\x16[method]glxf.add-asset\x01\x20\x04\ +\0\x19[method]glxf.remove-asset\x01\x20\x01@\x01\x04self\x1d\0\x13\x04\0\x17[met\ +hod]glxf.list-nodes\x01!\x01@\x02\x04self\x1d\x05value\x16\x01\0\x04\0\x15[metho\ +d]glxf.add-node\x01\"\x04\0\x18[method]glxf.remove-node\x01\"\x01i\x1a\x01p#\x01\ +@\x01\x04self\x1d\0$\x04\0\x18[method]glxf.list-scenes\x01%\x01h\x1a\x01@\x02\x04\ +self\x1d\x05value&\x01\0\x04\0\x16[method]glxf.add-scene\x01'\x04\0\x19[method]g\ +lxf.remove-scene\x01'\x01k#\x01@\x01\x04self\x1d\0(\x04\0\x19[method]glxf.active\ +-scene\x01)\x01k&\x01@\x02\x04self\x1d\x05value*\x01\0\x04\0\x1d[method]glxf.set\ +-active-scene\x01+\x04\0\x1a[method]glxf.default-scene\x01)\x04\0\x1e[method]glx\ +f.set-default-scene\x01'\x01h\x01\x01@\x01\x08document,\0\x09\x04\0\x17[construc\ +tor]asset-gltf\x01-\x01i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b[method]asset-gltf\ +.document\x01/\x01i\x03\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d[method]asset-glt\ +f.list-nodes\x012\x01h\x03\x01@\x02\x04self\x0d\x05value3\x01\0\x04\0\x1b[method\ +]asset-gltf.add-node\x014\x04\0\x1e[method]asset-gltf.remove-node\x014\x01@\x01\x08\ +document\x1d\0\x0a\x04\0\x17[constructor]asset-glxf\x015\x01@\x01\x04self\x0e\0\x1b\ +\x04\0\x1b[method]asset-glxf.document\x016\x01@\x01\x04self\x0e\0\x13\x04\0\x1d[\ +method]asset-glxf.list-nodes\x017\x01@\x02\x04self\x0e\x05value\x16\x01\0\x04\0\x1b\ +[method]asset-glxf.add-node\x018\x04\0\x1e[method]asset-glxf.remove-node\x018\x01\ +@\0\0\x12\x04\0\x16[constructor]glxf-node\x019\x01@\x01\x04self\x16\0y\x04\0\x14\ +[method]glxf-node.id\x01:\x01@\x01\x04self\x16\0s\x04\0\x16[method]glxf-node.nam\ +e\x01;\x01@\x02\x04self\x16\x05values\x01\0\x04\0\x1a[method]glxf-node.set-name\x01\ +<\x01@\x01\x04self\x16\0\x05\x04\0\x1b[method]glxf-node.transform\x01=\x01@\x02\x04\ +self\x16\x05value\x05\x01\0\x04\0\x1f[method]glxf-node.set-transform\x01>\x01k\x12\ +\x01@\x01\x04self\x16\0?\x04\0\x18[method]glxf-node.parent\x01@\x01k\x15\x01@\x01\ +\x04self\x16\0\xc1\0\x04\0\x1a[method]glxf-node.children\x01B\x01k\x19\x01@\x02\x04\ +self\x16\x05value\xc3\0\x01\0\x04\0\x1e[method]glxf-node.set-children\x01D\x01@\0\ +\0#\x04\0\x17[constructor]glxf-scene\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]\ +glxf-scene.id\x01F\x01@\x01\x04self&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01\ +@\x02\x04self&\x05values\x01\0\x04\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\ +\x04self&\0\x13\x04\0\x18[method]glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\ +\x16\x01\0\x04\0\x1b[method]glxf-scene.add-node\x01J\x04\0\x1e[method]glxf-scene\ +.remove-node\x01J\x04\0\x08get-root\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x1a\x01\ +B\x07\x04\0\x06script\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\ +\x02\x01h\0\x01@\x02\x04self\x03\x05deltav\x01\0\x04\0\x15[method]script.update\x01\ +\x04\x04\x01\x12wired:script/types\x05\x1b\x04\x01\x1cexample:wired-physics/scri\ +pt\x04\0\x0b\x0c\x01\0\x06script\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\ +\x0dwit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/example-wired-scene/src/bindings.rs b/wasm/example-wired-scene/src/bindings.rs index d3aa0e6dd..ba39c69f2 100644 --- a/wasm/example-wired-scene/src/bindings.rs +++ b/wasm/example-wired-scene/src/bindings.rs @@ -12,9 +12,57 @@ pub mod unavi { static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; + pub type Vec2 = super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::wired::math::types::Vec3; pub type Mesh = super::super::super::wired::scene::mesh::Mesh; pub type Node = super::super::super::wired::scene::node::Node; + /// 2D + + #[derive(Debug)] + #[repr(transparent)] + pub struct Rectangle { + handle: _rt::Resource, + } + + impl Rectangle { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for Rectangle { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-drop]rectangle"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + /// 3D #[derive(Debug)] #[repr(transparent)] @@ -190,6 +238,138 @@ pub mod unavi { } } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn new(size: Vec2) -> Self { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[constructor]rectangle"] + fn wit_import(_: f32, _: f32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: f32, _: f32) -> i32 { + unreachable!() + } + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0)); + Rectangle::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn size(&self) -> Vec2 { + unsafe { + #[repr(align(4))] + struct RetArea([::core::mem::MaybeUninit; 8]); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); + let ptr0 = ret_area.0.as_mut_ptr().cast::(); + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.size"] + fn wit_import(_: i32, _: *mut u8); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: *mut u8) { + unreachable!() + } + wit_import((self).handle() as i32, ptr0); + let l1 = *ptr0.add(0).cast::(); + let l2 = *ptr0.add(4).cast::(); + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn set_size(&self, value: Vec2) { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.set-size"] + fn wit_import(_: i32, _: f32, _: f32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: f32, _: f32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a mesh of this shape. + pub fn to_mesh(&self) -> Mesh { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-mesh"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh of this shape. + pub fn to_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh and physics collider of this shape. + pub fn to_physics_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-physics-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } impl Cylinder { #[allow(unused_unsafe, clippy::all)] pub fn new(radius: f32, height: f32) -> Self { @@ -1834,6 +2014,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -6624,193 +6818,200 @@ pub(crate) use __export_script_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:script:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 8486] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xa9A\x01A\x02\x01A(\x01\ -B\x06\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01z\ -v\x01wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btransla\ -tion\x01\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\0\x01B\x11\ -\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08material\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\x01@\x01\x04\ -self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15\ -[method]material.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x19[met\ -hod]material.set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\0\x16[method]materi\ -al.color\x01\x09\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\0\x1a[method]materi\ -al.set-color\x01\x0a\x03\x01\x14wired:scene/material\x05\x01\x02\x03\0\x01\x08ma\ -terial\x01B)\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x04\0\x09primitive\x03\ -\x01\x04\0\x04mesh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\0\x14[method]pri\ -mitive.id\x01\x05\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]\ -primitive.material\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\ -\0\x04\0\x1e[method]primitive.set-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05\ -value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04\ -self\x04\x05value\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\ -\x1f[method]primitive.set-positions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\ -\x0f\x01i\x03\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04\ -self\x12\0y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[m\ -ethod]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]me\ -sh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[metho\ -d]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.\ -create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d[metho\ -d]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04\ -vec3\x02\x03\0\0\x04quat\x01B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\ -\x02\x01\x05\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-sid\ -e\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05join\ -t\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\ -\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06\ -middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\ -\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\ -\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01\ -q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\ -\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\ -\0\x13\x03\x01\x11wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\ -\x02\x03\x02\x01\x07\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\ -\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handle-input\x01\x07\ -\x03\x01\x13wired:input/handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04ve\ -c3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0esha\ -pe-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphe\ -re\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynam\ -ic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05\ -shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\ -\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\ -\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-\ -body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04\ -self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05\ -value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]\ -rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\ -\x13wired:physics/types\x05\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-han\ -dler\x02\x03\0\0\x09transform\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-b\ -ody\x01BB\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0d\ -input-handler\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\ -\x02\x01\x0d\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\ -\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]nod\ -e\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\ -\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05v\ -alues\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\ -\x02\x03\0\x06\x04node\x01BI\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\ -\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x04\x04\ -\0\x08cylinder\x03\x01\x04\0\x06cuboid\x03\x01\x01r\x01\x0csubdivisions}\x04\0\x0a\ -sphere-ico\x03\0\x08\x01r\x02\x07sectors}\x06stacks}\x04\0\x09sphere-uv\x03\0\x0a\ -\x01q\x02\x03ico\x01\x09\0\x02uv\x01\x0b\0\x04\0\x0bsphere-kind\x03\0\x0c\x04\0\x06\ -sphere\x03\x01\x01i\x06\x01@\x02\x06radiusv\x06heightv\0\x0f\x04\0\x15[construct\ -or]cylinder\x01\x10\x01h\x06\x01@\x01\x04self\x11\0\x7f\x04\0\x14[method]cylinde\ -r.cap\x01\x12\x01@\x02\x04self\x11\x05value\x7f\x01\0\x04\0\x18[method]cylinder.\ -set-cap\x01\x13\x01@\x01\x04self\x11\0v\x04\0\x17[method]cylinder.height\x01\x14\ -\x01@\x02\x04self\x11\x05valuev\x01\0\x04\0\x1b[method]cylinder.set-height\x01\x15\ -\x04\0\x17[method]cylinder.radius\x01\x14\x04\0\x1b[method]cylinder.set-radius\x01\ -\x15\x01@\x01\x04self\x11\0}\x04\0\x1b[method]cylinder.resolution\x01\x16\x01@\x02\ -\x04self\x11\x05value}\x01\0\x04\0\x1f[method]cylinder.set-resolution\x01\x17\x04\ -\0\x19[method]cylinder.segments\x01\x16\x04\0\x1d[method]cylinder.set-segments\x01\ -\x17\x01i\x03\x01@\x01\x04self\x11\0\x18\x04\0\x18[method]cylinder.to-mesh\x01\x19\ -\x01i\x05\x01@\x01\x04self\x11\0\x1a\x04\0\x18[method]cylinder.to-node\x01\x1b\x04\ -\0\x20[method]cylinder.to-physics-node\x01\x1b\x01i\x07\x01@\x01\x04size\x01\0\x1c\ -\x04\0\x13[constructor]cuboid\x01\x1d\x01h\x07\x01@\x01\x04self\x1e\0\x01\x04\0\x13\ -[method]cuboid.size\x01\x1f\x01@\x02\x04self\x1e\x05value\x01\x01\0\x04\0\x17[me\ -thod]cuboid.set-size\x01\x20\x01@\x01\x04self\x1e\0\x18\x04\0\x16[method]cuboid.\ -to-mesh\x01!\x01@\x01\x04self\x1e\0\x1a\x04\0\x16[method]cuboid.to-node\x01\"\x04\ -\0\x1e[method]cuboid.to-physics-node\x01\"\x01i\x0e\x01@\x01\x06radiusv\0#\x04\0\ -\x16[static]sphere.new-ico\x01$\x04\0\x15[static]sphere.new-uv\x01$\x01h\x0e\x01\ -@\x01\x04self%\0v\x04\0\x15[method]sphere.radius\x01&\x01@\x02\x04self%\x05value\ -v\x01\0\x04\0\x19[method]sphere.set-radius\x01'\x01@\x01\x04self%\0\x0d\x04\0\x13\ -[method]sphere.kind\x01(\x01@\x02\x04self%\x05value\x0d\x01\0\x04\0\x17[method]s\ -phere.set-kind\x01)\x01@\x01\x04self%\0\x18\x04\0\x16[method]sphere.to-mesh\x01*\ -\x01@\x01\x04self%\0\x1a\x04\0\x16[method]sphere.to-node\x01+\x04\0\x1e[method]s\ -phere.to-physics-node\x01+\x03\x01\x10unavi:shapes/api\x05\x11\x01B\x04\x01m\x04\ -\x05debug\x04info\x04warn\x05error\x04\0\x09log-level\x03\0\0\x01@\x02\x05level\x01\ -\x07messages\x01\0\x04\0\x03log\x01\x02\x03\x01\x0dwired:log/api\x05\x12\x01B\x0f\ -\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x01i\x01\x01r\x0f\x04head\x02\x05spin\ -e\x02\x04hips\x02\x0eleft-upper-arm\x02\x0eleft-lower-arm\x02\x09left-hand\x02\x0f\ -right-upper-arm\x02\x0fright-lower-arm\x02\x0aright-hand\x02\x0eleft-upper-leg\x02\ -\x0eleft-lower-leg\x02\x09left-foot\x02\x0fright-upper-leg\x02\x0fright-lower-le\ -g\x02\x0aright-foot\x02\x04\0\x08skeleton\x03\0\x03\x04\0\x06player\x03\x01\x01h\ -\x05\x01@\x01\x04self\x06\0\x04\x04\0\x17[method]player.skeleton\x01\x07\x01i\x05\ -\x01p\x08\x01@\0\0\x09\x04\0\x0clist-players\x01\x0a\x01@\0\0\x08\x04\0\x0clocal\ --player\x01\x0b\x03\x01\x10wired:player/api\x05\x13\x01B\x15\x02\x03\x02\x01\x10\ -\x04\0\x04node\x03\0\0\x04\0\x05scene\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x12[co\ -nstructor]scene\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x10[method]scene.\ -id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x12[method]scene.name\x01\x07\x01@\x02\x04\ -self\x05\x05values\x01\0\x04\0\x16[method]scene.set-name\x01\x08\x01i\x01\x01p\x09\ -\x01@\x01\x04self\x05\0\x0a\x04\0\x13[method]scene.nodes\x01\x0b\x01h\x01\x01@\x02\ -\x04self\x05\x05value\x0c\x01\0\x04\0\x16[method]scene.add-node\x01\x0d\x04\0\x19\ -[method]scene.remove-node\x01\x0d\x03\x01\x11wired:scene/scene\x05\x14\x02\x03\0\ -\x0a\x05scene\x01B5\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x02\x03\x02\x01\ -\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x04\x02\x03\ -\x02\x01\x15\x04\0\x05scene\x03\0\x06\x04\0\x04gltf\x03\x01\x01i\x08\x01@\0\0\x09\ -\x04\0\x11[constructor]gltf\x01\x0a\x01h\x08\x01i\x01\x01p\x0c\x01@\x01\x04self\x0b\ -\0\x0d\x04\0\x1b[method]gltf.list-materials\x01\x0e\x01h\x01\x01@\x02\x04self\x0b\ -\x05value\x0f\x01\0\x04\0\x19[method]gltf.add-material\x01\x10\x04\0\x1c[method]\ -gltf.remove-material\x01\x10\x01i\x03\x01p\x11\x01@\x01\x04self\x0b\0\x12\x04\0\x18\ -[method]gltf.list-meshes\x01\x13\x01h\x03\x01@\x02\x04self\x0b\x05value\x14\x01\0\ -\x04\0\x15[method]gltf.add-mesh\x01\x15\x04\0\x18[method]gltf.remove-mesh\x01\x15\ -\x01i\x05\x01p\x16\x01@\x01\x04self\x0b\0\x17\x04\0\x17[method]gltf.list-nodes\x01\ -\x18\x01h\x05\x01@\x02\x04self\x0b\x05value\x19\x01\0\x04\0\x15[method]gltf.add-\ -node\x01\x1a\x04\0\x18[method]gltf.remove-node\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\ -\x04self\x0b\0\x1c\x04\0\x18[method]gltf.list-scenes\x01\x1d\x01h\x07\x01@\x02\x04\ -self\x0b\x05value\x1e\x01\0\x04\0\x16[method]gltf.add-scene\x01\x1f\x04\0\x19[me\ -thod]gltf.remove-scene\x01\x1f\x01k\x1b\x01@\x01\x04self\x0b\0\x20\x04\0\x19[met\ -hod]gltf.active-scene\x01!\x01k\x1e\x01@\x02\x04self\x0b\x05value\"\x01\0\x04\0\x1d\ -[method]gltf.set-active-scene\x01#\x04\0\x1a[method]gltf.default-scene\x01!\x04\0\ -\x1e[method]gltf.set-default-scene\x01\x1f\x03\x01\x10wired:scene/gltf\x05\x16\x02\ -\x03\0\x0b\x04gltf\x01Bt\x02\x03\x02\x01\x17\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\ -\x10\x04\0\x04node\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x04\ -\0\x04glxf\x03\x01\x04\0\x0aasset-gltf\x03\x01\x04\0\x0aasset-glxf\x03\x01\x01i\x07\ -\x01i\x08\x01q\x02\x04gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01\ -h\x07\x01h\x08\x01q\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\0\x04\0\x0casset-borro\ -w\x03\0\x0f\x04\0\x09glxf-node\x03\x01\x01i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\ -\0\x05nodes\x01\x13\0\x04\0\x08children\x03\0\x14\x01h\x11\x01p\x16\x01q\x02\x05\ -asset\x01\x10\0\x05nodes\x01\x17\0\x04\0\x0fchildren-borrow\x03\0\x18\x04\0\x0ag\ -lxf-scene\x03\x01\x01i\x06\x01@\0\0\x1b\x04\0\x11[constructor]glxf\x01\x1c\x01h\x06\ -\x01p\x0c\x01@\x01\x04self\x1d\0\x1e\x04\0\x18[method]glxf.list-assets\x01\x1f\x01\ -@\x02\x04self\x1d\x05value\x10\x01\0\x04\0\x16[method]glxf.add-asset\x01\x20\x04\ -\0\x19[method]glxf.remove-asset\x01\x20\x01@\x01\x04self\x1d\0\x13\x04\0\x17[met\ -hod]glxf.list-nodes\x01!\x01@\x02\x04self\x1d\x05value\x16\x01\0\x04\0\x15[metho\ -d]glxf.add-node\x01\"\x04\0\x18[method]glxf.remove-node\x01\"\x01i\x1a\x01p#\x01\ -@\x01\x04self\x1d\0$\x04\0\x18[method]glxf.list-scenes\x01%\x01h\x1a\x01@\x02\x04\ -self\x1d\x05value&\x01\0\x04\0\x16[method]glxf.add-scene\x01'\x04\0\x19[method]g\ -lxf.remove-scene\x01'\x01k#\x01@\x01\x04self\x1d\0(\x04\0\x19[method]glxf.active\ --scene\x01)\x01k&\x01@\x02\x04self\x1d\x05value*\x01\0\x04\0\x1d[method]glxf.set\ --active-scene\x01+\x04\0\x1a[method]glxf.default-scene\x01)\x04\0\x1e[method]glx\ -f.set-default-scene\x01'\x01h\x01\x01@\x01\x08document,\0\x09\x04\0\x17[construc\ -tor]asset-gltf\x01-\x01i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b[method]asset-gltf\ -.document\x01/\x01i\x03\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d[method]asset-glt\ -f.list-nodes\x012\x01h\x03\x01@\x02\x04self\x0d\x05value3\x01\0\x04\0\x1b[method\ -]asset-gltf.add-node\x014\x04\0\x1e[method]asset-gltf.remove-node\x014\x01@\x01\x08\ -document\x1d\0\x0a\x04\0\x17[constructor]asset-glxf\x015\x01@\x01\x04self\x0e\0\x1b\ -\x04\0\x1b[method]asset-glxf.document\x016\x01@\x01\x04self\x0e\0\x13\x04\0\x1d[\ -method]asset-glxf.list-nodes\x017\x01@\x02\x04self\x0e\x05value\x16\x01\0\x04\0\x1b\ -[method]asset-glxf.add-node\x018\x04\0\x1e[method]asset-glxf.remove-node\x018\x01\ -@\0\0\x12\x04\0\x16[constructor]glxf-node\x019\x01@\x01\x04self\x16\0y\x04\0\x14\ -[method]glxf-node.id\x01:\x01@\x01\x04self\x16\0s\x04\0\x16[method]glxf-node.nam\ -e\x01;\x01@\x02\x04self\x16\x05values\x01\0\x04\0\x1a[method]glxf-node.set-name\x01\ -<\x01@\x01\x04self\x16\0\x05\x04\0\x1b[method]glxf-node.transform\x01=\x01@\x02\x04\ -self\x16\x05value\x05\x01\0\x04\0\x1f[method]glxf-node.set-transform\x01>\x01k\x12\ -\x01@\x01\x04self\x16\0?\x04\0\x18[method]glxf-node.parent\x01@\x01k\x15\x01@\x01\ -\x04self\x16\0\xc1\0\x04\0\x1a[method]glxf-node.children\x01B\x01k\x19\x01@\x02\x04\ -self\x16\x05value\xc3\0\x01\0\x04\0\x1e[method]glxf-node.set-children\x01D\x01@\0\ -\0#\x04\0\x17[constructor]glxf-scene\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]\ -glxf-scene.id\x01F\x01@\x01\x04self&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01\ -@\x02\x04self&\x05values\x01\0\x04\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\ -\x04self&\0\x13\x04\0\x18[method]glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\ -\x16\x01\0\x04\0\x1b[method]glxf-scene.add-node\x01J\x04\0\x1e[method]glxf-scene\ -.remove-node\x01J\x04\0\x08get-root\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x18\x01\ -B\x07\x04\0\x06script\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\ -\x02\x01h\0\x01@\x02\x04self\x03\x05deltav\x01\0\x04\0\x15[method]script.update\x01\ -\x04\x04\x01\x12wired:script/types\x05\x19\x04\x01\x1aexample:wired-scene/script\ -\x04\0\x0b\x0c\x01\0\x06script\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0d\ -wit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 8794] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xddC\x01A\x02\x01A)\x01\ +B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\0\ +\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01r\ +\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\0\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\ +\0\x05color\x03\0\0\x04\0\x08material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[co\ +nstructor]material\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]mat\ +erial.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15[method]material.name\x01\x07\x01\ +@\x02\x04self\x05\x05values\x01\0\x04\0\x19[method]material.set-name\x01\x08\x01\ +@\x01\x04self\x05\0\x01\x04\0\x16[method]material.color\x01\x09\x01@\x02\x04self\ +\x05\x05value\x01\x01\0\x04\0\x1a[method]material.set-color\x01\x0a\x03\x01\x14w\ +ired:scene/material\x05\x01\x02\x03\0\x01\x08material\x01B)\x02\x03\x02\x01\x02\x04\ +\0\x08material\x03\0\0\x04\0\x09primitive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\ +\x01@\x01\x04self\x04\0y\x04\0\x14[method]primitive.id\x01\x05\x01i\x01\x01k\x06\ +\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]primitive.material\x01\x08\x01h\x01\ +\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\0\x04\0\x1e[method]primitive.set\ +-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05value\x0c\x01\0\x04\0\x1d[method\ +]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04self\x04\x05value\x0e\x01\0\x04\ +\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\x1f[method]primitive.set-posit\ +ions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\ +\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04self\x12\0y\x04\0\x0f[metho\ +d]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[method]mesh.name\x01\x14\x01\ +@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]mesh.set-name\x01\x15\x01i\x02\ +\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[method]mesh.list-primitives\x01\x18\ +\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.create-primitive\x01\x19\x01@\x02\ +\x04self\x12\x05value\x16\x01\0\x04\0\x1d[method]mesh.remove-primitive\x01\x1a\x03\ +\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\ +\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\x02\x03\x02\x01\x07\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x04\0\x08collid\ +er\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\ +\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-handler\x02\x03\0\0\x09transfo\ +rm\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-body\x01BB\x02\x03\x02\x01\x0a\ +\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0dinput-handler\x03\0\x02\x02\x03\ +\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0d\x04\0\x08collider\x03\ +\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01\ +i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\ +\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]no\ +de.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-n\ +ame\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\ +\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\ +\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\ +\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[metho\ +d]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[metho\ +d]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11\ +[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\ +\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\ +\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\ +\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\ +\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04\ +self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k\ +*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k\ +-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01\ +/\x03\x01\x10wired:scene/node\x05\x0f\x02\x03\0\0\x04vec2\x02\x03\0\x06\x04node\x01\ +BY\x02\x03\x02\x01\x10\x04\0\x04vec2\x03\0\0\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\ +\0\x02\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x04\x02\x03\x02\x01\x11\x04\0\x04\ +node\x03\0\x06\x04\0\x09rectangle\x03\x01\x04\0\x08cylinder\x03\x01\x04\0\x06cub\ +oid\x03\x01\x01r\x01\x0csubdivisions}\x04\0\x0asphere-ico\x03\0\x0b\x01r\x02\x07\ +sectors}\x06stacks}\x04\0\x09sphere-uv\x03\0\x0d\x01q\x02\x03ico\x01\x0c\0\x02uv\ +\x01\x0e\0\x04\0\x0bsphere-kind\x03\0\x0f\x04\0\x06sphere\x03\x01\x01i\x08\x01@\x01\ +\x04size\x01\0\x12\x04\0\x16[constructor]rectangle\x01\x13\x01h\x08\x01@\x01\x04\ +self\x14\0\x01\x04\0\x16[method]rectangle.size\x01\x15\x01@\x02\x04self\x14\x05v\ +alue\x01\x01\0\x04\0\x1a[method]rectangle.set-size\x01\x16\x01i\x05\x01@\x01\x04\ +self\x14\0\x17\x04\0\x19[method]rectangle.to-mesh\x01\x18\x01i\x07\x01@\x01\x04s\ +elf\x14\0\x19\x04\0\x19[method]rectangle.to-node\x01\x1a\x04\0![method]rectangle\ +.to-physics-node\x01\x1a\x01i\x09\x01@\x02\x06radiusv\x06heightv\0\x1b\x04\0\x15\ +[constructor]cylinder\x01\x1c\x01h\x09\x01@\x01\x04self\x1d\0\x7f\x04\0\x14[meth\ +od]cylinder.cap\x01\x1e\x01@\x02\x04self\x1d\x05value\x7f\x01\0\x04\0\x18[method\ +]cylinder.set-cap\x01\x1f\x01@\x01\x04self\x1d\0v\x04\0\x17[method]cylinder.heig\ +ht\x01\x20\x01@\x02\x04self\x1d\x05valuev\x01\0\x04\0\x1b[method]cylinder.set-he\ +ight\x01!\x04\0\x17[method]cylinder.radius\x01\x20\x04\0\x1b[method]cylinder.set\ +-radius\x01!\x01@\x01\x04self\x1d\0}\x04\0\x1b[method]cylinder.resolution\x01\"\x01\ +@\x02\x04self\x1d\x05value}\x01\0\x04\0\x1f[method]cylinder.set-resolution\x01#\x04\ +\0\x19[method]cylinder.segments\x01\"\x04\0\x1d[method]cylinder.set-segments\x01\ +#\x01@\x01\x04self\x1d\0\x17\x04\0\x18[method]cylinder.to-mesh\x01$\x01@\x01\x04\ +self\x1d\0\x19\x04\0\x18[method]cylinder.to-node\x01%\x04\0\x20[method]cylinder.\ +to-physics-node\x01%\x01i\x0a\x01@\x01\x04size\x03\0&\x04\0\x13[constructor]cubo\ +id\x01'\x01h\x0a\x01@\x01\x04self(\0\x03\x04\0\x13[method]cuboid.size\x01)\x01@\x02\ +\x04self(\x05value\x03\x01\0\x04\0\x17[method]cuboid.set-size\x01*\x01@\x01\x04s\ +elf(\0\x17\x04\0\x16[method]cuboid.to-mesh\x01+\x01@\x01\x04self(\0\x19\x04\0\x16\ +[method]cuboid.to-node\x01,\x04\0\x1e[method]cuboid.to-physics-node\x01,\x01i\x11\ +\x01@\x01\x06radiusv\0-\x04\0\x16[static]sphere.new-ico\x01.\x04\0\x15[static]sp\ +here.new-uv\x01.\x01h\x11\x01@\x01\x04self/\0v\x04\0\x15[method]sphere.radius\x01\ +0\x01@\x02\x04self/\x05valuev\x01\0\x04\0\x19[method]sphere.set-radius\x011\x01@\ +\x01\x04self/\0\x10\x04\0\x13[method]sphere.kind\x012\x01@\x02\x04self/\x05value\ +\x10\x01\0\x04\0\x17[method]sphere.set-kind\x013\x01@\x01\x04self/\0\x17\x04\0\x16\ +[method]sphere.to-mesh\x014\x01@\x01\x04self/\0\x19\x04\0\x16[method]sphere.to-n\ +ode\x015\x04\0\x1e[method]sphere.to-physics-node\x015\x03\x01\x10unavi:shapes/ap\ +i\x05\x12\x01B\x04\x01m\x04\x05debug\x04info\x04warn\x05error\x04\0\x09log-level\ +\x03\0\0\x01@\x02\x05level\x01\x07messages\x01\0\x04\0\x03log\x01\x02\x03\x01\x0d\ +wired:log/api\x05\x13\x01B\x0f\x02\x03\x02\x01\x11\x04\0\x04node\x03\0\0\x01i\x01\ +\x01r\x0f\x04head\x02\x05spine\x02\x04hips\x02\x0eleft-upper-arm\x02\x0eleft-low\ +er-arm\x02\x09left-hand\x02\x0fright-upper-arm\x02\x0fright-lower-arm\x02\x0arig\ +ht-hand\x02\x0eleft-upper-leg\x02\x0eleft-lower-leg\x02\x09left-foot\x02\x0frigh\ +t-upper-leg\x02\x0fright-lower-leg\x02\x0aright-foot\x02\x04\0\x08skeleton\x03\0\ +\x03\x04\0\x06player\x03\x01\x01h\x05\x01@\x01\x04self\x06\0\x04\x04\0\x17[metho\ +d]player.skeleton\x01\x07\x01i\x05\x01p\x08\x01@\0\0\x09\x04\0\x0clist-players\x01\ +\x0a\x01@\0\0\x08\x04\0\x0clocal-player\x01\x0b\x03\x01\x10wired:player/api\x05\x14\ +\x01B\x15\x02\x03\x02\x01\x11\x04\0\x04node\x03\0\0\x04\0\x05scene\x03\x01\x01i\x02\ +\x01@\0\0\x03\x04\0\x12[constructor]scene\x01\x04\x01h\x02\x01@\x01\x04self\x05\0\ +y\x04\0\x10[method]scene.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x12[method]sce\ +ne.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x16[method]scene.set-\ +name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04self\x05\0\x0a\x04\0\x13[method]scene\ +.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\x05value\x0c\x01\0\x04\0\x16[method\ +]scene.add-node\x01\x0d\x04\0\x19[method]scene.remove-node\x01\x0d\x03\x01\x11wi\ +red:scene/scene\x05\x15\x02\x03\0\x0a\x05scene\x01B5\x02\x03\x02\x01\x02\x04\0\x08\ +material\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\x11\ +\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x16\x04\0\x05scene\x03\0\x06\x04\0\x04g\ +ltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[constructor]gltf\x01\x0a\x01h\x08\x01\ +i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\0\x1b[method]gltf.list-materials\x01\ +\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\x0f\x01\0\x04\0\x19[method]gltf.add-\ +material\x01\x10\x04\0\x1c[method]gltf.remove-material\x01\x10\x01i\x03\x01p\x11\ +\x01@\x01\x04self\x0b\0\x12\x04\0\x18[method]gltf.list-meshes\x01\x13\x01h\x03\x01\ +@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\x15[method]gltf.add-mesh\x01\x15\x04\0\ +\x18[method]gltf.remove-mesh\x01\x15\x01i\x05\x01p\x16\x01@\x01\x04self\x0b\0\x17\ +\x04\0\x17[method]gltf.list-nodes\x01\x18\x01h\x05\x01@\x02\x04self\x0b\x05value\ +\x19\x01\0\x04\0\x15[method]gltf.add-node\x01\x1a\x04\0\x18[method]gltf.remove-n\ +ode\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\x04\0\x18[method]gltf.l\ +ist-scenes\x01\x1d\x01h\x07\x01@\x02\x04self\x0b\x05value\x1e\x01\0\x04\0\x16[me\ +thod]gltf.add-scene\x01\x1f\x04\0\x19[method]gltf.remove-scene\x01\x1f\x01k\x1b\x01\ +@\x01\x04self\x0b\0\x20\x04\0\x19[method]gltf.active-scene\x01!\x01k\x1e\x01@\x02\ +\x04self\x0b\x05value\"\x01\0\x04\0\x1d[method]gltf.set-active-scene\x01#\x04\0\x1a\ +[method]gltf.default-scene\x01!\x04\0\x1e[method]gltf.set-default-scene\x01\x1f\x03\ +\x01\x10wired:scene/gltf\x05\x17\x02\x03\0\x0b\x04gltf\x01Bt\x02\x03\x02\x01\x18\ +\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\x11\x04\0\x04node\x03\0\x02\x02\x03\x02\x01\ +\x0c\x04\0\x09transform\x03\0\x04\x04\0\x04glxf\x03\x01\x04\0\x0aasset-gltf\x03\x01\ +\x04\0\x0aasset-glxf\x03\x01\x01i\x07\x01i\x08\x01q\x02\x04gltf\x01\x09\0\x04glx\ +f\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01h\x07\x01h\x08\x01q\x02\x04gltf\x01\x0d\0\ +\x04glxf\x01\x0e\0\x04\0\x0casset-borrow\x03\0\x0f\x04\0\x09glxf-node\x03\x01\x01\ +i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\0\x05nodes\x01\x13\0\x04\0\x08children\x03\ +\0\x14\x01h\x11\x01p\x16\x01q\x02\x05asset\x01\x10\0\x05nodes\x01\x17\0\x04\0\x0f\ +children-borrow\x03\0\x18\x04\0\x0aglxf-scene\x03\x01\x01i\x06\x01@\0\0\x1b\x04\0\ +\x11[constructor]glxf\x01\x1c\x01h\x06\x01p\x0c\x01@\x01\x04self\x1d\0\x1e\x04\0\ +\x18[method]glxf.list-assets\x01\x1f\x01@\x02\x04self\x1d\x05value\x10\x01\0\x04\ +\0\x16[method]glxf.add-asset\x01\x20\x04\0\x19[method]glxf.remove-asset\x01\x20\x01\ +@\x01\x04self\x1d\0\x13\x04\0\x17[method]glxf.list-nodes\x01!\x01@\x02\x04self\x1d\ +\x05value\x16\x01\0\x04\0\x15[method]glxf.add-node\x01\"\x04\0\x18[method]glxf.r\ +emove-node\x01\"\x01i\x1a\x01p#\x01@\x01\x04self\x1d\0$\x04\0\x18[method]glxf.li\ +st-scenes\x01%\x01h\x1a\x01@\x02\x04self\x1d\x05value&\x01\0\x04\0\x16[method]gl\ +xf.add-scene\x01'\x04\0\x19[method]glxf.remove-scene\x01'\x01k#\x01@\x01\x04self\ +\x1d\0(\x04\0\x19[method]glxf.active-scene\x01)\x01k&\x01@\x02\x04self\x1d\x05va\ +lue*\x01\0\x04\0\x1d[method]glxf.set-active-scene\x01+\x04\0\x1a[method]glxf.def\ +ault-scene\x01)\x04\0\x1e[method]glxf.set-default-scene\x01'\x01h\x01\x01@\x01\x08\ +document,\0\x09\x04\0\x17[constructor]asset-gltf\x01-\x01i\x01\x01@\x01\x04self\x0d\ +\0.\x04\0\x1b[method]asset-gltf.document\x01/\x01i\x03\x01p0\x01@\x01\x04self\x0d\ +\01\x04\0\x1d[method]asset-gltf.list-nodes\x012\x01h\x03\x01@\x02\x04self\x0d\x05\ +value3\x01\0\x04\0\x1b[method]asset-gltf.add-node\x014\x04\0\x1e[method]asset-gl\ +tf.remove-node\x014\x01@\x01\x08document\x1d\0\x0a\x04\0\x17[constructor]asset-g\ +lxf\x015\x01@\x01\x04self\x0e\0\x1b\x04\0\x1b[method]asset-glxf.document\x016\x01\ +@\x01\x04self\x0e\0\x13\x04\0\x1d[method]asset-glxf.list-nodes\x017\x01@\x02\x04\ +self\x0e\x05value\x16\x01\0\x04\0\x1b[method]asset-glxf.add-node\x018\x04\0\x1e[\ +method]asset-glxf.remove-node\x018\x01@\0\0\x12\x04\0\x16[constructor]glxf-node\x01\ +9\x01@\x01\x04self\x16\0y\x04\0\x14[method]glxf-node.id\x01:\x01@\x01\x04self\x16\ +\0s\x04\0\x16[method]glxf-node.name\x01;\x01@\x02\x04self\x16\x05values\x01\0\x04\ +\0\x1a[method]glxf-node.set-name\x01<\x01@\x01\x04self\x16\0\x05\x04\0\x1b[metho\ +d]glxf-node.transform\x01=\x01@\x02\x04self\x16\x05value\x05\x01\0\x04\0\x1f[met\ +hod]glxf-node.set-transform\x01>\x01k\x12\x01@\x01\x04self\x16\0?\x04\0\x18[meth\ +od]glxf-node.parent\x01@\x01k\x15\x01@\x01\x04self\x16\0\xc1\0\x04\0\x1a[method]\ +glxf-node.children\x01B\x01k\x19\x01@\x02\x04self\x16\x05value\xc3\0\x01\0\x04\0\ +\x1e[method]glxf-node.set-children\x01D\x01@\0\0#\x04\0\x17[constructor]glxf-sce\ +ne\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]glxf-scene.id\x01F\x01@\x01\x04sel\ +f&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01@\x02\x04self&\x05values\x01\0\x04\ +\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\x04self&\0\x13\x04\0\x18[method]\ +glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\x16\x01\0\x04\0\x1b[method]glxf-\ +scene.add-node\x01J\x04\0\x1e[method]glxf-scene.remove-node\x01J\x04\0\x08get-ro\ +ot\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x19\x01B\x07\x04\0\x06script\x03\x01\x01\ +i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\x02\x01h\0\x01@\x02\x04self\x03\ +\x05deltav\x01\0\x04\0\x15[method]script.update\x01\x04\x04\x01\x12wired:script/\ +types\x05\x1a\x04\x01\x1aexample:wired-scene/script\x04\0\x0b\x0c\x01\0\x06scrip\ +t\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10\ +wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/test-wired-player/src/bindings.rs b/wasm/test-wired-player/src/bindings.rs index f757c73c1..2cd72b20f 100644 --- a/wasm/test-wired-player/src/bindings.rs +++ b/wasm/test-wired-player/src/bindings.rs @@ -5684,165 +5684,165 @@ pub(crate) use __export_script_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:script:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 7128] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xdb6\x01A\x02\x01A&\x01\ -B\x06\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01z\ -v\x01wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btransla\ -tion\x01\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\0\x02\x03\0\ -\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\x02\x03\x02\x01\x01\x04\0\x04vec3\x03\0\0\ -\x02\x03\x02\x01\x02\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09\ -hand-side\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\ -\x05joint\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacar\ -pal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05\ -index\x09\x06middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05el\ -bow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03\ -ray\x03\0\x0d\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\ -\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainp\ -ut-type\x03\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0bi\ -nput-event\x03\0\x13\x03\x01\x11wired:input/types\x05\x03\x02\x03\0\x01\x0binput\ --event\x01B\x0a\x02\x03\x02\x01\x04\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-\ -handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\ -\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handl\ -e-input\x01\x07\x03\x01\x13wired:input/handler\x05\x05\x01B\x04\x01m\x04\x05debu\ -g\x04info\x04warn\x05error\x04\0\x09log-level\x03\0\0\x01@\x02\x05level\x01\x07m\ -essages\x01\0\x04\0\x03log\x01\x02\x03\x01\x0dwired:log/api\x05\x06\x01B\x1c\x02\ -\x03\x02\x01\x01\x04\0\x04vec3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06hei\ -ghtv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08\ -cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\ -\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\ -\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\ -\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\ -\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01\ -i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\ -\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\ -\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\ -\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-\ -linvel\x01\x13\x03\x01\x13wired:physics/types\x05\x07\x01B\x11\x01r\x04\x01rv\x01\ -gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08material\x03\x01\x01i\x02\x01@\0\0\ -\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\ -\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15[method]mater\ -ial.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x19[method]material.\ -set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\0\x16[method]material.color\x01\x09\ -\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\0\x1a[method]material.set-color\x01\ -\x0a\x03\x01\x14wired:scene/material\x05\x08\x02\x03\0\x05\x08material\x01B)\x02\ -\x03\x02\x01\x09\x04\0\x08material\x03\0\0\x04\0\x09primitive\x03\x01\x04\0\x04m\ -esh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\0\x14[method]primitive.id\x01\x05\ -\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]primitive.materia\ -l\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\0\x04\0\x1e[me\ -thod]primitive.set-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05value\x0c\x01\0\ -\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04self\x04\x05va\ -lue\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\x1f[method]pr\ -imitive.set-positions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\x0f\x01i\x03\ -\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04self\x12\0\ -y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[method]mesh\ -.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]mesh.set-nam\ -e\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[method]mesh.lis\ -t-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.create-pri\ -mitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d[method]mesh.rem\ -ove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x0a\x02\x03\0\x06\x04mesh\x02\ -\x03\0\x02\x0dinput-handler\x02\x03\0\0\x09transform\x02\x03\0\x04\x08collider\x02\ -\x03\0\x04\x0arigid-body\x01BB\x02\x03\x02\x01\x0b\x04\0\x04mesh\x03\0\0\x02\x03\ -\x02\x01\x0c\x04\0\x0dinput-handler\x03\0\x02\x02\x03\x02\x01\x0d\x04\0\x09trans\ -form\x03\0\x04\x02\x03\x02\x01\x0e\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0f\ -\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\ -\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]\ -node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\ -\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01\ -@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\ -\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]nod\ -e.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node\ -.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\ -\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\ -\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\ -\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]\ -node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[met\ -hod]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\ -\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\ -\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\ -\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\ -\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\ -\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:s\ -cene/node\x05\x10\x02\x03\0\x07\x04node\x01B\x0f\x02\x03\x02\x01\x11\x04\0\x04no\ -de\x03\0\0\x01i\x01\x01r\x0f\x04head\x02\x05spine\x02\x04hips\x02\x0eleft-upper-\ -arm\x02\x0eleft-lower-arm\x02\x09left-hand\x02\x0fright-upper-arm\x02\x0fright-l\ -ower-arm\x02\x0aright-hand\x02\x0eleft-upper-leg\x02\x0eleft-lower-leg\x02\x09le\ -ft-foot\x02\x0fright-upper-leg\x02\x0fright-lower-leg\x02\x0aright-foot\x02\x04\0\ -\x08skeleton\x03\0\x03\x04\0\x06player\x03\x01\x01h\x05\x01@\x01\x04self\x06\0\x04\ -\x04\0\x17[method]player.skeleton\x01\x07\x01i\x05\x01p\x08\x01@\0\0\x09\x04\0\x0c\ -list-players\x01\x0a\x01@\0\0\x08\x04\0\x0clocal-player\x01\x0b\x03\x01\x10wired\ -:player/api\x05\x12\x01B\x15\x02\x03\x02\x01\x11\x04\0\x04node\x03\0\0\x04\0\x05\ -scene\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x12[constructor]scene\x01\x04\x01h\x02\ -\x01@\x01\x04self\x05\0y\x04\0\x10[method]scene.id\x01\x06\x01@\x01\x04self\x05\0\ -s\x04\0\x12[method]scene.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\ -\x16[method]scene.set-name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04self\x05\0\x0a\x04\ -\0\x13[method]scene.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\x05value\x0c\x01\ -\0\x04\0\x16[method]scene.add-node\x01\x0d\x04\0\x19[method]scene.remove-node\x01\ -\x0d\x03\x01\x11wired:scene/scene\x05\x13\x02\x03\0\x09\x05scene\x01B5\x02\x03\x02\ -\x01\x09\x04\0\x08material\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x04mesh\x03\0\x02\x02\ -\x03\x02\x01\x11\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x14\x04\0\x05scene\x03\0\ -\x06\x04\0\x04gltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[constructor]gltf\x01\x0a\ -\x01h\x08\x01i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\0\x1b[method]gltf.lis\ -t-materials\x01\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\x0f\x01\0\x04\0\x19[m\ -ethod]gltf.add-material\x01\x10\x04\0\x1c[method]gltf.remove-material\x01\x10\x01\ -i\x03\x01p\x11\x01@\x01\x04self\x0b\0\x12\x04\0\x18[method]gltf.list-meshes\x01\x13\ -\x01h\x03\x01@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\x15[method]gltf.add-mesh\ -\x01\x15\x04\0\x18[method]gltf.remove-mesh\x01\x15\x01i\x05\x01p\x16\x01@\x01\x04\ -self\x0b\0\x17\x04\0\x17[method]gltf.list-nodes\x01\x18\x01h\x05\x01@\x02\x04sel\ -f\x0b\x05value\x19\x01\0\x04\0\x15[method]gltf.add-node\x01\x1a\x04\0\x18[method\ -]gltf.remove-node\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\x04\0\x18\ -[method]gltf.list-scenes\x01\x1d\x01h\x07\x01@\x02\x04self\x0b\x05value\x1e\x01\0\ -\x04\0\x16[method]gltf.add-scene\x01\x1f\x04\0\x19[method]gltf.remove-scene\x01\x1f\ -\x01k\x1b\x01@\x01\x04self\x0b\0\x20\x04\0\x19[method]gltf.active-scene\x01!\x01\ -k\x1e\x01@\x02\x04self\x0b\x05value\"\x01\0\x04\0\x1d[method]gltf.set-active-sce\ -ne\x01#\x04\0\x1a[method]gltf.default-scene\x01!\x04\0\x1e[method]gltf.set-defau\ -lt-scene\x01\x1f\x03\x01\x10wired:scene/gltf\x05\x15\x02\x03\0\x0a\x04gltf\x01Bt\ -\x02\x03\x02\x01\x16\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\x11\x04\0\x04node\x03\ -\0\x02\x02\x03\x02\x01\x0d\x04\0\x09transform\x03\0\x04\x04\0\x04glxf\x03\x01\x04\ -\0\x0aasset-gltf\x03\x01\x04\0\x0aasset-glxf\x03\x01\x01i\x07\x01i\x08\x01q\x02\x04\ -gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01h\x07\x01h\x08\x01q\ -\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\0\x04\0\x0casset-borrow\x03\0\x0f\x04\0\x09\ -glxf-node\x03\x01\x01i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\0\x05nodes\x01\x13\ -\0\x04\0\x08children\x03\0\x14\x01h\x11\x01p\x16\x01q\x02\x05asset\x01\x10\0\x05\ -nodes\x01\x17\0\x04\0\x0fchildren-borrow\x03\0\x18\x04\0\x0aglxf-scene\x03\x01\x01\ -i\x06\x01@\0\0\x1b\x04\0\x11[constructor]glxf\x01\x1c\x01h\x06\x01p\x0c\x01@\x01\ -\x04self\x1d\0\x1e\x04\0\x18[method]glxf.list-assets\x01\x1f\x01@\x02\x04self\x1d\ -\x05value\x10\x01\0\x04\0\x16[method]glxf.add-asset\x01\x20\x04\0\x19[method]glx\ -f.remove-asset\x01\x20\x01@\x01\x04self\x1d\0\x13\x04\0\x17[method]glxf.list-nod\ -es\x01!\x01@\x02\x04self\x1d\x05value\x16\x01\0\x04\0\x15[method]glxf.add-node\x01\ -\"\x04\0\x18[method]glxf.remove-node\x01\"\x01i\x1a\x01p#\x01@\x01\x04self\x1d\0\ -$\x04\0\x18[method]glxf.list-scenes\x01%\x01h\x1a\x01@\x02\x04self\x1d\x05value&\ -\x01\0\x04\0\x16[method]glxf.add-scene\x01'\x04\0\x19[method]glxf.remove-scene\x01\ -'\x01k#\x01@\x01\x04self\x1d\0(\x04\0\x19[method]glxf.active-scene\x01)\x01k&\x01\ -@\x02\x04self\x1d\x05value*\x01\0\x04\0\x1d[method]glxf.set-active-scene\x01+\x04\ -\0\x1a[method]glxf.default-scene\x01)\x04\0\x1e[method]glxf.set-default-scene\x01\ -'\x01h\x01\x01@\x01\x08document,\0\x09\x04\0\x17[constructor]asset-gltf\x01-\x01\ -i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b[method]asset-gltf.document\x01/\x01i\x03\ -\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d[method]asset-gltf.list-nodes\x012\x01h\x03\ -\x01@\x02\x04self\x0d\x05value3\x01\0\x04\0\x1b[method]asset-gltf.add-node\x014\x04\ -\0\x1e[method]asset-gltf.remove-node\x014\x01@\x01\x08document\x1d\0\x0a\x04\0\x17\ -[constructor]asset-glxf\x015\x01@\x01\x04self\x0e\0\x1b\x04\0\x1b[method]asset-g\ -lxf.document\x016\x01@\x01\x04self\x0e\0\x13\x04\0\x1d[method]asset-glxf.list-no\ -des\x017\x01@\x02\x04self\x0e\x05value\x16\x01\0\x04\0\x1b[method]asset-glxf.add\ --node\x018\x04\0\x1e[method]asset-glxf.remove-node\x018\x01@\0\0\x12\x04\0\x16[c\ -onstructor]glxf-node\x019\x01@\x01\x04self\x16\0y\x04\0\x14[method]glxf-node.id\x01\ -:\x01@\x01\x04self\x16\0s\x04\0\x16[method]glxf-node.name\x01;\x01@\x02\x04self\x16\ -\x05values\x01\0\x04\0\x1a[method]glxf-node.set-name\x01<\x01@\x01\x04self\x16\0\ -\x05\x04\0\x1b[method]glxf-node.transform\x01=\x01@\x02\x04self\x16\x05value\x05\ -\x01\0\x04\0\x1f[method]glxf-node.set-transform\x01>\x01k\x12\x01@\x01\x04self\x16\ -\0?\x04\0\x18[method]glxf-node.parent\x01@\x01k\x15\x01@\x01\x04self\x16\0\xc1\0\ -\x04\0\x1a[method]glxf-node.children\x01B\x01k\x19\x01@\x02\x04self\x16\x05value\ -\xc3\0\x01\0\x04\0\x1e[method]glxf-node.set-children\x01D\x01@\0\0#\x04\0\x17[co\ -nstructor]glxf-scene\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]glxf-scene.id\x01\ -F\x01@\x01\x04self&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01@\x02\x04self&\x05\ -values\x01\0\x04\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\x04self&\0\x13\x04\ -\0\x18[method]glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\x16\x01\0\x04\0\x1b\ -[method]glxf-scene.add-node\x01J\x04\0\x1e[method]glxf-scene.remove-node\x01J\x04\ -\0\x08get-root\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x17\x01B\x07\x04\0\x06scr\ -ipt\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\x02\x01h\0\x01@\ -\x02\x04self\x03\x05deltav\x01\0\x04\0\x15[method]script.update\x01\x04\x04\x01\x12\ -wired:script/types\x05\x18\x04\x01\x18test:wired-player/script\x04\0\x0b\x0c\x01\ -\0\x06script\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x07\ -0.208.1\x10wit-bindgen-rust\x060.25.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 7147] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xee6\x01A\x02\x01A&\x01\ +B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\0\ +\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01r\ +\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\0\x02\x03\0\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\ +\x02\x03\x02\x01\x01\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x02\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x03\x02\x03\0\x01\x0binput-event\x01B\x0a\x02\x03\x02\x01\x04\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x05\x01B\x04\x01m\x04\x05debug\x04info\x04warn\x05error\x04\0\x09log-l\ +evel\x03\0\0\x01@\x02\x05level\x01\x07messages\x01\0\x04\0\x03log\x01\x02\x03\x01\ +\x0dwired:log/api\x05\x06\x01B\x1c\x02\x03\x02\x01\x01\x04\0\x04vec3\x03\0\0\x04\ +\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\ +\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\ +\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09\ +kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\ +\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18\ +[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[\ +method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\ +\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\ +\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\ +\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\ +\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/typ\ +es\x05\x07\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\ +\x08material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\ +\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04\ +self\x05\0s\x04\0\x15[method]material.name\x01\x07\x01@\x02\x04self\x05\x05value\ +s\x01\0\x04\0\x19[method]material.set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\ +\0\x16[method]material.color\x01\x09\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\ +\0\x1a[method]material.set-color\x01\x0a\x03\x01\x14wired:scene/material\x05\x08\ +\x02\x03\0\x05\x08material\x01B)\x02\x03\x02\x01\x09\x04\0\x08material\x03\0\0\x04\ +\0\x09primitive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\ +\0\x14[method]primitive.id\x01\x05\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\ +\0\x1a[method]primitive.material\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05\ +value\x0a\x01\0\x04\0\x1e[method]primitive.set-material\x01\x0b\x01py\x01@\x02\x04\ +self\x04\x05value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\ +\x01@\x02\x04self\x04\x05value\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\ +\x0f\x04\0\x1f[method]primitive.set-positions\x01\x0f\x04\0\x19[method]primitive\ +.set-uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\ +\x01@\x01\x04self\x12\0y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0\ +s\x04\0\x11[method]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15\ +[method]mesh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\ +\x1c[method]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[me\ +thod]mesh.create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\ +\x1d[method]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x0a\x02\ +\x03\0\x06\x04mesh\x02\x03\0\x02\x0dinput-handler\x02\x03\0\0\x09transform\x02\x03\ +\0\x04\x08collider\x02\x03\0\x04\x0arigid-body\x01BB\x02\x03\x02\x01\x0b\x04\0\x04\ +mesh\x03\0\0\x02\x03\x02\x01\x0c\x04\0\x0dinput-handler\x03\0\x02\x02\x03\x02\x01\ +\x0d\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0e\x04\0\x08collider\x03\0\x06\ +\x02\x03\x02\x01\x0f\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\ +\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0\ +y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]node\ +.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-nam\ +e\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\ +\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\ +\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\ +\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[metho\ +d]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[metho\ +d]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11\ +[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\ +\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\ +\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\ +\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\ +\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04\ +self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k\ +*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k\ +-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01\ +/\x03\x01\x10wired:scene/node\x05\x10\x02\x03\0\x07\x04node\x01B\x0f\x02\x03\x02\ +\x01\x11\x04\0\x04node\x03\0\0\x01i\x01\x01r\x0f\x04head\x02\x05spine\x02\x04hip\ +s\x02\x0eleft-upper-arm\x02\x0eleft-lower-arm\x02\x09left-hand\x02\x0fright-uppe\ +r-arm\x02\x0fright-lower-arm\x02\x0aright-hand\x02\x0eleft-upper-leg\x02\x0eleft\ +-lower-leg\x02\x09left-foot\x02\x0fright-upper-leg\x02\x0fright-lower-leg\x02\x0a\ +right-foot\x02\x04\0\x08skeleton\x03\0\x03\x04\0\x06player\x03\x01\x01h\x05\x01@\ +\x01\x04self\x06\0\x04\x04\0\x17[method]player.skeleton\x01\x07\x01i\x05\x01p\x08\ +\x01@\0\0\x09\x04\0\x0clist-players\x01\x0a\x01@\0\0\x08\x04\0\x0clocal-player\x01\ +\x0b\x03\x01\x10wired:player/api\x05\x12\x01B\x15\x02\x03\x02\x01\x11\x04\0\x04n\ +ode\x03\0\0\x04\0\x05scene\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x12[constructor]s\ +cene\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x10[method]scene.id\x01\x06\x01\ +@\x01\x04self\x05\0s\x04\0\x12[method]scene.name\x01\x07\x01@\x02\x04self\x05\x05\ +values\x01\0\x04\0\x16[method]scene.set-name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04\ +self\x05\0\x0a\x04\0\x13[method]scene.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\ +\x05value\x0c\x01\0\x04\0\x16[method]scene.add-node\x01\x0d\x04\0\x19[method]sce\ +ne.remove-node\x01\x0d\x03\x01\x11wired:scene/scene\x05\x13\x02\x03\0\x09\x05sce\ +ne\x01B5\x02\x03\x02\x01\x09\x04\0\x08material\x03\0\0\x02\x03\x02\x01\x0b\x04\0\ +\x04mesh\x03\0\x02\x02\x03\x02\x01\x11\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x14\ +\x04\0\x05scene\x03\0\x06\x04\0\x04gltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[\ +constructor]gltf\x01\x0a\x01h\x08\x01i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\ +\0\x1b[method]gltf.list-materials\x01\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\ +\x0f\x01\0\x04\0\x19[method]gltf.add-material\x01\x10\x04\0\x1c[method]gltf.remo\ +ve-material\x01\x10\x01i\x03\x01p\x11\x01@\x01\x04self\x0b\0\x12\x04\0\x18[metho\ +d]gltf.list-meshes\x01\x13\x01h\x03\x01@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\ +\x15[method]gltf.add-mesh\x01\x15\x04\0\x18[method]gltf.remove-mesh\x01\x15\x01i\ +\x05\x01p\x16\x01@\x01\x04self\x0b\0\x17\x04\0\x17[method]gltf.list-nodes\x01\x18\ +\x01h\x05\x01@\x02\x04self\x0b\x05value\x19\x01\0\x04\0\x15[method]gltf.add-node\ +\x01\x1a\x04\0\x18[method]gltf.remove-node\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04\ +self\x0b\0\x1c\x04\0\x18[method]gltf.list-scenes\x01\x1d\x01h\x07\x01@\x02\x04se\ +lf\x0b\x05value\x1e\x01\0\x04\0\x16[method]gltf.add-scene\x01\x1f\x04\0\x19[meth\ +od]gltf.remove-scene\x01\x1f\x01k\x1b\x01@\x01\x04self\x0b\0\x20\x04\0\x19[metho\ +d]gltf.active-scene\x01!\x01k\x1e\x01@\x02\x04self\x0b\x05value\"\x01\0\x04\0\x1d\ +[method]gltf.set-active-scene\x01#\x04\0\x1a[method]gltf.default-scene\x01!\x04\0\ +\x1e[method]gltf.set-default-scene\x01\x1f\x03\x01\x10wired:scene/gltf\x05\x15\x02\ +\x03\0\x0a\x04gltf\x01Bt\x02\x03\x02\x01\x16\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\ +\x11\x04\0\x04node\x03\0\x02\x02\x03\x02\x01\x0d\x04\0\x09transform\x03\0\x04\x04\ +\0\x04glxf\x03\x01\x04\0\x0aasset-gltf\x03\x01\x04\0\x0aasset-glxf\x03\x01\x01i\x07\ +\x01i\x08\x01q\x02\x04gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01\ +h\x07\x01h\x08\x01q\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\0\x04\0\x0casset-borro\ +w\x03\0\x0f\x04\0\x09glxf-node\x03\x01\x01i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\ +\0\x05nodes\x01\x13\0\x04\0\x08children\x03\0\x14\x01h\x11\x01p\x16\x01q\x02\x05\ +asset\x01\x10\0\x05nodes\x01\x17\0\x04\0\x0fchildren-borrow\x03\0\x18\x04\0\x0ag\ +lxf-scene\x03\x01\x01i\x06\x01@\0\0\x1b\x04\0\x11[constructor]glxf\x01\x1c\x01h\x06\ +\x01p\x0c\x01@\x01\x04self\x1d\0\x1e\x04\0\x18[method]glxf.list-assets\x01\x1f\x01\ +@\x02\x04self\x1d\x05value\x10\x01\0\x04\0\x16[method]glxf.add-asset\x01\x20\x04\ +\0\x19[method]glxf.remove-asset\x01\x20\x01@\x01\x04self\x1d\0\x13\x04\0\x17[met\ +hod]glxf.list-nodes\x01!\x01@\x02\x04self\x1d\x05value\x16\x01\0\x04\0\x15[metho\ +d]glxf.add-node\x01\"\x04\0\x18[method]glxf.remove-node\x01\"\x01i\x1a\x01p#\x01\ +@\x01\x04self\x1d\0$\x04\0\x18[method]glxf.list-scenes\x01%\x01h\x1a\x01@\x02\x04\ +self\x1d\x05value&\x01\0\x04\0\x16[method]glxf.add-scene\x01'\x04\0\x19[method]g\ +lxf.remove-scene\x01'\x01k#\x01@\x01\x04self\x1d\0(\x04\0\x19[method]glxf.active\ +-scene\x01)\x01k&\x01@\x02\x04self\x1d\x05value*\x01\0\x04\0\x1d[method]glxf.set\ +-active-scene\x01+\x04\0\x1a[method]glxf.default-scene\x01)\x04\0\x1e[method]glx\ +f.set-default-scene\x01'\x01h\x01\x01@\x01\x08document,\0\x09\x04\0\x17[construc\ +tor]asset-gltf\x01-\x01i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b[method]asset-gltf\ +.document\x01/\x01i\x03\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d[method]asset-glt\ +f.list-nodes\x012\x01h\x03\x01@\x02\x04self\x0d\x05value3\x01\0\x04\0\x1b[method\ +]asset-gltf.add-node\x014\x04\0\x1e[method]asset-gltf.remove-node\x014\x01@\x01\x08\ +document\x1d\0\x0a\x04\0\x17[constructor]asset-glxf\x015\x01@\x01\x04self\x0e\0\x1b\ +\x04\0\x1b[method]asset-glxf.document\x016\x01@\x01\x04self\x0e\0\x13\x04\0\x1d[\ +method]asset-glxf.list-nodes\x017\x01@\x02\x04self\x0e\x05value\x16\x01\0\x04\0\x1b\ +[method]asset-glxf.add-node\x018\x04\0\x1e[method]asset-glxf.remove-node\x018\x01\ +@\0\0\x12\x04\0\x16[constructor]glxf-node\x019\x01@\x01\x04self\x16\0y\x04\0\x14\ +[method]glxf-node.id\x01:\x01@\x01\x04self\x16\0s\x04\0\x16[method]glxf-node.nam\ +e\x01;\x01@\x02\x04self\x16\x05values\x01\0\x04\0\x1a[method]glxf-node.set-name\x01\ +<\x01@\x01\x04self\x16\0\x05\x04\0\x1b[method]glxf-node.transform\x01=\x01@\x02\x04\ +self\x16\x05value\x05\x01\0\x04\0\x1f[method]glxf-node.set-transform\x01>\x01k\x12\ +\x01@\x01\x04self\x16\0?\x04\0\x18[method]glxf-node.parent\x01@\x01k\x15\x01@\x01\ +\x04self\x16\0\xc1\0\x04\0\x1a[method]glxf-node.children\x01B\x01k\x19\x01@\x02\x04\ +self\x16\x05value\xc3\0\x01\0\x04\0\x1e[method]glxf-node.set-children\x01D\x01@\0\ +\0#\x04\0\x17[constructor]glxf-scene\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]\ +glxf-scene.id\x01F\x01@\x01\x04self&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01\ +@\x02\x04self&\x05values\x01\0\x04\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\ +\x04self&\0\x13\x04\0\x18[method]glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\ +\x16\x01\0\x04\0\x1b[method]glxf-scene.add-node\x01J\x04\0\x1e[method]glxf-scene\ +.remove-node\x01J\x04\0\x08get-root\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x17\x01\ +B\x07\x04\0\x06script\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\ +\x02\x01h\0\x01@\x02\x04self\x03\x05deltav\x01\0\x04\0\x15[method]script.update\x01\ +\x04\x04\x01\x12wired:script/types\x05\x18\x04\x01\x18test:wired-player/script\x04\ +\0\x0b\x0c\x01\0\x06script\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwi\ +t-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/test-wired-scene/Cargo.toml b/wasm/test-wired-scene/Cargo.toml index 7245d45e1..5fc6dbba3 100644 --- a/wasm/test-wired-scene/Cargo.toml +++ b/wasm/test-wired-scene/Cargo.toml @@ -16,6 +16,7 @@ wit-bindgen-rt.workspace = true package = "test:wired-scene" [package.metadata.component.target.dependencies] +"unavi:shapes" = { path = "../unavi-shapes/wit" } "wired:input" = { path = "../../wired-protocol/spatial/wit/wired-input" } "wired:log" = { path = "../../wired-protocol/spatial/wit/wired-log" } "wired:math" = { path = "../../wired-protocol/spatial/wit/wired-math" } diff --git a/wasm/test-wired-scene/src/bindings.rs b/wasm/test-wired-scene/src/bindings.rs index 196b1f70d..971ade6ec 100644 --- a/wasm/test-wired-scene/src/bindings.rs +++ b/wasm/test-wired-scene/src/bindings.rs @@ -975,6 +975,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -5684,165 +5698,165 @@ pub(crate) use __export_script_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:script:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 7127] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xda6\x01A\x02\x01A&\x01\ -B\x06\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01z\ -v\x01wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btransla\ -tion\x01\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\0\x02\x03\0\ -\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\x02\x03\x02\x01\x01\x04\0\x04vec3\x03\0\0\ -\x02\x03\x02\x01\x02\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09\ -hand-side\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\ -\x05joint\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacar\ -pal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05\ -index\x09\x06middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05el\ -bow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03\ -ray\x03\0\x0d\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\ -\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainp\ -ut-type\x03\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0bi\ -nput-event\x03\0\x13\x03\x01\x11wired:input/types\x05\x03\x02\x03\0\x01\x0binput\ --event\x01B\x0a\x02\x03\x02\x01\x04\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-\ -handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\ -\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handl\ -e-input\x01\x07\x03\x01\x13wired:input/handler\x05\x05\x01B\x04\x01m\x04\x05debu\ -g\x04info\x04warn\x05error\x04\0\x09log-level\x03\0\0\x01@\x02\x05level\x01\x07m\ -essages\x01\0\x04\0\x03log\x01\x02\x03\x01\x0dwired:log/api\x05\x06\x01B\x1c\x02\ -\x03\x02\x01\x01\x04\0\x04vec3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06hei\ -ghtv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08\ -cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\ -\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\ -\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\ -\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\ -\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01\ -i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\ -\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\ -\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\ -\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-\ -linvel\x01\x13\x03\x01\x13wired:physics/types\x05\x07\x01B\x11\x01r\x04\x01rv\x01\ -gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08material\x03\x01\x01i\x02\x01@\0\0\ -\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\ -\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15[method]mater\ -ial.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x19[method]material.\ -set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\0\x16[method]material.color\x01\x09\ -\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\0\x1a[method]material.set-color\x01\ -\x0a\x03\x01\x14wired:scene/material\x05\x08\x02\x03\0\x05\x08material\x01B)\x02\ -\x03\x02\x01\x09\x04\0\x08material\x03\0\0\x04\0\x09primitive\x03\x01\x04\0\x04m\ -esh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\0\x14[method]primitive.id\x01\x05\ -\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]primitive.materia\ -l\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\0\x04\0\x1e[me\ -thod]primitive.set-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05value\x0c\x01\0\ -\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04self\x04\x05va\ -lue\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\x1f[method]pr\ -imitive.set-positions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\x0f\x01i\x03\ -\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04self\x12\0\ -y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[method]mesh\ -.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]mesh.set-nam\ -e\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[method]mesh.lis\ -t-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.create-pri\ -mitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d[method]mesh.rem\ -ove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x0a\x02\x03\0\x06\x04mesh\x02\ -\x03\0\x02\x0dinput-handler\x02\x03\0\0\x09transform\x02\x03\0\x04\x08collider\x02\ -\x03\0\x04\x0arigid-body\x01BB\x02\x03\x02\x01\x0b\x04\0\x04mesh\x03\0\0\x02\x03\ -\x02\x01\x0c\x04\0\x0dinput-handler\x03\0\x02\x02\x03\x02\x01\x0d\x04\0\x09trans\ -form\x03\0\x04\x02\x03\x02\x01\x0e\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0f\ -\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\ -\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]\ -node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\ -\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01\ -@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\ -\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]nod\ -e.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node\ -.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\ -\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\ -\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\ -\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]\ -node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[met\ -hod]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\ -\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\ -\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\ -\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\ -\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\ -\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:s\ -cene/node\x05\x10\x02\x03\0\x07\x04node\x01B\x0f\x02\x03\x02\x01\x11\x04\0\x04no\ -de\x03\0\0\x01i\x01\x01r\x0f\x04head\x02\x05spine\x02\x04hips\x02\x0eleft-upper-\ -arm\x02\x0eleft-lower-arm\x02\x09left-hand\x02\x0fright-upper-arm\x02\x0fright-l\ -ower-arm\x02\x0aright-hand\x02\x0eleft-upper-leg\x02\x0eleft-lower-leg\x02\x09le\ -ft-foot\x02\x0fright-upper-leg\x02\x0fright-lower-leg\x02\x0aright-foot\x02\x04\0\ -\x08skeleton\x03\0\x03\x04\0\x06player\x03\x01\x01h\x05\x01@\x01\x04self\x06\0\x04\ -\x04\0\x17[method]player.skeleton\x01\x07\x01i\x05\x01p\x08\x01@\0\0\x09\x04\0\x0c\ -list-players\x01\x0a\x01@\0\0\x08\x04\0\x0clocal-player\x01\x0b\x03\x01\x10wired\ -:player/api\x05\x12\x01B\x15\x02\x03\x02\x01\x11\x04\0\x04node\x03\0\0\x04\0\x05\ -scene\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x12[constructor]scene\x01\x04\x01h\x02\ -\x01@\x01\x04self\x05\0y\x04\0\x10[method]scene.id\x01\x06\x01@\x01\x04self\x05\0\ -s\x04\0\x12[method]scene.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\ -\x16[method]scene.set-name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04self\x05\0\x0a\x04\ -\0\x13[method]scene.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\x05value\x0c\x01\ -\0\x04\0\x16[method]scene.add-node\x01\x0d\x04\0\x19[method]scene.remove-node\x01\ -\x0d\x03\x01\x11wired:scene/scene\x05\x13\x02\x03\0\x09\x05scene\x01B5\x02\x03\x02\ -\x01\x09\x04\0\x08material\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x04mesh\x03\0\x02\x02\ -\x03\x02\x01\x11\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x14\x04\0\x05scene\x03\0\ -\x06\x04\0\x04gltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[constructor]gltf\x01\x0a\ -\x01h\x08\x01i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\0\x1b[method]gltf.lis\ -t-materials\x01\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\x0f\x01\0\x04\0\x19[m\ -ethod]gltf.add-material\x01\x10\x04\0\x1c[method]gltf.remove-material\x01\x10\x01\ -i\x03\x01p\x11\x01@\x01\x04self\x0b\0\x12\x04\0\x18[method]gltf.list-meshes\x01\x13\ -\x01h\x03\x01@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\x15[method]gltf.add-mesh\ -\x01\x15\x04\0\x18[method]gltf.remove-mesh\x01\x15\x01i\x05\x01p\x16\x01@\x01\x04\ -self\x0b\0\x17\x04\0\x17[method]gltf.list-nodes\x01\x18\x01h\x05\x01@\x02\x04sel\ -f\x0b\x05value\x19\x01\0\x04\0\x15[method]gltf.add-node\x01\x1a\x04\0\x18[method\ -]gltf.remove-node\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\x04\0\x18\ -[method]gltf.list-scenes\x01\x1d\x01h\x07\x01@\x02\x04self\x0b\x05value\x1e\x01\0\ -\x04\0\x16[method]gltf.add-scene\x01\x1f\x04\0\x19[method]gltf.remove-scene\x01\x1f\ -\x01k\x1b\x01@\x01\x04self\x0b\0\x20\x04\0\x19[method]gltf.active-scene\x01!\x01\ -k\x1e\x01@\x02\x04self\x0b\x05value\"\x01\0\x04\0\x1d[method]gltf.set-active-sce\ -ne\x01#\x04\0\x1a[method]gltf.default-scene\x01!\x04\0\x1e[method]gltf.set-defau\ -lt-scene\x01\x1f\x03\x01\x10wired:scene/gltf\x05\x15\x02\x03\0\x0a\x04gltf\x01Bt\ -\x02\x03\x02\x01\x16\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\x11\x04\0\x04node\x03\ -\0\x02\x02\x03\x02\x01\x0d\x04\0\x09transform\x03\0\x04\x04\0\x04glxf\x03\x01\x04\ -\0\x0aasset-gltf\x03\x01\x04\0\x0aasset-glxf\x03\x01\x01i\x07\x01i\x08\x01q\x02\x04\ -gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01h\x07\x01h\x08\x01q\ -\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\0\x04\0\x0casset-borrow\x03\0\x0f\x04\0\x09\ -glxf-node\x03\x01\x01i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\0\x05nodes\x01\x13\ -\0\x04\0\x08children\x03\0\x14\x01h\x11\x01p\x16\x01q\x02\x05asset\x01\x10\0\x05\ -nodes\x01\x17\0\x04\0\x0fchildren-borrow\x03\0\x18\x04\0\x0aglxf-scene\x03\x01\x01\ -i\x06\x01@\0\0\x1b\x04\0\x11[constructor]glxf\x01\x1c\x01h\x06\x01p\x0c\x01@\x01\ -\x04self\x1d\0\x1e\x04\0\x18[method]glxf.list-assets\x01\x1f\x01@\x02\x04self\x1d\ -\x05value\x10\x01\0\x04\0\x16[method]glxf.add-asset\x01\x20\x04\0\x19[method]glx\ -f.remove-asset\x01\x20\x01@\x01\x04self\x1d\0\x13\x04\0\x17[method]glxf.list-nod\ -es\x01!\x01@\x02\x04self\x1d\x05value\x16\x01\0\x04\0\x15[method]glxf.add-node\x01\ -\"\x04\0\x18[method]glxf.remove-node\x01\"\x01i\x1a\x01p#\x01@\x01\x04self\x1d\0\ -$\x04\0\x18[method]glxf.list-scenes\x01%\x01h\x1a\x01@\x02\x04self\x1d\x05value&\ -\x01\0\x04\0\x16[method]glxf.add-scene\x01'\x04\0\x19[method]glxf.remove-scene\x01\ -'\x01k#\x01@\x01\x04self\x1d\0(\x04\0\x19[method]glxf.active-scene\x01)\x01k&\x01\ -@\x02\x04self\x1d\x05value*\x01\0\x04\0\x1d[method]glxf.set-active-scene\x01+\x04\ -\0\x1a[method]glxf.default-scene\x01)\x04\0\x1e[method]glxf.set-default-scene\x01\ -'\x01h\x01\x01@\x01\x08document,\0\x09\x04\0\x17[constructor]asset-gltf\x01-\x01\ -i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b[method]asset-gltf.document\x01/\x01i\x03\ -\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d[method]asset-gltf.list-nodes\x012\x01h\x03\ -\x01@\x02\x04self\x0d\x05value3\x01\0\x04\0\x1b[method]asset-gltf.add-node\x014\x04\ -\0\x1e[method]asset-gltf.remove-node\x014\x01@\x01\x08document\x1d\0\x0a\x04\0\x17\ -[constructor]asset-glxf\x015\x01@\x01\x04self\x0e\0\x1b\x04\0\x1b[method]asset-g\ -lxf.document\x016\x01@\x01\x04self\x0e\0\x13\x04\0\x1d[method]asset-glxf.list-no\ -des\x017\x01@\x02\x04self\x0e\x05value\x16\x01\0\x04\0\x1b[method]asset-glxf.add\ --node\x018\x04\0\x1e[method]asset-glxf.remove-node\x018\x01@\0\0\x12\x04\0\x16[c\ -onstructor]glxf-node\x019\x01@\x01\x04self\x16\0y\x04\0\x14[method]glxf-node.id\x01\ -:\x01@\x01\x04self\x16\0s\x04\0\x16[method]glxf-node.name\x01;\x01@\x02\x04self\x16\ -\x05values\x01\0\x04\0\x1a[method]glxf-node.set-name\x01<\x01@\x01\x04self\x16\0\ -\x05\x04\0\x1b[method]glxf-node.transform\x01=\x01@\x02\x04self\x16\x05value\x05\ -\x01\0\x04\0\x1f[method]glxf-node.set-transform\x01>\x01k\x12\x01@\x01\x04self\x16\ -\0?\x04\0\x18[method]glxf-node.parent\x01@\x01k\x15\x01@\x01\x04self\x16\0\xc1\0\ -\x04\0\x1a[method]glxf-node.children\x01B\x01k\x19\x01@\x02\x04self\x16\x05value\ -\xc3\0\x01\0\x04\0\x1e[method]glxf-node.set-children\x01D\x01@\0\0#\x04\0\x17[co\ -nstructor]glxf-scene\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]glxf-scene.id\x01\ -F\x01@\x01\x04self&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01@\x02\x04self&\x05\ -values\x01\0\x04\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\x04self&\0\x13\x04\ -\0\x18[method]glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\x16\x01\0\x04\0\x1b\ -[method]glxf-scene.add-node\x01J\x04\0\x1e[method]glxf-scene.remove-node\x01J\x04\ -\0\x08get-root\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x17\x01B\x07\x04\0\x06scr\ -ipt\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\x02\x01h\0\x01@\ -\x02\x04self\x03\x05deltav\x01\0\x04\0\x15[method]script.update\x01\x04\x04\x01\x12\ -wired:script/types\x05\x18\x04\x01\x17test:wired-scene/script\x04\0\x0b\x0c\x01\0\ -\x06script\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070\ -.208.1\x10wit-bindgen-rust\x060.25.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 7146] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xed6\x01A\x02\x01A&\x01\ +B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\0\ +\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01r\ +\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\0\x02\x03\0\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\ +\x02\x03\x02\x01\x01\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x02\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x03\x02\x03\0\x01\x0binput-event\x01B\x0a\x02\x03\x02\x01\x04\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x05\x01B\x04\x01m\x04\x05debug\x04info\x04warn\x05error\x04\0\x09log-l\ +evel\x03\0\0\x01@\x02\x05level\x01\x07messages\x01\0\x04\0\x03log\x01\x02\x03\x01\ +\x0dwired:log/api\x05\x06\x01B\x1c\x02\x03\x02\x01\x01\x04\0\x04vec3\x03\0\0\x04\ +\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\ +\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\ +\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09\ +kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\ +\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18\ +[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[\ +method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\ +\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\ +\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\ +\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\ +\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/typ\ +es\x05\x07\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\ +\x08material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\ +\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04\ +self\x05\0s\x04\0\x15[method]material.name\x01\x07\x01@\x02\x04self\x05\x05value\ +s\x01\0\x04\0\x19[method]material.set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\ +\0\x16[method]material.color\x01\x09\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\ +\0\x1a[method]material.set-color\x01\x0a\x03\x01\x14wired:scene/material\x05\x08\ +\x02\x03\0\x05\x08material\x01B)\x02\x03\x02\x01\x09\x04\0\x08material\x03\0\0\x04\ +\0\x09primitive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\ +\0\x14[method]primitive.id\x01\x05\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\ +\0\x1a[method]primitive.material\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05\ +value\x0a\x01\0\x04\0\x1e[method]primitive.set-material\x01\x0b\x01py\x01@\x02\x04\ +self\x04\x05value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\ +\x01@\x02\x04self\x04\x05value\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\ +\x0f\x04\0\x1f[method]primitive.set-positions\x01\x0f\x04\0\x19[method]primitive\ +.set-uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\ +\x01@\x01\x04self\x12\0y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0\ +s\x04\0\x11[method]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15\ +[method]mesh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\ +\x1c[method]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[me\ +thod]mesh.create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\ +\x1d[method]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x0a\x02\ +\x03\0\x06\x04mesh\x02\x03\0\x02\x0dinput-handler\x02\x03\0\0\x09transform\x02\x03\ +\0\x04\x08collider\x02\x03\0\x04\x0arigid-body\x01BB\x02\x03\x02\x01\x0b\x04\0\x04\ +mesh\x03\0\0\x02\x03\x02\x01\x0c\x04\0\x0dinput-handler\x03\0\x02\x02\x03\x02\x01\ +\x0d\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0e\x04\0\x08collider\x03\0\x06\ +\x02\x03\x02\x01\x0f\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\ +\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0\ +y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]node\ +.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-nam\ +e\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\ +\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\ +\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\ +\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[metho\ +d]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[metho\ +d]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11\ +[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\ +\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\ +\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\ +\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\ +\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04\ +self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k\ +*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k\ +-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01\ +/\x03\x01\x10wired:scene/node\x05\x10\x02\x03\0\x07\x04node\x01B\x0f\x02\x03\x02\ +\x01\x11\x04\0\x04node\x03\0\0\x01i\x01\x01r\x0f\x04head\x02\x05spine\x02\x04hip\ +s\x02\x0eleft-upper-arm\x02\x0eleft-lower-arm\x02\x09left-hand\x02\x0fright-uppe\ +r-arm\x02\x0fright-lower-arm\x02\x0aright-hand\x02\x0eleft-upper-leg\x02\x0eleft\ +-lower-leg\x02\x09left-foot\x02\x0fright-upper-leg\x02\x0fright-lower-leg\x02\x0a\ +right-foot\x02\x04\0\x08skeleton\x03\0\x03\x04\0\x06player\x03\x01\x01h\x05\x01@\ +\x01\x04self\x06\0\x04\x04\0\x17[method]player.skeleton\x01\x07\x01i\x05\x01p\x08\ +\x01@\0\0\x09\x04\0\x0clist-players\x01\x0a\x01@\0\0\x08\x04\0\x0clocal-player\x01\ +\x0b\x03\x01\x10wired:player/api\x05\x12\x01B\x15\x02\x03\x02\x01\x11\x04\0\x04n\ +ode\x03\0\0\x04\0\x05scene\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x12[constructor]s\ +cene\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x10[method]scene.id\x01\x06\x01\ +@\x01\x04self\x05\0s\x04\0\x12[method]scene.name\x01\x07\x01@\x02\x04self\x05\x05\ +values\x01\0\x04\0\x16[method]scene.set-name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04\ +self\x05\0\x0a\x04\0\x13[method]scene.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\ +\x05value\x0c\x01\0\x04\0\x16[method]scene.add-node\x01\x0d\x04\0\x19[method]sce\ +ne.remove-node\x01\x0d\x03\x01\x11wired:scene/scene\x05\x13\x02\x03\0\x09\x05sce\ +ne\x01B5\x02\x03\x02\x01\x09\x04\0\x08material\x03\0\0\x02\x03\x02\x01\x0b\x04\0\ +\x04mesh\x03\0\x02\x02\x03\x02\x01\x11\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x14\ +\x04\0\x05scene\x03\0\x06\x04\0\x04gltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[\ +constructor]gltf\x01\x0a\x01h\x08\x01i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\ +\0\x1b[method]gltf.list-materials\x01\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\ +\x0f\x01\0\x04\0\x19[method]gltf.add-material\x01\x10\x04\0\x1c[method]gltf.remo\ +ve-material\x01\x10\x01i\x03\x01p\x11\x01@\x01\x04self\x0b\0\x12\x04\0\x18[metho\ +d]gltf.list-meshes\x01\x13\x01h\x03\x01@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\ +\x15[method]gltf.add-mesh\x01\x15\x04\0\x18[method]gltf.remove-mesh\x01\x15\x01i\ +\x05\x01p\x16\x01@\x01\x04self\x0b\0\x17\x04\0\x17[method]gltf.list-nodes\x01\x18\ +\x01h\x05\x01@\x02\x04self\x0b\x05value\x19\x01\0\x04\0\x15[method]gltf.add-node\ +\x01\x1a\x04\0\x18[method]gltf.remove-node\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04\ +self\x0b\0\x1c\x04\0\x18[method]gltf.list-scenes\x01\x1d\x01h\x07\x01@\x02\x04se\ +lf\x0b\x05value\x1e\x01\0\x04\0\x16[method]gltf.add-scene\x01\x1f\x04\0\x19[meth\ +od]gltf.remove-scene\x01\x1f\x01k\x1b\x01@\x01\x04self\x0b\0\x20\x04\0\x19[metho\ +d]gltf.active-scene\x01!\x01k\x1e\x01@\x02\x04self\x0b\x05value\"\x01\0\x04\0\x1d\ +[method]gltf.set-active-scene\x01#\x04\0\x1a[method]gltf.default-scene\x01!\x04\0\ +\x1e[method]gltf.set-default-scene\x01\x1f\x03\x01\x10wired:scene/gltf\x05\x15\x02\ +\x03\0\x0a\x04gltf\x01Bt\x02\x03\x02\x01\x16\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\ +\x11\x04\0\x04node\x03\0\x02\x02\x03\x02\x01\x0d\x04\0\x09transform\x03\0\x04\x04\ +\0\x04glxf\x03\x01\x04\0\x0aasset-gltf\x03\x01\x04\0\x0aasset-glxf\x03\x01\x01i\x07\ +\x01i\x08\x01q\x02\x04gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01\ +h\x07\x01h\x08\x01q\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\0\x04\0\x0casset-borro\ +w\x03\0\x0f\x04\0\x09glxf-node\x03\x01\x01i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\ +\0\x05nodes\x01\x13\0\x04\0\x08children\x03\0\x14\x01h\x11\x01p\x16\x01q\x02\x05\ +asset\x01\x10\0\x05nodes\x01\x17\0\x04\0\x0fchildren-borrow\x03\0\x18\x04\0\x0ag\ +lxf-scene\x03\x01\x01i\x06\x01@\0\0\x1b\x04\0\x11[constructor]glxf\x01\x1c\x01h\x06\ +\x01p\x0c\x01@\x01\x04self\x1d\0\x1e\x04\0\x18[method]glxf.list-assets\x01\x1f\x01\ +@\x02\x04self\x1d\x05value\x10\x01\0\x04\0\x16[method]glxf.add-asset\x01\x20\x04\ +\0\x19[method]glxf.remove-asset\x01\x20\x01@\x01\x04self\x1d\0\x13\x04\0\x17[met\ +hod]glxf.list-nodes\x01!\x01@\x02\x04self\x1d\x05value\x16\x01\0\x04\0\x15[metho\ +d]glxf.add-node\x01\"\x04\0\x18[method]glxf.remove-node\x01\"\x01i\x1a\x01p#\x01\ +@\x01\x04self\x1d\0$\x04\0\x18[method]glxf.list-scenes\x01%\x01h\x1a\x01@\x02\x04\ +self\x1d\x05value&\x01\0\x04\0\x16[method]glxf.add-scene\x01'\x04\0\x19[method]g\ +lxf.remove-scene\x01'\x01k#\x01@\x01\x04self\x1d\0(\x04\0\x19[method]glxf.active\ +-scene\x01)\x01k&\x01@\x02\x04self\x1d\x05value*\x01\0\x04\0\x1d[method]glxf.set\ +-active-scene\x01+\x04\0\x1a[method]glxf.default-scene\x01)\x04\0\x1e[method]glx\ +f.set-default-scene\x01'\x01h\x01\x01@\x01\x08document,\0\x09\x04\0\x17[construc\ +tor]asset-gltf\x01-\x01i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b[method]asset-gltf\ +.document\x01/\x01i\x03\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d[method]asset-glt\ +f.list-nodes\x012\x01h\x03\x01@\x02\x04self\x0d\x05value3\x01\0\x04\0\x1b[method\ +]asset-gltf.add-node\x014\x04\0\x1e[method]asset-gltf.remove-node\x014\x01@\x01\x08\ +document\x1d\0\x0a\x04\0\x17[constructor]asset-glxf\x015\x01@\x01\x04self\x0e\0\x1b\ +\x04\0\x1b[method]asset-glxf.document\x016\x01@\x01\x04self\x0e\0\x13\x04\0\x1d[\ +method]asset-glxf.list-nodes\x017\x01@\x02\x04self\x0e\x05value\x16\x01\0\x04\0\x1b\ +[method]asset-glxf.add-node\x018\x04\0\x1e[method]asset-glxf.remove-node\x018\x01\ +@\0\0\x12\x04\0\x16[constructor]glxf-node\x019\x01@\x01\x04self\x16\0y\x04\0\x14\ +[method]glxf-node.id\x01:\x01@\x01\x04self\x16\0s\x04\0\x16[method]glxf-node.nam\ +e\x01;\x01@\x02\x04self\x16\x05values\x01\0\x04\0\x1a[method]glxf-node.set-name\x01\ +<\x01@\x01\x04self\x16\0\x05\x04\0\x1b[method]glxf-node.transform\x01=\x01@\x02\x04\ +self\x16\x05value\x05\x01\0\x04\0\x1f[method]glxf-node.set-transform\x01>\x01k\x12\ +\x01@\x01\x04self\x16\0?\x04\0\x18[method]glxf-node.parent\x01@\x01k\x15\x01@\x01\ +\x04self\x16\0\xc1\0\x04\0\x1a[method]glxf-node.children\x01B\x01k\x19\x01@\x02\x04\ +self\x16\x05value\xc3\0\x01\0\x04\0\x1e[method]glxf-node.set-children\x01D\x01@\0\ +\0#\x04\0\x17[constructor]glxf-scene\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]\ +glxf-scene.id\x01F\x01@\x01\x04self&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01\ +@\x02\x04self&\x05values\x01\0\x04\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\ +\x04self&\0\x13\x04\0\x18[method]glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\ +\x16\x01\0\x04\0\x1b[method]glxf-scene.add-node\x01J\x04\0\x1e[method]glxf-scene\ +.remove-node\x01J\x04\0\x08get-root\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x17\x01\ +B\x07\x04\0\x06script\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\ +\x02\x01h\0\x01@\x02\x04self\x03\x05deltav\x01\0\x04\0\x15[method]script.update\x01\ +\x04\x04\x01\x12wired:script/types\x05\x18\x04\x01\x17test:wired-scene/script\x04\ +\0\x0b\x0c\x01\0\x06script\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwi\ +t-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/unavi-scene/Cargo.toml b/wasm/unavi-scene/Cargo.toml index 12a6e0f38..9753d5f83 100644 --- a/wasm/unavi-scene/Cargo.toml +++ b/wasm/unavi-scene/Cargo.toml @@ -19,7 +19,9 @@ package = "unavi:scene" world = "guest" [package.metadata.component.target.dependencies] +"unavi:shapes" = { path = "../unavi-shapes/wit" } "wired:input" = { path = "../../wired-protocol/spatial/wit/wired-input" } +"wired:log" = { path = "../../wired-protocol/spatial/wit/wired-log" } "wired:math" = { path = "../../wired-protocol/spatial/wit/wired-math" } "wired:physics" = { path = "../../wired-protocol/spatial/wit/wired-physics" } "wired:scene" = { path = "../../wired-protocol/spatial/wit/wired-scene" } diff --git a/wasm/unavi-scene/src/bindings.rs b/wasm/unavi-scene/src/bindings.rs index 31d3882aa..ab59072af 100644 --- a/wasm/unavi-scene/src/bindings.rs +++ b/wasm/unavi-scene/src/bindings.rs @@ -906,6 +906,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -5884,165 +5898,165 @@ pub(crate) use __export_guest_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:guest:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 7109] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xc96\x01A\x02\x01A\"\ -\x01B\x06\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01\ -zv\x01wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btransl\ -ation\x01\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\0\x01B\x11\ -\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08material\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\x01@\x01\x04\ -self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15\ -[method]material.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x19[met\ -hod]material.set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\0\x16[method]materi\ -al.color\x01\x09\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\0\x1a[method]materi\ -al.set-color\x01\x0a\x03\x01\x14wired:scene/material\x05\x01\x02\x03\0\x01\x08ma\ -terial\x01B)\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x04\0\x09primitive\x03\ -\x01\x04\0\x04mesh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\0\x14[method]pri\ -mitive.id\x01\x05\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]\ -primitive.material\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\ -\0\x04\0\x1e[method]primitive.set-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05\ -value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04\ -self\x04\x05value\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\ -\x1f[method]primitive.set-positions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\ -\x0f\x01i\x03\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04\ -self\x12\0y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[m\ -ethod]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]me\ -sh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[metho\ -d]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.\ -create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d[metho\ -d]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04\ -vec3\x02\x03\0\0\x04quat\x01B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\ -\x02\x01\x05\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-sid\ -e\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05join\ -t\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\ -\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06\ -middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\ -\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\ -\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01\ -q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\ -\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\ -\0\x13\x03\x01\x11wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\ -\x02\x03\x02\x01\x07\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\ -\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\ -\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handle-input\x01\x07\ -\x03\x01\x13wired:input/handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04ve\ -c3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0esha\ -pe-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphe\ -re\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynam\ -ic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05\ -shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\ -\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\ -\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-\ -body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04\ -self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05\ -value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]\ -rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\ -\x13wired:physics/types\x05\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-han\ -dler\x02\x03\0\0\x09transform\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-b\ -ody\x01BB\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0d\ -input-handler\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\ -\x02\x01\x0d\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\ -\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]nod\ -e\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\ -\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05v\ -alues\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\ -\x02\x03\0\x06\x04node\x01B\x15\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\x05\ -scene\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x12[constructor]scene\x01\x04\x01h\x02\ -\x01@\x01\x04self\x05\0y\x04\0\x10[method]scene.id\x01\x06\x01@\x01\x04self\x05\0\ -s\x04\0\x12[method]scene.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\0\ -\x16[method]scene.set-name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04self\x05\0\x0a\x04\ -\0\x13[method]scene.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\x05value\x0c\x01\ -\0\x04\0\x16[method]scene.add-node\x01\x0d\x04\0\x19[method]scene.remove-node\x01\ -\x0d\x03\x01\x11wired:scene/scene\x05\x11\x02\x03\0\x07\x05scene\x01B5\x02\x03\x02\ -\x01\x02\x04\0\x08material\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\ -\x03\x02\x01\x10\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x12\x04\0\x05scene\x03\0\ -\x06\x04\0\x04gltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[constructor]gltf\x01\x0a\ -\x01h\x08\x01i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\0\x1b[method]gltf.lis\ -t-materials\x01\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\x0f\x01\0\x04\0\x19[m\ -ethod]gltf.add-material\x01\x10\x04\0\x1c[method]gltf.remove-material\x01\x10\x01\ -i\x03\x01p\x11\x01@\x01\x04self\x0b\0\x12\x04\0\x18[method]gltf.list-meshes\x01\x13\ -\x01h\x03\x01@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\x15[method]gltf.add-mesh\ -\x01\x15\x04\0\x18[method]gltf.remove-mesh\x01\x15\x01i\x05\x01p\x16\x01@\x01\x04\ -self\x0b\0\x17\x04\0\x17[method]gltf.list-nodes\x01\x18\x01h\x05\x01@\x02\x04sel\ -f\x0b\x05value\x19\x01\0\x04\0\x15[method]gltf.add-node\x01\x1a\x04\0\x18[method\ -]gltf.remove-node\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\x04\0\x18\ -[method]gltf.list-scenes\x01\x1d\x01h\x07\x01@\x02\x04self\x0b\x05value\x1e\x01\0\ -\x04\0\x16[method]gltf.add-scene\x01\x1f\x04\0\x19[method]gltf.remove-scene\x01\x1f\ -\x01k\x1b\x01@\x01\x04self\x0b\0\x20\x04\0\x19[method]gltf.active-scene\x01!\x01\ -k\x1e\x01@\x02\x04self\x0b\x05value\"\x01\0\x04\0\x1d[method]gltf.set-active-sce\ -ne\x01#\x04\0\x1a[method]gltf.default-scene\x01!\x04\0\x1e[method]gltf.set-defau\ -lt-scene\x01\x1f\x03\x01\x10wired:scene/gltf\x05\x13\x02\x03\0\x08\x04gltf\x01Bt\ -\x02\x03\x02\x01\x14\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\ -\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x04\0\x04glxf\x03\x01\x04\ -\0\x0aasset-gltf\x03\x01\x04\0\x0aasset-glxf\x03\x01\x01i\x07\x01i\x08\x01q\x02\x04\ -gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01h\x07\x01h\x08\x01q\ -\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\0\x04\0\x0casset-borrow\x03\0\x0f\x04\0\x09\ -glxf-node\x03\x01\x01i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\0\x05nodes\x01\x13\ -\0\x04\0\x08children\x03\0\x14\x01h\x11\x01p\x16\x01q\x02\x05asset\x01\x10\0\x05\ -nodes\x01\x17\0\x04\0\x0fchildren-borrow\x03\0\x18\x04\0\x0aglxf-scene\x03\x01\x01\ -i\x06\x01@\0\0\x1b\x04\0\x11[constructor]glxf\x01\x1c\x01h\x06\x01p\x0c\x01@\x01\ -\x04self\x1d\0\x1e\x04\0\x18[method]glxf.list-assets\x01\x1f\x01@\x02\x04self\x1d\ -\x05value\x10\x01\0\x04\0\x16[method]glxf.add-asset\x01\x20\x04\0\x19[method]glx\ -f.remove-asset\x01\x20\x01@\x01\x04self\x1d\0\x13\x04\0\x17[method]glxf.list-nod\ -es\x01!\x01@\x02\x04self\x1d\x05value\x16\x01\0\x04\0\x15[method]glxf.add-node\x01\ -\"\x04\0\x18[method]glxf.remove-node\x01\"\x01i\x1a\x01p#\x01@\x01\x04self\x1d\0\ -$\x04\0\x18[method]glxf.list-scenes\x01%\x01h\x1a\x01@\x02\x04self\x1d\x05value&\ -\x01\0\x04\0\x16[method]glxf.add-scene\x01'\x04\0\x19[method]glxf.remove-scene\x01\ -'\x01k#\x01@\x01\x04self\x1d\0(\x04\0\x19[method]glxf.active-scene\x01)\x01k&\x01\ -@\x02\x04self\x1d\x05value*\x01\0\x04\0\x1d[method]glxf.set-active-scene\x01+\x04\ -\0\x1a[method]glxf.default-scene\x01)\x04\0\x1e[method]glxf.set-default-scene\x01\ -'\x01h\x01\x01@\x01\x08document,\0\x09\x04\0\x17[constructor]asset-gltf\x01-\x01\ -i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b[method]asset-gltf.document\x01/\x01i\x03\ -\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d[method]asset-gltf.list-nodes\x012\x01h\x03\ -\x01@\x02\x04self\x0d\x05value3\x01\0\x04\0\x1b[method]asset-gltf.add-node\x014\x04\ -\0\x1e[method]asset-gltf.remove-node\x014\x01@\x01\x08document\x1d\0\x0a\x04\0\x17\ -[constructor]asset-glxf\x015\x01@\x01\x04self\x0e\0\x1b\x04\0\x1b[method]asset-g\ -lxf.document\x016\x01@\x01\x04self\x0e\0\x13\x04\0\x1d[method]asset-glxf.list-no\ -des\x017\x01@\x02\x04self\x0e\x05value\x16\x01\0\x04\0\x1b[method]asset-glxf.add\ --node\x018\x04\0\x1e[method]asset-glxf.remove-node\x018\x01@\0\0\x12\x04\0\x16[c\ -onstructor]glxf-node\x019\x01@\x01\x04self\x16\0y\x04\0\x14[method]glxf-node.id\x01\ -:\x01@\x01\x04self\x16\0s\x04\0\x16[method]glxf-node.name\x01;\x01@\x02\x04self\x16\ -\x05values\x01\0\x04\0\x1a[method]glxf-node.set-name\x01<\x01@\x01\x04self\x16\0\ -\x05\x04\0\x1b[method]glxf-node.transform\x01=\x01@\x02\x04self\x16\x05value\x05\ -\x01\0\x04\0\x1f[method]glxf-node.set-transform\x01>\x01k\x12\x01@\x01\x04self\x16\ -\0?\x04\0\x18[method]glxf-node.parent\x01@\x01k\x15\x01@\x01\x04self\x16\0\xc1\0\ -\x04\0\x1a[method]glxf-node.children\x01B\x01k\x19\x01@\x02\x04self\x16\x05value\ -\xc3\0\x01\0\x04\0\x1e[method]glxf-node.set-children\x01D\x01@\0\0#\x04\0\x17[co\ -nstructor]glxf-scene\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]glxf-scene.id\x01\ -F\x01@\x01\x04self&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01@\x02\x04self&\x05\ -values\x01\0\x04\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\x04self&\0\x13\x04\ -\0\x18[method]glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\x16\x01\0\x04\0\x1b\ -[method]glxf-scene.add-node\x01J\x04\0\x1e[method]glxf-scene.remove-node\x01J\x04\ -\0\x08get-root\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x15\x01B\"\x02\x03\x02\x01\ -\x0c\x04\0\x09transform\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\ -\x04root\x03\x01\x04\0\x05scene\x03\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18\ -[static]root.list-scenes\x01\x08\x01h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[\ -static]root.add-scene\x01\x0a\x04\0\x19[static]root.remove-scene\x01\x0a\x01@\0\0\ -\x06\x04\0\x12[constructor]scene\x01\x0b\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\ -\x0d\x04\0\x18[method]scene.list-nodes\x01\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19\ -[method]scene.create-node\x01\x0f\x01h\x03\x01@\x02\x04self\x09\x05value\x10\x01\ -\0\x04\0\x16[method]scene.add-node\x01\x11\x04\0\x19[method]scene.remove-node\x01\ -\x11\x01@\x01\x04self\x09\0\x01\x04\0\x17[method]scene.transform\x01\x12\x01@\x02\ -\x04self\x09\x05value\x01\x01\0\x04\0\x1b[method]scene.set-transform\x01\x13\x01\ -@\x01\x04self\x09\0\x7f\x04\0\x14[method]scene.active\x01\x14\x01@\x02\x04self\x09\ -\x05value\x7f\x01\0\x04\0\x18[method]scene.set-active\x01\x15\x04\x01\x0funavi:s\ -cene/api\x05\x16\x04\x01\x11unavi:scene/guest\x04\0\x0b\x0b\x01\0\x05guest\x03\0\ -\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10wit-bi\ -ndgen-rust\x060.25.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 7128] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xdc6\x01A\x02\x01A\"\ +\x01B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\ +\0\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01\ +r\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\0\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\ +\0\x05color\x03\0\0\x04\0\x08material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[co\ +nstructor]material\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]mat\ +erial.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15[method]material.name\x01\x07\x01\ +@\x02\x04self\x05\x05values\x01\0\x04\0\x19[method]material.set-name\x01\x08\x01\ +@\x01\x04self\x05\0\x01\x04\0\x16[method]material.color\x01\x09\x01@\x02\x04self\ +\x05\x05value\x01\x01\0\x04\0\x1a[method]material.set-color\x01\x0a\x03\x01\x14w\ +ired:scene/material\x05\x01\x02\x03\0\x01\x08material\x01B)\x02\x03\x02\x01\x02\x04\ +\0\x08material\x03\0\0\x04\0\x09primitive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\ +\x01@\x01\x04self\x04\0y\x04\0\x14[method]primitive.id\x01\x05\x01i\x01\x01k\x06\ +\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]primitive.material\x01\x08\x01h\x01\ +\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\0\x04\0\x1e[method]primitive.set\ +-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05value\x0c\x01\0\x04\0\x1d[method\ +]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04self\x04\x05value\x0e\x01\0\x04\ +\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\x1f[method]primitive.set-posit\ +ions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\ +\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04self\x12\0y\x04\0\x0f[metho\ +d]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[method]mesh.name\x01\x14\x01\ +@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]mesh.set-name\x01\x15\x01i\x02\ +\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[method]mesh.list-primitives\x01\x18\ +\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.create-primitive\x01\x19\x01@\x02\ +\x04self\x12\x05value\x16\x01\0\x04\0\x1d[method]mesh.remove-primitive\x01\x1a\x03\ +\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\ +\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\x02\x03\x02\x01\x07\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x04\0\x08collid\ +er\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\ +\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-handler\x02\x03\0\0\x09transfo\ +rm\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-body\x01BB\x02\x03\x02\x01\x0a\ +\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0dinput-handler\x03\0\x02\x02\x03\ +\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0d\x04\0\x08collider\x03\ +\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01\ +i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\ +\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]no\ +de.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-n\ +ame\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\ +\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\ +\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\ +\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[metho\ +d]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[metho\ +d]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11\ +[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\ +\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\ +\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\ +\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\ +\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04\ +self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k\ +*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k\ +-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01\ +/\x03\x01\x10wired:scene/node\x05\x0f\x02\x03\0\x06\x04node\x01B\x15\x02\x03\x02\ +\x01\x10\x04\0\x04node\x03\0\0\x04\0\x05scene\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\ +\x12[constructor]scene\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x10[method\ +]scene.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x12[method]scene.name\x01\x07\x01\ +@\x02\x04self\x05\x05values\x01\0\x04\0\x16[method]scene.set-name\x01\x08\x01i\x01\ +\x01p\x09\x01@\x01\x04self\x05\0\x0a\x04\0\x13[method]scene.nodes\x01\x0b\x01h\x01\ +\x01@\x02\x04self\x05\x05value\x0c\x01\0\x04\0\x16[method]scene.add-node\x01\x0d\ +\x04\0\x19[method]scene.remove-node\x01\x0d\x03\x01\x11wired:scene/scene\x05\x11\ +\x02\x03\0\x07\x05scene\x01B5\x02\x03\x02\x01\x02\x04\0\x08material\x03\0\0\x02\x03\ +\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x04\ +\x02\x03\x02\x01\x12\x04\0\x05scene\x03\0\x06\x04\0\x04gltf\x03\x01\x01i\x08\x01\ +@\0\0\x09\x04\0\x11[constructor]gltf\x01\x0a\x01h\x08\x01i\x01\x01p\x0c\x01@\x01\ +\x04self\x0b\0\x0d\x04\0\x1b[method]gltf.list-materials\x01\x0e\x01h\x01\x01@\x02\ +\x04self\x0b\x05value\x0f\x01\0\x04\0\x19[method]gltf.add-material\x01\x10\x04\0\ +\x1c[method]gltf.remove-material\x01\x10\x01i\x03\x01p\x11\x01@\x01\x04self\x0b\0\ +\x12\x04\0\x18[method]gltf.list-meshes\x01\x13\x01h\x03\x01@\x02\x04self\x0b\x05\ +value\x14\x01\0\x04\0\x15[method]gltf.add-mesh\x01\x15\x04\0\x18[method]gltf.rem\ +ove-mesh\x01\x15\x01i\x05\x01p\x16\x01@\x01\x04self\x0b\0\x17\x04\0\x17[method]g\ +ltf.list-nodes\x01\x18\x01h\x05\x01@\x02\x04self\x0b\x05value\x19\x01\0\x04\0\x15\ +[method]gltf.add-node\x01\x1a\x04\0\x18[method]gltf.remove-node\x01\x1a\x01i\x07\ +\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\x04\0\x18[method]gltf.list-scenes\x01\x1d\x01\ +h\x07\x01@\x02\x04self\x0b\x05value\x1e\x01\0\x04\0\x16[method]gltf.add-scene\x01\ +\x1f\x04\0\x19[method]gltf.remove-scene\x01\x1f\x01k\x1b\x01@\x01\x04self\x0b\0\x20\ +\x04\0\x19[method]gltf.active-scene\x01!\x01k\x1e\x01@\x02\x04self\x0b\x05value\"\ +\x01\0\x04\0\x1d[method]gltf.set-active-scene\x01#\x04\0\x1a[method]gltf.default\ +-scene\x01!\x04\0\x1e[method]gltf.set-default-scene\x01\x1f\x03\x01\x10wired:sce\ +ne/gltf\x05\x13\x02\x03\0\x08\x04gltf\x01Bt\x02\x03\x02\x01\x14\x04\0\x04gltf\x03\ +\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09tr\ +ansform\x03\0\x04\x04\0\x04glxf\x03\x01\x04\0\x0aasset-gltf\x03\x01\x04\0\x0aass\ +et-glxf\x03\x01\x01i\x07\x01i\x08\x01q\x02\x04gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\ +\0\x05asset\x03\0\x0b\x01h\x07\x01h\x08\x01q\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\ +\0\x04\0\x0casset-borrow\x03\0\x0f\x04\0\x09glxf-node\x03\x01\x01i\x11\x01p\x12\x01\ +q\x02\x05asset\x01\x0c\0\x05nodes\x01\x13\0\x04\0\x08children\x03\0\x14\x01h\x11\ +\x01p\x16\x01q\x02\x05asset\x01\x10\0\x05nodes\x01\x17\0\x04\0\x0fchildren-borro\ +w\x03\0\x18\x04\0\x0aglxf-scene\x03\x01\x01i\x06\x01@\0\0\x1b\x04\0\x11[construc\ +tor]glxf\x01\x1c\x01h\x06\x01p\x0c\x01@\x01\x04self\x1d\0\x1e\x04\0\x18[method]g\ +lxf.list-assets\x01\x1f\x01@\x02\x04self\x1d\x05value\x10\x01\0\x04\0\x16[method\ +]glxf.add-asset\x01\x20\x04\0\x19[method]glxf.remove-asset\x01\x20\x01@\x01\x04s\ +elf\x1d\0\x13\x04\0\x17[method]glxf.list-nodes\x01!\x01@\x02\x04self\x1d\x05valu\ +e\x16\x01\0\x04\0\x15[method]glxf.add-node\x01\"\x04\0\x18[method]glxf.remove-no\ +de\x01\"\x01i\x1a\x01p#\x01@\x01\x04self\x1d\0$\x04\0\x18[method]glxf.list-scene\ +s\x01%\x01h\x1a\x01@\x02\x04self\x1d\x05value&\x01\0\x04\0\x16[method]glxf.add-s\ +cene\x01'\x04\0\x19[method]glxf.remove-scene\x01'\x01k#\x01@\x01\x04self\x1d\0(\x04\ +\0\x19[method]glxf.active-scene\x01)\x01k&\x01@\x02\x04self\x1d\x05value*\x01\0\x04\ +\0\x1d[method]glxf.set-active-scene\x01+\x04\0\x1a[method]glxf.default-scene\x01\ +)\x04\0\x1e[method]glxf.set-default-scene\x01'\x01h\x01\x01@\x01\x08document,\0\x09\ +\x04\0\x17[constructor]asset-gltf\x01-\x01i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b\ +[method]asset-gltf.document\x01/\x01i\x03\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d\ +[method]asset-gltf.list-nodes\x012\x01h\x03\x01@\x02\x04self\x0d\x05value3\x01\0\ +\x04\0\x1b[method]asset-gltf.add-node\x014\x04\0\x1e[method]asset-gltf.remove-no\ +de\x014\x01@\x01\x08document\x1d\0\x0a\x04\0\x17[constructor]asset-glxf\x015\x01\ +@\x01\x04self\x0e\0\x1b\x04\0\x1b[method]asset-glxf.document\x016\x01@\x01\x04se\ +lf\x0e\0\x13\x04\0\x1d[method]asset-glxf.list-nodes\x017\x01@\x02\x04self\x0e\x05\ +value\x16\x01\0\x04\0\x1b[method]asset-glxf.add-node\x018\x04\0\x1e[method]asset\ +-glxf.remove-node\x018\x01@\0\0\x12\x04\0\x16[constructor]glxf-node\x019\x01@\x01\ +\x04self\x16\0y\x04\0\x14[method]glxf-node.id\x01:\x01@\x01\x04self\x16\0s\x04\0\ +\x16[method]glxf-node.name\x01;\x01@\x02\x04self\x16\x05values\x01\0\x04\0\x1a[m\ +ethod]glxf-node.set-name\x01<\x01@\x01\x04self\x16\0\x05\x04\0\x1b[method]glxf-n\ +ode.transform\x01=\x01@\x02\x04self\x16\x05value\x05\x01\0\x04\0\x1f[method]glxf\ +-node.set-transform\x01>\x01k\x12\x01@\x01\x04self\x16\0?\x04\0\x18[method]glxf-\ +node.parent\x01@\x01k\x15\x01@\x01\x04self\x16\0\xc1\0\x04\0\x1a[method]glxf-nod\ +e.children\x01B\x01k\x19\x01@\x02\x04self\x16\x05value\xc3\0\x01\0\x04\0\x1e[met\ +hod]glxf-node.set-children\x01D\x01@\0\0#\x04\0\x17[constructor]glxf-scene\x01E\x01\ +@\x01\x04self&\0y\x04\0\x15[method]glxf-scene.id\x01F\x01@\x01\x04self&\0s\x04\0\ +\x17[method]glxf-scene.name\x01G\x01@\x02\x04self&\x05values\x01\0\x04\0\x1b[met\ +hod]glxf-scene.set-name\x01H\x01@\x01\x04self&\0\x13\x04\0\x18[method]glxf-scene\ +.nodes\x01I\x01@\x02\x04self&\x04node\x16\x01\0\x04\0\x1b[method]glxf-scene.add-\ +node\x01J\x04\0\x1e[method]glxf-scene.remove-node\x01J\x04\0\x08get-root\x01\x1c\ +\x03\x01\x10wired:scene/glxf\x05\x15\x01B\"\x02\x03\x02\x01\x0c\x04\0\x09transfo\ +rm\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x04\0\x04root\x03\x01\x04\ +\0\x05scene\x03\x01\x01i\x05\x01p\x06\x01@\0\0\x07\x04\0\x18[static]root.list-sc\ +enes\x01\x08\x01h\x05\x01@\x01\x05value\x09\x01\0\x04\0\x16[static]root.add-scen\ +e\x01\x0a\x04\0\x19[static]root.remove-scene\x01\x0a\x01@\0\0\x06\x04\0\x12[cons\ +tructor]scene\x01\x0b\x01i\x03\x01p\x0c\x01@\x01\x04self\x09\0\x0d\x04\0\x18[met\ +hod]scene.list-nodes\x01\x0e\x01@\x01\x04self\x09\0\x0c\x04\0\x19[method]scene.c\ +reate-node\x01\x0f\x01h\x03\x01@\x02\x04self\x09\x05value\x10\x01\0\x04\0\x16[me\ +thod]scene.add-node\x01\x11\x04\0\x19[method]scene.remove-node\x01\x11\x01@\x01\x04\ +self\x09\0\x01\x04\0\x17[method]scene.transform\x01\x12\x01@\x02\x04self\x09\x05\ +value\x01\x01\0\x04\0\x1b[method]scene.set-transform\x01\x13\x01@\x01\x04self\x09\ +\0\x7f\x04\0\x14[method]scene.active\x01\x14\x01@\x02\x04self\x09\x05value\x7f\x01\ +\0\x04\0\x18[method]scene.set-active\x01\x15\x04\x01\x0funavi:scene/api\x05\x16\x04\ +\x01\x11unavi:scene/guest\x04\0\x0b\x0b\x01\0\x05guest\x03\0\0\0G\x09producers\x01\ +\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/unavi-scene/wit/world.wit b/wasm/unavi-scene/wit/world.wit index ca2e76ef0..15ef0b647 100644 --- a/wasm/unavi-scene/wit/world.wit +++ b/wasm/unavi-scene/wit/world.wit @@ -6,10 +6,6 @@ world guest { export api; } -world prelude { - import api; -} - interface api { use wired:math/types.{transform}; use wired:scene/node.{node}; diff --git a/wasm/unavi-shapes/Cargo.toml b/wasm/unavi-shapes/Cargo.toml index 2e3531e15..bf1088ea1 100644 --- a/wasm/unavi-shapes/Cargo.toml +++ b/wasm/unavi-shapes/Cargo.toml @@ -10,6 +10,7 @@ license.workspace = true crate-type = ["cdylib"] [dependencies] +glam.workspace = true hexasphere = "14.1.0" parry3d = "0.17.0" wit-bindgen-rt.workspace = true diff --git a/wasm/unavi-shapes/src/bindings.rs b/wasm/unavi-shapes/src/bindings.rs index 5d2b688ef..ea56485f0 100644 --- a/wasm/unavi-shapes/src/bindings.rs +++ b/wasm/unavi-shapes/src/bindings.rs @@ -975,6 +975,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -2731,9 +2745,153 @@ pub mod exports { static __FORCE_SECTION_REF: fn() = super::super::super::super::__link_custom_section_describing_imports; use super::super::super::super::_rt; + pub type Vec2 = super::super::super::super::wired::math::types::Vec2; pub type Vec3 = super::super::super::super::wired::math::types::Vec3; pub type Mesh = super::super::super::super::wired::scene::mesh::Mesh; pub type Node = super::super::super::super::wired::scene::node::Node; + /// 2D + + #[derive(Debug)] + #[repr(transparent)] + pub struct Rectangle { + handle: _rt::Resource, + } + + type _RectangleRep = Option; + + impl Rectangle { + /// Creates a new resource from the specified representation. + /// + /// This function will create a new resource handle by moving `val` onto + /// the heap and then passing that heap pointer to the component model to + /// create a handle. The owned handle is then returned as `Rectangle`. + pub fn new(val: T) -> Self { + Self::type_guard::(); + let val: _RectangleRep = Some(val); + let ptr: *mut _RectangleRep = _rt::Box::into_raw(_rt::Box::new(val)); + unsafe { Self::from_handle(T::_resource_new(ptr.cast())) } + } + + /// Gets access to the underlying `T` which represents this resource. + pub fn get(&self) -> &T { + let ptr = unsafe { &*self.as_ptr::() }; + ptr.as_ref().unwrap() + } + + /// Gets mutable access to the underlying `T` which represents this + /// resource. + pub fn get_mut(&mut self) -> &mut T { + let ptr = unsafe { &mut *self.as_ptr::() }; + ptr.as_mut().unwrap() + } + + /// Consumes this resource and returns the underlying `T`. + pub fn into_inner(self) -> T { + let ptr = unsafe { &mut *self.as_ptr::() }; + ptr.take().unwrap() + } + + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + + // It's theoretically possible to implement the `GuestRectangle` trait twice + // so guard against using it with two different types here. + #[doc(hidden)] + fn type_guard() { + use core::any::TypeId; + static mut LAST_TYPE: Option = None; + unsafe { + assert!(!cfg!(target_feature = "threads")); + let id = TypeId::of::(); + match LAST_TYPE { + Some(ty) => assert!( + ty == id, + "cannot use two types with this resource type" + ), + None => LAST_TYPE = Some(id), + } + } + } + + #[doc(hidden)] + pub unsafe fn dtor(handle: *mut u8) { + Self::type_guard::(); + let _ = _rt::Box::from_raw(handle as *mut _RectangleRep); + } + + fn as_ptr(&self) -> *mut _RectangleRep { + Rectangle::type_guard::(); + T::_resource_rep(self.handle()).cast() + } + } + + /// A borrowed version of [`Rectangle`] which represents a borrowed value + /// with the lifetime `'a`. + #[derive(Debug)] + #[repr(transparent)] + pub struct RectangleBorrow<'a> { + rep: *mut u8, + _marker: core::marker::PhantomData<&'a Rectangle>, + } + + impl<'a> RectangleBorrow<'a> { + #[doc(hidden)] + pub unsafe fn lift(rep: usize) -> Self { + Self { + rep: rep as *mut u8, + _marker: core::marker::PhantomData, + } + } + + /// Gets access to the underlying `T` in this resource. + pub fn get(&self) -> &T { + let ptr = unsafe { &mut *self.as_ptr::() }; + ptr.as_ref().unwrap() + } + + // NB: mutable access is not allowed due to the component model allowing + // multiple borrows of the same resource. + + fn as_ptr(&self) -> *mut _RectangleRep { + Rectangle::type_guard::(); + self.rep.cast() + } + } + + unsafe impl _rt::WasmResource for Rectangle { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "[export]unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-drop]rectangle"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + /// 3D #[derive(Debug)] #[repr(transparent)] @@ -3199,6 +3357,79 @@ pub mod exports { } } + #[doc(hidden)] + #[allow(non_snake_case)] + pub unsafe fn _export_constructor_rectangle_cabi( + arg0: f32, + arg1: f32, + ) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = Rectangle::new(T::new( + super::super::super::super::wired::math::types::Vec2 { x: arg0, y: arg1 }, + )); + (result0).take_handle() as i32 + } + #[doc(hidden)] + #[allow(non_snake_case)] + pub unsafe fn _export_method_rectangle_size_cabi( + arg0: *mut u8, + ) -> *mut u8 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::size(RectangleBorrow::lift(arg0 as u32 as usize).get()); + let ptr1 = _RET_AREA.0.as_mut_ptr().cast::(); + let super::super::super::super::wired::math::types::Vec2 { x: x2, y: y2 } = + result0; + *ptr1.add(0).cast::() = _rt::as_f32(x2); + *ptr1.add(4).cast::() = _rt::as_f32(y2); + ptr1 + } + #[doc(hidden)] + #[allow(non_snake_case)] + pub unsafe fn _export_method_rectangle_set_size_cabi( + arg0: *mut u8, + arg1: f32, + arg2: f32, + ) { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + T::set_size( + RectangleBorrow::lift(arg0 as u32 as usize).get(), + super::super::super::super::wired::math::types::Vec2 { x: arg1, y: arg2 }, + ); + } + #[doc(hidden)] + #[allow(non_snake_case)] + pub unsafe fn _export_method_rectangle_to_mesh_cabi( + arg0: *mut u8, + ) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_mesh(RectangleBorrow::lift(arg0 as u32 as usize).get()); + (result0).take_handle() as i32 + } + #[doc(hidden)] + #[allow(non_snake_case)] + pub unsafe fn _export_method_rectangle_to_node_cabi( + arg0: *mut u8, + ) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = T::to_node(RectangleBorrow::lift(arg0 as u32 as usize).get()); + (result0).take_handle() as i32 + } + #[doc(hidden)] + #[allow(non_snake_case)] + pub unsafe fn _export_method_rectangle_to_physics_node_cabi( + arg0: *mut u8, + ) -> i32 { + #[cfg(target_arch = "wasm32")] + _rt::run_ctors_once(); + let result0 = + T::to_physics_node(RectangleBorrow::lift(arg0 as u32 as usize).get()); + (result0).take_handle() as i32 + } #[doc(hidden)] #[allow(non_snake_case)] pub unsafe fn _export_constructor_cylinder_cabi( @@ -3559,10 +3790,66 @@ pub mod exports { (result0).take_handle() as i32 } pub trait Guest { + type Rectangle: GuestRectangle; type Cylinder: GuestCylinder; type Cuboid: GuestCuboid; type Sphere: GuestSphere; } + pub trait GuestRectangle: 'static { + #[doc(hidden)] + unsafe fn _resource_new(val: *mut u8) -> u32 + where + Self: Sized, + { + #[cfg(not(target_arch = "wasm32"))] + { + let _ = val; + unreachable!(); + } + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "[export]unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-new]rectangle"] + fn new(_: *mut u8) -> u32; + } + new(val) + } + } + + #[doc(hidden)] + fn _resource_rep(handle: u32) -> *mut u8 + where + Self: Sized, + { + #[cfg(not(target_arch = "wasm32"))] + { + let _ = handle; + unreachable!(); + } + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "[export]unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-rep]rectangle"] + fn rep(_: u32) -> *mut u8; + } + unsafe { rep(handle) } + } + } + + fn new(size: Vec2) -> Self; + fn size(&self) -> Vec2; + fn set_size(&self, value: Vec2); + /// Creates a mesh of this shape. + fn to_mesh(&self) -> Mesh; + /// Creates a node with a mesh of this shape. + fn to_node(&self) -> Node; + /// Creates a node with a mesh and physics collider of this shape. + fn to_physics_node(&self) -> Node; + } pub trait GuestCylinder: 'static { #[doc(hidden)] unsafe fn _resource_new(val: *mut u8) -> u32 @@ -3747,6 +4034,30 @@ pub mod exports { macro_rules! __export_unavi_shapes_api_cabi{ ($ty:ident with_types_in $($path_to_types:tt)*) => (const _: () = { + #[export_name = "unavi:shapes/api#[constructor]rectangle"] + unsafe extern "C" fn export_constructor_rectangle(arg0: f32,arg1: f32,) -> i32 { + $($path_to_types)*::_export_constructor_rectangle_cabi::<<$ty as $($path_to_types)*::Guest>::Rectangle>(arg0, arg1) + } + #[export_name = "unavi:shapes/api#[method]rectangle.size"] + unsafe extern "C" fn export_method_rectangle_size(arg0: *mut u8,) -> *mut u8 { + $($path_to_types)*::_export_method_rectangle_size_cabi::<<$ty as $($path_to_types)*::Guest>::Rectangle>(arg0) + } + #[export_name = "unavi:shapes/api#[method]rectangle.set-size"] + unsafe extern "C" fn export_method_rectangle_set_size(arg0: *mut u8,arg1: f32,arg2: f32,) { + $($path_to_types)*::_export_method_rectangle_set_size_cabi::<<$ty as $($path_to_types)*::Guest>::Rectangle>(arg0, arg1, arg2) + } + #[export_name = "unavi:shapes/api#[method]rectangle.to-mesh"] + unsafe extern "C" fn export_method_rectangle_to_mesh(arg0: *mut u8,) -> i32 { + $($path_to_types)*::_export_method_rectangle_to_mesh_cabi::<<$ty as $($path_to_types)*::Guest>::Rectangle>(arg0) + } + #[export_name = "unavi:shapes/api#[method]rectangle.to-node"] + unsafe extern "C" fn export_method_rectangle_to_node(arg0: *mut u8,) -> i32 { + $($path_to_types)*::_export_method_rectangle_to_node_cabi::<<$ty as $($path_to_types)*::Guest>::Rectangle>(arg0) + } + #[export_name = "unavi:shapes/api#[method]rectangle.to-physics-node"] + unsafe extern "C" fn export_method_rectangle_to_physics_node(arg0: *mut u8,) -> i32 { + $($path_to_types)*::_export_method_rectangle_to_physics_node_cabi::<<$ty as $($path_to_types)*::Guest>::Rectangle>(arg0) + } #[export_name = "unavi:shapes/api#[constructor]cylinder"] unsafe extern "C" fn export_constructor_cylinder(arg0: f32,arg1: f32,) -> i32 { $($path_to_types)*::_export_constructor_cylinder_cabi::<<$ty as $($path_to_types)*::Guest>::Cylinder>(arg0, arg1) @@ -3864,6 +4175,18 @@ pub mod exports { $($path_to_types)*::_export_method_sphere_to_physics_node_cabi::<<$ty as $($path_to_types)*::Guest>::Sphere>(arg0) } + const _: () = { + #[doc(hidden)] + #[export_name = "unavi:shapes/api#[dtor]rectangle"] + #[allow(non_snake_case)] + unsafe extern "C" fn dtor(rep: *mut u8) { + $($path_to_types)*::Rectangle::dtor::< + <$ty as $($path_to_types)*::Guest>::Rectangle + >(rep) + } + }; + + const _: () = { #[doc(hidden)] #[export_name = "unavi:shapes/api#[dtor]cylinder"] @@ -4172,8 +4495,8 @@ pub(crate) use __export_shapes_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:shapes:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 4872] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x8b%\x01A\x02\x01A\x1c\ +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 5180] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xbf'\x01A\x02\x01A\x1d\ \x01B\x04\x01m\x04\x05debug\x04info\x04warn\x05error\x04\0\x09log-level\x03\0\0\x01\ @\x02\x05level\x01\x07messages\x01\0\x04\0\x03log\x01\x02\x03\x01\x0dwired:log/a\ pi\x05\0\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08\ @@ -4198,89 +4521,96 @@ s\x04\0\x11[method]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\ \x1c[method]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[me\ thod]mesh.create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\ \x1d[method]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x03\x01\ -B\x06\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01z\ -v\x01wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btransla\ -tion\x01\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\x04\x02\x03\ -\0\x03\x04vec3\x02\x03\0\x03\x04quat\x01B\x15\x02\x03\x02\x01\x05\x04\0\x04vec3\x03\ -\0\0\x02\x03\x02\x01\x06\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\ -\x09hand-side\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\ -\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametac\ -arpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05\ -index\x09\x06middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05el\ -bow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03\ -ray\x03\0\x0d\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\ -\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainp\ -ut-type\x03\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0bi\ -nput-event\x03\0\x13\x03\x01\x11wired:input/types\x05\x07\x02\x03\0\x04\x0binput\ --event\x01B\x0a\x02\x03\x02\x01\x08\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-\ -handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\ -\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handl\ -e-input\x01\x07\x03\x01\x13wired:input/handler\x05\x09\x01B\x1c\x02\x03\x02\x01\x05\ -\x04\0\x04vec3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\ -\0\x0eshape-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\ -\x06sphere\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07\ -dynamic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\ -\x05shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04\ -self\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05va\ -luev\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0fri\ -gid-body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\ -\x04self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\ -\x05value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[met\ -hod]rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\ -\x01\x13wired:physics/types\x05\x0a\x02\x03\0\x02\x04mesh\x02\x03\0\x05\x0dinput\ --handler\x02\x03\0\x03\x09transform\x02\x03\0\x06\x08collider\x02\x03\0\x06\x0ar\ -igid-body\x01BB\x02\x03\x02\x01\x0b\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0c\x04\ -\0\x0dinput-handler\x03\0\x02\x02\x03\x02\x01\x0d\x04\0\x09transform\x03\0\x04\x02\ -\x03\x02\x01\x0e\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0f\x04\0\x0arigid-\ -body\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor\ -]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01\ -@\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05\ -values\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x10\ -\x02\x03\0\x07\x04node\x01BI\x02\x03\x02\x01\x05\x04\0\x04vec3\x03\0\0\x02\x03\x02\ -\x01\x0b\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\x11\x04\0\x04node\x03\0\x04\x04\ -\0\x08cylinder\x03\x01\x04\0\x06cuboid\x03\x01\x01r\x01\x0csubdivisions}\x04\0\x0a\ -sphere-ico\x03\0\x08\x01r\x02\x07sectors}\x06stacks}\x04\0\x09sphere-uv\x03\0\x0a\ -\x01q\x02\x03ico\x01\x09\0\x02uv\x01\x0b\0\x04\0\x0bsphere-kind\x03\0\x0c\x04\0\x06\ -sphere\x03\x01\x01i\x06\x01@\x02\x06radiusv\x06heightv\0\x0f\x04\0\x15[construct\ -or]cylinder\x01\x10\x01h\x06\x01@\x01\x04self\x11\0\x7f\x04\0\x14[method]cylinde\ -r.cap\x01\x12\x01@\x02\x04self\x11\x05value\x7f\x01\0\x04\0\x18[method]cylinder.\ -set-cap\x01\x13\x01@\x01\x04self\x11\0v\x04\0\x17[method]cylinder.height\x01\x14\ -\x01@\x02\x04self\x11\x05valuev\x01\0\x04\0\x1b[method]cylinder.set-height\x01\x15\ -\x04\0\x17[method]cylinder.radius\x01\x14\x04\0\x1b[method]cylinder.set-radius\x01\ -\x15\x01@\x01\x04self\x11\0}\x04\0\x1b[method]cylinder.resolution\x01\x16\x01@\x02\ -\x04self\x11\x05value}\x01\0\x04\0\x1f[method]cylinder.set-resolution\x01\x17\x04\ -\0\x19[method]cylinder.segments\x01\x16\x04\0\x1d[method]cylinder.set-segments\x01\ -\x17\x01i\x03\x01@\x01\x04self\x11\0\x18\x04\0\x18[method]cylinder.to-mesh\x01\x19\ -\x01i\x05\x01@\x01\x04self\x11\0\x1a\x04\0\x18[method]cylinder.to-node\x01\x1b\x04\ -\0\x20[method]cylinder.to-physics-node\x01\x1b\x01i\x07\x01@\x01\x04size\x01\0\x1c\ -\x04\0\x13[constructor]cuboid\x01\x1d\x01h\x07\x01@\x01\x04self\x1e\0\x01\x04\0\x13\ -[method]cuboid.size\x01\x1f\x01@\x02\x04self\x1e\x05value\x01\x01\0\x04\0\x17[me\ -thod]cuboid.set-size\x01\x20\x01@\x01\x04self\x1e\0\x18\x04\0\x16[method]cuboid.\ -to-mesh\x01!\x01@\x01\x04self\x1e\0\x1a\x04\0\x16[method]cuboid.to-node\x01\"\x04\ -\0\x1e[method]cuboid.to-physics-node\x01\"\x01i\x0e\x01@\x01\x06radiusv\0#\x04\0\ -\x16[static]sphere.new-ico\x01$\x04\0\x15[static]sphere.new-uv\x01$\x01h\x0e\x01\ -@\x01\x04self%\0v\x04\0\x15[method]sphere.radius\x01&\x01@\x02\x04self%\x05value\ -v\x01\0\x04\0\x19[method]sphere.set-radius\x01'\x01@\x01\x04self%\0\x0d\x04\0\x13\ -[method]sphere.kind\x01(\x01@\x02\x04self%\x05value\x0d\x01\0\x04\0\x17[method]s\ -phere.set-kind\x01)\x01@\x01\x04self%\0\x18\x04\0\x16[method]sphere.to-mesh\x01*\ -\x01@\x01\x04self%\0\x1a\x04\0\x16[method]sphere.to-node\x01+\x04\0\x1e[method]s\ -phere.to-physics-node\x01+\x04\x01\x10unavi:shapes/api\x05\x12\x04\x01\x13unavi:\ -shapes/shapes\x04\0\x0b\x0c\x01\0\x06shapes\x03\0\0\0G\x09producers\x01\x0cproce\ -ssed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; +B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\0\ +\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01r\ +\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\x04\x02\x03\0\x03\x04vec3\x02\x03\0\x03\x04quat\ +\x01B\x15\x02\x03\x02\x01\x05\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x06\x04\0\x04\ +quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0b\ +translation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03\ +tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\ +\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\ +\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01\ +r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\ +\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\ +\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02i\ +dw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11\ +wired:input/types\x05\x07\x02\x03\0\x04\x0binput-event\x01B\x0a\x02\x03\x02\x01\x08\ +\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\ +\x04\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\ +\0\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/\ +handler\x05\x09\x01B\x1c\x02\x03\x02\x01\x05\x04\0\x04vec3\x03\0\0\x04\0\x08coll\ +ider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01\ +q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x0a\x02\x03\0\x02\x04mesh\x02\x03\0\x05\x0dinput-handler\x02\x03\0\x03\x09trans\ +form\x02\x03\0\x06\x08collider\x02\x03\0\x06\x0arigid-body\x01BB\x02\x03\x02\x01\ +\x0b\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0c\x04\0\x0dinput-handler\x03\0\x02\x02\ +\x03\x02\x01\x0d\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0e\x04\0\x08colli\ +der\x03\0\x06\x02\x03\x02\x01\x0f\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\ +\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04\ +self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[m\ +ethod]node.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]no\ +de.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.ch\ +ildren\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add\ +-child\x01\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04s\ +elf\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\ +\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\ +\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\ +\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05\ +value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\ +\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\ +\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01\ +k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01\ +@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\ +\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\ +\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-\ +handler\x01/\x03\x01\x10wired:scene/node\x05\x10\x02\x03\0\x03\x04vec2\x02\x03\0\ +\x07\x04node\x01BY\x02\x03\x02\x01\x11\x04\0\x04vec2\x03\0\0\x02\x03\x02\x01\x05\ +\x04\0\x04vec3\x03\0\x02\x02\x03\x02\x01\x0b\x04\0\x04mesh\x03\0\x04\x02\x03\x02\ +\x01\x12\x04\0\x04node\x03\0\x06\x04\0\x09rectangle\x03\x01\x04\0\x08cylinder\x03\ +\x01\x04\0\x06cuboid\x03\x01\x01r\x01\x0csubdivisions}\x04\0\x0asphere-ico\x03\0\ +\x0b\x01r\x02\x07sectors}\x06stacks}\x04\0\x09sphere-uv\x03\0\x0d\x01q\x02\x03ic\ +o\x01\x0c\0\x02uv\x01\x0e\0\x04\0\x0bsphere-kind\x03\0\x0f\x04\0\x06sphere\x03\x01\ +\x01i\x08\x01@\x01\x04size\x01\0\x12\x04\0\x16[constructor]rectangle\x01\x13\x01\ +h\x08\x01@\x01\x04self\x14\0\x01\x04\0\x16[method]rectangle.size\x01\x15\x01@\x02\ +\x04self\x14\x05value\x01\x01\0\x04\0\x1a[method]rectangle.set-size\x01\x16\x01i\ +\x05\x01@\x01\x04self\x14\0\x17\x04\0\x19[method]rectangle.to-mesh\x01\x18\x01i\x07\ +\x01@\x01\x04self\x14\0\x19\x04\0\x19[method]rectangle.to-node\x01\x1a\x04\0![me\ +thod]rectangle.to-physics-node\x01\x1a\x01i\x09\x01@\x02\x06radiusv\x06heightv\0\ +\x1b\x04\0\x15[constructor]cylinder\x01\x1c\x01h\x09\x01@\x01\x04self\x1d\0\x7f\x04\ +\0\x14[method]cylinder.cap\x01\x1e\x01@\x02\x04self\x1d\x05value\x7f\x01\0\x04\0\ +\x18[method]cylinder.set-cap\x01\x1f\x01@\x01\x04self\x1d\0v\x04\0\x17[method]cy\ +linder.height\x01\x20\x01@\x02\x04self\x1d\x05valuev\x01\0\x04\0\x1b[method]cyli\ +nder.set-height\x01!\x04\0\x17[method]cylinder.radius\x01\x20\x04\0\x1b[method]c\ +ylinder.set-radius\x01!\x01@\x01\x04self\x1d\0}\x04\0\x1b[method]cylinder.resolu\ +tion\x01\"\x01@\x02\x04self\x1d\x05value}\x01\0\x04\0\x1f[method]cylinder.set-re\ +solution\x01#\x04\0\x19[method]cylinder.segments\x01\"\x04\0\x1d[method]cylinder\ +.set-segments\x01#\x01@\x01\x04self\x1d\0\x17\x04\0\x18[method]cylinder.to-mesh\x01\ +$\x01@\x01\x04self\x1d\0\x19\x04\0\x18[method]cylinder.to-node\x01%\x04\0\x20[me\ +thod]cylinder.to-physics-node\x01%\x01i\x0a\x01@\x01\x04size\x03\0&\x04\0\x13[co\ +nstructor]cuboid\x01'\x01h\x0a\x01@\x01\x04self(\0\x03\x04\0\x13[method]cuboid.s\ +ize\x01)\x01@\x02\x04self(\x05value\x03\x01\0\x04\0\x17[method]cuboid.set-size\x01\ +*\x01@\x01\x04self(\0\x17\x04\0\x16[method]cuboid.to-mesh\x01+\x01@\x01\x04self(\ +\0\x19\x04\0\x16[method]cuboid.to-node\x01,\x04\0\x1e[method]cuboid.to-physics-n\ +ode\x01,\x01i\x11\x01@\x01\x06radiusv\0-\x04\0\x16[static]sphere.new-ico\x01.\x04\ +\0\x15[static]sphere.new-uv\x01.\x01h\x11\x01@\x01\x04self/\0v\x04\0\x15[method]\ +sphere.radius\x010\x01@\x02\x04self/\x05valuev\x01\0\x04\0\x19[method]sphere.set\ +-radius\x011\x01@\x01\x04self/\0\x10\x04\0\x13[method]sphere.kind\x012\x01@\x02\x04\ +self/\x05value\x10\x01\0\x04\0\x17[method]sphere.set-kind\x013\x01@\x01\x04self/\ +\0\x17\x04\0\x16[method]sphere.to-mesh\x014\x01@\x01\x04self/\0\x19\x04\0\x16[me\ +thod]sphere.to-node\x015\x04\0\x1e[method]sphere.to-physics-node\x015\x04\x01\x10\ +unavi:shapes/api\x05\x13\x04\x01\x13unavi:shapes/shapes\x04\0\x0b\x0c\x01\0\x06s\ +hapes\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.\ +1\x10wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/unavi-shapes/src/lib.rs b/wasm/unavi-shapes/src/lib.rs index b692222da..0f2008e28 100644 --- a/wasm/unavi-shapes/src/lib.rs +++ b/wasm/unavi-shapes/src/lib.rs @@ -1,16 +1,18 @@ use bindings::exports::unavi::shapes::api::Guest; -use shapes::{cuboid::Cuboid, cylinder::Cylinder, sphere::Sphere}; +use shapes::{cuboid::Cuboid, cylinder::Cylinder, rectangle::Rectangle, sphere::Sphere}; mod attributes; #[allow(warnings)] mod bindings; mod shapes; +mod wired_math_impls; struct GuestImpl; impl Guest for GuestImpl { type Cuboid = Cuboid; type Cylinder = Cylinder; + type Rectangle = Rectangle; type Sphere = Sphere; } diff --git a/wasm/unavi-shapes/src/shapes/mod.rs b/wasm/unavi-shapes/src/shapes/mod.rs index 2e070c017..e3e31224f 100644 --- a/wasm/unavi-shapes/src/shapes/mod.rs +++ b/wasm/unavi-shapes/src/shapes/mod.rs @@ -1,3 +1,4 @@ pub mod cuboid; pub mod cylinder; +pub mod rectangle; pub mod sphere; diff --git a/wasm/unavi-shapes/src/shapes/rectangle.rs b/wasm/unavi-shapes/src/shapes/rectangle.rs new file mode 100644 index 000000000..9cdca906c --- /dev/null +++ b/wasm/unavi-shapes/src/shapes/rectangle.rs @@ -0,0 +1,107 @@ +use std::cell::RefCell; + +use crate::bindings::{ + exports::unavi::shapes::api::GuestRectangle, + wired::{ + math::types::{Vec2, Vec3}, + physics::types::{Collider, Shape}, + scene::{mesh::Mesh, node::Node}, + }, +}; + +const COLLIDER_DEPTH: f32 = 0.0001; + +pub struct Rectangle { + size: RefCell, +} + +impl GuestRectangle for Rectangle { + fn new(size: Vec2) -> Self { + Self { + size: RefCell::new(size), + } + } + + fn size(&self) -> Vec2 { + *self.size.borrow() + } + fn set_size(&self, value: Vec2) { + self.size.replace(value); + } + + fn to_mesh(&self) -> Mesh { + create_rectangle_mesh(self.size()) + } + fn to_node(&self) -> crate::bindings::exports::unavi::shapes::api::Node { + let node = Node::new(); + node.set_mesh(Some(&self.to_mesh())); + node + } + fn to_physics_node(&self) -> Node { + let node = self.to_node(); + let size = self.size(); + node.set_collider(Some(&Collider::new(Shape::Cuboid(Vec3::new( + size.x, + size.y, + COLLIDER_DEPTH, + ))))); + node + } +} + +fn create_rectangle_mesh(size: Vec2) -> Mesh { + let normal = glam::Vec3::new(0.0, 0.0, -1.0); + let subdivisions = 0; + + let z_vertex_count = subdivisions + 2; + let x_vertex_count = subdivisions + 2; + let num_vertices = (z_vertex_count * x_vertex_count) as usize; + let num_indices = ((z_vertex_count - 1) * (x_vertex_count - 1) * 6) as usize; + + let mut positions: Vec = Vec::with_capacity(num_vertices); + let mut normals: Vec<[f32; 3]> = Vec::with_capacity(num_vertices); + let mut uvs: Vec<[f32; 2]> = Vec::with_capacity(num_vertices); + let mut indices: Vec = Vec::with_capacity(num_indices); + + let rotation = glam::Quat::from_rotation_arc(glam::Vec3::Y, normal); + + for z in 0..z_vertex_count { + for x in 0..x_vertex_count { + let tx = x as f32 / (x_vertex_count - 1) as f32; + let tz = z as f32 / (z_vertex_count - 1) as f32; + let pos = rotation * glam::Vec3::new((-0.5 + tx) * size.x, 0.0, (-0.5 + tz) * size.y); + positions.push(pos); + normals.push(normal.to_array()); + uvs.push([tx, tz]); + } + } + + for z in 0..z_vertex_count - 1 { + for x in 0..x_vertex_count - 1 { + let quad = z * x_vertex_count + x; + indices.push(quad + x_vertex_count + 1); + indices.push(quad + 1); + indices.push(quad + x_vertex_count); + indices.push(quad); + indices.push(quad + x_vertex_count); + indices.push(quad + 1); + } + } + + let normals = normals.into_iter().flatten().collect::>(); + let positions = positions + .into_iter() + .flat_map(|v| [v.x, v.y, v.z]) + .collect::>(); + let uvs = uvs.into_iter().flatten().collect::>(); + + let mesh = Mesh::new(); + let primitive = mesh.create_primitive(); + + primitive.set_indices(&indices); + primitive.set_normals(&normals); + primitive.set_positions(&positions); + primitive.set_uvs(&uvs); + + mesh +} diff --git a/wasm/unavi-shapes/src/wired_math_impls.rs b/wasm/unavi-shapes/src/wired_math_impls.rs new file mode 120000 index 000000000..94630165c --- /dev/null +++ b/wasm/unavi-shapes/src/wired_math_impls.rs @@ -0,0 +1 @@ +../../unavi-system/src/wired_math_impls.rs \ No newline at end of file diff --git a/wasm/unavi-shapes/wit/world.wit b/wasm/unavi-shapes/wit/world.wit index 73a2f046d..b83a7214f 100644 --- a/wasm/unavi-shapes/wit/world.wit +++ b/wasm/unavi-shapes/wit/world.wit @@ -8,10 +8,26 @@ world shapes { } interface api { - use wired:math/types.{vec3}; + use wired:math/types.{vec2, vec3}; use wired:scene/mesh.{mesh}; use wired:scene/node.{node}; + // 2D + resource rectangle { + constructor(size: vec2); + + size: func() -> vec2; + set-size: func(value: vec2); + + // Creates a mesh of this shape. + to-mesh: func() -> mesh; + // Creates a node with a mesh of this shape. + to-node: func() -> node; + // Creates a node with a mesh and physics collider of this shape. + to-physics-node: func() -> node; + } + + // 3D resource cylinder { constructor(radius: f32, height: f32); diff --git a/wasm/unavi-system/Cargo.toml b/wasm/unavi-system/Cargo.toml index dd99b8923..f479b867c 100644 --- a/wasm/unavi-system/Cargo.toml +++ b/wasm/unavi-system/Cargo.toml @@ -16,6 +16,7 @@ wit-bindgen-rt.workspace = true package = "unavi:system" [package.metadata.component.target.dependencies] +"unavi:shapes" = { path = "../unavi-shapes/wit" } "unavi:vscreen" = { path = "../unavi-vscreen/wit" } "wired:input" = { path = "../../wired-protocol/spatial/wit/wired-input" } "wired:log" = { path = "../../wired-protocol/spatial/wit/wired-log" } diff --git a/wasm/unavi-system/src/bindings.rs b/wasm/unavi-system/src/bindings.rs index f982f5ec4..44aa2028c 100644 --- a/wasm/unavi-system/src/bindings.rs +++ b/wasm/unavi-system/src/bindings.rs @@ -1242,6 +1242,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -5962,8 +5976,8 @@ pub(crate) use __export_script_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:script:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 7520] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xe39\x01A\x02\x01A(\x01\ +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 7539] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xf69\x01A\x02\x01A(\x01\ B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08material\x03\ \x01\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\x01@\x01\ \x04self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\0s\x04\ @@ -5985,151 +5999,152 @@ ethod]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]me sh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[metho\ d]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.\ create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d[metho\ -d]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x02\x01B\x06\x01\ -r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\ -\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btranslation\x01\x04\ -\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\x03\x02\x03\0\x02\x04v\ -ec3\x02\x03\0\x02\x04quat\x01B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\ -\x03\x02\x01\x05\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand\ --side\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05\ -joint\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\ -\x04\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\ -\x06middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\ -\0\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\ -\x0d\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\ -\x01q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-typ\ -e\x03\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-e\ -vent\x03\0\x13\x03\x01\x11wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\ -\x01B\x0a\x02\x03\x02\x01\x07\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handle\ -r\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\x01h\ -\x02\x01k\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handle-inp\ -ut\x01\x07\x03\x01\x13wired:input/handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\ -\0\x04vec3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\ -\x0eshape-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06\ -sphere\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07d\ -ynamic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\ -\x05shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04\ -self\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05va\ -luev\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0fri\ -gid-body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\ -\x04self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\ -\x05value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[met\ -hod]rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\ -\x01\x13wired:physics/types\x05\x09\x02\x03\0\x01\x04mesh\x02\x03\0\x04\x0dinput\ --handler\x02\x03\0\x02\x09transform\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0ar\ -igid-body\x01BB\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\ -\0\x0dinput-handler\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\ -\x03\x02\x01\x0d\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-\ -body\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor\ -]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01\ -@\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05\ -values\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\ -\x02\x03\0\x06\x04node\x01B\x19\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\x06\ -screen\x03\x01\x04\0\x06module\x03\x01\x01i\x02\x01@\0\0\x04\x04\0\x13[construct\ -or]screen\x01\x05\x01h\x02\x01i\x03\x01@\x02\x04self\x06\x06module\x07\x01\0\x04\ -\0\x19[method]screen.add-module\x01\x08\x01@\x01\x04self\x06\0\x7f\x04\0\x16[met\ -hod]screen.visible\x01\x09\x01@\x02\x04self\x06\x05value\x7f\x01\0\x04\0\x1a[met\ -hod]screen.set-visible\x01\x0a\x01@\x02\x04self\x06\x05deltav\x01\0\x04\0\x15[me\ -thod]screen.update\x01\x0b\x01@\0\0\x07\x04\0\x13[constructor]module\x01\x0c\x01\ -h\x03\x01i\x01\x01@\x01\x04self\x0d\0\x0e\x04\0\x13[method]module.root\x01\x0f\x01\ -@\x02\x04self\x0d\x05deltav\x01\0\x04\0\x15[method]module.update\x01\x10\x03\x01\ -\x14unavi:vscreen/screen\x05\x11\x01B\x04\x01m\x04\x05debug\x04info\x04warn\x05e\ -rror\x04\0\x09log-level\x03\0\0\x01@\x02\x05level\x01\x07messages\x01\0\x04\0\x03\ -log\x01\x02\x03\x01\x0dwired:log/api\x05\x12\x01B\x0f\x02\x03\x02\x01\x10\x04\0\x04\ -node\x03\0\0\x01i\x01\x01r\x0f\x04head\x02\x05spine\x02\x04hips\x02\x0eleft-uppe\ -r-arm\x02\x0eleft-lower-arm\x02\x09left-hand\x02\x0fright-upper-arm\x02\x0fright\ --lower-arm\x02\x0aright-hand\x02\x0eleft-upper-leg\x02\x0eleft-lower-leg\x02\x09\ -left-foot\x02\x0fright-upper-leg\x02\x0fright-lower-leg\x02\x0aright-foot\x02\x04\ -\0\x08skeleton\x03\0\x03\x04\0\x06player\x03\x01\x01h\x05\x01@\x01\x04self\x06\0\ -\x04\x04\0\x17[method]player.skeleton\x01\x07\x01i\x05\x01p\x08\x01@\0\0\x09\x04\ -\0\x0clist-players\x01\x0a\x01@\0\0\x08\x04\0\x0clocal-player\x01\x0b\x03\x01\x10\ -wired:player/api\x05\x13\x01B\x15\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\ -\x05scene\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x12[constructor]scene\x01\x04\x01h\ -\x02\x01@\x01\x04self\x05\0y\x04\0\x10[method]scene.id\x01\x06\x01@\x01\x04self\x05\ -\0s\x04\0\x12[method]scene.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\ -\0\x16[method]scene.set-name\x01\x08\x01i\x01\x01p\x09\x01@\x01\x04self\x05\0\x0a\ -\x04\0\x13[method]scene.nodes\x01\x0b\x01h\x01\x01@\x02\x04self\x05\x05value\x0c\ -\x01\0\x04\0\x16[method]scene.add-node\x01\x0d\x04\0\x19[method]scene.remove-nod\ -e\x01\x0d\x03\x01\x11wired:scene/scene\x05\x14\x02\x03\0\x0a\x05scene\x01B5\x02\x03\ -\x02\x01\x01\x04\0\x08material\x03\0\0\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\ -\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x04\x02\x03\x02\x01\x15\x04\0\x05scene\x03\ -\0\x06\x04\0\x04gltf\x03\x01\x01i\x08\x01@\0\0\x09\x04\0\x11[constructor]gltf\x01\ -\x0a\x01h\x08\x01i\x01\x01p\x0c\x01@\x01\x04self\x0b\0\x0d\x04\0\x1b[method]gltf\ -.list-materials\x01\x0e\x01h\x01\x01@\x02\x04self\x0b\x05value\x0f\x01\0\x04\0\x19\ -[method]gltf.add-material\x01\x10\x04\0\x1c[method]gltf.remove-material\x01\x10\x01\ -i\x03\x01p\x11\x01@\x01\x04self\x0b\0\x12\x04\0\x18[method]gltf.list-meshes\x01\x13\ -\x01h\x03\x01@\x02\x04self\x0b\x05value\x14\x01\0\x04\0\x15[method]gltf.add-mesh\ -\x01\x15\x04\0\x18[method]gltf.remove-mesh\x01\x15\x01i\x05\x01p\x16\x01@\x01\x04\ -self\x0b\0\x17\x04\0\x17[method]gltf.list-nodes\x01\x18\x01h\x05\x01@\x02\x04sel\ -f\x0b\x05value\x19\x01\0\x04\0\x15[method]gltf.add-node\x01\x1a\x04\0\x18[method\ -]gltf.remove-node\x01\x1a\x01i\x07\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\x04\0\x18\ -[method]gltf.list-scenes\x01\x1d\x01h\x07\x01@\x02\x04self\x0b\x05value\x1e\x01\0\ -\x04\0\x16[method]gltf.add-scene\x01\x1f\x04\0\x19[method]gltf.remove-scene\x01\x1f\ -\x01k\x1b\x01@\x01\x04self\x0b\0\x20\x04\0\x19[method]gltf.active-scene\x01!\x01\ -k\x1e\x01@\x02\x04self\x0b\x05value\"\x01\0\x04\0\x1d[method]gltf.set-active-sce\ -ne\x01#\x04\0\x1a[method]gltf.default-scene\x01!\x04\0\x1e[method]gltf.set-defau\ -lt-scene\x01\x1f\x03\x01\x10wired:scene/gltf\x05\x16\x02\x03\0\x0b\x04gltf\x01Bt\ -\x02\x03\x02\x01\x17\x04\0\x04gltf\x03\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\ -\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x04\0\x04glxf\x03\x01\x04\ -\0\x0aasset-gltf\x03\x01\x04\0\x0aasset-glxf\x03\x01\x01i\x07\x01i\x08\x01q\x02\x04\ -gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\0\x05asset\x03\0\x0b\x01h\x07\x01h\x08\x01q\ -\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\0\x04\0\x0casset-borrow\x03\0\x0f\x04\0\x09\ -glxf-node\x03\x01\x01i\x11\x01p\x12\x01q\x02\x05asset\x01\x0c\0\x05nodes\x01\x13\ -\0\x04\0\x08children\x03\0\x14\x01h\x11\x01p\x16\x01q\x02\x05asset\x01\x10\0\x05\ -nodes\x01\x17\0\x04\0\x0fchildren-borrow\x03\0\x18\x04\0\x0aglxf-scene\x03\x01\x01\ -i\x06\x01@\0\0\x1b\x04\0\x11[constructor]glxf\x01\x1c\x01h\x06\x01p\x0c\x01@\x01\ -\x04self\x1d\0\x1e\x04\0\x18[method]glxf.list-assets\x01\x1f\x01@\x02\x04self\x1d\ -\x05value\x10\x01\0\x04\0\x16[method]glxf.add-asset\x01\x20\x04\0\x19[method]glx\ -f.remove-asset\x01\x20\x01@\x01\x04self\x1d\0\x13\x04\0\x17[method]glxf.list-nod\ -es\x01!\x01@\x02\x04self\x1d\x05value\x16\x01\0\x04\0\x15[method]glxf.add-node\x01\ -\"\x04\0\x18[method]glxf.remove-node\x01\"\x01i\x1a\x01p#\x01@\x01\x04self\x1d\0\ -$\x04\0\x18[method]glxf.list-scenes\x01%\x01h\x1a\x01@\x02\x04self\x1d\x05value&\ -\x01\0\x04\0\x16[method]glxf.add-scene\x01'\x04\0\x19[method]glxf.remove-scene\x01\ -'\x01k#\x01@\x01\x04self\x1d\0(\x04\0\x19[method]glxf.active-scene\x01)\x01k&\x01\ -@\x02\x04self\x1d\x05value*\x01\0\x04\0\x1d[method]glxf.set-active-scene\x01+\x04\ -\0\x1a[method]glxf.default-scene\x01)\x04\0\x1e[method]glxf.set-default-scene\x01\ -'\x01h\x01\x01@\x01\x08document,\0\x09\x04\0\x17[constructor]asset-gltf\x01-\x01\ -i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b[method]asset-gltf.document\x01/\x01i\x03\ -\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d[method]asset-gltf.list-nodes\x012\x01h\x03\ -\x01@\x02\x04self\x0d\x05value3\x01\0\x04\0\x1b[method]asset-gltf.add-node\x014\x04\ -\0\x1e[method]asset-gltf.remove-node\x014\x01@\x01\x08document\x1d\0\x0a\x04\0\x17\ -[constructor]asset-glxf\x015\x01@\x01\x04self\x0e\0\x1b\x04\0\x1b[method]asset-g\ -lxf.document\x016\x01@\x01\x04self\x0e\0\x13\x04\0\x1d[method]asset-glxf.list-no\ -des\x017\x01@\x02\x04self\x0e\x05value\x16\x01\0\x04\0\x1b[method]asset-glxf.add\ --node\x018\x04\0\x1e[method]asset-glxf.remove-node\x018\x01@\0\0\x12\x04\0\x16[c\ -onstructor]glxf-node\x019\x01@\x01\x04self\x16\0y\x04\0\x14[method]glxf-node.id\x01\ -:\x01@\x01\x04self\x16\0s\x04\0\x16[method]glxf-node.name\x01;\x01@\x02\x04self\x16\ -\x05values\x01\0\x04\0\x1a[method]glxf-node.set-name\x01<\x01@\x01\x04self\x16\0\ -\x05\x04\0\x1b[method]glxf-node.transform\x01=\x01@\x02\x04self\x16\x05value\x05\ -\x01\0\x04\0\x1f[method]glxf-node.set-transform\x01>\x01k\x12\x01@\x01\x04self\x16\ -\0?\x04\0\x18[method]glxf-node.parent\x01@\x01k\x15\x01@\x01\x04self\x16\0\xc1\0\ -\x04\0\x1a[method]glxf-node.children\x01B\x01k\x19\x01@\x02\x04self\x16\x05value\ -\xc3\0\x01\0\x04\0\x1e[method]glxf-node.set-children\x01D\x01@\0\0#\x04\0\x17[co\ -nstructor]glxf-scene\x01E\x01@\x01\x04self&\0y\x04\0\x15[method]glxf-scene.id\x01\ -F\x01@\x01\x04self&\0s\x04\0\x17[method]glxf-scene.name\x01G\x01@\x02\x04self&\x05\ -values\x01\0\x04\0\x1b[method]glxf-scene.set-name\x01H\x01@\x01\x04self&\0\x13\x04\ -\0\x18[method]glxf-scene.nodes\x01I\x01@\x02\x04self&\x04node\x16\x01\0\x04\0\x1b\ -[method]glxf-scene.add-node\x01J\x04\0\x1e[method]glxf-scene.remove-node\x01J\x04\ -\0\x08get-root\x01\x1c\x03\x01\x10wired:scene/glxf\x05\x18\x01B\x07\x04\0\x06scr\ -ipt\x03\x01\x01i\0\x01@\0\0\x01\x04\0\x13[constructor]script\x01\x02\x01h\0\x01@\ -\x02\x04self\x03\x05deltav\x01\0\x04\0\x15[method]script.update\x01\x04\x04\x01\x12\ -wired:script/types\x05\x19\x04\x01\x13unavi:system/script\x04\0\x0b\x0c\x01\0\x06\ -script\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208\ -.1\x10wit-bindgen-rust\x060.25.0"; +d]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x02\x01B\x08\x01\ +r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\ +\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01r\x03\x08\ +rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\x03\x01\ +\x10wired:math/types\x05\x03\x02\x03\0\x02\x04vec3\x02\x03\0\x02\x04quat\x01B\x15\ +\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\x02\x03\x02\x01\x07\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x04\0\x08collid\ +er\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\ +\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x09\x02\x03\0\x01\x04mesh\x02\x03\0\x04\x0dinput-handler\x02\x03\0\x02\x09trans\ +form\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-body\x01BB\x02\x03\x02\x01\ +\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0dinput-handler\x03\0\x02\x02\ +\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0d\x04\0\x08colli\ +der\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\ +\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04\ +self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[m\ +ethod]node.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]no\ +de.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.ch\ +ildren\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add\ +-child\x01\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04s\ +elf\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\ +\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\ +\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\ +\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05\ +value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\ +\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\ +\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01\ +k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01\ +@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\ +\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\ +\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-\ +handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\x02\x03\0\x06\x04node\x01B\x19\x02\ +\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\x06screen\x03\x01\x04\0\x06module\x03\ +\x01\x01i\x02\x01@\0\0\x04\x04\0\x13[constructor]screen\x01\x05\x01h\x02\x01i\x03\ +\x01@\x02\x04self\x06\x06module\x07\x01\0\x04\0\x19[method]screen.add-module\x01\ +\x08\x01@\x01\x04self\x06\0\x7f\x04\0\x16[method]screen.visible\x01\x09\x01@\x02\ +\x04self\x06\x05value\x7f\x01\0\x04\0\x1a[method]screen.set-visible\x01\x0a\x01@\ +\x02\x04self\x06\x05deltav\x01\0\x04\0\x15[method]screen.update\x01\x0b\x01@\0\0\ +\x07\x04\0\x13[constructor]module\x01\x0c\x01h\x03\x01i\x01\x01@\x01\x04self\x0d\ +\0\x0e\x04\0\x13[method]module.root\x01\x0f\x01@\x02\x04self\x0d\x05deltav\x01\0\ +\x04\0\x15[method]module.update\x01\x10\x03\x01\x14unavi:vscreen/screen\x05\x11\x01\ +B\x04\x01m\x04\x05debug\x04info\x04warn\x05error\x04\0\x09log-level\x03\0\0\x01@\ +\x02\x05level\x01\x07messages\x01\0\x04\0\x03log\x01\x02\x03\x01\x0dwired:log/ap\ +i\x05\x12\x01B\x0f\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x01i\x01\x01r\x0f\x04\ +head\x02\x05spine\x02\x04hips\x02\x0eleft-upper-arm\x02\x0eleft-lower-arm\x02\x09\ +left-hand\x02\x0fright-upper-arm\x02\x0fright-lower-arm\x02\x0aright-hand\x02\x0e\ +left-upper-leg\x02\x0eleft-lower-leg\x02\x09left-foot\x02\x0fright-upper-leg\x02\ +\x0fright-lower-leg\x02\x0aright-foot\x02\x04\0\x08skeleton\x03\0\x03\x04\0\x06p\ +layer\x03\x01\x01h\x05\x01@\x01\x04self\x06\0\x04\x04\0\x17[method]player.skelet\ +on\x01\x07\x01i\x05\x01p\x08\x01@\0\0\x09\x04\0\x0clist-players\x01\x0a\x01@\0\0\ +\x08\x04\0\x0clocal-player\x01\x0b\x03\x01\x10wired:player/api\x05\x13\x01B\x15\x02\ +\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\x05scene\x03\x01\x01i\x02\x01@\0\0\x03\ +\x04\0\x12[constructor]scene\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x10[\ +method]scene.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x12[method]scene.name\x01\x07\ +\x01@\x02\x04self\x05\x05values\x01\0\x04\0\x16[method]scene.set-name\x01\x08\x01\ +i\x01\x01p\x09\x01@\x01\x04self\x05\0\x0a\x04\0\x13[method]scene.nodes\x01\x0b\x01\ +h\x01\x01@\x02\x04self\x05\x05value\x0c\x01\0\x04\0\x16[method]scene.add-node\x01\ +\x0d\x04\0\x19[method]scene.remove-node\x01\x0d\x03\x01\x11wired:scene/scene\x05\ +\x14\x02\x03\0\x0a\x05scene\x01B5\x02\x03\x02\x01\x01\x04\0\x08material\x03\0\0\x02\ +\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x02\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\ +\x04\x02\x03\x02\x01\x15\x04\0\x05scene\x03\0\x06\x04\0\x04gltf\x03\x01\x01i\x08\ +\x01@\0\0\x09\x04\0\x11[constructor]gltf\x01\x0a\x01h\x08\x01i\x01\x01p\x0c\x01@\ +\x01\x04self\x0b\0\x0d\x04\0\x1b[method]gltf.list-materials\x01\x0e\x01h\x01\x01\ +@\x02\x04self\x0b\x05value\x0f\x01\0\x04\0\x19[method]gltf.add-material\x01\x10\x04\ +\0\x1c[method]gltf.remove-material\x01\x10\x01i\x03\x01p\x11\x01@\x01\x04self\x0b\ +\0\x12\x04\0\x18[method]gltf.list-meshes\x01\x13\x01h\x03\x01@\x02\x04self\x0b\x05\ +value\x14\x01\0\x04\0\x15[method]gltf.add-mesh\x01\x15\x04\0\x18[method]gltf.rem\ +ove-mesh\x01\x15\x01i\x05\x01p\x16\x01@\x01\x04self\x0b\0\x17\x04\0\x17[method]g\ +ltf.list-nodes\x01\x18\x01h\x05\x01@\x02\x04self\x0b\x05value\x19\x01\0\x04\0\x15\ +[method]gltf.add-node\x01\x1a\x04\0\x18[method]gltf.remove-node\x01\x1a\x01i\x07\ +\x01p\x1b\x01@\x01\x04self\x0b\0\x1c\x04\0\x18[method]gltf.list-scenes\x01\x1d\x01\ +h\x07\x01@\x02\x04self\x0b\x05value\x1e\x01\0\x04\0\x16[method]gltf.add-scene\x01\ +\x1f\x04\0\x19[method]gltf.remove-scene\x01\x1f\x01k\x1b\x01@\x01\x04self\x0b\0\x20\ +\x04\0\x19[method]gltf.active-scene\x01!\x01k\x1e\x01@\x02\x04self\x0b\x05value\"\ +\x01\0\x04\0\x1d[method]gltf.set-active-scene\x01#\x04\0\x1a[method]gltf.default\ +-scene\x01!\x04\0\x1e[method]gltf.set-default-scene\x01\x1f\x03\x01\x10wired:sce\ +ne/gltf\x05\x16\x02\x03\0\x0b\x04gltf\x01Bt\x02\x03\x02\x01\x17\x04\0\x04gltf\x03\ +\0\0\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09tr\ +ansform\x03\0\x04\x04\0\x04glxf\x03\x01\x04\0\x0aasset-gltf\x03\x01\x04\0\x0aass\ +et-glxf\x03\x01\x01i\x07\x01i\x08\x01q\x02\x04gltf\x01\x09\0\x04glxf\x01\x0a\0\x04\ +\0\x05asset\x03\0\x0b\x01h\x07\x01h\x08\x01q\x02\x04gltf\x01\x0d\0\x04glxf\x01\x0e\ +\0\x04\0\x0casset-borrow\x03\0\x0f\x04\0\x09glxf-node\x03\x01\x01i\x11\x01p\x12\x01\ +q\x02\x05asset\x01\x0c\0\x05nodes\x01\x13\0\x04\0\x08children\x03\0\x14\x01h\x11\ +\x01p\x16\x01q\x02\x05asset\x01\x10\0\x05nodes\x01\x17\0\x04\0\x0fchildren-borro\ +w\x03\0\x18\x04\0\x0aglxf-scene\x03\x01\x01i\x06\x01@\0\0\x1b\x04\0\x11[construc\ +tor]glxf\x01\x1c\x01h\x06\x01p\x0c\x01@\x01\x04self\x1d\0\x1e\x04\0\x18[method]g\ +lxf.list-assets\x01\x1f\x01@\x02\x04self\x1d\x05value\x10\x01\0\x04\0\x16[method\ +]glxf.add-asset\x01\x20\x04\0\x19[method]glxf.remove-asset\x01\x20\x01@\x01\x04s\ +elf\x1d\0\x13\x04\0\x17[method]glxf.list-nodes\x01!\x01@\x02\x04self\x1d\x05valu\ +e\x16\x01\0\x04\0\x15[method]glxf.add-node\x01\"\x04\0\x18[method]glxf.remove-no\ +de\x01\"\x01i\x1a\x01p#\x01@\x01\x04self\x1d\0$\x04\0\x18[method]glxf.list-scene\ +s\x01%\x01h\x1a\x01@\x02\x04self\x1d\x05value&\x01\0\x04\0\x16[method]glxf.add-s\ +cene\x01'\x04\0\x19[method]glxf.remove-scene\x01'\x01k#\x01@\x01\x04self\x1d\0(\x04\ +\0\x19[method]glxf.active-scene\x01)\x01k&\x01@\x02\x04self\x1d\x05value*\x01\0\x04\ +\0\x1d[method]glxf.set-active-scene\x01+\x04\0\x1a[method]glxf.default-scene\x01\ +)\x04\0\x1e[method]glxf.set-default-scene\x01'\x01h\x01\x01@\x01\x08document,\0\x09\ +\x04\0\x17[constructor]asset-gltf\x01-\x01i\x01\x01@\x01\x04self\x0d\0.\x04\0\x1b\ +[method]asset-gltf.document\x01/\x01i\x03\x01p0\x01@\x01\x04self\x0d\01\x04\0\x1d\ +[method]asset-gltf.list-nodes\x012\x01h\x03\x01@\x02\x04self\x0d\x05value3\x01\0\ +\x04\0\x1b[method]asset-gltf.add-node\x014\x04\0\x1e[method]asset-gltf.remove-no\ +de\x014\x01@\x01\x08document\x1d\0\x0a\x04\0\x17[constructor]asset-glxf\x015\x01\ +@\x01\x04self\x0e\0\x1b\x04\0\x1b[method]asset-glxf.document\x016\x01@\x01\x04se\ +lf\x0e\0\x13\x04\0\x1d[method]asset-glxf.list-nodes\x017\x01@\x02\x04self\x0e\x05\ +value\x16\x01\0\x04\0\x1b[method]asset-glxf.add-node\x018\x04\0\x1e[method]asset\ +-glxf.remove-node\x018\x01@\0\0\x12\x04\0\x16[constructor]glxf-node\x019\x01@\x01\ +\x04self\x16\0y\x04\0\x14[method]glxf-node.id\x01:\x01@\x01\x04self\x16\0s\x04\0\ +\x16[method]glxf-node.name\x01;\x01@\x02\x04self\x16\x05values\x01\0\x04\0\x1a[m\ +ethod]glxf-node.set-name\x01<\x01@\x01\x04self\x16\0\x05\x04\0\x1b[method]glxf-n\ +ode.transform\x01=\x01@\x02\x04self\x16\x05value\x05\x01\0\x04\0\x1f[method]glxf\ +-node.set-transform\x01>\x01k\x12\x01@\x01\x04self\x16\0?\x04\0\x18[method]glxf-\ +node.parent\x01@\x01k\x15\x01@\x01\x04self\x16\0\xc1\0\x04\0\x1a[method]glxf-nod\ +e.children\x01B\x01k\x19\x01@\x02\x04self\x16\x05value\xc3\0\x01\0\x04\0\x1e[met\ +hod]glxf-node.set-children\x01D\x01@\0\0#\x04\0\x17[constructor]glxf-scene\x01E\x01\ +@\x01\x04self&\0y\x04\0\x15[method]glxf-scene.id\x01F\x01@\x01\x04self&\0s\x04\0\ +\x17[method]glxf-scene.name\x01G\x01@\x02\x04self&\x05values\x01\0\x04\0\x1b[met\ +hod]glxf-scene.set-name\x01H\x01@\x01\x04self&\0\x13\x04\0\x18[method]glxf-scene\ +.nodes\x01I\x01@\x02\x04self&\x04node\x16\x01\0\x04\0\x1b[method]glxf-scene.add-\ +node\x01J\x04\0\x1e[method]glxf-scene.remove-node\x01J\x04\0\x08get-root\x01\x1c\ +\x03\x01\x10wired:scene/glxf\x05\x18\x01B\x07\x04\0\x06script\x03\x01\x01i\0\x01\ +@\0\0\x01\x04\0\x13[constructor]script\x01\x02\x01h\0\x01@\x02\x04self\x03\x05de\ +ltav\x01\0\x04\0\x15[method]script.update\x01\x04\x04\x01\x12wired:script/types\x05\ +\x19\x04\x01\x13unavi:system/script\x04\0\x0b\x0c\x01\0\x06script\x03\0\0\0G\x09\ +producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rus\ +t\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/unavi-system/src/wired_math_impls.rs b/wasm/unavi-system/src/wired_math_impls.rs index 6026ad884..41d58544e 100644 --- a/wasm/unavi-system/src/wired_math_impls.rs +++ b/wasm/unavi-system/src/wired_math_impls.rs @@ -1,6 +1,28 @@ #![allow(dead_code)] -use crate::bindings::wired::math::types::{Quat, Transform, Vec3}; +use crate::bindings::wired::math::types::{Quat, Transform, Vec2, Vec3}; + +impl Vec2 { + pub fn new(x: f32, y: f32) -> Self { + Self { x, y } + } + + pub fn splat(v: f32) -> Self { + Self::new(v, v) + } +} + +impl Default for Vec2 { + fn default() -> Self { + Self { x: 0.0, y: 0.0 } + } +} + +impl PartialEq for Vec2 { + fn eq(&self, other: &Self) -> bool { + (self.x == other.x) && (self.y == other.y) + } +} impl Vec3 { pub fn new(x: f32, y: f32, z: f32) -> Self { diff --git a/wasm/unavi-ui/Cargo.toml b/wasm/unavi-ui/Cargo.toml index ec73b4232..dde68ca70 100644 --- a/wasm/unavi-ui/Cargo.toml +++ b/wasm/unavi-ui/Cargo.toml @@ -19,7 +19,9 @@ package = "unavi:ui" world = "guest" [package.metadata.component.target.dependencies] +"unavi:shapes" = { path = "../unavi-shapes/wit" } "wired:input" = { path = "../../wired-protocol/spatial/wit/wired-input" } +"wired:log" = { path = "../../wired-protocol/spatial/wit/wired-log" } "wired:math" = { path = "../../wired-protocol/spatial/wit/wired-math" } "wired:physics" = { path = "../../wired-protocol/spatial/wit/wired-physics" } "wired:scene" = { path = "../../wired-protocol/spatial/wit/wired-scene" } diff --git a/wasm/unavi-ui/src/bindings.rs b/wasm/unavi-ui/src/bindings.rs index 10fb7d86d..03d7542ce 100644 --- a/wasm/unavi-ui/src/bindings.rs +++ b/wasm/unavi-ui/src/bindings.rs @@ -1,6 +1,1045 @@ // Generated by `wit-bindgen` 0.25.0. DO NOT EDIT! // Options used: #[allow(dead_code)] +pub mod unavi { + #[allow(dead_code)] + pub mod shapes { + #[allow(dead_code, clippy::all)] + pub mod api { + #[used] + #[doc(hidden)] + #[cfg(target_arch = "wasm32")] + static __FORCE_SECTION_REF: fn() = + super::super::super::__link_custom_section_describing_imports; + use super::super::super::_rt; + pub type Vec2 = super::super::super::wired::math::types::Vec2; + pub type Vec3 = super::super::super::wired::math::types::Vec3; + pub type Mesh = super::super::super::wired::scene::mesh::Mesh; + pub type Node = super::super::super::wired::scene::node::Node; + /// 2D + + #[derive(Debug)] + #[repr(transparent)] + pub struct Rectangle { + handle: _rt::Resource, + } + + impl Rectangle { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for Rectangle { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-drop]rectangle"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + /// 3D + + #[derive(Debug)] + #[repr(transparent)] + pub struct Cylinder { + handle: _rt::Resource, + } + + impl Cylinder { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for Cylinder { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-drop]cylinder"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + #[derive(Debug)] + #[repr(transparent)] + pub struct Cuboid { + handle: _rt::Resource, + } + + impl Cuboid { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for Cuboid { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-drop]cuboid"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + #[repr(C)] + #[derive(Clone, Copy)] + pub struct SphereIco { + pub subdivisions: u8, + } + impl ::core::fmt::Debug for SphereIco { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("SphereIco") + .field("subdivisions", &self.subdivisions) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct SphereUv { + pub sectors: u8, + pub stacks: u8, + } + impl ::core::fmt::Debug for SphereUv { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("SphereUv") + .field("sectors", &self.sectors) + .field("stacks", &self.stacks) + .finish() + } + } + #[derive(Clone, Copy)] + pub enum SphereKind { + /// An icosphere, a spherical mesh that consists of similar sized triangles. + Ico(SphereIco), + /// A UV sphere, a spherical mesh that consists of quadrilaterals + Uv(SphereUv), + } + impl ::core::fmt::Debug for SphereKind { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + match self { + SphereKind::Ico(e) => f.debug_tuple("SphereKind::Ico").field(e).finish(), + SphereKind::Uv(e) => f.debug_tuple("SphereKind::Uv").field(e).finish(), + } + } + } + + #[derive(Debug)] + #[repr(transparent)] + pub struct Sphere { + handle: _rt::Resource, + } + + impl Sphere { + #[doc(hidden)] + pub unsafe fn from_handle(handle: u32) -> Self { + Self { + handle: _rt::Resource::from_handle(handle), + } + } + + #[doc(hidden)] + pub fn take_handle(&self) -> u32 { + _rt::Resource::take_handle(&self.handle) + } + + #[doc(hidden)] + pub fn handle(&self) -> u32 { + _rt::Resource::handle(&self.handle) + } + } + + unsafe impl _rt::WasmResource for Sphere { + #[inline] + unsafe fn drop(_handle: u32) { + #[cfg(not(target_arch = "wasm32"))] + unreachable!(); + + #[cfg(target_arch = "wasm32")] + { + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[resource-drop]sphere"] + fn drop(_: u32); + } + + drop(_handle); + } + } + } + + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn new(size: Vec2) -> Self { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = size; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[constructor]rectangle"] + fn wit_import(_: f32, _: f32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: f32, _: f32) -> i32 { + unreachable!() + } + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0)); + Rectangle::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn size(&self) -> Vec2 { + unsafe { + #[repr(align(4))] + struct RetArea([::core::mem::MaybeUninit; 8]); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); + let ptr0 = ret_area.0.as_mut_ptr().cast::(); + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.size"] + fn wit_import(_: i32, _: *mut u8); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: *mut u8) { + unreachable!() + } + wit_import((self).handle() as i32, ptr0); + let l1 = *ptr0.add(0).cast::(); + let l2 = *ptr0.add(4).cast::(); + super::super::super::wired::math::types::Vec2 { x: l1, y: l2 } + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + pub fn set_size(&self, value: Vec2) { + unsafe { + let super::super::super::wired::math::types::Vec2 { x: x0, y: y0 } = value; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.set-size"] + fn wit_import(_: i32, _: f32, _: f32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: f32, _: f32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_f32(x0), _rt::as_f32(y0)); + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a mesh of this shape. + pub fn to_mesh(&self) -> Mesh { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-mesh"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh of this shape. + pub fn to_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Rectangle { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh and physics collider of this shape. + pub fn to_physics_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]rectangle.to-physics-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + pub fn new(radius: f32, height: f32) -> Self { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[constructor]cylinder"] + fn wit_import(_: f32, _: f32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: f32, _: f32) -> i32 { + unreachable!() + } + let ret = wit_import(_rt::as_f32(&radius), _rt::as_f32(&height)); + Cylinder::from_handle(ret as u32) + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + /// Whether to cap the ends of the cylinder. + pub fn cap(&self) -> bool { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.cap"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + _rt::bool_lift(ret as u8) + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + pub fn set_cap(&self, value: bool) { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.set-cap"] + fn wit_import(_: i32, _: i32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: i32) { + unreachable!() + } + wit_import( + (self).handle() as i32, + match &value { + true => 1, + false => 0, + }, + ); + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + pub fn height(&self) -> f32 { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.height"] + fn wit_import(_: i32) -> f32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> f32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + ret + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + pub fn set_height(&self, value: f32) { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.set-height"] + fn wit_import(_: i32, _: f32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: f32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_f32(&value)); + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + pub fn radius(&self) -> f32 { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.radius"] + fn wit_import(_: i32) -> f32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> f32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + ret + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + pub fn set_radius(&self, value: f32) { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.set-radius"] + fn wit_import(_: i32, _: f32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: f32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_f32(&value)); + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + /// The number of vertices used for the top and bottom of the cylinder. + pub fn resolution(&self) -> u8 { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.resolution"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + ret as u8 + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + pub fn set_resolution(&self, value: u8) { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.set-resolution"] + fn wit_import(_: i32, _: i32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: i32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_i32(&value)); + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + /// The number of segments along the height of the cylinder. + pub fn segments(&self) -> u8 { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.segments"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + ret as u8 + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + pub fn set_segments(&self, value: u8) { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.set-segments"] + fn wit_import(_: i32, _: i32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: i32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_i32(&value)); + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + /// Creates a mesh of this shape. + pub fn to_mesh(&self) -> Mesh { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.to-mesh"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh of this shape. + pub fn to_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.to-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Cylinder { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh and physics collider of this shape. + pub fn to_physics_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cylinder.to-physics-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Cuboid { + #[allow(unused_unsafe, clippy::all)] + pub fn new(size: Vec3) -> Self { + unsafe { + let super::super::super::wired::math::types::Vec3 { + x: x0, + y: y0, + z: z0, + } = size; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[constructor]cuboid"] + fn wit_import(_: f32, _: f32, _: f32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: f32, _: f32, _: f32) -> i32 { + unreachable!() + } + let ret = wit_import(_rt::as_f32(x0), _rt::as_f32(y0), _rt::as_f32(z0)); + Cuboid::from_handle(ret as u32) + } + } + } + impl Cuboid { + #[allow(unused_unsafe, clippy::all)] + pub fn size(&self) -> Vec3 { + unsafe { + #[repr(align(4))] + struct RetArea([::core::mem::MaybeUninit; 12]); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 12]); + let ptr0 = ret_area.0.as_mut_ptr().cast::(); + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cuboid.size"] + fn wit_import(_: i32, _: *mut u8); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: *mut u8) { + unreachable!() + } + wit_import((self).handle() as i32, ptr0); + let l1 = *ptr0.add(0).cast::(); + let l2 = *ptr0.add(4).cast::(); + let l3 = *ptr0.add(8).cast::(); + super::super::super::wired::math::types::Vec3 { + x: l1, + y: l2, + z: l3, + } + } + } + } + impl Cuboid { + #[allow(unused_unsafe, clippy::all)] + pub fn set_size(&self, value: Vec3) { + unsafe { + let super::super::super::wired::math::types::Vec3 { + x: x0, + y: y0, + z: z0, + } = value; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cuboid.set-size"] + fn wit_import(_: i32, _: f32, _: f32, _: f32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: f32, _: f32, _: f32) { + unreachable!() + } + wit_import( + (self).handle() as i32, + _rt::as_f32(x0), + _rt::as_f32(y0), + _rt::as_f32(z0), + ); + } + } + } + impl Cuboid { + #[allow(unused_unsafe, clippy::all)] + /// Creates a mesh of this shape. + pub fn to_mesh(&self) -> Mesh { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cuboid.to-mesh"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) + } + } + } + impl Cuboid { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh of this shape. + pub fn to_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cuboid.to-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Cuboid { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh and physics collider of this shape. + pub fn to_physics_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]cuboid.to-physics-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Sphere { + #[allow(unused_unsafe, clippy::all)] + pub fn new_ico(radius: f32) -> Sphere { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[static]sphere.new-ico"] + fn wit_import(_: f32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: f32) -> i32 { + unreachable!() + } + let ret = wit_import(_rt::as_f32(&radius)); + Sphere::from_handle(ret as u32) + } + } + } + impl Sphere { + #[allow(unused_unsafe, clippy::all)] + pub fn new_uv(radius: f32) -> Sphere { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[static]sphere.new-uv"] + fn wit_import(_: f32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: f32) -> i32 { + unreachable!() + } + let ret = wit_import(_rt::as_f32(&radius)); + Sphere::from_handle(ret as u32) + } + } + } + impl Sphere { + #[allow(unused_unsafe, clippy::all)] + pub fn radius(&self) -> f32 { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]sphere.radius"] + fn wit_import(_: i32) -> f32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> f32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + ret + } + } + } + impl Sphere { + #[allow(unused_unsafe, clippy::all)] + pub fn set_radius(&self, value: f32) { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]sphere.set-radius"] + fn wit_import(_: i32, _: f32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: f32) { + unreachable!() + } + wit_import((self).handle() as i32, _rt::as_f32(&value)); + } + } + } + impl Sphere { + #[allow(unused_unsafe, clippy::all)] + pub fn kind(&self) -> SphereKind { + unsafe { + #[repr(align(1))] + struct RetArea([::core::mem::MaybeUninit; 3]); + let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 3]); + let ptr0 = ret_area.0.as_mut_ptr().cast::(); + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]sphere.kind"] + fn wit_import(_: i32, _: *mut u8); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: *mut u8) { + unreachable!() + } + wit_import((self).handle() as i32, ptr0); + let l1 = i32::from(*ptr0.add(0).cast::()); + let v5 = match l1 { + 0 => { + let e5 = { + let l2 = i32::from(*ptr0.add(1).cast::()); + + SphereIco { + subdivisions: l2 as u8, + } + }; + SphereKind::Ico(e5) + } + n => { + debug_assert_eq!(n, 1, "invalid enum discriminant"); + let e5 = { + let l3 = i32::from(*ptr0.add(1).cast::()); + let l4 = i32::from(*ptr0.add(2).cast::()); + + SphereUv { + sectors: l3 as u8, + stacks: l4 as u8, + } + }; + SphereKind::Uv(e5) + } + }; + v5 + } + } + } + impl Sphere { + #[allow(unused_unsafe, clippy::all)] + pub fn set_kind(&self, value: SphereKind) { + unsafe { + let (result2_0, result2_1, result2_2) = match value { + SphereKind::Ico(e) => { + let SphereIco { + subdivisions: subdivisions0, + } = e; + + (0i32, _rt::as_i32(subdivisions0), 0i32) + } + SphereKind::Uv(e) => { + let SphereUv { + sectors: sectors1, + stacks: stacks1, + } = e; + + (1i32, _rt::as_i32(sectors1), _rt::as_i32(stacks1)) + } + }; + + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]sphere.set-kind"] + fn wit_import(_: i32, _: i32, _: i32, _: i32); + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32, _: i32, _: i32, _: i32) { + unreachable!() + } + wit_import((self).handle() as i32, result2_0, result2_1, result2_2); + } + } + } + impl Sphere { + #[allow(unused_unsafe, clippy::all)] + /// Creates a mesh of this shape. + pub fn to_mesh(&self) -> Mesh { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]sphere.to-mesh"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::mesh::Mesh::from_handle(ret as u32) + } + } + } + impl Sphere { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh of this shape. + pub fn to_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]sphere.to-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + impl Sphere { + #[allow(unused_unsafe, clippy::all)] + /// Creates a node with a mesh and physics collider of this shape. + pub fn to_physics_node(&self) -> Node { + unsafe { + #[cfg(target_arch = "wasm32")] + #[link(wasm_import_module = "unavi:shapes/api")] + extern "C" { + #[link_name = "[method]sphere.to-physics-node"] + fn wit_import(_: i32) -> i32; + } + + #[cfg(not(target_arch = "wasm32"))] + fn wit_import(_: i32) -> i32 { + unreachable!() + } + let ret = wit_import((self).handle() as i32); + super::super::super::wired::scene::node::Node::from_handle(ret as u32) + } + } + } + } + } +} +#[allow(dead_code)] pub mod wired { #[allow(dead_code)] pub mod input { @@ -906,6 +1945,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -4004,11 +5057,16 @@ mod _rt { let layout = alloc::Layout::from_size_align_unchecked(size, align); alloc::dealloc(ptr as *mut u8, layout); } - pub use alloc_crate::boxed::Box; - - #[cfg(target_arch = "wasm32")] - pub fn run_ctors_once() { - wit_bindgen_rt::run_ctors_once(); + pub unsafe fn bool_lift(val: u8) -> bool { + if cfg!(debug_assertions) { + match val { + 0 => false, + 1 => true, + _ => panic!("invalid bool discriminant"), + } + } else { + val != 0 + } } pub fn as_i32(t: T) -> i32 { @@ -4080,6 +5138,12 @@ mod _rt { self as i32 } } + pub use alloc_crate::boxed::Box; + + #[cfg(target_arch = "wasm32")] + pub fn run_ctors_once() { + wit_bindgen_rt::run_ctors_once(); + } pub use alloc_crate::alloc; extern crate alloc as alloc_crate; } @@ -4117,111 +5181,146 @@ pub(crate) use __export_guest_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:guest:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 4651] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xaf#\x01A\x02\x01A\x1f\ -\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08mater\ -ial\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\x01h\x02\ -\x01@\x01\x04self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04self\x05\ -\0s\x04\0\x15[method]material.name\x01\x07\x01@\x02\x04self\x05\x05values\x01\0\x04\ -\0\x19[method]material.set-name\x01\x08\x01@\x01\x04self\x05\0\x01\x04\0\x16[met\ -hod]material.color\x01\x09\x01@\x02\x04self\x05\x05value\x01\x01\0\x04\0\x1a[met\ -hod]material.set-color\x01\x0a\x03\x01\x14wired:scene/material\x05\0\x02\x03\0\0\ -\x08material\x01B)\x02\x03\x02\x01\x01\x04\0\x08material\x03\0\0\x04\0\x09primit\ -ive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\x01@\x01\x04self\x04\0y\x04\0\x14[met\ -hod]primitive.id\x01\x05\x01i\x01\x01k\x06\x01@\x01\x04self\x04\0\x07\x04\0\x1a[\ -method]primitive.material\x01\x08\x01h\x01\x01k\x09\x01@\x02\x04self\x04\x05valu\ -e\x0a\x01\0\x04\0\x1e[method]primitive.set-material\x01\x0b\x01py\x01@\x02\x04se\ -lf\x04\x05value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\x01\ -@\x02\x04self\x04\x05value\x0e\x01\0\x04\0\x1d[method]primitive.set-normals\x01\x0f\ -\x04\0\x1f[method]primitive.set-positions\x01\x0f\x04\0\x19[method]primitive.set\ --uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\0\x11[constructor]mesh\x01\x11\x01h\x03\x01\ -@\x01\x04self\x12\0y\x04\0\x0f[method]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\ -\0\x11[method]mesh.name\x01\x14\x01@\x02\x04self\x12\x05values\x01\0\x04\0\x15[m\ -ethod]mesh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c\ -[method]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method\ -]mesh.create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d\ -[method]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x02\x01B\x06\ -\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01zv\x01\ -wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btranslation\x01\ -\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\x03\x02\x03\0\x02\x04\ -vec3\x02\x03\0\x02\x04quat\x01B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\ -\x03\x02\x01\x05\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand\ --side\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05\ -joint\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\ -\x04\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\ -\x06middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\ -\0\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\ -\x0d\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\ -\x01q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-typ\ -e\x03\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-e\ -vent\x03\0\x13\x03\x01\x11wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\ -\x01B\x0a\x02\x03\x02\x01\x07\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handle\ -r\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\x01h\ -\x02\x01k\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handle-inp\ -ut\x01\x07\x03\x01\x13wired:input/handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\ -\0\x04vec3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\ -\x0eshape-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06\ -sphere\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07d\ -ynamic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\ -\x05shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04\ -self\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05va\ -luev\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0fri\ -gid-body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\ -\x04self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\ -\x05value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[met\ -hod]rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\ -\x01\x13wired:physics/types\x05\x09\x02\x03\0\x01\x04mesh\x02\x03\0\x04\x0dinput\ --handler\x02\x03\0\x02\x09transform\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0ar\ -igid-body\x01BB\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\ -\0\x0dinput-handler\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\ -\x03\x02\x01\x0d\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-\ -body\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor\ -]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01\ -@\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05\ -values\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\ -\x02\x03\0\x06\x04node\x01B\x1c\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\x09\ -container\x03\x01\x01m\x03\x06center\x03end\x05start\x04\0\x09alignment\x03\0\x03\ -\x01i\x02\x01@\0\0\x05\x04\0\x16[constructor]container\x01\x06\x01h\x02\x01i\x01\ -\x01@\x01\x04self\x07\0\x08\x04\0\x16[method]container.root\x01\x09\x01@\x01\x04\ -self\x07\0v\x04\0\x17[method]container.x-len\x01\x0a\x04\0\x17[method]container.\ -y-len\x01\x0a\x04\0\x17[method]container.z-len\x01\x0a\x01@\x02\x04self\x07\x05v\ -aluev\x01\0\x04\0\x1b[method]container.set-x-len\x01\x0b\x04\0\x1b[method]contai\ -ner.set-y-len\x01\x0b\x04\0\x1b[method]container.set-z-len\x01\x0b\x01@\x01\x04s\ -elf\x07\0\x04\x04\0\x19[method]container.align-x\x01\x0c\x04\0\x19[method]contai\ -ner.align-y\x01\x0c\x04\0\x19[method]container.align-z\x01\x0c\x01@\x02\x04self\x07\ -\x05value\x04\x01\0\x04\0\x1d[method]container.set-align-x\x01\x0d\x04\0\x1d[met\ -hod]container.set-align-y\x01\x0d\x04\0\x1d[method]container.set-align-z\x01\x0d\ -\x04\x01\x12unavi:ui/container\x05\x11\x02\x03\0\x07\x09container\x01B\x0a\x02\x03\ -\x02\x01\x12\x04\0\x09container\x03\0\0\x04\0\x06button\x03\x01\x01i\x02\x01@\0\0\ -\x03\x04\0\x13[constructor]button\x01\x04\x01h\x02\x01i\x01\x01@\x01\x04self\x05\ -\0\x06\x04\0\x13[method]button.root\x01\x07\x04\x01\x0funavi:ui/button\x05\x13\x01\ -B\x1d\x02\x03\x02\x01\x12\x04\0\x09container\x03\0\0\x04\0\x04grid\x03\x01\x01m\x07\ -\x01x\x01y\x01z\x02xy\x02xz\x02yz\x03xyz\x04\0\x09direction\x03\0\x03\x01i\x02\x01\ -@\0\0\x05\x04\0\x11[constructor]grid\x01\x06\x01h\x02\x01i\x01\x01@\x01\x04self\x07\ -\0\x08\x04\0\x11[method]grid.root\x01\x09\x01@\x01\x04self\x07\0y\x04\0\x14[meth\ -od]grid.columns\x01\x0a\x01@\x02\x04self\x07\x05valuey\x01\0\x04\0\x18[method]gr\ -id.set-columns\x01\x0b\x04\0\x11[method]grid.rows\x01\x0a\x04\0\x15[method]grid.\ -set-rows\x01\x0b\x01@\x01\x04self\x07\0\x04\x04\0\x16[method]grid.direction\x01\x0c\ -\x01@\x02\x04self\x07\x05value\x04\x01\0\x04\0\x1a[method]grid.set-direction\x01\ -\x0d\x01h\x01\x01@\x02\x04self\x07\x04item\x0e\x01\0\x04\0\x15[method]grid.add-i\ -tem\x01\x0f\x04\0\x18[method]grid.remove-item\x01\x0f\x01p\x08\x01@\x01\x04self\x07\ -\0\x10\x04\0\x17[method]grid.list-items\x01\x11\x04\x01\x0dunavi:ui/grid\x05\x14\ -\x04\x01\x0eunavi:ui/guest\x04\0\x0b\x0b\x01\0\x05guest\x03\0\0\0G\x09producers\x01\ -\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 6315] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xaf0\x01A\x02\x01A\"\ +\x01B\x08\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\ +\0\x04vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01\ +r\x03\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\ +\x03\x01\x10wired:math/types\x05\0\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\ +\0\x05color\x03\0\0\x04\0\x08material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[co\ +nstructor]material\x01\x04\x01h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]mat\ +erial.id\x01\x06\x01@\x01\x04self\x05\0s\x04\0\x15[method]material.name\x01\x07\x01\ +@\x02\x04self\x05\x05values\x01\0\x04\0\x19[method]material.set-name\x01\x08\x01\ +@\x01\x04self\x05\0\x01\x04\0\x16[method]material.color\x01\x09\x01@\x02\x04self\ +\x05\x05value\x01\x01\0\x04\0\x1a[method]material.set-color\x01\x0a\x03\x01\x14w\ +ired:scene/material\x05\x01\x02\x03\0\x01\x08material\x01B)\x02\x03\x02\x01\x02\x04\ +\0\x08material\x03\0\0\x04\0\x09primitive\x03\x01\x04\0\x04mesh\x03\x01\x01h\x02\ +\x01@\x01\x04self\x04\0y\x04\0\x14[method]primitive.id\x01\x05\x01i\x01\x01k\x06\ +\x01@\x01\x04self\x04\0\x07\x04\0\x1a[method]primitive.material\x01\x08\x01h\x01\ +\x01k\x09\x01@\x02\x04self\x04\x05value\x0a\x01\0\x04\0\x1e[method]primitive.set\ +-material\x01\x0b\x01py\x01@\x02\x04self\x04\x05value\x0c\x01\0\x04\0\x1d[method\ +]primitive.set-indices\x01\x0d\x01pv\x01@\x02\x04self\x04\x05value\x0e\x01\0\x04\ +\0\x1d[method]primitive.set-normals\x01\x0f\x04\0\x1f[method]primitive.set-posit\ +ions\x01\x0f\x04\0\x19[method]primitive.set-uvs\x01\x0f\x01i\x03\x01@\0\0\x10\x04\ +\0\x11[constructor]mesh\x01\x11\x01h\x03\x01@\x01\x04self\x12\0y\x04\0\x0f[metho\ +d]mesh.id\x01\x13\x01@\x01\x04self\x12\0s\x04\0\x11[method]mesh.name\x01\x14\x01\ +@\x02\x04self\x12\x05values\x01\0\x04\0\x15[method]mesh.set-name\x01\x15\x01i\x02\ +\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c[method]mesh.list-primitives\x01\x18\ +\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method]mesh.create-primitive\x01\x19\x01@\x02\ +\x04self\x12\x05value\x16\x01\0\x04\0\x1d[method]mesh.remove-primitive\x01\x1a\x03\ +\x01\x10wired:scene/mesh\x05\x03\x02\x03\0\0\x04vec3\x02\x03\0\0\x04quat\x01B\x15\ +\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04quat\x03\ +\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0btransl\ +ation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03tip\x07\ +\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\x01k\x07\ +\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\x06lit\ +tle\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01r\x02\x06\ +origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\x01\x0bo\ +rientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\0\x03r\ +ay\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02idw\x05i\ +nput\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11wired:\ +input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\x02\x03\x02\x01\x07\x04\ +\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\x04\ +\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\0\ +\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/ha\ +ndler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x04\0\x08collid\ +er\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01q\ +\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x09\x02\x03\0\x02\x04mesh\x02\x03\0\x04\x0dinput-handler\x02\x03\0\0\x09transfo\ +rm\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-body\x01BB\x02\x03\x02\x01\x0a\ +\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0dinput-handler\x03\0\x02\x02\x03\ +\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0d\x04\0\x08collider\x03\ +\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\x01\x01\ +i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\ +\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[method]no\ +de.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]node.set-n\ +ame\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.children\x01\ +\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add-child\x01\ +\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\ +\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\0\x16[metho\ +d]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\0\x1a[metho\ +d]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11\ +[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\ +\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\ +\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\ +\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01k$\x01@\x01\ +\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04\ +self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\x03\x01k\ +*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\x03\x01k\ +-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-handler\x01\ +/\x03\x01\x10wired:scene/node\x05\x0f\x02\x03\0\0\x04vec2\x02\x03\0\x06\x04node\x01\ +BY\x02\x03\x02\x01\x10\x04\0\x04vec2\x03\0\0\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\ +\0\x02\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\x04\x02\x03\x02\x01\x11\x04\0\x04\ +node\x03\0\x06\x04\0\x09rectangle\x03\x01\x04\0\x08cylinder\x03\x01\x04\0\x06cub\ +oid\x03\x01\x01r\x01\x0csubdivisions}\x04\0\x0asphere-ico\x03\0\x0b\x01r\x02\x07\ +sectors}\x06stacks}\x04\0\x09sphere-uv\x03\0\x0d\x01q\x02\x03ico\x01\x0c\0\x02uv\ +\x01\x0e\0\x04\0\x0bsphere-kind\x03\0\x0f\x04\0\x06sphere\x03\x01\x01i\x08\x01@\x01\ +\x04size\x01\0\x12\x04\0\x16[constructor]rectangle\x01\x13\x01h\x08\x01@\x01\x04\ +self\x14\0\x01\x04\0\x16[method]rectangle.size\x01\x15\x01@\x02\x04self\x14\x05v\ +alue\x01\x01\0\x04\0\x1a[method]rectangle.set-size\x01\x16\x01i\x05\x01@\x01\x04\ +self\x14\0\x17\x04\0\x19[method]rectangle.to-mesh\x01\x18\x01i\x07\x01@\x01\x04s\ +elf\x14\0\x19\x04\0\x19[method]rectangle.to-node\x01\x1a\x04\0![method]rectangle\ +.to-physics-node\x01\x1a\x01i\x09\x01@\x02\x06radiusv\x06heightv\0\x1b\x04\0\x15\ +[constructor]cylinder\x01\x1c\x01h\x09\x01@\x01\x04self\x1d\0\x7f\x04\0\x14[meth\ +od]cylinder.cap\x01\x1e\x01@\x02\x04self\x1d\x05value\x7f\x01\0\x04\0\x18[method\ +]cylinder.set-cap\x01\x1f\x01@\x01\x04self\x1d\0v\x04\0\x17[method]cylinder.heig\ +ht\x01\x20\x01@\x02\x04self\x1d\x05valuev\x01\0\x04\0\x1b[method]cylinder.set-he\ +ight\x01!\x04\0\x17[method]cylinder.radius\x01\x20\x04\0\x1b[method]cylinder.set\ +-radius\x01!\x01@\x01\x04self\x1d\0}\x04\0\x1b[method]cylinder.resolution\x01\"\x01\ +@\x02\x04self\x1d\x05value}\x01\0\x04\0\x1f[method]cylinder.set-resolution\x01#\x04\ +\0\x19[method]cylinder.segments\x01\"\x04\0\x1d[method]cylinder.set-segments\x01\ +#\x01@\x01\x04self\x1d\0\x17\x04\0\x18[method]cylinder.to-mesh\x01$\x01@\x01\x04\ +self\x1d\0\x19\x04\0\x18[method]cylinder.to-node\x01%\x04\0\x20[method]cylinder.\ +to-physics-node\x01%\x01i\x0a\x01@\x01\x04size\x03\0&\x04\0\x13[constructor]cubo\ +id\x01'\x01h\x0a\x01@\x01\x04self(\0\x03\x04\0\x13[method]cuboid.size\x01)\x01@\x02\ +\x04self(\x05value\x03\x01\0\x04\0\x17[method]cuboid.set-size\x01*\x01@\x01\x04s\ +elf(\0\x17\x04\0\x16[method]cuboid.to-mesh\x01+\x01@\x01\x04self(\0\x19\x04\0\x16\ +[method]cuboid.to-node\x01,\x04\0\x1e[method]cuboid.to-physics-node\x01,\x01i\x11\ +\x01@\x01\x06radiusv\0-\x04\0\x16[static]sphere.new-ico\x01.\x04\0\x15[static]sp\ +here.new-uv\x01.\x01h\x11\x01@\x01\x04self/\0v\x04\0\x15[method]sphere.radius\x01\ +0\x01@\x02\x04self/\x05valuev\x01\0\x04\0\x19[method]sphere.set-radius\x011\x01@\ +\x01\x04self/\0\x10\x04\0\x13[method]sphere.kind\x012\x01@\x02\x04self/\x05value\ +\x10\x01\0\x04\0\x17[method]sphere.set-kind\x013\x01@\x01\x04self/\0\x17\x04\0\x16\ +[method]sphere.to-mesh\x014\x01@\x01\x04self/\0\x19\x04\0\x16[method]sphere.to-n\ +ode\x015\x04\0\x1e[method]sphere.to-physics-node\x015\x03\x01\x10unavi:shapes/ap\ +i\x05\x12\x01B\x1c\x02\x03\x02\x01\x11\x04\0\x04node\x03\0\0\x04\0\x09container\x03\ +\x01\x01m\x03\x06center\x03end\x05start\x04\0\x09alignment\x03\0\x03\x01i\x02\x01\ +@\0\0\x05\x04\0\x16[constructor]container\x01\x06\x01h\x02\x01i\x01\x01@\x01\x04\ +self\x07\0\x08\x04\0\x16[method]container.root\x01\x09\x01@\x01\x04self\x07\0v\x04\ +\0\x17[method]container.x-len\x01\x0a\x04\0\x17[method]container.y-len\x01\x0a\x04\ +\0\x17[method]container.z-len\x01\x0a\x01@\x02\x04self\x07\x05valuev\x01\0\x04\0\ +\x1b[method]container.set-x-len\x01\x0b\x04\0\x1b[method]container.set-y-len\x01\ +\x0b\x04\0\x1b[method]container.set-z-len\x01\x0b\x01@\x01\x04self\x07\0\x04\x04\ +\0\x19[method]container.align-x\x01\x0c\x04\0\x19[method]container.align-y\x01\x0c\ +\x04\0\x19[method]container.align-z\x01\x0c\x01@\x02\x04self\x07\x05value\x04\x01\ +\0\x04\0\x1d[method]container.set-align-x\x01\x0d\x04\0\x1d[method]container.set\ +-align-y\x01\x0d\x04\0\x1d[method]container.set-align-z\x01\x0d\x04\x01\x12unavi\ +:ui/container\x05\x13\x02\x03\0\x08\x09container\x01B\x0a\x02\x03\x02\x01\x14\x04\ +\0\x09container\x03\0\0\x04\0\x06button\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x13[\ +constructor]button\x01\x04\x01h\x02\x01i\x01\x01@\x01\x04self\x05\0\x06\x04\0\x13\ +[method]button.root\x01\x07\x04\x01\x0funavi:ui/button\x05\x15\x01B\x1d\x02\x03\x02\ +\x01\x14\x04\0\x09container\x03\0\0\x04\0\x04grid\x03\x01\x01m\x07\x01x\x01y\x01\ +z\x02xy\x02xz\x02yz\x03xyz\x04\0\x09direction\x03\0\x03\x01i\x02\x01@\0\0\x05\x04\ +\0\x11[constructor]grid\x01\x06\x01h\x02\x01i\x01\x01@\x01\x04self\x07\0\x08\x04\ +\0\x11[method]grid.root\x01\x09\x01@\x01\x04self\x07\0y\x04\0\x14[method]grid.co\ +lumns\x01\x0a\x01@\x02\x04self\x07\x05valuey\x01\0\x04\0\x18[method]grid.set-col\ +umns\x01\x0b\x04\0\x11[method]grid.rows\x01\x0a\x04\0\x15[method]grid.set-rows\x01\ +\x0b\x01@\x01\x04self\x07\0\x04\x04\0\x16[method]grid.direction\x01\x0c\x01@\x02\ +\x04self\x07\x05value\x04\x01\0\x04\0\x1a[method]grid.set-direction\x01\x0d\x01h\ +\x01\x01@\x02\x04self\x07\x04item\x0e\x01\0\x04\0\x15[method]grid.add-item\x01\x0f\ +\x04\0\x18[method]grid.remove-item\x01\x0f\x01p\x08\x01@\x01\x04self\x07\0\x10\x04\ +\0\x17[method]grid.list-items\x01\x11\x04\x01\x0dunavi:ui/grid\x05\x16\x04\x01\x0e\ +unavi:ui/guest\x04\0\x0b\x0b\x01\0\x05guest\x03\0\0\0G\x09producers\x01\x0cproce\ +ssed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wasm/unavi-ui/wit/world.wit b/wasm/unavi-ui/wit/world.wit index 9269643c1..c7df32369 100644 --- a/wasm/unavi-ui/wit/world.wit +++ b/wasm/unavi-ui/wit/world.wit @@ -1,6 +1,8 @@ package unavi:ui; world guest { + import unavi:shapes/api; + export container; export button; export grid; diff --git a/wasm/unavi-vscreen/Cargo.toml b/wasm/unavi-vscreen/Cargo.toml index d2740cbcc..64d1e3580 100644 --- a/wasm/unavi-vscreen/Cargo.toml +++ b/wasm/unavi-vscreen/Cargo.toml @@ -17,8 +17,10 @@ package = "unavi:vscreen" [package.metadata.component.target.dependencies] "unavi:scene" = { path = "../unavi-scene/wit" } +"unavi:shapes" = { path = "../unavi-shapes/wit" } "unavi:ui" = { path = "../unavi-ui/wit" } "wired:input" = { path = "../../wired-protocol/spatial/wit/wired-input" } +"wired:log" = { path = "../../wired-protocol/spatial/wit/wired-log" } "wired:math" = { path = "../../wired-protocol/spatial/wit/wired-math" } "wired:physics" = { path = "../../wired-protocol/spatial/wit/wired-physics" } "wired:scene" = { path = "../../wired-protocol/spatial/wit/wired-scene" } diff --git a/wasm/unavi-vscreen/src/bindings.rs b/wasm/unavi-vscreen/src/bindings.rs index 297a0e95f..386ba70ce 100644 --- a/wasm/unavi-vscreen/src/bindings.rs +++ b/wasm/unavi-vscreen/src/bindings.rs @@ -906,6 +906,20 @@ pub mod wired { super::super::super::__link_custom_section_describing_imports; #[repr(C)] #[derive(Clone, Copy)] + pub struct Vec2 { + pub x: f32, + pub y: f32, + } + impl ::core::fmt::Debug for Vec2 { + fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { + f.debug_struct("Vec2") + .field("x", &self.x) + .field("y", &self.y) + .finish() + } + } + #[repr(C)] + #[derive(Clone, Copy)] pub struct Vec3 { pub x: f32, pub y: f32, @@ -3394,8 +3408,8 @@ pub(crate) use __export_lib_impl as export; #[cfg(target_arch = "wasm32")] #[link_section = "component-type:wit-bindgen:0.25.0:lib:encoded world"] #[doc(hidden)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 3818] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xf0\x1c\x01A\x02\x01\ +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 3837] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x83\x1d\x01A\x02\x01\ A\x1a\x01B\x11\x01r\x04\x01rv\x01gv\x01bv\x01av\x04\0\x05color\x03\0\0\x04\0\x08\ material\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x15[constructor]material\x01\x04\x01\ h\x02\x01@\x01\x04self\x05\0y\x04\0\x13[method]material.id\x01\x06\x01@\x01\x04s\ @@ -3417,71 +3431,71 @@ elf\x04\x05value\x0c\x01\0\x04\0\x1d[method]primitive.set-indices\x01\x0d\x01pv\ ethod]mesh.set-name\x01\x15\x01i\x02\x01p\x16\x01@\x01\x04self\x12\0\x17\x04\0\x1c\ [method]mesh.list-primitives\x01\x18\x01@\x01\x04self\x12\0\x16\x04\0\x1d[method\ ]mesh.create-primitive\x01\x19\x01@\x02\x04self\x12\x05value\x16\x01\0\x04\0\x1d\ -[method]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x02\x01B\x06\ -\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04vec3\x03\0\0\x01r\x04\x01xv\x01yv\x01zv\x01\ -wv\x04\0\x04quat\x03\0\x02\x01r\x03\x08rotation\x03\x05scale\x01\x0btranslation\x01\ -\x04\0\x09transform\x03\0\x04\x03\x01\x10wired:math/types\x05\x03\x02\x03\0\x02\x04\ -vec3\x02\x03\0\x02\x04quat\x01B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\ -\x03\x02\x01\x05\x04\0\x04quat\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand\ --side\x03\0\x04\x01r\x03\x0btranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05\ -joint\x03\0\x06\x01r\x04\x03tip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\ -\x04\0\x06finger\x03\0\x08\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\ -\x06middle\x09\x04ring\x09\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\ -\0\x04hand\x03\0\x0b\x01r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\ -\x0d\x01r\x03\x06origin\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\ -\x01q\x03\x04hand\x01\x0c\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-typ\ -e\x03\0\x11\x01r\x04\x02idw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-e\ -vent\x03\0\x13\x03\x01\x11wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\ -\x01B\x0a\x02\x03\x02\x01\x07\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handle\ -r\x03\x01\x01i\x02\x01@\0\0\x03\x04\0\x1a[constructor]input-handler\x01\x04\x01h\ -\x02\x01k\x01\x01@\x01\x04self\x05\0\x06\x04\0\"[method]input-handler.handle-inp\ -ut\x01\x07\x03\x01\x13wired:input/handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\ -\0\x04vec3\x03\0\0\x04\0\x08collider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\ -\x0eshape-cylinder\x03\0\x03\x01q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06\ -sphere\x01v\0\x04\0\x05shape\x03\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07d\ -ynamic\x05fixed\x09kinematic\x04\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\ -\x05shape\x06\0\x0a\x04\0\x15[constructor]collider\x01\x0b\x01h\x02\x01@\x01\x04\ -self\x0c\0v\x04\0\x18[method]collider.density\x01\x0d\x01@\x02\x04self\x0c\x05va\ -luev\x01\0\x04\0\x1c[method]collider.set-density\x01\x0e\x01i\x07\x01@\x01\x0fri\ -gid-body-type\x09\0\x0f\x04\0\x17[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\ -\x04self\x11\0\x01\x04\0\x19[method]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\ -\x05value\x01\x01\0\x04\0\x1d[method]rigid-body.set-angvel\x01\x13\x04\0\x19[met\ -hod]rigid-body.linvel\x01\x12\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\ -\x01\x13wired:physics/types\x05\x09\x02\x03\0\x01\x04mesh\x02\x03\0\x04\x0dinput\ --handler\x02\x03\0\x02\x09transform\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0ar\ -igid-body\x01BB\x02\x03\x02\x01\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\ -\0\x0dinput-handler\x03\0\x02\x02\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\ -\x03\x02\x01\x0d\x04\0\x08collider\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-\ -body\x03\0\x08\x04\0\x04node\x03\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor\ -]node\x01\x0c\x01h\x0a\x01@\x01\x04self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01\ -@\x01\x04self\x0d\0s\x04\0\x11[method]node.name\x01\x0f\x01@\x02\x04self\x0d\x05\ -values\x01\0\x04\0\x15[method]node.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\ -\0\x11\x04\0\x15[method]node.children\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\ -\0\x04\0\x16[method]node.add-child\x01\x13\x04\0\x19[method]node.remove-child\x01\ -\x13\x01k\x0b\x01@\x01\x04self\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01\ -@\x01\x04self\x0d\0\x05\x04\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\ -\x0d\x05value\x05\x01\0\x04\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01\ -k\x18\x01@\x01\x04self\x0d\0\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01\ -k\x1b\x01@\x02\x04self\x0d\x05value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\ -\x1d\x01i\x07\x01k\x1e\x01@\x01\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\ -\x01\x20\x01h\x07\x01k!\x01@\x02\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]n\ -ode.set-collider\x01#\x01i\x09\x01k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]no\ -de.rigid-body\x01&\x01h\x09\x01k'\x01@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b\ -[method]node.set-rigid-body\x01)\x01i\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a\ -[method]node.input-handler\x01,\x01h\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\ -\0\x04\0\x1e[method]node.set-input-handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\ -\x02\x03\0\x06\x04node\x01B\x19\x02\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\x06\ -screen\x03\x01\x04\0\x06module\x03\x01\x01i\x02\x01@\0\0\x04\x04\0\x13[construct\ -or]screen\x01\x05\x01h\x02\x01i\x03\x01@\x02\x04self\x06\x06module\x07\x01\0\x04\ -\0\x19[method]screen.add-module\x01\x08\x01@\x01\x04self\x06\0\x7f\x04\0\x16[met\ -hod]screen.visible\x01\x09\x01@\x02\x04self\x06\x05value\x7f\x01\0\x04\0\x1a[met\ -hod]screen.set-visible\x01\x0a\x01@\x02\x04self\x06\x05deltav\x01\0\x04\0\x15[me\ -thod]screen.update\x01\x0b\x01@\0\0\x07\x04\0\x13[constructor]module\x01\x0c\x01\ -h\x03\x01i\x01\x01@\x01\x04self\x0d\0\x0e\x04\0\x13[method]module.root\x01\x0f\x01\ -@\x02\x04self\x0d\x05deltav\x01\0\x04\0\x15[method]module.update\x01\x10\x04\x01\ -\x14unavi:vscreen/screen\x05\x11\x04\x01\x11unavi:vscreen/lib\x04\0\x0b\x09\x01\0\ -\x03lib\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.20\ -8.1\x10wit-bindgen-rust\x060.25.0"; +[method]mesh.remove-primitive\x01\x1a\x03\x01\x10wired:scene/mesh\x05\x02\x01B\x08\ +\x01r\x02\x01xv\x01yv\x04\0\x04vec2\x03\0\0\x01r\x03\x01xv\x01yv\x01zv\x04\0\x04\ +vec3\x03\0\x02\x01r\x04\x01xv\x01yv\x01zv\x01wv\x04\0\x04quat\x03\0\x04\x01r\x03\ +\x08rotation\x05\x05scale\x03\x0btranslation\x03\x04\0\x09transform\x03\0\x06\x03\ +\x01\x10wired:math/types\x05\x03\x02\x03\0\x02\x04vec3\x02\x03\0\x02\x04quat\x01\ +B\x15\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x02\x03\x02\x01\x05\x04\0\x04qua\ +t\x03\0\x02\x01m\x02\x04left\x05right\x04\0\x09hand-side\x03\0\x04\x01r\x03\x0bt\ +ranslation\x01\x08rotation\x03\x06radiusv\x04\0\x05joint\x03\0\x06\x01r\x04\x03t\ +ip\x07\x06distal\x07\x08proximal\x07\x0ametacarpal\x07\x04\0\x06finger\x03\0\x08\ +\x01k\x07\x01r\x09\x04side\x05\x05thumb\x09\x05index\x09\x06middle\x09\x04ring\x09\ +\x06little\x09\x04palm\x07\x05wrist\x07\x05elbow\x0a\x04\0\x04hand\x03\0\x0b\x01\ +r\x02\x06origin\x01\x0borientation\x03\x04\0\x03ray\x03\0\x0d\x01r\x03\x06origin\ +\x01\x0borientation\x03\x06radiusv\x04\0\x03tip\x03\0\x0f\x01q\x03\x04hand\x01\x0c\ +\0\x03ray\x01\x0e\0\x03tip\x01\x10\0\x04\0\x0ainput-type\x03\0\x11\x01r\x04\x02i\ +dw\x05input\x12\x08distancev\x05ordery\x04\0\x0binput-event\x03\0\x13\x03\x01\x11\ +wired:input/types\x05\x06\x02\x03\0\x03\x0binput-event\x01B\x0a\x02\x03\x02\x01\x07\ +\x04\0\x0binput-event\x03\0\0\x04\0\x0dinput-handler\x03\x01\x01i\x02\x01@\0\0\x03\ +\x04\0\x1a[constructor]input-handler\x01\x04\x01h\x02\x01k\x01\x01@\x01\x04self\x05\ +\0\x06\x04\0\"[method]input-handler.handle-input\x01\x07\x03\x01\x13wired:input/\ +handler\x05\x08\x01B\x1c\x02\x03\x02\x01\x04\x04\0\x04vec3\x03\0\0\x04\0\x08coll\ +ider\x03\x01\x01r\x02\x06heightv\x06radiusv\x04\0\x0eshape-cylinder\x03\0\x03\x01\ +q\x03\x06cuboid\x01\x01\0\x08cylinder\x01\x04\0\x06sphere\x01v\0\x04\0\x05shape\x03\ +\0\x05\x04\0\x0arigid-body\x03\x01\x01m\x03\x07dynamic\x05fixed\x09kinematic\x04\ +\0\x0frigid-body-type\x03\0\x08\x01i\x02\x01@\x01\x05shape\x06\0\x0a\x04\0\x15[c\ +onstructor]collider\x01\x0b\x01h\x02\x01@\x01\x04self\x0c\0v\x04\0\x18[method]co\ +llider.density\x01\x0d\x01@\x02\x04self\x0c\x05valuev\x01\0\x04\0\x1c[method]col\ +lider.set-density\x01\x0e\x01i\x07\x01@\x01\x0frigid-body-type\x09\0\x0f\x04\0\x17\ +[constructor]rigid-body\x01\x10\x01h\x07\x01@\x01\x04self\x11\0\x01\x04\0\x19[me\ +thod]rigid-body.angvel\x01\x12\x01@\x02\x04self\x11\x05value\x01\x01\0\x04\0\x1d\ +[method]rigid-body.set-angvel\x01\x13\x04\0\x19[method]rigid-body.linvel\x01\x12\ +\x04\0\x1d[method]rigid-body.set-linvel\x01\x13\x03\x01\x13wired:physics/types\x05\ +\x09\x02\x03\0\x01\x04mesh\x02\x03\0\x04\x0dinput-handler\x02\x03\0\x02\x09trans\ +form\x02\x03\0\x05\x08collider\x02\x03\0\x05\x0arigid-body\x01BB\x02\x03\x02\x01\ +\x0a\x04\0\x04mesh\x03\0\0\x02\x03\x02\x01\x0b\x04\0\x0dinput-handler\x03\0\x02\x02\ +\x03\x02\x01\x0c\x04\0\x09transform\x03\0\x04\x02\x03\x02\x01\x0d\x04\0\x08colli\ +der\x03\0\x06\x02\x03\x02\x01\x0e\x04\0\x0arigid-body\x03\0\x08\x04\0\x04node\x03\ +\x01\x01i\x0a\x01@\0\0\x0b\x04\0\x11[constructor]node\x01\x0c\x01h\x0a\x01@\x01\x04\ +self\x0d\0y\x04\0\x0f[method]node.id\x01\x0e\x01@\x01\x04self\x0d\0s\x04\0\x11[m\ +ethod]node.name\x01\x0f\x01@\x02\x04self\x0d\x05values\x01\0\x04\0\x15[method]no\ +de.set-name\x01\x10\x01p\x0b\x01@\x01\x04self\x0d\0\x11\x04\0\x15[method]node.ch\ +ildren\x01\x12\x01@\x02\x04self\x0d\x05value\x0d\x01\0\x04\0\x16[method]node.add\ +-child\x01\x13\x04\0\x19[method]node.remove-child\x01\x13\x01k\x0b\x01@\x01\x04s\ +elf\x0d\0\x14\x04\0\x13[method]node.parent\x01\x15\x01@\x01\x04self\x0d\0\x05\x04\ +\0\x16[method]node.transform\x01\x16\x01@\x02\x04self\x0d\x05value\x05\x01\0\x04\ +\0\x1a[method]node.set-transform\x01\x17\x01i\x01\x01k\x18\x01@\x01\x04self\x0d\0\ +\x19\x04\0\x11[method]node.mesh\x01\x1a\x01h\x01\x01k\x1b\x01@\x02\x04self\x0d\x05\ +value\x1c\x01\0\x04\0\x15[method]node.set-mesh\x01\x1d\x01i\x07\x01k\x1e\x01@\x01\ +\x04self\x0d\0\x1f\x04\0\x15[method]node.collider\x01\x20\x01h\x07\x01k!\x01@\x02\ +\x04self\x0d\x05value\"\x01\0\x04\0\x19[method]node.set-collider\x01#\x01i\x09\x01\ +k$\x01@\x01\x04self\x0d\0%\x04\0\x17[method]node.rigid-body\x01&\x01h\x09\x01k'\x01\ +@\x02\x04self\x0d\x05value(\x01\0\x04\0\x1b[method]node.set-rigid-body\x01)\x01i\ +\x03\x01k*\x01@\x01\x04self\x0d\0+\x04\0\x1a[method]node.input-handler\x01,\x01h\ +\x03\x01k-\x01@\x02\x04self\x0d\x05value.\x01\0\x04\0\x1e[method]node.set-input-\ +handler\x01/\x03\x01\x10wired:scene/node\x05\x0f\x02\x03\0\x06\x04node\x01B\x19\x02\ +\x03\x02\x01\x10\x04\0\x04node\x03\0\0\x04\0\x06screen\x03\x01\x04\0\x06module\x03\ +\x01\x01i\x02\x01@\0\0\x04\x04\0\x13[constructor]screen\x01\x05\x01h\x02\x01i\x03\ +\x01@\x02\x04self\x06\x06module\x07\x01\0\x04\0\x19[method]screen.add-module\x01\ +\x08\x01@\x01\x04self\x06\0\x7f\x04\0\x16[method]screen.visible\x01\x09\x01@\x02\ +\x04self\x06\x05value\x7f\x01\0\x04\0\x1a[method]screen.set-visible\x01\x0a\x01@\ +\x02\x04self\x06\x05deltav\x01\0\x04\0\x15[method]screen.update\x01\x0b\x01@\0\0\ +\x07\x04\0\x13[constructor]module\x01\x0c\x01h\x03\x01i\x01\x01@\x01\x04self\x0d\ +\0\x0e\x04\0\x13[method]module.root\x01\x0f\x01@\x02\x04self\x0d\x05deltav\x01\0\ +\x04\0\x15[method]module.update\x01\x10\x04\x01\x14unavi:vscreen/screen\x05\x11\x04\ +\x01\x11unavi:vscreen/lib\x04\0\x0b\x09\x01\0\x03lib\x03\0\0\0G\x09producers\x01\ +\x0cprocessed-by\x02\x0dwit-component\x070.208.1\x10wit-bindgen-rust\x060.25.0"; #[inline(never)] #[doc(hidden)] diff --git a/wired-protocol b/wired-protocol index e6bfdab6d..4d7f9a431 160000 --- a/wired-protocol +++ b/wired-protocol @@ -1 +1 @@ -Subproject commit e6bfdab6d5a0083633b055161a6a095c8b01e9f6 +Subproject commit 4d7f9a431f0dd6dfed1b94fe16a060ac437c23ac