Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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" class="light-mode">
<span class='switchboxCont'>
  <input class='switch default' id='darkMode' type='checkbox' checked="false" onclick="colorMode()">
  <label for='darkMode'></label>
</span>

<svg id="aquarium" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 461.87 316.34" onclick="drawOutlines.play(0)">
  <polygon id="fish-tank" class="heavy-stroke" points="6.89 6.13 453.19 10.72 453.19 308.43 12.51 308.43 6.89 6.13"/>
  <path id="tank-top" class="" d="M7.24,25s249.87-6.14,446,4.59"/>
  <path id="tank-bottom" class="" d="M453.19,296.18c-81.7,6.66-440.91,0-440.91,0"/>
  <path id="sand" class="" d="M11.47,252.25s3.59-4.08,86.83,5.62,70.47-4.43,112.34-3.24,76.59,16,144,1.72,56.17-2.05,98.55-2.56"/>
  <g id="fish-one">
    <path id="fish-one-outline" class="" d="M277,121.53s-2.55-.85-1.36,2,15.49-.85,18.64,3.66,19,17.45,24.76,18.56c0,0,4.26,1.78-.59-2.56s-6-5.36-5.28-13,5.75-6.81,7.6-5.44,9.08,7,19.21,3.32,7.4-14.47,7.4-14.47-4,9.36-16.25,9.1a4.94,4.94,0,0,1-4-6.46c1.36-5.62,12.25-2.64,12.25-2.64a8.47,8.47,0,0,0-9-5.53c-7.15.51-8,8.08-8,8.08s-.93,3.92-1.87-3.23-2-17,6.21-21.62,21-11.06,21-11.06S341,77,325.19,84.17s-18.47,7.32-24.34,11.92-7.06,14-13.28,18.72S282.13,120.85,277,121.53Z"/>
    <path id="fish-one-accent-line" class="" d="M291.66,125.52s5.11-1.69,14-16.24S322,96,322,96"/>
    <circle id="fish-one-eye" class="light-stroke" cx="295.02" cy="115.27" r="2.68"/>
  </g>
  <g id="fish-two">
    <path id="fish-two-outline" class="" d="M239.57,139.32s-8.34-10-19-10.3-20.26,4.26-22.47,8.94c0,0-1-9.57-12.34-9,0,0-3.75,13.72,8.34,14.57,0,0-6.56,8.09-2.73,17.11,0,0,10.3.94,10.13-12.34,0,0,9.49,7.18,24.85,2.55C235.15,148.26,239.57,139.32,239.57,139.32Z"/>
    <path id="fish-two-bottom-fin" class="" d="M223.68,151.6s.27,4.81-11.07,11.07a14.73,14.73,0,0,1,1-10.34"/>
    <path id="fish-two-top-fin" class="" d="M218.81,129s.08-10.37-11.83-9.1c0,0-2.25,5.39,5.43,9.81"/>
    <path id="fish-two-face-accent" class="" d="M232.48,147.71s-9-3.76-3.65-16.58"/>
    <circle id="fish-two-eye" class="" cx="230.78" cy="137.51" r="1.32"/>
  </g>
  <g id="fish-three">
    <path id="fish-three-outline" class="" d="M157.79,207.74s-1.7-3-18.73-10.38-14.29,20.85-21,15.41-11.49-5.2-13.1-4,3.74,1.61,6.89,5.27,3.23,11.07,2.3,14.05.76,4.59,4.25-1.2.17-12.59,4.17-7.23,1.19,6.21,7.41,9.62,18.38-1.79,24.42-8.68S161.45,211.32,157.79,207.74Z"/>
    <path id="fish-three-bottom-fin" class="" d="M147.35,226.32s.14,5.51-2,8.32c0,0-.88-2.57-4.61-5.33"/>
    <path id="fish-three-top-fin" class="" d="M143.82,199.49s1-3.92-4.33-6.13-11.66-.39-13.28,1.85,2.49,1.33,2.18,3.15"/>
    <path id="fish-three-face-accent" class="" d="M146.75,200.89S138,217,153.61,221.43"/>
    <path id="fish-three-gill" class="" d="M144.32,210.64s-7.47-4.34-7.13-.68.68,9.27,3,7.91S144.32,210.64,144.32,210.64Z"/>
    <circle id="fish-three-eye" class="" cx="151.47" cy="211.16" r="1.49"/>
  </g>
  <g id="plant-fern">
    <g id="plant-fern-center-leaves">
      <path class="light-stroke" d="M51.28,240.34s-2.43,2.72-7.37,2.13-3.14-4.09-3.14-4.09-1.45-3.4,1-2.81,1.44-1.61,3.4-.93S51.28,240.34,51.28,240.34Z"/>
      <path class="light-stroke" d="M51.28,238.53s4.63-5.76,8.63-5.25,4.18,4.29,4.09,5.25.43,3.17-3.49,4.53S51.28,238.53,51.28,238.53Z"/>
      <path class="light-stroke" d="M53.44,223.86s-4.76-5.73-14.46-5.48c0,0-2.89.75-2.47,5.48s2,4.57,4.34,4.4S48.84,229.6,53.44,223.86Z"/>
      <path class="light-stroke" d="M58,208.25s-6.81-8.08-9.45-7S46.72,204,46.72,204s-6.46,1.87-3.4,6.72,7.91.85,10.47,0A11.65,11.65,0,0,0,58,208.25Z"/>
      <path class="light-stroke" d="M60.8,191s3.8-7.08,9.33-6.56,2.55,4.85,2.55,4.85,2.81,5.61-3.15,7.4S60.8,191,60.8,191Z"/>
      <path class="light-stroke" d="M59.83,191.49s-8.77-7.66-10.89-8.09-4.85-1.27-4.94,2-1.14,3.75-1.5,4.68-.59,4.51,2.45,4.51,3-.93,3-.93.6,3.91,3.83,2.64A50.17,50.17,0,0,0,59.83,191.49Z"/>
      <path class="light-stroke" d="M60.08,170.59s10.22,9.15,12.35,7.54,1-5.45,1-5.45,2.86-3.32,1.24-5.62-.59-3.83-2.89-3.49S62.8,167.22,60.08,170.59Z"/>
      <path class="light-stroke" d="M59.83,169.19s-6.47-3.57-10.89-2.3-3.24,5.71-4.26,7.58,3.49,5.36,6.81,3.15S56.6,175.06,59.83,169.19Z"/>
      <path class="light-stroke" d="M55.69,153.76s9.42-8.91,12.91-6.19,2.21,4.29,3.31,6.19,1,5.9-2.8,6.15S57.59,152.63,55.69,153.76Z"/>
      <path class="light-stroke" d="M55.42,152.51s0,5.19-8.27,8.43-4.68-8.6-3.06-8.09,3.06-2,5.61-1.36S54.58,153.61,55.42,152.51Z"/>
      <path class="light-stroke" d="M54.47,136.09s-6.3-5.33-12.17-4.79-5.62,5.21-.94,6.57c0,0-4.43,4.85.55,6.3S54.47,136.09,54.47,136.09Z"/>
      <path class="light-stroke" d="M54.47,134.89s7.4-5.78,12.25-1.87.68,3.75,3.07,7.15-5.11,5.79-10,2.55A11.85,11.85,0,0,1,54.47,134.89Z"/>
      <path class="light-stroke" d="M56.26,121.45s3.14-4.26,6.63-3.66,3,4.08,5.54,5.36,1.52,5.79-2.14,5.28S58,126.55,56.26,121.45Z"/>
      <path class="light-stroke" d="M61.28,109.62s5.59-7,9-5.36,4.65,2.55,3.89,4.59c0,0,2.64,3.75.85,5.28s-2.81,3.06-6.13,1.27S63.32,109.68,61.28,109.62Z"/>
      <path class="light-stroke" d="M61.7,108.17S57,102.72,53.87,104s-1.44,2-1.44,2-3.92.73-2.56,3.63,3.83,5.1,7.49,1.87S58.21,109.11,61.7,108.17Z"/>
      <path class="light-stroke" d="M65.87,90.64s-4.79,6.47-9.23,4.42-5.42-4.76-3.73-6.12,3.9-3.83,8.17-2.22S65.87,90.64,65.87,90.64Z"/>
      <path class="light-stroke" d="M65.87,88.6s9-4.17,12.51-.43.85,2.3,3.15,6.13-5.87,4.59-7.83,3S69.45,95.23,65.87,88.6Z"/>
    </g>
    <path id="plant-fern-center-stem" class="" d="M51.38,253.05a105.44,105.44,0,0,1,5.56-41.65c7.66-21.44,2.55-50,0-54.12s-5.7-28.09,4-46a42.67,42.67,0,0,0,3.11-34.21"/>
    <g id="plant-fern-right-leaves">
      <path class="light-stroke" d="M60.08,222.36s3.75,7.55,11.79,6.66,2.17-6.89-.64-7.4C71.23,221.62,61.48,220.65,60.08,222.36Z"/>
      <path class="light-stroke" d="M67.14,213.13s-1.65-1.22-2.16-4.79-3.13-3.45-4.18-2.43-.94,5,1.56,5.88A37.43,37.43,0,0,0,67.14,213.13Z"/>
      <path class="light-stroke" d="M68,211.92s5.39-3.06,9.73,0-2.55,6.63-5.74,5.74S68.11,216.39,68,211.92Z"/>
      <path class="light-stroke" d="M74.25,202.6s-7-3.45-6.6-7.79,4.82-3.32,5.93.51S72.93,200.05,74.25,202.6Z"/>
      <path class="light-stroke" d="M75.22,201.17s-.36,3.72,4.4,4.74c0,0,1.19,4.05,3.61,3.3,0,0,3.2,4.59,5.75,1.35s2.17-8,.64-8c0,0,2.17-5.15-4-6.09S75.22,201.17,75.22,201.17Z"/>
      <path class="light-stroke" d="M80.88,190.68s-2.82-3.91-9.94-3.15S72.69,175,75.22,175,80.19,178.5,80.88,190.68Z"/>
      <path class="light-stroke" d="M82,188.3s6.73-3.49,7.75-5.32,5.37-3.11,7.15-1.19a3,3,0,0,1,0,4s1.54,10-2.29,9.45-.77-1.91-5.75-2.17-1.73-2.34-4.85-2.34C84,190.68,83.82,192.94,82,188.3Z"/>
      <path class="light-stroke" d="M86.18,176.07a23.28,23.28,0,0,0-9.33-8.45c-6.72-3.56-.38-12.33,1.79-7.7,0,0,1.91-5.36,5.74-1.32,0,0-.89,9.5,1,12.32A5.33,5.33,0,0,1,86.18,176.07Z"/>
      <path class="light-stroke" d="M87,170.92s2-11.23,13-7.39c0,0,6,7.66-5.11,10.09C94.85,173.62,87.63,175.38,87,170.92Z"/>
      <path class="light-stroke" d="M90.28,148.77s-1.34-8.09-7.26-7.07-1,3.49-1,3.49-3.42,3.85,0,6.18S90.28,148.77,90.28,148.77Z"/>
      <path class="light-stroke" d="M89.68,150.78s8.36-7.8,14-4.74,0,5.33,0,5.33,3.32,2.18,1.4,5.07-3.48,1.35-3.48,1.35,2.26,5.23-3.89,2.68S94.47,153.87,89.68,150.78Z"/>
      <path class="light-stroke" d="M95.1,136.34s-5-11.11-9.91-6.38S77,131.37,82,137C82,137,92.7,141.27,95.1,136.34Z"/>
      <path class="light-stroke" d="M93.19,138.71a14.74,14.74,0,0,1,11-3.39c7,.51.26,4.21.89,6.89S96.38,137.76,93.19,138.71Z"/>
      <path class="light-stroke" d="M101.17,124.65s-6.57-10.34-9.64-6.92-1.85,3.11-1.85,3.11-5.19-3.47-3.77,2.26,4.84,4.43,8.36,4.05A18.89,18.89,0,0,0,101.17,124.65Z"/>
      <path class="light-stroke" d="M102.06,123.1s5.43-3.5,7.85-.81.6,9.71-2.76,7.67S102.06,123.1,102.06,123.1Z"/>
      <path class="light-stroke" d="M106.58,112.13s-4.31-7.54-10.44-4.73,0,5.74,0,5.74S104.13,116.48,106.58,112.13Z"/>
      <path class="light-stroke" d="M106.16,114.06s6.69-9.83,11.86-4.85a6.64,6.64,0,0,1,1.66,5.15,3.64,3.64,0,0,1,.08,5.51C116.87,122.81,108,111.77,106.16,114.06Z"/>
    </g>
    <path id="plant-fern-right-stem" class="" d="M52.1,231.73s35-37.69,35-63.22,17.88-48.51,19.41-53.62a19.9,19.9,0,0,0,0-10.21"/>
    <g id="plant-fern-left-leaves">
      <path class="light-stroke" d="M46.22,114.09s2.67,13.65-3.33,14.38-7.27-.56-7.53-4.64.77-3.37.9-6.79S46.22,114.09,46.22,114.09Z"/>
      <path class="light-stroke" d="M41.91,102.17s-4.89,9.17-10.51,8.4-1.4-6.76-1.4-6.76-.13-5.7,4-5.74S41.91,102.17,41.91,102.17Z"/>
      <path class="light-stroke" d="M41.07,100.09s5.38-9.32,8.51-5.88c0,0,5.1-.44,4.89,3.86S44,104.3,41.07,100.09Z"/>
      <path class="light-stroke" d="M40.52,83.22s-4.26,8-7.58,9.12-5-2.19-3.2-4.56c0,0-5.41-2.5-.73-5.31S40.52,83.22,40.52,83.22Z"/>
      <path class="light-stroke" d="M41.07,81.16s5.5-5.84,8.51-4.82,2.55,3.32,4.89,6.26S47.77,87,47.77,87s-2.38,2.76-4.75-.79S41.07,81.16,41.07,81.16Z"/>
      <path class="light-stroke" d="M44.2,66.77S36.64,79,32.55,76.22s-.64-5.62-.64-5.62-5.48-3.71.77-5.88S44.2,66.77,44.2,66.77Z"/>
      <path class="light-stroke" d="M44.11,68.81s2.61-7.41,9-8.81,4.46,7.91,4.46,7.91l-1.31-1.14s3.4,6.12,0,5.49S45.08,65.88,44.11,68.81Z"/>
      <path class="light-stroke" d="M41.48,50.13S30.85,61.91,27.11,61.53s-1.83-6.25-1.83-6.25-5.32-2.89-.49-5.15S41.48,50.13,41.48,50.13Z"/>
      <path class="light-stroke" d="M40.52,47.41S47.74,37.28,53,40c0,0,1.4,2.53.76,3.5,0,0,4.52.67,2.52,5.67S43.88,52.69,40.52,47.41Z"/>
    </g>
    <path id="plant-fern-left-stem" class="" d="M54.91,131.3S34,98,41.62,79.66s-4.09-38.81-4.09-38.81"/>
  </g>
  <g id="plant-round">
    <g id="plant-round-left">
      <path id="plant-round-left-stem" class="" d="M342.89,265.79s3.32-13-6.12-15.07"/>
      <path id="plant-round-left-leaf" class="" d="M339.13,251.59s-2,.49-3,4.37-6.51.89-5.36-6.58,7.58-6.06,9.34-5.81a3.48,3.48,0,0,1,1.38,5.81C339.13,251.59,340.28,250.84,339.13,251.59Z"/>
    </g>
    <g id="plant-round-center" data-name="plant-round-center">
      <path id="plant-round-center-stem" data-name="plant-round-center-stem" class="" d="M349.15,263.62s-2.55-20.81,3.06-24.77"/>
      <path id="plant-round-center-leaf" data-name="plant-round-center-leaf" class="" d="M350.61,243.53a6.07,6.07,0,0,1-1.25-1.28c-.56-.76-1.89-1.76-4.76-1s-2.29-4.61.34-6.69c2.46-2,4.76-3.75,9.7-1.58s8,10.17,4,15.24-4.43.42-5.11-1.49A8.62,8.62,0,0,0,350.61,243.53Z"/>
    </g>
    <g id="plant-round-right" data-name="plant-round-right">
      <path id="plant-round-right-stem" data-name="plant-round-right-stem" class="" d="M365.49,258.26s1.15-15.45-1.4-20.56"/>
      <path id="plant-round-right-leaf" data-name="plant-round-right-leaf" class="" d="M365.43,243.5s-4.75.84-6.2,2.5-7.91-2.26,0-11.57,12.47-1.2,13.45.85,1.28,7.87-5.19,7.83C367.49,243.11,366.72,243.22,365.43,243.5Z"/>
    </g>
  </g>
  <g id="plant-long">
    <g id="plant-long-left">
      <g id="plant-long-left-left">
        <path id="plant-long-left-left-stem" class="" d="M387.43,250.55V238.21s-5-6.64-4.71-18.12-9.82-33.71-9.51-41.62a100.11,100.11,0,0,0-5.3-35.65c-4.85-13.63-1.27-29.46-5.61-40.69s-1.84-28.6-1.84-28.6"/>
        <path id="plant-long-left-left-leaf" class="" d="M383.31,227.56a8.72,8.72,0,0,1-4.16-5.6c-1-4.09-4-1.87-5.56-8.85s-12.65-23.15-11.8-32.68-7.15-25.37-4.6-29.62-3.57-14-3.23-17.7,2-5.79-1-12.6,2.8-3.91-.73-11.91-2.81-12.6-.61-18-2.07-4.59,1-9.36-.51-6.3,2.72-9.87,3.57-7.15,5.28-10c0,0-.86,8.68,2.72,12.25s1.36,13.62,4.25,21.28,4.09,11.06,3.24,21.79,6.47,10.72,4.93,25,4.94,13.44,4.09,25.36,2.31.19,1.7,20.76S389.18,184.31,383.31,227.56Z"/>
      </g>
      <g id="plant-long-left-right">
        <path id="plant-long-left-right-stem" class="" d="M387.43,238.21s13.93-33.44,12.91-54.12-3.21-47.21.05-56.54,1.84-20.06,0-30,.46-11.49.46-11.49"/>
        <path id="plant-long-left-right-leaf" class="" d="M396.05,212.75s-3.45-4.92-2.94-10-5.79-10.38-3.58-15.32-.94-6.29-.47-11.74-3-16.85-.05-20.6,5.29-8,1.37-18.21,2.56-3.74,0-18.21,3.58-14,2.56-18-.51-12.43,7.49-25.54c0,0-.17,6.3,4.76,14.64s.17,19.58,3.75,24.34-.68,16.17,0,19.24.68,6.45-2.56,11.14,4.43,12.35,4,22.05-1.78,10.38-1.61,20.59,2,4.94-3.75,12.6S403.26,208.82,396.05,212.75Z"/>
      </g>
    </g>
    <g id="plant-long-right">
      <g id="plant-long-right-left">
        <path id="plant-long-right-left-stem" class="" d="M427.4,95.49c3.32,9.7.26,15.57.77,37.28s-5.11,34.46-4.08,61.53c0,0,2,24.69,6,39.32,2.95,10.75.6,8.68,2.56,25.44"/>
        <path id="plant-long-right-left-leaf" class="" d="M431.68,243.3S414.21,233,415.23,222.13s-2.81-22.81,0-26.73,2.43-12.59,2.43-16.51-2.39-6.46-.85-13.95-3.41-13.45.17-19.07,3.06-14.3,2.55-25.7,4-17.53,4.47-24.68.3-10.38-1.75-15.49c0,0,7.32,18.89,12.94,23.83s-1.5,27.91-1.35,33.87-3.76,12.6-1.2,33.19-2.05,19.75-2.05,31.49S433.82,235.2,431.68,243.3Z"/>
      </g>
      <g id="plant-long-right-right">
        <path id="plant-long-right-right-stem" class="" d="M444.26,136.85c-.26,10,4.85,24.51,1.53,38.87s-1.53,22.15-2.81,35.68c0,0-1.45,24.26-5.7,28.6s-3.41,19.06-3.41,19.06"/>
        <path id="plant-long-right-right-leaf" class="" d="M438.55,238.85a106.17,106.17,0,0,1-1.24-18.59c.05-11.92-3-7.15-1-19.24s2.89-14.3,2.21-30.3,4.43-5.44,2.73-28.42a13.65,13.65,0,0,1,4.25-11.92s-2.17,4.43,1.38,7.66,4.58,17.87,4.58,20.26-3.58,18.55-3.58,22.81-.64,23.32-1,25.36,1.18,12.25-2.57,22.64S438.55,238.85,438.55,238.85Z"/>
      </g>
    </g>
  </g>
</svg>
</div>
              
            
!

CSS

              
                body {
  margin: 0;
}
#container.light-mode {
  --color-lines: #202530;
  --color-background: #fff;
}

#container.dark-mode {
  --color-lines: #fff;
  --color-background: #202530;
}

#container {
  width: 100vw;
  height: 100vh;
  background: var(--color-background);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}
svg {
  max-width:95vw;
  max-height: 95vh;
}
svg * {
  fill: none;
  stroke: var(--color-lines);
  stroke-miterlimit: 100;
  stroke-width: 0.25px;
}

.heavy-stroke {
  stroke-width: 0.5px;
}

.light-stroke {
  stroke-width: 0.15px;
}

.switch {
  visibility: hidden;
  margin-left: -9999px;
  position: absolute;
}
.switch + label {
  display: block;
  position: relative;
  cursor: pointer;
  outline: none;
  padding: 2px 5px;
  width: 42px;
  height: 20px;
  border-radius: 80px;
  box-shadow: 1px 1px 1px 1px rgba(10, 13, 31, 0.95);
  user-select: none;
}
.switch + label:before {
  right: 1px;
  background: #ffe7a6;
  border-radius: 75px;
  transition: 0.4s;
}
.switch + label:after {
  width: 20px;
  height: 20px;
  background-color: #fff;
  border-radius: 100%;
  transition: 0.4s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

input.switch + label:before, input.switch + label:after {
  display: block;
  position: absolute;
  top: 2px;
  left: 2px;
  bottom: 2px;
  content: "";
}

.switch:checked + label:before {
  background-color: #3B3A40;
}
.switch:checked + label:after {
  margin-left: 28px;
}

              
            
!

JS

              
                gsap.registerPlugin(DrawSVGPlugin);

let createPartsArray = function(partsArray, parentNode) {
  for(let i = 0; i < parentNode.length; i++) {
    if (parentNode[i].localName == "path" || parentNode[i].localName == "circle") {
      partsArray.push(parentNode[i])
    }
  }
}

// Get all the leaves for the fern plant
var plantFernCenterLeaves = [];
createPartsArray(plantFernCenterLeaves, document.getElementById('plant-fern-center-leaves').childNodes)

var plantFernLeftLeaves = [];
createPartsArray(plantFernLeftLeaves, document.getElementById('plant-fern-left-leaves').childNodes)

var plantFernRightLeaves = [];
createPartsArray(plantFernRightLeaves, document.getElementById('plant-fern-right-leaves').childNodes)

// Set pieces for round plants 
var plantRound = ["#plant-round-center-stem", "#plant-round-center-leaf", "#plant-round-right-stem", "#plant-round-right-leaf", "#plant-round-left-stem", "#plant-round-left-leaf"]

// Get each Fish
var fishOneParts = [];
var fishOneNodes = document.getElementById('fish-one').childNodes;
createPartsArray(fishOneParts, fishOneNodes)

var fishTwoParts = [];
var fishTwoNodes = document.getElementById('fish-two').childNodes;
createPartsArray(fishTwoParts, fishTwoNodes)

var fishThreeParts = [];
var fishThreeNodes = document.getElementById('fish-three').childNodes;
createPartsArray(fishThreeParts, fishThreeNodes)

// Create Draw Outlines Timeline
var drawOutlines = gsap.timeline({
  defaults: {
      delay: 0,
      ease: 'power1',
      duration: 1,
      drawSVG: 0
    }
});

// Build Animation Timeline
drawOutlines.from('#fish-tank', 3.5, {})
            .from('#tank-top', {}, "<0.25")
            .from('#tank-bottom', {}, "<1")
            .from('#sand', 2, {}, "startPlantAnimations")

            // Small Leaf Plant
            .from("#plant-fern-center-stem", {}, "startPlantAnimations+=0.25")
            .from("#plant-fern-left-stem", {}, "startPlantAnimations+=1.25")
            .from("#plant-fern-right-stem", {}, "startPlantAnimations+=0.4")
            .from(plantFernCenterLeaves, 0.5, {stagger: 0.25}, "startPlantAnimations+=0.5")
            .from(plantFernLeftLeaves, 0.5, {stagger: 0.25}, "startPlantAnimations+=1.5")
            .from(plantFernRightLeaves, 0.5, {stagger: 0.25}, "startPlantAnimations+=1")

            // Round Leaf Plant
            .from(plantRound, {stagger: 0.5}, "startPlantAnimations+=2")

            // Long Plant
            .from("#plant-long-left-left-stem", {}, "startPlantAnimations+=1.5")
            .from("#plant-long-left-left-leaf", {}, "startPlantAnimations+=2")
            .from("#plant-long-left-right-stem", {}, "startPlantAnimations+=1.75")
            .from("#plant-long-left-right-leaf", {}, "startPlantAnimations+=2.25")
            .from("#plant-long-right-left-stem", {}, "startPlantAnimations+=2")
            .from("#plant-long-right-left-leaf", {}, "startPlantAnimations+=2.5")
            .from("#plant-long-right-right-stem", {}, "startPlantAnimations+=2.25")
            .from("#plant-long-right-right-leaf", {}, "startPlantAnimations+=2.75")

            .from(fishOneParts, 2, {stagger: 0.5}, "<")
            .from(fishTwoParts, 1.5, {stagger: 0.5}, "<0.5")
            .from(fishThreeParts, 0.75, {stagger: 0.5}, "<1")

// LIGHT / DARK MODE
function colorMode() {
  let darkMode = document.getElementById('darkMode');
  let container = document.getElementById('container')

  if (darkMode.checked == false) {
    container.classList.add('dark-mode');
    container.classList.remove('light-mode');
  } else {
    container.classList.add('light-mode');
    container.classList.remove('dark-mode');
  }
}

              
            
!
999px

Console