ZAKAI LAB
ANIMATION LIBRARY

IDEAS
DESIGN
TECHNOLOGY
PEOPLE

MOTION
FOR A
BRIGHTER WEB

01.005

Letter Cascade Reveal

AI flows. Ideas connect.
Scroll
GSAP
Backgrounds

M ← O ← T ← I ← O ← N

M → O → T → I → O → N

				
					SCRIPT 01, Cascade Forward
<script>
window.addEventListener('load', function () {

	/* ========================================
	   LIORA MOTION LIBRARY
	   01.005 - LETTER CASCADE REVEAL
	   VARIANT: FORWARD
	   ======================================== */

	if (
		typeof gsap === 'undefined' ||
		typeof ScrollTrigger === 'undefined'
	) {
		console.error(
			'01.005 Cascade Forward: GSAP or ScrollTrigger is missing.'
		);

		return;
	}


	gsap.registerPlugin(ScrollTrigger);


	const scenes =
		document.querySelectorAll(
			'.liora-letter-cascade.cascade-forward'
		);


	if (!scenes.length) return;


	function splitText(target) {

		const text =
			target.textContent.trim();

		const words =
			text.split(/\s+/);

		target.innerHTML = '';


		words.forEach(function (word, wordIndex) {

			const wordSpan =
				document.createElement('span');

			wordSpan.className =
				'liora-cascade-word';


			Array.from(word).forEach(function (char) {

				const charSpan =
					document.createElement('span');

				charSpan.className =
					'liora-cascade-char';

				charSpan.textContent =
					char;

				wordSpan.appendChild(
					charSpan
				);

			});


			target.appendChild(
				wordSpan
			);


			if (wordIndex < words.length - 1) {

				target.appendChild(
					document.createTextNode(' ')
				);

			}

		});

	}


	scenes.forEach(function (scene) {

		const target =
			scene.querySelector(
				'.liora-cascade-target'
			);


		if (!target) return;


		splitText(target);


		const chars =
			target.querySelectorAll(
				'.liora-cascade-char'
			);


		gsap.from(chars, {

			yPercent: 120,

			opacity: 0,

			filter: 'blur(10px)',

			rotationX: -25,

			duration: 1.15,

			stagger: 0.07,

			ease: 'power3.out',

			scrollTrigger: {

				trigger: scene,

				start: 'top 82%',

				once: true

			}

		});

	});

});
</script>
SCRIPT 02, Cascade Reverse
<script>
window.addEventListener('load', function () {

	/* ========================================
	   LIORA MOTION LIBRARY
	   01.005 - LETTER CASCADE REVEAL
	   VARIANT: REVERSE
	   ======================================== */

	if (
		typeof gsap === 'undefined' ||
		typeof ScrollTrigger === 'undefined'
	) {
		console.error(
			'01.005 Cascade Reverse: GSAP or ScrollTrigger is missing.'
		);

		return;
	}


	gsap.registerPlugin(ScrollTrigger);


	const scenes =
		document.querySelectorAll(
			'.liora-letter-cascade.cascade-reverse'
		);


	if (!scenes.length) return;


	function splitText(target) {

		const text =
			target.textContent.trim();

		const words =
			text.split(/\s+/);

		target.innerHTML = '';


		words.forEach(function (word, wordIndex) {

			const wordSpan =
				document.createElement('span');

			wordSpan.className =
				'liora-cascade-word';


			Array.from(word).forEach(function (char) {

				const charSpan =
					document.createElement('span');

				charSpan.className =
					'liora-cascade-char';

				charSpan.textContent =
					char;

				wordSpan.appendChild(
					charSpan
				);

			});


			target.appendChild(
				wordSpan
			);


			if (wordIndex < words.length - 1) {

				target.appendChild(
					document.createTextNode(' ')
				);

			}

		});

	}


	scenes.forEach(function (scene) {

		const target =
			scene.querySelector(
				'.liora-cascade-target'
			);


		if (!target) return;


		splitText(target);


		const chars =
			target.querySelectorAll(
				'.liora-cascade-char'
			);


		gsap.from(chars, {

			yPercent: 120,

			opacity: 0,

			filter: 'blur(10px)',

			rotationX: -25,

			duration: 1.15,


			stagger: {

				each: 0.07,

				from: 'end'

			},


			ease: 'power3.out',

			scrollTrigger: {

				trigger: scene,

				start: 'top 82%',

				once: true

			}

		});

	});

});
</script>
				
			
				
					/* ========================================
   LIORA MOTION LIBRARY
   01.005 - LETTER CASCADE REVEAL
   ======================================== */

.liora-letter-cascade {
	position: relative;
	overflow: hidden;
}


/* TARGET
======================================== */

.liora-letter-cascade .liora-cascade-target {
	position: relative;
}


/* EACH GENERATED LETTER
======================================== */

.liora-letter-cascade .liora-cascade-char {
	display: inline-block;

	will-change:
		transform,
		opacity,
		filter;

	transform-origin: center bottom;
}


/* KEEP WORDS TOGETHER
======================================== */

.liora-letter-cascade .liora-cascade-word {
	display: inline-block;
	white-space: nowrap;
}


/* ACCESSIBILITY
======================================== */

@media (prefers-reduced-motion: reduce) {

	.liora-letter-cascade .liora-cascade-char {
		transform: none !important;
		opacity: 1 !important;
		filter: none !important;
	}
}
				
			
				
					Cascade Forward
Container
class: liora-letter-cascade cascade-forward
│
└── Heading / Text
    class: liora-cascade-target
Cascade Reverse
Container
class: liora-letter-cascade cascade-reverse
│
└── Heading / Text
    class: liora-cascade-target
				
			

מה אפשר לשנות.. ואיך ⚙️

EXPLORE / LEARN / REUSE / CREATE

.Costomize to fit your vision

גובה הכניסה של האותיות

yPercent: 120

קובע מאיזה מרחק האותיות עולות.

עדין יותר:

yPercent: 60

דרמטי יותר:

yPercent: 180

מהירות כל אות
duration: 1.15

ערך נמוך יותר = תנועה מהירה יותר.
ערך גבוה יותר = תנועה איטית ורכה יותר.

המרווח בין האותיות באנימציה

Forward:

stagger: 0.07

Reverse:

each: 0.07

זה אחד הפרמטרים הכי שימושיים באפקט.

למפל מהיר וצפוף:

0.04

למפל מודגש ואיטי:

0.12

טשטוש
filter: 'blur(10px)'

5px יהיה עדין יותר.
15px יהיה מורגש יותר.

 

הטיית האות בתחילת האנימציה
rotationX: -25

0 מבטל את הסיבוב ומשאיר רק עלייה + blur.

-40 יוצר תחושת קיפול חזקה יותר.

מתי האנימציה מתחילה
start: 'top 82%'

קובע באיזו נקודה בכניסה למסך מתחיל ה־Cascade.

הפעלה פעם אחת

once: true

כרגע האנימציה מתרחשת פעם אחת בלבד.

זה מתאים מאוד לאפקט הזה, כי הוא Reveal ולא אנימציית scrub.

שינוי כיוון

Forward:

liora-letter-cascade cascade-forward

Reverse:

liora-letter-cascade cascade-reverse

ועל הטקסט בשני המקרים:

liora-cascade-target

הערה חשובה  🚩  

האנימציה מבוססת על GSAP + ScrollTrigger. יש לוודא ששתי הספריות נטענות באתר לפני קוד ה־JavaScript של האנימציה.

 

<script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/ScrollTrigger.min.js"></script>

מתלבט? בוא/י לדבר איתי בווטסאפ?