cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600">
  <defs>
   <circle class="dot" cx="0" cy="0" r="0" fill="#FFFCF9"/> 
  	<clipPath id="dripMask">

        <circle cx="400" cy="300" r="60" fill="#FFF"/>
  	</clipPath>
  <filter id="goo">
      <feGaussianBlur in="SourceGraphic" stdDeviation="8" 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 20 -9" result="cm" />
      <feBlend/>
  	</filter>   
  </defs>

      <g clip-path="url(#dripMask)">
      <g  filter="url(#goo)">
       <ellipse class="ring" cx="400" cy="300" rx="60" ry="60" fill="none" stroke="#FFFCF9" stroke-width="20"/>
        <ellipse id="drip" cx="400" cy="190" rx="20" ry="50" fill="#FFFCF9" stroke="#FFFCF9" />
      </g>
       <ellipse class="ring" cx="400" cy="300" rx="60" ry="60" fill="none" stroke="#FFFCF9" stroke-width="10"/>
</g>
  </g>
<g id="dotContainer"></g>
</svg>

            
          
!
            
              body {
 background-color: #0071bc;
 overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center; 
}

body,
html {
 height: 100%;
 width: 100%;
 margin: 0;
 padding: 0;
}

svg {
 width: 100%;
 height: 100%;
 visibility: hidden;
 
}
            
          
!
            
              class DripLoader {
 
 
 select = (s) => {return document.querySelector(s);}
 selectAll = (s) => {return document.querySelectorAll(s);} 
 mainTl = new TimelineMax({repeat:-1});
 dotContainer = this.select('#dotContainer')
 dotArray = []

 
  constructor(){
    
   //const 
   
   const tl = new TimelineMax();
   this.mainTl.add(tl);
   
   //return 
   let numDots = 23, clone;
   while(--numDots > -1){
    clone = this.select('.dot').cloneNode(true);
    this.dotContainer.appendChild(clone);
    this.dotArray.push(clone);
   }
   
   

   tl.to('#drip', 1, {
    y:80,
    transformOrigin:'50% 50%',
    ease:Power2.easeIn
   })
   .to('#drip', 1, {
    y:110,
    ease:Elastic.easeOut.config(0.6,0.24)
   })
   .to('#drip', 1.5, {
    attr:{
     rx:28,
     ry:28
    },
    ease:Elastic.easeOut.config(0.8,0.23)
   },'-=1')
   .to('#drip', 1, {
    scale:1.17,
    ease:Expo.easeIn
   })
   .addCallback(this.playParticles)

  }
 
  playParticles = (obj)=> {

   let d = this.dotArray, i = d.length;
   
   for(let p of d){
    
    TweenMax.set(p, {
     attr:{
      r:4
     },
     x: 400,
     y: 300,
     scale:this.randomBetween(1, 23) / 10,
     transformOrigin: '50% 50%'
    })
    
    let tl = new TimelineMax();
     tl.to(p, this.randomBetween(1, 23) / 10, {
      physics2D: {
       velocity: this.randomBetween(240, 370),
       angle: this.randomBetween(-180, 180),
       gravity: this.randomBetween(550, 600)
      },
      scale: 0,
      onComplete: this.completeParticle,      
      alpha: 1
     });
   }
   
  } 
 
  randomBetween(min, max) {
   return Math.floor(Math.random() * (max - min + 1) + min);
  }
 
  get timeline():boolean {
    return this.mainTl;
  }
 
}


TweenMax.set('svg', {
  visibility: 'visible'
})

var dripLoader = new DripLoader();

//TweenMax.globalTimeScale(0.5)
            
          
!
999px
Loading ..................

Console