tempa 0.1.15

A no_std temporal system for animation and simulation, providing time, duration, time ranges, frame rates, and deterministic frame-index stepping.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[cfg(feature = "zerocopy")]
use zerocopy::*;

use crate::{FrameIndex, FrameRate};

/// Steps through timeline frames deterministically.
#[derive(Copy, Clone, Debug, PartialEq)]
#[cfg_attr(feature = "sakka", derive(sakka::Encode, sakka::Decode))]
#[cfg_attr(feature = "zerocopy", derive(FromBytes, Immutable, IntoBytes, KnownLayout, Unaligned))]
#[repr(C)]
pub struct FrameStepper<I, R> {
    pub(crate) frame: FrameIndex<I>,
    pub(crate) rate: FrameRate<R>,
}