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);
- glc.setFPS(30);
- glc.setMode("single");
- glc.styles.backgroundColor = "#202020";
- // glc.setEasing(false);
- var list = glc.renderList,
- width = glc.w,
- height = glc.h;
- // your code goes here:
- var rad = 75;
- var col1 = "rgba(119,119,119,.5)", col2 = "#FCD300";
- list.addPoly({
- x: width/2,
- y: height/2,
- sides:6,
- rotation: [-90,0],
- fillStyle: "darkgrey",
- radius: [0,rad]
- });
- var TWO_PI = Math.PI*2;
- var d = width*.75;
- var num = 10;
- for (var i=0; i<num; i++){
- var destX = width/2 + Math.cos(TWO_PI/num*i)*d;
- var destY = height/2 + Math.sin(TWO_PI/num*i)*d;
- list.addPoly({
- x: [width/2, destX],
- y: [height/2, destY],
- sides: 6,
- rotation: [0,180],
- radius: [rad,5],
- fillStyle: [col1, col2]
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement