euv-core 0.48.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
17
/// Default 60Hz fixed simulation step duration in nanoseconds (`16_666_667 ns`).
pub const CLOCK_DEFAULT_FIXED_STEP_NS: u64 = 16_666_667;
/// Default maximum fixed simulation substeps executed per rendered frame.
pub const CLOCK_DEFAULT_MAX_SUBSTEPS: u32 = 8;

/// Nanoseconds per second as `u64`.
pub(crate) const CLOCK_NS_PER_SEC: u64 = 1_000_000_000;
/// Nanoseconds per second as `f64`.
pub(crate) const CLOCK_NS_PER_SEC_F64: f64 = 1_000_000_000.0;
/// Minimum allowed fixed simulation step in nanoseconds (`100 us` = `10_000Hz`).
pub(crate) const CLOCK_MIN_FIXED_STEP_NS: u64 = 100_000;
/// Upper bound on a single frame delta in nanoseconds (`250 ms`) to prevent spiral-of-death stalls.
pub(crate) const CLOCK_MAX_FRAME_DT_NS: u64 = 250_000_000;
/// Reciprocal of the ±0.5% (`1 / 200`) VSync-boundary hysteresis snap window (`±83.3 us` at 60Hz).
pub(crate) const CLOCK_HYSTERESIS_DIVISOR: u64 = 200;
/// Time-constant in seconds (`0.25s`) for the frame-rate-invariant FPS exponential moving average.
pub(crate) const CLOCK_FPS_EMA_TAU_SECS: f32 = 0.25;