web_sys/features/
gen_BaseKeyframe.rs

1#![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 = BaseKeyframe)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `BaseKeyframe` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
12    pub type BaseKeyframe;
13    #[cfg(feature = "CompositeOperation")]
14    #[doc = "Get the `composite` field of this object."]
15    #[doc = ""]
16    #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"]
17    #[wasm_bindgen(method, getter = "composite")]
18    pub fn get_composite(this: &BaseKeyframe) -> Option<CompositeOperation>;
19    #[cfg(feature = "CompositeOperation")]
20    #[doc = "Change the `composite` field of this object."]
21    #[doc = ""]
22    #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"]
23    #[wasm_bindgen(method, setter = "composite")]
24    pub fn set_composite(this: &BaseKeyframe, val: Option<CompositeOperation>);
25    #[doc = "Get the `easing` field of this object."]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
28    #[wasm_bindgen(method, getter = "easing")]
29    pub fn get_easing(this: &BaseKeyframe) -> Option<::alloc::string::String>;
30    #[doc = "Change the `easing` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
33    #[wasm_bindgen(method, setter = "easing")]
34    pub fn set_easing(this: &BaseKeyframe, val: &str);
35    #[doc = "Get the `offset` field of this object."]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
38    #[wasm_bindgen(method, getter = "offset")]
39    pub fn get_offset(this: &BaseKeyframe) -> Option<f64>;
40    #[doc = "Change the `offset` field of this object."]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
43    #[wasm_bindgen(method, setter = "offset")]
44    pub fn set_offset(this: &BaseKeyframe, val: Option<f64>);
45    #[doc = "Get the `simulateComputeValuesFailure` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
48    #[wasm_bindgen(method, getter = "simulateComputeValuesFailure")]
49    pub fn get_simulate_compute_values_failure(this: &BaseKeyframe) -> Option<bool>;
50    #[doc = "Change the `simulateComputeValuesFailure` field of this object."]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
53    #[wasm_bindgen(method, setter = "simulateComputeValuesFailure")]
54    pub fn set_simulate_compute_values_failure(this: &BaseKeyframe, val: bool);
55}
56impl BaseKeyframe {
57    #[doc = "Construct a new `BaseKeyframe`."]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
60    pub fn new() -> Self {
61        #[allow(unused_mut)]
62        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
63        ret
64    }
65    #[cfg(feature = "CompositeOperation")]
66    #[deprecated = "Use `set_composite()` instead."]
67    pub fn composite(&mut self, val: Option<CompositeOperation>) -> &mut Self {
68        self.set_composite(val);
69        self
70    }
71    #[deprecated = "Use `set_easing()` instead."]
72    pub fn easing(&mut self, val: &str) -> &mut Self {
73        self.set_easing(val);
74        self
75    }
76    #[deprecated = "Use `set_offset()` instead."]
77    pub fn offset(&mut self, val: Option<f64>) -> &mut Self {
78        self.set_offset(val);
79        self
80    }
81    #[deprecated = "Use `set_simulate_compute_values_failure()` instead."]
82    pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self {
83        self.set_simulate_compute_values_failure(val);
84        self
85    }
86}
87impl Default for BaseKeyframe {
88    fn default() -> Self {
89        Self::new()
90    }
91}