尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Short words written as concentric gapped rings, scanned from a camera like a QR code. The Jane Street logo is the three-ring code for JSC (Jane Street Capital).
Everything runs in the browser: the detector is Rust compiled to WebAssembly, and images never leave the device.
A at 12 o'clock, then clockwise every 360°/26 ≈ 13.85°.Because the inner/outer ratio is fixed, no subset of a code's rings is itself a valid code, so a ring that goes undetected makes a scan fail instead of reading a shorter word.
Like a clock face, a code only reads correctly if you know which way is up. The
scanner assumes upright and tolerates half a slot (about ±6.9°) of error. Because
a code's gaps always sit a whole number of slots apart, rotating a code only
shifts every letter by the same amount, so any rotation reads as one of 26 words.
The app lets you fix the orientation by hand: step the top round one slot at a
time (buttons, [ ] or arrow keys), or pick from the list of all 26 readings.
An arrow on the overlay shows where the code's top is assumed to be.
ringcode/src/detect.rs, per binarisation (adaptive then Otsu, dark then light rings):
C1 − λC2 is rank one (l lᵀ) at the
pencil's double root. Then normalise the outer ellipse to a unit circle.| Path | What |
|---|---|
ringcode/ | Core library: format spec, SVG and raster rendering, detector. No dependencies. |
web/ | Browser app in Rust (web-sys), built with trunk; PWA manifest, service worker and icons. |
.github/workflows/pages.yml | Tests, builds and deploys to GitHub Pages. |
cargo test -p ringcode # unit + round-trip tests
cargo run -p ringcode --example decode_file -- photo.jpg # decode images from the CLI
cargo run -p ringcode --example svg -- HELLO > hello.svg # make a code
cargo run -p ringcode --example web_icons -- web # regenerate icon.svg and app icons
cd web && trunk serve --open # app at http://127.0.0.1:8080
The camera and the service worker need a secure context, which localhost and
GitHub Pages both provide.
The app is an installable PWA (web/manifest.webmanifest). web/sw.js makes it
work offline after the first visit: pages are fetched network-first, trunk's
content-hashed assets are cached permanently, and assets from older builds are
pruned when a new page arrives.
web/icon.svg is published as-is (not content-hashed), so it has a stable URL
next to the app, e.g. for linking to the icon from elsewhere.