About This Project

A curated gallery of 22 web animation demos covering scroll choreography, 3D/WebGL scenes, View Transitions, and CSS/Canvas effects.

Built entirely by Claude Opus 4.6

Tech Stack

TechnologyVersionRole
Vite6.1Dev server + bundler for complex demos
GSAP3.12Scroll-driven animations, timelines, SplitText
Lenis1.1Smooth scrolling, integrated with GSAP ticker
Three.js0.1713D scenes, shaders, post-processing (bloom)
View Transitions APINativePage transitions, shared-element morphs
Canvas 2DNativeParticle systems, grain, bokeh effects

📁 Architecture

This project uses a hybrid Vite/static approach:

  • Vite-bundled demos (12) — Have a .vite-demo marker file. Use import for npm packages. Auto-discovered by vite.config.js.
  • Static demos (10) — Pure HTML/CSS/JS with no build step. Served as-is by Vite's dev server.
libs-genclaude/ ├── index.html # Gallery hub ├── package.json # Vite + gsap + lenis + three ├── vite.config.js # Multi-page auto-discovery ├── shared/ │   ├── a11y.js # Reduced-motion detection + toggle │   ├── colors.js # Dark palette tokens │   ├── motion-tokens.js # GSAP presets │   ├── demo-shell.js # Back-link, toggle, info bar │   └── demo-shell.css ├── demos/ │   ├── registry.json # Metadata for 22 demos │   ├── 01-scroll-story/ # Each: index.html + main.js + styles.css │   ├── ... │   └── 22-product-spotlight/ └── about/ # This page

🎬 All 22 Demos

Scroll Scroll Animations (6)

#DemoTechBundler
01Smooth Scroll StoryGSAP, Lenis, ScrollTriggerVite
02Horizontal Scroll GalleryGSAP, Lenis, ScrollTriggerVite
03Text Reveal on ScrollGSAP, SplitText, ScrollTriggerVite
04Pinned Scroll SectionsGSAP, ScrollTrigger, PinVite
05Card Stack CascadeGSAP, ScrollTrigger, PerspectiveVite
06Scroll Progress IndicatorsGSAP, Lenis, SVGVite

3D 3D / WebGL (6)

#DemoTechBundler
07Particle TunnelThree.js, Custom Shaders, BloomVite
083D Product ShowcaseThree.js, PBR Material, OrbitVite
09Shader BackgroundThree.js, GLSL, Simplex NoiseVite
10Interactive 3D Mouse SceneThree.js, InstancedMesh, RaycasterVite
21Scroll Camera NarrativeThree.js, GSAP, Lenis, ScrollTriggerVite
223D Product SpotlightThree.js, GSAP, Lenis, ScrollTriggerVite

Transitions View Transitions (4)

#DemoTechBundler
11Card Grid TransitionView Transitions API, CSSStatic
12Page Routing TransitionsView Transitions API, SPA RoutingStatic
13Theme TransitionView Transitions API, Clip-PathStatic
14Image Gallery TransitionsView Transitions API, CrossfadeStatic

CSS/Canvas CSS / Canvas (6)

#DemoTechBundler
15Bokeh Particle HeroCanvas 2D, Mouse ParallaxStatic
16Magnetic CursorSpring Physics, Mouse TrackingStatic
17Spotlight RevealCSS Mask, Mouse TrackingStatic
18Noise & Grain OverlaySVG Filter, Canvas, CSSStatic
19Staggered Grid EntranceIntersectionObserver, CSS KeyframesStatic
20Morphing BlobsCSS Border-Radius, SVG Path, Canvas BezierStatic

Getting Started

# Install dependencies (uses bun) bun install # Start dev server bun run dev # Build for production bun run build

The gallery opens at http://localhost:5173. Click any demo card to view it.


Accessibility

  • prefers-reduced-motion — Detected on load via shared/a11y.js. All animations disable when the OS preference is set.
  • Motion Toggle — Each demo has a "Disable/Enable Motion" button that dispatches a motion-preference CustomEvent.
  • Decorative elements — All canvases and SVGs use aria-hidden="true".
  • High contrast — Text uses #f0f4fb on #070a12 (17.4:1 ratio).
  • Keyboard — ESC returns to gallery from any demo.

🤖 About the Model

Claude Opus 4.6

This entire project was generated by Claude Opus 4.6, Anthropic's most capable AI model. Every HTML file, every JavaScript module, every CSS animation, every GLSL shader.

  • Code generation — Production-quality code across multiple languages and frameworks
  • Architecture design — Project structures, patterns, and complex codebase organization
  • Creative implementation — Design descriptions translated into working animations, shaders, and interactions
  • Multi-file coordination — Consistency across 60+ interconnected files with shared utilities

Built through iterative conversation: the user described the desired showcase, and Claude designed the architecture, selected libraries, wrote all code, and verified each demo.

📚 What This Project Is

libs-genclaude is a curated gallery of 22 web animation demos. Each demo is a self-contained example of a specific animation technique, designed to serve as both a visual showcase and a code reference.


🛠 Technologies & Their Roles

TechnologyWhat It Does Here
GSAPPowers all scroll-driven animations. ScrollTrigger pins sections and scrubs timelines. SplitText breaks text into animatable units.
LenisSmooth momentum-based scrolling. Integrated with GSAP's ticker for frame-perfect sync.
Three.jsAll 3D/WebGL demos. Particle systems, shader materials, PBR rendering, InstancedMesh, post-processing, camera rails.
View Transitions APINative browser API for DOM state transitions. Page routing, card morphs, theme switching, gallery crossfades.
Canvas 2DBokeh particles, grain overlays, bezier blob animation.
CSSKeyframe animations, border-radius morphing, mask-image spotlight, scanline overlays.
ViteDev server with HMR. Multi-page build auto-discovers bundled demos via .vite-demo marker.

📦 Two Types of Demos

Vite-Bundled (12 demos)

  • Contain a .vite-demo marker file in their directory
  • Use ES module import for npm packages
  • Get Vite's HMR, tree-shaking, and module resolution
  • Examples: scroll demos (GSAP + Lenis), 3D demos (Three.js)

Static (10 demos)

  • No .vite-demo marker — plain HTML/CSS/JS
  • Served as-is by Vite's dev server (no bundling)
  • Use native browser APIs or inline implementations
  • Examples: View Transitions, Canvas 2D effects, CSS animations

🌐 How the Gallery Hub Works

index.html is a single-page app with:

  • Ambient canvas background — Floating radial gradient particles with screen blend mode
  • Registry loading — Fetches demos/registry.json at startup
  • Dynamic card rendering — Creates <a> cards for each "ready" demo
  • Category filtering — Buttons filter by scroll, 3d, transitions, css-canvas
  • Staggered entrance — Cards fade in with position-based delay
  • Claude badge — Floating bottom-right badge with cycling attribution phrases

🎛 Shared Utility Modules

shared/a11y.js

  • prefersReducedMotion() — Returns boolean, reactive to OS setting
  • setReducedMotion(bool) — Programmatic toggle, fires CustomEvent
  • createMotionToggle(container) — Renders toggle button widget

shared/demo-shell.js

  • initDemoShell({ title, category, tech }) — Injects back link, motion toggle, info bar

shared/colors.js

  • palette object — Canonical dark-theme color tokens

shared/motion-tokens.js

  • durations — 5 timing presets (fast → epic)
  • easings — 6 GSAP ease strings
  • stagger — 5 stagger config objects

💻 Key Code Patterns

GSAP + Lenis Smooth Scroll

import gsap from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; import Lenis from 'lenis'; gsap.registerPlugin(ScrollTrigger); const lenis = new Lenis({ lerp: 0.1, smoothWheel: true }); lenis.on('scroll', ScrollTrigger.update); gsap.ticker.add((time) => lenis.raf(time * 1000)); gsap.ticker.lagSmoothing(0);

Three.js Scene with Bloom

import * as THREE from 'three'; import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js'; import { RenderPass } from 'three/addons/postprocessing/RenderPass.js'; import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js'; const composer = new EffectComposer(renderer); composer.addPass(new RenderPass(scene, camera)); composer.addPass(new UnrealBloomPass(res, strength, radius, threshold));

View Transitions Fallback

const supportsVT = typeof document.startViewTransition === 'function'; if (supportsVT && !prefersReducedMotion()) { document.startViewTransition(() => updateDOM()); } else { updateDOM(); }

Demo Shell Initialization

import { initDemoShell } from '/shared/demo-shell.js'; import { prefersReducedMotion } from '/shared/a11y.js'; initDemoShell({ title: 'Demo Title', category: 'css-canvas', tech: ['tag1'] }); let reduced = prefersReducedMotion(); if (reduced) document.documentElement.classList.add('reduced-motion'); window.addEventListener('motion-preference', (e) => { reduced = e.detail.reduced; // Start or stop animations based on reduced state });