Overview
The animation system uses GSAP (GreenSock Animation Platform) with the ScrollTrigger plugin to create smooth, performant entrance and scroll-based animations throughout the site.Implementation
All animations are defined insrc/scripts/animations.js and respect user preferences for reduced motion.
Setup
GSAP Registration
src/scripts/animations.js:1-4
Motion Preference Check
src/scripts/animations.js:320-323
Hero Section Animations
Complex staggered entrance animation for the hero section.Badge Animation
src/scripts/animations.js:25-34
Word-by-Word Text Animation
src/scripts/animations.js:37-47
Name Letter Animation
Individual letters drop with bounce effect:src/scripts/animations.js:50-66
Key Features:
- Random rotation for each letter
- Bounce easing for playful effect
- Staggered timing (0.04s between letters)
Wave Emoji Animation
src/scripts/animations.js:69-85
Animation Sequence:
- Pop in with back ease
- Wave back and forth 5 times
Photo Slider Animation
src/scripts/animations.js:99-109
Scroll-Based Animations
Generic Section Reveal
src/scripts/animations.js:134-152
Usage:
ScrollTrigger Configuration
Works Section Animation
src/scripts/animations.js:157-193
Skills Section Animation
Animates skill tags with stagger and scale:src/scripts/animations.js:198-233
Contact Section Animation
src/scripts/animations.js:238-261
Chatbot Section Animation
src/scripts/animations.js:266-318
Initialization
src/scripts/animations.js:320-338
GSAP Easing Reference
Commonly used easing functions:power3.out: Smooth decelerationback.out(2): Overshoot and settle backbounce.out: Bouncing effectpower1.inOut: Symmetrical ease in/out
Animation Timing Guide
| Element | Delay | Duration | Stagger |
|---|---|---|---|
| Badge | 0s | 0.4s | - |
| Words | 0.2s | 0.5s | 0.1s |
| Name letters | 0.5s | 0.6s | 0.04s |
| Wave | 0.9s | 0.4s | - |
| Description | 1.3s | 0.5s | - |
| Photo | 1.0s | 0.7s | - |
| CTAs | 1.5s | 0.5s | - |
Best Practices
- Performance: Use
will-changeCSS for animated elements - Accessibility: Always check and respect
prefers-reduced-motion - Timing: Keep entrance animations under 2 seconds total
- Stagger: Use 0.04-0.15s for natural feel
- Easing: Match easing to element personality (playful vs. professional)