Codrops 원본
Repetitive Typography Animation
텍스트 · MIT
갤러리 안에서는 화면을 벗어나거나 움직임을 멈추면 예제도 닫힙니다. 다시 재생할 때는 처음부터 시작해요.
SOURCE FILES
원본 코드 읽기
수집한 원본 소스와 실행 안내를 함께 제공합니다.
src/css/base.css
*,
*::after,
*::before {
box-sizing: border-box;
}
:root {
font-size: 16px;
}
html, body {
height: 100vh;
width: 100%;
overflow: hidden;
}
body {
margin: 0;
--color-text: #fff;
--color-bg: #000000;
--color-link: #eb3b78;
--color-link-hover: #fff;
--color-heading: #eb3b78;
color: var(--color-text);
background-color: var(--color-bg);
font-family: normalidad-wide, sans-serif;
font-weight: 300;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
--font-size-typo: 1.777rem;
--margin-strip: 2vh;
--color-bg-frame: #000;
}
/* 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: none;
color: var(--color-link);
outline: none;
}
a:hover {
color: var(--color-link-hover);
outline: none;
}
/* 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;
}
.unbutton {
background: none;
border: 0;
padding: 0;
margin: 0;
font: inherit;
}
.unbutton:focus {
outline: none;
}
.frame {
width: 100%;
text-transform: uppercase;
}
.frame__title {
font-size: inherit;
margin: 0 0 0.5rem;
font-weight: 500;
}
.frame__links {
display: inline;
}
.frame__links a:not(:last-child) {
margin-right: 0.5rem;
}
.intro {
display: grid;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
align-content: space-between;
justify-items: center;
overflow: hidden;
pointer-events: none;
grid-template-rows: repeat(5, min-content);
grid-template-areas: 'top' 'mid-top' 'center' 'mid-bottom' 'bottom';
}
.intro__title-row {
display: grid;
width: 100vw;
overflow: hidden;
grid-auto-flow: column;
grid-auto-columns: min-content;
}
.intro__title-row .intro__title {
opacity: 0;
}
.intro__title {
text-transform: uppercase;
font-weight: 400;
margin: 0 0.5rem;
overflow: hidden;
position: relative;
font-size: var(--font-size-typo);
white-space: nowrap;
will-change: transform;
}
.intro__title--large {
transform: scale(2.3685);
}
.intro__top {
grid-area: top;
align-self: start;
}
.intro__mid-top {
grid-area: mid-top;
}
.intro__center {
grid-area: center;
}
.intro__mid-bottom {
grid-area: mid-bottom;
}
.intro__mid-top,
.intro__mid-bottom {
overflow: visible;
}
.intro__bottom {
grid-area: bottom;
align-self: end;
}
.char {
will-change: transform;
}
.duplicator {
display: grid;
}
.duplicator__inner {
grid-area: 1 / 1 / 2 / 2;
}
.content {
display: grid;
grid-template-rows: repeat(5, calc(25vh - 0.635rem));
}
.content__section {
overflow: hidden;
height: 100%;
}
.content__heading-wrap {
display: flex;
flex-direction: row-reverse;
padding: 0.45rem 0.5rem;
align-items: center;
opacity: 0;
pointer-events: none;
}
.content__heading {
margin: 0;
font-weight: 400;
text-transform: uppercase;
font-size: var(--font-size-typo);
color: var(--color-heading);
position: relative;
line-height: 1;
will-change: transform, opacity;
}
.content__heading::before {
content: '';
display: inline-block;
width: 10vw;
height: 0.65rem;
margin: 0 1.777rem;
box-shadow: 0 -1px 0 0 currentColor;
}
.content__heading-link {
color: var(--color-heading);
will-change: transform, opacity;
}
.strip {
display: flex;
align-items: flex-start;
padding-left: 4rem;
margin: var(--margin-strip) 0;
}
.strip__img {
flex: none;
width: calc(18vh - 2.5rem);
height: calc(18vh - 2.5rem);
border-radius: 8px;
background-size: cover;
background-position: 50% 15%;
margin-right: 2rem;
will-change: transform, opacity;
}
.strip__img--style-1 {
border-radius: 50%;
}
.strip__img--style-2 {
border-radius: 8px;
width: 20vh;
}
.strip__img--style-3 {
border-radius: 20vh;
width: 20vh;
background-position: 50% 20%;
}
.strip__img--info {
width: 300px;
background: var(--color-bg-frame);
color: #fff;
padding: 1rem;
font-size: 0.7rem;
line-height: 1;
border: 1px solid #888;
}
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>Repetitive Typography Animation | Codrops</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="https://use.typekit.net/mam5sqp.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="demo-1 loading">
<main>
<div class="intro">
<h2 id="center-title-initial" class="intro__title intro__title--large intro__center" data-splitting>Summer 22</h2>
<h2 id="center-title" class="intro__title intro__center" data-splitting>Summer 22</h2>
<h2 id="center-title-repeated" class="intro__title intro__center" data-splitting>Summer 22</h2>
<h2 id="top-title" class="intro__title intro__top" data-splitting>Summer 22</h2>
<h2 id="bottom-title" class="intro__title intro__bottom" data-splitting>Summer 22</h2>
<div class="intro__title-row intro__top">
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
</div>
<div class="intro__title-row intro__mid-top">
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
</div>
<div class="intro__title-row intro__center">
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
</div>
<div class="intro__title-row intro__mid-bottom">
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
</div>
<div class="intro__title-row intro__bottom">
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
<h2 class="intro__title">Summer 22</h2>
</div>
</div>
<div class="content">
<section class="content__section">
<div class="content__heading-wrap">
<h3 class="content__heading">Street Strong</h3>
<a class="content__heading-link" href="#">view all</a>
</div>
<div class="strip">
<div class="strip__img strip__img--style-1" style="background-image:url(img/1.jpg)"></div>
<div class="strip__img" style="background-image:url(img/2.jpg)"></div>
<div class="strip__img strip__img--style-1" style="background-image:url(img/3.jpg)"></div>
<div class="strip__img strip__img--style-2" style="background-image:url(img/4.jpg)"></div>
<div class="strip__img" style="background-image:url(img/5.jpg)"></div>
<div class="strip__img strip__img--style-3" style="background-image:url(img/6.jpg)"></div>
<div class="strip__img strip__img--style-1" style="background-image:url(img/7.jpg)"></div>
<div class="strip__img" style="background-image:url(img/8.jpg)"></div>
<div class="strip__img strip__img--style-1" style="background-image:url(img/9.jpg)"></div>
<div class="strip__img" style="background-image:url(img/10.jpg)"></div>
<div class="strip__img strip__img--style-3" style="background-image:url(img/11.jpg)"></div>
</div>
</section>
<section class="content__section">
<div class="content__heading-wrap">
<h3 class="content__heading">Urban Chic</h3>
<a class="content__heading-link" href="#">view all</a>
</div>
<div class="strip">
<div class="strip__img" style="background-image:url(img/12.jpg)"></div>
<div class="strip__img strip__img--style-1" style="background-image:url(img/13.jpg)"></div>
<div class="strip__img" style="background-image:url(img/18.jpg)"></div>
<div class="strip__img strip__img--style-2" style="background-image:url(img/15.jpg)"></div>
<div class="strip__img strip__img--style-1" style="background-image:url(img/16.jpg)"></div>
<div class="strip__img" style="background-image:url(img/17.jpg)"></div>
<div class="strip__img strip__img--style-3" style="background-image:url(img/14.jpg)"></div>
<div class="strip__img strip__img--style-1" style="background-image:url(img/19.jpg)"></div>
<div class="strip__img strip__img--style-2" style="background-image:url(img/20.jpg)"></div>
<div class="strip__img" style="background-image:url(img/21.jpg)"></div>
<div class="strip__img" style="background-image:url(img/22.jpg)"></div>
</div>
</section>
<section class="content__section">
<div class="content__heading-wrap">
<h3 class="content__heading">La Bohème</h3>
<a class="content__heading-link" href="#">view all</a>
</div>
<div class="strip">
<div class="strip__img strip__img--style-2" style="background-image:url(img/23.jpg)"></div>
<div class="strip__img strip__img--style-1" style="background-image:url(img/24.jpg)"></div>
<div class="strip__img strip__img--style-3" style="background-image:url(img/25.jpg)"></div>
<div class="strip__img" style="background-image:url(img/26.jpg)"></div>
<div class="strip__img strip__img--style-2" style="background-image:url(img/27.jpg)"></div>
<div class="strip__img strip__img--style-1" style="background-image:url(img/28.jpg)"></div>
<div class="strip__img" style="background-image:url(img/29.jpg)"></div>
<div class="strip__img" style="background-image:url(img/30.jpg)"></div>
<div class="strip__img strip__img--style-3" style="background-image:url(img/31.jpg)"></div>
<div class="strip__img" style="background-image:url(img/32.jpg)"></div>
<div class="strip__img" style="background-image:url(img/33.jpg)"></div>
</div>
</section>
<section class="content__section">
<div class="content__heading-wrap">
<h3 class="content__heading">Glamour Play</h3>
<a class="content__heading-link" href="#">view all</a>
</div>
<div class="strip">
<div class="strip__img strip__img--style-1" style="background-image:url(img/34.jpg)"></div>
<div class="strip__img strip__img--info">
<div class="frame">
<h1 class="frame__title">Repetitive Typography Animation</h1>
<nav class="frame__links">
<a href="http://tympanus.net/Development/KineticTypePageTransition/">Previous demo</a>
<a href="https://tympanus.net/codrops/?p=56972">Article</a>
<a href="https://github.com/codrops/RepetitiveTypography/">GitHub</a>
</nav>
</div>
</div>
<div class="strip__img" style="background-image:url(img/35.jpg)"></div>
<div class="strip__img strip__img--style-3" style="background-image:url(img/36.jpg)"></div>
<div class="strip__img strip__img--style-1" style="background-image:url(img/37.jpg)"></div>
<div class="strip__img" style="background-image:url(img/38.jpg)"></div>
<div class="strip__img" style="background-image:url(img/39.jpg)"></div>
<div class="strip__img strip__img--style-1" style="background-image:url(img/40.jpg)"></div>
<div class="strip__img strip__img--style-3" style="background-image:url(img/41.jpg)"></div>
<div class="strip__img" style="background-image:url(img/42.jpg)"></div>
</div>
</section>
<section class="content__section">
<div class="content__heading-wrap">
<h3 class="content__heading">Vintage</h3>
<a class="content__heading-link" href="#">view all</a>
</div>
</section>
</div>
</main>
<script type="module" src="js/index.js"></script>
</body>
</html>
함께 쓰는 파일 5개 보기
src/js/index.js
import { preloadImages } from './utils';
import { gsap } from 'gsap';
import "splitting/dist/splitting.css";
import "splitting/dist/splitting-cells.css";
import Splitting from "splitting";
// initialize Splitting on the intro_title elements
Splitting();
// center title that is initially visible (the large one) and it's letters
const initialTitle = document.querySelector('#center-title-initial')
const initialTitleChars = [...initialTitle.querySelectorAll('span.char')];
// the smaller version of the center title (first step animation) and it's letters
const centerTitle = document.querySelector('#center-title');
// it's position
let centerTitlePosition = {x: centerTitle.offsetLeft, y: centerTitle.offsetTop};
const centerTitleChars = [...centerTitle.querySelectorAll('span.char')];
// this will be the same as the center title (repetition) and it's chars will be revealed as the center title chars animate up/down
// this will be the element that stays visible in the end as the new center title
const repeatedCenterTitle = document.querySelector('#center-title-repeated')
const repeatedCenterTitleChars = [...repeatedCenterTitle.querySelectorAll('span.char')];
// top title element and it's letters
const topTitle = document.querySelector('#top-title');
const topTitleChars = [...topTitle.querySelectorAll('span.char')];
// it's position
let topTitlePosition = {x: topTitle.offsetLeft, y: topTitle.offsetTop};
// bottom title element and it's letters
const bottomTitle = document.querySelector('#bottom-title');
const bottomTitleChars = [...bottomTitle.querySelectorAll('span.char')];
// it's position
let bottomTitlePosition = {x: bottomTitle.offsetLeft, y: bottomTitle.offsetTop};
// rows of titles
const rows = {
top: document.querySelector('.intro__title-row.intro__top'),
midTop: document.querySelector('.intro__title-row.intro__mid-top'),
center: document.querySelector('.intro__title-row.intro__center'),
midBottom: document.querySelector('.intro__title-row.intro__mid-bottom'),
bottom: document.querySelector('.intro__title-row.intro__bottom'),
};
// rows children (title elements)
const rowsTitles = {};
Object.keys(rows).forEach( (row, pos) => {
rowsTitles[row] = [...rows[row].querySelectorAll('.intro__title')];
});
// the content sections elements (images and name)
const contentSections = [...document.querySelectorAll('.content__section')];
// content sections pictures
const contentSectionsPhotos = {};
// content sections headings
const contentSectionsHeadings = {};
Object.keys(rows).forEach( (row, pos) => {
contentSectionsPhotos[row] = [...contentSections[pos].querySelectorAll('.strip__img')];
contentSectionsHeadings[row] = contentSections[pos].querySelector('.content__heading-wrap');
});
// gets the position (x,y) of each row's first title element
// this will be used to know how much to translate the titles to their neighbour's position (y-axis) and how much to tanslate the center, top and bottom titles to the beginning of the row (x-axis)
const getRowsPosition = () => {
let positions = {};
for (const row in rowsTitles) {
if (rowsTitles.hasOwnProperty(row)) {
positions[row] = {x: rowsTitles[row][0].offsetLeft, y: rowsTitles[row][0].offsetTop}
}
}
return positions;
}
const rowsPositions = getRowsPosition();
// contentSectionsPhotos.bottom doesn't have image elements...
// get all content section photos except for the last entry (contentSectionsPhotos.bottom)
let photos = Object.values(contentSectionsPhotos).slice(0, -1)
// hide all initially except the initial title (chars)
gsap.set([
topTitleChars,
bottomTitleChars,
centerTitleChars,
repeatedCenterTitleChars,
Object.values(rowsTitles),
photos],
{ opacity: 0 }
);
// create the gsap timeline
const introTimeline = gsap.timeline({
paused: true,
defaults: {
duration: 0.7,
ease: 'expo.inOut',
},
// add initial delay
delay: 0.4
})
.addLabel('start', 0)
// step1: switch between the large "center title" and the smaller "center title" element
.to(initialTitleChars, {
y: pos => pos%2 ? '100%' : '-100%',
stagger: 0.02
}, 'start')
.to(centerTitleChars, {
startAt: { y: pos => pos%2 ? '100%' : '-100%', opacity: 1 },
y: '0%',
stagger: 0.02,
onComplete: () => centerTitle.style.overflow = 'visible'
}, 'start+=0.15')
.addLabel('step2', '>')
// even "center title" chars will animate to the top
.to(centerTitleChars.filter((_,i) => i%2==0), {
y: topTitlePosition.y - centerTitlePosition.y,
stagger: 0.08
}, 'step2')
// odd "top title" chars slide in
.to(topTitleChars.filter((_,i) => i%2!=0), {
startAt: { y: pos => pos%2 ? '100%' : '-100%', opacity: 1 },
y: '0%',
stagger: 0.08,
onComplete: () => {
gsap.set(centerTitleChars.filter((_,i) => i%2==0), { opacity: 0 });
gsap.set(topTitleChars.filter((_,i) => i%2==0), { opacity: 1 });
}
}, 'step2')
// odd "center title" chars will animate to the bottom
.to(centerTitleChars.filter((_,i) => i%2!=0), {
y: bottomTitlePosition.y - centerTitlePosition.y,
stagger: 0.08
}, 'step2')
// even "bottom title" chars slide in
.to(bottomTitleChars.filter((_,i) => i%2==0), {
startAt: { y: pos => pos%2 ? '100%' : '-100%', opacity: 1 },
y: '0%',
stagger: 0.08,
onComplete: () => {
gsap.set(centerTitleChars.filter((_,i) => i%2!=0), { opacity: 0 });
gsap.set(bottomTitleChars.filter((_,i) => i%2!=0), { opacity: 1 });
}
}, 'step2')
// "repeated center title" chars slide in to fill the gaps
.to(repeatedCenterTitleChars, {
startAt: { y: pos => pos%2 == 0 ? '100%' : '-100%', opacity: 1 },
y: '0%',
stagger: index => index%2 == 0 ? 0.08*(index/2) : 0.08*(index-(index-1)/2-1)
}, 'step2')
.addLabel('step2End', '>');
// now both the "top title", "repeated center title" and "bottom title" will animate to the left of the viewport (x position of the first title in the row)
// then the rowsTitles (repeated title elements per row) will scale up and fade in
const elemsArr = [topTitle, repeatedCenterTitle, bottomTitle];
const delay = 1/12;
elemsArr.forEach((el, pos) => {
introTimeline.addLabel('step3', 'step2End+=' + pos*delay)
.to(el, {
duration: 0.5,
x: rowsPositions.top.x - topTitlePosition.x,
onComplete: () => {
gsap.set(el, {opacity: 0});
gsap.set(rowsTitles[['top','center','bottom'][pos]][0], {opacity: 1});
}
}, 'step3')
.to(rowsTitles[['top','center','bottom'][pos]].slice(1), {
ease: 'expo',
startAt: {scale:0.7},
opacity: 1,
scale: 1,
stagger: 0.09
}, 'step3+=0.3');
// for both the center and bottom rows:
// - hide it's titles
// - position the midTop/midBottom titles on top of the center/bottom titles and animate them to their original position
// - slide in the center/bottom titles again
if ( pos ) {
introTimeline
.set(pos === 1 ? rowsTitles.center : rowsTitles.bottom, {
ease: 'expo',
opacity: 0,
stagger: 0.09
}, 'step3+=1')
.to(pos === 1 ? rowsTitles.midTop : rowsTitles.midBottom, {
ease: 'expo',
startAt: {
y: rowsPositions.center.y - rowsPositions.midTop.y,
opacity: 1
},
y: 0,
stagger: 0.09
},'step3+=1')
.to(pos === 1 ? rowsTitles.center : rowsTitles.bottom, {
ease: 'expo',
startAt: {
y: '100%',
opacity: 1
},
y: 0,
stagger: 0.09
},'step3+=1.15');
}
});
// photos animation
introTimeline.to(photos, {
duration: 2,
ease: 'expo',
startAt: {
scale: 0.1,
opacity: 1
},
scale: 1,
stagger: 0.02
},'step3+=1.2');
// hovers
// show heading element (shows name and view all link)
// scale up images
// hide row
// set pointer-events to auto
let hoverInTimeline = [];
let hoverOutTimeline = [];
Object.keys(rows).forEach( (row, pos) => {
contentSections[pos].addEventListener('mouseenter', () => {
if ( introTimeline.progress() < 0.8 ) return;
if ( hoverOutTimeline[pos] ) {
hoverOutTimeline[pos].kill();
}
hoverInTimeline[pos] = gsap.timeline({
defaults: {duration: 0.9, ease: 'expo'}
})
.addLabel('start', 0)
.set(rows[row], {
opacity: 0
}, 'start')
.set(contentSectionsHeadings[row], {
pointerEvents: 'auto'
}, 'start')
.to(contentSectionsHeadings[row], {
opacity: 1
}, 'start')
.to(contentSectionsHeadings[row].children, {
startAt: {
opacity: 0,
y: '-100%'
},
y: '0%',
opacity: 1,
stagger: -0.06
}, 'start')
.to(contentSectionsPhotos[row], {
scale: 1.15,
//stagger: 0.025
}, 'start');
});
contentSections[pos].addEventListener('mouseleave', () => {
if ( introTimeline.progress() < 0.8 ) return;
if ( hoverInTimeline[pos] ) {
hoverInTimeline[pos].kill();
}
hoverOutTimeline[pos] = gsap.timeline({
defaults: {duration: 0.9, ease: 'expo'}
})
.addLabel('start', 0)
.to(rows[row], {
opacity: 1
}, 'start')
.set(contentSectionsHeadings[row], {
pointerEvents: 'none'
}, 'start')
.set(contentSectionsHeadings[row].children, {
opacity: 0
}, 'start')
.to(contentSectionsPhotos[row], {
scale: 1
}, 'start');
});
});
// scale up image on hover
/*
document.querySelectorAll('.strip__img').forEach(photo => {
photo.addEventListener('mouseenter', () => {
if ( introTimeline.progress() < 0.6 ) return;
gsap.killTweensOf(photo);
gsap.set(photo, {zIndex: 9999})
gsap.to(photo, {
duration: 0.8,
ease: 'expo',
scale: 1.15
});
});
photo.addEventListener('mouseleave', () => {
if ( introTimeline.progress() < 0.6 ) return;
gsap.killTweensOf(photo);
gsap.set(photo, {zIndex: 1})
gsap.to(photo, {
duration: 1.5,
ease: 'expo',
scale: 1
});
});
});
*/
// preload images then remove loader (loading class)
preloadImages('.strip__img').then(() => {
document.body.classList.remove('loading');
introTimeline.play();
});
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
splitting@1.1.0 — LICENSE.md
MIT License
Copyright (c) 2018 Stephen Shaw
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.
BEHIND THE EXAMPLE
이 장면을 만드는 원리
짝수·홀수 글자를 다른 행으로 옮기기
시각적인 글자 분할과 사용자에게 한 글자로 보이는 단위를 구분합니다.
- 이 예제에서는
- introTimeline은 중앙 제목의 짝수·홀수 글자를 위·아래 행의 측정된 y 차이만큼 나눠 옮긴 뒤 각 행 복제본의 opacity로 소유권을 바꿉니다.
