Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="container">
            <div id="yayTxt">
                <svg id="YAYSVG" style="width:480px; height:auto;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480.14 236.4">
                    <defs>
                        <linearGradient id="gradient1" x1="0%" y1="0%" x2="0%" y2="0%" spreadMethod="pad">
                            <stop id="stop2" stop-color="#FFFFFF" offset="0%" stop-opacity="0"></stop>
                            <stop id="stop1" stop-color="#FFFFFF" offset="100%" stop-opacity="1"></stop>
                        </linearGradient>

                        <mask id="mask4" x="0" y="0" width="480.14" height="236.4" >
                            <rect x="0" y="0"  width="480.14" height="236.4"
                                style="stroke:none; fill: url(#gradient1)"/>
                        </mask>
                    <style>
                      .cls-1 {
                        fill: #ad4660;
                      }

                      .cls-2{
                        fill: #FFF;
                      }
                      
                      .cls-3 {
                        fill: #FFF;
                      }

                      .cls-3 {
                        stroke: #FFF;
                        stroke-miterlimit: 10;
                      }
                    </style>
                  </defs>
                  <title>YAYFizz</title>
                  <rect class="cls-1" width="480.14" height="236.4"/>
                    
                   <!-- <rect width="100" height="100" fill="green" stroke="blue" mask="url(#fade)"/>-->
                 <g id="mainYAY" mask="url(#mask4)">
              <!--    <g id="mainYAY"> -->     
                      <path id="_" data-name="!" class="cls-2" d="M422.41,87.36l49.48-.47-8.52,90.86c-8.2-2.12-22.56-2-30.72.29Zm25.67,97.92c13-.12,21.63,9.17,21.74,21.35,0.12,12.57-8.37,21.63-21.34,21.75S426.85,219.6,426.73,207C426.62,194.86,435.11,185.4,448.08,185.27Z"/>
                      <path id="Y2" class="cls-2" d="M370.28,227.27l-43,.41-0.44-46.31-46-91.22,47.3-.45L348,139.57l18.84-50.24,47.3-.45L369.85,181Z"/>
                      <path id="A" class="cls-2" d="M300.32,227.93l-43.36.41L251,207.5l-42.37.4-5.32,20.94-43.36.41L206.78,90.84l44.15-.42Zm-82.7-54.41,23.85-.23-12.24-44Z"/>
                      <path id="Y1" class="cls-2" d="M133,229.51l-43,.41L89.59,183.6l-46-91.22,47.3-.45,19.79,49.88,18.84-50.24,47.3-.45-44.27,92.07Z"/>
                      <g id="bubblesContra">
                        <g id="LEFT">
                            <g class="tier1">
                                <circle id="PB1" class="startZero cls-3" cx="53.79" cy="77.36" r="4.63"/>
                                <circle id="PB2" class="startZero cls-3" cx="70.51" cy="78.49" r="4.63"/>
                                <circle id="PB12" class="startZero cls-3" cx="46.37" cy="81.51" r="2.32"/>    
                            </g>

                            <g class="tier3">
                                <circle id="PB7" class="startZero cls-3" cx="31.4" cy="50.5" r="2.32"/>
                                <circle id="PB9" class="startZero cls-3" cx="45.81" cy="42.45" r="1.59"/>
                                <circle id="PB11" class="startZero cls-3" cx="35.38" cy="52.39" r="2.32"/>
                                <circle id="PB13" class="startZero cls-3" cx="71.17" cy="49.54" r="2.32"/>
                                <circle id="PB15" class="startZero cls-3" cx="75.09" cy="45.67" r="2.32"/>
                            </g>
                            <g class="tier2">
                                <circle id="PB3" class="startZero cls-3" cx="96.71" cy="62.44" r="3.48"/>
                                <circle id="PB4" class="startZero cls-3" cx="58.16" cy="63.82" r="3.48"/>
                                <circle id="PB5" class="startZero cls-3" cx="80.04" cy="66.83" r="3.48"/>
                                <circle id="PB6" class="startZero cls-3" cx="56.19" cy="58.7" r="3.48"/>
                                <circle id="PB8" class="startZero cls-3" cx="46.61" cy="65.22" r="2.32"/>
                                <circle id="PB10" class="startZero cls-3" cx="35.49" cy="63.95" r="2.32"/>    
                                <circle id="PB14" class="startZero cls-3" cx="69.17" cy="61.32" r="2.32"/>
                            </g>

                            <g id="baseL">
                                <circle id="PB16" class="startZero cls-3" cx="84.71" cy="84.92" r="4.63"/>
                                <circle id="PB17" class="startZero cls-3" cx="49.93" cy="89.98" r="4.63"/>
                                <circle id="PB18" class="startZero cls-3" cx="72.92" cy="88.28" r="7.16"/>
                                <circle id="PB19" class="startZero cls-3" cx="62.26" cy="88.85" r="6.37"/>
                                <circle id="PB20" class="startZero cls-3" cx="65.9" cy="91.75" r="5.21"/>
                                <circle id="PB21" class="startZero cls-3" cx="55.97" cy="89.97" r="4.63"/>
                                <circle id="PB22" class="startZero cls-3" cx="82.38" cy="92.24" r="4.63"/>
                            </g>
                        </g>
                        <g id="right">
                            <g class="tier1">
                                <circle id="PB34" class="startZero cls-3" cx="155.37" cy="80.26" r="6.76"/>
                                <circle id="PB23" class="startZero cls-3" cx="136.71" cy="77.86" r="3.48"/>
                                <circle id="PB25" class="startZero cls-3" cx="174.47" cy="71.04" r="3.48"/>
                                <circle id="PB27" class="startZero cls-3" cx="145.6" cy="66.85" r="2.51"/>
                                <circle id="PB29" class="startZero cls-3" cx="173.29" cy="66.28" r="2.51"/>
                                <circle id="PB33" class="startZero cls-3" cx="162.94" cy="65.4" r="4.45"/>
                            </g>
                            <g class="tier2">
                                <circle id="PB26" class="startZero cls-3" cx="135.84" cy="60.52" r="2.51"/>
                                <circle id="PB28" class="startZero cls-3" cx="176.63" cy="54.53" r="2.51"/>
                                <circle id="PB30" class="startZero cls-3" cx="145.68" cy="48.65" r="2.51"/>
                                <circle id="PB31" class="startZero cls-3" cx="159.51" cy="50.98" r="2.51"/>
                            </g>
                            <g class="tier3">
                                <circle id="PB24" class="startZero cls-3" cx="158.86" cy="41.97" r="1.59"/>
                                <circle id="PB32" class="startZero cls-3" cx="168.44" cy="35.54" r="1.53"/>
                            </g>
                          <g id="baseR">
                            <circle id="PB35" class="startZero cls-3" cx="146.31" cy="87.65" r="7.85"/>
                            <circle id="PB36" class="startZero cls-3" cx="165.42" cy="92.58" r="3.48"/>
                            <circle id="PB37" class="startZero cls-3" cx="164.95" cy="80.86" r="4.63"/>
                            <circle id="PB38" class="startZero cls-3" cx="134.91" cy="89.52" r="4.63"/>
                            <circle id="PB39" class="startZero cls-3" cx="174.89" cy="90.49" r="4.63"/>
                            <circle id="PB40" class="startZero cls-3" cx="154.5" cy="91.24" r="4.63"/>
                            <circle id="PB41" class="startZero cls-3" cx="159.93" cy="87.92" r="4.63"/>
                          </g>
                        </g>
                      </g>
                </g>
                </svg>
            </div>
        </div>
              
            
!

CSS

              
                .startZero{
   opacity: 0;
}

body{
   background-color: #ad4660;
}
              
            
!

JS

              
                function inuit(){
            var randomeBase = [0.9, 1.3];
            var randomeTier1 = [1.35, 2.00];
            var randomeTier2 = [1.75, 2.35];
            var randomeTier3 = [2.35, 3.00];
            
            var baseLTL = new TimelineLite();
            baseLTL.add('begin')
                .add(moveFromBubble("#PB16", getRandomArbitrary(randomeBase[0], randomeBase[1]), -5, 15, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB17", getRandomArbitrary(randomeBase[0], randomeBase[1]), 5, 10, "out"),"begin+=0.1")
                .add(moveFromBubble("#PB18", getRandomArbitrary(randomeBase[0], randomeBase[1]), 0, 10, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB19", getRandomArbitrary(randomeBase[0], randomeBase[1]), 0, 12, "out"),"begin+=0.1")
                .add(moveFromBubble("#PB20", getRandomArbitrary(randomeBase[0], randomeBase[1]), 5, 5, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB21", getRandomArbitrary(randomeBase[0], randomeBase[1]), 5, 10, "out"),"begin+=0.1")
                .add(moveFromBubble("#PB22", getRandomArbitrary(randomeBase[0], randomeBase[1]), 5, 10, "out"),"begin+=0.0")
            
            var tier1LTL = new TimelineLite();
            tier1LTL.add('begin')
                .add(moveFromBubble("#PB1", getRandomArbitrary(randomeTier1[0], randomeTier1[1]), 15, 25, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB2", getRandomArbitrary(randomeTier1[0], randomeTier1[1]), 5, 20, "out"),"begin+=0.1")
                .add(moveFromBubble("#PB12", getRandomArbitrary(randomeTier1[0], randomeTier1[1]), 10, 20, "out"),"begin+=0.0")
               
            var tier2LTL = new TimelineLite();
            tier2LTL.add('begin')
                .add(moveFromBubble("#PB3", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), -12, 40, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB4", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), 10, 35, "out"),"begin+=0.1")
                .add(moveFromBubble("#PB5", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), 5, 30, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB6", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), 10, 38, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB8", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), 15, 35, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB10", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), 20, 35, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB14", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), 10, 35, "out"),"begin+=0.0")
            
            var tier3LTL = new TimelineLite();
            tier3LTL.add('begin')
                .add(moveFromBubble("#PB7", getRandomArbitrary(randomeTier3[0], randomeTier3[1]), 20, 50, "in"),"begin+=0.0")
                .add(moveFromBubble("#PB9", getRandomArbitrary(randomeTier3[0], randomeTier3[1]), 20, 55, "in"),"begin+=0.1")
                .add(moveFromBubble("#PB11", getRandomArbitrary(randomeTier3[0], randomeTier3[1]), 20, 45, "in"),"begin+=0.0")
                .add(moveFromBubble("#PB13", getRandomArbitrary(randomeTier3[0], randomeTier3[1]), 10, 48, "in"),"begin+=0.0")
                .add(moveFromBubble("#PB15", getRandomArbitrary(randomeTier3[0], randomeTier3[1]), 10, 50, "in"),"begin+=0.0")
        
            var baseRTL = new TimelineLite();
            baseRTL.add('begin')
                .add(moveFromBubble("#PB35", getRandomArbitrary(randomeBase[0], randomeBase[1]), 0, 12, "out"),"begin+=0.1")
                .add(moveFromBubble("#PB36", getRandomArbitrary(randomeBase[0], randomeBase[1]), -5, 10, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB37", getRandomArbitrary(randomeBase[0], randomeBase[1]), 0, 12, "out"),"begin+=0.1")
                .add(moveFromBubble("#PB38", getRandomArbitrary(randomeBase[0], randomeBase[1]), -2, 7, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB39", getRandomArbitrary(randomeBase[0], randomeBase[1]), -5, 5, "out"),"begin+=0.1")
                .add(moveFromBubble("#PB40", getRandomArbitrary(randomeBase[0], randomeBase[1]), 0, 5, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB41", getRandomArbitrary(randomeBase[0], randomeBase[1]), 5, 10, "out"),"begin+=0.1")
            
            var tier1RTL = new TimelineLite();
            tier1RTL.add('begin')
                .add(moveFromBubble("#PB34", getRandomArbitrary(randomeBase[0], randomeBase[1]), -5, 20, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB23", getRandomArbitrary(randomeTier1[0], randomeTier1[1]), 5, 20, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB25", getRandomArbitrary(randomeTier1[0], randomeTier1[1]), -5, 25, "out"),"begin+=0.1")
                .add(moveFromBubble("#PB27", getRandomArbitrary(randomeTier1[0], randomeTier1[1]), 5, 30, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB29", getRandomArbitrary(randomeTier1[0], randomeTier1[1]), -10, 30, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB33", getRandomArbitrary(randomeTier1[0], randomeTier1[1]), -7, 30, "out"),"begin+=0.0")
            
           var tier2RTL = new TimelineLite();
            tier2RTL.add('begin')
                .add(moveFromBubble("#PB26", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), 5, 40, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB28", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), -15, 45, "out"),"begin+=0.1")
                .add(moveFromBubble("#PB30", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), 0, 50, "out"),"begin+=0.0")
                .add(moveFromBubble("#PB31", getRandomArbitrary(randomeTier2[0], randomeTier2[1]), -5, 45, "out"),"begin+=0.0")
              
        
            var tier3RTL = new TimelineLite();
            tier3RTL.add('begin')
                .add(moveFromBubble("#PB24", getRandomArbitrary(randomeTier3[0], randomeTier3[1]), -10, 55, "in"),"begin+=0.0")
                .add(moveFromBubble("#PB32", getRandomArbitrary(randomeTier3[0], randomeTier3[1]), -10, 60, "in"),"begin+=0.1")
    
            
            var adTL = new TimelineLite();
            adTL.add('sT',"+=1.5")
                .add(baseLTL, "sT+=0.0")
                .add(baseRTL, "sT+=0.0")
                .add(tier1LTL, "sT+=0.2")
                .add(tier1RTL, "sT+=0.2")
                .add(tier2LTL, "sT+=0.3")
                .add(tier2RTL, "sT+=0.3")
                .add(tier3LTL, "sT+=0.4")
                .add(tier3RTL, "sT+=0.4")
                
            var fadeTL = new TimelineLite();
                fadeTL.add('fade')
                        .fromTo("#gradient1", 2, {attr:{y2:"100%"}},{attr:{y2:"0%"}, ease: Sine.easeIn},"sT+=0.0")
                        .fromTo("#stop2", 2, {attr:{offset:"100%"}},{attr:{offset:"0%"}, ease: Sine.easeIn},"sT+=0.0")
          /*  attr:{}*/
            
            adTL.timeScale(2)
            //adTl.from("#baseL", 0.15, {y:15, ease: Sine.easeOut},"+=0.0")
            /* .to(logoHallmark, 0.45, {opacity: 1, ease: Sine.easeOut},"+=0.0")*/
             
        }
        function moveFromBubble(target, time, xTarget, yTarget, taper){
            var miniTl = new TimelineLite();
            miniTl.from(target, time, {x:xTarget, y:yTarget, ease: Sine.easeOut})
            miniTl.to(target, time*0.45, {opacity:1, 
                                     
                                     ease: RoughEase.ease.config({  template:Power0.easeNone,
                                                                    strength:2,
                                                                    points:20,
                                                                    taper:taper,
                                                                    randomize: true,
                                                                    clamp: true
                                                                    }), yoyo:true, repeat:2
                                    }, timeStr(time))
                                     
                                     
            
            
            //miniTl.set(target, {x:xTarget, y:yTarget, ease: Sine.easeOut})

            return miniTl;
        }

        function timeStr(time){
            var timeStr = "-=" + time;
            return timeStr;
        }
        
        function getRandomArbitrary(min, max) {
          return (Math.random() * (max - min) + min).toFixed(2);
        }

inuit();
              
            
!
999px

Console