Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onGLC(glc) {
- glc.loop();
- glc.size(200, 300);
- glc.setDuration(4);
- glc.setFPS(20);
- // glc.setMode("single");
- // glc.setEasing(false);
- glc.setMaxColors(200);
- glc.setQuality(1);
- glc.styles.backgroundColor = "rgba(30,30,30,1)";
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color;
- for (var i = 0; i < height; i++) {
- list.addLine({
- x0: Math.random()*-width,
- // x0: 0,
- y0: [i,i*2],
- x1:Math.random()*width+width,
- // x1: width,
- y1: [i*2,i],
- strokeStyle: color.rgb(50,0,50+i),
- lineWidth: 2,
- phase: i*0.009
- })
- };
- var gradient1 = color.createRadialGradient( -18, -22, 0, -36, -44, 85 );
- gradient1.addColorStop( 0, '#f8f' );
- gradient1.addColorStop( 0.6, '#33b' );
- gradient1.addColorStop( 0.9, '#111' );
- gradient1.addColorStop( 1, '#000' );
- var gradient2 = color.createRadialGradient( -18, -22, 0, -36, -44, 85 );
- gradient2.addColorStop( 0, '#525' );
- gradient2.addColorStop( 0.6, '#338' );
- gradient2.addColorStop( 0.9, '#111' );
- gradient2.addColorStop( 1, '#000' );
- list.addCircle({
- x: function(t) {
- return width/2 + Math.sin(t * Math.PI * 3.5) * 80;
- },
- y: [height+30,0],
- radius: [30,10],
- // fillStyle: [color.rgba(0,0,255,1),color.rgba(0,0,255,0.1)]
- fillStyle: [gradient1,gradient2]
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment