Codrops 원본

Kinetic Typography Page Transition

텍스트 · MIT

텍스트 더 보기
ORIGINAL PREVIEW
Kinetic Typography Page Transition 정적 미리보기

갤러리 안에서는 화면을 벗어나거나 움직임을 멈추면 예제도 닫힙니다. 다시 재생할 때는 처음부터 시작해요.

큰 화면으로 보기 새 탭

SOURCE FILES

원본 코드 읽기

10개 파일

수집한 원본 소스와 실행 안내를 함께 제공합니다.

src/css/base.css
파일 저장

*,
*::after,
*::before {
	box-sizing: border-box;
}

:root {
	font-size: 14px;
}

html, body {
	width: 100%;
	height: 100%;
}

body {
	margin: 0;
	--color-text: #000;
	--color-text-alt: #000;
	--color-bg: #de5f40;
	--color-link: #000;
	--color-link-hover: #000;
	--color-link-alt: #000;
	--color-type: #000;
	--type-line-opacity: 0.05;
	color: var(--color-text);
	background-color: var(--color-bg);
	font-family: halyard-display, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
	content: '';
	position: fixed;
	z-index: 1000;
}

.js .loading::before {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--color-bg);
}

.js .loading::after {
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	border-radius: 50%;
	opacity: 0.4;
	background: var(--color-link);
	animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
	to {
		opacity: 1;
		transform: scale3d(0.5,0.5,1);
	}
}

a {
	text-decoration: underline;
	color: var(--color-link);
	outline: none;
}

a:hover {
	text-decoration: none;
	color: var(--color-link-hover);
	outline: none;
}

a.link-alt {
	text-decoration: none;
	color: var(--color-link-alt);
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
	/* Provide a fallback style for browsers
	 that don't support :focus-visible */
	outline: none;
	background: lightgrey;
}

a:focus:not(:focus-visible) {
	/* Remove the focus indicator on mouse-focus for browsers
	 that do support :focus-visible */
	background: transparent;
}

a:focus-visible {
	/* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
	outline: 2px solid red;
	background: transparent;
}

main {
	position: relative;
	overflow: hidden;
}

.unbutton {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
}

.unbutton:focus {
	outline: none;
}

.frame {
	padding: 1rem;
	margin-bottom: 2rem;
	display: flex;
	flex-wrap: wrap;
	position: relative;
	z-index: 1000;
	text-transform: uppercase;
}

.frame__title {
	font-size: 1rem;
	margin: 0 0 1rem;
}

.frame__tagline {
	color: var(--color-text-alt);
}

.frame__links {
	display: inline;
}

.frame__links a:not(:last-child) {
	margin-right: 1rem;
}

.frame__author {
	display: block;
	width: 100%;
	margin-bottom: 1rem;
}

.item-wrap {
	text-transform: uppercase;

	display: grid;
	grid-template-columns: 50% 50%;
}

.item {
	--base: 7vh;
	--interval: 9vh;
	padding: 1rem;
	margin: 1rem 0;
	cursor: pointer;
	width: 100%;
	position: relative;
	flex: none;
	will-change: transform, opacity;
}

.item__img {
	width: 100%;
	border-radius: 12px;
	will-change: transform;
}

.item__caption-title {
	font-size: inherit;
}

.item__caption-description {
	display: none;
}

.type {
	position: fixed;
	height: 100vmax;
	text-transform: uppercase;
	width: 100vmax;
	display: grid;
	justify-content: center;
	align-content: center;
	text-align: center;
	top: 50%;
	margin-top: -50vmax;
	will-change: transform;
}

.type__line {
	white-space: nowrap;
	font-size: 20vh;
	font-size: clamp(7rem,18.75vh,15rem);
	line-height: 0.75;
	font-weight: bold;
	font-family: quiche-sans, sans-serif;
	color: var(--color-type);
	opacity: var(--type-line-opacity);
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	will-change: transform, opacity;
}

.article-wrap {
	position: absolute;
	top: 5vh;
	width: 100%;
	justify-self: center;
	align-self: end;
	padding: 1rem;
	pointer-events: none;
}

.article {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	display: grid;
	grid-template-columns: 1rem 1fr;
	width: 100%;
	align-items: start;
	grid-template-areas: 'img img'
						'number title'
						'intro intro'
						'desc desc';

}

.article--current {
	opacity: 1;
	pointer-events: auto;
	position: relative;
}

.article__img-wrap {
    width: 100%;
    height: 250px;
    overflow: hidden;
    grid-area: img;
    transform-origin: 50% 100%;
    margin-bottom: 1rem;
	border-radius: 17px 17px 0 0;
}

.article__img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: 50% 35%;
}

.article__number {
	grid-area: number;
	font-weight: bold;
}

.article__title {
	grid-area: title;
	line-height: 0.85;
	font-size: 8vw;
	text-transform: uppercase;
	font-weight: bold;
	font-family: quiche-sans, sans-serif;
	color: var(--color-type);
	position: relative;
	margin: 1rem 0 0.5rem;
	pointer: default;
}

.article__intro {
	grid-area: intro;
	font-weight: bold;
	padding-right: 2rem;
}

.article__description {
	grid-area: desc;
	overflow: hidden;
	padding-right: 2rem;
}

.back {
	background: none;
	border: 0;
	padding: 0;
	margin: 0 0 1rem 0;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    stroke: #000;
    z-index: 1000;
    cursor: pointer;
    width: 50px;
}

.back svg {
	stroke-linecap: round;
}

.back:hover,
.back:focus {
	outline: none;
	stroke: #823725;
}

@media screen and (min-width: 53em) {
	:root {
		font-size: 16px;
	}
	html, body {
		overflow: hidden;
	}
	.frame {
		position: fixed;
		text-align: left;
		z-index: 100;
		top: 0;
		left: 0;
		display: grid;
		align-content: space-between;
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 1rem 2vw;
		grid-template-columns: 40% 20% 40%;
		grid-template-areas: 'title author links';
	}
	.frame__title-wrap {
		grid-area: title;
		text-align: left;
	}
	.frame__title {
		margin: 0;
	}
	.frame__tagline {
		position: relative;
	}
	.frame__author {
		grid-area: author;
		justify-self: center;
	}
	.frame__links {
		grid-area: links;
		padding: 0;
		justify-self: end;
	}
	.item-wrap {
		height: 100vh;
		display: flex;
		overflow: hidden;
		width: 100vw;
		position: relative;
		justify-content: flex-start;
		align-items: center;
	}
	.item {
		width: 22vw;
		padding: 0;
		margin: auto 2vw var(--base);
	}
	.item:nth-child(2) {
		margin-bottom: calc(var(--base) + var(--interval));
	}

	.item:nth-child(3) {
		margin-bottom: calc(var(--base) + var(--interval) * 2);
	}

	.item:nth-child(4) {
		margin-bottom: calc(var(--base) + var(--interval) * 3);
	}

	.item__caption-description {
		display: block;
	}

	.back {
		position: absolute;
		left: calc(((100vw - (38vw + 280px)) / 2) + 1.5rem);
	}
	.article-wrap {
		top: 20vh;
		height: 80vh;
		padding: 0;
	}
	.article {
		height: 100%;
		width: calc(38vw + 280px);
		margin: 0 auto;
		grid-template-rows: 10vw 2rem 12vw auto auto;
		grid-template-columns: 1.5rem 30% 1fr 1.5rem;
		grid-template-areas: '... ... img ...'
							'number ... img ...'
							'... title img ...'
							'... intro img ...'
							'... desc img ...';
	}
	.article__title {
		grid-column-end: 4; 
		margin: 0;
	}
	.article__intro {
		margin: 1.5rem 0;
	}
	.article__img-wrap {
		align-self: end;
        width: 100%;
        height: 100%;
        margin: 0;
    }
    .article__img {
    	background-position: 50% 50%;
    }
}
src/index.html
파일 저장

<!DOCTYPE html>
<html lang="en" class="no-js">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Kinetic Typography Page Transition | Codrops</title>
		<meta name="description" content="A page transition concept based on a kinetic typography motion effect." />
		<meta name="keywords" content="page transition, motion, kinetic typography, type, gsap, animation, javascript" />
		<meta name="author" content="Codrops" />
		<link rel="shortcut icon" href="favicon.ico">
		<link rel="stylesheet" href="https://use.typekit.net/cwg6wqv.css">
		<link rel="stylesheet" type="text/css" href="css/base.css" />

		<script>document.documentElement.className="js";var supportsCssVars=function(){var e,t=document.createElement("style");return t.innerHTML="root: { --tmp-var: bold; }",document.head.appendChild(t),e=!!(window.CSS&&window.CSS.supports&&window.CSS.supports("font-weight","var(--tmp-var)")),t.parentNode.removeChild(t),e};supportsCssVars()||alert("Please view this demo in a modern browser that supports CSS Variables.");</script>
	</head>
	<body class="loading">
		<main>
			<div class="type" data-type-transition aria-hidden="true">
				<div class="type__line">bonjour bonjour bonjour</div>
				<div class="type__line">attrayant attrayant attrayant</div>
				<div class="type__line">charmante charmante charmante</div>
				<div class="type__line">rosetta rosetta rosetta</div>
				<div class="type__line">tendresse tendresse tendresse</div>
				<div class="type__line">chatoyer chatoyer chatoyer</div>
				<div class="type__line">bonjour bonjour bonjour</div>
				<div class="type__line">attrayant attrayant attrayant</div>
				<div class="type__line">charmante charmante charmante</div>
				<div class="type__line">rosetta rosetta rosetta</div>
				<div class="type__line">tendresse tendresse tendresse</div>
			</div>
			<div class="frame">
				<div class="frame__title-wrap">
					<h1 class="frame__title">Kinetic Typography Page Transition</h1>
					<p class="frame__tagline">Inspired by this <a href="https://dribbble.com/shots/16174007-Kinetic-Typography">shot</a></p>
				</div>
				<div class="frame__author"><a href="https://www.twitter.com/codrops" class="link-alt">@codrops</a></div>
				<nav class="frame__links">
					<a href="http://tympanus.net/Development/MenuThumbStackAnimation/">Previous demo</a>
					<a href="https://tympanus.net/codrops/?p=56722">Article</a>
					<a href="https://github.com/codrops/KineticTypePageTransition/">GitHub</a>
				</nav>
			</div>
			<section class="item-wrap">
				<figure class="item" data-article="article-1">
					<img class="item__img" src="img/1.jpg" alt="Some title"/>
					<figcaption class="item__caption">
						<h2 class="item__caption-title">01 &mdash; A Poem</h2>
						<p class="item__caption-description">I, D-503, the builder of the Integral, I am only one of the many mathematicians of the United State.</p>
					</figcaption>
				</figure>
				<figure class="item" data-article="article-2">
					<img class="item__img" src="img/2.jpg" alt="Some title"/>
					<figcaption class="item__caption">
						<h2 class="item__caption-title">02 &mdash; Harmony</h2>
						<p class="item__caption-description">From behind the Green Wall from some unknown plains the wind brings to us the yellow honeyed pollen of flowers.</p>
					</figcaption>
				</figure>
				<figure class="item" data-article="article-3">
					<img class="item__img" src="img/3.jpg" alt="Some title"/>
					<figcaption class="item__caption">
						<h2 class="item__caption-title">03 &mdash; A Coat</h2>
						<p class="item__caption-description">I looked over all that I wrote down yesterday and I find that my descriptions are not sufficiently clear.</p>
					</figcaption>
				</figure>
				<figure class="item" data-article="article-4">
					<img class="item__img" src="img/4.jpg" alt="Some title"/>
					<figcaption class="item__caption">
						<h2 class="item__caption-title">04 &mdash; Epilepsy</h2>
						<p class="item__caption-description">The auditorium: an enormous half-globe of glass with the sun piercing through.</p>
					</figcaption>
				</figure>
			</section>
			<section class="article-wrap">
				<button class="back"><svg viewBox="0 0 50 9" width="100%"><path d="M0 4.5l5-3M0 4.5l5 3M50 4.5h-77"></path></svg></button>
				<article class="article" id="article-1">
					<div class="article__img-wrap"><div class="article__img" style="background-image:url(img/large/1.jpg)"></div></div>
					<span class="article__number">01</span>
					<h2 class="article__title">A Poem</h2>
					<p class="article__intro">I, D-503, the builder of the Integral, I am only one of the many mathematicians of the United State.</p>
					<p class="article__description">The great historic hour is near, when the first Integral will rise into the limitless space of the universe. A thousand years ago your heroic ancestors subjected the whole earth to the power of the United State. A still more glorious task is before you,—the integration of the indefinite equation of the Cosmos by the use of the glass, electric, fire-breathing Integral.</p>
				</article>
				<article class="article" id="article-2">
					<div class="article__img-wrap"><div class="article__img" style="background-image:url(img/large/2.jpg)"></div></div>
					<span class="article__number">02</span>
					<h2 class="article__title">Harmony</h2>
					<p class="article__intro">From behind the Green Wall from some unknown plains the wind brings to us the yellow honeyed pollen of flowers.</p>
					<p class="article__description">One’s lips are dry from this sweet dust. Every moment one passes one’s tongue over them. Probably, all women whom I meet in the street (and men certainly also), have today sweet lips. </p>
				</article>
				<article class="article" id="article-3">
					<div class="article__img-wrap"><div class="article__img" style="background-image:url(img/large/3.jpg)"></div></div>
					<span class="article__number">03</span>
					<h2 class="article__title">A Coat</h2>
					<p class="article__intro">I looked over all that I wrote down yesterday and I find that my descriptions are not sufficiently clear.</p>
					<p class="article__description"> That is, everything would undoubtedly be clear to one of us but who knows to whom my Integral will some day bring these records? Perhaps you, like our ancestors, have read the great book of civilization only up to the page of nine hundred years ago.</p>
				</article>
				<article class="article" id="article-4">
					<div class="article__img-wrap"><div class="article__img" style="background-image:url(img/large/4.jpg)"></div></div>
					<span class="article__number">04</span>
					<h2 class="article__title">Epilepsy</h2>
					<p class="article__intro">The auditorium: an enormous half-globe of glass with the sun piercing through.</p>
					<p class="article__description">The circular rows of noble, globe-like, closely-shaven heads. With joy in my heart I looked around. I believe I was looking in the hope of seeing the rose-colored scythe, the dear lips of O-, somewhere among the blue waves of the unifs. Then I saw extraordinarily white, sharp teeth like the.... But no! </p>
				</article>
			</section>
		</main>
		<script type="module" src="js/index.js"></script>
	</body>
</html>
함께 쓰는 파일 8개 보기
src/js/article.js
파일 저장

export class Article {
    // DOM elements
    DOM = {
        el: null,
        imageWrap: null,
        image: null,
        number: null,
        title: null,
        intro: null,
        description: null
    };

    constructor(DOM_el) {
        this.DOM.el = DOM_el;
        // image
        this.DOM.imageWrap = this.DOM.el.querySelector('.article__img-wrap');
        this.DOM.image = this.DOM.el.querySelector('.article__img');
        // number, title, intro, description
        this.DOM.number = this.DOM.el.querySelector('.article__number');
        this.DOM.title = this.DOM.el.querySelector('.article__title');
        this.DOM.intro = this.DOM.el.querySelector('.article__intro');
        this.DOM.description = this.DOM.el.querySelector('.article__description');
    }
}
src/js/index.js
파일 저장

import { preloadImages } from './utils';
import { gsap } from 'gsap';
import { TypeTransition } from './typeTransition';
import { Item } from './item';

// preload images then remove loader (loading class) 
preloadImages('.item__img, .article__img').then(() => document.body.classList.remove('loading'));

// text transition
const typeT = new TypeTransition(document.querySelector('[data-type-transition]'));

// true if there's an animation running
let isAnimating = false;

// frame element
const frameEl = document.querySelector('.frame');


/**** Items ****/

// items array
let itemsInstanceArr = [];
// current item's index
let currentItem = -1;
// Items wrap 
const itemsWrap = document.querySelector('.item-wrap');

[...itemsWrap.querySelectorAll('.item')].forEach(itemEl => {
    // create a new Item
    const item = new Item(itemEl);
    // add it to the array of Item's indexes
    itemsInstanceArr.push(item);
    
    // on click action
    item.DOM.el.addEventListener('click', () => openItem(item));
});

const openItem = item => {
    if ( isAnimating ) return;
    isAnimating = true;

    // update currentItem index
    currentItem = itemsInstanceArr.indexOf(item);
    
    // gsap timeline
    const openTimeline = gsap.timeline({
        onComplete: () => isAnimating = false
    });
    
    // labels
    openTimeline.addLabel('start', 0)
    // type transition starts a bit after the items animation
    .addLabel('typeTransition', 0.3)
    // the article will show a bit before the text transition ends
    .addLabel('articleOpening', typeT.in().totalDuration()*.75 + openTimeline.labels.typeTransition)

    // fade out the items
    .to(itemsInstanceArr.map(item => item.DOM.el), {
        duration: 0.8,
        ease: 'power2.inOut',
        opacity: 0,
        y: (pos) => pos%2 ? '25%' : '-25%'
    }, 'start')
    // fade out the page frame
    .to(frameEl, {
        duration: 0.8,
        ease: 'power3',
        opacity: 0,
        onComplete: () => gsap.set(frameEl, {pointerEvents: 'none'})
    }, 'start')
    
    // text transition starts here
    .add(typeT.in().play(), 'typeTransition')

    // add current class to the item's article and set the pointer events
    .add(() => {
        gsap.set(backCtrl, {pointerEvents: 'auto'})
        gsap.set(itemsWrap, { pointerEvents: 'none' });
        itemsInstanceArr[currentItem].DOM.article.classList.add('article--current');
    }, 'articleOpening')
    // show the back button
    .to(backCtrl, {
        duration: 0.7,
        opacity: 1
    }, 'articleOpening')
    // initially hide all the article elements so we can animate them in
    .set([item.article.DOM.title, item.article.DOM.number, item.article.DOM.intro, item.article.DOM.description], {
        opacity: 0,
        y: '50%'
    }, 'articleOpening')
    // the image wrap and image elements will have opposite translate values (reveal/unreveal effect)
    .set(item.article.DOM.imageWrap, {y: '100%'}, 2)
    .set(item.article.DOM.image, {y: '-100%'}, 2)
    // now fade in and translate the article's elements
    .to([item.article.DOM.title, item.article.DOM.number, item.article.DOM.intro, item.article.DOM.description], {
        duration: 1,
        ease: 'expo',
        opacity: 1,
        y: '0%',
        stagger: 0.04
    }, 'articleOpening')
    // and reveal the image
    .to([item.article.DOM.imageWrap, item.article.DOM.image], {
        duration: 1,
        ease: 'expo',
        y: '0%'
    }, 'articleOpening');
}


/**** Back action ****/

// back button
const backCtrl = document.querySelector('.back');

const closeItem = () => {
    if ( isAnimating ) return;
    isAnimating = true;

    // current open item
    const item = itemsInstanceArr[currentItem];

    // gsap timeline
    const closeTimeline = gsap.timeline({
        onComplete: () => isAnimating = false
    });

    // labels
    closeTimeline.addLabel('start', 0)
    .addLabel('typeTransition', 0.5)
    .addLabel('showItems', typeT.out().totalDuration()*0.7 + closeTimeline.labels.typeTransition)

    .to(backCtrl, {
        duration: 0.7,
        ease: 'power1',
        opacity: 0
    }, 'start')
    .to([item.article.DOM.title, item.article.DOM.number, item.article.DOM.intro, item.article.DOM.description], {
        duration: 1,
        ease: 'power4.in',
        opacity: 0,
        y: '50%',
        stagger: -0.04
    }, 'start')
    .to(item.article.DOM.imageWrap, {
        duration: 1,
        ease: 'power4.in',
        y: '100%'
    }, 'start')
    .to(item.article.DOM.image, {
        duration: 1,
        ease: 'power4.in',
        y: '-100%'
    }, 'start')

    // remove current class from the item's article and set the pointer events
    .add(() => {
        gsap.set(backCtrl, {pointerEvents: 'none'})
        gsap.set(itemsWrap, { pointerEvents: 'auto' });
        item.DOM.article.classList.remove('article--current');
    })

    // text transition starts here
    .add(typeT.out().play(), 'typeTransition')

    .to(frameEl, {
        duration: 0.8,
        ease: 'power3',
        opacity: 1,
        onStart: () => gsap.set(frameEl, {pointerEvents: 'auto'})
    }, 'showItems')
    .to(itemsInstanceArr.map(item => item.DOM.el), {
        duration: 1,
        ease: 'power3.inOut',
        opacity: 1,
        y: '0%'
    }, 'showItems');
}

backCtrl.addEventListener('click', () => closeItem());
src/js/item.js
파일 저장

import gsap from 'gsap/gsap-core';
import { Article } from './article';

export class Item {
    // DOM elements
    DOM = {
        el: null,
        image: null,
        title: null,
        description: null,
        article: null
    };
    // the Item's Article instance
    article;

    constructor(DOM_el) {
        this.DOM.el = DOM_el;
        // image, title and description
        this.DOM.image = this.DOM.el.querySelector('.item__img');
        this.DOM.title = this.DOM.el.querySelector('.item__caption-title');
        this.DOM.description = this.DOM.el.querySelector('.item__caption-description');
        // article element for this item
        this.DOM.article = document.getElementById(this.DOM.el.dataset.article);
        // Article instance
        this.article = new Article(this.DOM.article);
        // mouseenter/mouseleave events: translate all elements
        const hoverTimelineDefaults = {duration: 1, ease: 'expo'};
        this.DOM.el.addEventListener('mouseenter', () => {
            gsap.timeline({defaults: hoverTimelineDefaults})
            .to([this.DOM.image, this.DOM.title, this.DOM.description], {
                y: pos => pos*8-4
            });
        });
        this.DOM.el.addEventListener('mouseleave', () => {
            gsap.timeline({defaults: hoverTimelineDefaults})
            .to([this.DOM.image, this.DOM.title, this.DOM.description], {
                y: 0
            });
        });
    }
}
src/js/typeTransition.js
파일 저장

import { gsap } from 'gsap';

// .type__line CSS opacity value (CSS variable)
const TYPE_LINE_OPACITY = getComputedStyle(document.body).getPropertyValue('--type-line-opacity');

export class TypeTransition {
    // DOM elements
    DOM = {};

    constructor(DOM_el) {
        this.DOM.el = DOM_el;
        // lines of text
        this.DOM.lines = [...document.querySelectorAll('.type__line')];
    }
    // "in" transition (total time: 2.5s)
    in() {
        return gsap.timeline({paused: true})
        .to(this.DOM.el, {
            duration: 1.4,
            ease: 'power2.inOut',
            scale: 2.7,
            rotate: -90
        })
        .to(this.DOM.lines, {
            keyframes: [
                { x: '20%', duration: 1, ease: 'power1.inOut' },
                { x: '-200%', duration: 1.5, ease: 'power1.in' }
            ],
            stagger: 0.04
        }, 0)
        .to(this.DOM.lines, {
            keyframes: [
                { opacity: 1, duration: 1, ease: 'power1.in' },
                { opacity: 0, duration: 1.5, ease: 'power1.in' }
            ]
        }, 0)
    }
    out() {
        return gsap.timeline({paused: true})
        .to(this.DOM.el, {
            duration: 1.4,
            ease: 'power2.inOut',
            scale: 1,
            rotate: 0
        }, 1.2)
        .to(this.DOM.lines, {
            duration: 2.3, 
            ease: 'back',
            x: '0%',
            stagger: -0.04
        }, 0)
        .to(this.DOM.lines, {
            keyframes: [
                { opacity: 1, duration: 1, ease: 'power1.in' },
                { opacity: TYPE_LINE_OPACITY, duration: 1.5, ease: 'power1.in' }
            ]
        }, 0);
    }
}
src/js/utils.js
파일 저장

const imagesLoaded = require('imagesloaded');

// Preload images
const preloadImages = (selector = 'img') => {
    return new Promise((resolve) => {
        imagesLoaded(document.querySelectorAll(selector), {background: true}, resolve);
    });
};

export { 
    preloadImages
};
Media credits and license evidence실행 안내·자료
파일 저장

README.md
## Credits

- Images from [Unsplash](https://unsplash.com/)


## License
[MIT](LICENSE)

Made with :blue_heart:  by [Codrops](http://www.codrops.com)
LICENSE실행 안내·자료
파일 저장

MIT License

Copyright (c) 2009 - 2021 [Codrops](https://tympanus.net/codrops)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Bundled dependency licenses실행 안내·자료
파일 저장

GSAP standard license snapshot
Source: https://gsap.com/community/standard-license/
Retrieved: 2026-09-22T04:22:49.089Z
Original distribution copyright and version headers remain in the runtime code.

Standard "No Charge" GSAP License

 I. DEFINITIONS

 “GSAP License” means the terms and conditions of this GSAP Software License Agreement.

 "GSAP Products" means any Software made available at gsap.com (https://gsap.com) or any successor sites, including but not limited to the GSAP animation library and related plugins, tools, or extensions.

 "Permitted Uses" means the implementation and/or use of GSAP Products on any website, web application, or digital interface by any person or entity (which may include, for clarity, those of companies that compete with Webflow in other areas of business).

 "Prohibited Uses" means any implementation and/or use of GSAP Products in tools that allow users to build visual animations without code that encourages, induces, or materially assists in creating a solution that competes with Webflow’s visual animation building capabilities.

 "Competitive Products" means any software, tool, or service that enables users to create, edit, or manage animations through a visual interface or builder similar to Webflow (https://webflow.com).

 II. GRANT OF LICENSE

 Subject to the terms and conditions of this GSAP License, Webflow grants you a non-exclusive, worldwide license to use, reproduce, display, and implement GSAP Products solely for Permitted Uses.

 III. RESTRICTIONS

 You may not:

 Use any GSAP Products for any Prohibited Uses without prior written consent;

 Reverse engineer any GSAP Products for the purpose of creating Competitive Products;

 Remove or alter any proprietary notices or branding from GSAP Products.

 IV. OWNERSHIP AND INTELLECTUAL PROPERTY

 All intellectual property rights in GSAP Products, including but not limited to copyright, patents, trademarks, and trade secrets, remain the exclusive property of Webflow. This GSAP License does not transfer any ownership rights in GSAP Products to you.

 V. TERMINATION

 Webflow may terminate this GSAP License and revoke your access in its discretion if you fail to comply with any of these terms and conditions. Upon termination, you must cease all use of GSAP Products and destroy all copies in your possession.

 VI. MISCELLANEOUS PROVISIONS

 General: This GSAP License is incorporated into and subject to Webflow’s Terms of Service available here (https://webflow.com/legal/terms) ("Terms of Service"). In the event of any conflict or inconsistency between this GSAP License and the Terms of Service, the terms of this GSAP License shall govern in relation to your use of any GSAP Products.

 Amendments: Webflow reserves the right to update or modify this GSAP License at any time by posting the revised terms on this website, provided that any such updates or modifications shall not result in any material degradation to the security, integrity, or functionality of any GSAP Products. You understand and agree that your continued use of any GSAP Products after such revisions to this GSAP License constitutes your acceptance of this GSAP License as revised. If you do not accept the revised GSAP License, you are prohibited from using versions of the GSAP Products released after the effective date of the revised GSAP License (as well as any updates made to previous versions). Notwithstanding, you may continue using previous versions of GSAP Products under the applicable terms licensed to you prior to the effective date of the revised GSAP License (for clarity, excluding any updates made thereto).

 No Waiver: Failure of Webflow to enforce any provision of this GSAP License shall not constitute a waiver of future enforcement of that or any other provision.

 FAQ

 Is it acceptable for AI tools like ChatGPT, Cursor, Lovable, Webstudio, etc. to generate GSAP code?
 Absolutely! AI-generated code is not a "Prohibited Use".

 What if a WordPress plugin or theme or other niche tool allows users to create GSAP-driven effects through a visual interface? Is that prohibited?
 We want to encourage developers to build on top of GSAP, including visual tools that don't directly compete with Webflow's rich animation-building capabilities. If you are not sure if your product might be considered a "Prohibited Use", feel free to contact us (https://gsap.com/contact) so we can talk through it!

 Can I really use GSAP in commercial projects without paying anything?
 Yes, really! Commercial usage is covered under the standard license. All of GSAP including the plugins that were formerly "members-only" like SplitText (https://gsap.com/docs/v3/Plugins/SplitText/) and MorphSVG (https://gsap.com/docs/v3/Plugins/MorphSVGPlugin) can be used in commercial projects at no charge. Enjoy! 💚

 Effective date: April 30, 2025

 Last modified date: May 30, 2025

 Copyright (©) 2025, Webflow