Advertisement
xeromino

blob

Nov 27th, 2015
468
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onGLC(glc) {
  2.     glc.loop();
  3.     // glc.playOnce();
  4.     glc.size(540, 540);
  5.     glc.setDuration(2.5);
  6.     glc.setFPS(25);
  7.     // glc.setMode("single");
  8.     // glc.setEasing(false);
  9.    
  10.     var list = glc.renderList,
  11.         width = glc.w,
  12.         height = glc.h,
  13.         color = glc.color;
  14.  
  15.     // your code goes here:
  16.    
  17.     var gradient = color.createLinearGradient(0, -height/2, 0, height/2);
  18.     gradient.addColorStop(0, "#C04848");
  19.     gradient.addColorStop(1, "#480048");
  20.      
  21.     list.addRect({
  22.         x:width/2,
  23.         y:height/2,
  24.         w:width,
  25.         h:height,
  26.         fillStyle: gradient
  27.     });
  28.    
  29.    
  30.     var num = 50;
  31.     for (var i=0; i<num; i++) {
  32.         list.addOval({
  33.             x: width/2,
  34.             y: [height*.3, height*.7],
  35.             rx: 20+i*3,
  36.             ry: (20+i*3)/2,
  37.             lineWidth: 1,
  38.             strokeStyle: "rgba(255,255,255,.5)",
  39.             fill: false,
  40.             stroke: true,
  41.             lineWidth: 1,
  42.             phase: .35/num*i
  43.         });
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement