euv-core 0.46.1

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Trait for immutable simulation snapshots supporting smooth discontinuity-safe render interpolation.
pub trait InterpolatableState: Clone {
    /// Interpolates between `self` (previous fixed-step snapshot) and `next` (current fixed-step snapshot) at `alpha` in `[0.0, 1.0]`.
    ///
    /// # Arguments
    ///
    /// - `&Self` - Previous immutable simulation snapshot (`t - dt`).
    /// - `&Self` - Current immutable simulation snapshot (`t`).
    /// - `f32` - Render interpolation factor clamped to `[0.0, 1.0]`.
    ///
    /// # Returns
    ///
    /// - `Self` - Smoothly interpolated state for rendering without interpolating discontinuous events.
    #[must_use]
    fn interpolate(&self, next: &Self, alpha: f32) -> Self;
}