Skip to main content

web_sys/features/
gen_WaveShaperNode.rs

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