Fork Me on GitHub

Random-growth

Create random images on a canvas through recursion.

Download this project as a .zip file Download this project as a tar.gz file

Example


  var canvas = document.getElementById("canvas");
  canvas.width = window.innerWidth * .6;
  canvas.height = window.innerHeight / 2;
  var rg = new RandomGrowth(canvas.getContext("2d"), {spawnRate: 0.05,
                                                      spawnLife: 10,
                                                      speed: 55});