Halide, Chromatic Aberration Lens Archive
What it does
Halide, an editorial photo studio, presents its image archive as a full-screen grid that pans with the cursor while a WebGL/GLSL lens magnifies the plates beneath the pointer and splits their RGB channels into a chromatic-aberration fringe. Fixed HUD chips (wordmark, volume, caption, hint) frame the effect; the grid is rasterized to a canvas texture and sampled by the fragment shader every frame, eased via requestAnimationFrame (no GSAP).
How it's built
| Category | gallery |
|---|---|
| Tech | vanilla JS |
| Complexity | page |
| Performance cost | medium |
| Mobile-safe | desktop-first |
Rebuild it with AI
This component's prompt is part of the paid library. Below you can read how it starts; the full prompt, the exact structure, timing and easing an AI agent needs to rebuild the effect, unlocks with any paid plan, yearly or lifetime.
# Chromatic Aberration Lens Gallery
## Goal
Build a full-screen, edge-to-edge grid of editorial portraits that **pans slowly as the cursor moves**, overlaid by a circular **magnifying lens that follows the pointer**. Inside the lens the imagery is **zoomed in and its RGB channels are split apart into a chromatic-aberration fringe** — red pushes one way, blue the other — with the distortion ramping up toward the lens rim like real glass. Outside the lens you just see the flat grid. The whole thing is cursor-driven and runs forever: nothing scrolls, nothing clicks, it simply reacts to `mousemove`. The star effect is the **WebGL/GLSL lens distortion + chromatic aberration** sampled live from the grid every frame.
## Tech
Vanilla HTML/CSS/JS. **No GSAP, no libraries, no framework, no npm dependencies** — the entire effect is hand-rolled with the **raw WebGL API + a GLSL fragment shader**, plus two `requestAnimationFrame` lerp loops for easing. A single ES-module script (`<script type="module" src="./script.js">`) drives everything. Do **not** reach for Three.js, a shader helper, or a tween library; the original talks to `gl` directly with a hand-written vertex + fragment shader pair, and eases the pointer/pan with manual linear-interpolation loops. Must run in a fresh Vite + npm project (though no packages are actually imported).
## Layout / HTML
Almost nothing lives in the HTML — the grid is generated by JS and the lens is a full-screen `<canvas>` overlay.
```html
<body>
<div class="viewport">
<div class="container"></div>
</div>
…
Premium prompt
Unlock this prompt, and every other one
From $99/year, or $139 once for lifetime access. Commercial license included.
See pricing Or start with the free set Already bought? Sign in
New components in your inbox
One email a week, only when new components ship, each with its live demo and prompt.