Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.size(400, 400);
- glc.setDuration(2);
- glc.setFPS(18);
- glc.setMode("single");
- // glc.setEasing(false);
- glc.setMaxColors(40);
- var r = 100, g = 0, b = 0;
- glc.styles.backgroundColor = "rgba("+r+","+g+","+b+",0.2)";
- // glc.styles.backgroundColor = "black";
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- var rad = 92, sideLen = 80, shapeHt = 69;
- rad*=2;
- sideLen*=2;
- shapeHt*=2;
- for (var i = 0; i < height+50; i+=shapeHt) {
- for (var j = 0; j < width+50; j+=sideLen) {
- if(i % (shapeHt*2) === 0) {
- var xpos = j+(sideLen/2);
- } else {
- var xpos = j;
- }
- list.addPoly({
- sides: 6,
- x: xpos+40,
- y: i+60,
- fill: false,
- stroke: true,
- strokeStyle: "white",
- lineWidth: 2,
- radius: rad,
- rotation: [30,-30],
- phase: i*0.06
- })
- };
- };
- for (var i = 0; i < height+50; i+=shapeHt) {
- for (var j = 0; j < width+50; j+=sideLen) {
- if(i % (shapeHt*2) === 0) {
- var xpos = j+(sideLen/2);
- } else {
- var xpos = j;
- }
- list.addPoly({
- sides: 6,
- x: xpos+40,
- y: i+60,
- fill: false,
- stroke: true,
- strokeStyle: "white",
- lineWidth: 2,
- radius: rad,
- rotation: [-30,30],
- phase: i*0.06
- })
- };
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement