A small optical image playground: upload a photo, move a glass lens over it, choose a refraction character, and export the composition as a PNG.
Five materials: Original, Bubble, Fluted, Ripple, Vortex. Rounded square and circular apertures, smooth resizing and shape morphing, optional clear magnification, and two interface themes. The default sample is a generated Lacoste-inspired cooking-pot concept.
Circular lens
Square lens
Lens over a portrait
Screenshots use example images for demonstration. Brand names and marks that appear in them belong to their respective owners; this project is not affiliated with or endorsed by them.
Install Node.js 24 LTS (minimum 22.12) with npm. No other global tools are required.
npm startThe launcher installs dependencies automatically with npm ci when missing or when the lockfile changes, then starts http://127.0.0.1:4322/. Open this address in your browser. On Windows, double-click Start.cmd instead. Internet access is needed for the initial dependency installation. Stop the server with Ctrl+C.
Manual alternative:
npm ci
npm run dev -- --host 127.0.0.1 --port 4322Do not open index files directly: run the server. Once installed, the app uses local fonts, the bundled sample and local browser processing. No API key, paid service, account or backend is required. Uploaded images are not sent to a server.
- Upload, drag in or paste your image.
- Move the pointer to position the lens; scroll over the image to resize.
- Click the artwork to morph between rounded square and circle.
- Select a material with the top buttons or keys 1–5. Focused material buttons also support left/right arrows.
- Space pins/releases the lens and freezes its animation. Escape toggles the lens.
- Settings adjusts refraction, colour separation and other controls. Turn Visual effects off for clear magnification.
- Choose an output format, then Export PNG. Export includes only the artwork.
Photo: 2400×1600; square: 2048×2048; portrait: 1600×2000; wide: 2400×1350. Exports do not add detail beyond the source image. Uploads are limited internally to a maximum dimension of 4096 pixels. Use a modern browser with WebGL/graphics acceleration enabled. This is an image editor, not a browser extension or video exporter.
npm ci
npm run lint:scripts
npm run build
npm run previewPublish the generated dist/ directory to a static host. For Netlify, Vercel or Cloudflare Pages, use build command npm run build, output directory dist, and Node.js 24. Install development dependencies during the build: Astro and build tooling need them.
Assets currently use root-relative URLs. Deploy at the root of a domain. GitHub Pages project subdirectories require adapting the asset URLs and Astro base; merely setting base is insufficient.
package-lock.json must remain committed. Do not commit node_modules or dist.
Built with Astro, Three.js and GLSL. This is a derivative of Tomoyuki Nakata's Mouse Following Square Lens Effect, upstream commit 423680b1322f7d984a5a9c2834fe7eaa3e697c84, published via Codrops. The Original material retains that optical approach. Lens Studio adds four stylised UV mappings, the editor, uploads, aperture morphing, pinning and PNG export. These effects are art-directed, not physically simulated glass.
The upstream random3 credit is Nikita Miropolskiy's Shadertoy example.
Code: MIT, with upstream notice retained. Font and sample details: THIRD-PARTY-NOTICES.md.


