Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.size(400, 400);
- glc.setDuration(3);
- // glc.setFPS(20);
- // glc.setMode("single");
- // glc.setEasing(false);
- glc.setMaxColors(10);
- glc.styles.backgroundColor = "black";
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- // your code goes here:
- var num=20;
- for (var k = 0; k < 7; k++) {
- for(var j=0;j<7;j++){
- for (var i=0; i<num; i++) {
- var offset1 = Math.random() * 300 - 150;
- var offset2 = Math.random() * 300 - 150;
- var verticalOffset = Math.random() * 30 - 15;
- var x = 40 +40 * j + 4*(i+1);
- var y = 40 + 40 * (k+1); // + verticalOffset
- list.addLine({
- lineWidth: 1,
- strokeStyle: "white",
- // var x =
- x0: x,
- y0: y,
- x1: [x + offset1, x + offset2],
- y1: [y + offset1, y - offset2]
- // phase: num*0.1
- });
- }
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment