Skip to content

Instantly share code, notes, and snippets.

View mebusila's full-sized avatar

Serban Carlogea mebusila

View GitHub Profile
var MosaicTiles = (function() {
var _tiles = [];
var generate = function(cols, rows) {
var _i = 0, _ii = 0;
_tiles = [];
while (_i < rows) {
var height = Math.floor(Math.random() * (rows / 2)) + 1;
_ii = 0;
while (_ii < cols) {
var width = Math.floor(Math.random() * (cols / 2)) + 1;