176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.
HTML ai-promptsanimationcss-animationsfrontendgithub-pagesjavascriptmicrointeractionsmotion-designno-dependenciesreferencescroll-animationui-animationweb-animationweb-developmentwebgl
feat: Holographic Card (06.25)
matin18c4c6ad0c23
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.ymlindex b8d170bd..d154d8bf 100644--- a/.github/ISSUE_TEMPLATE/config.yml+++ b/.github/ISSUE_TEMPLATE/config.yml@@ -2,4 +2,4 @@ blank_issues_enabled: truecontact_links:- name: Browse the live handbookurl: https://matinmonshizadeh.github.io/animation-handbook/- about: See all 158 techniques running before filing an issue.+ about: See all 159 techniques running before filing an issue.diff --git a/README.md b/README.mdindex 7cfae9a2..208f7fe0 100644--- a/README.md+++ b/README.md@@ -1,14 +1,14 @@<div align="center">-<a href="https://matinmonshizadeh.github.io/animation-handbook/"><img src="og-image.png" alt="Animation Handbook — 158 web animation techniques with live demos" width="820"></a>+<a href="https://matinmonshizadeh.github.io/animation-handbook/"><img src="og-image.png" alt="Animation Handbook — 159 web animation techniques with live demos" width="820"></a># Animation Handbook-**A visual reference of 158 web animation techniques — every entry is a live, dependency-free demo you can open in the browser and read how it works.**+**A visual reference of 159 web animation techniques — every entry is a live, dependency-free demo you can open in the browser and read how it works.**[**Open the live handbook →**](https://matinmonshizadeh.github.io/animation-handbook/)-[](https://matinmonshizadeh.github.io/animation-handbook/) [](https://github.com/matinmonshizadeh/animation-handbook/stargazers) [](LICENSE)   +[](https://matinmonshizadeh.github.io/animation-handbook/) [](https://github.com/matinmonshizadeh/animation-handbook/stargazers) [](LICENSE)   </div>@@ -39,12 +39,12 @@ Everything is plain HTML, CSS, and JavaScript: no build step, no frameworks, no| 03 | [Page Transitions](#03) | 16 | Full-page transitions between routes or views — crossfades, slides, portals, morphs, and the browser-native API. || 04 | [Micro-Interactions](#04) | 38 | Short, user-triggered animations — hover, click, focus, loading states, and UI feedback patterns. || 05 | [Text & Typography](#05) | 18 | Animations specifically for type — kinetic motion, character-level effects, gradient flows, and word transformations. |-| 06 | [3D & Advanced](#06) | 23 | WebGL, shaders, particles, 3D transforms, and the performance-sensitive effects that push the browser's limits. |+| 06 | [3D & Advanced](#06) | 24 | WebGL, shaders, particles, 3D transforms, and the performance-sensitive effects that push the browser's limits. || 07 | [Ambient & Background](#07) | 23 | Passive, looping effects that hold visual interest without demanding attention — gradients, particles, grain, and glows. |## Full catalog-All 158 techniques, each linked to its live demo.+All 159 techniques, each linked to its live demo.<a id="01"></a>@@ -215,7 +215,7 @@ All 158 techniques, each linked to its live demo.<a id="06"></a>-### 06 · 3D & Advanced · 23 techniques+### 06 · 3D & Advanced · 24 techniques<sub>WebGL, shaders, particles, 3D transforms, and the performance-sensitive effects that push the browser's limits.</sub>@@ -244,6 +244,7 @@ All 158 techniques, each linked to its live demo.- **[Flocking](animations/06-3d-advanced/flocking/)** — Birds swirl and turn together as one flock. Best for calm backgrounds.- **[ASCII / Halftone](animations/06-3d-advanced/ascii-halftone/)** — A moving picture is redrawn with letters or dots. Best for retro and tech looks.- **[2D Physics](animations/06-3d-advanced/physics-2d/)** — Balls drop where you click, bounce and pile up. Best for playful intros.+- **[Holographic Card](animations/06-3d-advanced/holographic-card/)** — A card tilts as you point, and its rainbow foil shimmers. Best for collectibles.</details>diff --git a/animations/06-3d-advanced/README.md b/animations/06-3d-advanced/README.mdindex 4874ecff..77b8a9a2 100644--- a/animations/06-3d-advanced/README.md+++ b/animations/06-3d-advanced/README.md@@ -29,6 +29,7 @@ WebGL, shaders, particles, 3D transforms, and the performance-sensitive effects| [Flocking](flocking/) | Birds swirl and turn together as one flock. Best for calm backgrounds. || [ASCII / Halftone](ascii-halftone/) | A moving picture is redrawn with letters or dots. Best for retro and tech looks. || [2D Physics](physics-2d/) | Balls drop where you click, bounce and pile up. Best for playful intros. |+| [Holographic Card](holographic-card/) | A card tilts as you point, and its rainbow foil shimmers. Best for collectibles. |## Key conceptsdiff --git a/animations/06-3d-advanced/holographic-card/README.md b/animations/06-3d-advanced/holographic-card/README.mdnew file mode 100644index 00000000..5f77462b--- /dev/null+++ b/animations/06-3d-advanced/holographic-card/README.md@@ -0,0 +1,92 @@+# Holographic Card++## What it is+A holographic card copies the rainbow foil of a rare trading card. As the card tilts toward the pointer, a sheet of rainbow colors slides across it and lights up the picture beneath, the way real foil catches the light, and a spot of glare follows the pointer. It is a stack of flat layers moved by the browser's own 3D transforms, with no image files and no 3D library.++## When to use it+- Trading card games and collectible pages, where the foil marks a rare card+- Membership, loyalty and gift cards that should feel premium+- Badges and rewards the visitor has earned, shown off in a profile+- Product launch, ticket or pass cards that invite a closer look++## How it works+The card is four layers stacked in one box, each clipped to the card's rounded corners: the picture, the foil, the glare and the text panels. The demo draws its picture as an inline SVG; on a real site it is an image.++```html+<div class="card">+ <div class="ly art">…the picture…</div>+ <div class="ly foil"><div class="sheen"></div></div>+ <div class="ly gl"><div class="spot"></div></div>+ <div class="ly txt">…the text panels…</div>+</div>+```++The foil is a sheet of rainbow streaks with clear gaps, twice the card's size so it has room to slide. `mix-blend-mode: color-dodge` makes it brighten whatever lies under each streak, so dark parts of the picture glint only a little and light parts flare into color, which is what makes it read as foil rather than a colored film. The glare is a white spot the size of the card. The text panels come last and are solid, so neither the foil nor the glare ever sits under the text and it keeps its contrast:++```css+.stage { perspective: 1000px; } /* depth for the tilt, on the parent */+.card { position: relative; aspect-ratio: 5 / 7; border-radius: 12px; will-change: transform; }+.ly { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }+.foil { mix-blend-mode: color-dodge; }+.sheen { position: absolute; inset: -50%; will-change: transform;+ background: repeating-linear-gradient(118deg, transparent 0%, #f0648c 3%, #f4c35e 6%, #71e2a2 9%,+ #5ac2f4 12%, #a888f6 15%, transparent 18%, transparent 21%); }+.spot { position: absolute; inset: 0; will-change: transform; opacity: 0;+ background: radial-gradient(circle closest-side, rgba(255,255,255,.85), rgba(255,255,255,.4) 22%,+ rgba(255,255,255,.1) 60%, transparent); }+.np, .ip { background: #110e27; } /* the solid text panels */+```++Each pointer move turns into three numbers: `x` and `y`, where the pointer is across the card from -0.5 to 0.5, and `h`, 1 while the pointer is on the card and 0 when it leaves. One function draws them, and it changes only transforms and opacities, so the browser moves layers it has already painted instead of painting anything again:++```js+// T: the lean at the card's edges in degrees (How far it tilts). G: the glare's strength (Glare).+// f0, f1: the foil's strength at rest and what lighting it adds.+card.style.transform = `rotateX(${-2 * T * y}deg) rotateY(${2 * T * x}deg) scale(${1 + 0.04 * h})`;+sheen.style.transform = `translate(${-40 * x}%, ${-40 * y}%)`; // the foil slides against the tilt+foil.style.opacity = f0 + f1 * h; // and brightens while the card is lit+spot.style.transform = `translate(${100 * x}%, ${100 * y}%)`; // the glare's middle sits under the pointer+spot.style.opacity = G * h;+```++The shown numbers glide toward the pointer's instead of jumping to them. Each frame closes 14% of the gap for every 60th of a second that passed, so the glide takes the same time on a 60, 120 or 30 Hz screen, and the loop stops once the numbers arrive:++```js+const k = 1 - Math.pow(1 - 0.14, dt / (1000 / 60)); // dt: the milliseconds since the last frame+sx += (ax - sx) * k; sy += (ay - sy) * k; sh += (ah - sh) * k;+```++The pointer is measured against the card's own place, its untransformed box, not the tilted outline the visitor sees, which moves under a resting pointer and would make the card twitch at its edges. The foil patterns are masks on the foil layer: the same sliding rainbow, seen only through scattered dots (six dot tilings of different sizes, so no grid shows) or through fine diagonal lines. The masks stay put while the sheet slides beneath them, so each dot or line flares as a streak passes under it:++```css+.card[data-foil=glitter] .foil { mask: radial-gradient(circle at 30% 40%, #000 0 1px, transparent 1.7px) 0 0 / 17px 23px,+ radial-gradient(circle at 75% 15%, #000 0 1px, transparent 1.7px) 0 0 / 23px 19px /* … */; }+.card[data-foil=lines] .foil { mask: repeating-linear-gradient(60deg, #000 0 1.4px, transparent 1.4px 4.2px); }+```++**Shows the layers** turns the card to one side, gives it `transform-style: preserve-3d` and brings each layer forward by its place in the stack, 30px apart: while a number `sp` glides from 0 to 1, the script writes `translateZ(${30 * i * sp}px)` on layer `i`. It writes those only while the layers move apart or together; a custom property on the card could carry `sp` instead, but the card gets a new style every frame and would pass it down to every layer each time. The foil is drawn with no blend mode there, so its sheet shows as it is. Each layer clips itself, which is why the card can hold them in 3D: `overflow: hidden` on the card itself would flatten them back into one plane.++**Show me** moves the same numbers along a figure of eight for 3.2 seconds (`x = 0.42 sin 2πe`, `y = 0.34 sin 4πe`, with `e` the eased progress), lit as it goes, and ends with the card flat. A press, key or wheel turn in the stage, or the visitor's own pointer moving over it, stops the run, and the card follows the visitor from where it was.++## Key parameters+| Parameter | Default | Effect |+|-----------|---------|--------|+| Foil pattern | Smooth | Smooth shows the rainbow as soft bands; Glitter lets it through scattered dots and Lines through fine diagonal lines, like the sparkle and etched foils of real cards |+| How far it tilts | Medium | How far the card leans at its edges: gentle is 6°, medium 12° and strong 20°; much more and the text on the card gets hard to read mid-tilt |+| Glare | Soft | The spot of light under the pointer: off, soft (a little over half strength) or bright |+| Shows the layers | off | Turns the card to one side and spreads its four layers apart, so the picture, the foil, the glare and the text panels show one above the other |++## Production notes+- **Performance**: only transforms and opacities change, so following the pointer does not repaint the card from frame to frame. Many holographic card demos move their gradients with `background-position` driven by CSS variables, which repaints the whole card, every layer, on every pointer move: it shows on phones and adds up across a grid. A blend mode on a moving layer still costs the graphics chip a little every frame, so animate only the card under the pointer and leave the rest of a grid flat.+- **Blending stays on the card**: `mix-blend-mode` mixes a layer with everything painted under it in its stacking context. The card's transform makes it a stacking context of its own, so the foil mixes only with the card's picture; a card that has no transform at rest needs `isolation: isolate`, or the foil also lights up the page behind it.+- **Text contrast**: keep text on solid panels above the foil and the glare. Color dodge lightens a dark background a long way under a bright streak, and the glare whitens it, so text laid straight on the foil can lose its contrast at some angles.+- **Touch**: Pointer Events cover mouse, pen and touch. `touch-action: none` on the card lets a finger drag tilt it instead of scrolling the page; under reduced motion the demo sets it back to `auto`, since the card no longer tilts. A finger that slides off the card keeps it leaning toward that edge until it lifts.+- **Masks**: Safari before 15.4 needs the `-webkit-mask` prefix; the demo writes both.+- **Libraries**: VanillaTilt.js does the tilt and a glare (`glare: true`, `"max-glare"`), and Atropos adds layers at different depths; both leave the foil to your CSS. In React, Framer Motion's `useMotionValue` and `useSpring` drive the same transforms, and GSAP's `quickTo` gives the same eased follow.+- **Reduced motion**: the card stays flat and nothing slides. Pointing at it, or Show me, fades the foil and the glare brighter where they are, and they fade back afterwards.++## See also+- [Parallax 3D Tilt](../parallax-3d-tilt/) — the same tilt toward the pointer, with a plain light instead of foil+- [3D Flip Card](../flip-card-3d/) — a card turns over in 3D to show its back+- [Spotlight Hover Glow](../../04-micro-interactions/spotlight-hover/) — a soft glow follows the pointer across a grid of cards+- [Animated Gradient Border](../../04-micro-interactions/gradient-border/) — a band of colors runs around the edge of a carddiff --git a/animations/06-3d-advanced/holographic-card/index.html b/animations/06-3d-advanced/holographic-card/index.htmlnew file mode 100644index 00000000..4102e6cd--- /dev/null+++ b/animations/06-3d-advanced/holographic-card/index.html@@ -0,0 +1,297 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Holographic Card — Animation Handbook</title>+ <meta name="description" content="A card tilts as you point, and its rainbow foil shimmers. Best for collectibles.">+ <link rel="canonical" href="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/holographic-card/">+ <link rel="icon" type="image/png" sizes="96x96" href="../../../favicon.png">+ <link rel="icon" type="image/svg+xml" href="../../../favicon.svg">+ <link rel="apple-touch-icon" href="../../../apple-touch-icon.png">+ <meta property="og:type" content="article">+ <meta property="og:site_name" content="Animation Handbook">+ <meta property="og:title" content="Holographic Card — Animation Handbook">+ <meta property="og:description" content="A card tilts as you point, and its rainbow foil shimmers. Best for collectibles.">+ <meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/holographic-card/">+ <meta property="og:image" content="https://matinmonshizadeh.github.io/animation-handbook/og-image.png">+ <meta name="twitter:card" content="summary_large_image">+ <meta name="twitter:title" content="Holographic Card — Animation Handbook">+ <meta name="twitter:description" content="A card tilts as you point, and its rainbow foil shimmers. Best for collectibles.">+ <meta name="twitter:image" content="https://matinmonshizadeh.github.io/animation-handbook/og-image.png">+ <script type="application/ld+json">{"@context": "https://schema.org", "@type": "TechArticle", "headline": "Holographic Card", "name": "Holographic Card", "description": "A card tilts as you point, and its rainbow foil shimmers. Best for collectibles.", "url": "https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/holographic-card/", "inLanguage": "en", "articleSection": "3D & Advanced", "isPartOf": {"@type": "WebSite", "name": "Animation Handbook", "url": "https://matinmonshizadeh.github.io/animation-handbook/"}, "author": {"@type": "Person", "name": "matinmonshizadeh"}, "keywords": "web animation, CSS animation, 3D & Advanced, Holographic Card"}</script>+ <style>+ :root{--ui-accent:#3fd6c4}+ *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}+ .stage{position:relative;display:grid;place-items:center;background:radial-gradient(70% 70% at 50% 45%,#221a40,#08070d);perspective:1000px}+ /* The card is four layers in one 5:7 box: the picture, the foil, the glare and the text panels. The script turns it toward the+ pointer and moves the foil and the glare inside it; only transform and opacity change. It stays flat (its layers drawn into+ its own plane, where the foil's blend mode mixes it with the picture) except while Shows the layers spreads them apart in 3D. */+ .card{position:relative;height:min(84%,380px);aspect-ratio:5/7;border-radius:12px;touch-action:none;will-change:transform;+ box-shadow:0 0 0 1px rgba(255,255,255,.1),0 24px 50px -14px rgba(0,0,0,.8)}+ .ly{position:absolute;inset:0;border-radius:inherit;overflow:hidden;overflow:clip}+ .art svg{display:block;width:100%;height:100%}+ /* The foil: a sheet of rainbow streaks twice the card's size, slid by the script. Color dodge brightens the picture under each+ streak and leaves it alone under the clear gaps. Glitter and Lines let it through tiny dots or fine lines only. */+ .foil{mix-blend-mode:color-dodge}+ .sheen{position:absolute;inset:-50%;will-change:transform;background:repeating-linear-gradient(118deg,transparent 0%,#f0648c 3%,#f4c35e 6%,#71e2a2 9%,#5ac2f4 12%,#a888f6 15%,transparent 18%,transparent 21%)}+ .card[data-foil=glitter] .foil{-webkit-mask:var(--dots);mask:var(--dots)}+ .card[data-foil=lines] .foil{-webkit-mask:var(--lines);mask:var(--lines)}+ /* Dots in six tile sizes that share no pattern for hundreds of pixels, so they look scattered, not set in a grid. They are kept on+ the foil, the one layer that uses them, so turning the card (a new style for it every frame) does not resolve them again. */+ .foil{--d:#000 0 1px,transparent 1.7px;--dots:radial-gradient(circle at 30% 40%,var(--d)) 0 0/17px 23px,radial-gradient(circle at 75% 15%,var(--d)) 0 0/23px 19px,+ radial-gradient(circle at 50% 80%,#000 0 1.4px,transparent 2.2px) 0 0/31px 37px,radial-gradient(circle at 85% 60%,var(--d)) 0 0/29px 27px,+ radial-gradient(circle at 15% 70%,#000 0 .7px,transparent 1.4px) 0 0/13px 29px,radial-gradient(circle at 60% 35%,#000 0 1.2px,transparent 2px) 0 0/41px 43px;+ --lines:repeating-linear-gradient(60deg,#000 0 1.4px,transparent 1.4px 4.2px)}+ /* The glare: a white spot with a bright middle, the size of the card, moved to the pointer */+ .spot{position:absolute;inset:0;will-change:transform;opacity:0;background:radial-gradient(circle closest-side,rgba(255,255,255,.85),rgba(255,255,255,.4) 22%,rgba(255,255,255,.1) 60%,transparent)}+ /* Text panels: solid and on top, so neither the foil nor the glare ever sits under the text */+ .txt{container-type:inline-size;color:#f4f4f2}+ .np,.ip{position:absolute;left:6%;right:6%;border-radius:5px;background:#110e27;border:1px solid rgba(255,255,255,.16)}+ .np{top:4.3%;height:7.1%;display:flex;align-items:center;justify-content:space-between;padding:0 5%;font-weight:800;font-size:max(12px,6.4cqw);letter-spacing:-.01em}+ .np svg{width:15%;fill:#cfc4ff}+ .ip{top:59.3%;bottom:4.3%;display:flex;flex-direction:column;justify-content:center;gap:4%;padding:0 6%}+ .ab{font-weight:700;font-size:max(12px,6cqw)}+ .ds{font-size:max(11px,4.9cqw);line-height:1.3;color:#d6d6da}+ .ft{display:flex;justify-content:space-between;margin-top:3%;font-size:max(11px,4.2cqw);color:#bdb7e6}+ /* Shows the layers: the card turns to one side and its layers spread apart, each drawn as it is (no blending), with an edge */+ .card.split{transform-style:preserve-3d}+ .card.split .ly{will-change:transform;box-shadow:inset 0 0 0 1px rgba(255,255,255,.3)}+ .card.split .foil{mix-blend-mode:normal}+ /* Reduced motion: nothing moves; the foil and the glare only fade brighter and back */+ @media(prefers-reduced-motion:reduce){.card{touch-action:auto}.foil,.spot{transition:opacity .3s}}+ </style>+ <link rel="stylesheet" href="../../../assets/css/demo-page.css?v=6">+ <script src="../../../assets/js/demo-page.js?v=6" defer></script>+</head>+<body class="hb" data-hb-kind="do" data-hb-autoplay>+<nav class="hb-bar" aria-label="Animation Handbook">+ <a class="hb-home" href="../../../"><svg class="hb-mark" viewBox="0 0 32 32" aria-hidden="true"><g class="g"><circle cx="11.16" cy="20.84" r="6.1"/><circle cx="15.12" cy="16.88" r="6.1"/><circle cx="18.51" cy="13.49" r="6.1"/></g><circle class="b" cx="21.2" cy="10.8" r="6.6"/></svg><span>Animation Handbook</span></a>+ <span class="hb-pager"><a href="../physics-2d/" rel="prev" aria-label="Previous: 2D Physics"><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="m15 18-6-6 6-6"/></svg><span><span class="hb-dir">Previous: </span>2D Physics</span></a></span>+</nav>+<main class="hb-page">+ <header class="hb-head">+ <p class="hb-cat">06.25 · 3D & Advanced</p>+ <h1>Holographic Card</h1>+ <p class="hb-lede">A card tilts as you point, and its rainbow foil shimmers. Best for collectibles.</p>+ </header>++ <section class="hb-step hb-watch" aria-labelledby="hb-watch-title">+ <div class="hb-step-head">+ <span class="hb-num" aria-hidden="true">1</span>+ <div><h2 id="hb-watch-title">Hover it</h2><p>Move your pointer over the card, drag a finger across it, or press Show me.</p></div>+ </div>+ <div class="stage" id="stage">+ <div class="card" id="card" data-foil="smooth" role="img" aria-label="A holographic trading card named Aurora Prism: a glowing crystal over dark mountains under a night sky. As the card tilts toward the pointer, rainbow foil slides across it and a glare follows the pointer.">+ <div class="ly art"><svg viewBox="0 0 100 140" aria-hidden="true">+ <defs>+ <linearGradient id="hc-frame" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#efeaff"/><stop offset=".3" stop-color="#a191ee"/><stop offset=".55" stop-color="#4a3aa8"/><stop offset=".8" stop-color="#b8aaf5"/><stop offset="1" stop-color="#ece6ff"/></linearGradient>+ <linearGradient id="hc-sky" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#0a0f30"/><stop offset=".6" stop-color="#36206a"/><stop offset="1" stop-color="#a5467f"/></linearGradient>+ <radialGradient id="hc-glow"><stop offset="0" stop-color="#c4f1ff" stop-opacity=".8"/><stop offset="1" stop-color="#c4f1ff" stop-opacity="0"/></radialGradient>+ </defs>+ <rect width="100" height="140" fill="url(#hc-frame)"/><rect x="3" y="3" width="94" height="134" rx="3" fill="#141130"/>+ <svg x="6" y="18" width="88" height="62" viewBox="0 0 88 62">+ <rect width="88" height="62" fill="url(#hc-sky)"/>+ <path d="M0 14C30 4 56 22 88 6V11C56 27 30 10 0 21Z" fill="#7cf0c8" opacity=".14"/><path d="M0 22C22 10 50 30 88 12V20C52 38 24 18 0 30Z" fill="#3fd6c4" opacity=".22"/>+ <g fill="#fff"><circle cx="8" cy="6" r=".5"/><circle cx="19" cy="12" r=".4"/><circle cx="30" cy="5" r=".6"/><circle cx="63" cy="8" r=".5"/><circle cx="75" cy="16" r=".4"/><circle cx="82" cy="5" r=".6"/><circle cx="12" cy="26" r=".35"/><circle cx="72" cy="28" r=".35"/></g>+ <circle cx="44" cy="29" r="24" fill="url(#hc-glow)"/>+ <path d="M0 44 10 34 18 39 28 28 38 37 47 31 56 38 66 27 76 36 88 30V62H0Z" fill="#2c2263"/><path d="M0 52 12 45 22 50 34 43 46 51 58 44 70 50 80 45 88 49V62H0Z" fill="#171039"/>+ <ellipse cx="44" cy="54" rx="10" ry="1.6" fill="#8fdcff" opacity=".3"/>+ <path d="M44 8 35 20 44 24Z" fill="#d6f7ff"/><path d="M44 8 53 20 44 24Z" fill="#8fdcff"/><path d="M35 20 37 36 44 24Z" fill="#76b9ff"/>+ <path d="M53 20 51 36 44 24Z" fill="#4f84e6"/><path d="M37 36 44 50 44 24Z" fill="#8a76f2"/><path d="M51 36 44 50 44 24Z" fill="#5b40c4"/>+ <path d="M44 8 53 20 51 36 44 50 37 36 35 20Z" fill="none" stroke="#effcff" stroke-width=".5" stroke-opacity=".8"/>+ <path d="M58 11l1 3 3 1-3 1-1 3-1-3-3-1 3-1z" fill="#fff"/>+ </svg>+ <rect x="6" y="18" width="88" height="62" rx="1" fill="none" stroke="#ddd5ff" stroke-width=".7" stroke-opacity=".7"/>+ </svg></div>+ <div class="ly foil" id="foil"><div class="sheen" id="sheen"></div></div>+ <div class="ly gl"><div class="spot" id="spot"></div></div>+ <div class="ly txt">+ <p class="np"><span>Aurora Prism</span><svg viewBox="0 0 34 10" aria-hidden="true"><path d="M5 1l4 4-4 4-4-4zm12 0 4 4-4 4-4-4zm12 0 4 4-4 4-4-4z"/></svg></p>+ <div class="ip"><p class="ab">Prism Burst</p><p class="ds">Splits starlight into every color.</p><p class="ft"><span>Holo rare</span><span>025/160</span></p></div>+ </div>+ </div>+ </div>+ <div class="hb-player">+ <button class="hb-play" type="button" id="btn-demo" data-hb-demo><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"/></svg>Show me</button>+ </div>+ </section>++ <section class="hb-step hb-try" aria-labelledby="hb-try-title">+ <div class="hb-step-head">+ <span class="hb-num" aria-hidden="true">2</span>+ <div><h2 id="hb-try-title">Try it</h2><p>Change a setting, then try it again or press Show me.</p></div>+ </div>+ <div class="hb-settings">+ <div class="hb-setting">+ <p class="hb-setting-name" id="foil-lbl">Foil pattern</p>+ <div class="seg" id="foil-seg" role="group" aria-labelledby="foil-lbl">+ <button type="button" data-f="smooth" class="on" aria-pressed="true">Smooth</button>+ <button type="button" data-f="glitter" aria-pressed="false">Glitter</button>+ <button type="button" data-f="lines" aria-pressed="false">Lines</button>+ </div>+ <p class="hb-hint">The shine comes as soft bands, sparkling dots or fine lines.</p>+ </div>+ <div class="hb-setting">+ <p class="hb-setting-name" id="tilt-lbl">How far it tilts</p>+ <div class="seg" id="tilt-seg" role="group" aria-labelledby="tilt-lbl">+ <button type="button" data-t="6" aria-pressed="false">Gentle</button>+ <button type="button" data-t="12" class="on" aria-pressed="true">Medium</button>+ <button type="button" data-t="20" aria-pressed="false">Strong</button>+ </div>+ <p class="hb-hint">How far the card leans toward the pointer.</p>+ </div>+ <div class="hb-setting">+ <p class="hb-setting-name" id="glare-lbl">Glare</p>+ <div class="seg" id="glare-seg" role="group" aria-labelledby="glare-lbl">+ <button type="button" data-g="0" aria-pressed="false">Off</button>+ <button type="button" data-g=".55" class="on" aria-pressed="true">Soft</button>+ <button type="button" data-g="1" aria-pressed="false">Bright</button>+ </div>+ <p class="hb-hint">A spot of light that follows the pointer.</p>+ </div>+ </div>+ <details class="hb-options">+ <summary><span class="hb-more-label">More options</span><span class="hb-less">Fewer options</span><svg class="hb-ic" viewBox="0 0 24 24" aria-hidden="true"><path d="m6 9 6 6 6-6"/></svg></summary>+ <div class="hb-settings">+ <div class="hb-setting">+ <label class="hb-switch-row"><span>Shows the layers</span><input class="hb-switch" type="checkbox" role="switch" id="layers-tog" autocomplete="off"></label>+ <p class="hb-hint">The card comes apart into its picture, foil, glare and text.</p>+ </div>+ </div>+ </details>+ </section>++ <section class="hb-step hb-prompt-step" aria-labelledby="hb-prompt-title">+ <div class="hb-step-head">+ <span class="hb-num" aria-hidden="true">3</span>+ <div><h2 id="hb-prompt-title">Copy the prompt</h2><p>Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.</p></div>+ </div>+ <div class="hb-card">+ <p class="hb-prompt">Add a holographic foil to [the card you want to make shine]. Build the card from stacked layers: its picture, a rainbow sheet blended over it to light up the colors beneath, a spot of glare when the settings include one, and on top the text on solid panels so it stays readable. As the pointer moves over the card, tilt the card toward it in 3D, slide the foil with the tilt and keep any glare under the pointer. Ease each change, and move layers only by position and transparency so it stays smooth. On touch screens, dragging a finger does the same. If the visitor has reduced motion turned on, keep the card flat and the foil still, and only brighten it. Match the settings listed below.</p>+ <div class="hb-chips-box" hidden>+ <p class="hb-chips-title">Your settings</p>+ <ul class="hb-chips"></ul>+ </div>+ <div class="hb-copy-row">+ <button class="hb-copy" type="button"><svg class="hb-ic hb-i-copy" viewBox="0 0 24 24" aria-hidden="true"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg><svg class="hb-ic hb-i-done" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg><span class="hb-copy-label" aria-live="polite">Copy prompt</span></button>+ <p class="hb-hint">Replace the words in brackets with your own element. Your settings are added at the end.</p>+ </div>+ </div>+ </section>++ <section class="hb-about" aria-labelledby="hb-what-title">+ <div class="hb-what">+ <h2 id="hb-what-title">What it is</h2>+ <div class="hb-what-text"><p>The full explanation is in <a href="README.md">README.md</a>.</p></div>+ </div>+ <div class="hb-fit">+ <h2>Good for</h2>+ <ul class="hb-tags hb-good"><li>Trading cards</li><li>Membership cards</li><li>Rewards and badges</li><li>Product launches</li></ul>+ <h3>Avoid on</h3>+ <ul class="hb-tags hb-avoid"><li>Text-heavy cards</li><li>Dense grids</li></ul>+ </div>+ </section>++ <section class="hb-related" aria-labelledby="hb-related-title" hidden>+ <h2 id="hb-related-title">Similar animations</h2>+ <div class="hb-rel-list"></div>+ </section>+</main>+<footer class="hb-foot"><span>Animation Handbook</span><a href="#top">Back to top ↑</a></footer>+<script>+const stage=document.getElementById('stage'),card=document.getElementById('card'),foil=document.getElementById('foil');+const sheen=document.getElementById('sheen'),spot=document.getElementById('spot'),layers=[...card.querySelectorAll('.ly')];+const reduce=matchMedia('(prefers-reduced-motion:reduce)');+const FRAME=1000/60,K=.14,RUN_MS=3200;+// The foil's strength at rest and what lighting it adds, per pattern: the dots and lines let less of it through+const FOIL={smooth:[.26,.4],glitter:[.55,.45],lines:[.45,.45]};+let T=12,G=.55,pat='smooth',split=0; // settings: the lean at the card's edges in degrees, the glare, the pattern, layers apart (0 or 1)+let ax=0,ay=0,ah=0,sx=0,sy=0,sh=0,sp=0; // a: the aim (x and y from -.5 to .5 across the card, h 1 while it is lit), s: what is shown+let raf=0,lastT=null,run=null,holdTimer=0,spDrawn='';++// Draws the state s on the card. Under reduced motion nothing turns or slides: the foil and the glare only fade in where they are.+function draw(){+ const still=reduce.matches,x=still?0:sx,y=still?0:sy,[f0,f1]=FOIL[pat];+ card.style.transform=`rotateX(${(-2*T*y-14*sp).toFixed(2)}deg) rotateY(${(2*T*x+26*sp).toFixed(2)}deg) scale(${(1+(still?0:.04*sh)-.2*sp).toFixed(3)})`;+ sheen.style.transform=`translate(${(-40*x).toFixed(2)}%,${(-40*y).toFixed(2)}%)`;+ foil.style.opacity=(f0+f1*sh).toFixed(3);+ spot.style.transform=still?'translate(-15%,-20%)':`translate(${(100*x).toFixed(2)}%,${(100*y).toFixed(2)}%)`;+ spot.style.opacity=(G*sh).toFixed(3);+ // Shows the layers: each layer comes forward by its place in the stack, written only while the layers move apart or together+ // (a custom property on the card would do it too, but the card gets a new style every frame and would pass it to every layer)+ const v=sp.toFixed(3);+ if(v!==spDrawn){spDrawn=v;card.classList.toggle('split',sp>0);layers.forEach((l,i)=>{l.style.transform=sp>0?`translateZ(${(30*i*sp).toFixed(1)}px)`:'';});}+}++// The loop runs only while something moves. Show me drives the state by its own clock; otherwise the state closes 14% of the+// gap to the aim every 60th of a second (the same share at any frame rate) and snaps to it once close.+function wake(){+ if(reduce.matches){run=null;sh=ah;sp=split;draw();return;}+ if(!raf){lastT=null;raf=requestAnimationFrame(tick);}+}+function tick(ts){+ raf=0;const dt=lastT===null?FRAME:Math.min(ts-lastT,50);lastT=ts;let more=false;+ const k=1-Math.pow(1-K,dt/FRAME);+ if(run){+ if(run.t0===null)run.t0=ts;+ const p=Math.min(1,(ts-run.t0)/RUN_MS),e=p*p*(3-2*p);+ sx=.42*Math.sin(2*Math.PI*e)+run.x*(1-p);sy=.34*Math.sin(4*Math.PI*e)+run.y*(1-p);sh=Math.min(1,5*Math.min(e,1-e));+ if(p<1)more=true;else{run=null;sx=sy=sh=ax=ay=ah=0;}+ }else{+ sx+=(ax-sx)*k;sy+=(ay-sy)*k;sh+=(ah-sh)*k;+ if(Math.abs(ax-sx)+Math.abs(ay-sy)+Math.abs(ah-sh)<.002){sx=ax;sy=ay;sh=ah;}else more=true;+ }+ sp+=(split-sp)*k;+ if(Math.abs(split-sp)<.002)sp=split;else more=true;+ draw();+ if(more)raf=requestAnimationFrame(tick);+}+document.addEventListener('visibilitychange',()=>{lastT=null;});++// Show me: a pretend pointer draws a figure of eight over the card in 3.2 s, lit as it goes, and leaves it flat. Under reduced+// motion the card stays flat and the foil and glare fade in for 1.2 s, then out.+function stopHold(){clearTimeout(holdTimer);holdTimer=0;}+document.getElementById('btn-demo').addEventListener('click',()=>{+ stopHold();+ if(reduce.matches){ah=1;wake();holdTimer=setTimeout(()=>{holdTimer=0;ah=0;wake();},1200);return;}+ run={t0:null,x:sx,y:sy};wake();+});+// The visitor pressed, typed, scrolled or touched inside the stage: a run or hold stops and the card settles, unless that same+// press aims it (the pointer handlers below come next)+document.addEventListener('hb:input',()=>{+ if(holdTimer||run){stopHold();run=null;ax=ay=ah=0;wake();}+});++// The pointer aims the card where it is over the card's own place (not its tilted outline, which moves under a resting pointer).+// A finger or pen pressed down keeps aiming at the nearest edge when it slides off; a mouse that leaves the card lets it settle.+const clamp=v=>Math.max(-.5,Math.min(.5,v));+function aim(e){+ const r=stage.getBoundingClientRect();+ const x=(e.clientX-r.left-stage.clientLeft-card.offsetLeft)/card.offsetWidth-.5,y=(e.clientY-r.top-stage.clientTop-card.offsetTop)/card.offsetHeight-.5;+ const on=Math.abs(x)<=.5&&Math.abs(y)<=.5||e.pointerType!=='mouse'&&e.buttons>0;+ ax=on?clamp(x):0;ay=on?clamp(y):0;ah=on?1:0;wake();+}+function rest(){if(!run&&!holdTimer){ax=ay=ah=0;wake();}}+stage.addEventListener('pointerdown',aim);+// Hovering sends no hb:input, so the visitor's own pointer ends a run here, then takes the card+stage.addEventListener('pointermove',e=>{if(e.isTrusted&&(run||holdTimer)){stopHold();run=null;}aim(e);});+['pointerleave','pointercancel'].forEach(t=>stage.addEventListener(t,rest));+stage.addEventListener('pointerup',e=>{if(e.pointerType!=='mouse')rest();});+reduce.addEventListener('change',()=>{stopHold();run=null;sx=sy=sh=ax=ay=ah=0;sp=split;draw();});++function choices(id,pick){+ const buttons=document.querySelectorAll('#'+id+' button');+ buttons.forEach(b=>b.addEventListener('click',()=>{+ buttons.forEach(x=>{x.classList.toggle('on',x===b);x.setAttribute('aria-pressed',String(x===b))});+ pick(b.dataset);+ }));+}+choices('foil-seg',d=>{pat=d.f;card.dataset.foil=pat;draw();});+choices('tilt-seg',d=>{T=+d.t;});+choices('glare-seg',d=>{G=+d.g;draw();});+document.getElementById('layers-tog').addEventListener('change',e=>{split=e.target.checked?1:0;wake();});+draw();+</script>+</body>+</html>diff --git a/animations/06-3d-advanced/parallax-3d-tilt/README.md b/animations/06-3d-advanced/parallax-3d-tilt/README.mdindex 581c6add..3189ac47 100644--- a/animations/06-3d-advanced/parallax-3d-tilt/README.md+++ b/animations/06-3d-advanced/parallax-3d-tilt/README.md@@ -98,3 +98,4 @@ function step(now) { // t0 = the time of the first fra- [3D Model Orbit](../3d-model-orbit/) — a real 3D object drawn with WebGL- [Hover State Animation](../../04-micro-interactions/hover-state/) — flat hover feedback, without the 3D- [2.5D / Pseudo-3D](../2-5d-pseudo-3d/) — layers at different depths move with the pointer+- [Holographic Card](../holographic-card/) — the same tilt, with a rainbow foil and a glare that follow the pointerdiff --git a/docs/launch-kit.md b/docs/launch-kit.mdindex dda098f3..0b3cd1ea 100644--- a/docs/launch-kit.md+++ b/docs/launch-kit.md@@ -10,7 +10,7 @@ quality is already there; this is the distribution layer. Work top to bottom.GitHub → repo **Settings** (or the ⚙️ next to "About" on the repo home page):**Description:**-> 158 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.+> 159 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.**Website:** `https://matinmonshizadeh.github.io/animation-handbook/`@@ -25,7 +25,7 @@ With the GitHub CLI (`gh`), this is one command:```bashgh repo edit matinmonshizadeh/animation-handbook \- --description "158 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step." \+ --description "159 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step." \--homepage "https://matinmonshizadeh.github.io/animation-handbook/" \--add-topic web-animation,css-animation,animation,frontend,web-development,javascript,motion-design,ui-animation,scroll-animation,microinteractions,webgl,ai-prompts,reference,no-dependencies,github-pages \--remove-topic awesome@@ -41,7 +41,7 @@ and share, which drives return visits.## 2. Verify SEO is live (after pushing)-- `https://matinmonshizadeh.github.io/animation-handbook/sitemap.xml` → should list 159 URLs+- `https://matinmonshizadeh.github.io/animation-handbook/sitemap.xml` → should list 160 URLs- `https://matinmonshizadeh.github.io/animation-handbook/robots.txt` → should load- Submit the sitemap to **Google Search Console** (add the property, then Sitemaps → submit `sitemap.xml`).- Test the social card at https://opengraph.xyz — paste the homepage URL, confirm the og-image shows.@@ -59,14 +59,14 @@ comments yourself in the first hours.### Show HN (news.ycombinator.com/submit)**Title:**-> Show HN: Animation Handbook – 158 web animations, each with a prompt for your AI+> Show HN: Animation Handbook – 159 web animations, each with a prompt for your AI**URL:** `https://matinmonshizadeh.github.io/animation-handbook/`**First comment (post immediately after submitting):**> I kept re-googling the same animation techniques and landing on either a> library's marketing page or a CodePen with no explanation. So I built a-> reference: 158 techniques, from scroll effects and page transitions to+> reference: 159 techniques, from scroll effects and page transitions to> micro-interactions, text, 3D, and ambient backgrounds. You find one by where it> goes on your page (buttons, text, backgrounds, page changes…) or by describing> it. Each one plays live, has a few plain settings, and gives you a ready-made@@ -78,10 +78,10 @@ comments yourself in the first hours.### Reddit — r/webdev (Showoff Saturday) and r/Frontend**Title:**-> I built a handbook of 158 web animations — watch each one live, tweak it, and copy a prompt for your AI assistant+> I built a handbook of 159 web animations — watch each one live, tweak it, and copy a prompt for your AI assistant**Body:**-> 158 techniques in 7 categories (scroll, entrance/exit, page transitions,+> 159 techniques in 7 categories (scroll, entrance/exit, page transitions,> micro-interactions, text, 3D, ambient). Find one by where it goes on your page or> by describing it, try a few plain settings, then copy a prompt that describes it in> plain words for ChatGPT, Claude or Cursor. Each technique is also one standalone@@ -93,7 +93,7 @@ comments yourself in the first hours.### dev.to / Hashnode article-**Title:** `158 web animations you can copy as a prompt for your AI assistant`+**Title:** `159 web animations you can copy as a prompt for your AI assistant`**Outline:**1. The problem — animation knowledge is scattered across libraries and CodePens, and an AI@@ -108,7 +108,7 @@ comments yourself in the first hours.### X / Bluesky thread-> 1/ I built Animation Handbook — 158 web animations you can watch live, tweak, and+> 1/ I built Animation Handbook — 159 web animations you can watch live, tweak, and> copy as a prompt for your AI assistant. No dependencies, no build step. 🧵 <docs/demo.gif>>> 2/ Find one by where it goes — buttons, text, backgrounds, page changes — or just@@ -126,7 +126,7 @@ awesome-web-animation) via PR.### Product Hunt-**Tagline:** `158 web animations, each with a prompt for your AI assistant`+**Tagline:** `159 web animations, each with a prompt for your AI assistant`Schedule for a Tuesday–Thursday 12:01am PT. Line up 5–10 people to comment/upvote early.---diff --git a/index.html b/index.htmlindex f247bf7a..f993ca8f 100644--- a/index.html+++ b/index.html@@ -4,8 +4,8 @@<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="google-site-verification" content="2PnJemecfPix7j08I3cojuzPTfwKpwxxFMADFxv4wk8">-<title>Animation Handbook — 158 Web Animation Techniques with Live Demos</title>-<meta name="description" content="A visual reference of 158 web animation techniques — scroll effects, page transitions, micro-interactions, text animation, 3D, and ambient backgrounds. Every entry is a live, dependency-free demo with an explanation of how it works.">+<title>Animation Handbook — 159 Web Animation Techniques with Live Demos</title>+<meta name="description" content="A visual reference of 159 web animation techniques — scroll effects, page transitions, micro-interactions, text animation, 3D, and ambient backgrounds. Every entry is a live, dependency-free demo with an explanation of how it works."><meta name="keywords" content="web animation, CSS animation, animation examples, scroll animation, page transitions, micro-interactions, kinetic typography, WebGL, frontend animation reference, motion design, animation handbook"><meta name="author" content="matinmonshizadeh"><meta name="robots" content="index, follow, max-image-preview:large">@@ -18,8 +18,8 @@<!-- Open Graph --><meta property="og:type" content="website"><meta property="og:site_name" content="Animation Handbook">-<meta property="og:title" content="Animation Handbook — 158 Web Animation Techniques with Live Demos">-<meta property="og:description" content="A visual reference of 158 web animation techniques. Every entry is a live, dependency-free demo with an explanation of how it works.">+<meta property="og:title" content="Animation Handbook — 159 Web Animation Techniques with Live Demos">+<meta property="og:description" content="A visual reference of 159 web animation techniques. Every entry is a live, dependency-free demo with an explanation of how it works."><meta property="og:url" content="https://matinmonshizadeh.github.io/animation-handbook/"><meta property="og:image" content="https://matinmonshizadeh.github.io/animation-handbook/og-image.png"><meta property="og:image:width" content="1200">@@ -27,8 +27,8 @@<!-- Twitter --><meta name="twitter:card" content="summary_large_image">-<meta name="twitter:title" content="Animation Handbook — 158 Web Animation Techniques">-<meta name="twitter:description" content="A visual reference of 158 web animation techniques. Every entry is a live, dependency-free demo you can open in the browser.">+<meta name="twitter:title" content="Animation Handbook — 159 Web Animation Techniques">+<meta name="twitter:description" content="A visual reference of 159 web animation techniques. Every entry is a live, dependency-free demo you can open in the browser."><meta name="twitter:image" content="https://matinmonshizadeh.github.io/animation-handbook/og-image.png"><!-- Structured data: parsed by search + AI answer engines -->@@ -38,7 +38,7 @@"@type": "WebSite","name": "Animation Handbook","url": "https://matinmonshizadeh.github.io/animation-handbook/",- "description": "A visual reference of 158 web animation techniques, each with a live, dependency-free demo and an explanation of how it works.",+ "description": "A visual reference of 159 web animation techniques, each with a live, dependency-free demo and an explanation of how it works.","inLanguage": "en","author": { "@type": "Person", "name": "matinmonshizadeh" },"about": ["web animation", "CSS animation", "motion design", "frontend development"],@@ -1039,6 +1039,21 @@ button,input{font:inherit;color:inherit}@keyframes d-ph2{0%,22%{transform:translateY(-620%);animation-timing-function:cubic-bezier(.5,0,1,.6)}34%{transform:translateY(0);animation-timing-function:cubic-bezier(0,.4,.5,1)}37%{transform:translateY(-22%);animation-timing-function:cubic-bezier(.5,0,1,.6)}40%,100%{transform:translateY(0)}}@keyframes d-ph3{0%,32%{transform:translateY(-620%);animation-timing-function:cubic-bezier(.5,0,1,.6)}44%{transform:translateY(0);animation-timing-function:cubic-bezier(0,.4,.5,1)}47%{transform:translateY(-22%);animation-timing-function:cubic-bezier(.5,0,1,.6)}50%,100%{transform:translateY(0)}}@keyframes d-phfade{0%,84%{opacity:1}92%,100%{opacity:0}}+/* A foil card (5:7, 1cqh is 1% of the stage's height, a little low to keep clear of the place label) turns from side to side while a+ rainbow streak slides the other way and a glare follows the side that faces the light; the text panels sit on top */+.pv-holo{background:radial-gradient(70% 80% at 50% 50%,#221a40,#07060b);display:grid;place-items:center;perspective:420px;container-type:size}+.pv-holo .hc{position:relative;top:11cqh;height:64cqh;aspect-ratio:5/7;border-radius:5px;overflow:hidden;animation:d-holo 5s ease-in-out infinite;+ background:linear-gradient(#0e1236,#3a2370 55%,#a5467f) 50% 23%/84% 44% no-repeat,linear-gradient(#141130,#141130) 50% 50%/90% 93% no-repeat,linear-gradient(135deg,#efeaff,#a191ee 30%,#4a3aa8 55%,#b8aaf5 80%,#ece6ff)}+.pv-holo i{position:absolute}+.pv-holo .cr{left:39%;top:16%;width:22%;height:34%;clip-path:polygon(50% 0,100% 30%,90% 74%,50% 100%,10% 74%,0 30%);background:linear-gradient(135deg,#d6f7ff,#76b9ff 45%,#5b40c4)}+.pv-holo .fo{inset:-50%;mix-blend-mode:color-dodge;opacity:.75;background:repeating-linear-gradient(118deg,transparent 0 3%,#f0648c 6%,#f4c35e 9%,#71e2a2 12%,#5ac2f4 15%,#a888f6 18%,transparent 21% 24%);animation:d-holof 5s ease-in-out infinite}+.pv-holo .gl{inset:0;background:radial-gradient(circle closest-side,rgba(255,255,255,.75),rgba(255,255,255,.25) 30%,transparent);animation:d-holog 5s ease-in-out infinite}+.pv-holo .np,.pv-holo .ip{left:6%;right:6%;border-radius:2px;background:#110e27}+.pv-holo .np{top:4.3%;height:7.1%;background:linear-gradient(#e9e6ff,#e9e6ff) 12% 50%/42% 34% no-repeat,#110e27}+.pv-holo .ip{top:59.3%;bottom:4.3%;background:linear-gradient(#e9e6ff,#e9e6ff) 14% 28%/40% 9% no-repeat,linear-gradient(#a9a3d6,#a9a3d6) 14% 56%/72% 7% no-repeat,linear-gradient(#a9a3d6,#a9a3d6) 14% 80%/30% 7% no-repeat,#110e27}+@keyframes d-holo{0%,100%{transform:rotateY(-24deg) rotateX(8deg)}50%{transform:rotateY(24deg) rotateX(-8deg)}}+@keyframes d-holof{0%,100%{transform:translate(12%,4%)}50%{transform:translate(-12%,-4%)}}+@keyframes d-holog{0%,100%{transform:translate(-32%,-18%)}50%{transform:translate(32%,18%)}}/* ── bespoke: 07 Ambient & Background ── */.pv-grain2{background:radial-gradient(circle at 50% 40%,#1a1710,#08080a);overflow:hidden}@@ -1329,7 +1344,7 @@ button,input{font:inherit;color:inherit}<section class="wrap home-hero" aria-labelledby="hero-title"><span class="float fl1" aria-hidden="true"></span><span class="float fl2" aria-hidden="true"></span><span class="float fl3" aria-hidden="true"></span><span class="float fl4" aria-hidden="true"></span><span class="float fl5" aria-hidden="true"></span><span class="float fl6" aria-hidden="true"></span>- <p class="pill"><span class="pill-dot" aria-hidden="true"></span>158 free animations · no coding needed</p>+ <p class="pill"><span class="pill-dot" aria-hidden="true"></span>159 free animations · no coding needed</p><h1 class="h1" id="hero-title">What do you want to animate?</h1><p class="sub">Pick a place, or describe it in your own words. Every animation plays live, and each one comes with a ready-made prompt for your AI assistant.</p><form class="search" id="search-form" role="search" action="./" method="get">@@ -1386,8 +1401,8 @@ button,input{font:inherit;color:inherit}<p class="empty-s">Try a simpler word, or pick one of these:</p><p class="pop"><button type="button" data-q="fade in">fade in</button><button type="button" data-q="typing text">typing text</button><button type="button" data-q="loading spinner">loading spinner</button><button type="button" data-q="parallax">parallax</button><button type="button" data-q="confetti">confetti</button></p></div>- <div class="more" id="more"><button type="button" class="bigbtn" id="more-btn"><span id="more-label">Browse all 158 animations</span><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14M6 13l6 6 6-6"/></svg></button></div>- <noscript><p class="noscript">This page shows its animations with JavaScript. All 158 are still easy to reach: see the <a href="https://github.com/matinmonshizadeh/animation-handbook#categories">category list on GitHub</a> or the <a href="sitemap.xml">full sitemap</a>. Each demo is a page of its own under <code>/animations/<category>/<name>/</code>.</p></noscript>+ <div class="more" id="more"><button type="button" class="bigbtn" id="more-btn"><span id="more-label">Browse all 159 animations</span><svg class="i" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14M6 13l6 6 6-6"/></svg></button></div>+ <noscript><p class="noscript">This page shows its animations with JavaScript. All 159 are still easy to reach: see the <a href="https://github.com/matinmonshizadeh/animation-handbook#categories">category list on GitHub</a> or the <a href="sitemap.xml">full sitemap</a>. Each demo is a page of its own under <code>/animations/<category>/<name>/</code>.</p></noscript></section><section class="how" id="how" aria-labelledby="how-title">@@ -1405,7 +1420,7 @@ button,input{font:inherit;color:inherit}<footer class="wrap foot"><a class="brand" href="./"><svg class="mark" viewBox="0 0 32 32" aria-hidden="true"><circle class="ring" cx="11.16" cy="20.84" r="6.1"/><circle class="ring" cx="15.12" cy="16.88" r="6.1"/><circle class="ring" cx="18.51" cy="13.49" r="6.1"/><circle class="ball" cx="21.2" cy="10.8" r="6.6"/></svg><span>Animation Handbook</span></a>- <p class="foot-t">158 web animations with live demos and copyable prompts.</p>+ <p class="foot-t">159 web animations with live demos and copyable prompts.</p><nav class="nav" aria-label="Footer"><a class="lnk" href="https://github.com/matinmonshizadeh/animation-handbook" target="_blank" rel="noopener noreferrer">GitHub</a><a class="lnk" href="#top">Back to top</a></nav></footer><div class="toast" id="toast" role="status" aria-live="polite"><span class="ok" aria-hidden="true"><svg class="i" viewBox="0 0 24 24"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span><span class="toast-t"></span></div>@@ -1596,6 +1611,7 @@ const CATS=[['flocking','Flocking','Birds swirl and turn together as one flock. Best for calm backgrounds.'],['ascii-halftone','ASCII / Halftone','A moving picture is redrawn with letters or dots. Best for retro and tech looks.'],['physics-2d','2D Physics','Balls drop where you click, bounce and pile up. Best for playful intros.'],+ ['holographic-card','Holographic Card','A card tilts as you point, and its rainbow foil shimmers. Best for collectibles.'],]},{@@ -1640,7 +1656,7 @@ const PV={'rolling-numbers':'rollnum','typing-indicator':'typing','hold-to-confirm':'holdconf','expanding-search':'xsearch','button-loading-states':'btnload',- 'flip-card-3d':'flip3d','carousel-3d':'carousel3d','depth-map-photo':'depthmap','flocking':'flock','ascii-halftone':'ascii','physics-2d':'phys2d','matrix-rain':'matrix','plasma':'plasmapv',+ 'flip-card-3d':'flip3d','carousel-3d':'carousel3d','depth-map-photo':'depthmap','flocking':'flock','ascii-halftone':'ascii','physics-2d':'phys2d','holographic-card':'holo','matrix-rain':'matrix','plasma':'plasmapv','wave-layers':'wavelayers','snow-rain':'snowrain','fireworks':'fireworks','topographic-lines':'topo','light-rays':'rays','game-of-life':'life','parallax-depth-of-field':'dof','parallax-scrolling':'plx','reverse-scrolling-columns':'revcol',@@ -1822,6 +1838,7 @@ const PLACES={'flocking':['bg'],'ascii-halftone':['imgcard','bg'],'physics-2d':['intro','bg'],+ 'holographic-card':['imgcard'],// 07'animated-gradient-background':['bg'],'mesh-gradient':['bg'],@@ -1878,6 +1895,7 @@ function pvMarkup(k){case 'neon': return '<span class="sg"><span class="gl">OPEN</span><span class="lt anim">OPEN</span></span>';case 'handwrite': return '<span class="pp"><svg viewBox="-34 -90 180 100"><line class="rl" x1="-34" x2="146" y1="0" y2="0"/><path class="w anim" pathLength="1" d="M0 0C3 0 6.9-4 10.6-12C14.8-22 24.7-44 28.3-58C31.4-70 30.7-76 27.7-76C24.7-76 22.4-70 21.1-62C18.1-46 12.5-18 8.5 0C11.6-12 18.9-27 25.6-27.5C31.2-28 30.2-19 27.9-11C25.7-3 27.5 0 31 0C34.5 0 39.8-3.5 44-9C48.2-14.5 50.6-21 46.7-21.5C42.8-22 38-16 37.1-9.5C36-2.5 40.5 0 45 0C48 0 51.9-4 55.6-12C59.8-22 69.7-44 73.3-58C76.4-70 75.7-76 72.7-76C69.7-76 67.4-70 66.1-62C63.1-46 57-16 55.5-7C54.9-2 57 0 60 0C63 0 66.9-4 70.6-12C74.8-22 84.7-44 88.3-58C91.4-70 90.7-76 87.7-76C84.7-76 82.4-70 81.1-62C78.1-46 72-16 70.5-7C69.9-2 72 0 75 0C78 0 83.2-10 89.3-22C92.4-27 95.9-29 98.9-29C100.9-29 102.2-28 102.3-26.5C102.2-28 100.9-29 98.9-29C95.9-29 92.4-27 89.3-22C86.7-17 83.6-5 87.3-1.5C91.2 1.5 97.8-6 99.6-14C100.9-20 101.3-24 100.7-26C103.3-28.5 107.8-28.5 111.9-27"/></svg></span>';case 'sig6': return '<div class="cube anim"><span class="face f1"></span><span class="face f2"></span><span class="face f3"></span><span class="face f4"></span><span class="face f5"></span><span class="face f6"></span></div>';+ case 'holo': return '<span class="hc anim"><i class="cr"></i><i class="fo anim"></i><i class="gl anim"></i><i class="np"></i><i class="ip"></i></span>';case 'carousel3d': return '<div class="sc"><div class="tl"><div class="rg anim">'+[0,1,2,3,4,5].map(k=>'<i style="--k:'+k+'"></i>').join('')+'</div></div></div>';case 'depthmap': return [['sun',-.4],['mt',-.2],['hl',.05],['md',.25],['tr',.45],['gd',.55]].map(([c,k])=>'<i class="'+c+' anim" style="--k:'+k+'"></i>').join('');case 'flock': return '<span class="fk anim">'+[[0,18,0],[-10,6,-.3],[9,5,-.7],[-20,-5,-1.1],[1,-4,-.5],[17,-8,-.9],[-8,-17,-.2],[10,-20,-1.2],[-1,-29,-.6]].map(function(b){return '<i class="anim" style="--x:'+b[0]+'%;--y:'+b[1]+'%;--d:'+b[2]+'s"></i>';}).join('')+'</span>';diff --git a/sitemap.xml b/sitemap.xmlindex 38230db2..b16ad845 100644--- a/sitemap.xml+++ b/sitemap.xml@@ -136,6 +136,7 @@<url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/flocking/</loc><lastmod>2026-10-01</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url><url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/ascii-halftone/</loc><lastmod>2026-10-01</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url><url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/physics-2d/</loc><lastmod>2026-10-01</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>+ <url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/06-3d-advanced/holographic-card/</loc><lastmod>2026-10-01</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url><url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/animated-gradient-background/</loc><lastmod>2026-07-14</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url><url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/mesh-gradient/</loc><lastmod>2026-07-14</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url><url><loc>https://matinmonshizadeh.github.io/animation-handbook/animations/07-ambient-background/aurora/</loc><lastmod>2026-07-14</lastmod><changefreq>monthly</changefreq><priority>0.7</priority></url>