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