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 = ComputedEffectTiming)] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `ComputedEffectTiming` dictionary."] 9 #[doc = ""] 10 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] 11 pub type ComputedEffectTiming; 12 } 13 impl ComputedEffectTiming { 14 #[doc = "Construct a new `ComputedEffectTiming`."] 15 #[doc = ""] 16 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] 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 #[doc = "Change the `delay` field of this object."] 23 #[doc = ""] 24 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] delay(&mut self, val: f64) -> &mut Self25 pub fn delay(&mut self, val: f64) -> &mut Self { 26 use wasm_bindgen::JsValue; 27 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("delay"), &JsValue::from(val)); 28 debug_assert!( 29 r.is_ok(), 30 "setting properties should never fail on our dictionary objects" 31 ); 32 let _ = r; 33 self 34 } 35 #[cfg(feature = "PlaybackDirection")] 36 #[doc = "Change the `direction` field of this object."] 37 #[doc = ""] 38 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `PlaybackDirection`*"] direction(&mut self, val: PlaybackDirection) -> &mut Self39 pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { 40 use wasm_bindgen::JsValue; 41 let r = ::js_sys::Reflect::set( 42 self.as_ref(), 43 &JsValue::from("direction"), 44 &JsValue::from(val), 45 ); 46 debug_assert!( 47 r.is_ok(), 48 "setting properties should never fail on our dictionary objects" 49 ); 50 let _ = r; 51 self 52 } 53 #[doc = "Change the `duration` field of this object."] 54 #[doc = ""] 55 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self56 pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 57 use wasm_bindgen::JsValue; 58 let r = ::js_sys::Reflect::set( 59 self.as_ref(), 60 &JsValue::from("duration"), 61 &JsValue::from(val), 62 ); 63 debug_assert!( 64 r.is_ok(), 65 "setting properties should never fail on our dictionary objects" 66 ); 67 let _ = r; 68 self 69 } 70 #[doc = "Change the `easing` field of this object."] 71 #[doc = ""] 72 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] easing(&mut self, val: &str) -> &mut Self73 pub fn easing(&mut self, val: &str) -> &mut Self { 74 use wasm_bindgen::JsValue; 75 let r = 76 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("easing"), &JsValue::from(val)); 77 debug_assert!( 78 r.is_ok(), 79 "setting properties should never fail on our dictionary objects" 80 ); 81 let _ = r; 82 self 83 } 84 #[doc = "Change the `endDelay` field of this object."] 85 #[doc = ""] 86 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] end_delay(&mut self, val: f64) -> &mut Self87 pub fn end_delay(&mut self, val: f64) -> &mut Self { 88 use wasm_bindgen::JsValue; 89 let r = ::js_sys::Reflect::set( 90 self.as_ref(), 91 &JsValue::from("endDelay"), 92 &JsValue::from(val), 93 ); 94 debug_assert!( 95 r.is_ok(), 96 "setting properties should never fail on our dictionary objects" 97 ); 98 let _ = r; 99 self 100 } 101 #[cfg(feature = "FillMode")] 102 #[doc = "Change the `fill` field of this object."] 103 #[doc = ""] 104 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `FillMode`*"] fill(&mut self, val: FillMode) -> &mut Self105 pub fn fill(&mut self, val: FillMode) -> &mut Self { 106 use wasm_bindgen::JsValue; 107 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("fill"), &JsValue::from(val)); 108 debug_assert!( 109 r.is_ok(), 110 "setting properties should never fail on our dictionary objects" 111 ); 112 let _ = r; 113 self 114 } 115 #[doc = "Change the `iterationStart` field of this object."] 116 #[doc = ""] 117 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] iteration_start(&mut self, val: f64) -> &mut Self118 pub fn iteration_start(&mut self, val: f64) -> &mut Self { 119 use wasm_bindgen::JsValue; 120 let r = ::js_sys::Reflect::set( 121 self.as_ref(), 122 &JsValue::from("iterationStart"), 123 &JsValue::from(val), 124 ); 125 debug_assert!( 126 r.is_ok(), 127 "setting properties should never fail on our dictionary objects" 128 ); 129 let _ = r; 130 self 131 } 132 #[doc = "Change the `iterations` field of this object."] 133 #[doc = ""] 134 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] iterations(&mut self, val: f64) -> &mut Self135 pub fn iterations(&mut self, val: f64) -> &mut Self { 136 use wasm_bindgen::JsValue; 137 let r = ::js_sys::Reflect::set( 138 self.as_ref(), 139 &JsValue::from("iterations"), 140 &JsValue::from(val), 141 ); 142 debug_assert!( 143 r.is_ok(), 144 "setting properties should never fail on our dictionary objects" 145 ); 146 let _ = r; 147 self 148 } 149 #[doc = "Change the `activeDuration` field of this object."] 150 #[doc = ""] 151 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] active_duration(&mut self, val: f64) -> &mut Self152 pub fn active_duration(&mut self, val: f64) -> &mut Self { 153 use wasm_bindgen::JsValue; 154 let r = ::js_sys::Reflect::set( 155 self.as_ref(), 156 &JsValue::from("activeDuration"), 157 &JsValue::from(val), 158 ); 159 debug_assert!( 160 r.is_ok(), 161 "setting properties should never fail on our dictionary objects" 162 ); 163 let _ = r; 164 self 165 } 166 #[doc = "Change the `currentIteration` field of this object."] 167 #[doc = ""] 168 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] current_iteration(&mut self, val: Option<f64>) -> &mut Self169 pub fn current_iteration(&mut self, val: Option<f64>) -> &mut Self { 170 use wasm_bindgen::JsValue; 171 let r = ::js_sys::Reflect::set( 172 self.as_ref(), 173 &JsValue::from("currentIteration"), 174 &JsValue::from(val), 175 ); 176 debug_assert!( 177 r.is_ok(), 178 "setting properties should never fail on our dictionary objects" 179 ); 180 let _ = r; 181 self 182 } 183 #[doc = "Change the `endTime` field of this object."] 184 #[doc = ""] 185 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] end_time(&mut self, val: f64) -> &mut Self186 pub fn end_time(&mut self, val: f64) -> &mut Self { 187 use wasm_bindgen::JsValue; 188 let r = ::js_sys::Reflect::set( 189 self.as_ref(), 190 &JsValue::from("endTime"), 191 &JsValue::from(val), 192 ); 193 debug_assert!( 194 r.is_ok(), 195 "setting properties should never fail on our dictionary objects" 196 ); 197 let _ = r; 198 self 199 } 200 #[doc = "Change the `localTime` field of this object."] 201 #[doc = ""] 202 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] local_time(&mut self, val: Option<f64>) -> &mut Self203 pub fn local_time(&mut self, val: Option<f64>) -> &mut Self { 204 use wasm_bindgen::JsValue; 205 let r = ::js_sys::Reflect::set( 206 self.as_ref(), 207 &JsValue::from("localTime"), 208 &JsValue::from(val), 209 ); 210 debug_assert!( 211 r.is_ok(), 212 "setting properties should never fail on our dictionary objects" 213 ); 214 let _ = r; 215 self 216 } 217 #[doc = "Change the `progress` field of this object."] 218 #[doc = ""] 219 #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] progress(&mut self, val: Option<f64>) -> &mut Self220 pub fn progress(&mut self, val: Option<f64>) -> &mut Self { 221 use wasm_bindgen::JsValue; 222 let r = ::js_sys::Reflect::set( 223 self.as_ref(), 224 &JsValue::from("progress"), 225 &JsValue::from(val), 226 ); 227 debug_assert!( 228 r.is_ok(), 229 "setting properties should never fail on our dictionary objects" 230 ); 231 let _ = r; 232 self 233 } 234 } 235 impl Default for ComputedEffectTiming { default() -> Self236 fn default() -> Self { 237 Self::new() 238 } 239 } 240