Skip to main content

web_sys/features/
gen_XrFrame.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    #[wasm_bindgen(
9        extends = "::js_sys::Object",
10        js_name = "XRFrame",
11        typescript_type = "XRFrame"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `XrFrame` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRFrame)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `XrFrame`*"]
19    #[doc = ""]
20    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22    pub type XrFrame;
23    #[cfg(web_sys_unstable_apis)]
24    #[cfg(feature = "XrSession")]
25    #[wasm_bindgen(method, getter, js_class = "XRFrame", js_name = "session")]
26    #[doc = "Getter for the `session` field of this object."]
27    #[doc = ""]
28    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/session)"]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrSession`*"]
31    #[doc = ""]
32    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34    pub fn session(this: &XrFrame) -> XrSession;
35    #[cfg(web_sys_unstable_apis)]
36    #[wasm_bindgen(method, getter, js_class = "XRFrame", js_name = "predictedDisplayTime")]
37    #[doc = "Getter for the `predictedDisplayTime` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/predictedDisplayTime)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `XrFrame`*"]
42    #[doc = ""]
43    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    pub fn predicted_display_time(this: &XrFrame) -> f64;
46    #[cfg(web_sys_unstable_apis)]
47    #[cfg(feature = "XrJointSpace")]
48    #[wasm_bindgen(catch, method, js_class = "XRFrame", js_name = "fillJointRadii")]
49    #[doc = "The `fillJointRadii()` method."]
50    #[doc = ""]
51    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/fillJointRadii)"]
52    #[doc = ""]
53    #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrJointSpace`*"]
54    #[doc = ""]
55    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
56    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
57    pub fn fill_joint_radii_with_f32_slice(
58        this: &XrFrame,
59        joint_spaces: &[XrJointSpace],
60        radii: &mut [f32],
61    ) -> Result<bool, JsValue>;
62    #[cfg(web_sys_unstable_apis)]
63    #[cfg(feature = "XrJointSpace")]
64    #[wasm_bindgen(catch, method, js_class = "XRFrame", js_name = "fillJointRadii")]
65    #[doc = "The `fillJointRadii()` method."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/fillJointRadii)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrJointSpace`*"]
70    #[doc = ""]
71    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
72    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
73    pub fn fill_joint_radii_with_f32_array(
74        this: &XrFrame,
75        joint_spaces: &[XrJointSpace],
76        radii: &::js_sys::Float32Array,
77    ) -> Result<bool, JsValue>;
78    #[cfg(web_sys_unstable_apis)]
79    #[cfg(feature = "XrSpace")]
80    #[wasm_bindgen(catch, method, js_class = "XRFrame", js_name = "fillPoses")]
81    #[doc = "The `fillPoses()` method."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/fillPoses)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrSpace`*"]
86    #[doc = ""]
87    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
89    pub fn fill_poses_with_f32_slice(
90        this: &XrFrame,
91        spaces: &[XrSpace],
92        base_space: &XrSpace,
93        transforms: &mut [f32],
94    ) -> Result<bool, JsValue>;
95    #[cfg(web_sys_unstable_apis)]
96    #[cfg(feature = "XrSpace")]
97    #[wasm_bindgen(catch, method, js_class = "XRFrame", js_name = "fillPoses")]
98    #[doc = "The `fillPoses()` method."]
99    #[doc = ""]
100    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/fillPoses)"]
101    #[doc = ""]
102    #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrSpace`*"]
103    #[doc = ""]
104    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
105    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
106    pub fn fill_poses_with_f32_array(
107        this: &XrFrame,
108        spaces: &[XrSpace],
109        base_space: &XrSpace,
110        transforms: &::js_sys::Float32Array,
111    ) -> Result<bool, JsValue>;
112    #[cfg(web_sys_unstable_apis)]
113    #[cfg(all(feature = "XrJointPose", feature = "XrJointSpace", feature = "XrSpace",))]
114    #[wasm_bindgen(method, js_class = "XRFrame", js_name = "getJointPose")]
115    #[doc = "The `getJointPose()` method."]
116    #[doc = ""]
117    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/getJointPose)"]
118    #[doc = ""]
119    #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrJointPose`, `XrJointSpace`, `XrSpace`*"]
120    #[doc = ""]
121    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
122    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
123    pub fn get_joint_pose(
124        this: &XrFrame,
125        joint: &XrJointSpace,
126        base_space: &XrSpace,
127    ) -> Option<XrJointPose>;
128    #[cfg(web_sys_unstable_apis)]
129    #[cfg(all(feature = "XrPose", feature = "XrSpace",))]
130    #[wasm_bindgen(method, js_class = "XRFrame", js_name = "getPose")]
131    #[doc = "The `getPose()` method."]
132    #[doc = ""]
133    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/getPose)"]
134    #[doc = ""]
135    #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrPose`, `XrSpace`*"]
136    #[doc = ""]
137    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
138    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
139    pub fn get_pose(this: &XrFrame, space: &XrSpace, base_space: &XrSpace) -> Option<XrPose>;
140    #[cfg(web_sys_unstable_apis)]
141    #[cfg(all(feature = "XrReferenceSpace", feature = "XrViewerPose",))]
142    #[wasm_bindgen(method, js_class = "XRFrame", js_name = "getViewerPose")]
143    #[doc = "The `getViewerPose()` method."]
144    #[doc = ""]
145    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/XRFrame/getViewerPose)"]
146    #[doc = ""]
147    #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrReferenceSpace`, `XrViewerPose`*"]
148    #[doc = ""]
149    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
150    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
151    pub fn get_viewer_pose(
152        this: &XrFrame,
153        reference_space: &XrReferenceSpace,
154    ) -> Option<XrViewerPose>;
155}