Advertisement
xeromino

star

Nov 20th, 2015
230
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);
  5.     glc.setFPS(30);
  6.         glc.styles.backgroundColor = "black";
  7.    
  8.     var list = glc.renderList,
  9.         width = glc.w,
  10.         height = glc.h;
  11.  
  12.     for(var i = 15; i < width; i += 15) {
  13.         var alpha = 1.0/width*i;
  14.         list.addStar({
  15.             x: width / 2,
  16.             y: height / 2,
  17.             outerRadius: [i,i*1.25],
  18.             innerRadius: [i * 0.5, i * 0.75],
  19.             lineWidth: 1,
  20.             stroke: true,
  21.                     strokeStyle: "rgba(255,255,255," + alpha +")",
  22.                     fill: false,
  23.             rotation: [0, 360/4],
  24.             phase: -i / width/2,
  25.             points: 5
  26.         })
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement