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(1.5);
- glc.setFPS(30);
- glc.styles.backgroundColor = "#202020";
- // 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 = 30, parts = 7;
- for (var j=0; j<parts; j++) {
- var f = 360.0/parts*j,
- a = 360.0/parts;
- for (var i=0; i<num; i++) {
- var d = 15/num*i,
- s = 10/num*i,
- slice = 360/parts*j,
- px = width/2 + Math.cos(Math.PI*2/parts*j)*35,
- py = height/2 + Math.sin(Math.PI*2/parts*j)*35;
- list.addCircle({
- x: px,
- y: py,
- rotation: -(360.0/parts)/2,
- startAngle: [a*j-s, a*j+s],
- endAngle: [a*(j+1)-s,a*(j+1)+s],
- radius: 200-200.0/num*i,
- stroke: true,
- strokeStyle: "rgba(20,20,20,.75)",
- lineWidth: .5,
- fillStyle: color.hsv(f,.9,.9),
- phase: i/num,
- drawFromCenter: true
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement