/wasm-boids

🕊️ Flocking Birds as WebAssembly NPM package

Primary LanguageRustMIT LicenseMIT

wasm-boids

Flocking Birds as WebAssembly NPM package thanks to wasm-pack.

https://www.npmjs.com/package/wasm-boids

Built with 🦀🕸 by nSimon based on work from The Rust and WebAssembly Working Group

📚 About

Demo available @ nsimon.fr 👀

Implements Boid, Vec2d, Universe & Rules - scales better than my previous JS-based implementation.

Based on the original paper on Boids by Craig Reynolds and the wasm tutorial wasm-game-of-life.

🚴 Usage

Example in HTML Canvas thanks to PixiJS: 1000-random sized and colored boid with wall avoidance and mouse attraction => example

📝 TODO

  • Better boid detection (Currently very naive box detection - should consider using Parry)
  • 3D implementation