Skip to content

Instantly share code, notes, and snippets.

@jywarren
Last active October 1, 2015 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jywarren/5b1d1ff67d2820a3c652 to your computer and use it in GitHub Desktop.
Save jywarren/5b1d1ff67d2820a3c652 to your computer and use it in GitHub Desktop.
onRun = function () {
if (ant.age < 300) {
ant.direction += Math.random()*10-5;
ant.trail('blue', 50); // x, y, rgb, amount
} else {
ant.speed = 0;
ant.color = "grey";
}
}
onBump = function () {
this.direction += 90;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment