Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.size(540, 540);
- glc.setDuration(4);
- glc.setFPS(30);
- glc.styles.backgroundColor = "#202020";
- // glc.setMode('single');
- // glc.setEasing(false);
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- // your code goes here:
- var tileWidth = 50,
- tileHeight = tileWidth / 2;
- for(var y = 0; y < 7; y++) {
- for(var x = 0; x < 7; x++) {
- var xpos = width / 2 + (x - y) * tileWidth / 2,
- ypos = height*.6 + (x + y) * tileHeight / 2,
- hue = 20 + 2.5*x + 2.5
- *y;
- list.addIsobox({
- x: xpos,
- y: [ypos,ypos-100],
- size: tileWidth,
- h: [20,70],
- colorTop: color.hsv(hue, 1, 1),
- colorLeft: color.hsv(hue, 1, 0.5),
- colorRight: color.hsv(hue, 1, 0.75),
- phase: 2-(x+y)/36
- });
- }
- }
- for(var y = 0; y < 7; y++) {
- for(var x = 0; x < 7; x++) {
- var xpos = width / 2 + (x - y) * tileWidth / 2,
- ypos = height*.4 + (x + y) * tileHeight / 2,
- hue = 60 + 2.5*x + 2.5*y;
- list.addIsobox({
- x: xpos,
- y: [ypos,ypos-100],
- size: tileWidth,
- h: [20,70],
- colorTop: color.hsv(hue, 1, 1),
- colorLeft: color.hsv(hue, 1, 0.5),
- colorRight: color.hsv(hue, 1, 0.75),
- phase: 2-(x+y)/36
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement