Skip to content

Repository files navigation

TLcube — TrilLuminance (cube)

English · 한국어

Formal name TrilLuminance (cube) · codename Trilume. A 2.5D visual code that stores data in the luminance rank of three rhombic faces per hexagonal cell. Status: M0 encoder complete — text in → render · PNG/SVG export · deterministic output.

Type Y — a single isometric cube with a fallback QR at the top left Type O — a hexagonal field with a central QR finder Type A — a triangular silhouette with a central QR finder


What it is

Each hexagonal cell is split by a rhombille tiling into three rhombi — T (top), L (left), R (right) — and data rides on the relative luminance order of those three faces. Three faces permute 3! = 6 ways, so one cell carries one base-6 digit (log₂6 ≈ 2.585 bits).

The result looks like a field of isometric cubes, each lit from a different direction. The encoding principle and the visual are the same thing.

Why

This is not a QR replacement. Rhombic cells lose to square modules on density, and that argument is settled. Two things are worth having instead:

  1. Aesthetics — a code you would actually put on a wall.
  2. Differential-encoding robustness — data lives in the relative order of three faces within a cell, not in absolute luminance. Any monotonic tone transform — global illumination change, gamma, printer/display tone mapping — leaves the order intact, and therefore the data.

Renderer freedom

The data contract is only the order between faces and a minimum separation (Δmin). Inside that, a renderer does what it likes: jitter absolute luminance per cell, apply color, gradient the inside of a face, animate over time. Only the order after conversion to relative luminance has to survive.

That freedom is the point of the format.

Three types

Type Silhouette Net payload (ECC-M)
O Hexagonal field 18 / 39 / 65 B (k = 6 / 8 / 10)
A Triangular silhouette 31 / 62 / 101 B (k = 6 / 8 / 10)
Y Single isometric cube 31 / 98 / 141 B (n = 13 / 21 / 25)

All three share the same data contract and differ only in silhouette. Each can carry a fallback QR printed alongside, so a reader that cannot decode the TL code still has a path.

Status

Milestone Scope Status
M0 Generator — layout frozen complete
M1 Synthetic decoder + distortion harness
M2 Real-camera scanner
M3 Style presets · packaging

Usage

node tools/dev-server.mjs        # http://localhost:8765 — development (index.html + src/)
node tools/build-single.mjs      # dist/trilume.html — one file, opens over file:// with no server
npm test                         # full suite (node --test)

A filming print sheet (A4, QR then TLcube, same on-paper size) lives at print/tlcube-poster.html. It opens over file://. See print/README.md.

How it is built

Vanilla JavaScript. No build toolchain, zero runtime dependencies. It runs as a single HTML file.

Export is deterministic — identical input yields byte-identical PNG/SVG. That is why pixels come from an in-repo rasterizer (src/raster.js) rather than a browser canvas, and PNG encoding is also in-repo (src/png.js). Canvas is used only for the on-screen preview.

Encoding path: encode.js (payload → RS over GF(211) codeword → per-cell digits) → scene.js (digits → shape list) → canvas preview / raster.js + png.js / svg.js. Render self-check lives in verify.js, which reads the rasterized pixels back and confirms every cell's luminance ranking matches the intended digit, using the same sample-disc median statistic the decoder is specified to use.

Spec

The normative format spec is SPEC.md — geometry, symbol encoding, layout, capacity, error correction, and conformance requirements. Every numeric table in it is generated from src/, and the wire contract is pinned by snapshots in test/.

Implementing only a decoder still counts as a conforming implementation (SPEC §11). Adoption starts with the reading side, so partial implementations are deliberately not excluded.

License

Code and spec in this repository are released under the Apache License 2.0. Copyright 2026 SoliEstre.

Patents: as of 2026-08-09, SoliEstre holds no patents and has no patent applications pending on this format. That statement is unconditional — anyone may implement this format, whole or in part, decoder-only or not, commercially or not. (Apache-2.0 §3 separately grants an explicit patent license for the distributed code.)

Third party: src/vendor/jcodd.js is an unmodified vendored copy of jcodd and remains under its original MIT license (full text in the file header).

Trademark notice: QR Code is a registered trademark of DENSO WAVE INCORPORATED.


Generator: tlcube.estre.so · Overview: tl.estre.so · Scanner: tlscan.estre.so

About

2.5D visual code — data encoded in the luminance rank permutation of three rhombic faces per hexagonal cell

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages