eriknau

25Days-25

Dec 25th, 2015
89
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(400, 400);
  4.      glc.setDuration(2);
  5. //     glc.setFPS(20);
  6. //     glc.setMode('single');
  7. //     glc.setEasing(false);
  8.     glc.styles.backgroundColor = "black";
  9.    
  10.     var list = glc.renderList,
  11.         width = glc.w,
  12.         height = glc.h,
  13.         color = glc.color;
  14.    
  15.     for(var j = -50; j<height+150; j+=50) {
  16.         if(j%100 === 0) {
  17.             list.addRect({
  18.                 x: -50,
  19.                 y: [j+50,j],
  20.                 w: width+100,
  21.                 h: 50,
  22.                 rotation: -20,
  23.                 fillStyle: "red",
  24.                 drawFromCenter: false
  25.             })
  26.         } else {
  27.             list.addRect({
  28.                 x: -50,
  29.                 y: [j+50,j],
  30.                 w: width+100,
  31.                 h: 50,
  32.                 rotation: -20,
  33.                 fillStyle: "green",
  34.                 drawFromCenter: false
  35.  
  36.             })
  37.         }
  38.     }
  39.     for (var i = 10; i > 0; i--) {
  40.        
  41.         var hue = 140;
  42.         list.addIsobox({
  43.             x: 200,
  44.             y: [i*29+80,i*20+80],
  45.             colorTop: color.hsv(hue, 1, 1),
  46.             colorRight: color.hsv(hue, 1, .75),
  47.             colorLeft: color.hsv(hue, 1, .4),
  48.             size: 30*i,
  49.             h: 50/i,
  50.             stroke: false,
  51.             lineWidth: 2,
  52.             phase: i*0.05,
  53.         });
  54.     }  
  55.     list.addStar({
  56.         x: 200,
  57.         y: [59, 49],
  58.         outerRadius: 40,
  59.         innerRadius: 20,
  60.         sides: 5,
  61.         fillStyle: "yellow",
  62.         rotation: -15
  63.     })
  64. }
Advertisement
Add Comment
Please, Sign In to add comment