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

              
                  <section class="spacer">Spacer</section>

<div class='noise_container'>
  <div class="text-wrapper"><p><span class="typewriter-text"></span><span class="cursor">|</span></p>
</div>
<!--   <div class="music_subhead"><span>Story takes</span></div> -->
        <video id="vid-fade" autoplay playsinline muted loop preload>
          <source src="https://mrc-website-assets.s3.eu-west-2.amazonaws.com/video/video-noise.mp4" />
        </video>
              <video id="vid-fade2" autoplay playsinline muted loop preload>
          <source src="https://mrc-website-assets.s3.eu-west-2.amazonaws.com/video/music-index-fade.mp4" />
        </video>
      <svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" viewBox="0 0 412 109" enable-background="new 0 0 412 109" xml:space="preserve">
        <title>31 Nights of Horror 2017</title>
        <desc>My personal 31 Nights of Horror series continues this year and will launch 29.09.2017. Follow the calendar here: https://yuschick.github.io/31-Nights-of-Horror-2017</desc>
        <defs>
          <g id="text">
                      <clipPath id="endPaths">
<path id="start0" d="m148.05,40.45v16.61l-12.15-16.61h-13.68v28.16h10.46v-16.62l12.15,16.62h13.68v-28.16h-10.46Z" fill=""/>
    <path id="start1" d="m181,69.01c-12.35,0-17.7-4.75-17.7-14.52,0-9.74,5.35-14.44,17.7-14.44v8.85c-6.2,0-7.24,2.66-7.24,5.59s1.09,5.67,7.24,5.67c6.16,0,7.24-2.69,7.24-5.67s-1.05-5.59-7.24-5.59v-8.85c12.35,0,17.7,4.71,17.7,14.44s-5.35,14.52-17.7,14.52Z" fill=""/>
    <path id="start2" d="m203.9,40.45v28.16h10.46v-28.16h-10.46Z" fill=""/>
    <path id="start3" d="m237.53,50.71c-6.12-.24-7.12-.2-7.12-1.29s1.01-1.33,5.91-1.33,7.52.32,7.52,1.81h10.46c0-7.2-6.2-9.86-17.18-9.86s-17.18,2.66-17.18,8.85c0,6.56,4.87,8.65,17.58,9.05,6.6.2,7.52.36,7.52,1.57,0,1.05-.92,1.45-7.12,1.45-6.64,0-7.93-.93-7.93-2.29h-10.46c0,8.37,6.44,10.34,17.98,10.34s17.98-1.97,17.98-9.74c0-7.36-6.88-8.13-17.98-8.57Z" fill=""/>
    <path id="start4" d="m290.48,48.49v-8.05h-29.77v28.16h29.77v-8.05h-19.31v-2.62h19.31v-6.84h-19.31v-2.61h19.31Z" fill=""/>
              </g>
        </defs>
              
        
        
<!--               <mask id="mask" x="0" y="0" width="100" height="50">
                <rect x="0" y="-100" width="640" height="320" fill="#fff"/>
                <use xlink:href="#text"/>
              </mask> -->

<!--             <rect x="0" y="-100" width="640" height="320" mask="url(#mask)" fill-opacity="1"/>
            <use xlink:href="#text" mask="url(#mask)"/> -->
          </svg>
      <img class='teaser' src='https://yuschick.github.io/31-Nights-of-Horror-2017/teaser-share-image.jpg' alt="31 Nights of Horror - 29.09.17" />
    </div>
  </div>
</div>


  <section class="spacer">Spacer</section>
              
            
!

CSS

              
                 @font-face {
  font-family: "R-txt-book-light";
  src: url("https://mrc-website-assets.s3.eu-west-2.amazonaws.com/fonts/Rattxt-book.woff")
    format("woff");
}

* {
	 margin: 0;
	 padding: 0;
}
 *, *:before, *:after {
	 box-sizing: border-box;
}
 body {
	 background: blue;
}
 .noise_container {
/*    position: relative; */
	 align-items: center;
	 display: flex;
	 justify-content: center;
	 margin: 0 auto;
/* 	 max-width: 1280px; */
	 min-height: 100vh;
	 width: 100%;
}
 .comingsoon-container {
	 overflow: hidden;
	 position: relative;
	 width: 100%;
}

 .video {
	 height: 100vh;
	 left: 0;
	 position: absolute;
	 top: 0;
	 width: 100%;
}

#vid-fade {
  position: absolute;
    height: 100vh;
  opacity: 0;
/*   z-index: 0; */
    -webkit-clip-path: url(#endPaths);
  clip-path: url(#endPaths);
} 

#vid-fade2 {
/*   position: absolute;
  z-index: 1; */
  height: 100vh;
  opacity: 0;
    -webkit-clip-path: url(#endPaths);
  clip-path: url(#endPaths);
}

 svg {
	 display: block;
	 height: 100vh;
	 left: 0;
	 position: absolute;
	 top: 0;
	 width: 100%;
}
 .teaser {
	 display: none;
}
 @media screen and (max-width: 650px) {
	 .teaser {
		 display: block;
		 width: 100%;
	}
	 iframe, svg {
		 display: none;
	}
}
 
@import url('https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Manrope:wght@200&display=swap');

.spacer {
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  background: yellow;
  color: darkblue;
  font-size: 5vw;
font-family: 'Manrope', sans-serif;
}

.music_subhead {
    font-family: "R-txt-book-light";
    color: #f4f4f4;
    position: absolute;
    margin-top: -30vh;
    z-index: 99999;
  font-size: 2em;
}

/* TYPEWRITER STYLES */


.text-wrapper {
  display: flex;
  position: absolute;
  height: 100vh;
  width: 100vw;
  align-items: center;
  justify-content: center;
/*   background: #1a1a1a; */
  z-index: 9999999;
  margin-top: -180px;
}

.typewriter-text,
  .cursor {
  font-family: "R-txt-book-light";
    font-size: 2em;
    font-weight: 700;
    color: #f4f4f4;
    margin: 0;
    padding: 0;
  }
  .cursor {
    display: inline-block;
  }
              
            
!

JS

              
                gsap.registerPlugin(MorphSVGPlugin, ScrollTrigger)
const colors = ["#46a4cc", "#50a39e", "#a63e4b", "#e3aa59", "#a63ba0"];

const words = ['Story takes', 'and makes'];
const textClass = '.typewriter-text';


const tl = gsap.timeline({
  scrollTrigger: {
   trigger: ".noise_container",
    pin: ".noise_container",
    pinSpacing: true,
    start: "top top",
    end: "bottom top-=300",
    markers: true,
    anticipatePin: 1
//     onUpdate() {
//             const noiseSvg = noiseSvg = document.querySelector(".noise_svg");
// noiseSvg.current.style.clipPath = "none";

//   // force the browser to recalculate the element
//   noiseSvg.current.offsetWidth;

//   noiseSvg.current.style.clipPath = "url(#endPaths)";
// }
  }
})

 tl.fromTo('.cursor', { autoAlpha: 0 }, { autoAlpha: 1, duration: 0.5, repeat: -1, ease: SteppedEase.config(1) });

tl.to(textClass, { text: 'Story takes', opacity: 1, duration: 0.75, repeat:1, repeatDelay: 1.5, ease: SteppedEase.config(15), yoyo:true });

tl.to("#vid-fade", {
  autoAlpha: 1,
  duration: 1
}, ">-2")

tl.to(textClass, { text: 'and makes', opacity: 1, duration: 0.75 }, ">1.5");

  tl.to("#start0", {
    duration: 2,
    morphSVG:"m122.23,40.44h12.88l8.69,16.09,8.69-16.09h12.88v28.16h-10.46v-13.4l-7.68,13.4h-6.84l-7.69-13.4v13.4h-10.46v-28.16Z",
    ease: "power3.inOut"
  },">-0.75");

  tl.to("#start1", {
    duration: 2,
    morphSVG:"m185.48,69.01c-12.35,0-17.7-4.75-17.7-14.52s0-14.05,0-14.05h10.46s0,11.11,0,14.05,1.09,5.67,7.24,5.67c6.16,0,7.24-2.69,7.24-5.67v-14.05h10.46v14.05c0,9.78-5.35,14.52-17.7,14.52Z",
    ease: "power3.inOut"
  },"<");

  tl.to("#start2", {
    duration: 2,
    morphSVG:"m215.66,58.67c0,1.37,1.29,2.29,7.93,2.29,6.2,0,7.12-.4,7.12-1.45,0-1.21-.93-1.37-7.52-1.57-12.71-.4-17.58-2.49-17.58-9.05,0-6.2,6.08-8.85,17.18-8.85s17.18,2.66,17.18,9.86h-10.46c0-1.49-2.41-1.81-7.52-1.81s-5.91.24-5.91,1.33,1.01,1.05,7.12,1.29c11.11.44,17.99,1.21,17.99,8.57,0,7.77-6.44,9.74-17.99,9.74s-17.99-1.97-17.99-10.34h10.46Z",
    ease: "power3.inOut"
  },"<");

  tl.to("#start3", {
    duration: 2,
    morphSVG: "m253.64,68.61h-10.46v-28.16h10.46v28.16Z",
    // fill: colors[i],
    // yoyo: true,
    // repeat: -1,
    // repeatDelay: 1 ,
    ease: "power3.inOut"
  },"<");


  tl.to("#start4", {
    duration: 2,
    morphSVG: "m272.95,40.04c11.27,0,17.14,3.94,17.58,12.84h-10.7c-.4-2.66-2.45-3.98-6.88-3.98-6.2,0-7.24,2.62-7.24,5.59s1.09,5.67,7.24,5.67c4.43,0,6.48-1.37,6.88-4.06h10.7c-.44,8.93-6.28,12.92-17.58,12.92-12.39,0-17.7-4.71-17.7-14.52s5.31-14.44,17.7-14.44Z",
    // fill: colors[i],
    // yoyo: true,
    // repeat: -1,
    // repeatDelay: 1,
    ease: "power3.inOut"
  },"<");

tl.to("#vid-fade", {
  autoAlpha: 0
}, "<1")
tl.to("#vid-fade2", {
  autoAlpha: 1
}, "<")

// var img = document.querySelector(".noise_svg");
// function redrawClipPath() { // <- call this in an onUpdate
//     img.style.clipPath = "none";
//     img.offsetWidth; //force a style recalculation
//     img.style.clipPath = "url(#endPaths)";
// };


/// TYPEWRITER CODE ///




 
  
  // var tl = new gsap.timeline({
  //   ease: SteppedEase.config(15),
  //   opacity: 0,
  //   repeat: -1,
  // });


  // gsap.set(textClass, {opacity:0})
  
// Create a new timeline instance
var tl2 = gsap.timeline();

// Add your first tween



// Add your second tween


              
            
!
999px

Console