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.styles.backgroundColor = "rgba(255,255,255,.3)";
- // glc.setEasing(false);
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- // your code goes here:
- var edge = width/4
- num = 4,
- sz = (width-2*edge)/num;
- for (var x=edge; x<=width-edge; x+=sz) {
- for (var y=edge; y<=height-edge; y+=sz){
- var s2=6, s = Math.floor(3+Math.random()*s2),
- r = Math.random()*360;
- if (Math.random()*1>.1){
- list.addPoly({
- x: x,
- y: y,
- sides: s,
- rotation: [r,r+360],
- lineWidth: 1,
- //fill:false,
- fillStyle: "rgba(255,0,125,.3)",
- //fillStyle: color.hsv(360/s2*s,.8,.8),
- stroke: true,
- strokeStyle: "rgba(0,0,0,.8)",
- radius: sz*.4,
- shake: 5
- });
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement