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 = "darkgrey";
- // 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 = 4;
- for (var j=0; j<parts; j++) {
- for (var i=0; i<num; i++) {
- var d = 50/num*i,
- s = 10-10/num*i,
- slice = 360/parts*j
- px = width/2 + Math.cos(Math.PI*2/parts*j)*25,
- py = height/2 + Math.sin(Math.PI*2/parts*j)*25 ;
- list.addCircle({
- x: px,
- y: py,
- rotation: -45,
- startAngle: [90*j-s, 90*j+s],
- endAngle: [90*(j+1)-s,90*(j+1)+s],
- radius: 200-200.0/num*i,
- stroke: true,
- strokeStyle: "rgba(255,255,255,.75)",
- lineWidth: .5,
- fillStyle: color.gray(0),
- phase: i/num,
- drawFromCenter: true
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement