Skip to content

Instantly share code, notes, and snippets.

@drewbo
Created December 13, 2014 19:00
Show Gist options
  • Save drewbo/6214d89496179fa62527 to your computer and use it in GitHub Desktop.
Save drewbo/6214d89496179fa62527 to your computer and use it in GitHub Desktop.
EaKEYo
<body><canvas id="myCanvas" width="300" height="300"
style="border:1px solid #000000;">
</canvas></div>
</body>
var data = [[10,10,1,1,1],[10,20,1,1,1],[10,30,1,1,1],[10,40,1,1,1],[20,10,1,1,1],[20,20,1,1,1],[20,30,1,1,1],[20,40,1,1,1],[30,10,1,1,1],[30,20,1,1,1],[30,30,1,1,1]]
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
setInterval(function(){
ctx.moveTo(Math.random()*300,Math.random()*300);
ctx.lineTo(150,150);
ctx.stroke();
},100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment