Advertisement
xeromino

iso3

Jan 4th, 2016
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onGLC(glc) {
  2.     glc.loop();
  3.     glc.size(540, 540);
  4.     glc.setDuration(4);
  5.     glc.setFPS(30);
  6.     glc.styles.backgroundColor = "#202020";
  7. //     glc.setMode('single');
  8. //     glc.setEasing(false);
  9.     var list = glc.renderList,
  10.         width = glc.w,
  11.         height = glc.h,
  12.         color = glc.color;
  13.  
  14.     // your code goes here:
  15.      
  16.     var tileWidth = 50,
  17.         tileHeight = tileWidth / 2;
  18.    
  19.     for(var y = 0; y < 7; y++) {
  20.         for(var x = 0; x < 7; x++) {
  21.             var xpos = width / 2 + (x - y) * tileWidth / 2,
  22.                 ypos = height*.6 + (x + y) * tileHeight / 2,
  23.                 hue = 20 + 2.5*x + 2.5
  24.             *y;
  25.             list.addIsobox({
  26.                 x: xpos,
  27.                 y: [ypos,ypos-100],
  28.                 size: tileWidth,
  29.                 h: [20,70],
  30.                 colorTop: color.hsv(hue, 1, 1),        
  31.                 colorLeft: color.hsv(hue, 1, 0.5),
  32.                 colorRight: color.hsv(hue, 1, 0.75),
  33.                 phase: 2-(x+y)/36
  34.             });
  35.         }
  36.     }
  37.    
  38.     for(var y = 0; y < 7; y++) {
  39.         for(var x = 0; x < 7; x++) {
  40.             var xpos = width / 2 + (x - y) * tileWidth / 2,
  41.                 ypos = height*.4 + (x + y) * tileHeight / 2,
  42.                 hue = 60 + 2.5*x + 2.5*y;
  43.             list.addIsobox({
  44.                 x: xpos,
  45.                 y: [ypos,ypos-100],
  46.                 size: tileWidth,
  47.                 h: [20,70],
  48.                 colorTop: color.hsv(hue, 1, 1),        
  49.                 colorLeft: color.hsv(hue, 1, 0.5),
  50.                 colorRight: color.hsv(hue, 1, 0.75),
  51.                 phase: 2-(x+y)/36
  52.             });
  53.         }
  54.     }
  55.  
  56.  
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement