Codrops 원본
Lines to Content Layout Animation
섹션 · MIT
갤러리 안에서는 화면을 벗어나거나 움직임을 멈추면 예제도 닫힙니다. 다시 재생할 때는 처음부터 시작해요.
SOURCE FILES
원본 코드 읽기
수집한 원본 소스와 실행 안내를 함께 제공합니다.
src/css/base.css
*,
*::after,
*::before {
box-sizing: border-box;
}
:root {
font-size: 12px;
}
body #cdawrap {
margin-left: auto;
}
body {
margin: 0;
--color-text: #111;
--color-bg: #e5e5e5;
--color-link: #000;
--color-link-hover: #111;
--padding-ver: 5vw;
--padding-hor: 1rem;
color: var(--color-text);
background-color: var(--color-bg);
font-family: acumin-pro, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
--cursor-stroke: #cc1111;
}
/* 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: 100px;
height: 100px;
margin: -50px 0 0 -50px;
border-radius: 50%;
border: 2px solid var(--cursor-stroke);
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;
}
.hover-line,
a.cda-sponsor-link {
white-space: nowrap;
overflow: hidden;
position: relative;
}
.hover-line::before,
.cda-sponsor-link::before {
content: '';
height: 1px;
width: 100%;
background: currentColor;
position: absolute;
top: 92%;
transition: transform 0.3s;
transform-origin: 0% 50%;
}
.hover-line:hover::before,
.cda-sponsor-link:hover::before {
transform: scaleX(0);
transform-origin: 100% 50%;
}
.unbutton {
background: none;
border: 0;
padding: 0;
margin: 0;
font: inherit;
cursor: pointer;
}
.unbutton:focus {
outline: none;
}
main {
display: grid;
height: 100vh;
padding: 0;
position: relative;
}
.frame {
grid-area: 1 / 1 / 2 / 2;
text-align: center;
text-transform: uppercase;
display: flex;
padding: var(--padding-hor) calc(var(--padding-ver) + 0.6vw);
flex-direction: column;
align-self: start;
position: relative;
z-index: 100;
}
.frame__title {
font-size: 1rem;
margin: 1rem 0;
font-weight: normal;
}
.frame__links {
display: inline-block;
}
.frame__links a {
margin: 0 0.5rem;
}
.intro,
.content-wrap {
grid-area: 1 / 1 / 2 / 2;
}
.intro {
flex: 1;
display: grid;
max-height: 40vmax;
margin: auto 0;
padding: 0 var(--padding-ver);
grid-template-columns: 28% 1fr 22%;
grid-template-rows: repeat(4,1fr);
align-items: center;
grid-column-gap: 3%;
grid-row-gap: 2.5vmax;
font-size: 8.625vw;
line-height: 0.7;
letter-spacing: -0.075vw;
font-family: kudryashev-d-excontrast-sans, sans-serif;
font-weight: 300;
text-transform: uppercase;
white-space: nowrap;
}
.intro--close {
pointer-events: none;
}
.image {
overflow: hidden;
width: 100%;
height: 100%;
position: relative;
display: grid;
place-items: center;
cursor: pointer;
will-change: transform;
}
.image--up {
grid-area: 2 / 3;
}
.image--down {
grid-area: 3;
}
.image__inner {
width: 100%;
height: 100%;
background-size: cover;
background-position: 50% 50%;
}
.row--1 {
grid-area: 1 / 1 / 2 / 4;
}
.row--2 {
grid-area: 2 / 1 / 3 / 4;
}
.row--3 {
grid-area: 3 / 2 / 4 / 4;
}
.row--4 {
grid-area: 4 / 1 / 5 / 4;
}
.oh {
position: relative;
display: inline-block;
overflow: hidden;
}
.oh > span {
display: inline-block;
will-change: transform;
}
.row__text span {
padding-top: 1.5vw;
}
.content-wrap {
align-self: stretch;
display: grid;
}
.content {
opacity: 0;
pointer-events: none;
grid-area: 1 / 1 / 2 / 2;
display: grid;
grid-template-columns: 100%;
height: 100%;
grid-template-rows: 1fr 50%;
padding: 0 var(--padding-ver);
}
.content--open {
opacity: 1;
pointer-events: auto;
}
.content--open .content__row--image {
pointer-events: none;
}
.content__row--text {
padding: calc(var(--padding-hor) + 9rem) 0 2.5rem;
display: grid;
grid-template-areas: 'title number' 'back back' 'meta meta';
grid-template-columns: 1fr auto;
grid-template-rows: auto 1fr auto;
}
.content__row--image + .content__row--text {
padding-bottom: 1.5rem;
}
.content__title {
grid-area: title;
font-family: kudryashev-d-excontrast-sans, sans-serif;
font-weight: 300;
text-transform: uppercase;
font-size: clamp(2rem,4vw,4rem);
line-height: 1;
margin: 0;
}
.content__number {
grid-area: number;
place-self: start end;
font-size: clamp(3rem, 10vw, 10rem);
line-height: 0.55;
position: relative;
display: flex;
align-items: start;
justify-content: start;
align-content: start;
}
.content__number .oh > span {
padding-bottom: 1.75vw;
padding-left: 6vw;
position: relative;
display: block;
}
.content__number .oh > span::before {
content: "";
width: 1px;
height: 111%;
background: currentColor;
position: absolute;
bottom: 0;
left: 0;
transform: rotate(25deg);
transform-origin: 100% 100%;
}
.content__back {
grid-area: back;
justify-self: start;
align-self: center;
overflow: hidden;
}
.content__back svg {
width: 100px;
stroke: #000;
stroke-width: 0.3px;
transition: transform 0.2s;
transform-origin: 0% 50%;
transform: scaleX(0.8);
}
.content__back:hover svg {
transform: scaleX(1);
}
.content__meta {
grid-area: meta;
text-transform: uppercase;
display: flex;
justify-content: space-between;
font-size: clamp(0.75rem, 3vw, 1.5rem);
line-height: 1;
}
.content__meta-text--center {
text-align: center;
}
.cursor {
display: none;
}
@media screen and (min-width: 53em) {
.frame {
flex-direction: row;
}
.frame__title {
margin-top: 0;
}
.frame__links {
margin-left: 8vw;
}
.content__row--text {
padding: calc(var(--padding-hor) + 4rem) 0 2.5rem;
}
}
@media (any-pointer:fine) {
.cursor {
position: fixed;
top: 0;
left: 0;
display: block;
pointer-events: none;
z-index: 10000;
}
.cursor__inner {
fill: none;
stroke: var(--cursor-stroke);
stroke-width: 1.3px;
}
.no-js .cursor {
display: none;
}
}
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>Lines to Content Layout Animation | Codrops</title>
<!-- Generate Meta Tags via https://www.opengraph.xyz -->
<meta name="description" content="A simple layout switch example where we go from a typography row view with inline images to a large image preview with more content." />
<meta name="keywords" content="gsap, layout, flip plugin, animation, web design" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="https://use.typekit.net/jdl7wqk.css">
<link rel="stylesheet" type="text/css" href="css/base.css" />
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
<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>
<script src="//tympanus.net/codrops/adpacks/analytics.js"></script>
</head>
<body class="loading">
<main>
<div class="frame">
<h1 class="frame__title">Lines to Content Layout Animation</h1>
<nav class="frame__links">
<a class="hover-line" href="http://tympanus.net/Development/LetterShuffleMenu/">Previous demo</a>
<a class="hover-line" href="https://tympanus.net/codrops/?p=60052">Article</a>
<a class="hover-line" href="https://github.com/codrops/LinesToLayout">GitHub</a>
</nav>
</div>
<div class="intro">
<div class="row row--1"><span class="row__text oh"><span data-direction="top">Facts do</span></span> <span class="row__text oh"><span data-direction="right">not</span></span></div>
<div class="row row--2"><span class="row__text oh"><span data-direction="left">cease</span></span> <span class="row__text oh"><span data-direction="bottom">to exist</span></span></div>
<div class="row row--3"><span class="row__text oh"><span data-direction="right">because</span></span> <span data-direction="right" class="row__text oh"><span data-direction="right">they</span></span></div>
<div class="row row--4"><span class="row__text oh"><span data-direction="bottom">are ignored</span></span></div>
<div class="image image--up">
<div class="image__inner" style="background-image:url(img/1.jpg)" data-direction="right"></div>
</div>
<div class="image image--down">
<div class="image__inner" style="background-image:url(img/2.jpg)" data-direction="left"></div>
</div>
</div>
<section class="content-wrap">
<div class="content">
<div class="content__row content__row--image"></div>
<div class="content__row content__row--text">
<h2 class="content__title">
<span class="oh"><span>The progressive power</span></span><br/>
<span class="oh"><span>of frequencies</span></span>
</h2>
<span class="content__number"><span class="oh"><span>1</span></span></span>
<button class="content__back unbutton">
<svg viewBox="0 0 50 9"><path d="m0 4.5 5-3m-5 3 5 3m45-3h-77"></path></svg>
</button>
<div class="content__meta">
<span class="content__meta-text"><span class="oh"><span>Mind Depth</span></span></span>
<span class="content__meta-text content__meta-text--center"><span class="oh"><span>Souls</span></span> <br/><span class="oh"><span>for freedom</span></span></span>
<span class="content__meta-text"><span class="oh"><span>Made by Humans</span></span> <br/><span class="oh"><span>in 2022</span></span></span>
</div>
</div>
</div>
<div class="content">
<div class="content__row content__row--text">
<h2 class="content__title">
<span class="oh"><span>Quantum enhancement</span></span><br/>
<span class="oh"><span>for the world</span></span>
</h2>
<span class="content__number"><span class="oh"><span>2</span></span></span>
<button class="content__back unbutton">
<svg viewBox="0 0 50 9"><path d="m0 4.5 5-3m-5 3 5 3m45-3h-77"></path></svg>
</button>
<div class="content__meta">
<span class="content__meta-text"><span class="oh"><span>Novel World</span></span></span>
<span class="content__meta-text content__meta-text--center"><span class="oh"><span>Souls</span></span> <br/><span class="oh"><span>for love</span></span></span>
<span class="content__meta-text"><span class="oh"><span>Made by Humans</span></span> <br/><span class="oh"><span>in 2022</span></span></span>
</div>
</div>
<div class="content__row content__row--image"></div>
</div>
</section>
</main>
<svg class="cursor" width="100" height="100" viewBox="0 0 100 100">
<defs>
<filter id="cursor-filter" x="-50%" y="-50%" width="200%" height="200%"
filterUnits="objectBoundingBox">
<feTurbulence type="fractalNoise" baseFrequency="0" numOctaves="1" result="warp" />
<feOffset dx="0" result="warpOffset" />
<feDisplacementMap xChannelSelector="R" yChannelSelector="G" scale="40" in="SourceGraphic" in2="warpOffset" />
</filter>
</defs>
<circle class="cursor__inner" cx="50" cy="50" r="10"/>
</svg>
<svg class="cursor" width="100" height="100" viewBox="0 0 100 100" data-amt="0.15" data-radius-enter="40">
<circle class="cursor__inner" cx="50" cy="50" r="10"/>
</svg>
<script src="https://tympanus.net/codrops/adpacks/cda_sponsor.js"></script>
<script type="module" src="js/index.js"></script>
</body>
</html>
함께 쓰는 파일 6개 보기
src/js/cursor.js
import { gsap } from 'gsap';
/**
* Linear interpolation
* @param {Number} a - first value to interpolate
* @param {Number} b - second value to interpolate
* @param {Number} n - amount to interpolate
*/
const lerp = (a, b, n) => (1 - n) * a + n * b;
/**
* Gets the cursor position
* @param {Event} ev - mousemove event
*/
const getCursorPos = ev => {
return {
x : ev.clientX,
y : ev.clientY
};
};
// Track the cursor position
let cursor = {x: 0, y: 0};
window.addEventListener('mousemove', ev => cursor = getCursorPos(ev));
/**
* Class representing a custom cursor.
* A Cursor can have multiple elements/svgs
*/
export class Cursor {
// DOM elements
DOM = {
// cursor elements (SVGs .cursor)
elements: null,
}
// All CursorElement instances
cursorElements = [];
/**
* Constructor.
* @param {NodeList} Dom_elems - all .cursor elements
* @param {String} triggerSelector - Trigger the cursor enter/leave method on the this selector returned elements. Default is all <a>.
*/
constructor(Dom_elems, triggerSelector = 'a') {
this.DOM.elements = Dom_elems;
[...this.DOM.elements].forEach(el => this.cursorElements.push(new CursorElement(el)));
[...document.querySelectorAll(triggerSelector)].forEach(link => {
link.addEventListener('mouseenter', () => this.enter());
link.addEventListener('mouseleave', () => this.leave());
});
}
/**
* Mouseenter event
*/
enter() {
for (const el of this.cursorElements) {
el.enter();
}
}
/**
* Mouseleave event
*/
leave() {
for (const el of this.cursorElements) {
el.leave();
}
}
}
/**
* Class representing a .cursor element
*/
class CursorElement {
// DOM elements
DOM = {
// Main element (.cursor)
el: null,
// Inner element (.cursor__inner)
inner: null,
// feTurbulence element
feTurbulence: null
}
// Scales value when entering an <a> element
radiusOnEnter = 30;
// Opacity value when entering an <a> element
opacityOnEnter = 1;
// radius
radius;
// Element style properties
renderedStyles = {
// With interpolation, we can achieve a smooth animation effect when moving the cursor.
// The "previous" and "current" values are the values that will interpolate.
// The returned value will be one between these two (previous and current) at a specific increment.
// The "amt" is the amount to interpolate.
// As an example, the following formula calculates the x-axis translation value to apply to the cursor element:
// this.renderedStyles.tx.previous = lerp(this.renderedStyles.tx.previous, this.renderedStyles.tx.current, this.renderedStyles.tx.amt);
// translation, scale and opacity values
// The lower the amt, the slower the cursor "follows" the user gesture
tx: {previous: 0, current: 0, amt: 0.2},
ty: {previous: 0, current: 0, amt: 0.2},
// The scale and opacity will change when hovering over any element specified in [triggerSelector]
// Defaults are 1 for both properties
//scale: {previous: 1, current: 1, amt: 0.2},
radius: {previous: 20, current: 20, amt: 0.2},
opacity: {previous: 1, current: 1, amt: 0.2}
};
// Element size and position
bounds;
// SVG filter id
filterId = '#cursor-filter';
// for the filter animation
primitiveValues = {turbulence: 0};
/**
* Constructor.
*/
constructor(DOM_el) {
this.DOM.el = DOM_el;
this.DOM.inner = this.DOM.el.querySelector('.cursor__inner');
this.DOM.feTurbulence = document.querySelector(`${this.filterId} > feTurbulence`);
this.createFilterTimeline();
// Hide it initially
this.DOM.el.style.opacity = 0;
// Calculate size and position
this.bounds = this.DOM.el.getBoundingClientRect();
// Check if any options passed in data attributes
this.radiusOnEnter = this.DOM.el.dataset.radiusEnter || this.radiusOnEnter;
this.opacityOnEnter = this.DOM.el.dataset.opacityEnter || this.opacityOnEnter;
for (const key in this.renderedStyles) {
this.renderedStyles[key].amt = this.DOM.el.dataset.amt || this.renderedStyles[key].amt;
}
this.radius = this.DOM.inner.getAttribute('r');
this.renderedStyles['radius'].previous = this.renderedStyles['radius'].current = this.radius;
// Show the element and start tracking its position as soon as the user moves the cursor.
const onMouseMoveEv = () => {
// Set up the initial values to be the same
this.renderedStyles.tx.previous = this.renderedStyles.tx.current = cursor.x - this.bounds.width/2;
this.renderedStyles.ty.previous = this.renderedStyles.ty.previous = cursor.y - this.bounds.height/2;
// Show it
this.DOM.el.style.opacity = 1;
// Start rAF loop
requestAnimationFrame(() => this.render());
// Remove the initial mousemove event
window.removeEventListener('mousemove', onMouseMoveEv);
};
window.addEventListener('mousemove', onMouseMoveEv);
}
/**
* Mouseenter event
* Scale up and fade out.
*/
enter() {
this.renderedStyles['radius'].current = this.radiusOnEnter;
this.renderedStyles['opacity'].current = this.opacityOnEnter;
this.filterTimeline.restart();
}
/**
* Mouseleave event
* Reset scale and opacity.
*/
leave() {
this.renderedStyles['radius'].current = this.radius;
this.renderedStyles['opacity'].current = 1;
this.filterTimeline.progress(1).kill();
}
createFilterTimeline() {
this.filterTimeline = gsap.timeline({
paused: true,
onStart: () => {
this.DOM.inner.style.filter = `url(${this.filterId}`;
},
onUpdate: () => {
this.DOM.feTurbulence.setAttribute('baseFrequency', this.primitiveValues.turbulence);
},
onComplete: () => {
this.DOM.inner.style.filter = 'none';
}
})
.to(this.primitiveValues, {
duration: 3,
ease: 'none',
repeat: -1,
yoyo: true,
startAt: {turbulence: 0.15},
turbulence: 0.13
});
}
/**
* Loop / Interpolation
*/
render() {
// New cursor positions
this.renderedStyles['tx'].current = cursor.x - this.bounds.width/2;
this.renderedStyles['ty'].current = cursor.y - this.bounds.height/2;
// Interpolation
for (const key in this.renderedStyles ) {
this.renderedStyles[key].previous = lerp(this.renderedStyles[key].previous, this.renderedStyles[key].current, this.renderedStyles[key].amt);
}
// Apply interpolated values (smooth effect)
this.DOM.el.style.transform = `translateX(${(this.renderedStyles['tx'].previous)}px) translateY(${this.renderedStyles['ty'].previous}px)`;
this.DOM.inner.setAttribute('r', this.renderedStyles['radius'].previous);
this.DOM.el.style.opacity = this.renderedStyles['opacity'].previous;
// loop...
requestAnimationFrame(() => this.render());
}
}src/js/index.js
import { Cursor } from './cursor';
import { preloadImages, preloadFonts } from './utils';
import { gsap } from 'gsap';
import { Flip } from 'gsap/Flip';
gsap.registerPlugin(Flip);
// intro section
const intro = document.querySelector('.intro');
// an array with the intro text spans that we want to animate (data-direction will define the animation direction)
const introTexts = [...intro.querySelectorAll('.row__text.oh > span')];
// an array with the intro images that will trigger the effect when clicked
const images = [...intro.querySelectorAll('.image')];
// an array with the content sections. These will map with the images (one content element per image)
const contents = [...document.querySelectorAll('.content')];
// an array of arrays for the content text spans (one sub array per content).
let contentTexts = [];
contents.forEach(content => {
contentTexts.push([...content.querySelectorAll('.oh > span')]);
});
// these will be the area where the intro image will be animated/moved to
const contentRowImages = [...document.querySelectorAll('.content > .content__row--image')];
const contentBackCtrls = [...document.querySelectorAll('.content button.content__back')];
// Opens the content view when clicking on the intro images
const openContent = (image, position) => {
// Other intro images (we'll need to hide them)
const otherImages = images.filter(el => el != image).map(el => el.querySelector('.image__inner'));
gsap.timeline({
defaults: {
duration: 1.1,
ease: 'power4.inOut',
}
})
.addLabel('start', 0)
.add(() => {
// Get state
const state = Flip.getState(image);
// Change place
contentRowImages[position].appendChild(image);
// Flip
Flip.from(state, {
duration: 1.2,
ease: 'power4.inOut',
absolute: true
});
intro.classList.add('intro--close');
contents[position].classList.add('content--open');
// hide back arrow ctrl
gsap.set(contentBackCtrls[position], {
xPercent: 20,
opacity: 0
});
// hide text spans
gsap.set(contentTexts[position], {
yPercent: 101
});
}, 'start')
.to([introTexts, otherImages], {
xPercent: (_,target) => {
switch (target.dataset.direction) {
case 'right': return 101;
case 'left': return -101;
default: return 0;
}
},
yPercent: (_,target) => {
switch (target.dataset.direction) {
case 'top': return -101;
case 'bottom': return 101;
default: return 0;
}
}
}, 'start')
.addLabel('content', 'start+=0.7')
.to(contentTexts[position], {
ease: 'expo',
yPercent: 0
}, 'content')
.to(contentBackCtrls[position], {
ease: 'expo',
xPercent: 0,
opacity: 1
}, 'content');
};
const closeContent = (image, position) => {
// Other intro images (we'll need to hide them)
const otherImages = images.filter(el => el != image).map(el => el.querySelector('.image__inner'));
gsap.timeline({
defaults: {
duration: 1.1,
ease: 'power4.inOut',
},
onComplete: () => {
intro.classList.remove('intro--close');
contents[position].classList.remove('content--open');
}
})
.addLabel('start', 0)
.to(contentTexts[position], {
duration: 0.8,
yPercent: 101
}, 'start')
.to(contentBackCtrls[position], {
duration: 0.8,
xPercent: 20,
opacity: 0
}, 'start')
.add(() => {
// Get state
const state = Flip.getState(image);
// Change place
intro.appendChild(image);
// Flip
Flip.from(state, {
duration: 1.2,
ease: 'power4.inOut',
absolute: true
});
}, 'start')
.addLabel('intro', 'start+=0.6')
.to([introTexts, otherImages], {
ease: 'expo',
xPercent: 0,
yPercent: 0,
/*stagger: {
each: 0.08,
grid: 'auto',
from: 'random'
}*/
}, 'intro');
};
// Images click event
images.forEach((image, position) => {
image.addEventListener('click', () => {
openContent(image, position);
});
});
contentBackCtrls.forEach((ctrl, position) => {
ctrl.addEventListener('click', () => {
closeContent(images[position], position);
});
});
// Initialize custom cursor
new Cursor(document.querySelectorAll('.cursor'), 'a, .intro > .image, .content__back');
// Preload images and fonts and remove loader
Promise.all([
preloadImages('.image__inner'),
preloadFonts('jdl7wqk')
]).then(() => document.body.classList.remove('loading'));src/js/utils.js
const imagesLoaded = require('imagesloaded');
/**
* Preload fonts
* @param {String} id
*/
const preloadFonts = id => {
return new Promise((resolve) => {
WebFont.load({
typekit: {
id: id
},
active: resolve
});
});
};
/**
* Preload images
* @param {String} selector - Selector/scope from where images need to be preloaded. Default is 'img'
*/
const preloadImages = (selector = 'img') => {
return new Promise((resolve) => {
imagesLoaded(document.querySelectorAll(selector), {background: true}, resolve);
});
};
export {
preloadFonts,
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
ev-emitter@2.1.2 — LICENSE.md
Copyright (c) 2016-2021 [David DeSandro](https://desandro.com)
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.
imagesloaded@5.0.0 — LICENSE.md
Copyright (c) 2011-2022 [David DeSandro](https://desandro.com) and [contributors](https://github.com/desandro/imagesloaded/graphs/contributors)
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
이 장면을 만드는 원리
이미지 재배치와 반복 열기 요청
반복 입력에서 현재 의도와 전환의 종료·취소 책임을 명시합니다.
- 이 예제에서는
- openContent는 선택 이미지를 Flip으로 옮기고 나머지 이미지·텍스트를 data-direction별로 내보냅니다. 등록된 클릭은 매번 openContent를 호출합니다.
