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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <svg id="uiSVG" viewBox="0 0 800 600" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet">
<defs>
 <circle id="follower" cx="100" cy="300" r="2"/>
 <circle id="drinkFollower" cx="50" cy="300" r="2" fill="red"/> 
      <g id="brandyCocktail" class="cocktail">
        <path d="M52.78,27.29C49.51,11.27,50.46,1.13,50.47,1a.92.92,0,0,0-.24-.72A.91.91,0,0,0,49.54,0H26.13a.93.93,0,0,0-.7.31,1,1,0,0,0-.24.72c0,.1,1,10.24-2.3,26.26-1.24,6-.42,10.86,2.42,14.33,3.6,4.4,9.33,5.28,11.58,5.45V62H30.55a.94.94,0,1,0,0,1.88H45.11a.94.94,0,0,0,0-1.88H38.77V47.07c2.25-.17,8-1,11.58-5.45C53.19,38.15,54,33.33,52.78,27.29ZM48.91,40.42c-3.89,4.76-11,4.82-11.08,4.82h0c-.07,0-7.19-.06-11.07-4.82-2.46-3-3.14-7.3-2-12.75A161.18,161.18,0,0,0,27.09,1.89H48.61a160.92,160.92,0,0,0,2.33,25.78C52.05,33.12,51.37,37.41,48.91,40.42Z"/>       
      <g class="drinkItem" >
          <path d="M36.41,27a2,2,0,0,0,2.65-.14l2.6-2.9a1.74,1.74,0,0,0,.52-1.3,1.62,1.62,0,0,0-.66-1.25l-2.9-2.59a1.7,1.7,0,0,0-1.3-.52,1.59,1.59,0,0,0-1.25.66l-2.59,2.89a2,2,0,0,0,.14,2.65Zm1-6.84,2.79,2.5-2.5,2.8-2.8-2.51Z"/>
          <path d="M41.25,29.17l.81,3.89a1.79,1.79,0,0,0,2.14,1.46l3.89-.8A1.83,1.83,0,0,0,49.23,33a2.16,2.16,0,0,0,.32-1.39l-.8-3.89a1.83,1.83,0,0,0-2-1.47l-.3,0-3.89.8A1.73,1.73,0,0,0,41.25,29.17Zm5.56-1,.69,3.7-3.7.69-.69-3.7Z"/>
          <path d="M33.91,28.17a1.9,1.9,0,0,0-1.73-1.08,1.82,1.82,0,0,0-.68.13L28,28.89a1.85,1.85,0,0,0-.85,2.51L28.77,35a1.84,1.84,0,0,0,2.51.84l3.55-1.66a1.84,1.84,0,0,0,.84-2.51Zm-3.41,6-1.66-3.35,3.36-1.66,1.65,3.36Z"/>

</g>
       <clipPath id="brandyMask">
            <path class="brandyMask" d="M48.91,40.42c-3.89,4.76-11,4.82-11.08,4.82h0c-.07,0-7.19-.06-11.07-4.82-2.46-3-3.14-7.3-2-12.75A161.18,161.18,0,0,0,27.09,1.89H48.61a160.92,160.92,0,0,0,2.33,25.78C52.05,33.12,51.37,37.41,48.91,40.42Z"/>
        </clipPath>
       <g clip-path="url(#brandyMask)">
        <rect id="brandyLiquid" class="drinkLiquid" y="23" width="78.5" height="60" fill-opacity="0.23" stroke-width="2" stroke="#FFF"/>
        </g>
      </g> 
 
      <g id="screwdriverCocktail" class="cocktail"> 
        <path d="M25.51,53.85h25c2,0,4.32-.59,4.42-2.16l3.34-41.45a1.65,1.65,0,0,0-.29-.89,2,2,0,0,0-1.58-.49H19.52A2.67,2.67,0,0,0,18,9.35a1.37,1.37,0,0,0-.3.89L21,51.69C21.19,53.36,23.55,53.85,25.51,53.85ZM53,51.39a4.64,4.64,0,0,1-2.56.5H25.51a4.86,4.86,0,0,1-2.55-.5L19.62,10.83H56.26Z"/>
        <g class="drinkItem">
          <path d="M36.12,37.64a2,2,0,0,0-2.65,0l-2.75,2.75a1.72,1.72,0,0,0-.59,1.28A1.58,1.58,0,0,0,30.72,43l2.75,2.75a1.72,1.72,0,0,0,1.27.59A1.58,1.58,0,0,0,36,45.7L38.77,43a2,2,0,0,0,0-2.66Zm-1.38,6.78-2.65-2.65,2.65-2.65,2.66,2.65Z"/>
          <path d="M46.34,33.91a2,2,0,0,0-2.66,0l-2.75,2.75a1.74,1.74,0,0,0-.59,1.28,1.57,1.57,0,0,0,.59,1.27L43.68,42a1.72,1.72,0,0,0,1.28.59A1.58,1.58,0,0,0,46.24,42L49,39.21a2,2,0,0,0,0-2.65Zm-1.28,6.68-2.65-2.65,2.65-2.65,2.65,2.65Z"/>
          <path d="M49.68,24.09a2,2,0,0,0-2.66,0l-2.75,2.75a2,2,0,0,0,0,2.65L47,32.24a1.76,1.76,0,0,0,1.28.59,1.61,1.61,0,0,0,1.28-.59l2.75-2.75a1.74,1.74,0,0,0,.59-1.28,1.57,1.57,0,0,0-.59-1.27ZM48.3,30.86l-2.65-2.65,2.65-2.65L51,28.21Z"/>
          <path d="M31.4,35.19l-.58-3.93a1.8,1.8,0,0,0-2.07-1.57l-3.93.59a1.81,1.81,0,0,0-1.18.68,2.32,2.32,0,0,0-.39,1.38l.59,3.93a1.83,1.83,0,0,0,1.87,1.57H26l3.93-.59A1.73,1.73,0,0,0,31.4,35.19Zm-5.59.68-.5-3.73,3.74-.49.49,3.73Z"/>
          <path d="M34.84,33.22a1.93,1.93,0,0,0,1.67,1.18,1.66,1.66,0,0,0,.69-.1l3.63-1.47a1.84,1.84,0,0,0,1-2.46l-1.48-3.63a1.83,1.83,0,0,0-2.45-1l-3.64,1.47a1.84,1.84,0,0,0-1,2.46Zm3.74-5.79,1.47,3.43-3.44,1.48L35.14,28.9Z"/>
        </g>     
       <clipPath id="screwdriverMask">
            <path class="screwdriverMask" d="M53,51.39a4.64,4.64,0,0,1-2.56.5H25.51a4.86,4.86,0,0,1-2.55-.5L19.62,10.83H56.26Z"/>
        </clipPath>   
       <g clip-path="url(#screwdriverMask)">
        <rect id="screwdriverLiquid" class="drinkLiquid" y="28" width="78.5" height="38.29" fill-opacity="0.23" stroke="#FFF" stroke-width="2"/>

        </g>         
      </g>
 
      <g id="cherryCocktail" class="cocktail">
        <path id="cherryGlass" d="M51.88,11.52a.85.85,0,0,0-.77-.5l-27,.12a.78.78,0,0,0-.74.53c-1,2.95-3,11.9.49,17.75,2.28,3.78,6.88,5.63,13.28,5.79v27h-6a.84.84,0,1,0,0,1.68H44.82a.84.84,0,0,0,0-1.68h-6v-27c6.4-.16,10.87-2.1,13.28-5.79C56.62,22.45,52.08,12,51.88,11.52Zm-1.22,17c-2.18,3.34-6.45,5-12.71,5s-10.48-1.72-12.7-5c-3.25-4.84-.43-15.68-.43-15.68l25.51-.11a42.15,42.15,0,0,1,1.9,6.72C52.59,22.44,52.41,25.83,50.66,28.51Z"/>
        <g id="lemon" class="drinkItem">
         <path transform="translate(0, 2)" d="M49.41,14a.84.84,0,0,0-1.06,0l-9.51,7a.86.86,0,0,0-.27,1,7.2,7.2,0,0,0,.76,1.28,6.89,6.89,0,0,0,7.54,2.46A7.06,7.06,0,0,0,49,24.66,6.88,6.88,0,0,0,50.35,15,7.1,7.1,0,0,0,49.41,14Zm-8.73,8.24c-.09-.12-.17-.24-.25-.37l3.12-2.3.9,4.73a2.19,2.19,0,0,1-.36,0A5.16,5.16,0,0,1,40.68,22.25Zm7.26,1.06a5.24,5.24,0,0,1-1.8.86l-.82-4.32L49.14,22A5.25,5.25,0,0,1,47.94,23.31Zm2-3.42a5.63,5.63,0,0,1-.14.59L45.6,18.07l3.16-2.32L49,16A5.15,5.15,0,0,1,50,19.89Z"/>
         </g>
        <path id="olive" d="M43.49,32.7,26,8.58m-3.65-5L20.31.8m3.84,8.37a3.12,3.12,0,1,1,3.12-3.12A3.12,3.12,0,0,1,24.15,9.17Z" fill="none" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="10" stroke-width="1.5"/>

        <clipPath id="cherryMask">
          <path class="cherryMask" d="M50.66,28.51c-2.18,3.34-6.45,5-12.71,5s-10.48-1.72-12.7-5c-3.25-4.84-.43-15.68-.43-15.68l25.51-.11a42.15,42.15,0,0,1,1.9,6.72C52.59,22.44,52.41,25.83,50.66,28.51Z" fill="#39b54a"/>
        </clipPath>
        <g clip-path="url(#cherryMask)">        
          <rect id="cherryLiquid" class="drinkLiquid" y="25.56" width="78.5" height="38.29" fill-opacity="0.23" stroke="#FFF" stroke-width="2"/>
        </g>
      </g> 
 
      <g id="champagne" class="cocktail">
        <path id="champagneFlute" d="M45.54,67H29.32a1,1,0,0,1,0-2h7.11V49.11C32.74,35.24,27,20.56,18.87,4.24a1,1,0,0,1,.05-1,1,1,0,0,1,.85-.47H55.09A1,1,0,0,1,56,4.26,218.43,218.43,0,0,0,38.43,49.11V65h7.11a1,1,0,1,1,0,2ZM21.38,4.8a243.9,243.9,0,0,1,16,40.4,222,222,0,0,1,16-40.4Z"/>
        <g id="champagneBubbles" class="drinkItem">
             <path d="M41.38,31.16a3.25,3.25,0,1,0-3.25,3.25A3.25,3.25,0,0,0,41.38,31.16Zm-4.61,0a1.36,1.36,0,1,1,1.36,1.36A1.36,1.36,0,0,1,36.77,31.16Z"/>
          <path d="M39,21.44a3.83,3.83,0,1,0-3.83,3.83A3.84,3.84,0,0,0,39,21.44Zm-5.77,0a1.94,1.94,0,1,1,1.94,1.94A1.94,1.94,0,0,1,33.19,21.44Z"/>
          <path d="M43.68,18.75a4.19,4.19,0,1,0-4.19-4.19A4.19,4.19,0,0,0,43.68,18.75Zm0-6.48a2.3,2.3,0,1,1-2.3,2.3A2.3,2.3,0,0,1,43.68,12.27Z"/>
        </g>
        <clipPath id="champagneMask">
          <path class="champagneMask" d="M21.38,4.8a243.9,243.9,0,0,1,16,40.4,222,222,0,0,1,16-40.4Z" fill="#39b54a"/>

        </clipPath>
        <g clip-path="url(#champagneMask)">
            <rect id="champagneLiquid" class="drinkLiquid" y="14.56" width="78.5" height="55.19" fill-opacity="0.23" stroke="#FFF" stroke-width="2"/>
        </g>
      </g> 
 
 <g id="punch" class="cocktail">
        <path id="punchOutline" d="M45.68,67H38.25V50.73c0-.89,1.45-1.91,3.12-3.09,3.48-2.45,8.74-6.16,8.74-14.37a19.38,19.38,0,0,0-1.75-7.42A20.92,20.92,0,0,1,46.73,20c-.3-3.22,1-7.4,1.72-9.61a1,1,0,0,0-.13-.91A1,1,0,0,0,47.51,9H27a1,1,0,0,0-.81.42,1,1,0,0,0-.13.91c.77,2.21,2,6.39,1.72,9.61a21.26,21.26,0,0,1-1.63,5.88,19.38,19.38,0,0,0-1.75,7.42c0,8.21,5.26,11.92,8.74,14.37,1.67,1.18,3.12,2.2,3.12,3.09V67H28.82a1,1,0,0,0,0,2H45.68a1,1,0,0,0,0-2ZM34.28,46c-3.51-2.47-7.89-5.56-7.89-12.73A17.6,17.6,0,0,1,28,26.57a22.74,22.74,0,0,0,1.76-6.41A25.05,25.05,0,0,0,28.38,11H46.12a25.05,25.05,0,0,0-1.38,9.13,22.42,22.42,0,0,0,1.76,6.41,17.79,17.79,0,0,1,1.61,6.7c0,7.17-4.38,10.26-7.89,12.73a18.54,18.54,0,0,0-2.81,2.25.94.94,0,0,0-.16,0,.75.75,0,0,0-.16,0A19,19,0,0,0,34.28,46Z"/>
        <g id="punchLemon" >
               
         <path d="M47.87,18a8.61,8.61,0,0,1-2-.23,1,1,0,0,1,.46-1.94,6.9,6.9,0,0,0,1.5.17,6.49,6.49,0,1,0-6.49-6.49,1,1,0,0,1-1,1,1,1,0,0,1-1-.92V9.53A8.49,8.49,0,1,1,47.87,18Z"/>
          <path d="M46.72,7.54A1,1,0,0,1,45.8,7l-.36-.83a1,1,0,1,1,1.82-.81l.37.83a1,1,0,0,1-.51,1.32A1,1,0,0,1,46.72,7.54Z"/>
          <path d="M50.77,9.16a1,1,0,0,1-.38-1.92l.93-.38a1,1,0,0,1,.76,1.85l-.93.38A1,1,0,0,1,50.77,9.16Z"/>
          <path d="M51,13.89a1.13,1.13,0,0,1-.5-.13l-.91-.53a1,1,0,1,1,1-1.73l.91.52a1,1,0,0,1-.5,1.87Z"/>

        </g>
<g id="punchIce" class="drinkItem">
          <path d="M37.32,28.91a2,2,0,0,0-2.65,0l-2.75,2.75a1.76,1.76,0,0,0-.59,1.28,1.61,1.61,0,0,0,.59,1.28L34.67,37a1.73,1.73,0,0,0,1.28.59A1.57,1.57,0,0,0,37.22,37L40,34.22a2,2,0,0,0,0-2.65ZM36,35.69,33.29,33,36,30.39,38.6,33Z"/>
          <path d="M36,24.49a1.93,1.93,0,0,0,1.67,1.18,1.63,1.63,0,0,0,.69-.1L42,24.1a1.84,1.84,0,0,0,1-2.46L41.54,18a1.83,1.83,0,0,0-2.45-1L35.45,18.5a1.84,1.84,0,0,0-1,2.46Zm3.74-5.79,1.47,3.44-3.44,1.47-1.47-3.44Z"/>
        </g>    
        <clipPath id="punchMask">
          <path class="punchMask" d="M34.28,46c-3.51-2.47-7.89-5.56-7.89-12.73A17.6,17.6,0,0,1,28,26.57a22.74,22.74,0,0,0,1.76-6.41A25.05,25.05,0,0,0,28.38,11H46.12a25.05,25.05,0,0,0-1.38,9.13,22.42,22.42,0,0,0,1.76,6.41,17.79,17.79,0,0,1,1.61,6.7c0,7.17-4.38,10.26-7.89,12.73a18.54,18.54,0,0,0-2.81,2.25.94.94,0,0,0-.16,0,.75.75,0,0,0-.16,0A19,19,0,0,0,34.28,46Z" fill="#39b54a"/>

        </clipPath>
        <g clip-path="url(#punchMask)">
            <rect id="punchLiquid" class="drinkLiquid" y="19.94" width="78.5" height="49.82" fill-opacity="0.23" stroke="#FFF" stroke-width="2"/>
        </g>
      </g>  

 
 <path id="bendyListItem"  d="M.48,49s100.91,0,180,0,180,0,180,0" fill="none" stroke-miterlimit="10" stroke-width="100" />
<!--   <polyline id="littleArrow" points="274 49.63 284.19 59.81 274 70" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="3"/>  -->
 <polyline id="littleArrow" points="1.06 1.06 7.21 7.21 1.06 13.35" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="3"/>
<rect id="viewingArea" x="279.5" y="100" width="243" height="404" /> 
 <clipPath id="containerMask">
 <use xlink:href="#viewingArea" fill="red"/>

  </clipPath>
 <g class="bendyUseItem">
  
  <!-- <use xlink:href="#bendyListItemOutline" x="0" y="0" stroke="red"/>  -->
  <use xlink:href="#bendyListItem" x="0" y="0" /> 
  <use xlink:href="#littleArrow" x="275" y="40" /> 
 <text class="label" x="186" y="53">BURGERS</text>
  <use class="drink" xlink:href="#" x="56" y="20" fill="#FFF"/> 
  <rect class="hit" width="360" height="100" fill="transparent"/>
  </g>
 </defs>
 <use xlink:href="#viewingArea" fill="#eee" stroke-width="0" />
      <g id="phoneGroup" stroke="#aaa" stroke-width="2">
        <rect id="phoneOutline" x="264" y="41" width="273" height="517" rx="27" ry="27" fill="none"  stroke-miterlimit="10" />

        <circle id="homeButton" cx="401" cy="532" r="18.5" fill="none"  stroke-miterlimit="10" />
        <circle cx="481.5" cy="74.5" r="8" fill="none"  stroke-miterlimit="10" />
        <circle cx="335.5" cy="74.5" r="4" fill="none"  stroke-miterlimit="10" />
        <circle cx="350.5" cy="74.5" r="4" fill="none"  stroke-miterlimit="10" />
        <rect x="368.5" y="70.5" width="65" height="8" rx="4" ry="4" fill="none"  stroke-miterlimit="10" />
      </g>  
<g id="container" clip-path="url(#containerMask)" transform="translate(0, 0)"> 
  <g id="dragContainer" >
  </g>
  </g> 

         <use xlink:href="#viewingArea" fill="none" stroke-width="0" stroke="#aaa" />
<!--   <rect width="300" height="400" x="250" y="75" fill="red" opacity="0.3"/> -->

<!--  <rect id="dragger" width="300" height="500" fill="transparent" x="250" y="111" /> -->
</svg>
            
          
!
            
              body {
 background-color: #FFFCF9;
 overflow: hidden;
 text-align:center;
  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;
 
}

.bendyUseItem text{
 text-anchor:middle;
 font-family:'Montserrat';
 fill:#FFF;
 font-weight:700;
 font-size:0.65em;
 letter-spacing:2;
 text-transform:Uppercase;
  
}

#phoneGroup{
 pointer-events:none;
}

.hit, #bendyListItem{
 -webkit-tap-highlight-color:transparent
}
            
          
!
            
              class BendyMenu {
 
 
 select = (s) => {return document.querySelector(s);}
 selectAll = (s) => {return document.querySelectorAll(s);} 
 mainTl = new TimelineMax();
 followerVY = 0;
 drinkFollowerVY = 0;
 uiSVG = this.select('#uiSVG');
 dragMinY = -300;
 pathDataStart = 'M.48,49s100.91,';
 bendyListItem = this.select('#bendyListItem');
 bendyUseItem = this.select('.bendyUseItem');
 dragContainer = this.select('#dragContainer');
 littleArrow = this.select('#littleArrow');
 xmlns = "http://www.w3.org/2000/svg";
 xlinkns = "http://www.w3.org/1999/xlink";
 container = this.select('#container');

 
 constructor(){
  
   TweenMax.set('svg', {
     visibility: 'visible'
   })  
    
   const follower = this.select('#follower');
   const drinkFollower = this.select('#drinkFollower');
   const viewingArea = this.select('#viewingArea');
   const viewingAreaHeight = Number(viewingArea.getAttribute('height'));
   const dragger = this.select('#dragger');
   const brandyLiquid = this.select('#brandyLiquid');
   const brandyCocktail = this.select('#brandyCocktail');
   const colorArr = ['#BA83D4','#9FB6EE', '#EFB875', '#F97EA7', '#88EEED', '#B6DE7C'];
   const drinkUri = ['#brandyCocktail','#screwdriverCocktail','#cherryCocktail', '#champagne', '#punch', '#brandyCocktail','#screwdriverCocktail','#cherryCocktail', '#champagne', '#punch','#brandyCocktail'];
   const labelArr = ['Piña Colada','Screwdriver', 'Marketing Champagne', 'Cherry Seinfeld', 'Fruit Punch', 'Tequila Sunset', 'Straight Whiskey', 'Martini Bopper', 'Harvey Wallbanger','Bloody Marvin', 'Woo Woo', ''];
   let i = drinkUri.length;
   let strokeWidth = Number(this.bendyListItem.getAttribute('stroke-width'));
   let numItems = drinkUri.length;
  
   while(--i > -1){
    let clone = this.bendyUseItem.cloneNode(true);
    this.dragContainer.appendChild(clone);
    clone.querySelector('.drink').setAttributeNS(this.xlinkns, 'xlink:href', drinkUri[i% drinkUri.length])
    TweenMax.set(clone, {
     x:220,
     y:i * (strokeWidth) +(strokeWidth/2)+50
    })
    clone.querySelector('use').setAttribute('stroke',colorArr[i% colorArr.length] )
    clone.querySelector('text').textContent = labelArr[i% labelArr.length]
   }
   
   Draggable.create(this.dragContainer, {
   trigger:document.body,
    type:'y',
    bounds:{minY:-((numItems-1) * strokeWidth)+(viewingAreaHeight - strokeWidth), maxY:0},
    throwProps:true,
    onDrag:this.onDrag,
    throwResistance:100,
    edgeResistance:0.91,
    minDuration:0.2,
    maxDuration:0.85,
    ease:Expo.easeOut,
    onRelease:this.onRelease,
    overshootTolerance:0.85,
    allowContextMenu:true
   })
   
   TweenMax.set('.drinkLiquid', {
    transformOrigin:'50% 50%'
   })
      
   TweenMax.set('#olive', {
    transformOrigin:'100% 100%'
   })
   
  TweenMax.to(follower, 1, {
   y:'+=0',
   repeat:-1,
   modifiers:{
    y:(y, count)=>{
    this.followerVY += (this.dragContainer._gsTransform.y - follower._gsTransform.y) * 0.8;
     this.followerVY *= 0.5;
     return follower._gsTransform.y + this.followerVY; 
    }
   },
   onUpdate:this.onUpdate
  })   
     
  TweenMax.to(drinkFollower, 1, {
   y:'+=0',
   repeat:-1,
   modifiers:{
    y:(y, count)=>{
    this.drinkFollowerVY += (this.dragContainer._gsTransform.y - drinkFollower._gsTransform.y) * 0.02;
     this.drinkFollowerVY *= 0.95;
     return drinkFollower._gsTransform.y + this.drinkFollowerVY; 
    }
   }
  })   
   
  TweenMax.to(this.littleArrow, 1, {
   y:'+=0',
   repeat:-1,
   modifiers:{
    y:(y, count)=>{
     return -this.followerVY * 0.25
    }
   }
  })
  TweenMax.to('text', 1, {
   y:'+=0',
   repeat:-1,
   modifiers:{
    y:(y, count)=>{
     return -this.followerVY * 0.8
    }
   }
  })
  TweenMax.staggerTo('.drinkItem', 1, {
   y:'+=0',
   repeat:-1,
   modifiers:{
    y:(y, count)=>{
     return -this.drinkFollowerVY * 0.08
    }
   }
  },0.1)
   
  TweenMax.to('.drinkLiquid', 1, {
   rotation:'+=0',
   repeat:-1,
   modifiers:{
    rotation:(rotation)=>{
     return this.drinkFollowerVY * 0.58
    } 
   }
  })
   
  TweenMax.to('#olive', 1, {
   rotation:'+=0',
   repeat:-1,
   modifiers:{
    rotation:(rotation)=>{
     return Math.abs(this.followerVY * 0.38)
    } 
   },
   ease:Bounce.easeOut
  })
     
      
  TweenMax.to('.cocktail', 1, {
   y:'+=0',
   repeat:-1,
   modifiers:{
    y:(y)=>{
     return -this.followerVY * 0.8
    }    
   }
  })
      
      
  document.addEventListener("touchmove", function(event){
      event.preventDefault();
  });


   //ScrubGSAPTimeline(this.timeline);
  TweenMax.staggerFrom(this.nodeListToArray(this.selectAll('.bendyUseItem'), true), 1.3, {
   y:'+=500',
   ease:Elastic.easeOut.config(0.8,0.8)
  },0.05)
  TweenMax.from(this.dragContainer, 1, {
   alpha:0,
   ease:Sine.easeOut
  })
  
  }
 
 onRelease = ()=>{
  
 }
nodeListToArray(list, rev){
  var k = Array.prototype.slice.call(list);
  return (rev) ? k.reverse() : k;
} 
 
 onDrag = () => {
   let followerVY = dragContainer._gsTransform.y/4;
   let halfVal = 180;
   let path = `${this.pathDataStart}${followerVY},${halfVal},${followerVY},${halfVal},${-followerVY},${halfVal},${-followerVY}`;
   this.bendyListItem.setAttribute('d', path);
   
  
 }
 
  onUpdate=()=>{
   if(dragContainer._gsTransform.y > 0){
    this.onDrag();    
    return;    
   }
   let followerVY = -Math.round(this.followerVY) * 0.993;
   let halfVal = 180;
   let path = `${this.pathDataStart}${followerVY},${halfVal},${followerVY},${halfVal},${-followerVY},${halfVal},${-followerVY}`;
   this.bendyListItem.setAttribute('d', path);
  }
 
}




var bendyMenu = new BendyMenu();


            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console