Skip to content

Commit

Permalink
Change max_steps and step_dt
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin committed Jan 6, 2025
1 parent 4433721 commit c2bf6ad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/egui_kittest/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ impl<State> Default for HarnessBuilder<State> {
pixels_per_point: 1.0,
state: PhantomData,
renderer: Box::new(LazyRenderer::default()),
max_steps: 6,
step_dt: 1.0 / 6.0,
max_steps: 4,
step_dt: 1.0 / 4.0,
}
}
}
Expand All @@ -46,7 +46,8 @@ impl<State> HarnessBuilder<State> {

/// Set the maximum number of steps to run when calling [`Harness::run`].
///
/// Default is 6.
/// Default is 4.
/// With the default `step_dt`, this means 1 second of simulation.
#[inline]
pub fn with_max_steps(mut self, max_steps: u64) -> Self {
self.max_steps = max_steps;
Expand All @@ -55,7 +56,7 @@ impl<State> HarnessBuilder<State> {

/// Set the time delta for a single [`Harness::step`].
///
/// Default is 1.0 / 6.0 (6fps).
/// Default is 1.0 / 4.0 (4fps).
/// The default is low so we don't waste cpu waiting for animations.
#[inline]
pub fn with_step_dt(mut self, step_dt: f32) -> Self {
Expand Down

0 comments on commit c2bf6ad

Please sign in to comment.