web_sys/features/
gen_PannerOptions.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = PannerOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `PannerOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
12 pub type PannerOptions;
13 #[doc = "Get the `channelCount` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
16 #[wasm_bindgen(method, getter = "channelCount")]
17 pub fn get_channel_count(this: &PannerOptions) -> Option<u32>;
18 #[doc = "Change the `channelCount` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
21 #[wasm_bindgen(method, setter = "channelCount")]
22 pub fn set_channel_count(this: &PannerOptions, val: u32);
23 #[cfg(feature = "ChannelCountMode")]
24 #[doc = "Get the `channelCountMode` field of this object."]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `PannerOptions`*"]
27 #[wasm_bindgen(method, getter = "channelCountMode")]
28 pub fn get_channel_count_mode(this: &PannerOptions) -> Option<ChannelCountMode>;
29 #[cfg(feature = "ChannelCountMode")]
30 #[doc = "Change the `channelCountMode` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `PannerOptions`*"]
33 #[wasm_bindgen(method, setter = "channelCountMode")]
34 pub fn set_channel_count_mode(this: &PannerOptions, val: ChannelCountMode);
35 #[cfg(feature = "ChannelInterpretation")]
36 #[doc = "Get the `channelInterpretation` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `PannerOptions`*"]
39 #[wasm_bindgen(method, getter = "channelInterpretation")]
40 pub fn get_channel_interpretation(this: &PannerOptions) -> Option<ChannelInterpretation>;
41 #[cfg(feature = "ChannelInterpretation")]
42 #[doc = "Change the `channelInterpretation` field of this object."]
43 #[doc = ""]
44 #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `PannerOptions`*"]
45 #[wasm_bindgen(method, setter = "channelInterpretation")]
46 pub fn set_channel_interpretation(this: &PannerOptions, val: ChannelInterpretation);
47 #[doc = "Get the `coneInnerAngle` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
50 #[wasm_bindgen(method, getter = "coneInnerAngle")]
51 pub fn get_cone_inner_angle(this: &PannerOptions) -> Option<f64>;
52 #[doc = "Change the `coneInnerAngle` field of this object."]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
55 #[wasm_bindgen(method, setter = "coneInnerAngle")]
56 pub fn set_cone_inner_angle(this: &PannerOptions, val: f64);
57 #[doc = "Get the `coneOuterAngle` field of this object."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
60 #[wasm_bindgen(method, getter = "coneOuterAngle")]
61 pub fn get_cone_outer_angle(this: &PannerOptions) -> Option<f64>;
62 #[doc = "Change the `coneOuterAngle` field of this object."]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
65 #[wasm_bindgen(method, setter = "coneOuterAngle")]
66 pub fn set_cone_outer_angle(this: &PannerOptions, val: f64);
67 #[doc = "Get the `coneOuterGain` field of this object."]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
70 #[wasm_bindgen(method, getter = "coneOuterGain")]
71 pub fn get_cone_outer_gain(this: &PannerOptions) -> Option<f64>;
72 #[doc = "Change the `coneOuterGain` field of this object."]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
75 #[wasm_bindgen(method, setter = "coneOuterGain")]
76 pub fn set_cone_outer_gain(this: &PannerOptions, val: f64);
77 #[cfg(feature = "DistanceModelType")]
78 #[doc = "Get the `distanceModel` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `DistanceModelType`, `PannerOptions`*"]
81 #[wasm_bindgen(method, getter = "distanceModel")]
82 pub fn get_distance_model(this: &PannerOptions) -> Option<DistanceModelType>;
83 #[cfg(feature = "DistanceModelType")]
84 #[doc = "Change the `distanceModel` field of this object."]
85 #[doc = ""]
86 #[doc = "*This API requires the following crate features to be activated: `DistanceModelType`, `PannerOptions`*"]
87 #[wasm_bindgen(method, setter = "distanceModel")]
88 pub fn set_distance_model(this: &PannerOptions, val: DistanceModelType);
89 #[doc = "Get the `maxDistance` field of this object."]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
92 #[wasm_bindgen(method, getter = "maxDistance")]
93 pub fn get_max_distance(this: &PannerOptions) -> Option<f64>;
94 #[doc = "Change the `maxDistance` field of this object."]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
97 #[wasm_bindgen(method, setter = "maxDistance")]
98 pub fn set_max_distance(this: &PannerOptions, val: f64);
99 #[doc = "Get the `orientationX` field of this object."]
100 #[doc = ""]
101 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
102 #[wasm_bindgen(method, getter = "orientationX")]
103 pub fn get_orientation_x(this: &PannerOptions) -> Option<f32>;
104 #[doc = "Change the `orientationX` field of this object."]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
107 #[wasm_bindgen(method, setter = "orientationX")]
108 pub fn set_orientation_x(this: &PannerOptions, val: f32);
109 #[doc = "Get the `orientationY` field of this object."]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
112 #[wasm_bindgen(method, getter = "orientationY")]
113 pub fn get_orientation_y(this: &PannerOptions) -> Option<f32>;
114 #[doc = "Change the `orientationY` field of this object."]
115 #[doc = ""]
116 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
117 #[wasm_bindgen(method, setter = "orientationY")]
118 pub fn set_orientation_y(this: &PannerOptions, val: f32);
119 #[doc = "Get the `orientationZ` field of this object."]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
122 #[wasm_bindgen(method, getter = "orientationZ")]
123 pub fn get_orientation_z(this: &PannerOptions) -> Option<f32>;
124 #[doc = "Change the `orientationZ` field of this object."]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
127 #[wasm_bindgen(method, setter = "orientationZ")]
128 pub fn set_orientation_z(this: &PannerOptions, val: f32);
129 #[cfg(feature = "PanningModelType")]
130 #[doc = "Get the `panningModel` field of this object."]
131 #[doc = ""]
132 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`, `PanningModelType`*"]
133 #[wasm_bindgen(method, getter = "panningModel")]
134 pub fn get_panning_model(this: &PannerOptions) -> Option<PanningModelType>;
135 #[cfg(feature = "PanningModelType")]
136 #[doc = "Change the `panningModel` field of this object."]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`, `PanningModelType`*"]
139 #[wasm_bindgen(method, setter = "panningModel")]
140 pub fn set_panning_model(this: &PannerOptions, val: PanningModelType);
141 #[doc = "Get the `positionX` field of this object."]
142 #[doc = ""]
143 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
144 #[wasm_bindgen(method, getter = "positionX")]
145 pub fn get_position_x(this: &PannerOptions) -> Option<f32>;
146 #[doc = "Change the `positionX` field of this object."]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
149 #[wasm_bindgen(method, setter = "positionX")]
150 pub fn set_position_x(this: &PannerOptions, val: f32);
151 #[doc = "Get the `positionY` field of this object."]
152 #[doc = ""]
153 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
154 #[wasm_bindgen(method, getter = "positionY")]
155 pub fn get_position_y(this: &PannerOptions) -> Option<f32>;
156 #[doc = "Change the `positionY` field of this object."]
157 #[doc = ""]
158 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
159 #[wasm_bindgen(method, setter = "positionY")]
160 pub fn set_position_y(this: &PannerOptions, val: f32);
161 #[doc = "Get the `positionZ` field of this object."]
162 #[doc = ""]
163 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
164 #[wasm_bindgen(method, getter = "positionZ")]
165 pub fn get_position_z(this: &PannerOptions) -> Option<f32>;
166 #[doc = "Change the `positionZ` field of this object."]
167 #[doc = ""]
168 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
169 #[wasm_bindgen(method, setter = "positionZ")]
170 pub fn set_position_z(this: &PannerOptions, val: f32);
171 #[doc = "Get the `refDistance` field of this object."]
172 #[doc = ""]
173 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
174 #[wasm_bindgen(method, getter = "refDistance")]
175 pub fn get_ref_distance(this: &PannerOptions) -> Option<f64>;
176 #[doc = "Change the `refDistance` field of this object."]
177 #[doc = ""]
178 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
179 #[wasm_bindgen(method, setter = "refDistance")]
180 pub fn set_ref_distance(this: &PannerOptions, val: f64);
181 #[doc = "Get the `rolloffFactor` field of this object."]
182 #[doc = ""]
183 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
184 #[wasm_bindgen(method, getter = "rolloffFactor")]
185 pub fn get_rolloff_factor(this: &PannerOptions) -> Option<f64>;
186 #[doc = "Change the `rolloffFactor` field of this object."]
187 #[doc = ""]
188 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
189 #[wasm_bindgen(method, setter = "rolloffFactor")]
190 pub fn set_rolloff_factor(this: &PannerOptions, val: f64);
191}
192impl PannerOptions {
193 #[doc = "Construct a new `PannerOptions`."]
194 #[doc = ""]
195 #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"]
196 pub fn new() -> Self {
197 #[allow(unused_mut)]
198 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
199 ret
200 }
201 #[deprecated = "Use `set_channel_count()` instead."]
202 pub fn channel_count(&mut self, val: u32) -> &mut Self {
203 self.set_channel_count(val);
204 self
205 }
206 #[cfg(feature = "ChannelCountMode")]
207 #[deprecated = "Use `set_channel_count_mode()` instead."]
208 pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
209 self.set_channel_count_mode(val);
210 self
211 }
212 #[cfg(feature = "ChannelInterpretation")]
213 #[deprecated = "Use `set_channel_interpretation()` instead."]
214 pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
215 self.set_channel_interpretation(val);
216 self
217 }
218 #[deprecated = "Use `set_cone_inner_angle()` instead."]
219 pub fn cone_inner_angle(&mut self, val: f64) -> &mut Self {
220 self.set_cone_inner_angle(val);
221 self
222 }
223 #[deprecated = "Use `set_cone_outer_angle()` instead."]
224 pub fn cone_outer_angle(&mut self, val: f64) -> &mut Self {
225 self.set_cone_outer_angle(val);
226 self
227 }
228 #[deprecated = "Use `set_cone_outer_gain()` instead."]
229 pub fn cone_outer_gain(&mut self, val: f64) -> &mut Self {
230 self.set_cone_outer_gain(val);
231 self
232 }
233 #[cfg(feature = "DistanceModelType")]
234 #[deprecated = "Use `set_distance_model()` instead."]
235 pub fn distance_model(&mut self, val: DistanceModelType) -> &mut Self {
236 self.set_distance_model(val);
237 self
238 }
239 #[deprecated = "Use `set_max_distance()` instead."]
240 pub fn max_distance(&mut self, val: f64) -> &mut Self {
241 self.set_max_distance(val);
242 self
243 }
244 #[deprecated = "Use `set_orientation_x()` instead."]
245 pub fn orientation_x(&mut self, val: f32) -> &mut Self {
246 self.set_orientation_x(val);
247 self
248 }
249 #[deprecated = "Use `set_orientation_y()` instead."]
250 pub fn orientation_y(&mut self, val: f32) -> &mut Self {
251 self.set_orientation_y(val);
252 self
253 }
254 #[deprecated = "Use `set_orientation_z()` instead."]
255 pub fn orientation_z(&mut self, val: f32) -> &mut Self {
256 self.set_orientation_z(val);
257 self
258 }
259 #[cfg(feature = "PanningModelType")]
260 #[deprecated = "Use `set_panning_model()` instead."]
261 pub fn panning_model(&mut self, val: PanningModelType) -> &mut Self {
262 self.set_panning_model(val);
263 self
264 }
265 #[deprecated = "Use `set_position_x()` instead."]
266 pub fn position_x(&mut self, val: f32) -> &mut Self {
267 self.set_position_x(val);
268 self
269 }
270 #[deprecated = "Use `set_position_y()` instead."]
271 pub fn position_y(&mut self, val: f32) -> &mut Self {
272 self.set_position_y(val);
273 self
274 }
275 #[deprecated = "Use `set_position_z()` instead."]
276 pub fn position_z(&mut self, val: f32) -> &mut Self {
277 self.set_position_z(val);
278 self
279 }
280 #[deprecated = "Use `set_ref_distance()` instead."]
281 pub fn ref_distance(&mut self, val: f64) -> &mut Self {
282 self.set_ref_distance(val);
283 self
284 }
285 #[deprecated = "Use `set_rolloff_factor()` instead."]
286 pub fn rolloff_factor(&mut self, val: f64) -> &mut Self {
287 self.set_rolloff_factor(val);
288 self
289 }
290}
291impl Default for PannerOptions {
292 fn default() -> Self {
293 Self::new()
294 }
295}