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.styles.backgroundColor = "#1E023F";
- glc.setMode("single");
- glc.setEasing(false);
- var list = glc.renderList,
- width = glc.w,
- height = glc.h,
- color = glc.color,
- ox = width/2,
- oy = height/2;
- // your code goes here:
- var palette = ["#18DD00", "#E1C829", "#2FB5F3", "#FC82C3"];
- var num = 20, scal = 3;
- for (var i=0; i<num; i++) {
- var //px = Math.random(1)*width,
- px = width/num*i,
- py = Math.random(1)*height,
- lw = 4 + Math.random(1)*5,
- rad = 5 + Math.random(1)*15,
- p = Math.random(1),
- s= Math.round(1 + Math.random(3));
- list.addCircle({
- x: px,
- y: [py, py+height+rad*scal],
- fill: false,
- stroke: true,
- lineWidth: lw,
- radius: [rad, rad*scal],
- globalAlpha: 0.85,
- phase: p,
- speedMult: s,
- strokeStyle: palette[i%4]
- });
- for (var j=0; j<10; j++) {
- list.addCircle({
- x: px,
- y: [py, py+height+rad*scal],
- fill: false,
- stroke: true,
- lineWidth: lw+2*j,
- globalAlpha:0.1,
- radius: [rad, rad*scal],
- phase: p,
- speedMult: s,
- strokeStyle: palette[i%4]
- });
- }
- list.addCircle({
- x: px,
- y: [py-height-rad*scal, py],
- fill: false,
- stroke: true,
- lineWidth: lw,
- radius: [rad*scal, rad],
- globalAlpha: 0.8,
- phase: p,
- speedMult: s,
- strokeStyle: palette[i%4]
- });
- for (var j=0; j<10; j++) {
- list.addCircle({
- x: px,
- y: [py-height-rad*scal, py],
- fill: false,
- stroke: true,
- lineWidth: lw+2*j,
- globalAlpha:0.1,
- phase: p,
- speedMult: s,
- radius:[rad*scal, rad],
- strokeStyle: palette[i%4]
- });
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement