From 7870275bbfb779ee9e90fd845bc240a2bc8f5686 Mon Sep 17 00:00:00 2001 From: Aevyrie Date: Mon, 23 Dec 2024 18:23:00 -0800 Subject: [PATCH] Fix example defaults, doc comment --- examples/spatial_hash.rs | 17 +++++------------ src/commands.rs | 3 +-- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/examples/spatial_hash.rs b/examples/spatial_hash.rs index 4e444aa..c72487f 100644 --- a/examples/spatial_hash.rs +++ b/examples/spatial_hash.rs @@ -31,11 +31,12 @@ fn main() { .run(); } -const N_ENTITIES: usize = 1_000_000; +// Try bumping this up to really stress test. I'm able to push a million entities with an M3 Max. +const N_ENTITIES: usize = 100_000; const HALF_WIDTH: f32 = 40.0; const CELL_WIDTH: f32 = 10.0; // How fast the entities should move, causing them to move into neighboring cells. -const MOVEMENT_SPEED: f32 = 5e6; +const MOVEMENT_SPEED: f32 = 5.0; const PERCENT_STATIC: f32 = 0.9; #[derive(Component)] @@ -137,15 +138,7 @@ fn draw_partitions( fn move_player( time: Res