Skip to content

smithbower/JS-Swarm

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

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