3D
QR Garden
A voxel garden you can scan, where the QR code is built from hedge blocks and path tiles and the tree's canopy is repainted so it redraws the code.

- Role
- Solo designer and developer
- Timeframe
- Oct 2026 - Nov 2026
- 4Commits
- ~575Source and test lines
- 4Unit test blocks
- 5E2E test blocks
- 0Runtime network calls
Problem
A decorative 3D scene that hides or distorts a QR code is useless, so the garden has to stay scannable while looking like a garden.
Approach
- The matrix is built with qrcode-generator at error correction H and the smallest fitting version, and drawn as hedge and path blocks.
- The tree canopy is repainted per module, skipping the finder, timing and alignment patterns, so it redraws the code instead of hiding it.
- A "Scan me" tween moves to a flat, top-down, unlit view, and the end-to-end test decodes that view with jsqr.
Result
A live, static site on Cloudflare Pages with no runtime network calls, no storage and no analytics, whose scan view is decoded headlessly in tests for all three seasons.
Problem
A QR code drawn as 3D scenery is only worth anything if a phone can still read it. The garden has to look like a garden while the code underneath stays intact.
Approach and decisions
The scene is three.js 0.186 with TypeScript and Vite. src/qr.ts builds the matrix with qrcode-generator at error correction H and the smallest version that fits, validates input (http or https only, at most 300 characters) and marks the function patterns (finder, timing, alignment) by formula for versions up to 40. src/palette.ts defines three seasons, and src/garden.ts builds the scene: hedge and path blocks for the code, and a tree whose canopy is repainted per module so it redraws the code. โScan meโ tweens the camera to a flat, top-down, unlit view. The result can be exported as PNG or GLB.
Privacy is part of the design: no runtime network calls, no storage, no analytics, self-hosted fonts, a strict CSP, and assetsInlineLimit: 0 so no data: URIs are emitted.
Keeping it scannable
The main risk is the canopy covering modules a scanner needs. The repaint skips the function patterns, and the Playwright test decodes the scan view with jsqr for each of the three seasons, so a regression fails the build rather than a phone.
Results
The site is live on Cloudflare Pages. It has 4 commits between 2026-10-15 and 2026-11-05, about 575 lines of source and tests, 4 unit test blocks and 5 end-to-end test blocks. No Lighthouse or accessibility scores are recorded for it.
Limits
The alignment-pattern exclusion is unit-tested for version 4 only. The JavaScript bundle is about 586 KB uncompressed because of three.js. The source repository is private.
