Skip to content

Instantly share code, notes, and snippets.

@grifdail
Created January 17, 2018 12:56
Show Gist options
  • Save grifdail/680ed079c112c1c2b8ecf347a3cc9b8e to your computer and use it in GitHub Desktop.
Save grifdail/680ed079c112c1c2b8ecf347a3cc9b8e to your computer and use it in GitHub Desktop.
// Try on
// http://meshplayground.space/
var palette = randomPalette();
setBackgroundColor(palette[0])
scale(15)
for(var x = 0; x<10; x++) {
for(var y= 0; y<10; y++) {
push();
translate(x,y,-x-y);
var box = new Box(1);
setColor(palette[0])
addQuad(box.LTB, box.LBB, box.RBB, box.RTB);
setColor(palette[0])
addQuad(box.LBB, box.LTB, box.LTF, box.LBF);
setColor(palette[randomInt(1, palette.length)])
addQuad(box.RBB, box.LBB, box.LBF, box.RBF);
pop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment