
Stacking certificates
Hover, Images
The gallery of a flat to rent from Ambra Living, an invented estate agency: one large real photo of the living room, with the oak floor, the linen sofa and the windows with louvred shutters, and the slider of the day under it. Dragging it from Morning to Evening really changes the light over the photo: from 12:40 the striped patch of sun, with the shadow of the louvres and the bars, comes in under the window and stretches across the rug and the floor towards the sofa, the colour goes from the cool of the morning to the warm of the evening and at dusk the floor lamp and the ceiling spots come on. The time rolls on its digits, the compass says ‘South-west facing’ and hovering the photo a thin loupe magnifies the detail and names it.
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>
<!--
"House light gallery" 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>The house gallery with the room light from morning to evening</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the gallery of a flat to rent: one large photo of the living room (living-room.webp, a real photo) in a canvas,
and a slider under it. Dragging the slider through the day lays veils of light over the photo: the striped patch
of sun through the shutters moves and stretches, the colour goes from the cool of the morning to the warm of the
evening and the lamps come on.
Hovering the photo shows a thin loupe with the detail under it -->
<section class="card" data-card aria-label="The Linden Loft, living room">
<header class="head">
<span class="mark" aria-hidden="true">
<svg viewBox="0 0 20 20"><path d="M4.2 16.4V9.6a5.8 5.8 0 0 1 11.6 0v6.8"></path><path d="M8 16.4v-4.6a2 2 0 0 1 4 0v4.6"></path><path d="M2.6 16.4h14.8"></path></svg>
</span>
<span class="who">
<span class="brand">Ambra Living</span>
<span class="title">The Linden Loft, 2 bed</span>
</span>
<span class="price"><b>£2,450</b><small>per month</small></span>
</header>
<figure class="photo" data-photo>
<canvas class="photo__cv" data-cv role="img" aria-label="Photo of the living room of The Linden Loft"></canvas>
<span class="chip chip--room">Living room</span>
<span class="chip chip--count">
<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="1.8" y="4.2" width="12.4" height="9" rx="2.2"></rect><path d="M5.6 4.2 6.6 2.6h2.8l1 1.6"></path><circle cx="8" cy="8.7" r="2.4"></circle></svg>
<span>12 photos</span>
</span>
<span class="hint" data-hint>
<svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="7" cy="7" r="4.4"></circle><path d="m10.3 10.3 3.4 3.4"></path></svg>
<span data-hint-text>Hover to look closer</span>
</span>
<div class="lens" data-lens aria-hidden="true">
<div class="lens__glass"><canvas data-lens-cv></canvas></div>
<span class="lens__tag" data-lens-tag><span>Oak floor, oiled</span></span>
</div>
</figure>
<div class="readout">
<div class="clock">
<span class="time" data-time aria-hidden="true">
<span class="digit" data-digit></span><span class="digit" data-digit></span><span class="colon">:</span><span class="digit" data-digit></span><span class="digit" data-digit></span>
</span>
<span class="phase" data-phase><span>Soft morning light</span></span>
</div>
<div class="facing">
<svg class="compass" viewBox="0 0 28 28" aria-hidden="true">
<circle class="compass__ring" cx="14" cy="14" r="12.2"></circle>
<g class="compass__ticks"><path d="M14 2.6v2.2M14 23.2v2.2M2.6 14h2.2M23.2 14h2.2"></path></g>
<g class="compass__needle" data-needle><path class="compass__n" d="M14 5.6 16 14h-4Z"></path><path class="compass__s" d="M14 22.4 12 14h4Z"></path></g>
<circle class="compass__hub" cx="14" cy="14" r="1.2"></circle>
</svg>
<span class="facing__txt"><b>South-west facing</b><small>Direct sun 12:40 to 19:50</small></span>
</div>
</div>
<div class="track" data-track>
<div class="rail" data-rail>
<span class="rail__ticks" data-ticks aria-hidden="true"></span>
<span class="knob" data-knob role="slider" tabindex="0" aria-label="Time of day" aria-valuemin="420" aria-valuemax="1200" aria-valuenow="420" aria-valuetext="07:00">
<span class="knob__in">
<svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="2.6"></circle><path data-rays d="M8 1.8v1.6M8 12.6v1.6M1.8 8h1.6M12.6 8h1.6M3.6 3.6l1.1 1.1M11.3 11.3l1.1 1.1M3.6 12.4l1.1-1.1M11.3 4.7l1.1-1.1"></path></svg>
</span>
</span>
</div>
<div class="stops">
<button type="button" data-stop="0">Morning</button>
<button type="button" data-stop="0.5">Noon</button>
<button type="button" data-stop="1">Evening</button>
</div>
</div>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.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.
38 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 “House light gallery” from Animorio and fit it into my siteliving-room.webp, a CC0 photo, is drawn to cover the canvas every frame. Everything the light needs (the three bays of the window, the floor line under it, the sofa, the side table, the lamps) is measured on the photo in a 1200 by 797 frame, and the same frame scales with the photo.
Every frame a small light map is composed, at a third of the size: the colour of the hour (cool in the morning, full at noon, amber and then blue in the evening), the glow by the windows, the glass with the sky, the sun and the lamps. The map is laid over the photo with multiply, like real light over colours.
Every louvre of every bay is thrown onto the floor: a point of the window h above the floor lands h times further forward and sideways, depending on the hour. So the patch has the stripes of the louvres and the bars, short at noon and long towards the sofa in the evening; it is clipped to the floor and the sofa, side table and desk are cut out of it.
The patch burns with two screen glows, the beam is a faint polygon from the window to the patch with dust glinting only inside it, in the evening the floor lamp washes the ceiling and the spots light their pools, and over it all go the cool or warm grade, the vignette and the grain.
Every digit is a strip of numbers with a position that eases to the right digit the shortest way round. The loupe redraws a piece of the canvas magnified in a circle, and a polygon for each thing in the photo tells it what it is looking at.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | 0.06 | Where the day starts: 0 = seven, 0.5 = one o'clock, 1 = eight in the evening. |
SUN | script.js | 1 | How strong the sun coming through the window is. |
BLOOM | script.js | 0.7 | How much the sunlight burns and spreads. |
WARMTH | script.js | 1 | How much the colour warms towards the evening. |
LAMPS | script.js | 1 | How strong the two lamps are in the evening. |
GRAIN | script.js | 0.04 | How visible the grain of the photo is. |
DUST | script.js | 46 | How many specks of dust glint in the beam. |
ZOOM | script.js | 2.4 | How much the loupe magnifies. |
LENS | script.js | 120 | How large the loupe is, in pixels. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the pointer's walk on its own. |
ACCENT | script.js | #d9772f | The colour of the evening: the compass needle and the sun on the handle. |
In the gallery of a property listing, a holiday home, a hotel or a short let, where the aspect and the light matter as much as the square metres: whoever looks sees for themselves that the room gets the afternoon sun. The room is changed with another photo (and the measures of the window, the floor and the lamps in script.js), the light in SUN, WARMTH and LAMPS.
The same animations at adapted sizes: the card is as wide as the screen, the photo is measured on width and height, framed to cover keeping the window and the floor, and recomputed when the size changes. The loupe appears while a finger is held on the photo; on narrow screens the direct sun line goes.
No pointer walking on its own, no drifting dust and no changing grain: the room starts in the late afternoon with the sun already on the floor, the slider moves the light at once without easing and the loupe fades in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 15 KB; the libraries: GSAP 28 KB.
Tested on 9 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.