Advertisement
xeromino

jitters

Nov 27th, 2015
264
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(3);
  6.     glc.setFPS(30);
  7.     glc.styles.backgroundColor = "#202020";
  8.     // glc.setMode("single");
  9.     // glc.setEasing(false);
  10.    
  11.     var list = glc.renderList,
  12.         width = glc.w,
  13.         height = glc.h,
  14.         color = glc.color;
  15.  
  16.     // your code goes here:
  17.    
  18.     var gradient = color.createLinearGradient(0, -height/2, 0, height/2);
  19.     gradient.addColorStop(1, "#232526");
  20.     gradient.addColorStop(0, "#414345");
  21.    
  22.     /*
  23.     list.addRect({
  24.         x:width/2,
  25.         y:height/2,
  26.         w:width,
  27.         h:height,
  28.         fillStyle: gradient
  29.     });
  30.     */
  31.    
  32.     var num = 50;
  33.     for (var i=0; i<num; i++) {
  34.        // if (Math.random(1)>.3) {
  35.         list.addOval({
  36.             x: width/2,
  37.             y: [height*.3, height*.7],
  38.             rx: 20+i*3,
  39.             ry: (20+i*3)/2,
  40.             lineWidth: 1,
  41.             strokeStyle: "rgba(255,255,255,.5)",
  42.             fill: false,
  43.             stroke: true,
  44.             rotation: [0,180],
  45.             startAngle: [0,180],
  46.             endAngle: [180,360],
  47.             lineWidth: 1,
  48.             shake: 5,
  49.             phase: .25/num*i
  50.         });
  51.         //}
  52.     }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement