web_sys/features/
gen_GpuPrimitiveState.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 (extends = :: js_sys :: Object , js_name = GPUPrimitiveState)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `GpuPrimitiveState` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"]
13    #[doc = ""]
14    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16    pub type GpuPrimitiveState;
17    #[cfg(web_sys_unstable_apis)]
18    #[cfg(feature = "GpuCullMode")]
19    #[doc = "Get the `cullMode` field of this object."]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `GpuCullMode`, `GpuPrimitiveState`*"]
22    #[doc = ""]
23    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
25    #[wasm_bindgen(method, getter = "cullMode")]
26    pub fn get_cull_mode(this: &GpuPrimitiveState) -> Option<GpuCullMode>;
27    #[cfg(web_sys_unstable_apis)]
28    #[cfg(feature = "GpuCullMode")]
29    #[doc = "Change the `cullMode` field of this object."]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `GpuCullMode`, `GpuPrimitiveState`*"]
32    #[doc = ""]
33    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
35    #[wasm_bindgen(method, setter = "cullMode")]
36    pub fn set_cull_mode(this: &GpuPrimitiveState, val: GpuCullMode);
37    #[cfg(web_sys_unstable_apis)]
38    #[cfg(feature = "GpuFrontFace")]
39    #[doc = "Get the `frontFace` field of this object."]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `GpuFrontFace`, `GpuPrimitiveState`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    #[wasm_bindgen(method, getter = "frontFace")]
46    pub fn get_front_face(this: &GpuPrimitiveState) -> Option<GpuFrontFace>;
47    #[cfg(web_sys_unstable_apis)]
48    #[cfg(feature = "GpuFrontFace")]
49    #[doc = "Change the `frontFace` field of this object."]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `GpuFrontFace`, `GpuPrimitiveState`*"]
52    #[doc = ""]
53    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
55    #[wasm_bindgen(method, setter = "frontFace")]
56    pub fn set_front_face(this: &GpuPrimitiveState, val: GpuFrontFace);
57    #[cfg(web_sys_unstable_apis)]
58    #[cfg(feature = "GpuIndexFormat")]
59    #[doc = "Get the `stripIndexFormat` field of this object."]
60    #[doc = ""]
61    #[doc = "*This API requires the following crate features to be activated: `GpuIndexFormat`, `GpuPrimitiveState`*"]
62    #[doc = ""]
63    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
64    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
65    #[wasm_bindgen(method, getter = "stripIndexFormat")]
66    pub fn get_strip_index_format(this: &GpuPrimitiveState) -> Option<GpuIndexFormat>;
67    #[cfg(web_sys_unstable_apis)]
68    #[cfg(feature = "GpuIndexFormat")]
69    #[doc = "Change the `stripIndexFormat` field of this object."]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `GpuIndexFormat`, `GpuPrimitiveState`*"]
72    #[doc = ""]
73    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
75    #[wasm_bindgen(method, setter = "stripIndexFormat")]
76    pub fn set_strip_index_format(this: &GpuPrimitiveState, val: GpuIndexFormat);
77    #[cfg(web_sys_unstable_apis)]
78    #[cfg(feature = "GpuPrimitiveTopology")]
79    #[doc = "Get the `topology` field of this object."]
80    #[doc = ""]
81    #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuPrimitiveTopology`*"]
82    #[doc = ""]
83    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
85    #[wasm_bindgen(method, getter = "topology")]
86    pub fn get_topology(this: &GpuPrimitiveState) -> Option<GpuPrimitiveTopology>;
87    #[cfg(web_sys_unstable_apis)]
88    #[cfg(feature = "GpuPrimitiveTopology")]
89    #[doc = "Change the `topology` field of this object."]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuPrimitiveTopology`*"]
92    #[doc = ""]
93    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
95    #[wasm_bindgen(method, setter = "topology")]
96    pub fn set_topology(this: &GpuPrimitiveState, val: GpuPrimitiveTopology);
97    #[cfg(web_sys_unstable_apis)]
98    #[doc = "Get the `unclippedDepth` field of this object."]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"]
101    #[doc = ""]
102    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
103    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
104    #[wasm_bindgen(method, getter = "unclippedDepth")]
105    pub fn get_unclipped_depth(this: &GpuPrimitiveState) -> Option<bool>;
106    #[cfg(web_sys_unstable_apis)]
107    #[doc = "Change the `unclippedDepth` field of this object."]
108    #[doc = ""]
109    #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"]
110    #[doc = ""]
111    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
112    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
113    #[wasm_bindgen(method, setter = "unclippedDepth")]
114    pub fn set_unclipped_depth(this: &GpuPrimitiveState, val: bool);
115}
116#[cfg(web_sys_unstable_apis)]
117impl GpuPrimitiveState {
118    #[doc = "Construct a new `GpuPrimitiveState`."]
119    #[doc = ""]
120    #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"]
121    #[doc = ""]
122    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
123    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
124    pub fn new() -> Self {
125        #[allow(unused_mut)]
126        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
127        ret
128    }
129    #[cfg(web_sys_unstable_apis)]
130    #[cfg(feature = "GpuCullMode")]
131    #[deprecated = "Use `set_cull_mode()` instead."]
132    pub fn cull_mode(&mut self, val: GpuCullMode) -> &mut Self {
133        self.set_cull_mode(val);
134        self
135    }
136    #[cfg(web_sys_unstable_apis)]
137    #[cfg(feature = "GpuFrontFace")]
138    #[deprecated = "Use `set_front_face()` instead."]
139    pub fn front_face(&mut self, val: GpuFrontFace) -> &mut Self {
140        self.set_front_face(val);
141        self
142    }
143    #[cfg(web_sys_unstable_apis)]
144    #[cfg(feature = "GpuIndexFormat")]
145    #[deprecated = "Use `set_strip_index_format()` instead."]
146    pub fn strip_index_format(&mut self, val: GpuIndexFormat) -> &mut Self {
147        self.set_strip_index_format(val);
148        self
149    }
150    #[cfg(web_sys_unstable_apis)]
151    #[cfg(feature = "GpuPrimitiveTopology")]
152    #[deprecated = "Use `set_topology()` instead."]
153    pub fn topology(&mut self, val: GpuPrimitiveTopology) -> &mut Self {
154        self.set_topology(val);
155        self
156    }
157    #[cfg(web_sys_unstable_apis)]
158    #[deprecated = "Use `set_unclipped_depth()` instead."]
159    pub fn unclipped_depth(&mut self, val: bool) -> &mut Self {
160        self.set_unclipped_depth(val);
161        self
162    }
163}
164#[cfg(web_sys_unstable_apis)]
165impl Default for GpuPrimitiveState {
166    fn default() -> Self {
167        Self::new()
168    }
169}