1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[cfg(web_sys_unstable_apis)]
5 #[wasm_bindgen]
6 extern "C" {
7     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUPrimitiveState)]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `GpuPrimitiveState` dictionary."]
10     #[doc = ""]
11     #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"]
12     #[doc = ""]
13     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
14     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
15     pub type GpuPrimitiveState;
16 }
17 #[cfg(web_sys_unstable_apis)]
18 impl GpuPrimitiveState {
19     #[doc = "Construct a new `GpuPrimitiveState`."]
20     #[doc = ""]
21     #[doc = "*This API requires the following crate features to be activated: `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)*"]
new() -> Self25     pub fn new() -> Self {
26         #[allow(unused_mut)]
27         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
28         ret
29     }
30     #[cfg(web_sys_unstable_apis)]
31     #[cfg(feature = "GpuCullMode")]
32     #[doc = "Change the `cullMode` field of this object."]
33     #[doc = ""]
34     #[doc = "*This API requires the following crate features to be activated: `GpuCullMode`, `GpuPrimitiveState`*"]
35     #[doc = ""]
36     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
37     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
cull_mode(&mut self, val: GpuCullMode) -> &mut Self38     pub fn cull_mode(&mut self, val: GpuCullMode) -> &mut Self {
39         use wasm_bindgen::JsValue;
40         let r = ::js_sys::Reflect::set(
41             self.as_ref(),
42             &JsValue::from("cullMode"),
43             &JsValue::from(val),
44         );
45         debug_assert!(
46             r.is_ok(),
47             "setting properties should never fail on our dictionary objects"
48         );
49         let _ = r;
50         self
51     }
52     #[cfg(web_sys_unstable_apis)]
53     #[cfg(feature = "GpuFrontFace")]
54     #[doc = "Change the `frontFace` field of this object."]
55     #[doc = ""]
56     #[doc = "*This API requires the following crate features to be activated: `GpuFrontFace`, `GpuPrimitiveState`*"]
57     #[doc = ""]
58     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
59     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
front_face(&mut self, val: GpuFrontFace) -> &mut Self60     pub fn front_face(&mut self, val: GpuFrontFace) -> &mut Self {
61         use wasm_bindgen::JsValue;
62         let r = ::js_sys::Reflect::set(
63             self.as_ref(),
64             &JsValue::from("frontFace"),
65             &JsValue::from(val),
66         );
67         debug_assert!(
68             r.is_ok(),
69             "setting properties should never fail on our dictionary objects"
70         );
71         let _ = r;
72         self
73     }
74     #[cfg(web_sys_unstable_apis)]
75     #[cfg(feature = "GpuIndexFormat")]
76     #[doc = "Change the `stripIndexFormat` field of this object."]
77     #[doc = ""]
78     #[doc = "*This API requires the following crate features to be activated: `GpuIndexFormat`, `GpuPrimitiveState`*"]
79     #[doc = ""]
80     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
81     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
strip_index_format(&mut self, val: GpuIndexFormat) -> &mut Self82     pub fn strip_index_format(&mut self, val: GpuIndexFormat) -> &mut Self {
83         use wasm_bindgen::JsValue;
84         let r = ::js_sys::Reflect::set(
85             self.as_ref(),
86             &JsValue::from("stripIndexFormat"),
87             &JsValue::from(val),
88         );
89         debug_assert!(
90             r.is_ok(),
91             "setting properties should never fail on our dictionary objects"
92         );
93         let _ = r;
94         self
95     }
96     #[cfg(web_sys_unstable_apis)]
97     #[cfg(feature = "GpuPrimitiveTopology")]
98     #[doc = "Change the `topology` field of this object."]
99     #[doc = ""]
100     #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuPrimitiveTopology`*"]
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)*"]
topology(&mut self, val: GpuPrimitiveTopology) -> &mut Self104     pub fn topology(&mut self, val: GpuPrimitiveTopology) -> &mut Self {
105         use wasm_bindgen::JsValue;
106         let r = ::js_sys::Reflect::set(
107             self.as_ref(),
108             &JsValue::from("topology"),
109             &JsValue::from(val),
110         );
111         debug_assert!(
112             r.is_ok(),
113             "setting properties should never fail on our dictionary objects"
114         );
115         let _ = r;
116         self
117     }
118 }
119