
Blinds over images
Images, Scroll
Scroll inside the preview
The page of hole 7 at Sable Pines, a made-up desert golf club, on warm paper: as you scroll a real aerial photo of the golf course opens from its middle and the hole is played over it. The flight of the drive draws itself from the tee in orange with the ball rising above its own shadow, a thin ring marks where it lands and a chip counts the yards; then the approach onto the green, the flag rising and waving, the putt rolling in. Beside it the hole card rolls par, yards and handicap, the yards to the pin roll down after every shot and at the end the score is circled: birdie.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Golf hole flyover" from Animorio · https://animorio.com
License: free on your own sites and your clients’ sites, paid work included.
Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sable Pines, hole 7 played as you scroll</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/index.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/instrument-sans@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the page of one hole at Sable Pines, a made-up desert golf club. Scrolling down, the stage stays still: an aerial
photo of the hole opens from its middle, then the round is played over it. The flight of the drive draws itself
from the tee with the ball arcing above its shadow, a thin ring marks where it lands and a chip counts the yards;
the approach follows onto the green, the flag rises and waves, the putt rolls in. Beside it the hole card rolls
its figures (par, yards, handicap, yards to the pin) and at the end the score is circled: a birdie -->
<header class="barra">
<p class="marchio">
<svg class="marchio__segno" viewBox="0 0 24 24" aria-hidden="true"><path d="M7 21V3.5l10 4-10 4" /><path d="M3.5 21h14" /></svg>
Sable Pines
</p>
<nav class="barra__voci" aria-label="Main">
<a href="#" aria-current="page">The course</a>
<a href="#">Membership</a>
<a href="#">Tee times</a>
</nav>
</header>
<main>
<section class="apertura">
<p class="piccolo">Sable Pines Golf Club, the desert course</p>
<h1 class="titolo">Hole 7, <em>the Lone Pine.</em></h1>
<p class="piccolo piccolo--tenue">
Scroll to play the hole
<svg class="giu" viewBox="0 0 12 16" aria-hidden="true"><path d="M6 1v13M1.5 9.5 6 14l4.5-4.5" /></svg>
</p>
</section>
<section class="buca" data-buca>
<div class="palco">
<div class="scena">
<figure class="lastra" data-lastra>
<i class="lastra__ombra" data-ombra aria-hidden="true"></i>
<div class="lastra__maschera" data-maschera>
<div class="lastra__camera" data-camera>
<img class="lastra__foto" src="fairway.webp" alt="Aerial view of the hole: a fairway curving between desert sand and pines to a green guarded by a bunker" width="1024" height="576" decoding="async">
<i class="lastra__luce" aria-hidden="true"></i>
<i class="lastra__grana" data-grana aria-hidden="true"></i>
<svg class="tiro" data-tiro viewBox="0 0 1024 576" aria-hidden="true">
<defs>
<mask id="traccia-drive" maskUnits="userSpaceOnUse"><path data-scopri d="" fill="none" stroke="#fff" /></mask>
<mask id="traccia-approccio" maskUnits="userSpaceOnUse"><path data-scopri d="" fill="none" stroke="#fff" /></mask>
<mask id="traccia-putt" maskUnits="userSpaceOnUse"><path data-scopri d="" fill="none" stroke="#fff" /></mask>
<filter id="morbida" x="-1" y="-1" width="3" height="3"><feGaussianBlur stdDeviation="2.2" /></filter>
</defs>
<!-- the ground under each flight, dashed, uncovered by its mask as the ball passes -->
<path class="tiro__terra" data-terra mask="url(#traccia-drive)" d="" />
<path class="tiro__terra" data-terra mask="url(#traccia-approccio)" d="" />
<path class="tiro__terra tiro__terra--putt" data-terra mask="url(#traccia-putt)" d="" />
<!-- the flights: a soft dark halo under the accent line, so it reads on grass and on sand -->
<path class="tiro__alone" data-alone d="" pathLength="1" />
<path class="tiro__alone" data-alone d="" pathLength="1" />
<path class="tiro__volo" data-volo d="" pathLength="1" />
<path class="tiro__volo" data-volo d="" pathLength="1" />
<!-- the tee and the two landings: thin rings, each with a ripple that leaves once -->
<g data-segno="tee"><circle class="tiro__onda" data-onda /><circle class="tiro__anello tiro__anello--tee" data-anello /></g>
<g data-segno="drive"><circle class="tiro__onda" data-onda /><circle class="tiro__anello" data-anello /></g>
<g data-segno="approach"><circle class="tiro__onda" data-onda /><circle class="tiro__anello" data-anello /></g>
<!-- the cup and the flag -->
<ellipse class="tiro__buca" data-coppa />
<g class="bandiera" data-bandiera>
<line class="bandiera__asta" data-asta />
<path class="bandiera__telo" data-telo d="" />
</g>
<!-- the ball, with its shadow on the ground -->
<ellipse class="tiro__ombra" data-ombra-palla filter="url(#morbida)" />
<g data-palla><circle class="tiro__palla" data-r-palla /><circle class="tiro__lucepalla" data-r-luce /></g>
</svg>
<p class="chip chip--tee" data-chip="tee"><span>Tee</span></p>
<p class="chip" data-chip="drive"><span>Drive</span><b><span data-conta>0</span> yd</b></p>
<p class="chip" data-chip="approach"><span>Approach</span><b><span data-conta>0</span> yd</b></p>
<p class="chip chip--putt" data-chip="putt"><span>Putt</span><b><span data-conta>0</span> ft</b></p>
</div>
</div>
<i class="lastra__bordo" aria-hidden="true"></i>
</figure>
<aside class="scheda" data-scheda aria-label="Hole card">
<p class="scheda__club" data-entra>Sable Pines, the desert course</p>
<h2 class="scheda__titolo" data-entra>
<span class="scheda__parola">Hole</span>
<span class="rullo-num rullo-num--grande" data-rullo="7" data-cifre="1"></span>
<span class="scheda__nome">The Lone Pine</span>
</h2>
<dl class="dati" data-entra>
<div><dt>Par</dt><dd><span class="rullo-num" data-rullo="par" data-cifre="1"></span></dd></div>
<div><dt>Yards</dt><dd><span class="rullo-num" data-rullo="yards" data-cifre="3"></span></dd></div>
<div><dt>Handicap</dt><dd><span class="rullo-num" data-rullo="5" data-cifre="1"></span></dd></div>
</dl>
<div class="pin" data-entra>
<span class="pin__nome">To the pin</span>
<span class="pin__cifre"><span class="rullo-num" data-rullo="pin" data-cifre="3"></span><small>yd</small></span>
<i class="pin__barra"><i data-pin-barra></i></i>
</div>
<blockquote class="consiglio" data-entra>
<p>“Aim at the lone pine. Anything right of it finds the waste sand.”</p>
<cite>Dario Reyes, head pro</cite>
</blockquote>
<div class="punteggio" data-entra>
<span class="punteggio__nome">Your score</span>
<span class="punteggio__cifra">
<span class="rullo-num rullo-num--grande" data-rullo="score" data-cifre="1"></span>
<svg class="punteggio__giro" viewBox="0 0 60 60" aria-hidden="true"><path data-giro d="M30 5.5c13.8.2 24.7 11 24.5 24.6S43.4 54.8 29.7 54.5 5.3 43.3 5.5 29.6C5.7 17.4 15 7.6 27 5.8" pathLength="1" /></svg>
</span>
<span class="punteggio__esito"><span data-esito>Birdie</span></span>
</div>
</aside>
</div>
</div>
</section>
<section class="apertura apertura--fine">
<h2 class="titolo titolo--medio">Play it <em>for real.</em></h2>
<a class="pulsante" href="#"><span>Book a tee time</span><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h10M9 4l4 4-4 4" /></svg></a>
</section>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
<script src="script.js"></script>
</body>
</html>Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.
50 values to change
With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:
Take “Golf hole flyover” from Animorio and fit it into my siteThe section is 520vh tall times RIDE and a 100lvh sticky stage stays still inside it. A GSAP timeline tied to the scroll (scrub SCRUB) moves numbers, not elements: the opening of the photo, the camera, the flight of each shot, the rings, the chips, the flag, the putt, the circle. On every update a single function rewrites everything from those numbers.
The SVG over the photo has the image's own viewBox (1024 by 576) and the plate has the same ratio, so the tee, the landings and the cup stay on the right spot of the photo at any size. Each flight is a quadratic curve with its control point straight above the middle of the shot: higher on screen means higher in the air, and the curve's x moves evenly with time, so the shadow on the ground follows it exactly.
The flight has pathLength 1 and draws itself with stroke-dashoffset from 1 to 0, over a wider dark halo that makes it read on grass and on sand. The ground track is dashed and uncovered by a mask drawn the same way. Widths and radii are in real pixels: the script turns them into photo units on every frame, camera included.
Every digit is a strip of numbers in a window one figure tall; it moves by -n em with the ROLL curve. Digits always turn forward like a slot (from 4 to 1 they pass 5, 6, 7, 8, 9, 0), the first time with one extra turn; while they run they blur, and the leading zeros are faint as on a scoreboard.
The cloth is a path redrawn on every frame by the GSAP ticker: its top and bottom edges are two sine waves out of phase, wider toward the tip and drooping a little, with the strength WIND.
| Name | File | Default | What it changes |
|---|---|---|---|
RIDE | script.js | 1 | How much scroll the whole hole takes: 2 is twice as long. |
DRIVE | script.js | 268 | The yards of the drive, written in its chip (the shots add up to the yards of the hole). |
APPROACH | script.js | 138 | The yards of the approach onto the green. |
PUTT | script.js | 18 | The feet of the putt (three feet to a yard). |
PAR | script.js | 4 | The par of the hole: three strokes on a par 4 is a birdie, on a par 3 a par. |
ARC | script.js | 1 | How high the ball flies: 0 flat, 2 twice as high. |
ROLL | script.js | 'back.out(1.6)' | The curve of the rolling figures. |
GRAIN | script.js | 0.08 | How much film grain lies on the photo. |
WIND | script.js | 1 | How much the flag waves: 0 still. |
SCRUB | script.js | 0.8 | How many seconds the hole takes to catch up with the scroll. |
For the page of a hole or of the course of a golf club, of a resort with a golf course, of a tournament or of an app for players: when a real aerial photo is the course and the game is told over it. Swap the photo in the img of the HTML; the tee, the landings and the cup are four points at the top of the script (T, D, G, P) in the photo's units. The colours are in :root.
The same animations at adapted sizes: the photo on top, measured on width and height, the hole card under it without the club name and the pro's tip; lines, rings and chips keep their real size.
No movement: the photo is already open and fades in, the camera stays still, the flights, rings and chips fade in without the ball, the figures change without rolling, the flag stays still.
GSAP 3.15.0, ScrollTrigger 3.15.0, Fraunces (font variabile) 5.3.0, Instrument Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 14 KB; the libraries: GSAP + ScrollTrigger 45 KB.
Tested on 18 November 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.