Skip to content

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

Notifications You must be signed in to change notification settings

smithbower/JS-Swarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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!

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published