Skip to content
animorio
IT
Back to the library

Ink that reveals

WebGL, HoverWebGL, Canvas, GSAPAdvancedCompressed weight: Demo 9.8 KBGSAP 28 KBFreeDownload the zip

The pointer moves over the paper like a wet brush: where it passes the paper turns into ink, a real WebGL fluid, and underneath the same word appears, inflated like a silver balloon. Then the paper closes again.

Rebuilt from scratch studying noth.in by Thomas Carré, Pierre Patrault: the idea is theirs; code, copy and images are ours. Read how it’s made

The code

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>
<!--
  "Ink that reveals" 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="it">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>L’inchiostro che scopre</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
  <link rel="stylesheet" href="style.css">
  <script>document.documentElement.classList.add('js');</script>
</head>
<body>
  <main class="palco" data-palco>
    <h1 class="parola" data-parola>Soffio</h1>
    <!-- sopra la carta: la tela WebGL disegna il gemello gonfio solo dove passa l'inchiostro -->
    <canvas class="tela" data-tela aria-hidden="true"></canvas>
    <!-- senza WebGL il gemello è in CSS e lo scopre un cerchio che segue il puntatore -->
    <div class="gemello" data-gemello aria-hidden="true"><span>Soffio</span></div>
    <p class="nota">Passa sopra la carta: sotto c’è la stessa parola, gonfia.</p>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

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.

20 values to change

Or ask your AI assistant for it

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 “Ink that reveals” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

A huge black word printed on white paper. Moving the pointer (or a finger) tears the paper into a trail of black ink that curls and slides like water; inside the trail you see the same word, but inflated and silver, with the reflections of a metal balloon. Within a few seconds the ink withdraws and the paper closes by itself. If nobody touches it, an invisible brush draws a slow figure of eight.

How it works

A fluid on a grid

Velocity, pressure and ink are half-precision textures (RGBA16F) drawn by one full-screen triangle. Every frame: vorticity, divergence, twenty Jacobi steps for the pressure, gradient subtraction, then the velocity carries itself and the ink. It is Jos Stam’s stable fluids method.

The brush

Every pointer movement pours two Gaussian splats at the same point: into the velocity, equal to the movement counted in grid cells times the push, and into the ink. The brush is 7.5% of the word’s font size. On fast strokes the splats repeat along the segment, so the trail has no holes.

The sharp edge

The ink is soft, but the screen cuts it at 0.5 after multiplying it by 3.9, with a smoothstep just one screen pixel wide (fwidth): a torn-paper edge, without steps. The ink loses 1.2% every sixtieth of a second and falls below the threshold after about three seconds: the paper closes.

The inflated word

The same word is drawn white on black on a 2D canvas, at the exact position of the letters on the page, then blurred three times and put through a square root: a height map with steep sides and a round top. Its slopes give the normals, and the normals reflect a horizon, light sky above and dark ground below: metal.

Values to change

NameFileDefaultWhat it changes
SPINTAscript.js6How hard the brush pushes the fluid: the velocity poured is the pointer’s movement, counted in grid cells, times this number.
PENNELLOscript.js0.075Brush radius, as a fraction of the word’s font size: that way the trail stays in proportion on phones too.
RESTA_INCHIOSTROscript.js0.988How much ink is left every sixtieth of a second: the closer to 1, the longer the trail lasts.
RICCIOLIscript.js12How much the fluid curls. With 0 no vortices.
GONFIOscript.js5How rounded the silver word is.

Try them in the Playground

When to use it

For the first screen of a brand with a strong word: the simplest gesture, moving the mouse, becomes a game with the logo. Avoid it over text meant to be read.

On phones

The finger paints. The fluid uses a smaller grid and fewer steps, and the canvas works at a density of 1.5 at most. Inside an iframe a vertical finger stays with the page: it only paints sideways.

With reduced motion

No fluid and no ghost brush: the silver word shows in a still circle under the pointer.

Pitfalls

  • RGBA16F targets are not renderable everywhere: request EXT_color_buffer_float, test a framebuffer and, if it is not complete, fall back to a CSS mask.
  • The inflated word must be drawn where the page puts each letter (each letter’s offsetLeft and an invisible mark on the baseline), otherwise the two twins do not match.
  • The canvas has premultiplied alpha: colour times alpha, and the colour must not exceed 1 or the highlights turn into halos.
  • The fluid must not run when nobody sees it: stop it off screen (IntersectionObserver) and when the tab is hidden.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 9.8 KB; the libraries: GSAP 28 KB.

Testing

Tested on 27 September 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: Done

License

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.

All animations