Skip to content

Instantly share code, notes, and snippets.

@phivk
Created December 26, 2020 22:41
Show Gist options
  • Save phivk/e68b8ff110e10ab504f8162487e0e37f to your computer and use it in GitHub Desktop.
Save phivk/e68b8ff110e10ab504f8162487e0e37f to your computer and use it in GitHub Desktop.
function onGLC(glc) {
glc.loop();
glc.size(400, 400);
// glc.setDuration(5);
// glc.setFPS(20);
// glc.setMode('single');
// glc.setEasing(false);
var list = glc.renderList,
width = glc.w,
height = glc.h,
color = glc.color;
var color0 = "#EEE";
var color1 = "#5287A5";
var color2 = "#81C8A8";
var color3 = "#373C94";
glc.styles.backgroundColor = color1;
var tileWidth = 40,
tileHeight = tileWidth / 2;
var tilesAmount = 6
for(var y = 0; y < tilesAmount; y++) {
for(var x = 0; x < tilesAmount; x++) {
var xpos = width / 2 + (x - y) * tileWidth / 2,
ypos = 140 + (x + y) * tileHeight / 2;
list.addIsobox({
x: xpos,
y: [ypos, ypos + 100],
size: tileWidth,
h: 100,
phase: (x - y) / 20,
colorTop: color1,
colorLeft: color2,
colorRight: color3,
});
}
}
}
@phivk
Copy link
Author

phivk commented Dec 26, 2020

wave gif-colors

Inspired by Blocks by Dave Whyte:
https://dribbble.com/shots/1783699-Blocks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment