pub struct SimulationSpec {
pub enabled: bool,
pub alpha_decay: f32,
pub alpha_min: f32,
pub velocity_decay: f32,
pub reheat_alpha: f32,
pub theta: f32,
pub link_distance: f32,
pub charge_strength: f32,
pub center_strength: f32,
}Fields§
§enabled: boolWhen false the simulation never ANIMATES — but a Force-source
load/relayout still runs a synchronous settle so disabled hosts get a
finished static layout (see settle_forced).
alpha_decay: f32Per-tick multiplicative decay of alpha. The default reaches
alpha_min in ~300 ticks: 1 - 0.001^(1/300).
alpha_min: f32Below this the sim is considered settled and stops ticking, so a graph at rest costs nothing.
velocity_decay: f32Friction: velocity is multiplied by 1 - velocity_decay each tick.
reheat_alpha: f32alpha restored on a graph change. Lower than 1 so a reveal nudges
rather than re-scrambling.
theta: f32Barnes-Hut accuracy. 0 is exact and O(n²); larger approximates more.
link_distance: f32Ideal edge length, in world units.
charge_strength: f32Many-body strength. Negative repels.
center_strength: f32Pull toward the centroid. Without it, disconnected components drift apart forever — the old (now-deleted) one-shot layout had no such force.
Trait Implementations§
Source§impl Clone for SimulationSpec
impl Clone for SimulationSpec
Source§fn clone(&self) -> SimulationSpec
fn clone(&self) -> SimulationSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more