Dusklayer
Sign in Get Pro
N° 0022ScenePro

Tidal Glass

An underwater scene that rises through the surface as you scroll.

Source files, Studio plan

34 KB of text that builds one HTML file. Paste it into Claude Code, Cursor or v0 to rebuild this page.

Open full page Live. Scroll inside the preview to play it.
Loading the layer
LooksShowing AbyssEach look changes the colours of the live preview and goes into the prompt you copy.
Make it yoursYour brand, copy and colours go into the prompt you copy. Colours change the preview live.
Brand remix is a Pro feature at launch. It is open in the preview.

Overview

You look up through the surface of the sea from 9 m down, Snell's window bright overhead and the depths mirrored around it, while glass ribbons twist in the current and caustics run over the sand and the glass; scrolling raises the camera, breaks the surface with one ripple, and leaves the ribbons standing in calm water beside their reflections.

Signature momentFrom deep water, the bright 97 degree disc of Snell's window with the broken sun in it, light shafts falling from it and five to nine glass ribbons crossing it, each bending the window behind it with a faint colour split while caustics slide over the glass.

  1. Snell's window

    From 9.6 m down every ray that meets the surface within 48.6 degrees of vertical refracts out to the sky, so the whole sky fits a 97 degree disc; outside it the underside of the surface mirrors the depths by total internal reflection. The edge is solved at water indices 1.329, 1.333 and 1.337, which leaves a thin colour fringe the waves break up.

  2. One wave field

    Eight seeded waves of 0.6 to 3.4 m tilt the surface. Caustics are one over the Jacobian determinant of the refracted light map, one step back to where the light entered, red and blue focusing 3% apart as water disperses; the same field shakes the window's edge, the mirror images and the 12 step light shafts.

  3. Glass that bends the sea

    The water renders first into a half size, half float texture; each ribbon samples it through two refractions of a thin lens cross section at three indices (ior 1.2 to 1.5, plus and minus 0.016), with exact Fresnel against water or air and a green tint where light crosses more glass.

  4. A lens that straightens

    Looking up, a stereographic dome port 116 degrees tall keeps the window round and right of the copy; by 80% of the climb it has eased into a 54 degree pinhole, so the horizon is straight when the camera breaks through.

  5. Through the surface

    Across 5.6% of the scroll a wavy waterline crosses the lens, sky above and sea below, each pixel drawn from its own side of the water. One ring spreads at 1.3 m/s in the water and one across the lens, then the surface settles to a third of its slope and the ribbons stand beside clear reflections.

  6. Phones and budgets

    Phones draw 3 ribbons shaded from the analytic water with no scene texture, still shafts at 6 steps and a 0.66 scale canvas; laptops draw 5 to 9 ribbons with 12 shaft steps and MSAA. One HTML file of 80 KB, no assets, rendered in a Worker on an OffscreenCanvas.

Build details

Kind
Scene
Plan
Pro
Tone
Dark, Light
Industries
Wellness and clinics, Beauty, AI and tech
Technique
Glass refraction, Shaders, WebGL 3D
Built with
Lenis 1.3.27, plain HTML, CSS and one ES module
Looks
9
Weight
80 KB, layer files only
Mobile performance
100
Accessibility
100
Fidelity Score
In review
Licence
Commercial, including client work. No redistribution. Read it
Version
1, updated 3 November 2026
Released
3 November 2026
Parameters, 13 of them, all live through DUSKLAYER.set()
ControlKeyRangeDefault
RibbonsribbonCount5 to 97
Index of refractionior1.2 to 1.51.45
Caustic scalecausticScale0.5 to 21.0
Caustic speedcausticSpeed0.2 to 20.8
Water tintwaterTintcolor#0A2E33
SkyskyTintcolor#9FC2C4
Depth (m)depth5 to 2416
Surface atsurfaceAt0.5 to 0.90.7
Light shaftsrayIntensity0 to 21.0
Accentaccentcolor#8FD3C7
Page tonepageToneselect: dark, lightdark
Spring stiffnessspringStiffness0.4 to 2.51.0
Seedseed1 to 9997

Something wrong with this layer? Report a problem and we fix it in the next version.

The prompt

One text file, 34 KB, 10 sections. Every number the page uses is in it, so another model can rebuild the layer without seeing this one.

  1. Role
  2. Output contract
  3. Design tokens
  4. Layout
  5. Scene
  6. Presets
  7. Motion
  8. Responsive and performance
  9. Acceptance checklist
  10. Customize

How to use it

  1. Pick a look. The look you choose above is written into the prompt’s parameter block.
  2. Copy the prompt. Paste it into Claude Code, Cursor or v0 as the first message of a new session.
  3. Make it yours. Change the brand name, copy, colours and fonts first; every placeholder is marked. Keep the structure.
  4. Check it. The prompt ends with an acceptance checklist. Run through it before you ship.
Read the opening of the prompt
# Tidal Glass: build prompt

## Role

Build one self contained `index.html` for {{BRAND_NAME}}, an invented float and cold water studio on {{PLACE}}, {{CITY}} (four float rooms at 35.5 °C, a 6 °C plunge, a cedar sauna). The hero is a sea you look up through from 9 m down: Snell's window, a bright 97 degree disc with a wave broken edge and the sun in it, and around it the underside of the surface mirroring the depths. Five to nine thin glass ribbons stand from the floor up through the surface, twisting; each refracts the water behind it with Fresnel and a slight colour split, and caustics slide over the glass; shafts fall from the window. Scroll raises the camera and pulls it back, breaks the surface at `surfaceAt` with one ripple, and leaves the ribbons standing in calm water beside their reflections. The cursor bends them on heavy springs. Below: the page a real float studio would publish. Hand written WebGL2, no three.js, no textures, no images; one wave field drives the window, the caustics and the shafts.

## Output contract

- One file, CSS and scripts inline, the scene in an ES module; no build step, framework or GSAP. Lenis only, by import map `{"imports":{"lenis":"https://cdn.jsdelivr.net/npm/lenis@1.3.27/dist/lenis.mjs"}}`, imported after the scene starts, never under capture or reduced motion (`lerp 0.1`, `autoRaf: false`).
- Fonts from Google Fonts in one request: {{FONT_DISPLAY}} 300 and 500, {{FONT_BODY}} 400 and 500, `display=swap`, `media="print" onload="this.media='all'"`, a `<noscript>` copy. Fallbacks: `'Trirong Fallback'` from `local('Times New Roman'), local('Liberation Serif'), local('Tinos')`, weight 300 size-adjust 115.7%, ascent 103.7%, descent 46.2%, weight 500 size-adjust 123%, ascent 97.5%, descent 43.4%; `'Figtree Fallback'` from `local('Arial'), local('Liberation Sans'), local('Arimo')`, 400 101.2%, 93.9%, 24.7%, 500 102%, 93.1%, 24.5%; line gap 0. `font-variant-numeric: tabular-nums` on the body.

[32,296 more characters. Copy the prompt to get all of it.]

More layers

Open the library

Chrome lettering breaks apart under soft studio light, one letter at a time as you scroll.

ScenePro

Ferro Mark

N° 0018

A chrome C forms from liquid metal, bristles into ferrofluid spikes near your cursor and slumps into a pool on scroll.

ScenePro

A field of light responds to your pointer and opens on scroll.

ScenePro