rustmotion 0.5.0

A CLI tool that renders motion design videos from JSON scenarios. No browser, no Node.js — just a single Rust binary.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

/// Configuration for timed visibility (start_at / end_at).
/// Embedded via `#[serde(flatten)]` in components that support timed visibility.
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema)]
pub struct TimingConfig {
    #[serde(default)]
    pub start_at: Option<f64>,
    #[serde(default)]
    pub end_at: Option<f64>,
}

/// Trait for components that support timed visibility.
pub trait Timed {
    fn timing(&self) -> (Option<f64>, Option<f64>);
}