rive_rs/importers/
linear_animation_importer.rs
1use crate::animation::{KeyedObject, LinearAnimation};
6use crate::core::Object;
7use crate::importers::ImportStackObject;
8
9#[derive(Debug)]
10pub struct LinearAnimationImporter {
11 animation: Object<LinearAnimation>,
12}
13
14impl LinearAnimationImporter {
15 pub fn new(animation: Object<LinearAnimation>) -> Self {
16 Self { animation }
17 }
18
19 pub fn animation(&self) -> Object<LinearAnimation> {
20 self.animation.clone()
21 }
22
23 pub fn push_keyed_object(&self, keyed_object: Object<KeyedObject>) {
24 self.animation.as_ref().push_keyed_object(keyed_object);
25 }
26}
27
28impl ImportStackObject for LinearAnimationImporter {}