web_sys/features/
gen_WaveShaperNode.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = WaveShaperNode , typescript_type = "WaveShaperNode")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `WaveShaperNode` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `WaveShaperNode`*"]
14 pub type WaveShaperNode;
15 # [wasm_bindgen (structural , method , getter , js_class = "WaveShaperNode" , js_name = curve)]
16 #[doc = "Getter for the `curve` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/curve)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `WaveShaperNode`*"]
21 pub fn curve(this: &WaveShaperNode) -> Option<::alloc::vec::Vec<f32>>;
22 # [wasm_bindgen (structural , method , setter , js_class = "WaveShaperNode" , js_name = curve)]
23 #[doc = "Setter for the `curve` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/curve)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `WaveShaperNode`*"]
28 #[deprecated]
29 pub fn set_curve(this: &WaveShaperNode, value: Option<&mut [f32]>);
30 # [wasm_bindgen (structural , method , setter , js_class = "WaveShaperNode" , js_name = curve)]
31 #[doc = "Setter for the `curve` field of this object."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/curve)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `WaveShaperNode`*"]
36 pub fn set_curve_opt_f32_slice(this: &WaveShaperNode, value: Option<&mut [f32]>);
37 # [wasm_bindgen (structural , method , setter , js_class = "WaveShaperNode" , js_name = curve)]
38 #[doc = "Setter for the `curve` field of this object."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/curve)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `WaveShaperNode`*"]
43 pub fn set_curve_opt_f32_array(this: &WaveShaperNode, value: Option<&::js_sys::Float32Array>);
44 #[cfg(feature = "OverSampleType")]
45 # [wasm_bindgen (structural , method , getter , js_class = "WaveShaperNode" , js_name = oversample)]
46 #[doc = "Getter for the `oversample` field of this object."]
47 #[doc = ""]
48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/oversample)"]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperNode`*"]
51 pub fn oversample(this: &WaveShaperNode) -> OverSampleType;
52 #[cfg(feature = "OverSampleType")]
53 # [wasm_bindgen (structural , method , setter , js_class = "WaveShaperNode" , js_name = oversample)]
54 #[doc = "Setter for the `oversample` field of this object."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/oversample)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperNode`*"]
59 pub fn set_oversample(this: &WaveShaperNode, value: OverSampleType);
60 #[cfg(feature = "BaseAudioContext")]
61 #[wasm_bindgen(catch, constructor, js_class = "WaveShaperNode")]
62 #[doc = "The `new WaveShaperNode(..)` constructor, creating a new instance of `WaveShaperNode`."]
63 #[doc = ""]
64 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/WaveShaperNode)"]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `WaveShaperNode`*"]
67 pub fn new(context: &BaseAudioContext) -> Result<WaveShaperNode, JsValue>;
68 #[cfg(all(feature = "BaseAudioContext", feature = "WaveShaperOptions",))]
69 #[wasm_bindgen(catch, constructor, js_class = "WaveShaperNode")]
70 #[doc = "The `new WaveShaperNode(..)` constructor, creating a new instance of `WaveShaperNode`."]
71 #[doc = ""]
72 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperNode/WaveShaperNode)"]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `WaveShaperNode`, `WaveShaperOptions`*"]
75 pub fn new_with_options(
76 context: &BaseAudioContext,
77 options: &WaveShaperOptions,
78 ) -> Result<WaveShaperNode, JsValue>;
79}