A basic biod swarming algorithm implemented in JavaScript and rendered with SVG.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
index.html
swarming.js

README.md

JS-Swarm

A basic biod swarming algorithm implemented in JavaScript and rendered with SVG.

Features

  • Basic biods.
  • Attractive/repulsive "emitters".
  • Predators!
  • Some real-time user interaction.

CONTROLS

  • [r] Resets the simulation

  • [k] Adds an attractive emitter of a random size and strength at the current mouse position.

  • [l] Adds a repulsive emitter of a random size and strength at the current mouse position.

  • [p] Adds a new predator at a random position.

  • [b] Adds a new biod at the current mouse position.

  • [Left Mouse Down] Pull the biods towards the mouse cursor.

  • [Left Mouse Down + Shift] Push the biods away from the mouse cursor.

LICENSE

Please use as you wish!