File size: 2,553 Bytes
2086c64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html>
<head>
  <style>body{
  background-color:#2d2d2d;
  overflow:hidden;
}
body, html {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}
svg, #container{
  width:100%;
  height:800px;
  
}</style>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.16.1/TweenMax.min.js"></script>
</head>
<body>
  <div id="container">

<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In  -->
<svg id="mysvg" version="1.1"
	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
	 x="0px" y="0px" width="600px" height="600px" viewBox="0 0 600 600" enable-background="new 0 0 600 600" xml:space="preserve">
<defs>
  <filter id="goo" color-interpolation-filters="sRGB">
      <feGaussianBlur in="SourceGraphic" stdDeviation="9" result="blur" />
      <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 17 -7" result="cm" />
    
        <feComposite in="SourceGraphic" in2="cm" >
  	</filter>  
</defs>
<g id="circle-group" filter="url(#goo)">
  <g id="circles">
<circle class="top-circle" fill="#00367F" cx="30" cy="140" r="15"/>
<circle class="move-circle" fill="#00367F" cx="30" cy="240" r="2"/>
  </g>
  </g>
</svg>
  
  </div>
  <script>var container = document.getElementById('container');
var circles = document.querySelector('#circles');
var circleGroup = document.querySelector('#circle-group');
var mysvg = document.getElementById('mysvg');
var numDrips = 16;
var colorOffset = 60;
var colorMult = 400;

for(var i = 0; i < numDrips; i++){
   var c = circles.cloneNode(true);
  circleGroup.appendChild(c); 
  TweenMax.set(c, {
    x:i * 34

  })
  
  TweenMax.set([c.childNodes[3], c.childNodes[1]], {
    fill:"hsla(" + ((i - colorMult) / numDrips * colorOffset) + ",100%,50%, 1)"
  })

}

circleGroup.removeChild(circles)


TweenMax.set([container], {
  position:'absolute',
  left:'50%',
  xPercent:-50
})

var tl = new TimelineMax({repeat:-1, paused:false, repeatDelay:0, immediateRender:false, yoyo:false,});
tl.timeScale(1);

tl.staggerTo('.move-circle', 3, {
  attr:{
    cy:140,
    r:15
  },
  ease:Bounce.easeOut
}, 0.2)
.staggerTo('.top-circle', 3, {
  attr:{
    cy:240,
    r:2
  },
  ease:Bounce.easeOut
}, 0.2, '-=6')

.staggerTo('.move-circle', 2, {
  attr:{
    cy:240,
    r:2
  },
  ease:Back.easeInOut.config(1)
}, 0.2, '-=2')

.staggerTo('.top-circle', 2, {
  attr:{
    cy:140,
    r:15
  },
  ease:Back.easeInOut.config(1)
}, 0.2, '-=6')

</script>
</body>
</html>