Manuscript grid
The simplest possible grid system.
var r = new Rune({ container: "#canvas", width: 600, height: 400, debug: true }); // Create a rectangle to fill the entire screen // and a smaller rectangle on top var grid = r.grid({ x: 50, y: 50, width: r.width - 100, height: r.height - 100, columns: 1, rows: 1 }); var size = 40; for(var i = 0; i < 50; i++) { var color = new Rune.Color(Rune.random(0, 255), Rune.random(0, 255), Rune.random(0, 255)); var x = Rune.random(size, grid.state.width - size); var y = Rune.random(size, grid.state.height - size); var circle = r.circle(x, y, size).fill(color).stroke(false); grid.add(circle, 1, 1); } r.draw();
< Back to examples