Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- // glc.playOnce();
- glc.size(540, 540);
- glc.setDuration(2.5);
- glc.setFPS(40);
- glc.setMode("single");
- // glc.setEasing(false);
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color,
- ox = width/2,
- oy = height/2,
- TWO_PI = Math.PI*2;
- // your code goes here:
- var num = 20;
- for (var i=0; i<num; i++) {
- var rad = 25+i*10
- offSet = Math.random()*360,
- end = 45+Math.random()*90;
- list.addCircle({
- x:ox,
- y:oy,
- radius: rad,
- lineWidth:25,
- rotation: i%2===0?[offSet,offSet+360]:[offSet,offSet-360],
- startAngle: 0,
- endAngle: end,
- strokeStyle: i%3===0?"white":"black",
- fill: false,
- stroke: true,
- phase: i/num,
- lineCap: "square"
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement