Skip to content

davillafer/airpods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirPods Pro — Scroll Animation

A buttery-smooth, scroll-driven animation that renders 65 sequential frames of AirPods Pro on an HTML canvas as you scroll, inspired by apple.com.

Astro GSAP Tailwind CSS Deploy

Demo

airpods-three.vercel.app

Tech Stack

Layer Technology
Framework Astro (SSG)
Animation GSAP + ScrollTrigger
Styling Tailwind CSS v4
Rendering HTML Canvas API
Hosting Vercel

How It Works

  1. 65 PNG frames are preloaded from Apple's CDN.
  2. GSAP ScrollTrigger maps scroll progress (0 - 100 %) to a frame index.
  3. On every scroll tick the matching frame is drawn to an HTML <canvas>, creating the illusion of a 3D product rotation synced to the user's scroll.

Getting Started

# Clone
git clone https://github.com/davillafer/airpods.git
cd airpods

# Install dependencies
pnpm install

# Start dev server (localhost:4321)
pnpm dev

# Production build
pnpm build

About

Scroll-driven AirPods Pro animation built with Astro, GSAP & Tailwind CSS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors