Almost there

This commit is contained in:
Devine Lu Linvega
2017-11-05 14:52:05 +14:00
parent 6a4dae83ae
commit 6b8e08e41f
32 changed files with 580 additions and 41 deletions

10
sources/scripts/init.js Normal file
View File

@@ -0,0 +1,10 @@
// width,height,grid_x,grid_y,block_x,block_y,thickness,linecap, color
dotgrid = new Dotgrid(300,300,31,31,5,5, 10,"square","#000000");
dotgrid.install();
var keyboard = new Keyboard();
document.onkeyup = function myFunction(){ keyboard.listen(event); };
document.addEventListener('mousedown', function(e){ dotgrid.mouse_down(e); }, false);
document.addEventListener('mousemove', function(e){ dotgrid.mouse_move(e); }, false);
document.addEventListener('mouseup', function(e){ dotgrid.mouse_up(e);}, false);