This demo uses Web Workers and A* pathfinding (with a Min-Heap) to navigate agents (boids) through a procedural voxel world. Visualization uses shader-based points or cubes.
Click a lit face in the world to set a global target (Orange Sphere
). Boids will pathfind once and stop upon arrival. Click empty space to clear the target; idle boids will then start pathing to random locations (staggered).
Play with all the controls! Adjust sliders like Boid Count, Worker Count, Max Path Nodes, and Worker Viz Sample Limit to see how they impact performance (FPS, Worker Load, Path Speed). Tweak visual sliders like World Opacity or toggle the A* Viz / Boid Paths checkboxes.
Apply & Regenerate World
button at the bottom will pulse yellow/orange when changes requiring regeneration are pending.Cyan
/Magenta
Points/Cubes: A* Nodes (sampled, accumulated, flashed)G
/Y
/R
: Boid Path Line (toggleable, slider for opacity, color indicates length)Gray
/Blue
/Reddish
/Color
: Boid State (Idle/Seek/Failed/Move)Orange Sphere
: Global TargetVibecoded April 9th, 2024 by Trent Sterling & Gemini 2.5