2016-12-31 16:35:14 -05:00
|
|
|
// 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");
|
2016-12-31 12:18:01 -05:00
|
|
|
dotgrid.install();
|
|
|
|
|
2016-12-31 12:37:10 -05:00
|
|
|
var keyboard = new Keyboard();
|
|
|
|
document.onkeyup = function myFunction(){ keyboard.listen(event); };
|
|
|
|
|
2016-12-31 12:18:01 -05:00
|
|
|
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);
|