Advertisement
xeromino

startwave

Nov 20th, 2015
155
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(30);
  6.         glc.styles.backgroundColor = "black";
  7.    
  8.         var list = glc.renderList,
  9.         width = glc.w,
  10.         height = glc.h
  11.             counter = 0
  12.             palette = ["#361C30", "#652131", "#873639", "#A95C38", "#D1863A"];
  13.  
  14.     for(var i = width; i > 15; i -= 15) {
  15.         var alpha = 1.0/width*i;
  16.         list.addStar({
  17.             x: width / 2,
  18.             y: height / 2,
  19.             outerRadius: [i*.75,i*1.5],
  20.             innerRadius: [i * 0.5, i * 0.75],
  21.             lineWidth: 1,
  22.             stroke: true,
  23.                     strokeStyle: "white",
  24.                     fillStyle: palette[counter%5],
  25.                     fill: true,
  26.             rotation: [0, 360/8],
  27.             phase: -i / width,
  28.             points: 6
  29.         })
  30.         counter++;
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement