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="container">
      <!-- Intro -->
    <h1 class="logo_text start">Rainbow Storage</h1>
    <!-- Address -->
    <h2 class="title title1">Rainbow Industrial Park</h2>
    <h2 class="title title2">Raynes Park Goods Yard</h2>
    <h2 class="title title3">Grand Drive</h2>
    <h2 class="title title4">SW20 0JK</h2>
    <!-- Building -->
    <img href="https://ibb.co/Sr7T3LF" alt="Industrial site" class="building building_section">
    <div class="size building_section">
    <h2 class="size_title">Rainbow Industrial Park</h2>
    <h2 class="size_amount">28,300 <span>sq ft</span> </h2>
    <h2 class="size_date">Available Summer 2023</h2>
  </div>
  <!-- Basket -->
  <h2 class="amenities amenities1">Local amenities</h2>
  <h2 class="amenities amenities2">(Tesco, Post Office, Banks)</h2>
  <!-- Trains -->
  <h2 class="trains trains1">10 minute walk</h2>
  <h2 class="trains trains2">(mainline overground station)</h2>
    <!-- Vinyl -->
  <h2 class="vinyls vinyl1">£250m old vinyl factory</h2>
  <h2 class="vinyls vinyl2">(only 10 minutes walk away)</h2>
    <!-- End -->
  <h2 class="end end1">rainbowstorage.org</h2>
<svg id="mainImg"width="300" height="250" viewBox="0 0 300 250">
    <defs>
      <clipPath id="myMask">
        <circle cx="150" cy="125" r="71.5" fill="#305652"/>
      </clipPath>
    </defs>
  <g id="circle">
    <circle cx="150" cy="125" r="71.5" fill="#f57c00"/>
  </g>
  <g id="outer_circle" class="circles">
    <path d="m150,207c-45.29,0-82-36.71-82-82s36.71-82,82-82,82,36.71,82,82" fill="none" stroke="#f57c00" stroke-miterlimit="10" stroke-width=".74"/>
  </g>
  <g id="inner_circle" class="circles">
    <path d="m150,48.5c42.25,0,76.5,34.25,76.5,76.5s-34.25,76.5-76.5,76.5-76.5-34.25-76.5-76.5" fill="none" stroke="#f57c00" stroke-miterlimit="10" stroke-width=".75"/>
  </g>
  <g id="basket">
    <g>
      <path d="m112.29,119.53h77.22v14.37h-79.02v-14.37h1.8Zm73.63,3.59h-71.84v7.18h71.84v-7.18Z" fill="#f7e6b9"/>
      <path d="m117.07,130.31h67.65v27.69c0,2.04-.83,3.89-2.17,5.23-1.34,1.34-3.19,2.17-5.23,2.17h-54.63c-2.04,0-3.89-.83-5.23-2.17-1.34-1.34-2.17-3.19-2.17-5.23v-27.69h1.8Zm64.06,3.59h-62.26v24.1c0,1.05.43,2,1.12,2.69.69.69,1.65,1.12,2.69,1.12h54.63c1.05,0,2-.43,2.69-1.12.69-.69,1.12-1.65,1.12-2.69v-24.1Z" fill="#f7e6b9"/>
      <path d="m130.24,137.08c0-.99-.8-1.8-1.8-1.8s-1.8.8-1.8,1.8v21.55c0,.99.8,1.8,1.8,1.8s1.8-.8,1.8-1.8v-21.55Z" fill="#f7e6b9"/>
      <path d="m141.02,137.08c0-.99-.8-1.8-1.8-1.8s-1.8.8-1.8,1.8v21.55c0,.99.8,1.8,1.8,1.8s1.8-.8,1.8-1.8v-21.55Z" fill="#f7e6b9"/>
      <path d="m151.8,137.08c0-.99-.8-1.8-1.8-1.8s-1.8.8-1.8,1.8v21.55c0,.99.8,1.8,1.8,1.8s1.8-.8,1.8-1.8v-21.55Z" fill="#f7e6b9"/>
      <path d="m162.57,137.08c0-.99-.8-1.8-1.8-1.8s-1.8.8-1.8,1.8v21.55c0,.99.8,1.8,1.8,1.8s1.8-.8,1.8-1.8v-21.55Z" fill="#f7e6b9"/>
      <path d="m173.35,137.08c0-.99-.8-1.8-1.8-1.8s-1.8.8-1.8,1.8v21.55c0,.99.8,1.8,1.8,1.8s1.8-.8,1.8-1.8v-21.55Z" fill="#f7e6b9"/>
      <polygon points="146.36 90.88 128.2 122.33 125.1 120.53 143.26 89.08 146.36 90.88" fill="#f7e6b9"/>
      <polygon points="154.94 89.08 173.1 120.53 170 122.33 151.84 90.88 154.94 89.08" fill="#f7e6b9"/>
      <path d="m149.1,84.59c1.74,0,3.31.7,4.44,1.84,1.14,1.14,1.84,2.71,1.84,4.44s-.7,3.31-1.84,4.44c-1.14,1.14-2.71,1.84-4.44,1.84s-3.31-.7-4.44-1.84c-1.14-1.14-1.84-2.71-1.84-4.44s.7-3.31,1.84-4.44c1.14-1.14,2.71-1.84,4.44-1.84h0Zm1.9,4.38c-.49-.49-1.16-.79-1.9-.79s-1.42.3-1.91.79c-.49.49-.79,1.16-.79,1.9s.3,1.42.79,1.9,1.16.79,1.91.79,1.42-.3,1.9-.79c.49-.49.79-1.16.79-1.9s-.3-1.42-.79-1.9Z" fill="#f7e6b9"/>
    </g>
  </g>
  <g id="train_section">
    <g id="train">
      <path d="m133.69,149.05c-.5-.05-1-.11-1.47-.17-.69-.12-1.3-.37-1.84-.79l-5.28-4.55c-.55-.47-.82-1.11-.83-1.9v-40.91c0-12.57,14.81-9.81,14.81-11.6,0-1.12,2.18-1.97,3.3-2.03,5.24-.27,10.48-.26,15.73,0,1.11.06,3.29.91,3.29,2.03,0,1.88,14.81-1.02,14.81,11.6h0v40.91c-.01.79-.27,1.44-.83,1.9l-5.28,4.55c-.53.42-1.15.68-1.84.79-.61.08-1.25.15-1.92.22l-32.65-.05Zm10.48-57.16c-.24,0-.44.25-.44.56v4.29c0,.31.2.56.44.56h12.15c.24,0,.44-.25.44-.56v-4.29c0-.31-.2-.56-.44-.56h-12.15Zm-12.72,10.41c-1.22.1-2.22.98-2.22,2.18v10.1c0,4.37,42.04,4.36,42.04,0v-10.1c0-1.2-1.01-2.1-2.22-2.18-10.67-.74-26.92-.87-37.59,0h0Zm3,30.13c-2.18,0-3.96,1.77-3.96,3.96s1.77,3.96,3.96,3.96,3.96-1.77,3.96-3.96-1.77-3.96-3.96-3.96h0Zm31.59,0c-2.19,0-3.96,1.77-3.96,3.96s1.77,3.96,3.96,3.96,3.96-1.77,3.96-3.96-1.77-3.96-3.96-3.96Z" fill="#f7e6b9" fill-rule="evenodd"/>
    </g>
    <g id="tracks">
      <path d="m166.58,147.5l7.89,19.01h-6.58l-1.27-3.06h-32.75l-1.27,3.06h-6.58l7.91-19.01h32.65Zm-31.54,13.14h30.42l-1.23-2.96h-27.95l-1.23,2.96h0Zm2.4-5.76h25.62l-1.13-2.71h-23.36l-1.13,2.71h0Z" fill="#f7e6b9" fill-rule="evenodd"/>
    </g>
  </g>
  <g id="vinyl">
    <g>
      <path d="m150,84.51c-22.36,0-40.5,18.13-40.5,40.49s18.13,40.49,40.5,40.49,40.5-18.13,40.5-40.49-18.13-40.49-40.5-40.49Zm-33.93,55.82c-1.12-2.46-1.98-5.07-2.54-7.78l20.24-4.18c.25,1.21.63,2.36,1.13,3.46l-18.84,8.51Zm24.16,20.61c-6.41-1.74-12.13-5.17-16.67-9.76l14.67-14.52c2.02,2.05,4.57,3.57,7.42,4.35l-5.42,19.94Zm9.76-22.61c-7.36,0-13.32-5.96-13.32-13.32s5.96-13.32,13.32-13.32,13.32,5.96,13.32,13.32-5.96,13.32-13.32,13.32Zm15.39-19.45c-1.71-4.28-5.16-7.67-9.46-9.33l7.39-19.3c9.67,3.72,17.41,11.36,21.26,20.97l-19.19,7.65Z" fill="#f7e6b9"/>
      <path d="m150,136.7c-6.45,0-11.7-5.25-11.7-11.7s5.25-11.7,11.7-11.7,11.7,5.25,11.7,11.7-5.25,11.7-11.7,11.7Zm0-20.95c-5.1,0-9.25,4.15-9.25,9.25s4.15,9.25,9.25,9.25,9.25-4.15,9.25-9.25-4.15-9.25-9.25-9.25Z" fill="#f7e6b9"/>
    </g>
  </g>
  <g id="logo_sun" class="start">
    <g>
      <polygon points="109.02 55.96 111.67 42.54 114.36 55.96 109.02 55.96" fill="#ffca28"/>
      <path d="m111.8,61.32c4.41,0,8.41,1.79,11.3,4.68,2.89,2.89,4.68,6.89,4.68,11.3,0,.35-.01.71-.04,1.06-.08,1.18-.18,2.56-.37,3.69-8.51,1.53-16.42,4.81-23.33,9.45-.91-.61-2.21-1.68-3.07-2.47-.64-.59-1.22-1.23-1.76-1.91-2.12-2.72-3.38-6.13-3.38-9.82,0-4.41,1.79-8.41,4.68-11.3,2.89-2.89,6.88-4.68,11.3-4.68Z" fill="#ffbb54"/>
      <polygon points="90.21 80.1 76.79 77.36 90.21 74.74 90.21 80.1" fill="#ffca28"/>
      <polygon points="94.87 64.41 87.37 53.43 98.66 60.62 94.87 64.41" fill="#ffca28"/>
      <polygon points="124.68 60.62 135.7 53.16 128.47 64.41 124.68 60.62" fill="#ffca28"/>
      <polygon points="132.99 78.38 132.99 73.01 146.51 75.75 132.99 78.38" fill="#ffca28"/>
      <polygon points="93.68 88.94 97.47 92.73 86.3 100.05 93.68 88.94" fill="#ffca28"/>
    </g>
  </g>
  <g id="logo" class="start">
    <g>
      <path d="m58.42,170.79c0-25.29,10.25-48.18,26.82-64.75,16.57-16.57,39.47-26.82,64.75-26.82s48.18,10.25,64.75,26.82c16.57,16.57,26.82,39.46,26.82,64.75h-7.96c0-23.09-9.36-43.99-24.49-59.12-15.13-15.13-36.03-24.49-59.12-24.49s-43.99,9.36-59.12,24.49c-15.13,15.13-24.49,36.03-24.49,59.12h-7.96Z" fill="#ef5350"/>
      <path d="m74.48,170.79c0-20.85,8.45-39.73,22.12-53.4,13.67-13.67,32.55-22.12,53.4-22.12s39.73,8.45,53.4,22.12c13.67,13.67,22.12,32.55,22.12,53.4h-7.96c0-18.66-7.56-35.55-19.79-47.77-12.23-12.23-29.12-19.79-47.77-19.79s-35.55,7.56-47.77,19.79c-12.23,12.23-19.79,29.12-19.79,47.77h-7.96Z" fill="#ffca28"/>
      <path d="m90.25,170.79c0-16.5,6.69-31.43,17.5-42.25,10.81-10.81,25.75-17.5,42.25-17.5s31.44,6.69,42.25,17.5c10.81,10.81,17.5,25.75,17.5,42.25h-7.96c0-14.3-5.8-27.25-15.17-36.62-9.37-9.37-22.32-15.17-36.62-15.17s-27.25,5.8-36.62,15.17c-9.37,9.37-15.17,22.32-15.17,36.62h-7.96Z" fill="#42a5f5"/>
      <path d="m90.88,111.66c-15.13,15.13-24.49,36.03-24.49,59.12h8.09c0-20.85,8.45-39.73,22.12-53.4,13.67-13.67,32.55-22.12,53.4-22.12s39.73,8.45,53.4,22.12c13.67,13.67,22.12,32.55,22.12,53.4h8.09c0-23.09-9.36-43.99-24.49-59.12-15.13-15.13-36.03-24.49-59.12-24.49s-43.99,9.36-59.12,24.49Z" fill="#f57c00" fill-rule="evenodd"/>
      <path d="m102.23,123.02c-12.23,12.23-19.79,29.12-19.79,47.77h7.81c0-16.5,6.69-31.43,17.5-42.25,10.81-10.81,25.75-17.5,42.25-17.5s31.44,6.69,42.25,17.5c10.81,10.81,17.5,25.75,17.5,42.25h7.81c0-18.66-7.56-35.55-19.79-47.77-12.23-12.23-29.12-19.79-47.77-19.79s-35.55,7.56-47.77,19.79Z" fill="#66bb6a" fill-rule="evenodd"/>
    </g>
  </g>
  <g id="sun_large">
    <g>
      <polygon points="105.32 130.62 77.21 124.88 105.32 119.38 105.32 130.62" fill="#ffca28"/>
      <polygon points="144.72 80.04 150.29 51.93 155.91 80.04 144.72 80.04" fill="#ffca28"/>
      <polygon points="115.09 97.75 99.37 74.74 123.03 89.81 115.09 97.75" fill="#ffca28"/>
      <polygon points="177.53 89.81 200.62 74.17 185.47 97.75 177.53 89.81" fill="#ffca28"/>
      <polygon points="155.28 169.96 149.71 198.07 144.08 169.96 155.28 169.96" fill="#ffca28"/>
      <polygon points="184.91 152.25 200.62 175.26 176.96 160.19 184.91 152.25" fill="#ffca28"/>
      <polygon points="122.47 160.19 99.37 175.83 114.52 152.25 122.47 160.19" fill="#ffca28"/>
      <polygon points="194.94 127.01 194.94 115.77 223.27 121.49 194.94 127.01" fill="#ffca28"/>
      <circle cx="149.58" cy="125.71" r="34.43" fill="#ffca28"/>
    </g>
  </g>
</svg>
<button id="pause" class="btn">Play</button>
    </div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500&display=swap');

:root {
  --main-bg-color: #ffbb54;
}

html {
  box-sizing: border-box;
}

body{
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
}

*,
*::before,
*::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

.container {
  position: relative;
  height: 250px;
  width: 300px;
  overflow: hidden;
  visibility: hidden;
  background-color: rgb(247, 230, 185);
}

/* Intro */

h1{
  position: absolute;
  left: 56px;
  top: 180px;
  color: #f57c00;
  font-size: 1.35rem;
  font-weight: 500;
}

/* Address */

.title{
  color: var(--main-bg-color);
  font-size: 1.2rem;
  z-index: 10;
}

.title1{
  position: absolute;
  left: 20px;
  top: 60px;
  color: #ef5350;
  font-weight: 500;
}

.title2{
  position: absolute;
  left: 20px;
  top: 85px;
  color: #f57c00;
  font-weight: 500;
}

.title3{
  position: absolute;
  left: 20px;
  top: 110px;
  color: #66bb6a;
  font-weight: 500;
}

.title4{
  position: absolute;
  left: 20px;
  top: 135px;
  color: #42a5f5;
  font-weight: 500;
}

#sun_large{
  position: absolute;
  top: 300px;
  left: 0;
  width: 300px;
  height: 250px;
}

/* Building */


.building{
  top: 0;
  left: 0px;
  width: 376px;
  height: 250px;
  position: absolute;
  z-index: 20;
}

.size{
  background-color: rgb(247, 230, 185);
  position: absolute;
  left: 120px;
  top: 150px;
  padding: 10px;
  text-align: left;
  color: white;
  z-index: 30;
  font-size: 0.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

.size_title{
  color: #ef5350;
  font-weight: 500;
}

.size_amount{
  color: #66bb6a;
  font-size: 1.9rem;
  font-weight: 500;
}

.size_amount span{
  font-size: 1rem;
  font-weight: 500;
}

.size_date{
  color: #42a5f5;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 500;
}

/* Basket */

.amenities, .trains, .vinyls, .end{
  color: #f57c00;
  font-size: 1rem;
  position: absolute;
  font-weight: 500;
}

.amenities1{
  left: 84px;
  top: 13px;
  font-weight: 500;
}

.amenities2{
  left: 42px;
  top: 218px;
  font-weight: 500;
}

#basket {
  clip-path: url(#myMask);
  z-index: 40;
}

/* Trains */

.trains1{
  left: 86px;
  top: 13px;
  font-weight: 500;
}

.trains2{
  left: 30px;
  top: 218px;
  font-weight: 500;
}

#train_section{
  clip-path: url(#myMask);
  z-index: 40;
}

/* Vinyl */

.vinyl1{
  left: 54px;
  top: 13px;
  font-weight: 500;
}

.vinyl2{
  left: 37px;
  top: 218px;
  font-weight: 500;
}

#vinyl{
  clip-path: url(#myMask);
  z-index: 40;
}

/* End */

.end1{
  left: 70px;
  top: 250px;
  font-weight: 500;
}


/* Code below for the button */

.btn {
  height: 30px;
  width: 60px;
  background-color: rgb(0, 0, 0);
  position: fixed;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  left: 10px;
  z-index: 100;
  color: white;
  box-shadow: none;
  border: none;
  font-size: 15px;
  border: 1px solid black;
}

.btn:hover {
  color: white;
  border: 1px solid rgba(0, 0, 0, 0.8);
}

#pause {
  left: 10px;
  top: 260px;
}

              
            
!

JS

              
                let select = (e) => document.querySelector(e);
let selectAll = (e) => document.querySelectoAll(e);

// Create varialbles
const title = gsap.utils.toArray(".title");
const title1 = select(".title1");
const title2 = select(".title2");
const title3 = select(".title3");
const title4 = select(".title4");
const circle = select("#circle");
const sun_large = select("#sun_large > g");
const circles = gsap.utils.toArray(".circles");
const outer_circle = select("#outer_circle");
const inner_circle = select("#inner_circle");
const logo = select("#logo");
const logo_sun = select("#logo_sun");
const logo_text = select(".logo_text");
const start = gsap.utils.toArray(".start");
const building = select(".building");
const size = select(".size");
const basket = select("#basket > g");
const amenities = gsap.utils.toArray(".amenities");
const amenities1 = select(".amenities1");
const amenities2 = select(".amenities2");
const train_section = gsap.utils.toArray("#train_section");
const train = select("#train");
const tracks = select("#tracks");
const trains = gsap.utils.toArray(".trains");
const trains1 = select(".trains1");
const trains2 = select(".trains2");
const vinyl = select("#vinyl > g");
const vinyls = gsap.utils.toArray(".vinyls");
const vinyl1 = select(".vinyl1");
const vinyl2 = select(".vinyl2");
const end = select(".end");
const end1 = select(".end1");


// Set the elements
gsap.set(".container", { autoAlpha: 1 });
gsap.set(title1, { autoAlpha: 1});
gsap.set(title2, { autoAlpha: 1});
gsap.set(title3, { autoAlpha: 1});
gsap.set(title4, { autoAlpha: 1});
gsap.set(sun_large, { x: 120, y: 120, autoAlpha: 0, scale: 1.9, transformOrigin: "center center"});
gsap.set(circle, { autoAlpha: 0, scale: 0, transformOrigin: "center center"});
gsap.set(circles, { autoAlpha: 0 });
gsap.set(outer_circle, {transformOrigin: "center center"});
gsap.set(inner_circle, {transformOrigin: "center center"});
gsap.set(basket, {transformOrigin: "top 50%"});
gsap.set(logo, { autoAlpha: 1});
gsap.set(logo_sun, { autoAlpha: 0, scale: 0, transformOrigin: " 144px 98px"});
gsap.set(building, { autoAlpha: 0});
gsap.set(size, { autoAlpha: 0, scale: 0, transformOrigin: " right bottom"});
gsap.set(train, {scale: 1,transformOrigin: "50% 50%"}); 
gsap.set(vinyl, {scale: 1,transformOrigin: "50% 50%"}); 

let master = gsap.timeline({
  onComplete: () => (pause.innerHTML = "Play"),
});
master.pause();

// Start animation

// Intro

master.from(logo_text, {
  y: 70, 
  ease: "back.out(1.7)"
});

master.to(logo_sun, {
  autoAlpha: 1, 
  scale: 1,
}, "+=0.5");

master.to(start, {
  x: -250,
  ease: "power4.out",
  duration: 0.75
}, "+=1");

// Address

master.from(title, {
  x: -270,
  stagger: 0.5,
  ease: "back.out(1.5)"
  }, ">");

  master.to(sun_large,{ autoAlpha: 1}, "<");

  master.to(sun_large, 12,  {
    rotation: -360, repeat: -1, ease: "none", transformOrigin: "center center"}, "<");

  // Building

  master.to(building, {
    autoAlpha: 1,
    }, "-=8");

    master.to(sun_large, {
      autoAlpha: 0,
      }, ">");

    master.to(title, {
      autoAlpha: 0
    }, ">")

 master.to(building, {
    x: -20,
    duration: 6,
    ease: "none"
  }, "<");

master.to(size, {
    autoAlpha: 1,
    scale: 1,
    ease: "back.out(1.7)",
    transformOrigin: "right bottom",
    duration: 0.5,
  }, "<");


  master.to(building, {
   autoAlpha: 0,
  }, "+=6");

  master.to(size, {
    autoAlpha: 0,
   }, "<");

   // Basket

  master.to(circle, {
    autoAlpha: 1,
    scale: 1,
    ease: "back.out(1.5)"
   }, "<");

   master.to(circles, {
    autoAlpha: 1,
   }, ">");

   master.to(inner_circle, 8,  {
   rotation: 360, repeat:-1, ease: "none", transformOrigin: "center center" }), "-=2";

   master.to(outer_circle, 5,  { 
    rotation: -360, repeat:-1, ease: "none", transformOrigin: "center center"}, "<");

master.from(basket, {
  x: 120,
}, "<");

master.fromTo(basket, {
  rotate: -15,
  ease: "Power2.easeInOut",
  duration: 1.25
},{
  rotate: 15,
  repeat: -1,
  yoyo: "true",
  ease: "Power2.easeInOut",
  duration: 1.25
}, ">");

master.from(amenities1, {
  y: -30,
  duration: 0.25,
  ease: "back.out(1.7)"
},"-=2");

master.from(amenities2, {
  y: 30,
  duration: 0.25,
  ease: "back.out(1.7)"
},"<");

// Train

master.to(basket, {
  autoAlpha: 0,
},"+=5");

master.to(amenities, {
  autoAlpha: 0,
},"<");

master.from(train_section, {
  x: -120,
}, ">");

master.to(train, {
  scale: 1.4,
}, "+=1");

master.to(tracks, {
  y: 10,
}, "<");

master.from(trains1, {
  y: -30,
  duration: 0.25,
  ease: "back.out(1.7)"
},"-=2");

master.from(trains2, {
  y: 30,
  duration: 0.25,
  ease: "back.out(1.7)"
},"<");

// Vinyl

master.to(train_section, {
  autoAlpha: 0,
},"+=5");

master.to(trains, {
  autoAlpha: 0,
},"<");

master.from(vinyl, {
  x: 120,
}, ">");

master.to(vinyl, 8,  {
  rotation: 360, repeat:-1, ease: "none", transformOrigin: "center center"}), "-=2";

master.from(vinyl1, {
  y: -35,
  duration: 0.25,
  ease: "back.out(1.7)"
},"<");

master.from(vinyl2, {
  y: 30,
  duration: 0.25,
  ease: "back.out(1.7)"
},"<");

// End

master.to(vinyls, {
  autoAlpha: 0,
},"+=5");

master.to(vinyl, {
  autoAlpha: 0,
},"<");

master.to(circles, {
  autoAlpha: 0,
},"<");

master.to(circle, {
  autoAlpha: 0,
},"<");

master.to(logo, {
  x: 0
});



master.to(end1, {
  y: -60,
  duration: 0.25,
  ease: "back.out(1.7)"
},">");


// Button code

pause.addEventListener("click", () => {
  master.paused(!master.paused());
  if (master.progress() == 1) {
    master.restart();
  
  }
  pause.innerHTML = master.paused() ? "Play" : "Pause";

});


              
            
!
999px

Console