use motion_canvas_rs::prelude::*;
use std::time::Duration;
fn main() {
let mut project = Project::new(800, 600).with_fps(60).with_cache(true);
let circle = Circle::default()
.with_position(Vec2::new(400.0, 300.0))
.with_radius(50.0)
.with_color(Color::rgb8(0xe1, 0x32, 0x38));
let text = TextNode::default()
.with_position(Vec2::new(400.0, 450.0))
.with_text("Hello Rust")
.with_font_size(40.0)
.with_color(Color::rgb8(0xf2, 0xf2, 0xf2));
project.scene.add(Box::new(circle.clone()));
project.scene.add(Box::new(text.clone()));
project.scene.timeline.add(flows::all![
circle.radius.to(100.0, Duration::from_secs(1)),
text.transform
.to(Affine::translate((400.0, 500.0)), Duration::from_secs(1)),
]);
project.show().expect("Failed to render");
}