1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = BaseKeyframe)]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `BaseKeyframe` dictionary."]
9     #[doc = ""]
10     #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
11     pub type BaseKeyframe;
12 }
13 impl BaseKeyframe {
14     #[doc = "Construct a new `BaseKeyframe`."]
15     #[doc = ""]
16     #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
new() -> Self17     pub fn new() -> Self {
18         #[allow(unused_mut)]
19         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
20         ret
21     }
22     #[cfg(feature = "CompositeOperation")]
23     #[doc = "Change the `composite` field of this object."]
24     #[doc = ""]
25     #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"]
composite(&mut self, val: Option<CompositeOperation>) -> &mut Self26     pub fn composite(&mut self, val: Option<CompositeOperation>) -> &mut Self {
27         use wasm_bindgen::JsValue;
28         let r = ::js_sys::Reflect::set(
29             self.as_ref(),
30             &JsValue::from("composite"),
31             &JsValue::from(val),
32         );
33         debug_assert!(
34             r.is_ok(),
35             "setting properties should never fail on our dictionary objects"
36         );
37         let _ = r;
38         self
39     }
40     #[doc = "Change the `easing` field of this object."]
41     #[doc = ""]
42     #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
easing(&mut self, val: &str) -> &mut Self43     pub fn easing(&mut self, val: &str) -> &mut Self {
44         use wasm_bindgen::JsValue;
45         let r =
46             ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("easing"), &JsValue::from(val));
47         debug_assert!(
48             r.is_ok(),
49             "setting properties should never fail on our dictionary objects"
50         );
51         let _ = r;
52         self
53     }
54     #[doc = "Change the `offset` field of this object."]
55     #[doc = ""]
56     #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
offset(&mut self, val: Option<f64>) -> &mut Self57     pub fn offset(&mut self, val: Option<f64>) -> &mut Self {
58         use wasm_bindgen::JsValue;
59         let r =
60             ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("offset"), &JsValue::from(val));
61         debug_assert!(
62             r.is_ok(),
63             "setting properties should never fail on our dictionary objects"
64         );
65         let _ = r;
66         self
67     }
68     #[doc = "Change the `simulateComputeValuesFailure` field of this object."]
69     #[doc = ""]
70     #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"]
simulate_compute_values_failure(&mut self, val: bool) -> &mut Self71     pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self {
72         use wasm_bindgen::JsValue;
73         let r = ::js_sys::Reflect::set(
74             self.as_ref(),
75             &JsValue::from("simulateComputeValuesFailure"),
76             &JsValue::from(val),
77         );
78         debug_assert!(
79             r.is_ok(),
80             "setting properties should never fail on our dictionary objects"
81         );
82         let _ = r;
83         self
84     }
85 }
86 impl Default for BaseKeyframe {
default() -> Self87     fn default() -> Self {
88         Self::new()
89     }
90 }
91