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

Auto Save

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 class="controls">
  <button id="buttonless">-</button>
  <div class="currentcount">10</div>
  <button id="buttonmore">+</button>
</div>

<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
   viewBox="0 0 800 600" style="enable-background:new 0 0 800 600;" xml:space="preserve">
<style type="text/css">
  .st0{fill:#002A3F;}
  .st1{fill:#002F42;}
  .st2{fill:#003444;}
  .st3{fill:#FFD788;}
  .st4{fill:#FFC022;}
  .st5{fill:none;stroke:#725B2E;stroke-linecap:round;stroke-miterlimit:10;}
  .st6{fill:#725B2E;}
  .st7{fill:none;stroke:#255568;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}
  .st8{fill:#7C7C7C;}
  .st9{fill:#BABABA;}
	.st100{clip-path:url(#SVGID_2_);}
  .st10{fill:#247693;}
  .st11{clip-path:url(#mask_1_);}
  .st12{display:none;opacity:0.22;}
  .st13{fill:#CE9E34;}
  .st14{opacity:0.2;}
  .st15{fill:none;stroke:#2A4D59;stroke-width:2;stroke-miterlimit:10;}
  .st16{fill:#6B4605;}
  .st17{fill:#9E7C3F;}
  .st18{fill:#294F48;}
  .st19{fill:#266D5C;}
  .st20{fill:#488C7F;}
  .st21{fill:#FFD066;}
  .st22{fill:#5E5E5E;}
  .st23{fill:#0A171C;}
  .st24{fill:none;stroke:#808080;stroke-linecap:round;stroke-miterlimit:10;}
  .st25{fill:#808080;}
  .st26{fill:#FFB612;}
  .st27{fill:#FFDA8F;}
  .st28{fill:#AFAFAF;}
  .st29{fill:#727272;}
  .st30{fill:#898989;}
  .st31{fill:#565656;}
  .st32{fill:#FFFFFF;}
  .st33{fill:#3F2727;}
  .st34{fill:#683333;}
  .st370{clip-path:url(#SVGID_4_);}
  .st35{fill:none;stroke:url(#SVGID_1_);stroke-linecap:round;stroke-miterlimit:10;}
  .st36{fill:none;stroke:url(#SVGID_2_);stroke-linecap:round;stroke-miterlimit:10;}
  .st37{fill:none;stroke:url(#SVGID_3_);stroke-linecap:round;stroke-miterlimit:10;}
  .st38{fill:none;stroke:#FFFFFF;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}
  .st39{fill:none;stroke:#FFFFFF;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;stroke-dasharray:1.0005,6.0031;}
  .st40{fill:none;}
  .st41{fill:#FF6357;}
  .st43{font-size:21.47px;}
  .st44{fill:#52D1C5;}
  .st45{font-size:22.1472px;}
  symbol{overflow: visible;}
</style>

<defs>

  <linearGradient id="Gradient">
    <stop offset="0" stop-color="white" stop-opacity="1" />
    <stop offset="1" stop-color="white" stop-opacity="0" />
  </linearGradient>
  <mask id="Mask1">
    <polygon points="573.7,102.2 477.4,178 504.7,212.7 601,136.9" fill="url(#Gradient)" />
  </mask>
  <mask id="Mask2">
    <polygon points="287.8,202.4 191.6,278.1 218.9,312.8 315.1,237.1" fill="url(#Gradient)" />
  </mask>
  <mask id="Mask3">
    <polygon points="659,349.4 562.7,425.2 590.1,459.9 686.3,384.2" fill="url(#Gradient)" />
  </mask>

  
  <symbol id="regular-mtx">
    <g>
      <path class="st41" d="M0.6,14.3c-8,0-14.6-6.5-14.6-14.6s6.5-14.6,14.6-14.6S15.2-8.3,15.2-0.3S8.6,14.3,0.6,14.3z"/>
      <path class="st32" d="M0.6-13.9c7.5,0,13.6,6.1,13.6,13.6c0,7.5-6.1,13.6-13.6,13.6C-6.9,13.3-13,7.2-13-0.3
        C-13-7.8-6.9-13.9,0.6-13.9 M0.6-15.9C-8-15.9-15-8.9-15-0.3c0,8.6,7,15.6,15.6,15.6c8.6,0,15.6-7,15.6-15.6
        C16.2-8.9,9.2-15.9,0.6-15.9L0.6-15.9z"/>
    </g>
    <circle class="st32" cx="0.6" cy="-0.3" r="4.8"/>
  </symbol>
  <symbol id="mystery-mtx">
    <g>
      <path class="st41" d="M0.3,14.9c-8,0-14.6-6.5-14.6-14.6s6.5-14.6,14.6-14.6S14.8-7.8,14.8,0.3S8.3,14.9,0.3,14.9z"/>
      <path class="st32" d="M0.3-13.3c7.5,0,13.6,6.1,13.6,13.6c0,7.5-6.1,13.6-13.6,13.6S-13.3,7.8-13.3,0.3
        C-13.3-7.2-7.2-13.3,0.3-13.3 M0.3-15.3c-8.6,0-15.6,7-15.6,15.6s7,15.6,15.6,15.6s15.6-7,15.6-15.6S8.9-15.3,0.3-15.3L0.3-15.3z
        "/>
    </g>
    <text transform="matrix(1 0 0 1 -4.6064 8.0972)" class="st32 st42 st43">?</text>
  </symbol>
  <symbol id="star-mtx">
    <g>
      <path class="st41" d="M0.6,14.9c-8,0-14.6-6.5-14.6-14.6s6.5-14.6,14.6-14.6S15.2-7.8,15.2,0.3S8.6,14.9,0.6,14.9z"/>
      <path class="st32" d="M0.6-13.3c7.5,0,13.6,6.1,13.6,13.6c0,7.5-6.1,13.6-13.6,13.6C-6.9,13.9-13,7.8-13,0.3
        C-13-7.2-6.9-13.3,0.6-13.3 M0.6-15.3C-8-15.3-15-8.3-15,0.3c0,8.6,7,15.6,15.6,15.6c8.6,0,15.6-7,15.6-15.6
        C16.2-8.3,9.2-15.3,0.6-15.3L0.6-15.3z"/>
    </g>
    <path class="st32" d="M1.1-6l1.2,3.6c0.1,0.2,0.3,0.3,0.5,0.3h3.9c0.5,0,0.7,0.6,0.3,0.9L3.8,1C3.7,1.1,3.6,1.3,3.6,1.5l1.2,3.6
      C5,5.5,4.5,5.9,4.1,5.6L0.9,3.4c-0.2-0.1-0.4-0.1-0.6,0l-3.2,2.2c-0.4,0.3-1-0.1-0.8-0.6l1.2-3.6c0.1-0.2,0-0.4-0.2-0.6l-3.2-2.2
      C-6.2-1.5-6-2.1-5.5-2.1h3.9c0.2,0,0.4-0.1,0.5-0.3L0.1-6C0.2-6.5,0.9-6.5,1.1-6z"/>
  </symbol>
  <symbol id="checkpoint-mtx">
    <g>
      <path class="st44" d="M0.3,20c-11.4,0-20.6-9.2-20.6-20.6c0-11.4,9.2-20.6,20.6-20.6S20.9-12,20.9-0.6C20.9,10.7,11.6,20,0.3,20z
        "/>
      <path class="st32" d="M0.3-19.7c10.5,0,19.1,8.5,19.1,19.1c0,10.5-8.5,19.1-19.1,19.1S-18.8,9.9-18.8-0.6
        C-18.8-11.2-10.3-19.7,0.3-19.7 M0.3-22.7c-12.2,0-22.1,9.9-22.1,22.1s9.9,22.1,22.1,22.1s22.1-9.9,22.1-22.1S12.5-22.7,0.3-22.7
        L0.3-22.7z"/>
    </g>
  </symbol>
  <symbol id="start-mtx">
    <path id="SVGID_x5F_4_x5F_" class="st40" d="M-4.4,27.1c-14.8-2.7-24.7-17-21.9-31.8s17-24.7,31.8-21.9s24.7,17,21.9,31.8
      S10.5,29.9-4.4,27.1z"/>
    <text>    <textPath  xlink:href="#SVGID_x5F_4_x5F_" startOffset="61.061%">
<tspan  class="st32 st42" style="font-size:12px;">S T A R T</tspan>   </textPath>
</text>
    <g>
      <path class="st41" d="M0.6,20.9c-7.2,0-14-3.9-17.7-10.1C-19.9,6-20.7,0.5-19.4-4.8c1.4-5.3,4.7-9.8,9.4-12.6
        c3.2-1.9,6.8-2.9,10.5-2.9c7.2,0,14,3.9,17.7,10.1C21.1-5.5,21.9,0,20.5,5.3c-1.4,5.3-4.7,9.8-9.4,12.6
        C7.9,19.9,4.3,20.9,0.6,20.9z"/>
      <path class="st32" d="M0.6-18.8c6.5,0,12.9,3.3,16.4,9.3c5.4,9.1,2.4,20.8-6.7,26.2c-3.1,1.8-6.4,2.7-9.7,2.7
        c-6.5,0-12.9-3.3-16.4-9.3c-5.4-9.1-2.4-20.8,6.7-26.2C-6.1-18-2.8-18.8,0.6-18.8 M0.6-21.8L0.6-21.8c-4,0-7.8,1.1-11.3,3.1
        c-5.1,3-8.7,7.8-10.1,13.5c-1.5,5.7-0.6,11.7,2.4,16.7c4,6.7,11.2,10.8,19,10.8c4,0,7.8-1.1,11.3-3.1C22.3,13,25.8-0.5,19.6-11
        C15.6-17.7,8.3-21.8,0.6-21.8L0.6-21.8z"/>
    </g>
  </symbol>
  <symbol id="finish-mtx">
    <path id="SVGID_x5F_5_x5F_" class="st40" d="M23.1,15.2c-8.4,12.5-25.4,15.9-37.9,7.5s-15.9-25.4-7.5-37.9s25.4-15.9,37.9-7.5
      S31.5,2.7,23.1,15.2z"/>
    <text>    <textPath  xlink:href="#SVGID_x5F_5_x5F_" startOffset="61.061%">
<tspan  class="st32 st42" style="font-size:12px;">F I N I S H</tspan>   </textPath>
</text>
    <g>
      <path class="st44" d="M0.4,20.6c-11.4,0-20.6-9.2-20.6-20.6s9.2-20.6,20.6-20.6C11.8-20.6,21-11.4,21,0S11.8,20.6,0.4,20.6z"/>
      <path class="st32" d="M0.4-19.1C11-19.1,19.5-10.5,19.5,0c0,10.5-8.5,19.1-19.1,19.1S-18.7,10.5-18.7,0
        C-18.7-10.5-10.1-19.1,0.4-19.1 M0.4-22.1c-12.2,0-22.1,9.9-22.1,22.1s9.9,22.1,22.1,22.1S22.5,12.2,22.5,0S12.6-22.1,0.4-22.1
        L0.4-22.1z"/>
    </g>
    <path class="st0" d="M-3.7,0l3.9,1.8L-1,4.3c0,0.1,0,0.1,0,0.2c0,0,0,0,0,0c0,0.1,0,0.1,0,0.2c0,0,0,0,0,0c0,0,0,0.1,0,0.1
      c0,0,0,0,0,0C-1,4.9-1,5-0.9,5c0,0,0,0,0,0c0,0,0,0,0,0c0.1,0.1,0.1,0.1,0.2,0.1c0,0,0,0,0,0l0,0c0,0,0,0,0,0l6.5,3
      c0.1,0,0.2,0.1,0.3,0.1c0.1,0,0.2,0,0.2,0C6.5,8.2,6.6,8,6.7,7.9l4-8.6c0.1-0.2,0.1-0.3,0-0.5c-0.1-0.2-0.2-0.3-0.3-0.4L7.8-2.7
      L9-5.3c0.1-0.2,0.1-0.3,0-0.5C9-5.9,8.9-6.1,8.7-6.1L0.8-9.8l0.4-0.9c0.2-0.3,0-0.7-0.3-0.9c-0.3-0.2-0.7,0-0.9,0.3L-9,8.2
      C-9.2,8.5-9,8.9-8.7,9c0.1,0,0.2,0.1,0.3,0.1c0.2,0,0.5-0.1,0.6-0.4L-3.7,0z M-2-3.8l2.2-4.8l5.3,2.5l2,0.9L4.1,2.2L1.3,0.9
      c0,0,0,0,0,0l-4.5-2.1L-2-3.8z M5.8,6.7L1.4,4.7l3.3-1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.1,0,0.1-0.1,0.2-0.1c0,0,0,0,0.1,0
      c0,0,0.1-0.1,0.1-0.1c0,0,0,0,0,0l2.3-4.9l1.9,0.9L5.8,6.7z"/>
  </symbol>
</defs>
<g id="decor">
  <rect id="sky" class="st0" width="799.9" height="600"/>
  <g id="milkyway">
    <path class="st1" d="M394.8,19.6c-25.7,28.3-87,84.5-152.9,237.2S67.3,547.4,33.7,580c-35.2,34.2-86.6,107.5-44.2,111.5
      c45,4.3,186.7-63.1,244.4-111.5c27.8-23.3,134-71.7,173-268.4S550.9,56.1,595,19.6c35.2-29.1,81.2-68.4,85.6-101.7
      C689.3-147.5,448.7-39.6,394.8,19.6z"/>
    <path class="st2" d="M362.7,311.6C403.4,114.9,550.9,26.3,559,19.6c41.3-33.9,85.6-74.6,60-78.6S497.9-30.4,447.8,19.6
      c-34.2,34.1-90.8,84.5-159.5,237.2C219.5,409.6,99.1,545.3,71,580c-42.9,53-10.4,87,111.3,0C199.4,567.7,322.1,508.3,362.7,311.6z
      "/>
  </g>
  <g id="stars">
    <circle class="st21" cx="251" cy="173.2" r="1.2"/>
    <circle class="st21" cx="194.4" cy="376" r="1.2"/>
    <circle class="st21" cx="199.6" cy="73.7" r="1.2"/>
    <circle class="st21" cx="62.7" cy="329.2" r="1.2"/>
    <circle class="st21" cx="522.8" cy="224.7" r="1.2"/>
    <circle class="st21" cx="586.5" cy="249.9" r="1.2"/>
    <circle class="st21" cx="294.8" cy="210.5" r="1.2"/>
    <circle class="st21" cx="58.3" cy="202.4" r="1.2"/>
    <circle class="st21" cx="115.5" cy="408.4" r="1.2"/>
    <circle class="st21" cx="553.8" cy="179.2" r="1.2"/>
    <circle class="st21" cx="418.4" cy="248.7" r="1.2"/>
    <circle class="st21" cx="755.7" cy="123.4" r="1.2"/>
    <circle class="st21" cx="675" cy="135.1" r="1.2"/>
    <circle class="st21" cx="400" cy="362.2" r="1.2"/>
    <circle class="st21" cx="613.6" cy="324.2" r="1.2"/>
    <circle class="st21" cx="556.1" cy="493.3" r="1.2"/>
    <circle class="st21" cx="513.7" cy="374.8" r="1.2"/>
    <circle class="st21" cx="675" cy="377.2" r="1.2"/>
    <circle class="st21" cx="283.5" cy="535.2" r="1.2"/>
    <circle class="st21" cx="116.7" cy="232.6" r="1.2"/>
    <circle class="st21" cx="252.2" cy="340.5" r="1.2"/>
    <circle class="st21" cx="488.8" cy="114.9" r="1.2"/>
    <circle class="st21" cx="725.1" cy="275.6" r="1.2"/>
    <circle class="st21" cx="349" cy="393.3" r="1.2"/>
    <circle class="st21" cx="440.4" cy="452.3" r="1.2"/>
    <circle class="st21" cx="413.3" cy="547.3" r="1.2"/>
    <circle class="st21" cx="393.3" cy="189.5" r="1.2"/>
    <circle class="st21" cx="373.2" cy="50.3" r="1.2"/>
    <circle class="st21" cx="591" cy="78.4" r="1.2"/>
  </g>
  <g id="brightstars">
    <polygon class="st21" points="563.1,326.7 560.7,321.3 557.3,318.9 560.7,316.5 563.1,311.1 565.5,316.5 568.9,318.9 565.5,321.3 
          "/>
    <polygon class="st21" points="701.9,103.5 699.5,98.1 696.1,95.7 699.5,93.3 701.9,87.9 704.3,93.3 707.7,95.7 704.3,98.1    "/>
    <polygon class="st21" points="733.1,62.9 730.7,57.5 727.2,55.1 730.7,52.7 733.1,47.2 735.5,52.7 738.9,55.1 735.5,57.5     "/>
    <polygon class="st21" points="85.3,284 82.9,278.6 79.5,276.2 82.9,273.8 85.3,268.4 87.7,273.8 91.1,276.2 87.7,278.6     "/>
    <polygon class="st21" points="227.9,206.2 225.5,200.8 222.1,198.4 225.5,195.9 227.9,190.5 230.3,195.9 233.7,198.4 230.3,200.8 
          "/>
    <polygon class="st21" points="223.6,58.1 221.2,52.7 217.8,50.3 221.2,47.9 223.6,42.5 226,47.9 229.5,50.3 226,52.7     "/>
    <polygon class="st21" points="370,510 367.6,504.6 364.2,502.2 367.6,499.8 370,494.4 372.4,499.8 375.8,502.2 372.4,504.6     "/>
    <polygon class="st21" points="540.1,280.7 537.7,275.3 534.3,272.9 537.7,270.5 540.1,265.1 542.5,270.5 545.9,272.9 542.5,275.3 
          "/>
  </g>
  <g id="sun">
    <g id="rays">
      <polygon id="main" class="st3" points="123.6,413.2 127.3,447.6 150.9,428 142.2,457.3 163.6,452.1 141.5,477.7 180,508.2 
        129.3,499.3 127.1,523.1 112.4,504.2 82.5,533.7 93.6,505.3 83.6,511.9 95.4,490.2 62.2,480.1 82.5,473.7 53.1,454.5 89.5,459.4 
        82.5,447.7 106.2,460      "/>
      <polygon id="ray_4_" class="st3" points="130.4,472.6 80.1,405.9 104.5,484.6       "/>
      <polygon id="ray_3_" class="st3" points="110.5,467.5 42.1,514.3 122.3,491.4       "/>
      <polygon id="ray_2_" class="st3" points="107.2,483.5 98.4,561 132.7,487.3       "/>
      <polygon id="ray_1_" class="st3" points="123.8,491.9 194.4,472.6 120.5,466.1      "/>
      <polygon id="ray" class="st3" points="105.6,489.4 130,472.2 165.2,549.8       "/>
    </g>
    <circle id="body" class="st4" cx="116.7" cy="480.1" r="27.8"/>
    <g id="face">
      <path class="st5" d="M135,472.6c-2,4.5-7.4,6.6-11.9,4.6"/>
      <circle class="st6" cx="123.4" cy="469.8" r="2.3"/>
      <circle class="st6" cx="130.4" cy="467.5" r="2.3"/>
    </g>
  </g>
  <g id="gallaxy">
    <ellipse transform="matrix(0.9815 -0.1915 0.1915 0.9815 -23.1779 96.0515)" class="st7" cx="485.3" cy="167.9" rx="3.1" ry="1"/>
    <path class="st7" d="M488.8,185.9c12.2-2.4,22.9-6.1,30.3-10.2c7.5-4.1,11.7-8.6,11-12.4c-0.8-3.9-6.4-6.4-14.8-7.4
      c-8.5-1-19.8-0.4-31.9,2c-11.4,2.2-20.1,7.2-19.4,11.1c0.8,3.9,10.6,5.2,22.1,3c5.5-1.1,9.6-3.4,9.2-5.3"/>
    <path class="st7" d="M481.8,149.9c-12.2,2.4-22.9,6.1-30.3,10.2c-7.5,4.1-11.7,8.6-11,12.4c0.8,3.9,6.4,6.4,14.8,7.4
      c8.5,1,19.8,0.4,31.9-2c11.4-2.2,20.1-7.3,19.3-11.3c-0.8-4-10.7-5.5-22.1-3.2c-5.5,1.1-9.6,3.5-9.2,5.4"/>
    <path class="st7" d="M506,145.2c7.7,0,14.8,0.7,20.9,2.2c6.1,1.5,11.3,3.6,15.1,6.4"/>
    <path class="st7" d="M464.6,190.7c-7.7,0-14.8-0.7-20.9-2.2c-6.1-1.5-11.3-3.6-15.1-6.4"/>
  </g>
	<g id="moon">
		<circle class="st8" cx="48.2" cy="111.6" r="77"/>
		<path class="st9" d="M125.2,111.6c0-1.8-0.1-3.5-0.2-5.3C111,91.1,90.8,81.5,68.4,81.5c-42.5,0-77,34.5-77,77
			c0,1.8,0.1,3.5,0.2,5.3c14.1,15.2,34.2,24.8,56.6,24.8C90.7,188.6,125.2,154.1,125.2,111.6z"/>
		<g>
			<defs>
				<circle id="SVGID_6_" cx="48.2" cy="111.6" r="77"/>
			</defs>
			<clipPath id="SVGID_2_">
				<use xlink:href="#SVGID_6_"  style="overflow:visible;"/>
			</clipPath>
			<g id="craters" class="st100">
        <g>
				<circle class="st8" cx="46.4" cy="119.9" r="15.1"/>
				<circle class="st8" cx="48.2" cy="4.5" r="15.1"/>
				<circle class="st8" cx="86.6" cy="123.4" r="7.6"/>
				<circle class="st8" cx="175.2" cy="81.5" r="7.6"/>
				<circle class="st8" cx="-3.3" cy="124.7" r="12.2"/>
				<circle class="st8" cx="109.5" cy="16.1" r="12.2"/>
				<circle class="st8" cx="25.9" cy="54.9" r="12.2"/>
				<circle class="st8" cx="134.2" cy="132.1" r="12.2"/>
				<circle class="st8" cx="83.4" cy="81.5" r="7.6"/>
				<circle class="st8" cx="75.8" cy="23.7" r="7.6"/>
				<circle class="st8" cx="-7.4" cy="42.5" r="7.6"/>
				<circle class="st8" cx="-15" cy="78.4" r="7.6"/>
				<circle class="st8" cx="149.1" cy="81.5" r="7.6"/>
				<circle class="st8" cx="94.2" cy="173.2" r="7.6"/>
				<circle class="st8" cx="38.1" cy="149.9" r="7.6"/>
        </g>
			</g>
		</g>
	</g>
	<g id="rocket">
    <g>
		<path class="st26" d="M533.9,480.7c0-0.9-0.7-1.6-1.7-1.6s-1.6,0.7-1.6,1.7c0,0.9,0.8,8.3,1.7,8.3
			C533.2,489,533.9,481.6,533.9,480.7z"/>
		<path class="st27" d="M532.8,480.5c0-0.3-0.3-0.6-0.6-0.6c-0.3,0-0.6,0.3-0.6,0.6c0,0.3,0.3,3,0.6,3
			C532.6,483.5,532.8,480.8,532.8,480.5z"/>
		<polygon class="st28" points="536.1,477.7 528.3,477.7 526.4,446.1 537.5,446 		"/>
		<polygon class="st29" points="532.9,461.9 533.8,477.7 536.1,477.7 537.5,446 532,446 		"/>
		<path class="st30" d="M531.9,433.1c0,0-5.7,5.7-5.4,12.9l4.2,0l1.4,0l5.5,0C537.7,438.7,531.9,433.1,531.9,433.1z"/>
		<path class="st31" d="M531.9,433.1c0,0-0.2,5.6,0.1,12.9l0,0l5.5,0C537.7,438.7,531.9,433.1,531.9,433.1z"/>
		<path class="st29" d="M540.7,467.9l-6.9,0l2,15.8c0,0.5,0.7,0.5,0.8,0.1L540.7,467.9z"/>
		<path class="st28" d="M523.6,468l6.9,0l-1.8,15.9c0,0.5-0.6,0.5-0.8,0.1L523.6,468z"/>
		<path class="st29" d="M525.5,468l4.9,0l-1.8,15.9c0,0.5-0.6,0.5-0.8,0.1L525.5,468z"/>
		
			<ellipse transform="matrix(1 -6.947743e-03 6.947743e-03 1 -3.1159 3.6907)" class="st34" cx="529.7" cy="450.3" rx="1.3" ry="1.3"/>
		
			<ellipse transform="matrix(1 -6.947743e-03 6.947743e-03 1 -3.1501 3.6911)" class="st34" cx="529.7" cy="455.2" rx="1.3" ry="1.3"/>
		
			<ellipse transform="matrix(1 -6.947743e-03 6.947743e-03 1 -3.1844 3.6915)" class="st34" cx="529.7" cy="460.2" rx="1.3" ry="1.3"/>
    </g>
	</g>
  <g id="earth">
    <circle id="water" class="st10" cx="772.5" cy="579.1" r="186"/>
    <g id="land">
      <defs>
        <circle id="mask" cx="772.5" cy="579.3" r="186"/>
      </defs>
      <clipPath id="mask_1_">
        <use xlink:href="#mask"  style="overflow:visible;"/>
      </clipPath>
      <g id="lands" class="st11">
        <path class="st13" d="M638.5,555c9-11.4-9.7-14.1-1.6-25.7c8.1-11.6-5.8-21.5-1.3-32.5c4.4-11-29.5-38.8-23.2-53.9
          c6.3-15.1-7.5-13-12.8-4.1c-5.3,8.9-27.4-14.3-36.5,4.9c-9.1,19.2,5.8,23-10.5,33.6c-4.8,3.1,8.9-3.3-27.8,10.8
          c-18.3,7.1-65.9,67.6-67.7,85.9c-4.5,45,31.6-7.5,55.5-11c47.8-6.9,51.3,2.3,66.4,2.8C594.1,566.3,634.6,559.9,638.5,555z"/>
        <path class="st13" d="M614.8,418.4c6.4,17.4,10.2-54.6,38.3-41.2c28.1,13.4-5,51.9,27.6,54.8c32.5,2.8,20.8,21.9,35.3,19.2
          c14.6-2.7,22.9,8.9,27-7.4c4.1-16.3-26.1-37.2-11.5-38.7c14.6-1.5,18.2,36,30.4,21.8c12.2-14.2-14.3-49.2,4.3-44.6
          c18.6,4.6,8.7-27.9,25.4-25.4c16.8,2.5-5.8-19.4-0.9-28.8c6.6-12.9,1.7-26.7-12.1,0c-7,13.6-81.7-9.7-98,0.9
          s-19.5,15.7-41.1,24.9C617.9,363.2,609.3,403.5,614.8,418.4z"/>
        <path class="st13" d="M768.5,456.5c13.3-7.9,37.8-5,38.1-15.2c0.4-10.3,6.1-23.3-8.7-32.3s-3.7,9.2-9.6,13
          C765.8,436.5,757.5,463,768.5,456.5z"/>
        <path class="st13" d="M847.5,445c-14.9-2-25.6,38.5-18.5,47.5s-1.7,14.7-7.1,6.3s-15.4-13.3-7.9,6.7c7.5,20-5.6,15-12,12.5
          s-6.7,16,4.7,21c11.4,5,24.4-27.4,53.9-21c29.5,6.5,47.5,13,26,19.5s-53.9-3-78.5,7c-24.5,10-35.5,57.5-14.5,73.5
          s58.3-15.8,61.3,0c3,15.8,22.3,16.5,26.3,30s5.9,34.5,37.4,54.5s57.2-25.5,66-49.5c18-49.1-14.5-51-3.5-69s7.5-70.3-2-53.6
          c-9.5,16.6-16.5,20.6-6-5.9c10.5-26.5,13-47-2.5-36s-19.7,3.3-5-6c23-14.5,25-34.5,58-29.9c11,1.5,26-7.3,5-20.6s-44-41.5-20-43
          s-1.5-11.5,22-21.5s16.3-31.5,4.5-13.6c-11.8,17.9-20-11.6-9-12.7s-13.2-21.9-18.5-7.6c-10,27-17.5-25.8-42-20.7
          c-18.9,3.9-24,31.7-33.2,12.3c-4.1-8.7,6.7-28.6-4.8-20.6s-48.8,1.7-46.4,16.1c2.4,14.4-37.1,10.5-31.1,4.5
          c6-6.1,4.2-26.4-7.9-7.2C830,337,795,340,819,347.5s50.5,21.4,43.5,35.2s17.5,40.6,6.5,49.2C858,440.5,866,447.5,847.5,445z"/>
        <path class="st13" d="M1023.3,580c-10.9,24.8,20.4,58.5,17.4,8.7C1039.7,571.2,1032,560.2,1023.3,580z"/>
        <path class="st13" d="M969.3,186.6c20.2,12.6,15.9,19.3,29.4,33.1c13.5,13.8,0.2,13.1-7.5,1c-7.7-12.1-15.3-2.7-21.9-23.7
          C962.7,175.9,969.3,186.6,969.3,186.6z"/>
        <path class="st13" d="M1004.5,160.2c6.7-2.7,21.2-15.3,40.1-17.9c9-1.2,40.9-15.1,52.1-4.5c4.1,3.9-0.8,5.5-5,15
          c-14,31.7,52.3,41.3,5,87c-16.3,15.8-35.4-6.2-47.2-9.1c-11.8-2.9-7.6-12.3-13.3-12.6c-5.7-0.3-26.8-9.3-20.3-12.2
          c6.6-2.9,2.5-18.4-4.7-15.2c-7.2,3.2-14.1,7.9-11.7,2.8C1002,188.4,993.4,164.7,1004.5,160.2z"/>
        <path class="st13" d="M1041,303.6c0,6,7.5,17.1,0.8,17.1c-6.7,0-17.1-11.1-17.1-17.1s-10.9-17.1-4.2-17.1
          C1027.2,286.5,1041,297.6,1041,303.6z"/>
        <path class="st13" d="M1066.9,340.5c6.3-32.4-14.6-71.3-24.9-82.3c-10.3-11-16-10.8-2.7,5.7c13,16,27.8,54.2,19.7,67.3
          C1046.1,352.1,1058.8,382.4,1066.9,340.5z"/>
      </g>
    </g>
    <path id="shadow" class="st14" d="M654.9,598.2c0,72.7,41.8,135.7,102.6,166.3c5,0.4,10,0.6,15,0.6c102.7,0,186-83.3,186-186
      c0-72.7-41.8-135.7-102.6-166.3c-5-0.4-10-0.6-15-0.6C738.1,412.2,654.9,495.5,654.9,598.2z"/>
    <g id="mesh">
      <g>
        <path class="st15" d="M881.1,427.6c-12.8,14.4-40.9,19.7-70.1,11.6c-29-8-50.2-26.6-54.1-45.4"/>
        <path class="st15" d="M952.1,526.3c-26.7,7.4-98.1,5.4-159.8-11.6c-63.4-17.5-127.4-53.7-144.7-73.4"/>
      </g>
      <g>
        <path class="st15" d="M663.9,730.9c12.8-14.3,40.8-19.6,70-11.6c28.9,8,50.2,26.6,54.1,45.3"/>
        <path class="st15" d="M594.1,631.7c27.5-7,97.8-4.8,158.6,11.9c63.4,17.5,127.4,53.7,144.7,73.4"/>
        <line class="st15" x1="593.2" y1="529.8" x2="951.8" y2="628.6"/>
      </g>
      <line class="st15" x1="811.1" y1="439.2" x2="733.9" y2="719.3"/>
      <path class="st15" d="M761.9,731.6c21.1-29.3,43.4-79.7,59.7-138.9c15.3-55.7,22.1-107.4,20.2-143.3c-0.1-2.3-0.3-4.5-0.5-6.6"/>
      <path class="st15" d="M783.1,426.8c-21.1,29.3-43.4,79.7-59.7,138.9c-16.3,59.2-22.9,113.9-19.8,149.9"/>
      <path class="st15" d="M778.8,746.4c36.1-23.8,70.3-75.9,88.3-141.1c18-65.3,15.3-127.5-3.6-166.5"/>
      <path class="st15" d="M766.2,412c-36.2,23.8-70.3,75.9-88.3,141.2c-18,65.3-15.3,127.5,3.6,166.4"/>
      <path class="st15" d="M786.3,758.9c57.2-14.6,108.8-67.7,128.8-140.3c20-72.7,2.9-144.7-38.8-186.5"/>
      <path class="st15" d="M758.7,399.6c-57.2,14.5-108.8,67.7-128.8,140.3c-20,72.7-2.9,144.7,38.8,186.5"/>
    </g>
  </g>
  <g id="mercury">
    <circle class="st16" cx="316.7" cy="67.1" r="20.7"/>
    <g>
      <path class="st17" d="M335.2,57.8L296.9,73c0.6,1.9,1.4,3.7,2.5,5.4l37.2-17C336.3,60.2,335.8,59,335.2,57.8z"/>
      <path class="st17" d="M326.7,48.9l-28.4,8.8c-1.4,2.8-2.2,6-2.2,9.3c0,0.3,0,0.6,0,0.9l36.6-14C331,51.9,329,50.2,326.7,48.9z"/>
      <path class="st17" d="M337.3,68.5l-33.7,14.5c1.4,1.1,2.9,2.1,4.6,2.8l27.7-11.1C336.7,72.9,337.2,70.7,337.3,68.5z"/>
    </g>
  </g>
  <g id="saturn">
    
      <ellipse transform="matrix(0.9724 -0.2335 0.2335 0.9724 -70.3079 87.0827)" class="st18" cx="332.7" cy="340.5" rx="16.3" ry="16.3"/>
    <path class="st19" d="M323.7,328.5c-1.1,0.3-2.1,0.6-3.1,1.1c-3.5,3.9-5.1,9.3-3.8,14.8c2.1,8.8,10.9,14.2,19.7,12
      c1.1-0.3,2.1-0.6,3.1-1.1c3.5-3.9,5.1-9.3,3.8-14.8C341.3,331.8,332.5,326.4,323.7,328.5z"/>
    <path class="st20" d="M346.5,331.9c0.4,0.6,0.7,1.3,1,1.9c2.5,0.3,4.2,1,4.4,2.1c0.3,1.1-0.9,2.5-3,3.9c-3.2,2.1-8.7,4.3-15.2,5.8
      c-6.3,1.5-12.1,2.1-16,1.7c-2.7-0.3-4.4-1-4.6-2.1c-0.3-1.1,0.9-2.5,3.2-4c0-0.7,0-1.4,0-2.1c-5.4,2.5-8.7,5.2-8.2,7.3
      c0.5,2,4.6,3,10.6,2.8c4.4-0.2,9.7-0.9,15.4-2.3c5.7-1.4,10.8-3.1,14.7-5c5.4-2.5,8.7-5.2,8.2-7.3
      C356.7,332.6,352.5,331.7,346.5,331.9z"/>
  </g>
  <g id="moonflag">
      <rect x="107.4" y="37.8" transform="matrix(0.9064 0.4225 -0.4225 0.9064 29.2861 -42.9081)" class="st22" width="8.1" height="13.5"/>
    <path class="st23" d="M84.6,66.7l2.1,1L105,28.5c0.3-0.6,0-1.3-0.6-1.5v0c-0.6-0.3-1.3,0-1.5,0.6L84.6,66.7z"/>
    <polygon points="104.9,49 110.1,47.2 106.6,45.5     "/>
    
      <rect x="101" y="31.6" transform="matrix(0.9064 0.4224 -0.4224 0.9064 26.252 -41.7308)" class="st8" width="12.5" height="13.5"/>
  </g>
	<g id="sputnik">
		<path class="st24" d="M719.7,342.6l-30.5,10.9l0,0c-2.8,1-6,0-7.6-2.6c-1.8-3-0.9-6.9,2.1-8.7l27.6-17"/>
		<g>
			<line class="st24" x1="717.6" y1="338.2" x2="687.8" y2="350.7"/>
		</g>
		<ellipse transform="matrix(0.8513 -0.5247 0.5247 0.8513 -80.1859 412.1506)" class="st25" cx="687" cy="347.5" rx="6.4" ry="6.4"/>
		<circle fill="none" cx="772.5" cy="579.1" r="260.3"/>
	</g>
  <g id="venus">
    <g>
      <circle class="st33" cx="637.9" cy="204.9" r="38.3"/>
    </g>
    <g>
      <path class="st34" d="M614.8,181.6c-2.7,0-5.3,0.3-7.9,0.8c-4.6,6.3-7.3,14.1-7.3,22.5c0,21.2,17.1,38.3,38.3,38.3
        c2.7,0,5.3-0.3,7.9-0.8c4.6-6.3,7.3-14.1,7.3-22.5C653.1,198.7,635.9,181.6,614.8,181.6z"/>
    </g>
    <g>
      <defs>
        <circle id="SVGID_3_" cx="637.9" cy="204.9" r="38.3"/>
      </defs>
      <clipPath id="SVGID_4_">
        <use xlink:href="#SVGID_3_"  style="overflow:visible;"/>
      </clipPath>
      <g class="st370" id="venuscraters">
        <g>
          <g>
            <circle class="st33" cx="622.7" cy="221" r="3.7"/>
          </g>
          <g>
            <circle class="st33" cx="675" cy="194.7" r="3.7"/>
          </g>
          <g>
            <circle class="st33" cx="607.4" cy="173" r="3.7"/>
          </g>
          <g>
            <circle class="st33" cx="687.7" cy="221" r="3.7"/>
          </g>
          <g>
            <circle class="st33" cx="631.9" cy="176.7" r="3.7"/>
          </g>
          <g>
            <circle class="st33" cx="665" cy="225.9" r="3.7"/>
          </g>
          <g>
            <circle class="st35" cx="663.2" cy="185.9" r="3.7"/>
          </g>
          <g>
            <circle class="st33" cx="643.2" cy="216" r="3.7"/>
          </g>
          <g>
            <circle class="st33" cx="639.5" cy="157.4" r="3.7"/>
          </g>
          <g>
            <circle class="st33" cx="607.4" cy="198.4" r="3.7"/>
          </g>
          <g>
            <circle class="st33" cx="631.9" cy="230.9" r="3.7"/>
          </g>
          <g>
            <circle class="st33" cx="624.5" cy="195.4" r="5.5"/>
          </g>
          <g>
            <circle class="st33" cx="663.2" cy="170.7" r="5.5"/>
          </g>
          <g>
            <circle class="st33" cx="661.4" cy="209" r="5.5"/>
          </g>
        </g>
      </g>
    </g>
  </g>
  <g id="comets">

		<line stroke="#FFD066" mask="url(#Mask1)" x1="0" y1="581" x2="737.7" y2="0.3"/>
		<line stroke="#FFD066" mask="url(#Mask2)" x1="3.5" y1="456" x2="572.5" y2="8.1"/>
		<line stroke="#FFD066" mask="url(#Mask3)" x1="381.3" y1="600" x2="800" y2="270.4"/>
  
  </g>
</g>
<g id="board">
  <g id="path">
    <g>
      <path class="st38" d="M122,112.2c0.2,0.1,0.3,0.1,0.5,0.2"/>
      <path class="st39" d="M128.1,114.3c149.5,51.1,280.5-24.7,466-13.8c188,11,159,212,6,188s-276-48-385-22s-113,180,26,193
        s208.8-83.5,331-50c45.8,12.5,102.3,63.8,116,82.1"/>
      <path class="st38" d="M689.8,494.1c0.1,0.1,0.2,0.3,0.3,0.4"/>
    </g>
  </g>
</g>

<g id="generated-steps"></g>
</svg>

              
            
!

CSS

              
                $void : #002a3f

body, html
  margin: 0
  padding: 0
  background-color: $void
  overflow: hidden
  font-family: 'Montserrat', sans-serif
  display: flex
  flex-direction: column
  justify-content: center

.controls
  position: fixed
  z-index: 10
  font-size: 0
  top: 10px
  right: 10px
  button,
  div
    display: inline-block
    height: 33px
    background-color: #fff
    border: none
    padding: 4px 8px
    margin: 0 1px
    box-sizing: border-box
    vertical-align: top
    line-height: 26px
    font-size: 1rem
  div
    min-width: 50px
    text-align: center
    font-variant-numeric: tabular-nums
  button
    font-size: 1.3rem
    padding-top: 0
    cursor: pointer
    transition: background-color .2s ease
    &:first-child
      border-radius: 6px 0 0 6px
    &:last-child
      border-radius: 0 6px 6px 0
    &:focus
      outline: none
    &.clicked
      transition: none
      background-color: #52D1C5

svg
  max-width: 100vw
  max-height: 100vh
  margin-top: 50vh
  transform: translateY(-50%)
  overflow: visible

  #Mask1
    polygon
      animation: comet 8s infinite ease-out 
  #Mask2
    polygon
      animation: comet 11s infinite -2s ease-out 
  #Mask3
    polygon
      animation: comet 9s infinite -4s ease-out 

  #craters > g
    animation: earthrotation 80s infinite linear
    transform-origin: 8% 12%

  #venuscraters > g
    animation: earthrotation 35s infinite linear reverse
    transform-origin: 80% 32%
  
  #sputnik
    animation: earthrotation 360s infinite linear reverse
    transform-origin: 96% 97%
  
  #rocket 
    animation: bounce 60s infinite -30s ease-in-out alternate
    > g
      animation: earthrotation 120s infinite linear
      transform-origin: 82% 75%

  #gallaxy > *
    stroke-dasharray: 1 4
    animation: galactic 2s infinite linear
    &:nth-child(4),
    &:nth-child(5)
      animation: galactic 1s infinite linear reverse

  #lands > path
    animation: earthrotation 90s infinite linear
    transform-origin: 102% 65%

  #sun
    animation: sundance 2s infinite ease alternate
    transform-origin: 14.5% 80%
    #rays
      polygon:not(#main)
        position: relative
        animation-name: shining
        animation-duration: 2.5s
        animation-timing-function: linear
        animation-iteration-count: infinite        
        transform-origin: 14.5% 80%
      @for $i from 1 through 4
        #ray_#{$i}_
          animation-delay: -1s * $i

@keyframes bounce
  from
    transform: translate3d(0, 0, 0)
  to
    transform: translate3d(0, -200px, 0)
@keyframes comet
  0%
    transform: translate3d(0, 0, 0)
    opacity: 1
  10%
    opacity: 0
    transform: translate3d(-120px, 95px, 0)
  100%
    opacity: 0
    transform: translate3d(-600px, 475px, 0)

@keyframes galactic
  from
    stroke-dashoffset: 0
  to
    stroke-dashoffset: 5

@keyframes earthrotation
  from
    transform: rotate(0deg)
  to
    transform: rotate(360deg)

@keyframes sundance
  from
    transform: rotate(0deg)
  to
    transform: rotate(6deg)

@keyframes shining
  0%
    transform: scale(1)
  25%
    transform: scale(1.1)
  75%
    transform: scale(.8)
  100%
    transform: scale(1)
              
            
!

JS

              
                // Bezier curves constructor

var Beziercurve = function(startPt,controlPt1,controlPt2,endPt){
  this.startPt = startPt;
  this.controlPt1 = controlPt1;
  this.controlPt2 = controlPt2;
  this.endPt = endPt;
  this.length = this.getLength();
}

// Bezier curves methods

Beziercurve.prototype.getXY = function(percent){
  CubicN = function(pct, a,b,c,d) {
    var t2 = pct * pct;
    var t3 = t2 * pct;
    return a + (-a * 3 + pct * (3 * a - a * pct)) * pct
      + (3 * b + pct * (-6 * b + b * 3 * pct)) * pct
      + (c * 3 - c * 3 * pct) * t2
      + d * t3;
  };
  var x=CubicN(percent,this.startPt.x,this.controlPt1.x,this.controlPt2.x,this.endPt.x);
  var y=CubicN(percent,this.startPt.y,this.controlPt1.y,this.controlPt2.y,this.endPt.y);
  return({x:Math.floor(x),y:Math.floor(y)});
};

Beziercurve.prototype.getLength = function(){
  var foo = [];
  var length = 0;
  for(var i = 0; i <= 30; i++){
    foo[i] = this.getXY(i/30);
  }
  for(var i = 1; i <= 30; i++){
    var a = foo[i-1].x - foo[i].x;
    var b = foo[i-1].y - foo[i].y;
    length += Math.sqrt( a*a + b*b );
  }
  return length;
}

// board constructor

var BoardPassGenerator = function(steps, coordinates) {

  var self = this;
  this.numberSteps = 18;
  this.snap = Snap("#generated-steps");
  this.sellingCount = 0;
  this.steps = steps;
  this.counter = document.querySelector('.controls .currentcount');

  // we create instances of : Beziercurve

  this.bezierCurves = [];
  coordinates.forEach(function(coordinate, i){
    self.bezierCurves[i] = new Beziercurve(coordinate[0], coordinate[1], coordinate[2], coordinate[3]);
  });

  // generate an array indexing all the sections lengths :
  this.pathSections = [0];
  for (var i = 0; i < this.bezierCurves.length; i++) {
    this.pathSections.push(this.bezierCurves[i].length + this.pathSections[i]);
  }

  // then we calculate the total length of the curve
  this.totalLength = this.pathSections[this.pathSections.length-1];

  // initialize the board
  this.init = function (cb) {
    // reset
    this.sellingCount = 0;
    document.getElementById("generated-steps").innerHTML = "";
    this.counter.innerHTML = this.numberSteps;

    this.drawSteps(this.numberSteps);
    if(cb && typeof cb === "function") cb();
  };

  this.drawSteps = function(j) {
    for (var i = 0; i <= j; i++) {
      var xy, section, sectionPercent;
      var distanceFromStart = i / j * this.totalLength;
      var pathSections = this.pathSections;
      // find which section 'distanceFromStart' belongs to
      section = pathSections.filter(function(value){return value <= distanceFromStart}).length - 1;
      // make sure we don't go beyond the array for the last step!
      section = Math.min(section, pathSections.length - 2)

      sectionPercent = (section > 0) ? ((distanceFromStart - pathSections[section]) / (pathSections[section +1] - pathSections[section])) : (distanceFromStart / pathSections[section + 1]);

      xy=this.bezierCurves[section].getXY(sectionPercent);

      this.drawStep(xy, i);
    }
  };

  this.drawStep = function(point, index) {

    // here comes the magic of snap.svg
    // we get the kind of the step (regular, mystery, star, checkpoint)
    // then we draw the step at the computed position

    var step;

    switch (index) {
      case 0:
      step = "start";
      break;
      case this.numberSteps:
      step = "finish";
      break;
      default:
      step = this.steps[index % this.steps.length];
    }

    if(step === "checkpoint"){
      this.sellingCount++;
      var count = this.snap.text(-8, 10, this.sellingCount)
      var icon = this.snap.use(step + "-mtx");
      var group = this.snap.g(icon, count);
      count.attr({
        style: "fill: #002A3F;font-size:22.1472px;",
        transform: "matrix(1,0,0,1,3,-2)"
      })
      group.attr({
        transform: "translate("+point.x+", "+point.y+")"
      })
    } else {
      var icon = this.snap.use(step + "-mtx");
      icon.attr({
        transform: "translate("+point.x+", "+point.y+")"
      });
    }

  };

}

/**********************/
/* call the generator */
/**********************/

window.onload = function() {

  var steps = [
      "checkpoint",
      "regular",
      "star",
      "regular",
      "mystery"
  ];
  
  var coordinates = [
    [{x:690.5, y:495.0}, {x:681.5, y:480.0}, {x:621.0, y:423.3}, {x:572.5, y:410.0}],
    [{x:572.5, y:410.0}, {x:450.4, y:376.5}, {x:380.5, y:473.0}, {x:241.5, y:460.0}],
    [{x:241.5, y:460.0}, {x:102.5, y:447.0}, {x:106.5, y:293.0}, {x:215.5, y:267.0}],
    [{x:215.5, y:267.0}, {x:324.5, y:241.0}, {x:447.5, y:265.0}, {x:600.5, y:289.0}],
    [{x:600.5, y:289.0}, {x:753.5, y:313.0}, {x:782.5, y:112.0}, {x:594.5, y:101.0}],
    [{x:594.5, y:101.0}, {x:406.5, y:90.0}, {x:274.5, y:168.0}, {x:122.5, y:112.7}],
  ];
  
  var boardPassGenerator = new BoardPassGenerator(steps, coordinates);
  var moreButton = document.getElementById('buttonmore');
  var lessButton = document.getElementById('buttonless');

  function buttonEvent(isIncrement, target){
    boardPassGenerator.numberSteps += isIncrement? 1 : -1;
    boardPassGenerator.init();
    target.classList.add('clicked')
    setTimeout(function(){target.classList.remove('clicked')}, 100);
  }
  
  moreButton.addEventListener('click', function(){
    buttonEvent(true, this);
  });

  lessButton.addEventListener('click', function(){
    buttonEvent(false, this);
  });

  boardPassGenerator.init();

};

              
            
!
999px

Console