Created
December 26, 2020 22:41
-
-
Save phivk/e68b8ff110e10ab504f8162487e0e37f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Inspired by Blocks by Dave Whyte:
https://dribbble.com/shots/1783699-Blocks