Advertisement
xeromino

arcs

Jan 13th, 2016
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.23 KB | None | 0 0
  1. function onGLC(glc) {
  2.     glc.loop();
  3.     // glc.playOnce();
  4.     glc.size(540, 540);
  5.     glc.setDuration(2.5);
  6.     glc.setFPS(30);
  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.         ox = width/2,
  15.         oy = height/2,
  16.         TWO_PI = Math.PI*2;
  17.  
  18.     // your code goes here:
  19.  
  20.     var num = 30;
  21.    
  22.     for (var i=0; i<num; i++) {
  23.         var rad = 25+i*5
  24.             offSet = Math.random()*360,
  25.             end = 90+Math.random()*90;
  26.         list.addCircle({
  27.             x:ox,
  28.             y:oy,
  29.             radius: rad,
  30.             lineWidth:17,
  31.             rotation: i%2===0?[offSet,offSet+360]:[offSet,offSet-360],
  32.             startAngle: 0,
  33.             endAngle: end,
  34.             //drawFromCenter: true,
  35.             //strokeStyle: i%3===0?"white":color.randomHSV(0, 360, .8,1, .8, 1),
  36.             //strokeStyle: i%3===0?"white":color.hsv(360-360/num*i, 1, 1),
  37.             strokeStyle: "white",
  38.             fill: false,
  39.             stroke: true,
  40.             phase: num/i,
  41.             lineCap: "square",
  42.             shadowColor: "rgba(0, 0, 0, 0.9)" ,
  43.             shadowOffsetX: 10,
  44.             shadowOffsetY: 10,
  45.             shadowBlur: 10,
  46.         });
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement